diff --git a/internal/views/splits.go b/internal/views/splits.go index 1168ab5d..5fb7dc65 100644 --- a/internal/views/splits.go +++ b/internal/views/splits.go @@ -185,6 +185,9 @@ func (n *Node) hResizeSplit(i int, size int) bool { // ResizeSplit resizes a certain split to a given size func (n *Node) ResizeSplit(size int) bool { + if size <= 0 { + return false + } if len(n.parent.children) <= 1 { // cannot resize a lone node return false