Try to fix col adjustment (#843)

* Try to fix col adjuastment

* Improve duplicated text handling
This commit is contained in:
hrsh7th
2022-03-17 15:53:10 +09:00
committed by GitHub
parent c60cb7a100
commit 71d7f46b93
2 changed files with 7 additions and 5 deletions

View File

@@ -80,7 +80,7 @@ view.open = function(self, ctx, sources)
-- create filtered entries.
local offset = ctx.cursor.col
for i, s in ipairs(source_group) do
if s.offset <= offset then
if s.offset <= ctx.cursor.col then
if not has_triggered_by_symbol_source or s.is_triggered_by_symbol then
-- source order priority bonus.
local priority = s:get_source_config().priority or ((#source_group - (i - 1)) * config.get().sorting.priority_weight)