1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-11-23 16:22:24 +03:00
Files
lazygit/pkg/gui/pty_windows.go
stk 43811cdad8 Export a LAZYGIT_COLUMNS variable to "pty" tasks on Windows
This makes it possible to pass it to an external diff command that is
used like a pager. An example for this can be seen in the added
documentation in the next commit.
2025-10-09 10:04:29 +02:00

18 lines
336 B
Go

package gui
import (
"fmt"
"os/exec"
"github.com/jesseduffield/gocui"
)
func (gui *Gui) onResize() error {
return nil
}
func (gui *Gui) newPtyTask(view *gocui.View, cmd *exec.Cmd, prefix string) error {
cmd.Env = append(cmd.Env, fmt.Sprintf("LAZYGIT_COLUMNS=%d", view.InnerWidth()))
return gui.newCmdTask(view, cmd, prefix)
}