summaryrefslogtreecommitdiff
path: root/internal
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-02-10 09:17:40 +0200
committerPaul Buetow <paul@buetow.org>2026-02-10 09:17:40 +0200
commit17220d71f2af54f875ba1a86f489e5af6d7ad189 (patch)
tree64586d4415dab2a267d6c0667e2283a07665b79f /internal
parent19247ef407fb46daf7a1521c3bfa177707c2acf4 (diff)
Fix hexai-tmux-edit to open in current working directoryv0.18.3
hexai-tmux-edit was opening in the wrong directory because the tmux popup wasn't being told which directory to use. This fix: - Updates bind-key example to cd into pane's current path - Passes working directory to popup via -d flag using os.Getwd() - Updates all documentation with corrected bind-key examples Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Diffstat (limited to 'internal')
-rw-r--r--internal/tmuxedit/run.go11
-rw-r--r--internal/version.go2
2 files changed, 10 insertions, 3 deletions
diff --git a/internal/tmuxedit/run.go b/internal/tmuxedit/run.go
index f81eb64..8c98ded 100644
--- a/internal/tmuxedit/run.go
+++ b/internal/tmuxedit/run.go
@@ -58,10 +58,17 @@ var openEditorPopup = func(initial, popupW, popupH string) (string, error) {
}
// launchPopup is the seam for running `tmux display-popup` with the editor.
-// The -E flag makes the popup close when the editor exits. Uses .Run()
-// (not .Output()) so the popup blocks until the user closes the editor.
+// The -E flag makes the popup close when the editor exits. The -d flag sets
+// the working directory for the popup. Uses .Run() (not .Output()) so the
+// popup blocks until the user closes the editor.
var launchPopup = func(ed, path, width, height string) error {
args := []string{"display-popup", "-E"}
+
+ // Get current working directory to pass to the popup
+ if cwd, err := os.Getwd(); err == nil && cwd != "" {
+ args = append(args, "-d", cwd)
+ }
+
if width != "" {
args = append(args, "-w", width)
}
diff --git a/internal/version.go b/internal/version.go
index 50b476f..027fd1f 100644
--- a/internal/version.go
+++ b/internal/version.go
@@ -1,4 +1,4 @@
// Summary: Hexai semantic version identifier used by CLI and LSP binaries.
package internal
-const Version = "0.18.2"
+const Version = "0.18.3"