Fix `doc` selection in `findreplace`

Use `last_view` if `active_view` is `CommandView`.
This commit is contained in:
Guldoman 2021-09-11 03:37:12 +02:00
parent 1976facaf1
commit af925d603b
No known key found for this signature in database
GPG Key ID: C08A498EC7F1AFDD
1 changed files with 2 additions and 1 deletions

View File

@ -14,7 +14,8 @@ local find_regex = config.find_regex or false
local found_expression
local function doc()
return core.active_view:is(DocView) and core.active_view.doc or last_view.doc
local is_DocView = core.active_view:is(DocView) and not core.active_view:is(CommandView)
return is_DocView and core.active_view.doc or last_view.doc
end
local function get_find_tooltip()