Skip to content

Commit 4054dcc

Browse files
committed
Use a PTY when using external diff command from git config
Same logic as #3120 but for new external diff option
1 parent 32a701c commit 4054dcc

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

pkg/gui/pty.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,10 @@ func (gui *Gui) newPtyTask(view *gocui.View, cmd *exec.Cmd, prefix string) error
4747
width := view.InnerWidth()
4848
pager := gui.stateAccessor.GetPagerConfig().GetPagerCommand(width)
4949
externalDiffCommand := gui.stateAccessor.GetPagerConfig().GetExternalDiffCommand()
50+
useExtDiffGitConfig := gui.stateAccessor.GetPagerConfig().GetUseExternalDiffGitConfig()
5051

51-
if pager == "" && externalDiffCommand == "" {
52-
// if we're not using a custom pager we don't need to use a pty
52+
if pager == "" && externalDiffCommand == "" && !useExtDiffGitConfig {
53+
// If we're not using a custom pager nor external diff command, then we don't need to use a pty
5354
return gui.newCmdTask(view, cmd, prefix)
5455
}
5556

0 commit comments

Comments
 (0)