From 04b3c327723587fa63f391884b8dfce44233cc77 Mon Sep 17 00:00:00 2001 From: KillTheMule Date: Sun, 5 Nov 2017 17:11:44 +0100 Subject: 'inccommand': Fix matches for zero-width (#7487) closes #7485 --- src/nvim/ex_cmds.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/nvim/ex_cmds.c b/src/nvim/ex_cmds.c index 112f53247c..39059a2c80 100644 --- a/src/nvim/ex_cmds.c +++ b/src/nvim/ex_cmds.c @@ -3478,6 +3478,10 @@ static buf_T *do_sub(exarg_T *eap, proftime_T timeout) else ++matchcol; } + // match will be pushed to preview_lines, bring it into a proper state + current_match.start.col = matchcol; + current_match.end.lnum = sub_firstlnum; + current_match.end.col = matchcol; goto skip; } -- cgit