From f70d0c25cfb3f2d515a693c8c6be60d83b95d22c Mon Sep 17 00:00:00 2001 From: Joscha Date: Tue, 2 Aug 2022 23:14:27 +0200 Subject: [PATCH] Clear editor contents with ctrl+l --- src/ui/chat/tree.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/ui/chat/tree.rs b/src/ui/chat/tree.rs index f20771d..843e3f5 100644 --- a/src/ui/chat/tree.rs +++ b/src/ui/chat/tree.rs @@ -122,6 +122,11 @@ impl> InnerTreeViewState { self.correction = Some(Correction::MakeCursorVisible); Reaction::Handled } + KeyCode::Char('l') if event.modifiers == KeyModifiers::CONTROL => { + self.editor.clear(); + self.correction = Some(Correction::MakeCursorVisible); + Reaction::Handled + } _ => Reaction::NotHandled, } }