Skip to content

Commit

Permalink
fuzzy and or pipe
Browse files Browse the repository at this point in the history
  • Loading branch information
chimay committed May 22, 2023
1 parent 1869c94 commit ec00b4f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions autoload/organ/kyusu.vim
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,11 @@ fun! organ#kyusu#steep (wordlist, unused, value)
" unused argument is for compatibility with filter()
let wordlist = copy(a:wordlist)
let value = a:value
eval wordlist->map({ _, val -> substitute(val, '\m|', '\\|', 'g') })
let match = v:true
if g:organ_config.completion.vocalize > 0
eval wordlist->map({ _, val -> organ#kyusu#vocalize(val) })
endif
eval wordlist->map({ _, val -> substitute(val, '\m|', '\\|', 'g') })
let match = v:true
for word in wordlist
if word !~ '\m^!'
if value !~ word
Expand All @@ -83,6 +83,9 @@ fun! organ#kyusu#pour (wordlist, list)
let wordlist = a:wordlist
let list = a:list
if g:organ_config.completion.fuzzy > 0
if empty(wordlist)
return list
endif
return list->matchfuzzy(join(wordlist))
endif
let list = deepcopy(list)
Expand Down

0 comments on commit ec00b4f

Please sign in to comment.