patch 8.1.0282: 'incsearch' does not work with command modifiers
Problem: 'incsearch' does not work with command modifiers.
Solution: Skip command modifiers.
diff --git a/src/ex_getln.c b/src/ex_getln.c
index fb16743..a8c5cfb 100644
--- a/src/ex_getln.c
+++ b/src/ex_getln.c
@@ -283,11 +283,24 @@
return TRUE;
if (firstc == ':')
{
- char_u *cmd = skip_range(ccline.cmdbuff, NULL);
- char_u *p;
- int delim;
- char_u *end;
+ char_u *cmd;
+ cmdmod_T save_cmdmod = cmdmod;
+ char_u *p;
+ int delim;
+ char_u *end;
+ char_u *dummy;
+ exarg_T ea;
+ vim_memset(&ea, 0, sizeof(ea));
+ ea.line1 = 1;
+ ea.line2 = 1;
+ ea.cmd = ccline.cmdbuff;
+ ea.addr_type = ADDR_LINES;
+
+ parse_command_modifiers(&ea, &dummy, TRUE);
+ cmdmod = save_cmdmod;
+
+ cmd = skip_range(ea.cmd, NULL);
if (*cmd == 's' || *cmd == 'g' || *cmd == 'v')
{
// Skip over "substitute" to find the pattern separator.
@@ -310,8 +323,6 @@
end = skip_regexp(p, delim, p_magic, NULL);
if (end > p || *end == delim)
{
- char_u *dummy;
- exarg_T ea;
pos_T save_cursor = curwin->w_cursor;
// found a non-empty pattern
@@ -319,11 +330,6 @@
*patlen = (int)(end - p);
// parse the address range
- vim_memset(&ea, 0, sizeof(ea));
- ea.line1 = 1;
- ea.line2 = 1;
- ea.cmd = ccline.cmdbuff;
- ea.addr_type = ADDR_LINES;
curwin->w_cursor = is_state->search_start;
parse_cmd_address(&ea, &dummy);
if (ea.addr_count > 0)