diff --git a/data/plugins/autocomplete.lua b/data/plugins/autocomplete.lua index d638d4ff..43b9f090 100644 --- a/data/plugins/autocomplete.lua +++ b/data/plugins/autocomplete.lua @@ -588,8 +588,11 @@ function autocomplete.open(on_close) end local av = get_active_view() - last_line, last_col = av.doc:get_selection() - update_suggestions() + if av then + partial = get_partial_symbol() + last_line, last_col = av.doc:get_selection() + update_suggestions() + end end function autocomplete.close()