mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-05-23 22:50:41 +02:00
Merge branch 'master' into feature/translations
This commit is contained in:
commit
b8d5adcb84
@ -6,6 +6,7 @@
|
|||||||
gui:
|
gui:
|
||||||
# stuff relating to the UI
|
# stuff relating to the UI
|
||||||
scrollHeight: 2 # how many lines you scroll by
|
scrollHeight: 2 # how many lines you scroll by
|
||||||
|
scrollPastBottom: true # enable scrolling past the bottom
|
||||||
theme:
|
theme:
|
||||||
activeBorderColor:
|
activeBorderColor:
|
||||||
- white
|
- white
|
||||||
|
@ -214,6 +214,7 @@ func GetDefaultConfig() []byte {
|
|||||||
`gui:
|
`gui:
|
||||||
## stuff relating to the UI
|
## stuff relating to the UI
|
||||||
scrollHeight: 2
|
scrollHeight: 2
|
||||||
|
scrollPastBottom: true
|
||||||
theme:
|
theme:
|
||||||
activeBorderColor:
|
activeBorderColor:
|
||||||
- white
|
- white
|
||||||
|
@ -130,7 +130,12 @@ func (gui *Gui) scrollUpMain(g *gocui.Gui, v *gocui.View) error {
|
|||||||
func (gui *Gui) scrollDownMain(g *gocui.Gui, v *gocui.View) error {
|
func (gui *Gui) scrollDownMain(g *gocui.Gui, v *gocui.View) error {
|
||||||
mainView, _ := g.View("main")
|
mainView, _ := g.View("main")
|
||||||
ox, oy := mainView.Origin()
|
ox, oy := mainView.Origin()
|
||||||
if oy < len(mainView.BufferLines()) {
|
y := oy
|
||||||
|
if !gui.Config.GetUserConfig().GetBool("gui.scrollPastBottom") {
|
||||||
|
_, sy := mainView.Size()
|
||||||
|
y += sy
|
||||||
|
}
|
||||||
|
if y < len(mainView.BufferLines()) {
|
||||||
return mainView.SetOrigin(ox, oy+gui.Config.GetUserConfig().GetInt("gui.scrollHeight"))
|
return mainView.SetOrigin(ox, oy+gui.Config.GetUserConfig().GetInt("gui.scrollHeight"))
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
|
Loading…
x
Reference in New Issue
Block a user