mirror of
https://github.com/vim/vim.git
synced 2025-07-04 23:07:33 -04:00
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:
parent
8dddc1f0e2
commit
e5b0b98a90
@ -4153,6 +4153,7 @@ ex_substitute(exarg_T *eap)
|
|||||||
if (curwin->w_cursor.col < 0)
|
if (curwin->w_cursor.col < 0)
|
||||||
curwin->w_cursor.col = 0;
|
curwin->w_cursor.col = 0;
|
||||||
getvcol(curwin, &curwin->w_cursor, NULL, NULL, &ec);
|
getvcol(curwin, &curwin->w_cursor, NULL, NULL, &ec);
|
||||||
|
curwin->w_cursor.col = regmatch.startpos[0].col;
|
||||||
if (subflags.do_number || curwin->w_p_nu)
|
if (subflags.do_number || curwin->w_p_nu)
|
||||||
{
|
{
|
||||||
int numw = number_width(curwin) + 1;
|
int numw = number_width(curwin) + 1;
|
||||||
|
@ -77,6 +77,9 @@ func Test_Ex_substitute()
|
|||||||
call WaitForAssert({-> assert_match(' 1 foo foo', term_getline(buf, 5))},
|
call WaitForAssert({-> assert_match(' 1 foo foo', term_getline(buf, 5))},
|
||||||
\ 1000)
|
\ 1000)
|
||||||
call WaitForAssert({-> assert_match(' ^^^', term_getline(buf, 6))}, 1000)
|
call WaitForAssert({-> assert_match(' ^^^', term_getline(buf, 6))}, 1000)
|
||||||
|
call term_sendkeys(buf, "N\<CR>")
|
||||||
|
call term_wait(buf)
|
||||||
|
call WaitForAssert({-> assert_match(' ^^^', term_getline(buf, 6))}, 1000)
|
||||||
call term_sendkeys(buf, "n\<CR>")
|
call term_sendkeys(buf, "n\<CR>")
|
||||||
call WaitForAssert({-> assert_match(' ^^^', term_getline(buf, 6))},
|
call WaitForAssert({-> assert_match(' ^^^', term_getline(buf, 6))},
|
||||||
\ 1000)
|
\ 1000)
|
||||||
|
@ -750,6 +750,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
2732,
|
||||||
/**/
|
/**/
|
||||||
2731,
|
2731,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user