summaryrefslogtreecommitdiffstats
path: root/src/testdir/test_ins_complete.vim
AgeCommit message (Collapse)Author
2023-11-04patch 9.0.2090: complete_info() skips entries with 'noselect'v9.0.2090Christian Brabandt
Problem: complete_info() skips entries with 'noselect' Solution: Check, if first entry is at original text state Unfortunately, Commit daef8c74375141974d61b85199b383017644978c introduced a regression, that when ':set completeopt+=noselect' is set and no completion item has been selected yet, it did not fill the complete_info['items'] list. This happened, because the current match item did not have the CP_ORIGINAL_TEXT flag set and then the cp->prev pointer did point to the original flag item, which caused the following while loop to not being run but being skipped instead. So when the 'noselect' is set, only start with to the previous selection item, if the initial completion item has the CP_ORIGINAL_TEXT flag set, else use the 2nd previous item instead. fixes: #13451 closes: #13452 Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-27patch 9.0.2077: CI fails because of trailing whitespace in testv9.0.2077Christian Brabandt
Problem: CI fails because of trailing whitespace in test Solution: Remove it Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-27patch 9.0.2074: Completion menu may be wrongv9.0.2074Christian Brabandt
Problem: Completion menu may be wrong Solution: Check for the original direction of the completion menu, add more tests, make it work with 'noselect' completion: move in right direction when filling completion_info() When moving through the insert completion menu and switching directions, we need to make sure we start at the correct position in the list and move correctly forward/backwards through it, so that we do not skip entries and the selected item points to the correct entry in the list of completion entries generated by the completion_info() function. The general case is this: 1) CTRL-X CTRL-N, we will traverse the list starting from compl_first_match and then go forwards (using the cp->next pointer) through the list (skipping the very first entry, which has the CP_ORIGINAL_TEXT flag set (since that is the empty/non-selected entry 2) CTRL-X CTRL-P, we will traverse the list starting from compl_first_match (which now points to the last entry). The previous entry will have the CP_ORIGINAL_TEXT flag set, so we need to start traversing the list from the second prev pointer. There are in fact 2 special cases after starting the completion menu with CTRL-X: 3) CTRL-N and then going backwards by pressing CTRL-P again. compl_first_match will point to the same entry as in step 1 above, but since compl_dir_foward() has been switched by pressing CTRL-P to backwards we need to pretend to be in still in case 1 and still traverse the list in forward direction using the cp_next pointer 4) CTRL-P and then going forwards by pressing CTRL-N again. compl_first_match will point to the same entry as in step 2 above, but since compl_dir_foward() has been switched by pressing CTRL-N to forwards we need to pretend to be in still in case 2 and still traverse the list in backward direction using the cp_prev pointer For the 'noselect' case however, this is slightly different again. When going backwards, we only need to go one cp_prev pointer back. And resting of the direction works again slightly different. So we need to take the noselect option into account when deciding in which direction to iterate through the list of matches. related: #13402 related: #12971 closes: #13408 Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-17patch 9.0.2039: completion shows current word after completion restartv9.0.2039nwounkn
Problem: completion shows current word after completion restart Solution: remove the word being completed after completion restart The word being completed is shown in a completion list after completion restart, because it isn't removed from the current buffer before searching for matches. Also adjust `Test_complete_add_onechar` to match the new behavior. closes: #13349 Signed-off-by: Christian Brabandt <cb@256bit.org> Co-authored-by: nwounkn <nwounkn@gmail.com>
2023-10-11patch 9.0.2018: complete_info() returns wrong indexv9.0.2018LemonBoy
Problem: complete_info() returns wrong index Solution: Make order of 'info' in completion_info consistent Start the iteration from the same point and follow the same direction as done when assigning the completion numbers. This way we remove the dependence on the completion direction and make the order of 'info' consistent. closes: #12230 closes: #12971 Signed-off-by: Christian Brabandt <cb@256bit.org> Co-authored-by: LemonBoy <thatlemon@gmail.com>
2023-03-31patch 9.0.1432: completion popup in wrong position with virtual text "above"v9.0.1432Bram Moolenaar
Problem: Completion popup in wrong position with virtual text "above". Solution: Adjust the column. (closes #12210)
2023-03-02patch 9.0.1371: ballooneval interferes with Insert completionv9.0.1371zeertzjq
Problem: Ballooneval interferes with Insert completion. Solution: Ignore mouse-move events when completing. (closes #12094, closes #12092)
2023-01-28patch 9.0.1257: code style is not check in test scriptsv9.0.1257Bram Moolenaar
Problem: Code style is not check in test scripts. Solution: Add basic code style check for test files.
2022-12-15patch 9.0.1062: some test function names do not match what they are doingv9.0.1062zeertzjq
Problem: Some test function names do not match what they are doing. Solution: Leave out user data for the test that is called "NoUserData". (closes #11703)
2022-09-29patch 9.0.0625: too many delete() calls in testsv9.0.0625Bram Moolenaar
Problem: Too many delete() calls in tests. Solution: Use deferred delete where possible.
2022-09-24patch 9.0.0579: using freed memory when 'tagfunc' wipes out bufferv9.0.0579Bram Moolenaar
Problem: Using freed memory when 'tagfunc' wipes out buffer that holds 'complete'. Solution: Make a copy of the option. Make sure cursor position is valid.
2022-09-24patch 9.0.0572: insert complete tests leave a mapping behindv9.0.0572zeertzjq
Problem: Insert complete tests leave a mapping behind. Solution: Use a buffer-local mapping. (closes #11211)
2022-09-24patch 9.0.0567: 'completeopt' "longest" is not used for complete()v9.0.0567bfredl
Problem: 'completeopt' "longest" is not used for complete(). Solution: Also use "longest" for complete(). (Bjorn Linse, closes #11206)
2022-09-02patch 9.0.0363: common names in test files causes tests to be flakyv9.0.0363Bram Moolenaar
Problem: Common names in test files causes tests to be flaky. Solution: Use more specific names.
2022-09-01patch 9.0.0345: error message for list argument could be clearerv9.0.0345Bram Moolenaar
Problem: Error message for list argument could be clearer. Solution: Include the argument number. (Yegappan Lakshmanan, closes #11027)
2022-08-29patch 9.0.0325: MS-Windows: completion test failsv9.0.0325Bram Moolenaar
Problem: MS-Windows: completion test fails. Solution: Adjust directory prefix.
2022-08-29patch 9.0.0323: using common name in tests leads to flaky testsv9.0.0323Bram Moolenaar
Problem: Using common name in tests leads to flaky tests. Solution: Rename files and directories to be more specific.
2022-07-31patch 9.0.0118: no test for what patch 9.0.0155 fixesv9.0.0118zeertzjq
Problem: No test for what patch 9.0.0155 fixes. Solution: Add a test. Fix typos. (closes #10822)
2022-07-28patch 9.0.0102: reading past end of line with insert mode completionv9.0.0102Bram Moolenaar
Problem: Reading past end of line with insert mode completion. Solution: Check text length.
2022-07-27patch 9.0.0092: plugins cannot change v:completed_itemv9.0.0092Shougo Matsushita
Problem: Plugins cannot change v:completed_item. Solution: Make v:completed_item writeable. (Shougo Matsushita, closes #10801)
2022-07-23patch 9.0.0060: accessing uninitialized memory when completing long linev9.0.0060Bram Moolenaar
Problem: Accessing uninitialized memory when completing long line. Solution: Terminate string with NUL.
2022-07-07patch 9.0.0046: reading past end of completion with duplicate matchv9.0.0046Bram Moolenaar
Problem: Reading past end of completion with duplicate match. Solution: Check string length
2022-07-07patch 9.0.0045: reading past end of completion with a long linev9.0.0045Bram Moolenaar
Problem: Reading past end of completion with a long line and 'infercase' set. Solution: Allocate the string if needed.
2022-07-02patch 9.0.0027: the command line test is getting quite bigv9.0.0027Bram Moolenaar
Problem: The command line test is getting quite big. Solution: Move command line window tests to a separate file.
2022-07-01patch 9.0.0020: with some completion reading past end of stringv9.0.0020Bram Moolenaar
Problem: With some completion reading past end of string. Solution: Check the length of the string.
2022-05-27patch 8.2.5029: "textlock" is always zerov8.2.5029zeertzjq
Problem: "textlock" is always zero. Solution: Remove "textlock" and rename "textwinlock" to "textlock". (closes #10489)
2022-05-26patch 8.2.5022: 'completefunc'/'omnifunc' error does not end completionv8.2.5022LemonBoy
Problem: 'completefunc'/'omnifunc' error does not end completion. Solution: Check if there was an error or exception. (closes #10486, closes #4218)
2022-05-04patch 8.2.4865: :startinsert right after :stopinsert may not workv8.2.4865zeertzjq
Problem: :startinsert right after :stopinsert does not work when popup menu is still visible. Solution: Use ins_compl_active() instead of pum_visible(). (closes #10352)
2022-04-07patch 8.2.4710: smart indenting does not work after completionv8.2.4710Christian Brabandt
Problem: Smart indenting does not work after completion. Solution: Set "can_si". (Christian Brabandt, closes #10113, closes #558)
2022-03-04patch 8.2.4502: in the GUI a modifier is not recognized after CTRL-Xv8.2.4502Bram Moolenaar
Problem: In the GUI a modifier is not recognized for the key typed after CTRL-X, which may result in a mapping to be used. (Daniel Steinberg) Solution: Recognize a modifier starting with CSI. (closes #9889)
2022-03-03patch 8.2.4497: wrong color for half of wide character next to pum scrollbarv8.2.4497Bram Moolenaar
Problem: Wrong color for half of wide character next to pum scrollbar. Solution: Redraw the screen cell with the right color. (closes #9874)
2022-02-18patch 8.2.4416: Vim9: using a script-local function requires using "s:"v8.2.4416Bram Moolenaar
Problem: Vim9: using a script-local function requires using "s:" when setting 'completefunc'. Solution: Do not require "s:" in Vim9 script. (closes #9796)
2022-02-12patch 8.2.4361: Vim9: some tests failv8.2.4361Bram Moolenaar
Problem: Vim9: some tests fail. Solution: Fix the tests, mostly by removing "s:".
2022-01-30patch 8.2.4265: autoload tests failsv8.2.4265Bram Moolenaar
Problem: Autoload tests fails. Solution: Use export instead of name with #.
2022-01-30patch 8.2.4260: Vim9: can still use a global function without g:v8.2.4260Bram Moolenaar
Problem: Vim9: can still use a global function without g: at the script level. Solution: Also check for g: at the script level. (issue #9637)
2022-01-29patch 8.2.4257: Vim9: finding global function without g: prefix inconsistentv8.2.4257Bram Moolenaar
Problem: Vim9: finding global function without g: prefix but not finding global variable is inconsistent. Solution: Require using g: for a global function. Change the vim9.vim script into a Vim9 script with exports. Fix that import in legacy script does not work.
2022-01-08patch 8.2.4037: Insert mode completion is insufficiently testedv8.2.4037Yegappan Lakshmanan
Problem: Insert mode completion is insufficiently tested. Solution: Add more tests. Fix uncovered memory leak. (Yegappan Lakshmanan, closes #9489)
2022-01-03patch 8.2.3989: some insert completion code is not testedv8.2.3989Yegappan Lakshmanan
Problem: Some insert completion code is not tested. Solution: Add a few tests. Refactor thesaurus completion. (Yegappan Lakshmanan, closes #9460)
2021-12-30patch 8.2.3944: insert mode completion functions are too longv8.2.3944Yegappan Lakshmanan
Problem: Insert mode completion functions are too long. Solution: Split up into multiple functions. (Yegappan Lakshmanan, closes #9431)
2021-12-29patch 8.2.3937: Insert mode completion function is too longv8.2.3937Yegappan Lakshmanan
Problem: Insert mode completion function is too long. Solution: Refactor into multiple functions. (Yegappan Lakshmanan, closes #9423)
2021-12-27patch 8.2.3915: illegal memory access when completing with invalid bytesv8.2.3915Bram Moolenaar
Problem: illegal memory access when completing with invalid bytes. Solution: Avoid going over the end of the completion text.
2021-12-17patch 8.2.3838: cannot use script-local function for setting *func optionsv8.2.3838Yegappan Lakshmanan
Problem: Cannot use script-local function for setting *func options. Solution: Use the script context. (Yegappan Lakshmanan, closes #9362)
2021-12-12patch 8.2.3792: setting *func options insufficiently testedv8.2.3792Yegappan Lakshmanan
Problem: Setting *func options insufficiently tested. Solution: Impove tests. (Yegappan Lakshmanan, closes #9337)
2021-12-12patch 8.2.3788: lambda for option that is a function may be freedv8.2.3788Yegappan Lakshmanan
Problem: Lambda for option that is a function may be garbage collected. Solution: Set a reference in the funcref. (Yegappan Lakshmanan, closes #9330)
2021-12-08patch 8.2.3758: options that take a function insufficiently testedv8.2.3758Yegappan Lakshmanan
Problem: Options that take a function insufficiently tested. Solution: Add additional tests and enhance existing tests. (Yegappan Lakshmanan, closes #9298)
2021-12-07patch 8.2.3756: might crash when callback is not validv8.2.3756Yegappan Lakshmanan
Problem: might crash when callback is not valid. Solution: Check for valid callback. (Yegappan Lakshmanan, closes #9293)
2021-12-06patch 8.2.3751: cannot assign a lambda to an option that takes a functionv8.2.3751Yegappan Lakshmanan
Problem: Cannot assign a lambda to an option that takes a function. Solution: Automatically convert the lambda to a string. (Yegappan Lakshmanan, closes #9286)
2021-12-04patch 8.2.3735: cannot use a lambda for 'imactivatefunc'v8.2.3735Yegappan Lakshmanan
Problem: Cannot use a lambda for 'imactivatefunc'. Solution: Add lambda support for 'imactivatefunc' and 'imstatusfunc'. (Yegappan Lakshmanan, closes #9275)
2021-12-03patch 8.2.3725: cannot use a lambda for 'completefunc' and 'omnifunc'v8.2.3725Yegappan Lakshmanan
Problem: Cannot use a lambda for 'completefunc' and 'omnifunc'. Solution: Implement lambda support. (Yegappan Lakshmanan, closes #9257)
2021-11-21patch 8.2.3637: typos in test filesv8.2.3637Dominique Pelle
Problem: Typos in test files. Solution: Correct the typos. (Dominique Pellé, closes #9175)