Made RootView:open_doc() try to use previous node if current node is locked
This commit is contained in:
@@ -386,6 +386,10 @@ end
|
||||
|
||||
function RootView:open_doc(doc)
|
||||
local node = self:get_active_node()
|
||||
if node.locked and core.last_active_view then
|
||||
core.set_active_view(core.last_active_view)
|
||||
node = self:get_active_node()
|
||||
end
|
||||
assert(not node.locked, "Cannot open doc on locked node")
|
||||
for i, view in ipairs(node.views) do
|
||||
if view.doc == doc then
|
||||
|
||||
Reference in New Issue
Block a user