Skip to content

Commit

Permalink
bugfix for #284
Browse files Browse the repository at this point in the history
  • Loading branch information
jayli committed Dec 22, 2023
1 parent 73c6c34 commit 9647bfc
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions autoload/easycomplete.vim
Original file line number Diff line number Diff line change
Expand Up @@ -1198,9 +1198,10 @@ endfunction

" <CR> 逻辑,主要判断是否展开代码片段
function! easycomplete#TypeEnterWithPUM()
let l:item = easycomplete#GetCompletedItem()
if empty(l:item) && !(&completeopt =~ "noselect")
if !(&completeopt =~ "noselect")
let l:item = easycomplete#GetCursordItem()
else
let l:item = easycomplete#GetCompletedItem()
endif
" 得到光标处单词
let l:word = matchstr(getline('.'), '\S\+\%'.col('.').'c')
Expand Down

0 comments on commit 9647bfc

Please sign in to comment.