From bcd6924245c0e73d8be256282656c06aaf91f17c Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Mon, 19 Sep 2022 21:16:12 +0100 Subject: patch 9.0.0507: cmdline cleared when using :redrawstatus in CmdlineChanged Problem: Command line cleared when using :redrawstatus in CmdlineChanged autocommand event. Solution: Postpone the redraw. (closes #11162) --- src/ex_docmd.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/ex_docmd.c') diff --git a/src/ex_docmd.c b/src/ex_docmd.c index 814f1b6f8..3076d5344 100644 --- a/src/ex_docmd.c +++ b/src/ex_docmd.c @@ -8427,12 +8427,15 @@ ex_redrawstatus(exarg_T *eap UNUSED) int r = RedrawingDisabled; int p = p_lz; - RedrawingDisabled = 0; - p_lz = FALSE; if (eap->forceit) status_redraw_all(); else status_redraw_curbuf(); + if (State & MODE_CMDLINE) + return; // redraw later + + RedrawingDisabled = 0; + p_lz = FALSE; update_screen(VIsual_active ? UPD_INVERTED : 0); RedrawingDisabled = r; p_lz = p; -- cgit v1.2.1