Skip to content

Instantly share code, notes, and snippets.

@qickstarter
Created January 5, 2014 17:07
Show Gist options
  • Save qickstarter/8270847 to your computer and use it in GitHub Desktop.
Save qickstarter/8270847 to your computer and use it in GitHub Desktop.
diff --git a/autoload/neocomplete/complete.vim b/autoload/neocomplete/complete.vim
index 4056e7e..8c409f8 100644
--- a/autoload/neocomplete/complete.vim
+++ b/autoload/neocomplete/complete.vim
@@ -175,7 +175,6 @@ function! neocomplete#complete#_get_words(sources, complete_pos, complete_str) "
" Append prefix.
let candidates = []
let len_words = 0
- let sources_len = 0
for source in sort(filter(copy(a:sources),
\ '!empty(v:val.neocomplete__context.candidates)'),
\ 's:compare_source_rank')
@@ -240,7 +239,6 @@ EOF
let candidates += words
let len_words += len(words)
- let sources_len += 1
if g:neocomplete#max_list > 0
\ && len_words > g:neocomplete#max_list
@@ -256,22 +254,6 @@ EOF
let candidates = candidates[: g:neocomplete#max_list]
endif
- if sources_len == 1
- " Remove default menu.
- lua << EOF
- do
- local candidates = vim.eval('candidates')
- local mark = vim.eval('mark')
- local sources_len = vim.eval('sources_len')
- for i = 0, #candidates-1 do
- if candidates[i].menu == mark then
- candidates[i].menu = nil
- end
- end
- end
-EOF
- endif
-
" Check dup and set icase.
let icase = !neocomplete#is_text_mode() && !neocomplete#within_comment() &&
\ g:neocomplete#enable_ignore_case &&
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment