1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-10-30 23:57:43 +02:00

[gocui] Fix FocusPoint when Wrap is true

This commit is contained in:
Stefan Haller
2024-12-08 13:10:25 +01:00
parent a22aced1bb
commit 6a5672a7ad

View File

@@ -326,7 +326,11 @@ func (v *View) IsSearching() bool {
}
func (v *View) FocusPoint(cx int, cy int) {
lineCount := len(v.lines)
v.writeMutex.Lock()
defer v.writeMutex.Unlock()
v.refreshViewLinesIfNeeded()
lineCount := len(v.viewLines)
if cy < 0 || cy > lineCount {
return
}