Skip to content

Commit

Permalink
Merge pull request #38 from tsuyoshicho/fix/badspell
Browse files Browse the repository at this point in the history
fix: spelunker#spellbad#get_spell_bad_list call args num
  • Loading branch information
kamykn authored Apr 22, 2020
2 parents d0f892a + 7dd3624 commit 868ef83
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
5 changes: 3 additions & 2 deletions autoload/ctrlp/spelunker.vim
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,10 @@ let s:id = s:ctrlp_builtins + len(g:ctrlp_ext_vars)
unlet s:ctrlp_builtins

function! s:spellbadlist() abort
let spellbadlist = spelunker#spellbad#get_spell_bad_list(1, '$')
let l:window_text_list = spelunker#get_buffer#all()
let l:spell_bad_list = spelunker#spellbad#get_spell_bad_list(l:window_text_list)

return uniq(sort(spellbadlist))
return uniq(sort(l:spell_bad_list))
endfunction

function! ctrlp#spelunker#id() abort
Expand Down
6 changes: 4 additions & 2 deletions autoload/spelunker.vim
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ function! spelunker#check_and_echo_list()
let l:orig_spelunker_target_min_char_len = g:spelunker_target_min_char_len
let g:spelunker_target_min_char_len = 1

let l:spell_bad_list = spelunker#spellbad#get_spell_bad_list(1, '$')
let l:window_text_list = spelunker#get_buffer#all()
let l:spell_bad_list = spelunker#spellbad#get_spell_bad_list(l:window_text_list)

" ホワイトリスト作るとき用のオプション
let g:spelunker_target_min_char_len = l:orig_spelunker_target_min_char_len
Expand Down Expand Up @@ -74,7 +75,8 @@ function! spelunker#add_all_spellgood()
return 0
endif

let l:spell_bad_list = spelunker#spellbad#get_spell_bad_list(1, '$')
let l:window_text_list = spelunker#get_buffer#all()
let l:spell_bad_list = spelunker#spellbad#get_spell_bad_list(l:window_text_list)

if len(l:spell_bad_list) == 0
return 0
Expand Down

0 comments on commit 868ef83

Please sign in to comment.