1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-10-30 23:57:43 +02:00

Cleanup: remove unused method ConfiguredPager

This could have been removed in commit 9657b4346f.
This commit is contained in:
Stefan Haller
2025-10-08 16:12:52 +02:00
parent 1c87776470
commit ed05470732

View File

@@ -1,9 +1,7 @@
package git_commands
import (
"os"
"strconv"
"strings"
gogit "github.com/jesseduffield/go-git/v5"
"github.com/jesseduffield/go-git/v5/config"
@@ -31,17 +29,6 @@ func NewConfigCommands(
}
}
func (self *ConfigCommands) ConfiguredPager() string {
if os.Getenv("GIT_PAGER") != "" {
return os.Getenv("GIT_PAGER")
}
if os.Getenv("PAGER") != "" {
return os.Getenv("PAGER")
}
output := self.gitConfig.Get("core.pager")
return strings.Split(output, "\n")[0]
}
func (self *ConfigCommands) GetPager(width int) string {
templateValues := map[string]string{
"columnWidth": strconv.Itoa(width/2 - 6),