Merge pull request #318 from lite-xl/MacOSClose
Created an extra command, to implement appropriate cmd+w behaviour on Mac.
This commit is contained in:
@@ -11,6 +11,15 @@ local t = {
|
||||
node:close_active_view(core.root_view.root_node)
|
||||
end,
|
||||
|
||||
["root:close-or-quit"] = function()
|
||||
local node = core.root_view:get_active_node()
|
||||
if node and (not node:is_empty() or not node.is_primary_node) then
|
||||
node:close_active_view(core.root_view.root_node)
|
||||
else
|
||||
core.quit()
|
||||
end
|
||||
end,
|
||||
|
||||
["root:close-all"] = function()
|
||||
core.confirm_close_all(core.root_view.close_all_docviews, core.root_view)
|
||||
end,
|
||||
|
||||
Reference in New Issue
Block a user