summaryrefslogtreecommitdiff
path: root/internal
diff options
context:
space:
mode:
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"