mirror of
https://github.com/neovim/neovim.git
synced 2026-07-11 20:09:44 +00:00
vim-patch:9.0.0145: substitute that joins lines drops text properties (#37108)
Problem: Substitute that joins lines drops text properties.
Solution: Move text properties of the last line to the new line.
213bbaf15a
Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
@@ -4182,7 +4182,8 @@ static int do_sub(exarg_T *eap, const proftime_T timeout, const int cmdpreview_n
|
|||||||
if (nmatch == 1) {
|
if (nmatch == 1) {
|
||||||
p1 = sub_firstline;
|
p1 = sub_firstline;
|
||||||
} else {
|
} else {
|
||||||
p1 = ml_get(sub_firstlnum + (linenr_T)nmatch - 1);
|
linenr_T lastlnum = sub_firstlnum + (linenr_T)nmatch - 1;
|
||||||
|
p1 = ml_get(lastlnum);
|
||||||
nmatch_tl += nmatch - 1;
|
nmatch_tl += nmatch - 1;
|
||||||
}
|
}
|
||||||
int copy_len = regmatch.startpos[0].col - copycol;
|
int copy_len = regmatch.startpos[0].col - copycol;
|
||||||
|
|||||||
Reference in New Issue
Block a user