diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2023-08-09 20:59:46 +1000 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2023-08-09 21:00:27 +1000 |
commit | 9e7018db8a63c4ddbd073e0967151eb05a75c84b (patch) | |
tree | 61a8e7cf9390717318915a6f67670d8abb90eecc /pkg/commands | |
parent | cdea5b4873d92e14eea2302f6823e23efaf678f6 (diff) |
Honour editInTerminal value when opening a worktree folder
There was no good reason not to do this in the first place.
Diffstat (limited to 'pkg/commands')
-rw-r--r-- | pkg/commands/git_commands/file.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/pkg/commands/git_commands/file.go b/pkg/commands/git_commands/file.go index 7efdb567a..9fd5e8929 100644 --- a/pkg/commands/git_commands/file.go +++ b/pkg/commands/git_commands/file.go @@ -131,15 +131,15 @@ func (self *FileCommands) GetEditAtLineAndWaitCmdStr(filename string, lineNumber return cmdStr } -func (self *FileCommands) GetOpenDirInEditorCmdStr(path string) string { - template := config.GetOpenDirInEditorTemplate(&self.UserConfig.OS, self.guessDefaultEditor) +func (self *FileCommands) GetOpenDirInEditorCmdStr(path string) (string, bool) { + template, editInTerminal := config.GetOpenDirInEditorTemplate(&self.UserConfig.OS, self.guessDefaultEditor) templateValues := map[string]string{ "dir": self.cmd.Quote(path), } cmdStr := utils.ResolvePlaceholderString(template, templateValues) - return cmdStr + return cmdStr, editInTerminal } func (self *FileCommands) guessDefaultEditor() string { |