Fix accordion issue

This fixes the issue in accordion mode where the current line wasn't in the viewport upon focus.

It doesn't perfectly fix it: the current line always appears at the top of the view. But it's good enough
to cut a new release. The proper fix is to only focus the line after the view has had its height adjusted.
This commit is contained in:
Jesse Duffield
2023-07-19 20:39:10 +10:00
parent 949022db8c
commit be02786dad
4 changed files with 5 additions and 5 deletions

View File

@@ -269,7 +269,7 @@ func (v *View) FocusPoint(cx int, cy int) {
_, height := v.Size()
ly := height - 1
if ly == -1 {
if ly < 0 {
ly = 0
}

2
vendor/modules.txt vendored
View File

@@ -172,7 +172,7 @@ github.com/jesseduffield/go-git/v5/utils/merkletrie/filesystem
github.com/jesseduffield/go-git/v5/utils/merkletrie/index
github.com/jesseduffield/go-git/v5/utils/merkletrie/internal/frame
github.com/jesseduffield/go-git/v5/utils/merkletrie/noder
# github.com/jesseduffield/gocui v0.3.1-0.20230710004407-9bbfd873713b
# github.com/jesseduffield/gocui v0.3.1-0.20230719103719-ea5c8b64cf35
## explicit; go 1.12
github.com/jesseduffield/gocui
# github.com/jesseduffield/kill v0.0.0-20220618033138-bfbe04675d10