From 7af49f6cc6397960010757c2cdbfb37be9dca3f6 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Mon, 2 Feb 2026 13:32:53 -0800 Subject: [PATCH] Surface respects `cl` by using single arrow keys within a single line --- src/Surface.zig | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/src/Surface.zig b/src/Surface.zig index f4c63fd81..d06f19eb8 100644 --- a/src/Surface.zig +++ b/src/Surface.zig @@ -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, + ); + } }, }