Skip to content

Commit 5ee8377

Browse files
committed
Add back in ctrl-k/ctrl-j bindings
1 parent 67b7642 commit 5ee8377

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

src/ui.zig

+2-9
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,6 @@ const Action = union(enum) {
287287
delete,
288288
delete_word,
289289
delete_line,
290-
delete_rightmost,
291290
select,
292291
close,
293292
pass,
@@ -310,9 +309,8 @@ fn ctrlToAction(key: u8) Action {
310309
ctrl('d') => .delete,
311310
ctrl('f') => .cursor_right,
312311
ctrl('b') => .cursor_left,
313-
ctrl('k') => .delete_rightmost,
314-
ctrl('p') => .line_up,
315-
ctrl('n') => .line_down,
312+
ctrl('p'), ctrl('k') => .line_up,
313+
ctrl('n'), ctrl('j') => .line_down,
316314
else => .pass,
317315
};
318316
}
@@ -416,11 +414,6 @@ pub fn run(
416414
state.cursor += 1;
417415
},
418416
.delete_word => actionDeleteWord(&query, &state.cursor),
419-
.delete_rightmost => {
420-
while (state.cursor != query.items.len) {
421-
_ = query.orderedRemove(state.cursor);
422-
}
423-
},
424417
.delete_line => {
425418
while (state.cursor > 0) {
426419
_ = query.orderedRemove(state.cursor - 1);

0 commit comments

Comments
 (0)