1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-10-08 22:52:12 +02:00

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.
This commit is contained in:
stk
2025-10-06 16:07:55 +02:00
committed by Stefan Haller
parent 97762f484f
commit 3372e2bdb6

View File

@@ -1,6 +1,7 @@
package gui
import (
"fmt"
"os/exec"
"github.com/jesseduffield/gocui"
@@ -11,5 +12,6 @@ func (gui *Gui) onResize() error {
}
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)
}