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:
2
vendor/github.com/jesseduffield/gocui/view.go
generated
vendored
2
vendor/github.com/jesseduffield/gocui/view.go
generated
vendored
@@ -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
2
vendor/modules.txt
vendored
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user