mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-01-23 10:40:03 +08:00
feat(chat): complete channel with ignorecase
This commit is contained in:
parent
1551d4f750
commit
bb9d83beb4
@ -314,7 +314,7 @@ function! s:complete(base,num) abort
|
||||
return rsl[a:num % len(rsl)]
|
||||
endif
|
||||
elseif a:base =~# '^/set_protocol\s*\w*$'
|
||||
let rsl = filter(copy(s:all_protocols), "v:val =~# matchstr(a:base, '\w*$') .'[^\ .]*'")
|
||||
let rsl = filter(copy(s:all_protocols), "v:val =~# matchstr(a:base, '\\w*$') .'[^\ .]*'")
|
||||
if len(rsl) > 0
|
||||
return matchstr(a:base, '^/set_protocol\s*') . rsl[a:num % len(rsl)]
|
||||
endif
|
||||
@ -324,7 +324,7 @@ function! s:complete(base,num) abort
|
||||
let channels = chat#{s:protocol}#get_channels()
|
||||
catch
|
||||
endtry
|
||||
let rsl = filter(copy(channels), "v:val =~# '^' . matchstr(a:base, '\\w*$')")
|
||||
let rsl = filter(copy(channels), "v:val =~ '^' . matchstr(a:base, '\\w*$')")
|
||||
if len(rsl) > 0
|
||||
return matchstr(a:base, '^/set_channel\s*') . rsl[a:num % len(rsl)]
|
||||
endif
|
||||
|
Loading…
Reference in New Issue
Block a user