From f8998486317b4bd25ca53b25cf082c5eb88f0d72 Mon Sep 17 00:00:00 2001 From: Adam Harrison Date: Sun, 27 Jun 2021 13:27:20 -0400 Subject: [PATCH] Added in checks so that the entire thing isn't consumed. --- data/core/rootview.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/data/core/rootview.lua b/data/core/rootview.lua index 9ffa12e4..36ab148d 100644 --- a/data/core/rootview.lua +++ b/data/core/rootview.lua @@ -608,9 +608,9 @@ function Node:close_all_docviews() else self.a:close_all_docviews() self.b:close_all_docviews() - if self.a:is_empty() then + if self.a:is_empty() and not self.a.is_primary_node then self:consume(self.b) - elseif self.b:is_empty() then + elseif self.b:is_empty() and not self.b.is_primary_node then self:consume(self.a) end end