aboutsummaryrefslogtreecommitdiffstats
path: root/default-plugins
diff options
context:
space:
mode:
authoruser <user@clank>2026-08-08 21:59:39 +0200
committeruser <user@clank>2026-08-08 21:59:39 +0200
commite8699796afd3c92162d933d45c3181926f28e9ef (patch)
tree2a81afa936429b62b7ae3bcae01ac755602ca627 /default-plugins
parentsl0p: ignore gap/padding when a pane draws no frame (diff)
downloadsl0ppij-e8699796afd3c92162d933d45c3181926f28e9ef.tar.gz
sl0ppij-e8699796afd3c92162d933d45c3181926f28e9ef.tar.xz
sl0ppij-e8699796afd3c92162d933d45c3181926f28e9ef.zip
sl0p: double-click a pane title to rename it
Double-clicking the top edge of a pane's frame focuses that pane and switches the client into RenamePane mode. Everything needed already existed; this is wiring, not new machinery: - grid.rs already tracks repeated clicks (Click, 400ms threshold). It is now pub and reused rather than inventing a second notion of 'double click' that could drift from the one used for text selection. A frame click never reaches the grid, so Tab tracks frame clicks per client separately. - pane.position_is_on_frame() / get_edge_at_position() already give the hit edge, and mouse_handler already computes both. - Screen::change_mode() already calls store_pane_name() when entering RenamePane, so issuing ChangeMode(RenamePane) does the whole setup exactly as the keybind path does. No rename logic is duplicated. Placement in determine_mouse_action matters twice: - AFTER the floating 'start moving' branch, so floating panes keep dragging by their title (that is their move handle). Tiled panes only for now. - BEFORE the resize branch, which would otherwise consume the click as a top-edge resize drag. Only PaneEdge::Top renames; corners stay resize handles. The pane is focused first because RenamePane acts on the ACTIVE pane, so renaming an unfocused pane would otherwise rename the wrong one. Tests cover all three: double-click on Top renames, single click on Top still resizes, and double-click on any other edge or corner does not rename. Baselines held: zellij-server 1424/30 (3 new tests), zellij-utils 435/5.
Diffstat (limited to 'default-plugins')
0 files changed, 0 insertions, 0 deletions