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

updated for version 7.3.185

Problem:    ":windo g/pattern/q" closes windows and reports "N more lines".
            (Tim Chase)
Solution:   Remember what buffer ":global" started in. (Jean-Rene David)
This commit is contained in:
Bram Moolenaar
2011-05-10 16:00:47 +02:00
parent 18e0bfb07c
commit bb99322ef9
2 changed files with 9 additions and 4 deletions

View File

@@ -5366,6 +5366,7 @@ global_exe(cmd)
char_u *cmd; char_u *cmd;
{ {
linenr_T old_lcount; /* b_ml.ml_line_count before the command */ linenr_T old_lcount; /* b_ml.ml_line_count before the command */
buf_T *old_buf = curbuf; /* remember what buffer we started in */
linenr_T lnum; /* line number according to old situation */ linenr_T lnum; /* line number according to old situation */
/* /*
@@ -5410,8 +5411,10 @@ global_exe(cmd)
msg_didout = FALSE; msg_didout = FALSE;
/* If substitutes done, report number of substitutes, otherwise report /* If substitutes done, report number of substitutes, otherwise report
* number of extra or deleted lines. */ * number of extra or deleted lines.
if (!do_sub_msg(FALSE)) * Don't report extra or deleted lines in the edge case where the buffer
* we are in after execution is different from the buffer we started in. */
if (!do_sub_msg(FALSE) && curbuf == old_buf)
msgmore(curbuf->b_ml.ml_line_count - old_lcount); msgmore(curbuf->b_ml.ml_line_count - old_lcount);
} }

View File

@@ -714,6 +714,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 */
/**/
185,
/**/ /**/
184, 184,
/**/ /**/