mirror of
https://github.com/neovim/neovim.git
synced 2025-10-02 07:58:35 +00:00
Fix newline substitution: Adapt to upstream patch.
Fix previous changes to be compatible with agreed changes to upstream vim (https://code.google.com/p/vim/issues/detail?id=287).
This commit is contained in:
@@ -3606,12 +3606,13 @@ void do_sub(exarg_T *eap)
|
|||||||
linenr_T joined_lines_count = eap->line2 < curbuf->b_ml.ml_line_count
|
linenr_T joined_lines_count = eap->line2 < curbuf->b_ml.ml_line_count
|
||||||
? eap->line2 - eap->line1 + 2
|
? eap->line2 - eap->line1 + 2
|
||||||
: eap->line2 - eap->line1 + 1;
|
: eap->line2 - eap->line1 + 1;
|
||||||
if (joined_lines_count >= 2) {
|
if (joined_lines_count > 1) {
|
||||||
do_join(joined_lines_count, FALSE, TRUE, FALSE, true);
|
do_join(joined_lines_count, FALSE, TRUE, FALSE, true);
|
||||||
}
|
sub_nsubs = joined_lines_count - 1;
|
||||||
sub_nlines = sub_nsubs = joined_lines_count - 1;
|
sub_nlines = 1;
|
||||||
do_sub_msg(false);
|
do_sub_msg(false);
|
||||||
ex_may_print(eap);
|
ex_may_print(eap);
|
||||||
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user