aboutsummaryrefslogtreecommitdiffstats
path: root/default-plugins/plugin-manager/src
diff options
context:
space:
mode:
authoruser <user@clank>2026-08-08 22:04:17 +0200
committeruser <user@clank>2026-08-08 22:04:17 +0200
commiteb3ac443bacf7770f9aea412979f141ce2168661 (patch)
tree1da980979f719375d8b16b461a03a8fe07567a32 /default-plugins/plugin-manager/src
parentsl0p: double-click a pane title to rename it (diff)
downloadsl0ppij-eb3ac443bacf7770f9aea412979f141ce2168661.tar.gz
sl0ppij-eb3ac443bacf7770f9aea412979f141ce2168661.tar.xz
sl0ppij-eb3ac443bacf7770f9aea412979f141ce2168661.zip
sl0p: fix double-click-to-rename, which never fired
Two independent bugs, either of which alone made the feature dead code. 1. WRONG EDGE. The check was `details.edge == Some(PaneEdge::Top)`, but get_edge_at_position() quadrant-splits a pane and only ever returns the four CORNER variants - PaneEdge::Top exists in the enum and is never produced. A title-row click reports as TopLeft/TopRight, so the condition was never true. Replaced with Pane::position_is_on_title_row(), which tests the geometry directly the same way position_is_on_frame() does for the top border. 2. RESET ON RELEASE. Click recording reset the tracker on any event that was not a frame press - which includes the RELEASE between the two clicks of a double-click. The sequence is press/release/press, so the count went 1 -> reset -> 1 and never reached 2. The tests passed anyway because they hand-built a MouseEventContext with edge: Some(PaneEdge::Top) and called the decision function directly. They asserted my assumption rather than the behaviour, and exercised neither the edge lookup nor the click sequence. Click recording is now a small pure helper (record_frame_click) covered by tests that replay real event sequences: press/release/press is a double-click, motion in between does not break it, a press off the frame does break it, and two clicks at different positions are not a double-click. The decision tests now use the corner edge value that is actually produced. Baselines held: zellij-server 1428/30 (7 new tests).
Diffstat (limited to 'default-plugins/plugin-manager/src')
0 files changed, 0 insertions, 0 deletions