diff options
author | Bram Moolenaar <Bram@vim.org> | 2021-04-07 19:42:57 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-04-07 19:42:57 +0200 |
commit | e5b0b98a90acf420bb611fc99534982c98d0645b (patch) | |
tree | 81013cd5e07207da723f8b27db2d0724ac1dabe4 /src/ex_cmds.c | |
parent | 8dddc1f0e2e9eeb29fc59477b515bcd6bb1243ec (diff) |
patch 8.2.2732: prompt for s///c in Ex mode can be wrongv8.2.2732
Problem: Prompt for s///c in Ex mode can be wrong.
Solution: Position the cursor before showing the prompt. (closes #8073)
Diffstat (limited to 'src/ex_cmds.c')
-rw-r--r-- | src/ex_cmds.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/ex_cmds.c b/src/ex_cmds.c index 90a9403ff3..6cd54d20ce 100644 --- a/src/ex_cmds.c +++ b/src/ex_cmds.c @@ -4153,6 +4153,7 @@ ex_substitute(exarg_T *eap) if (curwin->w_cursor.col < 0) curwin->w_cursor.col = 0; getvcol(curwin, &curwin->w_cursor, NULL, NULL, &ec); + curwin->w_cursor.col = regmatch.startpos[0].col; if (subflags.do_number || curwin->w_p_nu) { int numw = number_width(curwin) + 1; |