aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAge
...
| * | | | | | Merge pull request #27590 from bfredl/signcolfixbfredl2024-02-23
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | fix(marktree): do not count certain marks twice when checking for overlap
| | * | | | | | fix(marktree): some marks counted twice when checking for overlapbfredl2024-02-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fixes #27046
| * | | | | | | vim-patch:9.1.0127: Naming a non-pointer variable "oap" is strangezeertzjq2024-02-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Naming a non-pointer variable "oap" is strange. Solution: Rename it to "oa". Also prevent using freed memory in case of memory allocation failure. (zeertzjq) closes: vim/vim#14075 https://github.com/vim/vim/commit/5e3674b42da10b7e7c72d1f20f9a15379af1b60a
| * | | | | | | vim-patch:9.1.0126: Internal error when using upper-case mark in getregion()zeertzjq2024-02-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Internal error when passing mark in another buffer to getregion(). Solution: Don't allow marks in another buffer (zeertzjq) closes: vim/vim#14076 Internal error when passing mark in another buffer to getregion() https://github.com/vim/vim/commit/421b597470c118871c7081de00dd065e0e000b7e
| * | | | | | | vim-patch:9.1.0120: hard to get visual region using Vim scriptzeertzjq2024-02-23
| |/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: hard to get visual region using Vim script Solution: Add getregion() Vim script function (Shougo Matsushita, Jakub Łuczyński) closes: vim/vim#13998 closes: vim/vim#11579 https://github.com/vim/vim/commit/3f905ab3c4f66562f4a224bf00f49d98a0b0da91 Cherry-pick changes from patch 9.1.0122, with :echom instead of :echow. Co-authored-by: Shougo Matsushita <Shougo.Matsu@gmail.com> Co-authored-by: Jakub Łuczyński <doubleloop@o2.pl>
| * | | | | | refactor(terminal): rename confusing variable name "rv" (#27573)zeertzjq2024-02-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that terminal_open() no longer returns a value, the variable name "rv" is confusing, and "term" makes more sense anyway.
| * | | | | | fix(api): don't leak memory with nvim_win_get_ns (#27570)zeertzjq2024-02-22
| | | | | | |
| * | | | | | fix(extmarks): redraw properly with scoped inline virt_text (#27569)zeertzjq2024-02-22
| | | | | | |
| * | | | | | feat(extmark): window scoped extmarkaltermo2024-02-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Co-authored-by: zeertzjq <zeertzjq@outlook.com>
| * | | | | | docs: remove mention of foreground/background/special keys in nvim_set_hl ↵rktjmp2024-02-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#27558) To align the output of `nvim_get_hl` with its documentation -- which points to `nvim_set_hl`, remove mentions of the keys `foreground`, `background` and `special`. The long keys are are still supported (via fallback checks inside `dict2hlattrs`), but the `fg`, `bg` and `sp` keys are preferenced.
| * | | | | | build: fix uncrustifydundargoc2024-02-21
| | | | | | |
| * | | | | | refactor(api): make freeing of return-value opt-in instead of opt outbfredl2024-02-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As only a few API functions make use of explicit freeing of the return value, make it opt-in instead. The arena is always present under the hood, so `Arena *arena` arg now doesn't mean anything other than getting access to this arena. Also it is in principle possible to return an allocated value while still using the arena as scratch space for other stuff (unlikely, but there no reason to not allow it).
| * | | | | | Merge pull request #27541 from bfredl/exprarenabfredl2024-02-20
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | refactor(api): use an arena for nvim_parse_expression
| | * | | | | | refactor(api): use an arena for nvim_parse_expressionbfredl2024-02-20
| | | | | | | |
| * | | | | | | fix(extmarks): priority order of inline and non-inline virt_text (#27532)zeertzjq2024-02-20
| |/ / / / / /
| * | | | | | refactor(api): reduce temporary allocations when replacing linesbfredl2024-02-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The way ml_replace_buf is implemented makes it unfriendly for being used in a loop: every call allocates a scratch buffer for putting the line into the "dirty" state. This then immediately needs to be freed as the next ml_replace_buf and/or ml_append_buf call will flush that buffer. It's better to later pay the price of allocating the scratch buffer only if the line is being immediately edited (likely when using the API to only change one line) with an extra memcpy, than allocating that buffer multiple times every time the API is called. Of course, a separate xmalloc/xfree cycle for each time the dirty line changes is unwanted to begin with. But fixing that is a later refactor.
| * | | | | | Merge pull request #27534 from bfredl/userarenabfredl2024-02-19
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | refactor(api): next PR to make use of the arena
| | * | | | | | refactor(api): use arena for nvim_put and nvim_pastebfredl2024-02-19
| | | | | | | |
| | * | | | | | refactor(api): use arena when listing objectsbfredl2024-02-19
| | | | | | | |
| | * | | | | | refactor(api): use arena for runtime and client infobfredl2024-02-19
| | | | | | | |
| | * | | | | | refactor(api): use an arena for user commandsbfredl2024-02-19
| | | | | | | |
| * | | | | | | build: disable conversion warnings for GCCdundargoc2024-02-19
| |/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | GCC seems chronically incapable of producing correct and relevant conversion warnings, and will therefore need to be silenced.
| * | | | | | docs: improve 'tabline' click label docs (#27529)zeertzjq2024-02-19
| | | | | | |
| * | | | | | feat(tabline): middle mouse button now closes tab (#27522)Nacho Nieva2024-02-19
| | | | | | |
| * | | | | | vim-patch:9.1.0115: Using freed memory with full tag stack and user data ↵zeertzjq2024-02-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#27525) Problem: Using freed memory with full tag stack and user data (Konstantin Khlebnikov) Solution: Clear the user data pointer of the newest entry. (zeertzjq, Konstantin Khlebnikov) fixes: neovim/neovim#27498 closes: vim/vim#14053 https://github.com/vim/vim/commit/c86bff1771ed9c340f8f4433ae5530fd6de97980 Cherry-pick Test_tag_stack() changes from patch 9.0.0767. Co-authored-by: Konstantin Khlebnikov <koct9i@gmail.com>
| * | | | | | refactor(api): use arena for metadata; msgpack_rpc_to_object delenda estbfredl2024-02-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Note: kSDItemHeader is something is _written_ by nvim in the shada file to identify it for debugging purposes outside of nvim. But this data wasn't ever used by neovim after reading the file back, So I removed the parsing of it for now.
| * | | | | | Merge pull request #27511 from bfredl/maparenabfredl2024-02-18
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | refactor(api): use arena for mappings, autocmd, channel info
| | * | | | | | refactor(api): use arena for autocmdsbfredl2024-02-18
| | | | | | | |
| | * | | | | | refactor(api): use arena for channel info and terminal infobfredl2024-02-18
| | | | | | | |
| | * | | | | | refactor(api): use an arena for mappingsbfredl2024-02-18
| | | | | | | |
| * | | | | | | fix(eval): skip over v:lua properly (#27517)zeertzjq2024-02-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Error when parsing v:lua in a ternary expression. Solution: Set rettv->v_type for v:lua even if not evaluating.
| * | | | | | | fix(options): don't update curswant for 'winhl' or 'winbl' (#27515)zeertzjq2024-02-18
| | | | | | | |
| * | | | | | | vim-patch:9.1.0114: Setting some options may change curswant (#27514)zeertzjq2024-02-18
| |/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Setting some options changes curswant unnecessarily. Solution: Add a P_HLONLY flag that prevents changing curswant. (zeertzjq) closes: vim/vim#14044 https://github.com/vim/vim/commit/fcaed6a70faf73bff3e5405ada556d726024f866
| * | | | | | fix(decorations): crash with revised mark with changed decoration flagsbfredl2024-02-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | fixes #27211
| * | | | | | fix(api): don't use stl 'fillchar' for "use_statuscol_lnum" (#27501)luukvbaal2024-02-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: nvim_eval_statusline() uses "stl" from 'fillchars' with "use_statuscol_lnum". Solution: Reorder "fillchar" else chain.
| * | | | | | fix(treesitter): correctly handle query quantifiers (#24738)Thomas Vigouroux2024-02-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Query patterns can contain quantifiers (e.g. (foo)+ @bar), so a single capture can map to multiple nodes. The iter_matches API can not handle this situation because the match table incorrectly maps capture indices to a single node instead of to an array of nodes. The match table should be updated to map capture indices to an array of nodes. However, this is a massively breaking change, so must be done with a proper deprecation period. `iter_matches`, `add_predicate` and `add_directive` must opt-in to the correct behavior for backward compatibility. This is done with a new "all" option. This option will become the default and removed after the 0.10 release. Co-authored-by: Christian Clason <c.clason@uni-graz.at> Co-authored-by: MDeiml <matthias@deiml.net> Co-authored-by: Gregory Anders <greg@gpanders.com>
| * | | | | | fix(genvimvim): generate prefixed boolean options properly (#27487)zeertzjq2024-02-16
| | | | | | |
| * | | | | | docs: document breaking change for nvim_create_autocmd callback (#27484)Gregory Anders2024-02-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://github.com/neovim/neovim/pull/27428 changed the semantics of callbacks passed to nvim_create_autocmd such that any truthy value will delete the autocommand (rather than just the literal boolean value `true`). Update the documentation accordingly and add an entry to `news.txt`. The behavior is now consistent between nvim_create_autocmd and nvim_buf_attach.
| * | | | | | vim-patch:9.1.0113: duplicate code when cleaning undo stackzeertzjq2024-02-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: duplicate code when cleaning undo stack Solution: refactor undo cleanup into a single public function related: vim/vim#13928 https://github.com/vim/vim/commit/9071ed8107244e0c56a16b77d1c28e975cb21dd2 Co-authored-by: Christian Brabandt <cb@256bit.org>
| * | | | | | vim-patch:9.1.0112: Remove undo information, when cleaning quickfix bufferzeertzjq2024-02-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: When the quickfix buffer has been modified an autocommand may invalidate the undo stack (kawarimidoll) Solution: When clearing the quickfix buffer, also wipe the undo stack fixes: vim/vim#13905 closes: vim/vim#13928 https://github.com/vim/vim/commit/f0d3d4a42657dca996e790aa829de3c6be7fdb63 Co-authored-by: Christian Brabandt <cb@256bit.org>
| * | | | | | refactor(eval): use arena when converting typvals to Objectbfredl2024-02-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Note: this contains two _temporary_ changes which can be reverted once the Arena vs no-Arena distinction in API wrappers has been removed. Both nlua_push_Object and object_to_vim_take_luaref() has been changed to take the object argument as a pointer. This is not going to be necessary once these are only used with arena (or not at all) allocated Objects. The object_to_vim() variant which leaves luaref untouched might need to stay for a little longer.
| * | | | | | fix(extmarks): redraw line on adding/removing conceal (#27463)zeertzjq2024-02-14
| | | | | | |
| * | | | | | vim-patch:9.1.0105: Style: typos found (#27462)zeertzjq2024-02-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Style: typos found Solution: correct them (zeertzjq) closes: vim/vim#14023 https://github.com/vim/vim/commit/e71022082d6a8bd8ec3d7b9dadf3f9ce46ef339c
| * | | | | | refactor(lua): use a keyset for vim.diff opts parsingbfredl2024-02-13
| | | | | | |
| * | | | | | refactor(lua): use Arena when converting from lua stack to API argsbfredl2024-02-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and for return value of nlua_exec/nlua_call_ref, as this uses the same family of functions. NB: the handling of luaref:s is a bit of a mess. add api_luarefs_free_XX functions as a stop-gap as refactoring luarefs is a can of worms for another PR:s. as a minor feature/bug-fix, nvim_buf_call and nvim_win_call now preserves arbitrary return values.
| * | | | | | docs: stricter bufname and bufnr types (#27454)Maria José Solano2024-02-13
| | | | | | |
| * | | | | | vim-patch:9.1.0101: upper-case of German sharp s should be U+1E9E (#27449)zeertzjq2024-02-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: upper-case of ß should be U+1E9E (CAPITAL LETTER SHARP S) (fenuks) Solution: Make gU, ~ and g~ convert the U+00DF LATIN SMALL LETTER SHARP S (ß) to U+1E9E LATIN CAPITAL LETTER SHARP S (ẞ), update tests (glepnir) This is part of Unicode 5.1.0 from April 2008, so should be fairly safe to use now and since 2017 is part of the German standard orthography, according to Wikipedia: https://en.wikipedia.org/wiki/Capital_%E1%BA%9E#cite_note-auto-12 There is however one exception: UnicodeData.txt for U+00DF LATIN SMALL LETTER SHARP S does NOT define U+1E9E LATIN CAPITAL LETTER SHARP S as its upper case version. Therefore, toupper() won't be able to convert from lower sharp s to upper case sharp s (the other way around however works, since U+00DF is considered the lower case character of U+1E9E and therefore tolower() works correctly for the upper case version). fixes: vim/vim#5573 closes: vim/vim#14018 https://github.com/vim/vim/commit/bd1232a1faf56b614a1e74c4ce51bc6e0650ae00 Co-authored-by: glepnir <glephunter@gmail.com>
| * | | | | | vim-patch:9.1.0103: 'breakindentopt' "min" not correct with 'signcolumn' ↵zeertzjq2024-02-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#27451) Problem: 'breakindentopt' "min" works incorrectly with 'signcolumn'. Solution: Use win_col_off() and win_col_off2(). (zeertzjq) closes: vim/vim#14014 https://github.com/vim/vim/commit/f0a9d65e0a1d693cdfa964aa72de5b93b4cacdea
| * | | | | | vim-patch:9.1.0102: settabvar() may change the last accessed tabpage (#27450)zeertzjq2024-02-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: settabvar() may change the last accessed tabpage. Solution: Save and restore lastused_tabpage. (zeertzjq) closes: vim/vim#14017 https://github.com/vim/vim/commit/b47fbb40837512cdd2d8c25eaf9952154836b99d
| * | | | | | perf(redraw): reduce redraw with undo and extmarks or 'spell' (#27442)zeertzjq2024-02-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | vim-patch:9.1.0100: Redrawing can be improved with undo and 'spell' Problem: When undoing with 'spell', redrawWinline() is called after changed_lines(), while later win_update() sets redraw type to UPD_NOT_VALID, even though w_redraw_top and w_redraw_bot are still valid. Solution: Only set redraw type to UPD_NOT_VALID when inserting/deleting lines after parts of window has pending redraw, i.e., when changed_lines() is called after redrawWinline(). (zeertzjq) closes: vim/vim#14019 https://github.com/vim/vim/commit/f2d90a351159fd6843f450850f52004f42e00183