diff --git a/data/core/init.lua b/data/core/init.lua index bd87385a..f6034a06 100644 --- a/data/core/init.lua +++ b/data/core/init.lua @@ -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 diff --git a/data/core/nagview.lua b/data/core/nagview.lua index 6d6f89f4..3d448cd4 100644 --- a/data/core/nagview.lua +++ b/data/core/nagview.lua @@ -193,7 +193,8 @@ function NagView:next() self:change_hovered(common.find_index(self.options, "default_yes")) end self.force_focus = self.message ~= nil - core.set_active_view(self.message ~= nil and self or core.last_active_view) + core.set_active_view(self.message ~= nil and self or + core.next_active_view or core.last_active_view) end function NagView:show(title, message, options, on_select)