keep_inactive -> keep_active

This commit is contained in:
Adam Harrison 2021-08-10 23:29:39 -04:00
parent 40c68ffcc6
commit c644ca7df6
1 changed files with 6 additions and 6 deletions

View File

@ -594,13 +594,13 @@ function Node:is_empty()
end
function Node:close_all_docviews(keep_inactive)
function Node:close_all_docviews(keep_active)
if self.type == "leaf" then
local i = 1
while i <= #self.views do
local view = self.views[i]
if view:is(DocView) and not view:is(CommandView) and
(not keep_inactive or view ~= self.active_view) then
(not keep_active or view ~= self.active_view) then
table.remove(self.views, i)
else
i = i + 1
@ -610,8 +610,8 @@ function Node:close_all_docviews(keep_inactive)
self:add_view(EmptyView())
end
else
self.a:close_all_docviews(keep_inactive)
self.b:close_all_docviews(keep_inactive)
self.a:close_all_docviews(keep_active)
self.b:close_all_docviews(keep_active)
if self.a:is_empty() and not self.a.is_primary_node then
self:consume(self.b)
elseif self.b:is_empty() and not self.b.is_primary_node then
@ -737,8 +737,8 @@ function RootView:open_doc(doc)
end
function RootView:close_all_docviews(keep_inactive)
self.root_node:close_all_docviews(keep_inactive)
function RootView:close_all_docviews(keep_active)
self.root_node:close_all_docviews(keep_active)
end