Skip to content

Commit 4046505

Browse files
committed
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)
1 parent cc1a55e commit 4046505

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

src/ex_cmds.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4740,11 +4740,17 @@ do_sub(eap)
47404740
char_u *resp;
47414741
colnr_T sc, ec;
47424742

4743-
print_line_no_prefix(lnum, FALSE, FALSE);
4743+
print_line_no_prefix(lnum, do_number, do_list);
47444744

47454745
getvcol(curwin, &curwin->w_cursor, &sc, NULL, NULL);
47464746
curwin->w_cursor.col = regmatch.endpos[0].col - 1;
47474747
getvcol(curwin, &curwin->w_cursor, NULL, NULL, &ec);
4748+
if (do_number || curwin->w_p_nu)
4749+
{
4750+
int numw = number_width(curwin) + 1;
4751+
sc += numw;
4752+
ec += numw;
4753+
}
47484754
msg_start();
47494755
for (i = 0; i < (long)sc; ++i)
47504756
msg_putchar(' ');

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -738,6 +738,8 @@ static char *(features[]) =
738738

739739
static int included_patches[] =
740740
{ /* Add new patch number below this line */
741+
/**/
742+
49,
741743
/**/
742744
48,
743745
/**/

0 commit comments

Comments
 (0)