aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/message.c
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-09-20 21:58:39 +0800
committerGitHub <noreply@github.com>2022-09-20 21:58:39 +0800
commitcfdc93e8ac3e6c1577f1582c4b9546c118aa7987 (patch)
tree146f7c40c982431dd790164bbbc7793893ae9b27 /src/nvim/message.c
parent86c5d761c4752c44acb0eb4ce7e7b41be3408969 (diff)
downloadrneovim-cfdc93e8ac3e6c1577f1582c4b9546c118aa7987.tar.gz
rneovim-cfdc93e8ac3e6c1577f1582c4b9546c118aa7987.tar.bz2
rneovim-cfdc93e8ac3e6c1577f1582c4b9546c118aa7987.zip
vim-patch:9.0.0511: unnecessary scrolling for message of only one line (#20261)
Problem: Unnecessary scrolling for message of only one line. Solution: Only set msg_scroll when needed. (closes vim/vim#11178) https://github.com/vim/vim/commit/bdedd2bcce3a59028c7504a397ff77d901b1b12a
Diffstat (limited to 'src/nvim/message.c')
-rw-r--r--src/nvim/message.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/message.c b/src/nvim/message.c
index d613c95925..da9539e0d1 100644
--- a/src/nvim/message.c
+++ b/src/nvim/message.c
@@ -596,10 +596,10 @@ void msg_source(int attr)
}
recursive = true;
- msg_scroll = true; // this will take more than one line
no_wait_return++;
char *p = get_emsg_source();
if (p != NULL) {
+ msg_scroll = true; // this will take more than one line
msg_attr(p, attr);
xfree(p);
}
@@ -739,7 +739,7 @@ static bool emsg_multiline(const char *s, bool multiline)
}
// Display name and line number for the source of the error.
- // Sets "msg_scroll".
+ msg_scroll = true;
msg_source(attr);
// Display the error message itself.