1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-07-31 14:24:25 +03:00

more generic way of supporting custom pagers

This commit is contained in:
Jesse Duffield
2020-03-01 21:00:44 +11:00
parent 355f1615ab
commit 54241d8ab9
3 changed files with 33 additions and 22 deletions

View File

@ -28,10 +28,7 @@ func (gui *Gui) newCmdTask(viewName string, cmd *exec.Cmd) error {
func (gui *Gui) newPtyTask(viewName string, cmd *exec.Cmd) error {
width, _ := gui.getMainView().Size()
pager, err := gui.GitCommand.GetPager(width)
if err != nil {
return err
}
pager := gui.GitCommand.GetPager(width)
if pager == "" {
// if we're not using a custom pager we don't need to use a pty