aboutsummaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAge
...
* fix(rpc): "grid_line" event parsing crashes (#25581)LW2023-11-04
| | | | | | | | | | | | | | | refactor: use a more idiomatic loop to iterate over the cells There are two cases in which the following assertion would fail: ```c assert(g->icell < g->ncells); ``` 1. If `g->ncells = 0`. Update this to be legal. 2. If an EOF is reached while parsing `wrap`. In this case, the unpacker attempts to resume from `cells`, which is a bug. Create a new state for parsing `wrap`. Reference: https://neovim.io/doc/user/ui.html#ui-event-grid_line
* refactor(grid): implement rightleftcmd as a post-processing stepbfredl2023-11-03
| | | | | | | Previously, 'rightleftcmd' was implemented by having all code which would affect msg_col or output screen cells be conditional on `cmdmsg_rl`. This change removes all that and instead implements rightleft as a mirroring post-processing step.
* test(ui/embed_spec): make sure server is started (#25880)zeertzjq2023-11-03
|
* fix(startup): trigger UIEnter for the correct channel (#25860)zeertzjq2023-11-01
|
* feat(server): allow embed with listen (#25709)George Harker2023-11-01
| | | | | | connection from any channel or stdio will unblock remote_ui_wait_for_attach. Wait on stdio only if only —embed specified, if both —embed and —listen then wait on any channel.
* feat(stdlib): add vim.base64 module (#25843)Gregory Anders2023-10-31
| | | Add base64 encode() and decode() functions to a vim.base64 module.
* fix(terminal): keep focus when scrolling number column of another window ↵zeertzjq2023-10-31
| | | | (#25848)
* fix(terminal): don't lose focus on <MouseMove> (#25845)zeertzjq2023-10-31
|
* Merge pull request #25674 from famiu/refactor/options/unify_string_optionsbfredl2023-10-30
|\ | | | | refactor(options): unify `set_option` and `set_string_option`
| * refactor(options)!: unify `set_option` and `set_string_option`Famiu Haque2023-10-30
| | | | | | | | | | | | | | | | While the interfaces for setting number and boolean options are now unified by #25394, there is still a separate `set_string_option` function that is used for setting a string option. This PR removes that function and merges it with set_option. BREAKING CHANGE: `v:option_old` is now the old global value for all global-local options, instead of just string global-local options. Local value for a global-local number/boolean option is now unset when the option is set (e.g. using `:set` or `nvim_set_option_value`) without a scope, which means they now behave the same way as string options. Ref: #25672
* | fix(lsp): do not cancel snippet when selecting placeholder (#25835)Maria José Solano2023-10-30
|/
* docs: small fixes (#25585)dundargoc2023-10-29
| | | | Co-authored-by: tmummert <doczook@gmx.de> Co-authored-by: parikshit adhikari <parikshitadhikari@gmail.com>
* fix(api): load buffer first on nvim_buf_set_lines (#25823)Raphael2023-10-29
| | | | Fix #22670 Fix #8659
* fix(terminal): avoid Insert mode in Terminal buffer (#25820)zeertzjq2023-10-29
|
* vim-patch:9.0.2079: Not all Dart files detectedChristian Clason2023-10-29
| | | | | | | | | | | Problem: Not all Dart files detected Solution: Add shebang filetype detection for Dart closes: vim/vim#13449 https://github.com/vim/vim/commit/c1c177a47bfe1b9a524ede2743a689e461668d14 Co-authored-by: Doug Kearns <dougkearns@gmail.com>
* vim-patch:9.0.2081: smoothscroll may result in wrong cursor position (#25815)luukvbaal2023-10-29
| | | | | | | | | | Problem: With 'smoothscroll' set, "w_skipcol" is not reset when unsetting 'wrap'. Resulting in incorrect calculation of the cursor position. Solution: Reset "w_skipcol" when unsetting 'wrap'. fixes: vim/vim#12970 closes: vim/vim#13439 https://github.com/vim/vim/commit/1bf1bf569b96d2f9b28e0cce0968ffbf2fb80aac
* test: add test coverage for #25741Famiu Haque2023-10-28
|
* vim-patch:9.0.2075: TextChangedI may not always trigger (#25808)zeertzjq2023-10-28
| | | | | | | | | | | | | Problem: TextChangedI may not always trigger Solution: trigger it in more cases: for insert/ append/change operations, and when opening a new line, fixes: vim/vim#13367 closes: vim/vim#13375 https://github.com/vim/vim/commit/4bca4897a12dfb91b3b27e3083fd5f370bd857d1 Co-authored-by: Christian Brabandt <cb@256bit.org>
* vim-patch:9.0.2077: CI fails because of trailing whitespace in testzeertzjq2023-10-28
| | | | | | | | | Problem: CI fails because of trailing whitespace in test Solution: Remove it https://github.com/vim/vim/commit/87ca5e86fa0ef305f3d39cc4261b622f21417f7f Co-authored-by: Christian Brabandt <cb@256bit.org>
* vim-patch:9.0.2074: Completion menu may be wrongzeertzjq2023-10-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: vim/vim#13402 related: vim/vim#12971 closes: vim/vim#13408 https://github.com/vim/vim/commit/daef8c74375141974d61b85199b383017644978c Co-authored-by: Christian Brabandt <cb@256bit.org>
* fix(diagnostic): virtual_text prefix function should have index and total ↵Jongwook Choi2023-10-27
| | | | | | | | | | | | | (#25801) The prefix option of the diagnostic virtual text can be a function, but previously it was only a function of diagnostic. This function should also have additional parameters index and total, more consistently and similarily as in the prefix function for `vim.diagnostic.open_float()`. These additional parameters will be useful when there are too many number of diagnostics in a single line.
* vim-patch:9.0.2071: objdump files not recognizedChristian Clason2023-10-27
| | | | | | | | | | | | | Problem: objdump files not recognized Solution: detect *.objdump files, add a filetype plugin Added the objdump file/text format closes: vim/vim#13425 https://github.com/vim/vim/commit/10407df7a95d0311c7d2eb920d3b72020db5b301 Co-authored-by: Colin Kennedy <colinvfx@gmail.com>
* vim-patch:9.0.2068: [security] overflow in :history (#25794)zeertzjq2023-10-27
| | | | | | | | | | | | | | | | | | | | | | | | | Problem: [security] overflow in :history Solution: Check that value fits into int The get_list_range() function, used to parse numbers for the :history and :clist command internally uses long variables to store the numbers. However function arguments are integer pointers, which can then overflow. Check that the return value from the vim_str2nr() function is not larger than INT_MAX and if yes, bail out with an error. I guess nobody uses a cmdline/clist history that needs so many entries... (famous last words). It is only a moderate vulnerability, so impact should be low. Github Advisory: https://github.com/vim/vim/security/advisories/GHSA-q22m-h7m2-9mgm https://github.com/vim/vim/commit/9198c1f2b1ddecde22af918541e0de2a32f0f45a N/A patch: vim-patch:9.0.2073: typo in quickfix.c comments Co-authored-by: Christian Brabandt <cb@256bit.org>
* fix(lsp): fix omnicomplete in middle of the line (#25787)Lajos Koszti2023-10-26
| | | | | | | | Fixes a regression from 5e5f5174e3faa862a9bc353aa7da41487911140b Until that commit we had a logic like this: `local prefix = startbyte and line:sub(startbyte + 1) or line_to_cursor:sub(word_boundary)` The commit changed the logic and no longer cut off the line at the cursor, resulting in a prefix that included trailing characters
* fix(lsp): cancel session when leaving snippet region (#25762)Maria José Solano2023-10-26
|
* fix(float): win_get_bordertext_col returning negative column number (#25752)nwounkn2023-10-26
| | | | | | | | Problem: `win_get_bordertext_col` returns column < 1 for right or center aligned text, if its length is more than window width. Solution: Return max(resulting_column, 1)
* vim-patch:9.0.2064: cannot use buffer-number for errorformat (#25782)zeertzjq2023-10-26
| | | | | | | | | | | Problem: cannot use buffer-number for errorformat Solution: add support for parsing a buffer number using '%b' in 'errorformat' closes: vim/vim#13419 https://github.com/vim/vim/commit/b731800522af00fd348814d33a065b92e698afc3 Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
* fix(terminal): assign channel to terminal earlier (#25771)zeertzjq2023-10-25
|
* vim-patch:9.0.2063: pacman hooks are detected as conf filetypeChristian Clason2023-10-24
| | | | | | | | | | | | | | | | | | | | Problem: pacman hooks are detected as conf filetype Solution: make it consistent to pacman.conf and detect those hooks as confini Because confini has much better syntax highlighting than conf. For reference, I identified pacman.conf and pacman hooks as dosini in https://github.com/vim/vim/pull/6335, then https://github.com/vim/vim/pull/10213 changed them to conf, then https://github.com/vim/vim/pull/10518 changed pacman.conf to confini but forgot to change hooks. closes: vim/vim#13399 https://github.com/vim/vim/commit/7d254dbc2db35badc65668db85f826f605486986 Co-authored-by: Guido Cella <guido@guidocella.xyz>
* vim-patch:9.0.2062: Janet files are not recognisedChristian Clason2023-10-24
| | | | | | | | | | | | | | | Problem: Janet files are not recognised Solution: Add filename and shebang detection (without adding an extra filetype plugin) Those are used by the Janet language: http://www.janet-lang.org closes: vim/vim#13400 https://github.com/vim/vim/commit/c038427d2a27445e612761f19c92b2b8b05afdea Co-authored-by: Doug Kearns <dougkearns@gmail.com>
* vim-patch:9.0.2061: not able to detect xkb filetypesChristian Clason2023-10-24
| | | | | | | | | | | | | | Problem: not able to detect xkb filetypes Solution: Detect files below /u/s/X11/xkb as xkb files (without adding an extra filetype) Those files are used from the X11 xkb extension closes: vim/vim#13401 https://github.com/vim/vim/commit/ae9021a840db3253b0e0cb84186faae73368afd7 Co-authored-by: Guido Cella <guido@guidocella.xyz>
* vim-patch:9.0.2060: *.{gn,gni} files are not recognizedChristian Clason2023-10-24
| | | | | | | | | | | | | Problem: *.{gn,gni} files are not recognized Solution: Detect some as gn filetype (without adding an extra filetype) Those come from: https://gn.googlesource.com/gn/ closes: vim/vim#13405 https://github.com/vim/vim/commit/84394f2be4a750f1e26b478e36de041663f4b5a4 Co-authored-by: Amaan Qureshi <amaanq12@gmail.com>
* fix(marks): handle switching buffer properly (#25763)zeertzjq2023-10-24
|
* fix(lsp): do not add extra indentationMaria José Solano2023-10-23
|
* fix(lsp): track snippet deletionMaria José Solano2023-10-23
|
* fix(lsp): fix off-by-one error for omnifunc word boundaryMathias Fussenegger2023-10-23
| | | | | | | | Fixes https://github.com/neovim/neovim/issues/25177 I initially wanted to split this into a refactor commit to make it more testable, but it appears that already accidentally fixed the issue by normalizing lnum/col to 0-indexing
* feat(complete): support f flag for complete buffer partglepnir2023-10-21
|
* refactor(lsp): deprecate completion util methodsMathias Fussenegger2023-10-21
| | | | Relates to https://github.com/neovim/neovim/issues/25272
* vim-patch:9.0.2059: outstanding exceptions may be skipped (#25736)zeertzjq2023-10-21
| | | | | | | | | | | Problem: outstanding exceptions may be skipped Solution: When restoring exception state, process remaining outstanding exceptions closes: vim/vim#13386 https://github.com/vim/vim/commit/0ab500dede4edd8d5aee7ddc63444537be527871 Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
* vim-patch:9.0.2058: tests: avoid error when no swap files exist (#25735)zeertzjq2023-10-21
| | | | | | | | | | | | | | | | | Problem: tests: avoid error when no swap files exist Solution: use unlet! so that no error message is reported in case the variable does not exists When s:GetSwapFileList() does not find any swapfiles, it will return an empty list []. This means, that the variable 'name' will not be declared, cause the following unlet command to fail and causing a 1 sec delay on running the tests. So let's instead use the :unlet! command which simply skips reporting an error when the variable given as parameter does not exists. closes: vim/vim#13396 https://github.com/vim/vim/commit/a36acb7ac444a789440dc30e0f04d5427069face
* feat(lsp): add snippet API (#25301)Maria José Solano2023-10-21
|
* ci(cirrus): don't run lua/help_spec (#25498)zeertzjq2023-10-21
|
* refactor(options): `get_option_value_strict()` and `SREQ_*`Famiu Haque2023-10-20
| | | | `SREQ_*` values are now actual typedef'd enums. `get_option_value_strict()` has also been refactored and split into two functions, `get_option_attrs()` for getting the option attributes, and `get_option_value_strict()` for getting the actual value. Moreover, it now returns an `OptVal`. Other miscellaneous refactors have also been made.
* vim-patch:9.0.2056: no digraph for quadruple primeChristian Clason2023-10-20
| | | | | | | | | | | Problem: no digraph for quadruple prime Solution: add quadruple prime digraph using 4' closes: vim/vim#13380 https://github.com/vim/vim/commit/47416d1a7441f8c815438903e78ba0a2d877699e Co-authored-by: Jonathan Wright <quaggy@gmail.com>
* vim-patch:9.0.2053: zig filetype detection test wrongGregory Anders2023-10-19
| | | | | | | | | | | Problem: zig filetype detection test wrong Solution: Remove .zir pattern, add new test for .zon pattern closes: vim/vim#13389 https://github.com/vim/vim/commit/a8c664a042707e293d887d5b90f944f6fd5c99aa Co-authored-by: Gregory Anders <greg@gpanders.com>
* vim-patch:9.0.2050: Vim9: crash with deferred function call and exception ↵zeertzjq2023-10-19
| | | | | | | | | | | | | | | | | | | (#25715) Problem: Vim9: crash with deferred function call and exception Solution: Save and restore exception state Crash when a deferred function is called after an exception and another exception is thrown closes: vim/vim#13376 closes: vim/vim#13377 https://github.com/vim/vim/commit/c59c1e0d88651a71ece7366e418f1253abbe2a28 The change in check_due_timer() is N/A as Nvim calls timer callbacks on the main loop. Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
* vim-patch:9.0.2045: tests: checking for swap files takes timezeertzjq2023-10-18
| | | | | | | | | | | | Problem: tests: checking for swap files takes time Solution: don't check for swap files when test has been skipped Check for swap files takes a considerable about of time, so don't do that for skipped tests to avoid wasting time. closes: vim/vim#13371 https://github.com/vim/vim/commit/a0e1f06f04da3444e278ddf47e2ea3d5857a7dec
* vim-patch:9.0.2044: Vim9: exceptions confuse defered functionszeertzjq2023-10-18
| | | | | | | | | | | | | Problem: Vim9: exceptions confuse defered functions Solution: save and restore exception state when calling defered functions closes: vim/vim#13364 closes: vim/vim#13372 https://github.com/vim/vim/commit/0672595fd50e9ae668676a40e28ebf66d7f52392 Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
* fix(move): check the correct buffer (#25698)zeertzjq2023-10-18
|
* test(autocmd/termxx_spec): fix flakiness (#25694)zeertzjq2023-10-18
|