aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ex_cmds2.c
diff options
context:
space:
mode:
authorbfredl <bjorn.linse@gmail.com>2023-09-25 18:16:25 +0200
committerGitHub <noreply@github.com>2023-09-25 18:16:25 +0200
commited8b7aae8525625c17b72c3fac187c5aee8a2c5c (patch)
treedec625958a7192641d9b3f710ccd79204267fa3f /src/nvim/ex_cmds2.c
parentef77180908a0cc5e3ea68993f37ad99b3a5e7946 (diff)
parent68d425ac92599089047d98f1c533981ea917fed1 (diff)
downloadrneovim-ed8b7aae8525625c17b72c3fac187c5aee8a2c5c.tar.gz
rneovim-ed8b7aae8525625c17b72c3fac187c5aee8a2c5c.tar.bz2
rneovim-ed8b7aae8525625c17b72c3fac187c5aee8a2c5c.zip
Merge pull request #25359 from bfredl/longmess
refactor: remove 'shortmess' save/restore panic for ex commands
Diffstat (limited to 'src/nvim/ex_cmds2.c')
-rw-r--r--src/nvim/ex_cmds2.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/src/nvim/ex_cmds2.c b/src/nvim/ex_cmds2.c
index b37076c62e..86934a645a 100644
--- a/src/nvim/ex_cmds2.c
+++ b/src/nvim/ex_cmds2.c
@@ -455,6 +455,10 @@ void ex_listdo(exarg_T *eap)
tabpage_T *tp;
char *save_ei = NULL;
+ // Temporarily override SHM_OVER and SHM_OVERALL to avoid that file
+ // message overwrites output from the command.
+ msg_listdo_overwrite++;
+
if (eap->cmdidx != CMD_windo && eap->cmdidx != CMD_tabdo) {
// Don't do syntax HL autocommands. Skipping the syntax file is a
// great speed improvement.
@@ -518,9 +522,7 @@ void ex_listdo(exarg_T *eap)
if (qf_size == 0 || (size_t)eap->line1 > qf_size) {
buf = NULL;
} else {
- save_clear_shm_value();
ex_cc(eap);
- restore_shm_value();
buf = curbuf;
i = (int)eap->line1 - 1;
@@ -547,9 +549,7 @@ void ex_listdo(exarg_T *eap)
if (curwin->w_arg_idx != i || !editing_arg_idx(curwin)) {
// Clear 'shm' to avoid that the file message overwrites
// any output from the command.
- save_clear_shm_value();
do_argfile(eap, i);
- restore_shm_value();
}
if (curwin->w_arg_idx != i) {
break;
@@ -612,11 +612,8 @@ void ex_listdo(exarg_T *eap)
break;
}
- // Go to the next buffer. Clear 'shm' to avoid that the file
- // message overwrites any output from the command.
- save_clear_shm_value();
+ // Go to the next buffer.
goto_buffer(eap, DOBUF_FIRST, FORWARD, next_fnum);
- restore_shm_value();
// If autocommands took us elsewhere, quit here.
if (curbuf->b_fnum != next_fnum) {
@@ -633,11 +630,7 @@ void ex_listdo(exarg_T *eap)
size_t qf_idx = qf_get_cur_idx(eap);
- // Clear 'shm' to avoid that the file message overwrites
- // any output from the command.
- save_clear_shm_value();
ex_cnext(eap);
- restore_shm_value();
// If jumping to the next quickfix entry fails, quit here.
if (qf_get_cur_idx(eap) == qf_idx) {
@@ -664,6 +657,7 @@ void ex_listdo(exarg_T *eap)
listcmd_busy = false;
}
+ msg_listdo_overwrite--;
if (save_ei != NULL) {
buf_T *bnext;
aco_save_T aco;