Skip to content

Commit ab1933b

Browse files
authored
Merge pull request #389 from jayli/master
Merge bed commit
2 parents 44047e9 + 826ec90 commit ab1933b

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

README-cn.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
Vim-easycomplete 是一个快速极简的自动补全插件,兼容 vim 和 neovim,支持 Linux 和 MacOS. 基于 Vimscript 实现,配置简单。
1212

13-
https://github.com/user-attachments/assets/30c265f3-e65c-47d0-8762-e9e8250d7b4d
13+
<img src="https://github.com/user-attachments/assets/12ddc3b0-4bc3-40c8-8044-3f57c97261fb" width=700 />
1414

1515

1616
包含特性:

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ It's a Fast and Minimalism Style Completion Plugin for vim/nvim.
1010

1111
Vim-easycomplete is a fast and minimalism style completion plugin for both vim and nvim. It aims to be available out of the box on linux and mac. It is implemented in pure VimScript and is extremely simple to configure without installing Node and a bunch of Node modules. Thank [nvim-cmp](https://github.com/hrsh7th/nvim-cmp) and [coc.nvim](https://github.com/neoclide/coc.nvim). They inspired me a lot.
1212

13-
https://github.com/user-attachments/assets/30c265f3-e65c-47d0-8762-e9e8250d7b4d
14-
13+
<img src="https://github.com/user-attachments/assets/12ddc3b0-4bc3-40c8-8044-3f57c97261fb" width=700 />
1514

1615
It contains these features:
1716

lua/easycomplete/util.lua

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,9 @@ function util.complete_menu_filter(matching_res, word)
129129
end
130130
end
131131

132-
if vim.fn["easycomplete#GetStuntMenuItems"]() == 0 and vim.g.easycomplete_first_complete_hit == 1 then
132+
local stunt_items = vim.fn["easycomplete#GetStuntMenuItems"]()
133+
134+
if #stunt_items == 0 and vim.g.easycomplete_first_complete_hit == 1 then
133135
table.sort(fuzzymatch_result, function(a, b)
134136
return #a.abbr < #b.abbr -- 按 abbr 字段的长度升序排序
135137
end)

0 commit comments

Comments
 (0)