panesync toggle <- panesync commit
This commit is contained in:
@@ -172,7 +172,6 @@ open_scrollback = "ALT+S"
|
||||
create_worktree = "ALT+W"
|
||||
pane_sync_toggle = "ALT+Y"
|
||||
pane_sync_select = "SPACE"
|
||||
pane_sync_commit = "ALT+SHIFT+Y"
|
||||
paste = "CTRL+SHIFT+V"
|
||||
```
|
||||
|
||||
@@ -191,10 +190,9 @@ paste = "CTRL+SHIFT+V"
|
||||
- `Alt+s`: open the active pane scrollback in `$EDITOR`
|
||||
- `Alt+w`: edit a worktree name, then run `git worktree add <relative_worktree_path>/<name>`
|
||||
from the previously focused pane's working directory
|
||||
- `Alt+y`: enter pane-sync selection mode, cancel selection mode, or stop an active pane sync
|
||||
- `Alt+y`: enter pane-sync selection mode, commit the selection, or stop an active pane sync
|
||||
- `Space`: toggle the focused pane in the sync set while pane-sync selection mode is active
|
||||
- `Alt+Shift+y`: commit the current pane-sync selection; input typed or pasted into any synced
|
||||
pane is mirrored to the other synced panes
|
||||
- Once committed, input typed or pasted into any synced pane is mirrored to the other synced panes
|
||||
- `Ctrl+Shift+v`: paste
|
||||
- Font default: `JetBrainsMono Nerd Font`
|
||||
- Kitty graphics protocol parsing is enabled by default
|
||||
|
||||
@@ -43,5 +43,4 @@ open_scrollback = "ALT+S"
|
||||
create_worktree = "ALT+W"
|
||||
pane_sync_toggle = "ALT+Y"
|
||||
pane_sync_select = "SPACE"
|
||||
pane_sync_commit = "ALT+SHIFT+Y"
|
||||
paste = "CTRL+SHIFT+V"
|
||||
|
||||
@@ -52,7 +52,6 @@ public record AppConfig(
|
||||
"create_worktree",
|
||||
"pane_sync_toggle",
|
||||
"pane_sync_select",
|
||||
"pane_sync_commit",
|
||||
"paste"
|
||||
);
|
||||
|
||||
@@ -121,7 +120,6 @@ public record AppConfig(
|
||||
Map.entry("create_worktree", KeyBinding.parse("ALT+W")),
|
||||
Map.entry("pane_sync_toggle", KeyBinding.parse("ALT+Y")),
|
||||
Map.entry("pane_sync_select", KeyBinding.parse("SPACE")),
|
||||
Map.entry("pane_sync_commit", KeyBinding.parse("ALT+SHIFT+Y")),
|
||||
Map.entry("paste", KeyBinding.parse("CTRL+SHIFT+V"))
|
||||
)
|
||||
);
|
||||
|
||||
@@ -145,9 +145,16 @@ public final class Compositor {
|
||||
}
|
||||
|
||||
public void togglePaneSync() {
|
||||
if (paneSyncSelectMode || !paneSyncPanes.isEmpty()) {
|
||||
if (paneSyncSelectMode) {
|
||||
paneSyncPanes.clear();
|
||||
paneSyncPanes.addAll(paneSyncSelection);
|
||||
paneSyncSelectMode = false;
|
||||
paneSyncSelection.clear();
|
||||
prunePaneSyncState();
|
||||
layoutVersion++;
|
||||
return;
|
||||
}
|
||||
if (!paneSyncPanes.isEmpty()) {
|
||||
paneSyncPanes.clear();
|
||||
layoutVersion++;
|
||||
return;
|
||||
@@ -171,18 +178,6 @@ public final class Compositor {
|
||||
layoutVersion++;
|
||||
}
|
||||
|
||||
public void commitPaneSyncSelection() {
|
||||
if (!paneSyncSelectMode) {
|
||||
return;
|
||||
}
|
||||
paneSyncPanes.clear();
|
||||
paneSyncPanes.addAll(paneSyncSelection);
|
||||
paneSyncSelection.clear();
|
||||
paneSyncSelectMode = false;
|
||||
prunePaneSyncState();
|
||||
layoutVersion++;
|
||||
}
|
||||
|
||||
public List<TerminalPane> paneSyncPeers(TerminalPane source) {
|
||||
prunePaneSyncState();
|
||||
if (source == null || !paneSyncPanes.contains(source)) {
|
||||
|
||||
@@ -74,7 +74,6 @@ final class TerminalWindow {
|
||||
keyActions.put("create_worktree", this::createWorktreeInEditor);
|
||||
keyActions.put("pane_sync_toggle", compositor::togglePaneSync);
|
||||
keyActions.put("pane_sync_select", compositor::togglePaneSyncSelection);
|
||||
keyActions.put("pane_sync_commit", compositor::commitPaneSyncSelection);
|
||||
keyActions.put("paste", this::pasteFromClipboard);
|
||||
|
||||
StackPane root = new StackPane(compositor.canvas(), compositor.imageOverlay());
|
||||
@@ -169,8 +168,7 @@ final class TerminalWindow {
|
||||
"previous_tab",
|
||||
"next_tab",
|
||||
"pane_sync_toggle",
|
||||
"pane_sync_select",
|
||||
"pane_sync_commit" -> true;
|
||||
"pane_sync_select" -> true;
|
||||
default -> false;
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user