Mercurial > vim
comparison src/ex_cmds.c @ 24383:ea2b697ddea8 v8.2.2732
patch 8.2.2732: prompt for s///c in Ex mode can be wrong
Commit: https://github.com/vim/vim/commit/e5b0b98a90acf420bb611fc99534982c98d0645b
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Apr 7 19:42:57 2021 +0200
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 https://github.com/vim/vim/issues/8073)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 07 Apr 2021 19:45:04 +0200 |
parents | 5d11a15dbaa9 |
children | f293bb501b30 |
comparison
equal
deleted
inserted
replaced
24382:ba12300088d4 | 24383:ea2b697ddea8 |
---|---|
4151 getvcol(curwin, &curwin->w_cursor, &sc, NULL, NULL); | 4151 getvcol(curwin, &curwin->w_cursor, &sc, NULL, NULL); |
4152 curwin->w_cursor.col = regmatch.endpos[0].col - 1; | 4152 curwin->w_cursor.col = regmatch.endpos[0].col - 1; |
4153 if (curwin->w_cursor.col < 0) | 4153 if (curwin->w_cursor.col < 0) |
4154 curwin->w_cursor.col = 0; | 4154 curwin->w_cursor.col = 0; |
4155 getvcol(curwin, &curwin->w_cursor, NULL, NULL, &ec); | 4155 getvcol(curwin, &curwin->w_cursor, NULL, NULL, &ec); |
4156 curwin->w_cursor.col = regmatch.startpos[0].col; | |
4156 if (subflags.do_number || curwin->w_p_nu) | 4157 if (subflags.do_number || curwin->w_p_nu) |
4157 { | 4158 { |
4158 int numw = number_width(curwin) + 1; | 4159 int numw = number_width(curwin) + 1; |
4159 sc += numw; | 4160 sc += numw; |
4160 ec += numw; | 4161 ec += numw; |