Fix focus problem with NagView with root:close-all

Fix provided by @Guldoman in PR:

https://github.com/lite-xl/lite-xl/pull/419
This commit is contained in:
Francesco Abbate
2021-08-28 00:21:29 +02:00
parent 4f8de02bcf
commit 06252382ec
2 changed files with 7 additions and 2 deletions
+5 -1
View File
@@ -746,8 +746,12 @@ end
function core.set_active_view(view)
assert(view, "Tried to set active view to nil")
if core.active_view and core.active_view.force_focus then return end
if view ~= core.active_view then
if core.active_view and core.active_view.force_focus then
core.next_active_view = view
return
end
core.next_active_view = nil
if view.doc and view.doc.filename then
core.set_visited(view.doc.filename)
end