mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-11-25 22:32:13 +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
|
package gui
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"fmt"
|
||||||
"os/exec"
|
"os/exec"
|
||||||
|
|
||||||
"github.com/jesseduffield/gocui"
|
"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 {
|
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)
|
return gui.newCmdTask(view, cmd, prefix)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user