aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* fix(lsp)!: deprecate trim_empty_linesMaria José Solano2023-09-19
|
* feat(lsp): use treesitter for stylize markdownMaria José Solano2023-09-19
|
* fix(float): make "fixed" work with relative=win (#25243)zeertzjq2023-09-19
|
* Merge pull request #25214 from bfredl/glyphcachebfredl2023-09-19
|\ | | | | refactor(grid): change schar_T representation to be more compact
| * refactor(grid): change schar_T representation to be more compactbfredl2023-09-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, a screen cell would occupy 28+4=32 bytes per cell as we always made space for up to MAX_MCO+1 codepoints in a cell. As an example, even a pretty modest 50*80 screen would consume 50*80*2*32 = 256000, i e a quarter megabyte With the factor of two due to the TUI side buffer, and even more when using msg_grid and/or ext_multigrid. This instead stores a 4-byte union of either: - a valid UTF-8 sequence up to 4 bytes - an escape char which is invalid UTF-8 (0xFF) plus a 24-bit index to a glyph cache This avoids allocating space for huge composed glyphs _upfront_, while still keeping rendering such glyphs reasonably fast (1 hash table lookup + one plain index lookup). If the same large glyphs are using repeatedly on the screen, this is still a net reduction of memory/cache consumption. The only case which really gets worse is if you blast the screen full with crazy emojis and zalgo text and even this case only leads to 4 extra bytes per char. When only <= 4-byte glyphs are used, plus the 4-byte attribute code, i e 8 bytes in total there is a factor of four reduction of memory use. Memory which will be quite hot in cache as the screen buffer is scanned over in win_line() buffer text drawing A slight complication is that the representation depends on host byte order. I've tested this manually by compling and running this in qemu-s390x and it works fine. We might add a qemu based solution to CI at some point.
* | Merge pull request #25148 from glepnir/fixed_optbfredl2023-09-19
|\ \ | | | | | | fix(float): add fixed option
| * | fix(float): add fixd optionglepnir2023-09-18
| | |
* | | vim-patch:346ac1429c5a (#25239)zeertzjq2023-09-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | runtime(doc): add help tag describing object-selection closes: vim/vim#13114 https://github.com/vim/vim/commit/346ac1429c5afb23bace295106aea1b305443435 Co-authored-by: Christian Brabandt <cb@256bit.org>
* | | vim-patch:9.0.1908: undefined behaviour upper/lower function ptrs (#25238)zeertzjq2023-09-19
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: undefined behaviour upper/lower function ptrs Solution: Fix UBSAN error in regexp and simplify upper/lowercase modifier code The implementation of \u / \U / \l / \L modifiers in the substitute command relies on remembering the state by setting function pointers on func_all/func_one in the code. The code signature of `fptr_T` is supposed to return void* (due to C function signatures not being able to return itself due to type recursion), and the definition of the functions (e.g. to_Upper) didn't follow this rule, and so the code tries to cast functions of different signatures, resulting in undefined behavior error under UBSAN in Clang 17. See vim/vim#12745. We could just fix `do_Upper`/etc to just return void*, which would fix the problem. However, these functions actually do not need to return anything at all. It used to be the case that there was only one pointer "func" to store the pointer, which is why the function needs to either return itself or NULL to indicate whether it's a one time or ongoing modification. However, c2c355df6f094cdb9e599fd395a78c14486ec697 (7.3.873) already made that obsolete by introducing `func_one` and `func_all` to store one-time and ongoing operations separately, so these functions don't actually need to return anything anymore because it's implicit whether it's a one-time or ongoing operation. Simplify the code to reflect that. closes: vim/vim#13117 https://github.com/vim/vim/commit/d25021cf036c63d539f845a1ee05b03ea21d61ff Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
* | docs(test): add more info on debugging with gdb #25230Sergey Slipchenko2023-09-18
| |
* | test(tui_spec): update cursor_address test for wrap flag (#25228)zeertzjq2023-09-18
| |
* | test(ui/fold_spec): more testing for clicking on 'foldcolumn' (#25225)zeertzjq2023-09-18
| |
* | fix(job-control): fix use after free (#25223)sid-65812023-09-18
| |
* | vim-patch:d8b86c937a41Christian Clason2023-09-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | runtime(netrw): fix filetype detection for remote editing files closes: vim/vim#12990 closes: vim/vim#12992 this partially reverses commit 71badf9 by commenting out the line that intentionally sets the filetype to an empty string. https://github.com/vim/vim/commit/d8b86c937a419db69239a8bb879f0050be0f8e1d Co-authored-by: Christian Brabandt <cb@256bit.org>
* | vim-patch:e30d8e4ce01dChristian Clason2023-09-17
| | | | | | | | | | | | | | | | | | | | runtime(kotlin): Add Kotlin runtime files (vim/vim#13110) Closes udalov/kotlin-vimvim/vim#39 https://github.com/vim/vim/commit/e30d8e4ce01dc1aca95d25be9fd27c09855fd4be Co-authored-by: dkearns <dougkearns@gmail.com>
* | vim-patch:9.0.1907: No support for liquidsoap filetypesChristian Clason2023-09-17
| | | | | | | | | | | | | | | | | | | | | | Problem: No support for liquidsoap filetypes Solution: Add liquidsoap filetype detection code closes: vim/vim#13111 https://github.com/vim/vim/commit/6b5efcdd8e976d2ab2554b22c4220c5e88de4717 Co-authored-by: Romain Beauxis <toots@rastageeks.org>
* | fix(treesitter): _trees may not be list-likeJaehwang Jung2023-09-17
| | | | | | | | | | | | | | | | | | | | | | Problem: With incremental injection parsing, injected languages' parsers parse only the relevant regions and stores the result in _trees with the index of the corresponding region. Therefore, there can be holes in _trees. Solution: * Use generic table functions where appropriate. * Fix type annotations and docs.
* | test(ui/fold_spec): click on multibyte "foldclosed" (#25216)zeertzjq2023-09-17
| |
* | vim-patch:8.2.4173: cannot use an import in 'foldexpr' (#25215)zeertzjq2023-09-17
| | | | | | | | | | | | | | | | | | Problem: Cannot use an import in 'foldexpr'. Solution: Set the script context to where 'foldexpr' was set. (closes vim/vim#9584) Fix that the script context was not set for all buffers. https://github.com/vim/vim/commit/e70dd11ef41f69bd5e94f630194e6b3c4f3f2102 Co-authored-by: Bram Moolenaar <Bram@vim.org>
* | feat(folds): support virtual text format for 'foldtext' (#25209)zeertzjq2023-09-17
| | | | | | Co-authored-by: Lewis Russell <lewis6991@gmail.com>
* | docs: remove joke from pronouncedundargoc2023-09-17
| | | | | | | | N-Jim does not sounds like "Ninja", and the joke doesn't really land.
* | build(deps): bump luajit to HEAD - e897c5743Christian Clason2023-09-17
| |
* | Merge pull request #25190 from glepnir/echo_hlbfredl2023-09-17
|\ \ | | | | | | fix(highlight): correct hi command output
| * | fix(highlight): correct hi command outputglepnir2023-09-17
| |/
* | Merge pull request #25208 from zeertzjq/vim-8.2.2356zeertzjq2023-09-17
|\ \
| * | vim-patch:9.0.1633: duplicate code for converting float to stringzeertzjq2023-09-17
| | | | | | | | | | | | | | | | | | | | | Problem: Duplicate code for converting float to string. Solution: Use tv_get_string(). (closes vim/vim#12521) https://github.com/vim/vim/commit/19dfa276c37dcf657922c6f9b48cf2954191e8b6
| * | vim-patch:8.2.2356: Vim9: ":put =expr" does not handle a list properlyzeertzjq2023-09-17
|/ / | | | | | | | | | | | | | | | | Problem: Vim9: ":put =expr" does not handle a list properly. Solution: Use the same logic as eval_to_string_eap(). (closes vim/vim#7684) https://github.com/vim/vim/commit/883cf97f109d2ff281cf77f7b2e3bb44aced7cb3 Co-authored-by: Bram Moolenaar <Bram@vim.org>
* | docs(tutor): clarify the meaning of ✗ and ✓ (#25204)zeertzjq2023-09-17
| | | | | | Also reformat tutor.tutor.json to use 2-space indent while at it.
* | fix(lua): not using global value in vim.opt_global (#25196)Phelipe Teles2023-09-17
| |
* | test(plugin/man_spec): use pesc() on actual_file in pattern (#25199)zeertzjq2023-09-17
| |
* | feat(treesitter): add lang parameter to the query editor (#25181)Maria José Solano2023-09-16
| |
* | fix(treesitter): properly combine injection.combined regionsJaehwang Jung2023-09-16
| | | | | | | | | | | | | | | | | | Problem: It doesn't make much sense to flatten each region (= list of ranges). This coincidentally worked for region with a single range. Solution: Custom function for combining regions.
* | fix(treesitter): fix trim predicateLewis Russell2023-09-16
| |
* | fix(typing): vim.fn.executeLewis Russell2023-09-16
| |
* | Merge pull request #25186 from llllvvuu/fix/preserve_marktree_orderinhbfredl2023-09-16
|\ \ | | | | | | fix(marktree): preserve ordering in `marktree_move`
| * | fix(test): more tests for marktreebfredl2023-09-16
| | | | | | | | | | | | Co-Authored-By: L Lllvvuu <git@llllvvuu.dev>
| * | fix(marktree): preserve ordering in `marktree_move`L Lllvvuu2023-09-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `marktree_move` is making the tree out of order at: https://github.com/neovim/neovim/blob/be10d65bfafe056025ffffa2c1131712b9a493a5/src/nvim/marktree.c#L1188 Because `key` is at the new position, and `x->key[new_i]` is also at the new position, this comparison spuriously returns true, which causes `x->key[i]` to be updated in-place even when it needs to be moved. This causes crashes down the line, since the ordering of `MTNode.key` is an invariant that must be preserved. Fixes: #25157
* | | perf(treesitter): do not scan past given line for predicate matchL Lllvvuu2023-09-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem --- If a highlighter query returns a significant number of predicate non-matches, the highlighter will scan well past the end of the window. Solution --- In the iterator returned from `iter_captures`, accept an optional parameter `end_line`. If no parameter provided, the behavior is unchanged, hence this is a non-invasive tweak. Fixes: #25113 nvim-treesitter/nvim-treesitter#5057
* | | refactor(mapping.c): reduce scope of localsLewis Russell2023-09-16
| | |
* | | fix(languagetree): apply `resolve_lang` to `metadata['injection.language']`L Lllvvuu2023-09-16
|/ / | | | | | | | | | | | | | | | | | | | | | | | | `resolve_lang` is applied to `@injection.language` when it's supplied as a capture: https://github.com/neovim/neovim/blob/f5953edbac14febce9d4f8a3c35bdec1eae26fbe/runtime/lua/vim/treesitter/languagetree.lua#L766-L768 If we want to support `metadata['injection.language']` (as per #22518 and [tree-sitter upstream](https://tree-sitter.github.io/tree-sitter/syntax-highlighting#language-injection)) then the behavior should be consistent. Fixes: nvim-treesitter/nvim-treesitter#4918
* | Merge pull request #25183 from llllvvuu/fix/marktree_movebfredl2023-09-16
|\ \ | | | | | | fix(marktree): off-by-one error in `marktree_move`
| * | fix(marktree): off-by-one error in `marktree_move`L Lllvvuu2023-09-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If you would insert element X at position j, then if you are moving that same element X from position i < j, you should move it to position j - 1, because you are losing an element. This error caused a gap to be left in the array, so that it looked like [x, null, y] instead of [x, y], where len = 2. This triggered #25147. Fixes: #25147
* | | Merge pull request #25078 from glepnir/aubfredl2023-09-16
|\ \ \ | |/ / |/| | fix(float): don't trigger au event when enter is false
| * | fix(ui): doesn't trigger au event when enter is falseglepnir2023-09-15
| | |
* | | vim-patch:c1f8bb37c6a8Christian Clason2023-09-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | runtime(forth): Fix :unlet error in ftplugin (vim/vim#13090) Fixes vim/vim#13089. https://github.com/vim/vim/commit/c1f8bb37c6a8e0babc2a41f16860763b57c23fa1 Co-authored-by: dkearns <dougkearns@gmail.com>
* | | refactor(treesitter): remove duplicated diagnostic code (#24976)Maria José Solano2023-09-15
| | | | | | | | | | | | | | | | | | | | | * refactor(treesitter): remove duplicated diagnostic code * fixup!: fix type errors * fixup!: add type namespace
* | | docs(MAINTAIN): Add note about deprecation policy exceptions (#25159)Gregory Anders2023-09-15
| | | | | | | | | Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
* | | fix(extmarks): overlay virt_text position after 'showbreak' (#25175)zeertzjq2023-09-15
| | | | | | | | | Also make virt_text_hide work properly.
* | | fix: invoke changed_bytes when rewriting <Tab> char #25125Ilia Choly2023-09-15
| | | | | | | | | | | | | | | | | | | | | When tabstop and shiftwidth are not equal, tabs are inserted as individual spaces and then rewritten as tab characters in a second pass. That second pass did not call changed_bytes which resulted in events being omitted. Fixes #25092
* | | refactor(treesitter): rename "preview" => "edit" #25161Maria José Solano2023-09-15
| | | | | | | | | | | | | | | | | | "Edit" more closely describes the generic application than "Preview", though the buffer contents don't (yet) map to an actual file on disk. https://github.com/neovim/neovim/pull/24703#discussion_r1321719133