aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
...
* | vim-patch:3a5b3df7764d (#26956)dundargoc2024-01-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | runtime(tar): fix a few problems with the tar plugin From: vim/vim#138331: - Updating .tar.zst files was broken. Fixes vim/vim#12639. - Extracting files from .tar.zst / .tzs files was also broken and works now. From: vim/vim#12637: - Fixes variable assignment and typo From: vim/vim#8109: - Rename .tzs to the more standard .tzst fixes: vim/vim#12639 fixes: vim/vim#8105 closes: vim/vim#8109 closes: vim/vim#12637 closes: vim/vim#13831 https://github.com/vim/vim/commit/3a5b3df7764daa058a3e779183e8f38a8418b164 Co-authored-by: Christian Brabandt <cb@256bit.org> Co-authored-by: Martin Rys <martin@rys.pw> Co-authored-by: Eisuke Kawashima <e-kwsm@users.noreply.github.com> Co-authored-by: Carlo Teubner <carlo@cteubner.net>
* | feat(terminal): trigger TermRequest autocommand events (#22159)Ghjuvan Lacambre2024-01-09
| | | | | | | | | | | | | | | | | | | | This commit implements a new TermRequest autocommand event and has Neovim emit this event when children of terminal buffers emit an OSC or DCS sequence libvterm does not handle. The TermRequest autocommand event has additional data in the v:termrequest variable. Co-authored-by: Gregory Anders <greg@gpanders.com>
* | fix(docs): make lines not overflow in vim docsJongwook Choi2024-01-09
|/ | | | | | | | | Problem: Some lines in the generated vim doc are overflowing, not correctly wrapped at 78 characters. This happens when docs body contains several consecutive 'inline' elements generated by doxygen. Solution: Take into account the current column offset of the last line, and prepend some padding before doc_wrap().
* fix(extmarks): blending space shouldn't overwrite wide char (#26960)zeertzjq2024-01-09
|
* refactor(drawline): remove unused save_extra argument (#26959)zeertzjq2024-01-09
|
* fix(extmarks): handle overwriting right half of wide char (#26951)zeertzjq2024-01-09
|
* Merge pull request #26872 from bfredl/fillscharbfredl2024-01-08
|\ | | | | refactor(options): use schar_T for fillchars and listchars
| * refactor(options): use schar_T representation for fillchars and listcharsbfredl2024-01-08
|/ | | | | | | | | | | A bit big, but practically it was a lot simpler to change over all fillchars and all listchars at once, to not need to maintain two parallel implementations. This is mostly an internal refactor, but it also removes an arbitrary limitation: that 'fillchars' and 'listchars' values can only be single-codepoint characters. Now any character which fits into a single screen cell can be used.
* docs(treesitter): improve 'no parser' error message for InspectTreeJongwook Choi2024-01-08
| | | | | | | | | | | | | Improve error messages for `:InspectTree`, when no parsers are available for the current buffer and filetype. We can show more informative and helpful error message for users (e.g., which lang was searched for): ``` ... No parser available for the given buffer: +... no parser for 'custom_ft' language, see :help treesitter-parsers ``` Also improve the relevant docs for *treesitter-parsers*.
* fix(tui): use buflen to calculate remaining buffer size (#26942)James McCoy2024-01-07
| | | buf is a pointer argument, not a local char array, so sizeof(buf) is just the size of a pointer type on the platform. This is always an incorrect value, but on 32-bit platforms it actually has an impact, since sizeof(buf) is just 4 and causes the buffer to get truncated.
* fix(defaults): use augroup for default autocommands (#26933)Gregory Anders2024-01-06
|
* fix(highlight): update `IncSearch` to link to `CurSearch`Evgeni Chasnovski2024-01-06
| | | | | | | | Problem: `IncSearch` is currently linked to `Search` which makes it not usable for its purpose of showing current match with 'incsearch' and confirming matches after `:s///c`. Solution: Link it to `CurSearch`.
* Merge pull request #26913 from jamessan/execl-fixJames McCoy2024-01-06
|\ | | | | fix(test/tui_spec): pass the expected NULL-sentinel to execl()
| * fix(test/tui_spec): pass the expected NULL-sentinel to execl()James McCoy2024-01-06
| | | | | | | | | | | | | | | | | | | | | | | | Since execl() is a variadic function, it requries a NULL-terminal to indicate the end of its argument list, c.f. exec(3) > The first argument, by convention, should point to the filename > associated with the file being executed. The list of arguments *must* > be terminated by a null pointer This fixes the failure seen on aarch64 and i386, due to garbage data being considered part of the variadic arguments.
* | docs(luvref): update to version bumpChristian Clason2024-01-06
| |
* | build(deps): bump luv to 1.47.0-0Christian Clason2024-01-06
|/
* vim-patch:9.1.0014: incorrect use of W_WINROW in edit.c (#26910)zeertzjq2024-01-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: incorrect use of W_WINROW in edit.c Solution: compare against curwin->w_height instead Remove incorrect use of W_WINROW In structs.h it is mentioned that w_wrow is relative to w_winrow, so using W_WINROW doesn't make sense when comparing with window height. This change won't lead to any observable behavior change: The condition intends to check if there are 'scrolloff' lines between the current cursor when the bottom of the window. When W_WINROW(curwin) is added to curwin->w_height - 1 - get_scrolloff_value(), the condition is instead satisfied when the cursor is on some screen line below that position. However, - If 'scrolloff' is smaller than half the window height, this condition can only be satisfied when W_WINROW(curwin) == 0. And if it is not satisfied, update_topline() does the actual scrolling. - If 'scrolloff' is larger than half the window height, update_topline() will put the cursor at the center of the window soon afterwards anyway, because set_topline() now unsets VALID_TOPLINE flag starting from https://github.com/vim/vim-history/commit/7db7bb45b0f919ff0615d463ebd4fde881c69d1f. To put it in another way, https://github.com/vim/vim-history/commit/7db7bb45b0f919ff0615d463ebd4fde881c69d1f makes the update_topline() just below correct the mistakes made in this block, so this incorrect use of W_WINROW() no longer affects observable behavior. closes: vim/vim#12331 https://github.com/vim/vim/commit/b1ed7ec9f7d1a0142d4f1c8c83bab9172bc92c7c
* Merge pull request #26909 from zeertzjq/vim-9.1.0007zeertzjq2024-01-06
|\ | | | | vim-patch:9.1.{0007,0012}: can select empty inner text blocks
| * vim-patch:9.1.0012: regression with empty inner blocks introducedzeertzjq2024-01-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: regression with empty inner blocks introduced (after v9.1.0007) Solution: Set correct cursor position, Check for visual mode being active (Maxim Kim) relates: vim/vim#13514 closes: vim/vim#13819 https://github.com/vim/vim/commit/3779516988f14f2070d827514c79383334a0946b Co-authored-by: Maxim Kim <habamax@gmail.com>
| * vim-patch:9.1.0007: can select empty inner text blockszeertzjq2024-01-06
|/ | | | | | | | | | | | | | | Problem: can select empty inner text blocks (laurentalacoque) Solution: make selecting empty inner text blocks an error textobjects: Make selecting inner empty blocks an error fixes: vim/vim#13514 closes: vim/vim#13523 https://github.com/vim/vim/commit/ad4d7f446dc6754bde212234d46f4849b520b6e0 Co-authored-by: Christian Brabandt <cb@256bit.org>
* fix(test): call separate_arguments() correctly to honor $BUSTED_ARGS (#26905)James McCoy2024-01-05
| | | | | separate_arguments() doesn't operate in place on a variable. It expects a string argument to parse and stores the results in the specified variable.
* refactor: move structs from regexp_defs.h to regexp.c (#26899)zeertzjq2024-01-05
| | | | These structs are only used in other source files as pointers and their fields aren't accessed in other source files.
* fix(column): fill 'statuscolumn' clickdefs with evaluated width (#26891)luukvbaal2024-01-05
|
* fix(terminal): check if mouse on statusline/tabline/winbar/vsep (#26892)zeertzjq2024-01-05
|
* vim-patch:9.1.0010: Keymap completion is not available (#26888)zeertzjq2024-01-05
| | | | | | | | | | | | | Problem: Keymap completion is not available Solution: Add keymap completion (Doug Kearns) Add keymap completion to the 'keymap' option, user commands and builtin completion functions. closes: vim/vim#13692 https://github.com/vim/vim/commit/81642d9d6ff5cd6a90a012b1b98632ce51eeb1a8 Co-authored-by: Doug Kearns <dougkearns@gmail.com>
* fix(health): fix tmux RGB capability detection (#26886)Tristan Partin2024-01-04
| | | | | | | tmux indicates its RGB support via setrgbb and setrgbf. In modern tmux code, Tc and RGB just set setrgbb and setrgbf, so we can just check for them. Link: https://github.com/tmux/tmux/commit/7eb496c00c313c2f8ab8debe6d154d5ac0db277b
* Merge pull request #26791 from wookayin/gendocLewis Russell2024-01-04
|\ | | | | refactor(gen_vimdoc): general refactoring on vimdoc generation
| * fix(gen_vimdoc): INCLUDE_DEPRECATED not generating docs for deprecatedsJongwook Choi2024-01-02
| | | | | | | | | | | | Since some point INCLUDE_DEPRECATED stopped working as it is usually turned off when generating an actual vimdoc. This commit fixes this hidden feature back again (used for devel purposes only).
| * refactor(gen_vimdoc): refactor section and defgroup doc generationJongwook Choi2024-01-02
| | | | | | | | | | | | | | | | | | | | Problem: main() has too much logic implemented there, too difficult to read. Solution: Do more OOP, introduce `Section` dataclass that stores information about a "section", with documentation and concrete examples about what each field and variable would mean. Extract all the lines for rendering a section into `section.render()` pulled out of `main()`.
| * refactor(gen_vimdoc): generate function doc from metadata, not from xmlJongwook Choi2024-01-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: For function definitions to be included in the vimdoc (formatted) and to be exported as mpack data (unformatted), we had two internal representations of the same function/API metadata in duplicate; one is FunctionDoc (which was previously a dict), and the other is doxygen XML DOM from which vimdoc (functions sections) was generated. Solution: We should have a single path and unified data representation (i.e. FunctionDoc) that contains all the metadata and information about function APIs, from which both of mpack export and vimdoc are generated. I.e., vimdocs are no longer generated directly from doxygen XML nodes, but generated via: (XML DOM Nodes) ------------> FunctionDoc ------> mpack (unformatted) Recursive Internal | Formatting Metadata +---> vimdoc (formatted) This refactoring eliminates the hacky and ugly use of `fmt_vimhelp` in `fmt_node_as_vimhelp()` and all other helper functions! This way, `fmt_node_as_vimhelp()` can simplified as it no longer needs to handle generating of function docs, which needs to be done only in the topmost level of recursion.
| * fix(docs): clean up non-docstring comments for vimdoc genJongwook Choi2024-01-02
| | | | | | | | | | These non-docstring comments can be included into doxygen's brief description and then appear in the succeeding function documentation.
| * refactor(gen_vimdoc): use typing for function API vimdoc generationJongwook Choi2024-01-02
| |
| * refactor(gen_vimdoc): use stronger typing for CONFIG, avoid dictJongwook Choi2024-01-02
| |
* | refactor(column): define and use maximum 'statuscolumn' widthLuuk van Baal2024-01-04
| | | | | | | | | | Problem: The maximum 'statuscolumn' width and grow behavior is undocumented. Solution: Define, use and document the maximum 'statuscolumn' width and grow behavior.
* | fix(decorations): incompletely displayed line should also get decorationsJaehwang Jung2024-01-04
| |
* | fix(decorations): validate botline for on_winJaehwang Jung2024-01-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Many decoration providers (treesitter injection highlighting, semantic token highlighting, inlay hint) rely on the correctness of the `botline` argument of `on_win` callback. However, `botline` can be smaller than the actual line number of the last displayed line if some lines are folded. In such cases, some decorations will be missing in the lines not covered by `botline`. Solution: Validate `botline` when invoking `on_win`. NOTE: It seems that the old code was deliberately avoiding this presumably due to performance reasons. However, I haven't experienced noticeable lag after this change, and I believe the cost of botline computation would be much smaller than the cost of decoration providers.
* | vim-patch:d94ca966ca6dChristian Clason2024-01-04
| | | | | | | | | | | | | | | | | | | | runtime(fortran): syntax and documentation updates (vim/vim#13811) closes: vim/vim#13802 https://github.com/vim/vim/commit/d94ca966ca6d85d3dd03c8b68ff6a4cbae4da1af Co-authored-by: Ajit-Thakkar <142174202+Ajit-Thakkar@users.noreply.github.com>
* | vim-patch:b1392bee701dChristian Clason2024-01-04
| | | | | | | | | | | | | | | | | | | | runtime(doc): document that the diff filetype uses Diff hl groups related: vim/vim#13776 https://github.com/vim/vim/commit/b1392bee701d887b66b596c9af26bfcb6f0614b8 Co-authored-by: Christian Brabandt <cb@256bit.org>
* | vim-patch:80beeef0c6a4Christian Clason2024-01-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | runtime(vim): Add support for <ScriptCmd> syntax (vim/vim#10686) Adding `<ScriptCmd>` to list of angle-bracket notation syntax, just like `<Cmd>` `<Cmd>` is already highlighted. ```vim nnoremap <leader>o <Cmd>Oldfiles()<CR> ``` `<ScriptCmd>` is not. https://github.com/vim/vim/commit/80beeef0c6a4c44b190631725bce3dcc5635e3ee Co-authored-by: dezza <402927+dezza@users.noreply.github.com>
* | vim-patch:d4634a26cdcdChristian Clason2024-01-04
| | | | | | | | | | | | | | | | runtime(vim): Add support for `syntax foldlevel` command (vim/vim#6182) https://github.com/vim/vim/commit/d4634a26cdcdbd0f22ec608bb4954cd7eb8db528 Co-authored-by: Brad King <brad.king@kitware.com>
* | vim-patch:9.1.0001: when closing window, wincmd p may failChristian Clason2024-01-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Avoid `prevwin == curwin` when closing `curwin` Problem: When closing the current window (or when moving it to a tabpage), the previous window may refer to the new current window (`winnr() == winnr('#')`) if that window is selected as the new current window. Solution: Set `prevwin = NULL` when switching away from an invalid `curwin` and the target window was the `prevwin`. (Sean Dewar) related: vim/vim#4537 closes: vim/vim#13762 https://github.com/vim/vim/commit/bf44b69d1f91d9778ae1887128c63d35d9a3d19b Co-authored-by: Sean Dewar <seandewar@users.noreply.github.com>
* | vim-patch:9.1.0004: reloading colorscheme when not changing 'background' ↵zeertzjq2024-01-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#26877) Problem: reloading colorscheme when not changing 'background' Solution: Check, if the background option value actually changed, if not, return early. Only reload colorscheme when bg is changed Currently the highlight groups are re-initialized and the colorscheme (if any) is reloaded anytime 'background' is set, even if it is not changed. This is unnecessary, because if the value was not changed then there is no need to change highlight groups or do anything with the colorscheme. Instead, only reload the colorscheme if the value of 'background' was actually changed. closes: vim/vim#13700 https://github.com/vim/vim/commit/83ad2726ff56db70cb2da78e1e4ea0e09941c73b Co-authored-by: Gregory Anders <greg@gpanders.com>
* | vim-patch:9.1.0002: a closing fold expr, may start a new fold (#26876)zeertzjq2024-01-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: a closing fold expression may unexpectedly start a new fold when it should end a fold (reported by Shota Nozaki) Solution: if a fold hasn't started yet, do not immediately start a new fold with level 1 (Shota Nozaki) fixes: vim/vim#12768 closes: vim/vim#13748 https://github.com/vim/vim/commit/0689b870595c687a23e102913ce5037f65d03748 Co-authored-by: Shota Nozaki <emonkak@gmail.com>
* | feat(lua): add noref to deepcopyLewis Russell2024-01-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Currently `deepcopy` hashes every single tables it copies so it can be reused. For tables of mostly unique items that are non recursive, this hashing is unnecessarily expensive Solution: Port the `noref` argument from Vimscripts `deepcopy()`. The below benchmark demonstrates the results for two extreme cases of tables of different sizes. One table that uses the same table lots of times and one with all unique tables. | test | `noref=false` (ms) | `noref=true` (ms) | | -------------------- | ------------------ | ----------------- | | unique tables (50) | 6.59 | 2.62 | | shared tables (50) | 3.24 | 6.40 | | unique tables (2000) | 23381.48 | 2884.53 | | shared tables (2000) | 3505.54 | 14038.80 | The results are basically the inverse of each other where `noref` is much more performance on tables with unique fields, and `not noref` is more performant on tables that reuse fields.
* | Merge #26398 lintlua for test/ dirJustin M. Keyes2024-01-03
|\ \
| * | refactor: format test/*Justin M. Keyes2024-01-03
| | |
| * | build: enable lintlua for test/ dirJustin M. Keyes2024-01-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Not all Lua code is checked by stylua. Automating code-style is an important mechanism for reducing time spent on accidental (non-essential) complexity. Solution: - Enable stylua for entire `test/` directory. - Exclude these high-churn files until this issue is resolved: https://github.com/JohnnyMorganz/StyLua/issues/829 ``` test/functional/ui/decorations_spec.lua | 3560 ++++++++++++++++++++++++++++++++++++---------------- test/functional/ui/float_spec.lua | 5826 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------------- test/functional/ui/multigrid_spec.lua | 1349 ++++++++++++++------ ``` - Make surgical changes to these files (or add `stylua: ignore` in some small scopes) to improve the result: ``` test/functional/vimscript/msgpack_functions_spec.lua | 1414 +++++++++++++++------ test/functional/api/buffer_spec.lua | 1389 +++++++++++---------- test/functional/api/vim_spec.lua | 2740 +++++++++++++++++++++++----------------- ``` - These "high churn" files are NOT excluded because the changes are largely an improvement: ``` test/functional/plugin/lsp_spec.lua | 2198 ++++++++++++++++++--------------- test/functional/plugin/shada_spec.lua | 4078 +++++++++++++++++++++++++++++++++++------------------------- test/functional/ui/cmdline_spec.lua | 1199 +++++++++++------- test/functional/ui/popupmenu_spec.lua | 1267 +++++++++++-------- test/functional/ui/messages_spec.lua | 1643 +++++++++++++++--------- ``` - TODO: how to check "all directories"? With `GLOB_DIRS *` and `/.deps/` (or `.deps/`) in `.styluaignore`, Lua code in `.deps/` is still checked...
* | | Merge pull request #26860 from sus-domesticus/fix/clangdzeertzjq2024-01-03
|\ \ \ | |/ / |/| | fix/clangd (check size of array before applying qsort on it; set block pointer to null in case map is empty)
| * | fix(clangd): set block pointer to null in case map is emptysus-domesticus2024-01-03
| | |
| * | fix(clangd): check size of array before applying qsort on itsus-domesticus2024-01-02
| | |