Improve offset handling
This commit is contained in:
@@ -184,7 +184,7 @@ core.confirm = vim.schedule_wrap(function(e, option, callback)
|
||||
end
|
||||
e.confirmed = true
|
||||
|
||||
debug.log('entry.confirm', e:get_completion_item())
|
||||
debug.log('entry.confirm', e)
|
||||
|
||||
local ctx = context.new()
|
||||
local restore_text = string.sub(ctx.cursor_line, e.context.cursor.col, ctx.cursor.col - 1)
|
||||
|
||||
@@ -96,9 +96,7 @@ menu.update = function(self, ctx, sources)
|
||||
e.score = e.score + priority
|
||||
table.insert(entries, e)
|
||||
entry_map[e.id] = e
|
||||
end
|
||||
if #filtered > 0 then
|
||||
offset = math.min(offset, s.offset)
|
||||
offset = math.min(offset, e:get_offset())
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user