aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2026-03-21 06:46:52 -0400
committerB. Watson <urchlay@slackware.uk>2026-03-21 06:46:52 -0400
commitf94ca39e2b9b5da0b6ec17e8096f6eeefbcf2cdb (patch)
tree4a5de50112fd9a574df858ba84cccf6ea54537ce
parent0cad011f41fe6cabba1dc6f6186c08556db247d4 (diff)
downloadfujinet-chat-f94ca39e2b9b5da0b6ec17e8096f6eeefbcf2cdb.tar.gz
Pressing backspace in an empty edit box hides the edit box.
-rw-r--r--src/edbox.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/edbox.c b/src/edbox.c
index beb25be..049771d 100644
--- a/src/edbox.c
+++ b/src/edbox.c
@@ -197,7 +197,10 @@ static void normal_keystroke(void) {
del_to_end();
break;
case CH_DEL:
- backspace();
+ if(!edbox_len)
+ edbox_hide();
+ else
+ backspace();
break;
case 0x02: /* ^B */
back_word();