1
1
mirror of https://github.com/wez/wezterm.git synced 2024-11-10 15:04:32 +03:00
Commit Graph

8 Commits

Author SHA1 Message Date
Wez Furlong
ecd05547d5 Add SplitPane assignment
This, along with the plumbing included here, allows specifying
the destination of the split (now you can specify top/left, whereas
previously it was limited to right/bottom), as well as the size
of the split, and also whether the split targets the node at the
top level of the tab rather than the active pane--that is referred
to as full-width in tmux terminology.

https://github.com/wez/wezterm/issues/578
2022-05-21 21:09:11 -07:00
Wez Furlong
d2d4257f79 Add RotatePanes key assignment 2022-05-21 17:10:04 -07:00
Wez Furlong
a220237b90 bintree: clippy lint 2021-03-26 09:01:54 -07:00
Wez Furlong
c5efd94bb8 wezterm: improve pane resize logic
This uses a similar approach to that used by tmux; when resizing,
a size delta is computed in each axis and that value is distributed
across the splits in that dimension.

For a small resize by 1 cell this tends to bias towards adjusting
the top/left node.

For a large resize (eg: maximizing/restoring) the distribution tends
to share across the splits in that dimension, effectively scaling
them approximately proportionally, more or less preserving the relative
scale of the splits.

refs: https://github.com/wez/wezterm/issues/157#issuecomment-699672914
2020-09-27 16:07:08 -07:00
Wez Furlong
f9c9510691 wezterm: improve split positioning
The math for computing the position for nested splits was a bit off.
2020-09-23 09:19:23 -07:00
Wez Furlong
c2100d96c3 wezterm: Implement basic splits in the UI.
This commit provides the heart of the split functionality.
It adds a couple of key assignments (that are not finalized)
for splitting the active pane horizontally or vertically.

Clicking in a pane will activate it.
Selection is constrained to the active pane.
Resizing a window will grow/shrink the right/bottom side of a split.
The scrollbar applies to the active split.

There's not yet a way to resize a split at all.
There's not yet a key assignment for changing the active split.

The software renderer doesn't know how to render the splits correctly.

refs: https://github.com/wez/wezterm/issues/157
2020-09-22 22:12:11 -07:00
Wez Furlong
ec468acb40 panes: adopt zipper based bintree for managing panes
This simplifies the logic in the tab.rs module
2020-09-20 10:20:40 -07:00
Wez Furlong
c2c788b41d bintree: introduce a binary tree + zipper impl
The intent is for this to help manage panes, but it is reasonably
general purpose so it is broken out separately.
2020-09-20 08:27:44 -07:00