summaryrefslogtreecommitdiff
path: root/src/search.c
Commit message (Collapse)AuthorAgeFilesLines
* patch 8.2.2465: using freed memory in :psearchv8.2.2465Bram Moolenaar2021-02-031-0/+2
| | | | | Problem: Using freed memory in :psearch. (houyunsong) Solution: Check the current window is still valid. Fix flaky test.
* patch 8.2.2295: incsearch does not detect empty pattern properlyv8.2.2295Bram Moolenaar2021-01-041-1/+1
| | | | | | Problem: Incsearch does not detect empty pattern properly. Solution: Return magic state when skipping over a pattern. (Christian Brabandt, closes #7612, closes #6420)
* patch 8.2.2280: fuzzy matching doesn't give access to the scoresv8.2.2280Bram Moolenaar2021-01-021-6/+25
| | | | | | Problem: Fuzzy matching doesn't give access to the scores. Solution: Return the scores with a third list. (Yegappan Lakshmanan, closes #7596)
* patch 8.2.2182: Vim9: value of 'magic' is still relevantv8.2.2182Bram Moolenaar2020-12-211-5/+8
| | | | | Problem: Vim9: value of 'magic' is still relevant. Solution: Always behave like 'magic' is on in Vim9 script (closes #7509)
* patch 8.2.2160: various typosv8.2.2160Bram Moolenaar2020-12-181-1/+1
| | | | | Problem: Various typos. Solution: Fix spelling mistakes. (closes #7494)
* patch 8.2.1921: fuzzy matching does not recognize path separatorsv8.2.1921Bram Moolenaar2020-10-291-7/+9
| | | | | | Problem: Fuzzy matching does not recognize path separators. Solution: Add a bonus for slash and backslash. (Yegappan Lakshmanan, closes #7225)
* patch 8.2.1898: command modifier parsing always uses global cmdmodv8.2.1898Bram Moolenaar2020-10-241-2/+3
| | | | | Problem: Command modifier parsing always uses global cmdmod. Solution: Pass in cmdmod_T to use. Rename struct fields consistently.
* patch 8.2.1893: fuzzy matching does not support multiple wordsv8.2.1893Bram Moolenaar2020-10-231-41/+130
| | | | | | Problem: Fuzzy matching does not support multiple words. Solution: Add support for matching white space separated words. (Yegappan Lakshmanan, closes #7163)
* patch 8.2.1872: matchfuzzy() does not prefer sequential matchesv8.2.1872Bram Moolenaar2020-10-201-2/+3
| | | | | | Problem: Matchfuzzy() does not prefer sequential matches. Solution: Give sequential matches a higher bonus. (Christian Brabandt, closes #7140)
* patch 8.2.1837: using "gn" after "gN" does not workv8.2.1837Bram Moolenaar2020-10-111-3/+20
| | | | | Problem: Using "gn" after "gN" does not work. Solution: Extend the other end of the Visual area. (closes #7109)
* patch 8.2.1823: "gN" does not select the matched stringv8.2.1823Bram Moolenaar2020-10-101-1/+1
| | | | | Problem: "gN" does not select the matched string. Solution: Move the cursor to the start of the match.
* patch 8.2.1787: crash with 'incsearch' and very long linev8.2.1787Bram Moolenaar2020-10-021-1/+15
| | | | | Problem: Crash with 'incsearch' and very long line. Solution: Check whether regprog becomes NULL. (closes #7063)
* patch 8.2.1728: compiler warning for using uninitialized variablev8.2.1728Bram Moolenaar2020-09-221-1/+1
| | | | | Problem: Compiler warning for using uninitialized variable. (John Marriott) Solution: Initialize "neighbor".
* patch 8.2.1726: fuzzy matching only works on stringsv8.2.1726Bram Moolenaar2020-09-221-135/+385
| | | | | | Problem: Fuzzy matching only works on strings. Solution: Support passing a dict. Add matchfuzzypos() to also get the match positions. (Yegappan Lakshmanan, closes #6947)
* patch 8.2.1665: cannot do fuzzy string matchingv8.2.1665Bram Moolenaar2020-09-111-0/+340
| | | | | Problem: Cannot do fuzzy string matching. Solution: Add matchfuzzy(). (Yegappan Lakshmanan, closes #6932)
* patch 8.2.1620: searchcount() test failsv8.2.1620Bram Moolenaar2020-09-051-1/+1
| | | | | Problem: searchcount() test fails. Solution: Restore default flag value.
* patch 8.2.1614: Vim9: cannot pass "true" to searchcount()v8.2.1614Bram Moolenaar2020-09-051-8/+2
| | | | | Problem: Vim9: cannot pass "true" to searchcount(). Solution: Use tv_get_bool_chk(). (closes #6854)
* patch 8.2.1364: invalid memory access when searching for raw stringv8.2.1364Bram Moolenaar2020-08-041-2/+2
| | | | | Problem: Invalid memory access when searching for raw string. Solution: Check for delimiter match before following quote. (closes #6578)
* patch 8.2.0967: unnecessary type casts for vim_strnsave()v8.2.0967Bram Moolenaar2020-06-121-1/+1
| | | | | Problem: Unnecessary type casts for vim_strnsave(). Solution: Remove the type casts.
* patch 8.2.0902: using searchcount() in 'statusline' causes an errorv8.2.0902Bram Moolenaar2020-06-041-7/+8
| | | | | | Problem: Using searchcount() in 'statusline' causes an error. Solution: Avoid saving/restoring the search patten recursively. (closes #6194)
* patch 8.2.0896: crash when calling searchcount() with a stringv8.2.0896Bram Moolenaar2020-06-031-2/+8
| | | | | Problem: Crash when calling searchcount() with a string. Solution: Check the argument is a dict. (closes #6192)
* patch 8.2.0887: searchcount().exact_match is 1 right after a matchv8.2.0887Bram Moolenaar2020-06-021-1/+1
| | | | | Problem: Searchcount().exact_match is 1 right after a match. Solution: Use LT_POS() instead of LTOREQ_POS(). (closes #6189)
* patch 8.2.0884: searchcount() test fails on slower systemsv8.2.0884Bram Moolenaar2020-06-011-1/+1
| | | | | Problem: Searchcount() test fails on slower systems. Solution: Set a longer timeout.
* patch 8.2.0880: leaking memory when using searchcount()v8.2.0880Bram Moolenaar2020-06-011-0/+1
| | | | | Problem: Leaking memory when using searchcount(). Solution: Free the last used search pattern.
* patch 8.2.0879: compiler warning for unused function argumentv8.2.0879Bram Moolenaar2020-06-011-1/+1
| | | | | Problem: Compiler warning for unused function argument. Solution: Add UNUSED.
* patch 8.2.0877: cannot get the search statisticsv8.2.0877Bram Moolenaar2020-06-011-78/+283
| | | | | Problem: Cannot get the search statistics. Solution: Add the searchcount() function. (Fujiwara Takuya, closes #4446)
* patch 8.2.0840: search match count wrong when only match is in foldv8.2.0840Bram Moolenaar2020-05-291-1/+6
| | | | | | Problem: Search match count wrong when only match is in fold. Solution: Update search stats when in a closed fold. (Christian Brabandt, closes #6160, closes #6152)
* patch 8.2.0660: the search.c file is a bit bigv8.2.0660Bram Moolenaar2020-04-291-1951/+0
| | | | | | Problem: The search.c file is a bit big. Solution: Split off the text object code to a separate file. (Yegappan Lakshmanan, closes #6007)
* patch 8.2.0559: clearing a struct is verbosev8.2.0559Bram Moolenaar2020-04-121-1/+1
| | | | | Problem: Clearing a struct is verbose. Solution: Define and use CLEAR_FIELD() and CLEAR_POINTER().
* patch 8.2.0544: memory leak in search testv8.2.0544Bram Moolenaar2020-04-111-0/+1
| | | | | Problem: Memory leak in search test. Solution: Free msgbuf. (Dominique Pelle, closes #5912)
* patch 8.2.0502: Vim9: some code is not testedv8.2.0502Bram Moolenaar2020-04-021-1/+1
| | | | | Problem: Vim9: some code is not tested. Solution: Add more tests. Fix uncovered problems.
* patch 8.2.0295: highlighting for :s wrong when using different separatorv8.2.0295Bram Moolenaar2020-02-211-4/+6
| | | | | | Problem: Highlighting for :s wrong when using different separator. Solution: Use separat argument for search direction and separator. (Rob Pilling, closes #5665)
* patch 8.2.0250: test_clear_search_pat() is unusedv8.2.0250Bram Moolenaar2020-02-121-6/+0
| | | | | Problem: test_clear_search_pat() is unused. Solution: Remove the function. (Yegappan Lakshmanan, closes #5624)
* patch 8.2.0212: missing search/substitute pattern hardly testedv8.2.0212Bram Moolenaar2020-02-051-0/+6
| | | | | | Problem: Missing search/substitute pattern hardly tested. Solution: Add test_clear_search_pat() and tests. (Yegappan Lakshmanan, closes #5579)
* patch 8.2.0035: saving and restoring called_emsg is clumsyv8.2.0035Bram Moolenaar2019-12-231-11/+7
| | | | | Problem: Saving and restoring called_emsg is clumsy. Solution: Count the number of error messages.
* patch 8.1.2394: using old C style commentsv8.1.2394Bram Moolenaar2019-12-051-487/+485
| | | | | Problem: Using old C style comments. Solution: Use // comments where appropriate.
* patch 8.1.2371: FEAT_TEXT_PROP is a confusing namev8.1.2371Bram Moolenaar2019-11-301-2/+2
| | | | | Problem: FEAT_TEXT_PROP is a confusing name. Solution: Use FEAT_PROP_POPUP. (Naruhiko Nishino, closes #5291)
* patch 8.1.2332: missing file in refactoringv8.1.2332Bram Moolenaar2019-11-211-0/+96
| | | | | Problem: Missing file in refactoring. Solution: Update missing file.
* patch 8.1.2330: vi' does not always work when 'selection' is exclusivev8.1.2330Bram Moolenaar2019-11-211-7/+20
| | | | | Problem: vi' does not always work when 'selection' is exclusive. Solution: Adjust start position.
* patch 8.1.2314: vi' sometimes does not select anythingv8.1.2314Bram Moolenaar2019-11-171-2/+3
| | | | | Problem: vi' sometimes does not select anything. Solution: Recognize an empty selection. (Christian Brabandt, closes #5183)
* patch 8.1.2313: debugging where a delay comes from is not easyv8.1.2313Bram Moolenaar2019-11-171-2/+2
| | | | | Problem: Debugging where a delay comes from is not easy. Solution: Use different values when calling ui_delay().
* patch 8.1.2244: 'wrapscan' is not used for "gn"v8.1.2244Bram Moolenaar2019-11-021-8/+6
| | | | | Problem: 'wrapscan' is not used for "gn". Solution: Only reset 'wrapscan' for the first search round. (closes #5164)
* patch 8.1.2218: "gN" is off by one in Visual modev8.1.2218Bram Moolenaar2019-10-261-2/+2
| | | | | Problem: "gN" is off by one in Visual mode. Solution: Check moving forward. (Christian Brabandt, #5075)
* patch 8.1.2207: "gn" doesn't work quite rightv8.1.2207Bram Moolenaar2019-10-241-92/+78
| | | | | | Problem: "gn" doesn't work quite right. (Jaehwang Jerry Jung) Solution: Improve and simplify the search logic. (Christian Brabandt, closes #5103, closes #5075)
* patch 8.1.2178: accessing uninitialized memory in testv8.1.2178Bram Moolenaar2019-10-191-3/+4
| | | | | | Problem: Accessing uninitialized memory in test. Solution: Check if there was a match before using the match position. (Dominique Pelle, closes #5088)
* patch 8.1.2173: searchit() has too many argumentsv8.1.2173Bram Moolenaar2019-10-181-14/+26
| | | | | Problem: Searchit() has too many arguments. Solution: Move optional arguments to a struct. Add the "wrapped" argument.
* patch 8.1.2126: viminfo not sufficiently testedv8.1.2126Bram Moolenaar2019-10-091-0/+6
| | | | | | Problem: Viminfo not sufficiently tested. Solution: Add more test cases. Clean up comments. (Yegappan Lakshmanan, closes #5032)
* patch 8.1.2120: some MB_ macros are more complicated than necessaryv8.1.2120Bram Moolenaar2019-10-061-4/+4
| | | | | | Problem: Some MB_ macros are more complicated than necessary. (Dominique Pelle) Solution: Simplify the macros. Expand inline.
* patch 8.1.2096: too many #ifdefsv8.1.2096Bram Moolenaar2019-09-281-2/+0
| | | | | Problem: Too many #ifdefs. Solution: Graduate FEAT_COMMENTS.
* patch 8.1.2062: the mouse code is spread outv8.1.2062Bram Moolenaar2019-09-211-2/+0
| | | | | | Problem: The mouse code is spread out. Solution: Move all the mouse code to mouse.c. (Yegappan Lakshmanan, closes #4959)