aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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) {