Patch 8.2.5123
Problem: Using invalid index when looking for spell suggestions.
Solution: Do not decrement the index when it is zero.
Files: src/spellsuggest.c, src/testdir/test_spell.vim
*** ../vim-8.2.5122/src/spellsuggest.c 2022-05-23 12:01:10.937519982 +0100
--- src/spellsuggest.c 2022-06-18 14:06:36.400730777 +0100
***************
*** 1973,1979 ****
sp->ts_isdiff = (newscore != 0)
? DIFF_YES : DIFF_NONE;
}
! else if (sp->ts_isdiff == DIFF_INSERT)
// When inserting trail bytes don't advance in the
// bad word.
--sp->ts_fidx;
--- 1973,1980 ----
sp->ts_isdiff = (newscore != 0)
? DIFF_YES : DIFF_NONE;
}
! else if (sp->ts_isdiff == DIFF_INSERT
! && sp->ts_fidx > 0)
// When inserting trail bytes don't advance in the
// bad word.
--sp->ts_fidx;
*** ../vim-8.2.5122/src/testdir/test_spell.vim 2022-06-15 16:57:39.974855160
+0100
--- src/testdir/test_spell.vim 2022-06-18 14:05:09.768708175 +0100
***************
*** 70,75 ****
--- 70,85 ----
bwipe!
endfunc
+ func Test_z_equal_on_single_character()
+ " this was decrementing the index below zero
+ new
+ norm a0\Ê
+ norm zW
+ norm z=
+
+ bwipe!
+ endfunc
+
" Test spellbadword() with argument
func Test_spellbadword()
set spell
*** ../vim-8.2.5122/src/version.c 2022-06-18 12:51:08.146916429 +0100
--- src/version.c 2022-06-18 14:08:35.096088475 +0100
***************
*** 736,737 ****
--- 736,739 ----
{ /* Add new patch number below this line */
+ /**/
+ 5123,
/**/
--
CART DRIVER: Bring out your dead!
We follow the cart through a wretched, impoverished plague-ridden village.
A few starved mongrels run about in the mud scavenging. In the open
doorway of one house perhaps we jug glimpse a pair of legs dangling from
the ceiling. In another doorway an OLD WOMAN is beating a cat against a
wall rather like one does with a mat. The cart passes round a dead donkey
or cow in the mud. And a MAN tied to a cart is being hammered to death by
four NUNS with huge mallets.
"Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/20220618131050.366E31C12E9%40moolenaar.net.