The print_line function in src/ex_cmds.c (which is used by :print,
:list, :number, :z, :s with the 'p' flag) sets the info_message variable
to TRUE and only sets it back to FALSE if save_silent is set.  This then
causes msg_puts_attr_len (via wait_return) to call msg_puts_printf
instead of msg_puts_display -- displaying the "Press ENTER or type
command to continue" inline with the output of the shell instead of in
Vim.

An easy example to reproduce from Vim's top-level source directory:

  vim -u NONE -N Makefile
  :number
  :!ls
  :!ls

Notice that after the first ":!ls", the "Press ENTER" message isn't
displayed.  In the output of the second ":!ls", you see the first "Press
ENTER" message and the ls output is skewed to the right.

-- 
James
GPG Key: 1024D/61326D40 2003-09-02 James Vega <[email protected]>
diff --git a/src/ex_cmds.c b/src/ex_cmds.c
index cfda903..b0b66e3 100644
--- a/src/ex_cmds.c
+++ b/src/ex_cmds.c
@@ -2411,13 +2411,13 @@ print_line(lnum, use_number, list)
     silent_mode = FALSE;
     info_message = TRUE;	/* use mch_msg(), not mch_errmsg() */
     print_line_no_prefix(lnum, use_number, list);
+    info_message = FALSE;
     if (save_silent)
     {
 	msg_putchar('\n');
 	cursor_on();		/* msg_start() switches it off */
 	out_flush();
 	silent_mode = save_silent;
-	info_message = FALSE;
     }
 }
 

Attachment: signature.asc
Description: Digital signature

Raspunde prin e-mail lui