Skip to content

Commit

Permalink
Bug fix: 'make' causing completors to be reset.
Browse files Browse the repository at this point in the history
When quickfix window was triggered after :make completors went
missing. Remove FileType event from consideration.

M  autoload/vimcomplete/completor.vim
  • Loading branch information
girishji committed Dec 23, 2024
1 parent 8f00ded commit 0838e2b
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions autoload/vimcomplete/completor.vim
Original file line number Diff line number Diff line change
Expand Up @@ -396,8 +396,14 @@ export def Enable()
autocmd TextChangedI <buffer> VimComplete()
autocmd TextChangedP <buffer> VimCompletePopupVisible()
endif
autocmd BufEnter,BufReadPost,FileType <buffer> SetupCompletors()
# 'FileType' is required above when &ft is set through modeline
# Note: When &ft is set in modeline, BufEnter will not have &ft set and
# thus SetupCompletors() will not set completors appropriately. However,
# if 'FileType' event is used to trigger SetupCompletors() and if :make
# is used, it causes a FileType event for 'qf' (quickfix) file even when
# :make does not have errors. This causes completors to be reset. There
# will be no BufEnter to undo the damage. Thus, do not use FileType
# event below.
autocmd BufEnter,BufReadPost <buffer> SetupCompletors()
autocmd CompleteDone <buffer> LRU_Cache()
if options.postfixClobber
autocmd CompleteDone <buffer> util.TextAction(true)
Expand Down

0 comments on commit 0838e2b

Please sign in to comment.