aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/search.c
Commit message (Collapse)AuthorAge
* refactor: format files with uncrustify #15607dundargoc2021-09-10
|
* refactor: replace TRUE/FALSE with true/false #15425dundargoc2021-08-22
|
* refactor: replace TRUE/FALSE with true/falseDundar Göc2021-08-12
|
* refactor: replace TRUE/FALSE with true/falseDundar Göc2021-07-30
|
* refactor: replace TRUE/FALSE with true/falseDundar Göc2021-07-26
| | | | Focus is on global variables.
* chore(PVS/V768): don't use enum as bool.Dundar Göc2021-07-19
|
* chore: use codespell to spell check #15016dundargoc2021-07-07
|
* STRLEN -> strlenshadmansaleh2021-05-09
|
* Use bool for boolean valuesshadmansaleh2021-05-09
|
* vim-patch:8.2.0896: crash when calling searchcount() with a stringshadmansaleh2021-05-09
| | | | | | Problem: Crash when calling searchcount() with a string. Solution: Check the argument is a dict. (closes vim/vim#6192) https://github.com/vim/vim/commit/14681627f39421cce289345d4ec9927c10fa3b1c
* vim-patch:8.2.0887: searchcount().exact_match is 1 right after a matchshadmansaleh2021-05-09
| | | | | | Problem: Searchcount().exact_match is 1 right after a match. Solution: Use LT_POS() instead of LTOREQ_POS(). (closes vim/vim#6189) https://github.com/vim/vim/commit/57f75a5a364ad4d8334fdf6b6b41420b48e08390
* vim-patch:8.2.0880: leaking memory when using searchcount()shadmansaleh2021-05-09
| | | | | | Problem: Leaking memory when using searchcount(). Solution: Free the last used search pattern. https://github.com/vim/vim/commit/109aece79d1b5f14f6a84ff2ac068cfffebeba80
* vim-patch:8.2.0877: cannot get the search statisticsshadmansaleh2021-05-09
| | | | | | | | | | | | Problem: Cannot get the search statistics. Solution: Add the searchcount() function. (Fujiwara Takuya, closes vim/vim#4446) https://github.com/vim/vim/commit/e8f5ec0d30b629d7166f0ad03434065d8bc822df Additional changes: - Tests weren't passing because the test ran assuming the cursor was at start of buffer but append() left the cursor at end of buffer . So cursor is moved to start of buffer after append. - searchcount() added to list of builtin functions.
* vim-patch:8.1.2313: debugging where a delay comes from is not easyJan Edmund Lazo2021-04-15
| | | | | | Problem: Debugging where a delay comes from is not easy. Solution: Use different values when calling ui_delay(). https://github.com/vim/vim/commit/eda1da0c9a8db1400649629117e7d248c07735f7
* vim-patch:8.2.0295: highlighting for :s wrong when using different separator ↵Ghjuvan Lacambre2021-04-04
| | | | | | | | (#14286) Problem: Highlighting for :s wrong when using different separator. Solution: Use separat argument for search direction and separator. (Rob Pilling, closes vim/vim#5665) https://github.com/vim/vim/commit/c036e87bd7001238ab7cc5d9e30e59bbf989a5fd
* vim-patch:8.2.2694: when 'matchpairs' is empty every character beeps (#14279)Jan Edmund Lazo2021-04-03
| | | | | | Problem: When 'matchpairs' is empty every character beeps. (Marco Hinz) Solution: Bail out when no character in 'matchpairs' was found. (closes vim/vim#8053) Add assert_nobeep(). https://github.com/vim/vim/commit/5b8cabfef7c3707f3e53e13844d90e5a217e1e84
* pos: define MAXCOL to INT_MAXJan Edmund Lazo2021-02-23
| | | | | Partial port of patch v8.1.0953. Remove useless casts on MAXCOL.
* vim-patch:8.2.2361: Vim9: no highlight for "s///gc" when using 'opfunc'Jan Edmund Lazo2021-01-17
| | | | | | Problem: Vim9: no highlight for "s///gc" when using 'opfunc'. Solution: Reset 'lazyredraw' temporarily. (closes vim/vim#7687) https://github.com/vim/vim/commit/7c886db915035bc064ca307f02c34ae9d99cc733
* vim-patch:8.2.1907: complete_info().selected may be wrongJan Edmund Lazo2020-12-03
| | | | | | | | | | | | | Problem: Complete_info().selected may be wrong. Solution: Update cp_number if it was never set. (issue vim/vim#6945) https://github.com/vim/vim/commit/f9d51354de069dddc049b9e109b1932c92e5aee6 Misc changes: For variables and function parameters that use "Direction" enum values, update their type from from "int" to "Direction". It is hard to review function parameters that must accept "Direction" enum values only.
* vim-patch:8.1.2332: missing file in refactoringJan Edmund Lazo2020-11-22
| | | | | | Problem: Missing file in refactoring. Solution: Update missing file. https://github.com/vim/vim/commit/556ae8ea28b4e3e9fc47ad130795009a3080146e
* vim-patch:8.1.0810: too many #ifdefsJan Edmund Lazo2020-11-12
| | | | | | Problem: Too many #ifdefs. Solution: Graduate FEAT_MBYTE, part 4. https://github.com/vim/vim/commit/264b74fa545edfb92c0d7d08a02c26331cc5b168
* api: add API for themesBjörn Linse2020-11-01
| | | | | | | | | | co-author: hlpr98 <hlpr98@gmail.com> (dict2hlattrs function) orange is sus?? NOVEMBER DAWN erase the lie that is redraw_later()
* vim-patch:8.2.1850: "vat" does not select tags correctly over line breakJan Edmund Lazo2020-10-15
| | | | | | | | | | | Problem: "vat" does not select tags correctly over line break. Solution: Adjust the search pattern. (Aufar Gilbran, closes vim/vim#7136) https://github.com/vim/vim/commit/a604ccc959c3bff88d3d5bc3c965819fc326d239 Use 'const char*' for spat,mpat,epat params of do_searchpair() to reduce (char_u *) casts. Cherry-pick Test_string_html_objects() changes from patch 8.2.0655.
* vim-patch:8.2.1837: using "gn" after "gN" does not workJan Edmund Lazo2020-10-11
| | | | | | | | | | | | | | | Problem: Using "gn" after "gN" does not work. Solution: Extend the other end of the Visual area. (closes vim/vim#7109) https://github.com/vim/vim/commit/c07b7f701fb30d26112051e4ec737c7e3db72357 N/A patches for version.c: vim-patch:8.2.1834: PyEval_InitThreads() is deprecated in Python 3.9 Problem: PyEval_InitThreads() is deprecated in Python 3.9. Solution: Do not call PyEval_InitThreads in Python 3.9 and later. (Ken Takata, closes vim/vim#7113) Avoid warnings for functions. https://github.com/vim/vim/commit/efc0d94afc48a03b07955e91315e7e67945cd079
* vim-patch:8.2.1823: "gN" does not select the matched stringJan Edmund Lazo2020-10-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: "gN" does not select the matched string. Solution: Move the cursor to the start of the match. https://github.com/vim/vim/commit/28f224b2c1bd2fcdee7b4fe2c64826e1cff08f39 N/A patches for version.c: vim-patch:8.2.1820: Vim9: crash when error happens in timer callback Problem: Vim9: crash when error happens in timer callback. Solution: Check that current_exception is not NULL. (closes vim/vim#7100) https://github.com/vim/vim/commit/820d55a50bbc8c0ad0505b7e4302a734896b6bab vim-patch:8.2.1829: warnings when executing Github actions Problem: Warnings when executing Github actions. Solution: Use another method to set environment variables. (Ken Takata, closes vim/vim#7107) https://github.com/vim/vim/commit/bd6428b9e79ed85b54ea7eaa11871fa09d63ab6f vim-patch:8.2.1830: MS-Windows: Python3 issue with stdin Problem: MS-Windows: Python3 issue with stdin. Solution: Check if stdin is readable. (Ken Takata, closes vim/vim#7106) https://github.com/vim/vim/commit/c6ed254d9fda0ff54cdedce5597ff3e0d0218d18 vim-patch:8.2.1831: file missing from distribution Problem: File missing from distribution. Solution: Add the github code analyses file. https://github.com/vim/vim/commit/ef16c90423ae579927e6294c1ccfd17c5a1c113c
* vim-patch:8.2.1787: crash with 'incsearch' and very long lineJan Edmund Lazo2020-10-02
| | | | | | | | | | | | | | Problem: Crash with 'incsearch' and very long line. Solution: Check whether regprog becomes NULL. (closes vim/vim#7063) https://github.com/vim/vim/commit/795aaa1e84d76a6fe066694de9876b8a21cbe40c N/A patches for version.c: vim-patch:8.2.1784: commits are not scanned for security problems Problem: commits are not scanned for security problems Solution: Enable Github code scanning. (Christian Brabandt, closes vim/vim#7057) https://github.com/vim/vim/commit/fa79be6b10e1d34fd697a56e85f6c0ce101f3d62
* vim-patch:8.2.0840: search match count wrong when only match is in foldJan Edmund Lazo2020-09-29
| | | | | | | Problem: Search match count wrong when only match is in fold. Solution: Update search stats when in a closed fold. (Christian Brabandt, closes vim/vim#6160, closes vim/vim#6152) https://github.com/vim/vim/commit/6cb0726215519fe94103803e4aa77a355384bcf2
* vim-patch:8.1.1992: the search stat moves when wrapping at the end of the bufferJan Edmund Lazo2020-09-29
| | | | | | Problem: The search stat moves when wrapping at the end of the buffer. Solution: Put the "W" in front instead of at the end. https://github.com/vim/vim/commit/16b58ae9f36e9675c34d942f5d5f8c8a7914dbc4
* vim-patch:8.1.1970: search stat space wrong, no test for 8.1.1965Jan Edmund Lazo2020-09-29
| | | | | | Problem: Search stat space wrong, no test for 8.1.1965. Solution: Fix check for cmd_silent. Add a test. (Christian Brabandt) https://github.com/vim/vim/commit/19e8ac72e9c17b894a9c74cb8f70feb33567033c
* vim-patch:8.1.1965: search count message is not displayed when using a mappingJan Edmund Lazo2020-09-29
| | | | | | | | Problem: The search count message is not displayed when using a mapping. (Gary Johnson) Solution: Ignore cmd_silent for showing the search count. (Christian Brabandt) https://github.com/vim/vim/commit/359ad1a6f92d0d3b4b942ea003fb02dc57bbfc9e
* vim-patch:8.2.0902: using searchcount() in 'statusline' causes an errorJan Edmund Lazo2020-09-13
| | | | | | | Problem: Using searchcount() in 'statusline' causes an error. Solution: Avoid saving/restoring the search patten recursively. (closes vim/vim#6194) https://github.com/vim/vim/commit/442a85369f3eb9834dbab42add45f7c4106700f4
* vim-patch:8.1.0556: saving/restoring search patterns share saved last_idxJan Edmund Lazo2020-09-13
| | | | | | | Problem: Saving/restoring search patterns share saved last_idx. Solution: Use a separate saved last_idx for saving search patterns for functions and incremental search. https://github.com/vim/vim/commit/ed8bc78d2386d22656ba1d3e5cf739dd12964dce
* vim-patch:8.1.0555: crash when last search pat is set but not last ↵Jan Edmund Lazo2020-09-13
| | | | | | | | | substitute pat Problem: Crash when last search pat is set but not last substitute pat. Solution: Do not mix up last search pattern and last subtitute pattern. (closes vim/vim#3647) https://github.com/vim/vim/commit/2fb8f684d888ad68b283ba8f9505106b5fb725be
* vim-patch:8.1.0552: saved last search pattern may not be restoredAufar Gilbran2020-09-11
| | | | | | | Problem: Saved last search pattern may not be restored. Solution: Call restore_last_search_pattern(). Add a check for balancing saving and restoring the last search pattern. https://github.com/vim/vim/commit/01a060da74b756b161e595b39a7877cb7612120a
* vim-patch:8.2.1364: invalid memory access when searching for raw stringJan Edmund Lazo2020-08-14
| | | | | | Problem: Invalid memory access when searching for raw string. Solution: Check for delimiter match before following quote. (closes vim/vim#6578) https://github.com/vim/vim/commit/282f9c64e570e832d3eba12950da15c9f1a40f06
* vim-patch:8.2.0999: moving to next sentence gets stuck on quoteJan Edmund Lazo2020-06-18
| | | | | | | Problem: Moving to next sentence gets stuck on quote. Solution: When moving to the next sentence doesn't result in moving, advance a character and try again. (closes vim/vim#6291) https://github.com/vim/vim/commit/2f03e5a0a9cfaabb01c57dd3348a05e86c26623c
* vim-patch:8.2.0544: memory leak in search testJan Edmund Lazo2020-04-13
| | | | | | Problem: Memory leak in search test. Solution: Free msgbuf. (Dominique Pelle, closes vim/vim#5912) https://github.com/vim/vim/commit/880e4d9117ea990e66d867aefad0f73ba89bda82
* vim-patch:8.1.0864 Make 'scrolloff' and 'sidescrolloff' options window local ↵Will Eccles2020-03-17
| | | | | | | | | | (#11854) Problem: cannot have a local value for 'scrolloff' and 'sidescrolloff' Author: Bram Moolenar https://github.com/vim/vim/commit/375e3390078e740d3c83b0c118c50d9a920036c7
* search: fix pvs/v1048Jan Edmund Lazo2019-12-26
|
* vim-patch:8.1.2330: vi' does not always work when 'selection' is exclusiveJan Edmund Lazo2019-11-22
| | | | | | Problem: vi' does not always work when 'selection' is exclusive. Solution: Adjust start position. https://github.com/vim/vim/commit/94d9f4fa65bce6f116cf89bfdabdf5a06509056f
* vim-patch:8.1.2314: vi' sometimes does not select anythingJan Edmund Lazo2019-11-17
| | | | | | Problem: vi' sometimes does not select anything. Solution: Recognize an empty selection. (Christian Brabandt, closes vim/vim#5183) https://github.com/vim/vim/commit/7170b295b06e3168424985530d8477ed2e058b67
* vim-patch:8.1.2244: 'wrapscan' is not used for "gn"Jan Edmund Lazo2019-11-09
| | | | | | Problem: 'wrapscan' is not used for "gn". Solution: Only reset 'wrapscan' for the first search round. (closes vim/vim#5164) https://github.com/vim/vim/commit/82cf7f6df751505da285815a791463a049587849
* vim-patch:8.1.2218: "gN" is off by one in Visual modeJaehwang Jerry Jung2019-10-27
| | | | | | Problem: "gN" is off by one in Visual mode. Solution: Check moving forward. (Christian Brabandt, vim/vim#5075) https://github.com/vim/vim/commit/453c19257f6d97904ec2e3823e88e63c983f2f9a
* vim-patch:8.1.2207: "gn" doesn't work quite rightJaehwang Jerry Jung2019-10-27
| | | | | | | Problem: "gn" doesn't work quite right. (Jaehwang Jerry Jung) Solution: Improve and simplify the search logic. (Christian Brabandt, closes vim/vim#5103, closes vim/vim#5075) https://github.com/vim/vim/commit/edaad6e0a0e3c1fcb6a5c2771e647c52475bb19c
* vim-patch:8.1.2173: searchit() has too many argumentsJaehwang Jerry Jung2019-10-27
| | | | | | Problem: Searchit() has too many arguments. Solution: Move optional arguments to a struct. Add the "wrapped" argument. https://github.com/vim/vim/commit/92ea26b925a0835badb0af2d5887238a4198cabb
* vim-patch:8.1.2178: accessing uninitialized memory in testJan Edmund Lazo2019-10-19
| | | | | | | Problem: Accessing uninitialized memory in test. Solution: Check if there was a match before using the match position. (Dominique Pelle, closes vim/vim#5088) https://github.com/vim/vim/commit/15ee567809a9808693163dd7c357ef0c172ecc9e
* vim-patch:8.1.2120: some MB_ macros are more complicated than necessaryJan Edmund Lazo2019-10-06
| | | | | | | Problem: Some MB_ macros are more complicated than necessary. (Dominique Pelle) Solution: Simplify the macros. Expand inline. https://github.com/vim/vim/commit/1614a14901558ca091329315d14a7d5e1b53aa47
* vim-patch:8.1.1371: cannot recover from a swap file #11081Jurica Bradarić2019-10-05
| | | | | | | Problem: Cannot recover from a swap file. Solution: Do not expand environment variables in the swap file name. Do not check the extension when we already know a file is a swap file. (Ken Takata, closes 4415, closes vim/vim#4369) https://github.com/vim/vim/commit/99499b1c05f85f83876b828eea3f6e14f0f407b4
* vim-patch:8.0.1768: SET_NO_HLSEARCH() used in a wrong wayJan Edmund Lazo2019-09-02
| | | | | | | Problem: SET_NO_HLSEARCH() used in a wrong way. Solution: Make it a function. (suggested by Dominique Pelle, closes vim/vim#2850) https://github.com/vim/vim/commit/451fc7b954906069f1830a8092ad85616049a828
* vim-patch:8.1.1124: insert completion flags are mixed upJan Edmund Lazo2019-08-21
| | | | | | Problem: Insert completion flags are mixed up. Solution: Clean up flags use of ins_compl_add() and cp_flags. https://github.com/vim/vim/commit/d9eefe3155277cec71105f52d34a76f7a3237e7f