Customized fork of github.com/rxi/lite

Made RootView:open_doc() try to use previous node if current node is locked

rxi e7320c22 35b642d4

Changed files
+4 -1
data
core
plugins
+4
data/core/rootview.lua
··· 386 386 387 387 function RootView:open_doc(doc) 388 388 local node = self:get_active_node() 389 + if node.locked and core.last_active_view then 390 + core.set_active_view(core.last_active_view) 391 + node = self:get_active_node() 392 + end 389 393 assert(not node.locked, "Cannot open doc on locked node") 390 394 for i, view in ipairs(node.views) do 391 395 if view.doc == doc then
-1
data/plugins/treeview.lua
··· 111 111 112 112 113 113 function TreeView:on_mouse_pressed(button, x, y) 114 - core.set_active_view(core.last_active_view) 115 114 if not self.hovered_item then 116 115 return 117 116 elseif self.hovered_item.type == "dir" then