mirror of
https://github.com/neovim/neovim.git
synced 2025-10-04 17:06:30 +00:00
Merge pull request #12968 from erw7/fix-substitute2
fix substitute problem with inccommand
This commit is contained in:
@@ -1420,7 +1420,7 @@ Integer nvim_buf_set_extmark(Buffer buffer, Integer ns_id,
|
||||
}
|
||||
|
||||
id = extmark_set(buf, (uint64_t)ns_id, id,
|
||||
(int)line, (colnr_T)col, line2, col2, decor, kExtmarkUndo);
|
||||
(int)line, (colnr_T)col, line2, col2, decor, kExtmarkNoUndo);
|
||||
|
||||
return (Integer)id;
|
||||
|
||||
@@ -1534,7 +1534,7 @@ Integer nvim_buf_add_highlight(Buffer buffer,
|
||||
ns_id = extmark_set(buf, ns_id, 0,
|
||||
(int)line, (colnr_T)col_start,
|
||||
end_line, (colnr_T)col_end,
|
||||
decoration_hl(hl_id), kExtmarkUndo);
|
||||
decoration_hl(hl_id), kExtmarkNoUndo);
|
||||
return src_id;
|
||||
}
|
||||
|
||||
@@ -1664,7 +1664,7 @@ Integer nvim_buf_set_virtual_text(Buffer buffer,
|
||||
Decoration *decor = xcalloc(1, sizeof(*decor));
|
||||
decor->virt_text = virt_text;
|
||||
|
||||
extmark_set(buf, ns_id, 0, (int)line, 0, -1, -1, decor, kExtmarkUndo);
|
||||
extmark_set(buf, ns_id, 0, (int)line, 0, -1, -1, decor, kExtmarkNoUndo);
|
||||
return src_id;
|
||||
}
|
||||
|
||||
|
@@ -783,7 +783,7 @@ void bufhl_add_hl_pos_offset(buf_T *buf,
|
||||
}
|
||||
(void)extmark_set(buf, (uint64_t)src_id, 0,
|
||||
(int)lnum-1, hl_start, (int)lnum-1+end_off, hl_end,
|
||||
decor, kExtmarkUndo);
|
||||
decor, kExtmarkNoUndo);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -3029,8 +3029,6 @@ u_header_T *u_force_get_undo_header(buf_T *buf)
|
||||
curbuf = buf;
|
||||
// Args are tricky: this means replace empty range by empty range..
|
||||
u_savecommon(0, 1, 1, true);
|
||||
curbuf = save_curbuf;
|
||||
|
||||
uhp = buf->b_u_curhead;
|
||||
if (!uhp) {
|
||||
uhp = buf->b_u_newhead;
|
||||
@@ -3038,6 +3036,7 @@ u_header_T *u_force_get_undo_header(buf_T *buf)
|
||||
abort();
|
||||
}
|
||||
}
|
||||
curbuf = save_curbuf;
|
||||
}
|
||||
return uhp;
|
||||
}
|
||||
|
Reference in New Issue
Block a user