Skip to content

Commit e8f0296

Browse files
committed
bugfix
1 parent 194db97 commit e8f0296

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

autoload/easycomplete/util.vim

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -698,17 +698,15 @@ function! easycomplete#util#GetTypingWord()
698698
" 正常情况这里取普通单词逻辑不应当变化
699699
" 如果不同语言对单词组成字符界定不一,在主流程中处理
700700
" 比如 vim 把 'g:abc' 对待为一个完整单词
701-
if index(["php"], &filetype) >= 0
701+
if exists("g:easycomplete_cmdline_typing") && g:easycomplete_cmdline_typing == 1
702+
let regx = '[a-zA-Z0-9_#:@]'
703+
elseif index(["php", "javascript", "typescript"], &filetype) >= 0
702704
let regx = '[$a-zA-Z0-9_#]'
705+
elseif index(["lua"], &filetype) >= 0
706+
let regx = '[$a-zA-Z0-9_]'
703707
else
704708
let regx = '[a-zA-Z0-9_#]'
705709
endif
706-
if index(["lua"], &filetype) >= 0
707-
let regx = '[$a-zA-Z0-9_]'
708-
endif
709-
if exists("g:easycomplete_cmdline_typing") && g:easycomplete_cmdline_typing == 1
710-
let regx = '[a-zA-Z0-9_#:]'
711-
endif
712710
while start > 0 && line[start - 1] =~ regx
713711
let start = start - 1
714712
let width = width + 1

0 commit comments

Comments
 (0)