1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2024-11-26 09:00:57 +02:00

use view line height to see if you should stop scrolling

This commit is contained in:
Jesse Duffield 2020-01-12 13:26:10 +11:00
parent bd79c2e8dc
commit 77a82e9d51

View File

@ -265,7 +265,7 @@ func (gui *Gui) scrollDownView(viewName string) error {
y += sy
}
scrollHeight := gui.Config.GetUserConfig().GetInt("gui.scrollHeight")
if y < len(mainView.BufferLines()) {
if y < mainView.LinesHeight() {
if err := mainView.SetOrigin(ox, oy+scrollHeight); err != nil {
return err
}