rename action
This commit is contained in:
@@ -166,7 +166,7 @@ previous_tab = "ALT+SHIFT+H"
|
|||||||
next_tab = "ALT+SHIFT+L"
|
next_tab = "ALT+SHIFT+L"
|
||||||
open_font_selector = "ALT+T"
|
open_font_selector = "ALT+T"
|
||||||
open_scrollback = "ALT+S"
|
open_scrollback = "ALT+S"
|
||||||
open_worktree = "ALT+W"
|
create_worktree = "ALT+W"
|
||||||
```
|
```
|
||||||
|
|
||||||
## Defaults
|
## Defaults
|
||||||
|
|||||||
@@ -40,5 +40,5 @@ previous_tab = "ALT+SHIFT+H"
|
|||||||
next_tab = "ALT+SHIFT+L"
|
next_tab = "ALT+SHIFT+L"
|
||||||
open_font_selector = "ALT+T"
|
open_font_selector = "ALT+T"
|
||||||
open_scrollback = "ALT+S"
|
open_scrollback = "ALT+S"
|
||||||
open_worktree = "ALT+W"
|
create_worktree = "ALT+W"
|
||||||
paste = "CTRL+SHIFT+V"
|
paste = "CTRL+SHIFT+V"
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ public record AppConfig(
|
|||||||
"next_tab",
|
"next_tab",
|
||||||
"open_font_selector",
|
"open_font_selector",
|
||||||
"open_scrollback",
|
"open_scrollback",
|
||||||
"open_worktree",
|
"create_worktree",
|
||||||
"paste"
|
"paste"
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -115,7 +115,7 @@ public record AppConfig(
|
|||||||
Map.entry("next_tab", KeyBinding.parse("ALT+SHIFT+L")),
|
Map.entry("next_tab", KeyBinding.parse("ALT+SHIFT+L")),
|
||||||
Map.entry("open_font_selector", KeyBinding.parse("ALT+T")),
|
Map.entry("open_font_selector", KeyBinding.parse("ALT+T")),
|
||||||
Map.entry("open_scrollback", KeyBinding.parse("ALT+S")),
|
Map.entry("open_scrollback", KeyBinding.parse("ALT+S")),
|
||||||
Map.entry("open_worktree", KeyBinding.parse("ALT+W")),
|
Map.entry("create_worktree", KeyBinding.parse("ALT+W")),
|
||||||
Map.entry("paste", KeyBinding.parse("CTRL+SHIFT+V"))
|
Map.entry("paste", KeyBinding.parse("CTRL+SHIFT+V"))
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ final class TerminalWindow {
|
|||||||
keyActions.put("next_tab", compositor::nextTab);
|
keyActions.put("next_tab", compositor::nextTab);
|
||||||
keyActions.put("open_font_selector", this::openFontSelector);
|
keyActions.put("open_font_selector", this::openFontSelector);
|
||||||
keyActions.put("open_scrollback", this::openScrollbackInEditor);
|
keyActions.put("open_scrollback", this::openScrollbackInEditor);
|
||||||
keyActions.put("open_worktree", this::openWorktreeInEditor);
|
keyActions.put("create_worktree", this::createWorktreeInEditor);
|
||||||
keyActions.put("paste", this::pasteFromClipboard);
|
keyActions.put("paste", this::pasteFromClipboard);
|
||||||
|
|
||||||
StackPane root = new StackPane(compositor.canvas(), compositor.imageOverlay());
|
StackPane root = new StackPane(compositor.canvas(), compositor.imageOverlay());
|
||||||
@@ -237,7 +237,7 @@ final class TerminalWindow {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void openWorktreeInEditor() {
|
private void createWorktreeInEditor() {
|
||||||
// The floating pane command inherits the active pane's cwd at creation time, so the git
|
// The floating pane command inherits the active pane's cwd at creation time, so the git
|
||||||
// worktree command runs from the pane that was focused before this shortcut opened.
|
// worktree command runs from the pane that was focused before this shortcut opened.
|
||||||
TerminalPane active = compositor.activePane();
|
TerminalPane active = compositor.activePane();
|
||||||
@@ -250,7 +250,7 @@ final class TerminalWindow {
|
|||||||
|
|
||||||
compositor.openFloatingPane(worktreeEditorCommand(file));
|
compositor.openFloatingPane(worktreeEditorCommand(file));
|
||||||
} catch (IOException ex) {
|
} catch (IOException ex) {
|
||||||
System.err.println("Could not open worktree editor: " + ex.getMessage());
|
System.err.println("Could not create worktree from editor input: " + ex.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user