From 8c4c9d050d3c410c5e7d07180daad36ddb623708 Mon Sep 17 00:00:00 2001 From: ridiculousfish Date: Wed, 29 Apr 2020 13:38:15 -0700 Subject: [PATCH] Clear cancellation signals after handling a readline command If a readline command is bound to a key sequence which also sends a signal, then fish will set the cancel flag in addition to handling the command. But this cancel flag is then persistent. Ensure it gets cleared after each command. Fixes #6937 --- src/reader.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/reader.cpp b/src/reader.cpp index b54af88c4..cf083273f 100644 --- a/src/reader.cpp +++ b/src/reader.cpp @@ -3552,6 +3552,10 @@ maybe_t reader_data_t::readline(int nchars_or_0) { history_search.reset(); } + // Readline commands may be bound to \cc which also sets the cancel flag. + // See #6937. + parser().clear_cancel(); + rls.last_cmd = readline_cmd; } else { // Ordinary char.