summaryrefslogtreecommitdiff
path: root/jet.c
diff options
context:
space:
mode:
Diffstat (limited to 'jet.c')
-rw-r--r--jet.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/jet.c b/jet.c
index 200b93d..131802c 100644
--- a/jet.c
+++ b/jet.c
@@ -74,9 +74,15 @@ int main(int argc, char *argv[]) {
move_point_forward(&cursor);
break;
case KEY_BACKSPACE:
+ if (same_point(&cursor, &window_start)) {
+ prev_line(&window_start, window_width);
+ }
delete_at_point(&cursor);
break;
default:
+ if (same_point(&cursor, &window_end)) {
+ next_line(&window_start, window_width);
+ }
insert_at_point(&cursor, input);
}
}