0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

updated for version 7.4.049

Problem:    In Ex mode, when line numbers are enabled the substitute prompt is
            wrong.
Solution:   Adjust for the line number size. (Benoit Pierre)
This commit is contained in:
Bram Moolenaar
2013-10-02 18:43:06 +02:00
parent 0c6ccfdb62
commit 3eead7c227
2 changed files with 9 additions and 1 deletions

View File

@@ -4740,11 +4740,17 @@ do_sub(eap)
char_u *resp; char_u *resp;
colnr_T sc, ec; colnr_T sc, ec;
print_line_no_prefix(lnum, FALSE, FALSE); print_line_no_prefix(lnum, do_number, do_list);
getvcol(curwin, &curwin->w_cursor, &sc, NULL, NULL); getvcol(curwin, &curwin->w_cursor, &sc, NULL, NULL);
curwin->w_cursor.col = regmatch.endpos[0].col - 1; curwin->w_cursor.col = regmatch.endpos[0].col - 1;
getvcol(curwin, &curwin->w_cursor, NULL, NULL, &ec); getvcol(curwin, &curwin->w_cursor, NULL, NULL, &ec);
if (do_number || curwin->w_p_nu)
{
int numw = number_width(curwin) + 1;
sc += numw;
ec += numw;
}
msg_start(); msg_start();
for (i = 0; i < (long)sc; ++i) for (i = 0; i < (long)sc; ++i)
msg_putchar(' '); msg_putchar(' ');

View File

@@ -738,6 +738,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 */
/**/
49,
/**/ /**/
48, 48,
/**/ /**/