From f2004695545bb6a98fc1f957db79e78a441cd095 Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Fri, 2 Dec 2022 20:48:27 +0100 Subject: edit: simplify expression --- src/edit.rs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/edit.rs b/src/edit.rs index 19bb486..f21cf73 100644 --- a/src/edit.rs +++ b/src/edit.rs @@ -145,12 +145,8 @@ slint::slint! { input (k) => { t.text = Aux.handle-command-buffer (k, t.text, cursor); - if (t.text == "") { - /* User backspaced her way to the left. */ - return true; - } - - return false; + /* Buffer is empty if the user backspaced her way to the left. */ + return t.text == ""; } t := Text { -- cgit v1.2.3