aboutsummaryrefslogtreecommitdiff
path: root/src/edbox.c
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2026-03-25 17:25:03 -0400
committerB. Watson <urchlay@slackware.uk>2026-03-25 17:25:03 -0400
commit43aa98337bca5c7408417a60787f792d8fe700a0 (patch)
treec25689f9ef6fa455ade3d17872848ccba8016ec7 /src/edbox.c
parent3deb0ff68ac6be482f120539d8b3d1ca65258916 (diff)
downloadfujinet-chat-43aa98337bca5c7408417a60787f792d8fe700a0.tar.gz
Speed up ^U.
Diffstat (limited to 'src/edbox.c')
-rw-r--r--src/edbox.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/edbox.c b/src/edbox.c
index cfaa2d6..dc1a8e2 100644
--- a/src/edbox.c
+++ b/src/edbox.c
@@ -163,7 +163,10 @@ static void forward_word(void) {
}
static void del_to_start(void) {
- while(edbox_pos) backspace();
+ if(!edbox_pos) return;
+ memmove(edit_box, edit_box + edbox_pos, EDBOX_SIZE - edbox_pos - 1);
+ edbox_len -= edbox_pos;
+ edbox_pos = 0;
}
void left(void) {