summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPhilipp Gesang <phg@phi-gamma.net>2022-12-02 20:48:27 +0100
committerPhilipp Gesang <phg@phi-gamma.net>2022-12-02 20:48:27 +0100
commitf2004695545bb6a98fc1f957db79e78a441cd095 (patch)
tree5492f547c6d59f92c2dfede480f3fcb7bfa72de5 /src
parentddeb59a89092b0bd7e7b77e3c71dc9bace1e23e5 (diff)
downloadvtcol-f2004695545bb6a98fc1f957db79e78a441cd095.tar.gz
edit: simplify expression
Diffstat (limited to 'src')
-rw-r--r--src/edit.rs8
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 {