diff options
| author | user <user@clank> | 2026-08-08 21:59:39 +0200 |
|---|---|---|
| committer | user <user@clank> | 2026-08-08 21:59:39 +0200 |
| commit | e8699796afd3c92162d933d45c3181926f28e9ef (patch) | |
| tree | 2a81afa936429b62b7ae3bcae01ac755602ca627 /default-plugins/plugin-manager | |
| parent | sl0p: ignore gap/padding when a pane draws no frame (diff) | |
| download | sl0ppij-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/plugin-manager')
0 files changed, 0 insertions, 0 deletions
