vim-patch:9.0.0052: "zG" may throw an error if invalid character follows (#19368)

Problem:    "zG" may throw an error if invalid character follows.
Solution:   Pass the word length to valid_spell_word(). (Ken Takata,
            closes vim/vim#10737)
2ebcc35826
This commit is contained in:
zeertzjq
2022-07-15 08:42:36 +08:00
committed by GitHub
parent 75ad050919
commit 072fb55cb0
2 changed files with 15 additions and 5 deletions

View File

@@ -827,6 +827,16 @@ func Test_spell_good_word_invalid()
bwipe!
endfunc
func Test_spell_good_word_slash()
" This caused E1280.
new
norm afoo /
1
norm zG
bwipe!
endfunc
func LoadAffAndDic(aff_contents, dic_contents)
throw 'skipped: Nvim does not support enc=latin1'
set enc=latin1