diff src/message.c @ 18293:1c5974759bcd v8.1.2141

patch 8.1.2141: :tselect has an extra hit-enter prompt Commit: https://github.com/vim/vim/commit/e8070987c6ca9b1e14c5305707c6d29c8e58e7c4 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Oct 12 17:07:06 2019 +0200 patch 8.1.2141: :tselect has an extra hit-enter prompt Problem: :tselect has an extra hit-enter prompt. Solution: Do not set need_wait_return when only moving the cursor. (closes #5040)
author Bram Moolenaar <Bram@vim.org>
date Sat, 12 Oct 2019 17:15:04 +0200
parents dfe9db84e326
children 2047cb93eb0c
line wrap: on
line diff
--- a/src/message.c
+++ b/src/message.c
@@ -1980,15 +1980,14 @@ msg_puts_attr_len(char *str, int maxlen,
 	attr &= ~MSG_HIST;
     }
 
-    /*
-     * When writing something to the screen after it has scrolled, requires a
-     * wait-return prompt later.  Needed when scrolling, resetting
-     * need_wait_return after some prompt, and then outputting something
-     * without scrolling
-     */
-    if (msg_scrolled != 0 && !msg_scrolled_ign)
+    // When writing something to the screen after it has scrolled, requires a
+    // wait-return prompt later.  Needed when scrolling, resetting
+    // need_wait_return after some prompt, and then outputting something
+    // without scrolling
+    // Not needed when only using CR to move the cursor.
+    if (msg_scrolled != 0 && !msg_scrolled_ign && STRCMP(str, "\r") != 0)
 	need_wait_return = TRUE;
-    msg_didany = TRUE;		/* remember that something was outputted */
+    msg_didany = TRUE;		// remember that something was outputted
 
     /*
      * If there is no valid screen, use fprintf so we can see error messages.