mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-01-06 03:53:59 +02:00
Use a PTY when calling external diff command
This is important for communicating the view size to the external command. e.g. The columns in difft's side-by-side mode are aligned correctly.
This commit is contained in:
parent
bb87642aee
commit
0f2b79a1d4
@ -45,8 +45,9 @@ func (gui *Gui) onResize() error {
|
||||
func (gui *Gui) newPtyTask(view *gocui.View, cmd *exec.Cmd, prefix string) error {
|
||||
width, _ := gui.Views.Main.Size()
|
||||
pager := gui.git.Config.GetPager(width)
|
||||
externalDiffCommand := gui.Config.GetUserConfig().Git.Paging.ExternalDiffCommand
|
||||
|
||||
if pager == "" {
|
||||
if pager == "" && externalDiffCommand == "" {
|
||||
// if we're not using a custom pager we don't need to use a pty
|
||||
return gui.newCmdTask(view, cmd, prefix)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user