Skip to content

Conversation

@stescobedo92
Copy link
Contributor

Split the editor view into multiple panes, allowing users to:

image image image

- Implement synchronization of split layout with the current document state.
- Handle split view requests including split, close pane, and focus navigation.
- Draw editor panes based on split layout, supporting both horizontal and vertical splits.
- Update menubar to include options for managing split views.
Copilot AI review requested due to automatic review settings January 25, 2026 20:54
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces split editor views (horizontal and vertical panes), associated menu entries and shortcuts, and improves how keyboard shortcuts are rendered in the menubar (including platform-specific modifier glyphs).

Changes:

  • Add split-view data structures (SplitDirection, Pane, SplitLayout) and split-related state flags, plus unit tests for SplitLayout.
  • Extend the editor drawing pipeline to manage split panes (syncing layout, handling split/close/focus requests, and rendering horizontal/vertical layouts with pane headers).
  • Update keyboard handling, menubar entries, shortcut rendering (including special keys and backslash), and modifier translations to support the new split-view actions and nicer shortcut labels.

Reviewed changes

Copilot reviewed 3 out of 7 changed files in this pull request and generated no comments.

Show a summary per file
File Description
i18n/edit.toml Adds localized strings for new View menu items related to split views and pane focus/closing.
crates/edit/src/input.rs Introduces vk::BACKSLASH virtual key constant to support Ctrl+\ and related shortcuts.
crates/edit/src/tui.rs Enhances Context::menubar_shortcut to strip modifiers and render readable names for arrows, function keys, paging keys, and backslash; uses configured modifier translations.
crates/edit/src/bin/edit/state.rs Defines SplitDirection, Pane, and SplitLayout, extends State with split-related fields, and adds unit tests covering default layout, pane counts, reset, and focus wrapping.
crates/edit/src/bin/edit/main.rs Configures modifier translations with Mac-style symbols on Apple platforms and wires up global keyboard shortcuts for splitting, closing panes, and moving pane focus.
crates/edit/src/bin/edit/draw_menubar.rs Adds View menu items for horizontal/vertical splits, closing the current pane, and focusing the next pane; ensures buffer borrow is dropped before accessing split_layout.
crates/edit/src/bin/edit/draw_editor.rs Reworks editor drawing to synchronize and manage SplitLayout, process split/close/focus requests, and render single, horizontal, and vertical pane layouts, including pane headers and split-layout resets on document close.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@stescobedo92 stescobedo92 changed the title Feature/606 add support split views Add support split views Jan 25, 2026
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.

1 participant