We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 956647c commit 5f35974Copy full SHA for 5f35974
1 file changed
internal/views/splits.go
@@ -439,11 +439,12 @@ func (n *Node) VSplit(right bool) uint64 {
439
}
440
441
// unsplits the child of a split
442
-func (n *Node) unsplit(i int, h bool) {
+func (n *Node) unsplit(i int) {
443
copy(n.children[i:], n.children[i+1:])
444
n.children[len(n.children)-1] = nil
445
n.children = n.children[:len(n.children)-1]
446
447
+ h := n.Kind == STVert
448
nonrs, numr := n.getResizeInfo(h)
449
if numr == 0 {
450
// This means that this was the last child
@@ -470,12 +471,7 @@ func (n *Node) Unsplit() bool {
470
471
ind = i
472
473
- if n.parent.Kind == STVert {
474
- n.parent.unsplit(ind, true)
475
- } else {
476
- n.parent.unsplit(ind, false)
477
- }
478
-
+ n.parent.unsplit(ind)
479
if n.parent.IsLeaf() {
480
return n.parent.Unsplit()
481
0 commit comments