mirror of
https://github.com/jesseduffield/lazygit.git
synced 2026-09-10 07:36:27 -04:00
Cleanup: remove unused method ConfiguredPager
This could have been removed in commit 9657b4346f.
This commit is contained in:
parent
1c87776470
commit
ed05470732
|
|
@ -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),
|
||||
|
|
|
|||
Loading…
Reference in a new issue