vim-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 vim/vim#5040)
e8070987c6
This commit is contained in:
Jan Edmund Lazo 2020-10-02 00:42:14 -04:00
parent 0af18a6a43
commit c4cbf16c91
No known key found for this signature in database
GPG Key ID: 64915E6E9F735B15

View File

@ -1886,6 +1886,7 @@ void msg_puts_attr_len(const char *const str, const ptrdiff_t len, int attr)
// 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.
bool overflow = false;
if (ui_has(kUIMessages)) {
int count = msg_ext_visible + (msg_ext_overwrite ? 0 : 1);
@ -1897,7 +1898,7 @@ void msg_puts_attr_len(const char *const str, const ptrdiff_t len, int attr)
overflow = msg_scrolled != 0;
}
if (overflow && !msg_scrolled_ign) {
if (overflow && !msg_scrolled_ign && strcmp(str, "\r") != 0) {
need_wait_return = true;
}
msg_didany = true; // remember that something was outputted