mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-07-30 03:23:08 +03:00
Support opening worktree in editor
This commit is contained in:
@ -37,6 +37,13 @@ func (self *FilesHelper) EditFileAtLineAndWait(filename string, lineNumber int)
|
||||
return self.callEditor(cmdStr, true)
|
||||
}
|
||||
|
||||
func (self *FilesHelper) OpenDirInEditor(path string) error {
|
||||
cmdStr := self.c.Git().File.GetOpenDirInEditorCmdStr(path)
|
||||
|
||||
// Not editing in terminal because surely that's not a thing.
|
||||
return self.callEditor(cmdStr, false)
|
||||
}
|
||||
|
||||
func (self *FilesHelper) callEditor(cmdStr string, editInTerminal bool) error {
|
||||
if editInTerminal {
|
||||
return self.c.RunSubprocessAndRefresh(
|
||||
|
Reference in New Issue
Block a user