mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-06-04 19:04:53 +00:00
Surface respects cl by using single arrow keys within a single line
This commit is contained in:
@@ -4374,9 +4374,23 @@ fn maybePromptClick(self: *Surface) !bool {
|
||||
} }, .locked);
|
||||
},
|
||||
|
||||
.cl => |cl| {
|
||||
// TODO: Handle these
|
||||
_ = cl;
|
||||
.cl => {
|
||||
const left_arrow = if (t.modes.get(.cursor_keys)) "\x1bOD" else "\x1b[D";
|
||||
const right_arrow = if (t.modes.get(.cursor_keys)) "\x1bOC" else "\x1b[C";
|
||||
|
||||
const move = screen.promptClickMove(click_pin);
|
||||
for (0..move.left) |_| {
|
||||
self.queueIo(
|
||||
.{ .write_stable = left_arrow },
|
||||
.locked,
|
||||
);
|
||||
}
|
||||
for (0..move.right) |_| {
|
||||
self.queueIo(
|
||||
.{ .write_stable = right_arrow },
|
||||
.locked,
|
||||
);
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user