diff --git a/changelog.md b/changelog.md index 5925a724..d27213d8 100644 --- a/changelog.md +++ b/changelog.md @@ -7,6 +7,8 @@ This files document the differences between Lite XL and rxi/lite for each versio Add config mechanism to disable loading of specific plugins by setting `config. = false`. +Add command `root:close-all` to close all the documents currently opened. + ### 1.15 **Project directories** diff --git a/data/core/commands/root.lua b/data/core/commands/root.lua index 58c83e23..3fca120d 100644 --- a/data/core/commands/root.lua +++ b/data/core/commands/root.lua @@ -11,6 +11,12 @@ local t = { node:close_active_view(core.root_view.root_node) end, + ["root:close-all"] = function() + if core.confirm_close_all() then + core.root_view:close_all_docviews() + end + end, + ["root:switch-to-previous-tab"] = function() local node = core.root_view:get_active_node() local idx = node:get_view_idx(core.active_view)