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:
@@ -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)
|
||||
}
|
||||
|
Reference in New Issue
Block a user