aboutsummaryrefslogtreecommitdiff
path: root/runtime
Commit message (Collapse)AuthorAge
* 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:d3e277f279ed (#25734)zeertzjq2023-10-21
| | | | | | | | | | | | | | | | | | matchparen: do not use hard-coded match id (vim/vim#13393) * matchparen: do not use hard-coded match id Instead of using the hard-coded match id 3, which may also be used by other plugins, let the matchparen plugin use whatever ids are automatically returned when calling matchaddpos(). For backwards-compatibility, keep the `:3match` call, which will still use the hard-coded id 3 (as mentioned in :h :3match). closes: vim/vim#13381 https://github.com/vim/vim/commit/d3e277f279ed628809eb6857ea3ebcfca566ca2a Co-authored-by: Christian Brabandt <cb@256bit.org>
* feat(lsp): add snippet API (#25301)Maria José Solano2023-10-21
|
* fix(lsp): log unknown diagnostic tags instead of showing a warning (#25705)Jorge Mederos2023-10-21
| | | | | To be more in line with the specification: > To support the evolution of enumerations the using side of an enumeration shouldn’t fail on an enumeration value it doesn’t know. It should simply ignore it as a value it can use and try to do its best to preserve the value on round trips
* 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:d5dc58aeed1b (#25720)Gregory Anders2023-10-19
| | | | | | | runtime(json5): Add new ftplugin (vim/vim#13385) https://github.com/vim/vim/commit/d5dc58aeed1b3e76527685d04906afd634d45949 Co-authored-by: dkearns <dougkearns@gmail.com>
* vim-patch:e08bfef88bd0Gregory Anders2023-10-19
| | | | | | | | | | | runtime(zig): Update Zig runtime files (vim/vim#13388) Update runtime files from upstream (https://github.com/zig/zig.vim) at commit 54c216e5306a5c3878a60596aacb94dca8652ab9. https://github.com/vim/vim/commit/e08bfef88bd05a9d27ee16c57cd10173e280f600 Co-authored-by: Gregory Anders <8965202+gpanders@users.noreply.github.com>
* fix(treesitter): set cursor position when opening inspectorMaria José Solano2023-10-19
|
* fix(docs): fix TSNode incorrect signaturesPham Huy Hoang2023-10-19
|
* vim-patch:5a33ce2a661fChristian Clason2023-10-18
| | | | | | | | | | | | | | runtime(json5): include syntax script for json5 (vim/vim#13356) Merging syntax file from gutenye/json5.vim, modified to include proper vim header. See: https://github.com/vim/vim/issues/8499 https://github.com/vim/vim/commit/5a33ce2a661fb836d4c5c489f2a850172a23e0b0 Co-authored-by: Rolf Vidar Mazunki Hoksaas <32819373+mazunki@users.noreply.github.com> Co-authored-by: Guten Ye <ywzhaifei@gmail.com>
* vim-patch:9.0.2041: trim(): hard to use default mask (#25692)zeertzjq2023-10-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: trim(): hard to use default mask (partly revert v9.0.2040) Solution: use default mask when it is empty The default 'mask' value is pretty complex, as it includes many characters. Yet, if one needs to specify the trimming direction, the third argument, 'trim()' currently requires the 'mask' value to be provided explicitly. Currently, an empty 'mask' will make 'trim()' call return 'text' value that is passed in unmodified. It is unlikely that someone is using it, so the chances of scripts being broken by this change are low. Also, this reverts commit 9.0.2040 (which uses v:none for the default and requires to use an empty string instead). closes: vim/vim#13358 https://github.com/vim/vim/commit/8079917447e7436dccc2e4cd4a4a56ae0a4712f2 vim-patch:9.0.2040: trim(): hard to use default mask Problem: trim(): hard to use default mask Solution: Use default 'mask' when it is v:none The default 'mask' value is pretty complex, as it includes many characters. Yet, if one needs to specify the trimming direction, the third argument, 'trim()' currently requires the 'mask' value to be provided explicitly. 'v:none' is already used to mean "use the default argument value" in user defined functions. See |none-function_argument| in help. closes: vim/vim#13363 https://github.com/vim/vim/commit/6e6386716f9494ae86027c6d34f657fd03dfec42 Co-authored-by: Illia Bobyr <illia.bobyr@gmail.com>
* fix(treesitter): check that buf is loaded in autocommands (#25679)Maria José Solano2023-10-17
|
* vim-patch:9.0.2035: [security] use-after-free with wildmenu (#25687)zeertzjq2023-10-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: [security] use-after-free with wildmenu Solution: properly clean up the wildmenu when exiting Fix wildchar/wildmenu/pum memory corruption with special wildchar's Currently, using `wildchar=<Esc>` or `wildchar=<C-\>` can lead to a memory corruption if using wildmenu+pum, or wrong states if only using wildmenu. This is due to the code only using one single place inside the cmdline process loop to perform wild menu clean up (by checking `end_wildmenu`) but there are other odd situations where the loop could have exited and we need a post-loop clean up just to be sure. If the clean up was not done you would have a stale popup menu referring to invalid memory, or if not using popup menu, incorrect status line (if `laststatus=0`). For example, if you hit `<Esc>` two times when it's wildchar, there's a hard-coded behavior to exit command-line as a failsafe for user, and if you hit `<C-\><C-\><C-N>` it will also exit command-line, but the clean up code would not have hit because of specialized `<C-\>` handling. Fix Ctrl-E / Ctrl-Y to not cancel/accept wildmenu if they are also used for 'wildchar'/'wildcharm'. Currently they don't behave properly, and also have potentially memory unsafe behavior as the logic is currently not accounting for this situation and try to do both. (Previous patch that addressed this: vim/vim#11677) Also, correctly document Escape key behavior (double-hit it to escape) in wildchar docs as it's previously undocumented. In addition, block known invalid chars to be set in `wildchar` option, such as Ctrl-C and `<CR>`. This is just to make it clear to the user they shouldn't be set, and is not required for this bug fix. closes: vim/vim#13361 https://github.com/vim/vim/commit/8f4fb007e4d472b09ff6bed9ffa485e0c3093699 Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
* fix(diagnostics): if buffer not loaded, skip handlers that set extmark (#25628)Jaehwang Jung2023-10-16
| | | | | | | | | | Problem: When enabling diagnostics, there can be diagnostics for unloaded buffer, but some handlers nevertheless attempt to set extmarks in such buffers. Solution: * Exit underline/virtual_text handler if buffer is not loaded. * Don't require is_loaded as precondition for show(), because handlers don't necessarily depend on it.
* Merge pull request #25394 from famiu/refactor/options/set_optionbfredl2023-10-16
|\ | | | | refactor(options)!: unify interfaces for setting options
| * refactor(options)!: make OptionSet `v:` values use typvalFamiu Haque2023-10-17
| | | | | | | | BREAKING CHANGE: This breaks the OptionSet autocommand, as the `v:` values associated with it (`v:option_new`, `v:option_old`, `v:option_oldlocal` and `v:option_oldglobal`) are now the same type as the option, instead of all option values being converted to strings.
* | fix(man.lua): hardwrapped manpage is not resized #25646James Barford-Evans2023-10-16
| | | | | | | | | | | | | | | | | | | | | | Problem: If a manpage is opened, its hardwrapped dimensions are not recalculated after closing then revisiting the same manpage. Solution: Unload the manpage when it is hidden. This forces it to be reloaded, which forces the hard-wrapping to be recalculated when it is revisited. Fixes: #25457
* | fix(lsp): highlight active parameter in signature help #25663Maria José Solano2023-10-16
| | | | | | Fixes #25662
* | docs: do not hardcode LSP version in URL #25648Maria José Solano2023-10-16
|/
* vim-patch:dbf749bd5aae (#25665)zeertzjq2023-10-16
| | | | | | | | | | | runtime: Fix more typos (vim/vim#13354) * Fix more typos * Fix typos in ignored runtime/ directory https://github.com/vim/vim/commit/dbf749bd5aaef6ea2d28bce081349785d174d96a Co-authored-by: Viktor Szépe <viktor@szepe.net>
* vim-patch:9.0.2025: no cmdline completion for ++opt args (#25657)zeertzjq2023-10-15
| | | | | | | | | | | Problem: no cmdline completion for ++opt args Solution: Add cmdline completion for :e ++opt=arg and :terminal [++options] closes: vim/vim#13319 https://github.com/vim/vim/commit/989426be6e9ae23d2413943890206cbe15d9df38 Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
* vim-patch:9.0.2032: cannot get mouse click pos for tab or virt text (#25653)zeertzjq2023-10-15
| | | | | | | | | Problem: Cannot accurately get mouse clicking position when clicking on a TAB or with virtual text. Solution: Add a "coladd" field to getmousepos() result. closes: vim/vim#13335 https://github.com/vim/vim/commit/f5a94d5165bb9e390797da50a1fa7a87df3fbee4
* vim-patch:9.0.2030: no max callback recursion limit (#25655)zeertzjq2023-10-15
| | | | | | | | | | | | | | | Problem: no max callback recursion limit Solution: bail out, if max call recursion for callback functions has been reached. This checks the 'maxfuncdepth' setting and throws E169 when a callback function recursively calls itself. closes: vim/vim#13337 closes: vim/vim#13339 https://github.com/vim/vim/commit/47510f3d6598a1218958c03ed11337a43b73f48d Co-authored-by: Christian Brabandt <cb@256bit.org>
* docs: restore accidentally removed line in :h 'ignorecase' (#25651)zeertzjq2023-10-15
|
* vim-patch:7687238e1b0dChristian Clason2023-10-14
| | | | | | | | | | | | runtime(tcsh): Update ftplugin (vim/vim#13327) Fix b:browsefilter deletion error when calling b:undo_ftplugin. Fixes vim/vim#13167 https://github.com/vim/vim/commit/7687238e1b0d2f26ba57e1bdf76f782eaa43af3a Co-authored-by: dkearns <dougkearns@gmail.com>
* vim-patch:9.0.2024: no filetype detection for Debian sourcesChristian Clason2023-10-14
| | | | | | | | | | | Problem: no filetype detection for Debian sources Solution: Add new deb822sources filetype closes: vim/vim#13320 https://github.com/vim/vim/commit/bd734c3bead9e167eb6875f62cc06fab2379c422 Co-authored-by: James McCoy <jamessan@jamessan.com>
* vim-patch:2bbd0d30eebd (#25637)zeertzjq2023-10-14
| | | | | | | | | | | | | | | | | | | runtime(doc): Improve command-line completion docs (vim/vim#13331) * Improve command-line completion docs Add more details about 'ignorecase' and its effect on cmdline completion. Make sure keys used in wildmenu are properly documented and linked in the keys' documentation entries, and in `:h index` for proper cross-referencing, as wildmenu popup is slightly different from insert-mode popup menu. * Fix docs typos https://github.com/vim/vim/commit/2bbd0d30eebdea66c0da3895e83d999ed6ad83fb Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
* vim-patch:9.0.2022: getmousepos() returns wrong index for TAB char (#25636)zeertzjq2023-10-14
| | | | | | | | | | | Problem: When clicking in the middle of a TAB, getmousepos() returns the column of the next char instead of the TAB. Solution: Break out of the loop when the vcol to find is inside current char. Fix invalid memory access when calling virtcol2col() on an empty line. closes: vim/vim#13321 https://github.com/vim/vim/commit/b583eda7031b1f6a3469a2537d0c10ca5fa5568e
* refactor(lsp): fix luals warnings in tagfunc and add type annotations (#25150)Mathias Fußenegger2023-10-14
|
* refactor(lsp): make is_pull in lsp.diagnostic.get_namespace optional (#25156)Mathias Fußenegger2023-10-14
| | | | | | | | | Follw up to https://github.com/neovim/neovim/commit/63b3408551561127f7845470eb51404bcd6f547b `is_pull` should be optional, otherwise it is an API change that introduces warnings in consumers. Also fixes the type annotation of `_client_pull_namespaces` where the key is a string.
* fix(lsp): refactor escaping snippet text (#25611)Maria José Solano2023-10-14
|
* fix(lsp): handle NUL bytes in popup text (#25612)zeertzjq2023-10-12
| | | Fix #25610
* vim-patch:9.0.2011: INI files not detectedChristian Clason2023-10-11
| | | | | | | | | | | | | | Problem: INI files not detected Solution: detect uppercase .INI as dosini files It previo~1 only worked for lower-case .ini files, but upperc~1 .INI is also somewhat common on account of DOS' old 8.3 upperc~2 only filena~1. closes: vim/vim#13316 https://github.com/vim/vim/commit/4a82bdfaa8022402b1ca0f0000c94c47a13f1014 Co-authored-by: Martin Tournoij <martin@arp242.net>
* fix(lsp): display initialization errors (#25409)Maria José Solano2023-10-11
|
* docs: clarify about error in shada (#25594)sisrfeng2023-10-11
|
* refactor(float): rename ex_floatclose to ex_fclose (#25596)Raphael2023-10-11
|
* docs(style): add guideline for fixing compiler error on switch statementFamiu Haque2023-10-10
| | | | | | Problem: Certain compilers (primarily GCC) do not recognize an exhaustive enum switch statement as being exhaustive. This manifests in the form of compiler errors in exhaustive switch statements where each case has a return statement but there isn't a catch-all return statements. These compiler errors are spurious in the context of the Neovim codebase. So #25533 added the `UNREACHABLE` macro to denote apart of the code that's unreachable, which was used after every such switch statement to tell the compiler to treat the switch statement as exhaustive. However, the macro is mentioned nowhere in the style guide,and new contributors would not have any natural way of learning about it as it stands now. This would lead to confusion when they inevitably encounter one of these compiler errors. Solution: Add a style guideline which shows how to use the `UNREACHABLE` macro to fix these compiler errors.
* docs: small fixesdundargoc2023-10-10
| | | | | | Co-authored-by: Wansmer <wansmer@gmail.com> Co-authored-by: Andrew Voynov <andrewvoynov.b@gmail.com> Co-authored-by: David Moberg <david.moberg@mediatek.com>
* Merge pull request #25561 from glepnir/9663bfredl2023-10-10
|\ | | | | feat(float): add fclose command
| * feat(float): add fclose commandglepnir2023-10-10
| |
* | refactor: allow not having a `default` case for enumFamiu Haque2023-10-10
| | | | | | | | | | | | Problem: The style guide states that all switch statements that are not conditional on an enum must have a `default` case, but does not give any explicit guideline for switch statements that are conditional on enums. As a result, a `default` case is added in many enum switch statements, even when the switch statement is exhaustive. This is not ideal because it removes the ability to have compiler errors to easily detect unchanged switch statements when a new possible value for an enum is added. Solution: Add explicit guidelines for switch statements that are conditional on an enum, clarifying that a `default` case is not necessary if the switch statement is exhaustive. Also refactor pre-existing code with unnecessary `default` cases.
* | vim-patch:9.0.2009: cmdline-completion for comma-separated options wrong ↵zeertzjq2023-10-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#25569) Problem: cmdline-completion for comma-separated options wrong Solution: Fix command-line expansions for options with filenames with commas Fix command-line expansions for options with filenames with commas Cmdline expansion for option values that take a comma-separated list of file names is currently not handling file names with commas as the commas are not escaped. For such options, the commas in file names need to be escaped (to differentiate from a comma that delimit the list items). The escaped comma is unescaped in `copy_option_part()` during option parsing. Fix as follows: - Cmdline completion for option values with comma-separated file/folder names will not start a new match when seeing `\\,` and will instead consider it as one value. - File/folder regex matching will strip the `\\` when seeing `\\,` to make sure it can match the correct files/folders. - The expanded value will escape `,` with `\\,`, similar to how spaces are escaped to make sure the option value is correct on the cmdline. This fix also takes into account the fact that Win32 Vim handles file name escaping differently. Typing '\,' for a file name results in it being handled literally but in other platforms '\,' is interpreted as a simple ',' and commas need to be escaped using '\\,' instead. Also, make sure this new logic only applies to comma-separated options like 'path'. Non-list options like 'set makeprg=<Tab>' and regular ex commands like `:edit <Tab>` do not require escaping and will continue to work. Also fix up documentation to be clearer. The original docs are slightly misleading in how it discusses triple slashes for 'tags'. closes: vim/vim#13303 related: vim/vim#13301 https://github.com/vim/vim/commit/54844857fd6933fa4f6678e47610c4b9c9f7a091 Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
* | fix(path): restore space separation in 'path' (#25571)zeertzjq2023-10-10
| | | | | | Removing this behavior causes more inconsistencies and bugs.
* | docs: fix misplaced mention of 'backupdir' (#25568)zeertzjq2023-10-10
| |
* | docs: miscellaneous doc and type fixes (#25554)Maria José Solano2023-10-10
| |
* | feat(ui-ext): make 'mousehide' into proper ui_option (#25532)Jaehoon Hwang2023-10-09
| |
* | vim-patch:1e33cd72b60aChristian Clason2023-10-08
|/ | | | | | | | | | | | runtime: make command name for &iskeywordprg more unique (vim/vim#13297) See https://github.com/vim/vim/pull/13213/commits by @dkearns: Rename 'keywordprg' user command to ShKeywordPrg as this is just a leaking implementation detail. https://github.com/vim/vim/commit/1e33cd72b60a119a038952bb658862d038602f76 Co-authored-by: Enno <Konfekt@users.noreply.github.com>
* fix(lsp): account for border height in max floating popup height (#25539)LW2023-10-08
|
* docs: use `abort()` for unreachable `default:` case in CFamiu Haque2023-10-07
| | | | | | Problem: The style guide currently recommends having a `default:` case for switch statements that are not conditional on an enumerated value. Additionally, it recommends using `assert(false)` if `default:` is unreachable. This is problematic because `assert()` only runs on debug builds, which may lead to confusing breakages in release builds. Moreover, this suggestion is followed nowhere in the C code and `abort()` is used everywhere instead. Solution: Suggest using `abort()` instead of `assert(false)`, that way the program always terminates if a logically unreachable case is reached.
* Merge pull request #25529 from zeertzjq/vim-9.0.1990zeertzjq2023-10-07
|\ | | | | vim-patch:9.0.1990,27e12c7669e3