aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ex_cmds2.c
diff options
context:
space:
mode:
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;