From 33d92d2a1f9fc8648756a94badab16de7cd8d374 Mon Sep 17 00:00:00 2001 From: Johannes Altmanninger Date: Sun, 12 Jan 2025 07:13:43 +0100 Subject: [PATCH] ctrl-u to suppress autosuggestion ctrl-w and {ctrl,alt}-backspace do the same. --- src/reader.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/reader.rs b/src/reader.rs index 89b5b4eeb..00dbf1abb 100644 --- a/src/reader.rs +++ b/src/reader.rs @@ -2746,6 +2746,9 @@ fn handle_readline_command(&mut self, c: ReadlineCmd) { } assert!(end >= begin); let len = std::cmp::max(end - begin, 1); + if elt == EditableLineTag::Commandline { + self.suppress_autosuggestion = true; + } self.data.kill( elt, end - len..end,