1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-11-25 22:32:13 +02:00

Use a PTY when using external diff command from git config (#4983)

### PR Description

I hit the same issue as
https://github.com/jesseduffield/lazygit/issues/3119 when setting
`useExtDiffGitConfig` to true and using `difftastic` side-by-side
comparison in my git config.

The same fix in https://github.com/jesseduffield/lazygit/pull/3120 needs
to be applied for the newer config option.
This commit is contained in:
Stefan Haller
2025-11-01 09:35:45 +01:00
committed by GitHub

View File

@@ -47,9 +47,10 @@ func (gui *Gui) newPtyTask(view *gocui.View, cmd *exec.Cmd, prefix string) error
width := view.InnerWidth()
pager := gui.stateAccessor.GetPagerConfig().GetPagerCommand(width)
externalDiffCommand := gui.stateAccessor.GetPagerConfig().GetExternalDiffCommand()
useExtDiffGitConfig := gui.stateAccessor.GetPagerConfig().GetUseExternalDiffGitConfig()
if pager == "" && externalDiffCommand == "" {
// if we're not using a custom pager we don't need to use a pty
if pager == "" && externalDiffCommand == "" && !useExtDiffGitConfig {
// If we're not using a custom pager nor external diff command, then we don't need to use a pty
return gui.newCmdTask(view, cmd, prefix)
}