diff options
author | Philipp Gesang <phg@phi-gamma.net> | 2022-12-02 20:48:27 +0100 |
---|---|---|
committer | Philipp Gesang <phg@phi-gamma.net> | 2022-12-02 20:48:27 +0100 |
commit | f2004695545bb6a98fc1f957db79e78a441cd095 (patch) | |
tree | 5492f547c6d59f92c2dfede480f3fcb7bfa72de5 | |
parent | ddeb59a89092b0bd7e7b77e3c71dc9bace1e23e5 (diff) | |
download | vtcol-f2004695545bb6a98fc1f957db79e78a441cd095.tar.gz |
edit: simplify expression
-rw-r--r-- | src/edit.rs | 8 |
1 files changed, 2 insertions, 6 deletions
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 { |