keep_inactive -> keep_active
This commit is contained in:
parent
40c68ffcc6
commit
c644ca7df6
|
@ -594,13 +594,13 @@ function Node:is_empty()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
function Node:close_all_docviews(keep_inactive)
|
function Node:close_all_docviews(keep_active)
|
||||||
if self.type == "leaf" then
|
if self.type == "leaf" then
|
||||||
local i = 1
|
local i = 1
|
||||||
while i <= #self.views do
|
while i <= #self.views do
|
||||||
local view = self.views[i]
|
local view = self.views[i]
|
||||||
if view:is(DocView) and not view:is(CommandView) and
|
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)
|
table.remove(self.views, i)
|
||||||
else
|
else
|
||||||
i = i + 1
|
i = i + 1
|
||||||
|
@ -610,8 +610,8 @@ function Node:close_all_docviews(keep_inactive)
|
||||||
self:add_view(EmptyView())
|
self:add_view(EmptyView())
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
self.a:close_all_docviews(keep_inactive)
|
self.a:close_all_docviews(keep_active)
|
||||||
self.b:close_all_docviews(keep_inactive)
|
self.b:close_all_docviews(keep_active)
|
||||||
if self.a:is_empty() and not self.a.is_primary_node then
|
if self.a:is_empty() and not self.a.is_primary_node then
|
||||||
self:consume(self.b)
|
self:consume(self.b)
|
||||||
elseif self.b:is_empty() and not self.b.is_primary_node then
|
elseif self.b:is_empty() and not self.b.is_primary_node then
|
||||||
|
@ -737,8 +737,8 @@ function RootView:open_doc(doc)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
function RootView:close_all_docviews(keep_inactive)
|
function RootView:close_all_docviews(keep_active)
|
||||||
self.root_node:close_all_docviews(keep_inactive)
|
self.root_node:close_all_docviews(keep_active)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue