Skip to content

Commit f4920e8

Browse files
authored
Use a PTY when using external diff command from git config (#4983)
### PR Description I hit the same issue as #3119 when setting `useExtDiffGitConfig` to true and using `difftastic` side-by-side comparison in my git config. The same fix in #3120 needs to be applied for the newer config option.
2 parents 6f0f1e7 + 263ad11 commit f4920e8

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)