Skip to content
This repository was archived by the owner on Oct 13, 2021. It is now read-only.

Commit ff75e8f

Browse files
committed
fix: delay when auto changing source
1 parent 3f2d3f0 commit ff75e8f

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

lua/completion.lua

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,8 @@ function M.on_InsertEnter()
122122
if source.chain_complete_index ~= source.chain_complete_length then
123123
source.chain_complete_index = source.chain_complete_index + 1
124124
l_complete_index = source.chain_complete_index
125+
manager.insertChar = true
126+
source.triggerCompletion(false, manager)
125127
else
126128
source.stop_complete = true
127129
end

lua/source/ins_complete.lua

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ M.triggerCompletion = function(manager, mode)
4949
api.nvim_input(ins_complete_table[mode])
5050
checkEmptyCompletion(manager)
5151
end
52+
else
53+
insertChar = false
5254
end
5355
end
5456

0 commit comments

Comments
 (0)