Skip to content

feat(editor): wrap directional window navigation - #324

Merged
fcoury merged 1 commit into
mainfrom
fcoury/window-navigation-wrap
Aug 23, 2026
Merged

fcoury merged 1 commit into
mainfrom
fcoury/window-navigation-wrap

Conversation

@fcoury-oai

Copy link
Copy Markdown
Collaborator

Directional Ctrl-W h/j/k/l navigation currently stops at editor edges, which forces users to reverse direction or switch to linear window cycling.

This makes directional navigation wrap across the opposite editor edge by default. Wrapped targets are selected by edge position and orthogonal alignment so nested and asymmetric layouts remain predictable. Existing docked-panel targets retain priority, and users can restore edge-stop behavior with wrap_window_navigation = false.

How to Test

  1. Open both vertical and horizontal editor splits.
  2. From the right or bottom edge, press Ctrl-W l or Ctrl-W j; focus should wrap to the aligned pane on the left or top edge. Repeat with Ctrl-W h and Ctrl-W k from the opposite edges.
  3. Add a docked panel on the requested edge; the panel should receive focus before editor-window wraparound.
  4. Set wrap_window_navigation = false and retry each edge; focus should stay put and the existing no window ... message should appear.

Automated coverage:

  • cargo test wrap_window_navigation
  • cargo test --lib wrapped_navigation
  • cargo test --test editing directional_window
  • cargo test --test editing window_chords
  • cargo clippy --all-targets --all-features -- -D warnings

@fcoury
fcoury merged commit cc7ff18 into main Aug 23, 2026
11 checks passed
@fcoury
fcoury deleted the fcoury/window-navigation-wrap branch August 23, 2026 03:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants