From 86bca52eecca16d7832f914948073f2f566ce397 Mon Sep 17 00:00:00 2001 From: Neko Box Coder Date: Wed, 8 Jul 2026 00:30:55 +0100 Subject: [PATCH] Fixing resize split can cause crashes when node is root Fixing resize split can cause crashes when node is root. "Regression" of #3983 where ResizeSplit() assumed that the root node always has a single child which aligns to the previous behavior --- internal/views/splits.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/views/splits.go b/internal/views/splits.go index d310db2126..7db8cc2bb9 100644 --- a/internal/views/splits.go +++ b/internal/views/splits.go @@ -186,7 +186,7 @@ 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 { // TODO: `size < 0` does not work for some reason - if size <= 0 { + if size <= 0 || n.parent == nil { return false } if len(n.parent.children) <= 1 {