Skip to content

Commit af8ae3e

Browse files
committed
Merge branch 'dev'
2 parents c53570c + be365ad commit af8ae3e

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

autoload/easycomplete.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ let g:easycomplete_firstcomplete_ctx = {}
3636
" 和 YCM 一样,用做 FirstComplete 标志位
3737
let g:easycomplete_first_complete_hit = 0
3838
" 菜单显示最大 item 数量
39-
let g:easycomplete_maxlength = (&filetype == 'vim' && !has('nvim') ? 35 : 45)
39+
let g:easycomplete_maxlength = (&filetype == 'vim' && !has('nvim') ? 35 : 50)
4040
" Global CompleteChanged Event:异步回调显示 popup 时借用
4141
let g:easycomplete_completechanged_event = {}
4242
" 触发 lint 动作的延迟

autoload/easycomplete/popup.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ function! s:lint(content, hl, ft)
180180

181181
let opt = extend({
182182
\ 'relative':'editor',
183-
\ 'focusable': v:true,
183+
\ 'focusable': v:false,
184184
\ 'style':'minimal',
185185
\ 'filetype': empty(a:ft) ? "help" : a:ft
186186
\ },

lua/easycomplete/cmdline.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -603,7 +603,8 @@ function this.cmp_regex_handler(get_cmp_items, word)
603603
else
604604
should_redraw = true
605605
end
606-
this.pum_complete(start_col, filtered_items)
606+
local final_result = util.sub_table(filtered_items, 1, vim.g.easycomplete_maxlength)
607+
this.pum_complete(start_col, final_result)
607608
end
608609
return should_redraw
609610
end

0 commit comments

Comments
 (0)