Age | Commit message (Collapse) | Author |
|
Problem: [security]: overflow in get_number
Solution: Return 0 when the count gets too large
[security]: overflow in get_number
When using the z= command, we may overflow the count with values larger
than MAX_INT. So verify that we do not overflow and in case when an
overflow is detected, simply return 0
Signed-off-by: Christian Brabandt <cb@256bit.org>
|
|
Problem: camel-case spelling has issues with digits
Solution: Improve the camCase spell checking by taking digits
and caps into account
Rewrite the conditions to check for word boundaries by taking into
account the presence of digits and all-caps sequences such as acronyms.
closes: #12644
closes: #12933
Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: LemonBoy <thatlemon@gmail.com>
|
|
Problem: dict-completion does not respect region
Solution: respect selected region in dict completion
Set do_region to zero as we don't want a complete dump of the matching
words, we want the code to filter them according to the user's selected
region.
closes: #12792
closes: #7025
Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: LemonBoy <thatlemon@gmail.com>
|
|
Problem: strlen() called too often for :spellrepall.
Solution: Store the result in a variable. (closes #12497)
|
|
Problem: Line pointer becomes invalid when using spell checking.
Solution: Call ml_get() at the right places. (Luuk van Baal, closes #12456)
|
|
Problem: SpellCap highlight not always updated when needed.
Solution: Handle updating line below closed fold and other situations where
only part of the window is redrawn. (Luuk van Baal, closes #12428,
closes #12420)
|
|
Problem: Using freed memory after SpellFileMissing autocmd uses bwipe.
Solution: Bail out if the window no longer exists.
|
|
Problem: Too many delete() calls in tests.
Solution: Use deferred delete where possible.
|
|
Problem: Bad redrawing with spell checking, using "C" and "$" in 'cpo'.
Solution: Do not redraw the next line when "$" is in 'cpo'. (closes #11285)
|
|
Problem: Spell test fails because error message changed.
Solution: Adjust expected error message.
|
|
Problem: With spell checking, deleting a full stop at the end of a line
does not update SpellCap at the start of the next line.
Solution: Update the next line when characters have been deleted. Also when
using undo.
|
|
Problem: After exiting Insert mode spelling is not checked in the next
line.
Solution: When spelling is enabled redraw the next line after exiting Insert
mode in case the spell highlight needs updating.
|
|
Problem: Spell checking for capital not working with trailing space.
Solution: Do not calculate cap_col at the end of the line. (Christian
Brabandt, closes #10870, issue #10838)
|
|
Problem: "zG" may throw an error if invalid character follows.
Solution: Pass the word length to valid_spell_word(). (Ken Takata,
closes #10737)
|
|
Problem: Spell dump may go beyond end of an array.
Solution: Limit the word length.
|
|
Problem: Spell tests do not always clear the word list.
Solution: Clear the word list in TearDown(). (closes #10659)
|
|
Problem: Invalid memory access when adding word with a control character to
the internal spell word list.
Solution: Disallow adding a word with control characters or a trailing
slash.
|
|
Problem: Using invalid index when looking for spell suggestions.
Solution: Do not decrement the index when it is zero.
|
|
Problem: Spelldump test sometimes hangs.
Solution: Catch the problem of the spell file not being found to avoid
hanging in the download dialog.
|
|
Problem: Spell test fails because of new illegal byte check.
Solution: Remove the test.
|
|
Problem: Typos in tests; one lua line not covered by test.
Solution: Fix typos. Add test case. (Dominique Pellé, closes #9994)
|
|
Problem: "z=" in Visual mode may go beyond the end of the line.
Solution: Adjust "badlen".
|
|
Problem: The timeout limit for spell suggestions is always 5000 milli
seconds.
Solution: Add the "timeout" entry to 'spellsuggest'.
|
|
Problem: Stack corruption when looking for spell suggestions.
Solution: Prevent the depth increased too much. Add a five second time
limit to finding suggestions.
|
|
Problem: E854 is not tested; some spelling suggestions are not tested.
Solution: Add a couple of tests. (Dominique Pellé, closes #9279)
|
|
Problem: Reading uninitialized memory when giving spell suggestions.
Solution: Check that preword is not empty.
|
|
Problem: No test coverage for ":spelldump!".
Solution: Add a test. (Dominique Pellé, closes #7089)
|
|
Problem: Invalid memory use when using SpellFileMissing autocmd.
Solution: Add test case. (Dominique Pellé, closes #7036) Fix using a window
that was closed.
|
|
Problem: Completion with spell checking not tested.
Solution: Add a test case. (Dominique Pellé, closes #7024)
|
|
Problem: Spellfile code not completely tested.
Solution: Add a few more test cases. (Yegappan Lakshmanan, closes #6929)
|
|
Problem: assert_fails() checks the last error message.
Solution: Check the first error, it is more relevant. Fix all the tests
that rely on the old behavior.
|
|
Problem: Spell checking doesn't work for CamelCased words.
Solution: Add the "camel" value in the new option 'spelloptions'.
(closes #1235)
|
|
Problem: Spell test fails.
Solution: Adjust expected text of the prompt.
|
|
Problem: Cannot use "z=" when 'spell' is off.
Solution: Make "z=" work even when 'spell' is off. (Christian Brabandt,
Gary Johnson, closes #6227)
|
|
Problem: Various functions not properly tested.
Solution: Add more tests, especially for failures. (Yegappan Lakshmanan,
closes #5843)
|
|
Problem: Not enough test coverage for evalvars.c.
Solution: Add more tests. (Yegappan Lakshmanan, closes #5804)
|
|
Problem: Tests for spell suggestions are slow.
Solution: Use shorter words. Test with latin1 and utf-8 to cover more code.
(Dominique Pelle, closes #5399)
|
|
Problem: Memory access error when "z=" has no suggestions.
Solution: Check for negative index.
|
|
Problem: Spell suggestions insufficiently tested.
Solution: Add spell suggestion tests. (Dominique Pelle, closes #5398)
|
|
Problem: No test for spell affix file with flag on suffix.
Solution: Add a test case.
|
|
Problem: Spell file flag zero is not recognized.
Solution: Use -1 as an error value, so that zero can be used as a valid flag
number.
|
|
Problem: Spell highlight is wrong at start of the line.
Solution: Fix setting the "v" variable. (closes #5078)
|
|
Problem: MSVC tests fail.
Solution: Replace backslashes with slashes.
|
|
Problem: Using hard coded executable path in test.
Solution: Use v:progpath. Use $VIMRUNTIME instead of "runtime". (James
McCoy, closes #5025)
|
|
Problem: More functions can be used as methods.
Solution: Make various functions usable as a method.
|
|
Problem: Crash when correctly spelled word is very long. (Ben Kraft)
Solution: Check word length before copying. (closes #4778)
|
|
Problem: Some balloon tests don't run when they can.
Solution: Split GUI balloon tests off into a separate file. (Ozaki Kiichi,
closes #4538) Change the feature check into a command for
consistency.
|
|
Problem: Tests are silently skipped.
Solution: Throw an exception for skipped tests in more places.
|
|
Problem: Too strict checking of the 'spellfile' option.
Solution: Allow for a path.
|
|
Problem: May pass weird strings to file name expansion.
Solution: Check for matching characters. Disallow control characters.
|