aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-06-16 08:01:43 +0800
committerzeertzjq <zeertzjq@outlook.com>2023-06-16 08:55:03 +0800
commitcba07dad494558a4a06e25a35521041864697be3 (patch)
tree525df0a56c87555865dca3735ac1a3dc879efba6 /src
parentddba917efee26229d77f86d14a9f62dcfdc822b8 (diff)
downloadrneovim-cba07dad494558a4a06e25a35521041864697be3.tar.gz
rneovim-cba07dad494558a4a06e25a35521041864697be3.tar.bz2
rneovim-cba07dad494558a4a06e25a35521041864697be3.zip
vim-patch:9.0.1634: message is cleared when removing mode message
Problem: Message is cleared when removing mode message (Gary Johnson). Solution: Do not clear the command line after displaying a message. https://github.com/vim/vim/commit/800cdbb7caeb5dd4379c6cb071bb12391f20bcf3 Co-authored-by: Bram Moolenaar <Bram@vim.org>
Diffstat (limited to 'src')
-rw-r--r--src/nvim/message.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/nvim/message.c b/src/nvim/message.c
index 1cb4a3cbf4..d0b128c568 100644
--- a/src/nvim/message.c
+++ b/src/nvim/message.c
@@ -1560,6 +1560,13 @@ int msg_outtrans_len_attr(const char *msgstr, int len, int attr)
attr &= ~MSG_HIST;
}
+ // When drawing over the command line no need to clear it later or remove
+ // the mode message.
+ if (msg_row == cmdline_row && msg_col == 0) {
+ clear_cmdline = false;
+ mode_displayed = false;
+ }
+
// If the string starts with a composing character first draw a space on
// which the composing char can be drawn.
if (utf_iscomposing(utf_ptr2char(msgstr))) {