aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/fileio.c
diff options
context:
space:
mode:
authorbfredl <bjorn.linse@gmail.com>2023-09-25 12:26:01 +0200
committerbfredl <bjorn.linse@gmail.com>2023-09-25 14:54:20 +0200
commit68d425ac92599089047d98f1c533981ea917fed1 (patch)
tree784aa8d4a6b4436fcd7af8004d619f4702c27bac /src/nvim/fileio.c
parentccd1a84a9655279230be15630d4e5978c806c4e1 (diff)
downloadrneovim-68d425ac92599089047d98f1c533981ea917fed1.tar.gz
rneovim-68d425ac92599089047d98f1c533981ea917fed1.tar.bz2
rneovim-68d425ac92599089047d98f1c533981ea917fed1.zip
refactor: remove 'shortmess' save/restore panic for ex commands
This was only used to avoid the effect of SHM_OVERALL. This can easily be handled in isolation, instead of clearing out all of 'shortmess' which has unwanted side effects and mystifies what really is going on.
Diffstat (limited to 'src/nvim/fileio.c')
-rw-r--r--src/nvim/fileio.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/fileio.c b/src/nvim/fileio.c
index 5d7ddb657a..011c5439ea 100644
--- a/src/nvim/fileio.c
+++ b/src/nvim/fileio.c
@@ -105,7 +105,7 @@ void filemess(buf_T *buf, char *name, char *s, int attr)
// For further ones overwrite the previous one, reset msg_scroll before
// calling filemess().
msg_scroll_save = msg_scroll;
- if (shortmess(SHM_OVERALL) && !exiting && p_verbose == 0) {
+ if (shortmess(SHM_OVERALL) && !msg_listdo_overwrite && !exiting && p_verbose == 0) {
msg_scroll = false;
}
if (!msg_scroll) { // wait a bit when overwriting an error msg
@@ -316,7 +316,7 @@ int readfile(char *fname, char *sfname, linenr_T from, linenr_T lines_to_skip,
}
}
- if ((shortmess(SHM_OVER) || curbuf->b_help) && p_verbose == 0) {
+ if (((shortmess(SHM_OVER) && !msg_listdo_overwrite) || curbuf->b_help) && p_verbose == 0) {
msg_scroll = false; // overwrite previous file message
} else {
msg_scroll = true; // don't overwrite previous file message