1
0
forked from aniani/vim

patch 8.2.2732: prompt for s///c in Ex mode can be wrong

Problem:    Prompt for s///c in Ex mode can be wrong.
Solution:   Position the cursor before showing the prompt. (closes #8073)
This commit is contained in:
Bram Moolenaar
2021-04-07 19:42:57 +02:00
parent 8dddc1f0e2
commit e5b0b98a90
3 changed files with 6 additions and 0 deletions

View File

@@ -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;