fix oob in notes and viewport

This commit is contained in:
2026-01-04 17:11:01 +00:00
parent 3a2f63551d
commit 1aaeec8e12
2 changed files with 10 additions and 2 deletions
+3
View File
@@ -177,6 +177,9 @@ func (t *FsTree) PerformAction(action FsActionType, name string) error {
}
func (t *FsTree) getViewportBounds() (startLine, endLine int) {
if t.selectedNode == nil {
return 0, 0 // doesn't amtter in this case
}
selectedLine := t.selectedNode.line
halfHeight := t.height / 2