Mercurial > vim
changeset 5396:15c1b8a20da6 v7.4.049
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)
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Wed, 02 Oct 2013 18:43:06 +0200 |
parents | c05dfcf3da83 |
children | 20068068e3f9 |
files | src/ex_cmds.c src/version.c |
diffstat | 2 files changed, 9 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ex_cmds.c +++ b/src/ex_cmds.c @@ -4740,11 +4740,17 @@ do_sub(eap) char_u *resp; 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); curwin->w_cursor.col = regmatch.endpos[0].col - 1; 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(); for (i = 0; i < (long)sc; ++i) msg_putchar(' ');