aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ex_getln.c
diff options
context:
space:
mode:
authorbfredl <bjorn.linse@gmail.com>2023-09-12 11:16:35 +0200
committerGitHub <noreply@github.com>2023-09-12 11:16:35 +0200
commit1c4a93b591828bc6970edad6282c004eb46f0b2d (patch)
tree2f2a403f8b0132976dfe0a61eb78f65028329cdd /src/nvim/ex_getln.c
parent6b5f44817e93c2985f3ea32122f1dc0047054018 (diff)
parentb04286a187d57c50f01cd36cd4668b7a69026579 (diff)
downloadrneovim-1c4a93b591828bc6970edad6282c004eb46f0b2d.tar.gz
rneovim-1c4a93b591828bc6970edad6282c004eb46f0b2d.tar.bz2
rneovim-1c4a93b591828bc6970edad6282c004eb46f0b2d.zip
Merge pull request #13243 from bfredl/intersection
feat(extmark): support highlighting and querying multiline ranges
Diffstat (limited to 'src/nvim/ex_getln.c')
-rw-r--r--src/nvim/ex_getln.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nvim/ex_getln.c b/src/nvim/ex_getln.c
index 08b010c153..09781f392a 100644
--- a/src/nvim/ex_getln.c
+++ b/src/nvim/ex_getln.c
@@ -2410,6 +2410,9 @@ static void cmdpreview_restore_state(CpInfo *cpinfo)
buf->b_changed = cp_bufinfo.save_b_changed;
+ // Clear preview highlights.
+ extmark_clear(buf, (uint32_t)cmdpreview_ns, 0, 0, MAXLNUM, MAXCOL);
+
if (buf->b_u_seq_cur != cp_bufinfo.undo_info.save_b_u_seq_cur) {
int count = 0;
@@ -2439,9 +2442,6 @@ static void cmdpreview_restore_state(CpInfo *cpinfo)
}
buf->b_p_ul = cp_bufinfo.save_b_p_ul; // Restore 'undolevels'
-
- // Clear preview highlights.
- extmark_clear(buf, (uint32_t)cmdpreview_ns, 0, 0, MAXLNUM, MAXCOL);
}
for (size_t i = 0; i < cpinfo->win_info.size; i++) {