From 9d98bc5158c279669e4c48d9a082901afb3b5cf7 Mon Sep 17 00:00:00 2001 From: ridiculousfish Date: Sun, 23 Aug 2020 15:11:42 -0700 Subject: [PATCH] Ensure we repaint right before execution If the user enters a command and hits return, we need to repaint so as to clear the autosuggestion and apply any coalesced characters. --- src/reader.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/reader.cpp b/src/reader.cpp index 5709fb137..d7fb4012e 100644 --- a/src/reader.cpp +++ b/src/reader.cpp @@ -3674,6 +3674,10 @@ maybe_t reader_data_t::readline(int nchars_or_0) { } } + // Redraw the command line. This is what ensures the autosuggestion is hidden, etc. after the + // user presses enter. + if (this->is_repaint_needed()) this->layout_and_repaint(L"prepare to execute"); + // Emit a newline so that the output is on the line after the command. // But do not emit a newline if the cursor has wrapped onto a new line all its own - see #6826. if (!screen.cursor_is_wrapped_to_own_line()) {