Mercurial > vim
comparison src/testdir/test_spell.vim @ 29208:b8dc0a76911e v8.2.5123
patch 8.2.5123: using invalid index when looking for spell suggestions
Commit: https://github.com/vim/vim/commit/156d3911952d73b03d7420dc3540215247db0fe8
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Jun 18 14:09:08 2022 +0100
patch 8.2.5123: using invalid index when looking for spell suggestions
Problem: Using invalid index when looking for spell suggestions.
Solution: Do not decrement the index when it is zero.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 18 Jun 2022 15:15:04 +0200 |
parents | a3564c0c9e06 |
children | f4ff490d51a7 |
comparison
equal
deleted
inserted
replaced
29207:d0bec8ebee71 | 29208:b8dc0a76911e |
---|---|
65 split | 65 split |
66 set spell | 66 set spell |
67 call setline(1, "\xff") | 67 call setline(1, "\xff") |
68 norm z= | 68 norm z= |
69 set nospell | 69 set nospell |
70 bwipe! | |
71 endfunc | |
72 | |
73 func Test_z_equal_on_single_character() | |
74 " this was decrementing the index below zero | |
75 new | |
76 norm a0\Ê | |
77 norm zW | |
78 norm z= | |
79 | |
70 bwipe! | 80 bwipe! |
71 endfunc | 81 endfunc |
72 | 82 |
73 " Test spellbadword() with argument | 83 " Test spellbadword() with argument |
74 func Test_spellbadword() | 84 func Test_spellbadword() |