From 5752e5c94f27eced137f4ca061c68715d8b7131a Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Wed, 4 Nov 2026 10:56:51 -0300 Subject: mouse: a click on a tag, a pane's, a column's or the workspace's, puts its cursor there in normal mode, where it was insert mode (the user's): a letter is a command, `i` types where it was clicked, Enter or Tab runs the word under it; the guide, the cheatsheet and the changelog say so; the tests that clicked a tag and typed now type `i` (or `a` after a sweep) first, and an Esc that left insert mode goes; snap: nine scripts likewise, layout-close's golden now the Del its chord was meant to run (the click had typed ` dk` into the tag); a behavioural test, checked to fail with insert mode back Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge --- test/mode.zig | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'test/mode.zig') diff --git a/test/mode.zig b/test/mode.zig index f49c434c..40a23fc4 100644 --- a/test/mode.zig +++ b/test/mode.zig @@ -36,12 +36,11 @@ test "Mode cycles terminal modes and keeps legacy toggle and custom tags" { try std.testing.expect(std.mem.indexOf(u8, try pardes.tagline.tagText(p, p.scratch.allocator(), pane), " Mode") != null); try mode(p, 0, .normal); try mode(p, 0, .insert); - // A clicked tag is typed into; its execute key is a normal-mode key, as - // a body's is, and the body keeps its own mode meanwhile. + // A clicked tag is in normal mode, where its execute key is, as a + // body's is, and the body keeps its own mode meanwhile. try clickModeTag(p); - try std.testing.expectEqual(panes.Text.Mode.insert, pane.tag.mode); + try std.testing.expectEqual(panes.Text.Mode.normal, pane.tag.mode); try std.testing.expectEqual(panes.Text.Mode.insert, pane.body.mode); - p.update(.{ .key = .{ .cp = pardes.Key.escape } }); p.update(.{ .key = .{ .cp = pardes.Key.tab } }); try std.testing.expectEqual(panes.Text.Mode.tty, pane.body.mode); try std.testing.expect(pane.focus == .body); -- cgit v1.3