mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-11-23 16:22:24 +03:00
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.
18 lines
336 B
Go
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)
|
|
}
|