aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
...
| * | | | | | | fix(ui_client): check return value of channel_job_start (#27729)Sean Dewar2024-03-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: null pointer member access in ui_client_start_server if channel_job_start returns NULL. Solution: check for it, return 0 in that case (which is already used to indicate failure and is handled by main). Happened on Linux when trying to run Nvim in an old gdbserver instance after having rebuilt Nvim since. This gave E903 (the nvim binary was deleted, so " (deleted)" appears as a suffix in the `v:progpath`, making it invalid), then ASAN complains due to the NPD; instead it now then prints "Failed to start Nvim server!", as expected.
| * | | | | | | fix(tohtml): replace hex escape with digit escape (#27728)altermo2024-03-04
| | | | | | | |
| * | | | | | | docs(lua): clarify when `vim.bo`/`vim.wo` acts like `:setlocal` (#27708)Luna Saphie Mittelbach2024-03-04
| | | | | | | |
| * | | | | | | Merge pull request #27724 from zeertzjq/vim-c4aef9a97b36zeertzjq2024-03-04
| |\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | vim-patch:c4aef9a97b36,691aee8b0705
| | * | | | | | | vim-patch:691aee8b0705zeertzjq2024-03-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | runtime(vim): Update base-syntax, fix issue vim/vim#14135 (vim/vim#14136) Fix incorrect error highlighting for function calls in :command definitions. vimFunctionError should be restricted to :function header lines. fixes: vim/vim#14135 https://github.com/vim/vim/commit/691aee8b070506e6eea8ec166bf69d9a03002790 Co-authored-by: dkearns <dougkearns@gmail.com>
| | * | | | | | | vim-patch:c4aef9a97b36zeertzjq2024-03-04
| |/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | runtime(vim): Update base-syntax, improve :augroup highlighting (vim/vim#14125) - Explicitly match the bang and group name in :aug! {name}. - Allow any characters in a group name. - Match default group switch marker, END. - Match :aug without arguments (list command). https://github.com/vim/vim/commit/c4aef9a97b3673a12de7a131d239e7f49d11f630 Co-authored-by: dkearns <dougkearns@gmail.com>
| * | | | | | | fix(eval): correct failure return value for readfile/blob (#27722)Sean Dewar2024-03-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently returns 0 on failure, but should return an empty list (or blob). Regressed in the big blob port of '21 (#15211).
| * | | | | | | vim-patch:b3030b653bbdChristian Clason2024-03-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | runtime(java): Recognise text blocks (vim/vim#14128) Also, accept as valid the space escape sequence `\s`. Also, consistently use the claimed `javaDebug` prefix for syntax group definitions kept under `g:java_highlight_debug`. Since `javaStringError` is commented out for its generality, let's comment out `javaDebugStringError`, its copy, as well. References: https://openjdk.org/jeps/378 https://docs.oracle.com/javase/specs/jls/se17/html/jls-3.html#jls-3.10.7 Closes vim/vim#10910. https://github.com/vim/vim/commit/b3030b653bbdc08c91138001d1987d804f6ebf46 Co-authored-by: Aliaksei Budavei <32549825+zzzyxwvut@users.noreply.github.com>
| * | | | | | | build: don't allow Xcode as generatordundargoc2024-03-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Xcode does not allow having multiple targets depend on a custom command. This limitation severely hinders its usability and complying with it would likely require extensive refactoring and boilerplate. It makes more sense to simply refer users to use "Ninja" or "Unix Makefiles" instead.
| * | | | | | | vim-patch:e93afc2e6126Christian Clason2024-03-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | runtime(r,rhelp,rmd,rnoweb,rrst): Update ftplugin, browsefilter labels (vim/vim#14126) Use the standard format for browsefilter labels: "File Description (*.ext1, *.ext2, *.ext3)" https://github.com/vim/vim/commit/e93afc2e612647e79e1082096ffd6c61e01ac691 Co-authored-by: dkearns <dougkearns@gmail.com>
| * | | | | | | fix(column): full redraw with 'stc, 'rnu' and inserted lines (#27712)luukvbaal2024-03-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Text is not redrawn with 'relativenumber' when only the 'statuscolumn' is redrawn after inserted lines. Solution: Force a full redraw if statuscolumn width changed.
| * | | | | | | fix(lsp): directly rename the existing buffers when renaming (#27690)Jaehwang Jung2024-03-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: `vim.lsp.util.rename()` deletes the buffers that are affected by renaming. This has undesireable side effects. For example, when renaming a directory, all buffers under that directory are deleted and windows displaying those buffers are closed. Also, buffer options may change after renaming. Solution: Rename the buffers with :saveas. An alternative approach is to record all the relevant states and restore it after renaming, but that seems to be more complex. In fact, the older version was attempting to restore the states but only partially and incorrectly.
| * | | | | | | Merge pull request #27687 from luukvbaal/floatposbfredl2024-03-02
| |\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | fix(float): allow floating window in cmdline area
| | * | | | | | | fix(float): allow floating window in cmdline areaLuuk van Baal2024-03-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Floats are arbitrarily positioned at 1 row above screen size. Solution: Position at 1 row above 'cmdheight', only if window is hidden behind the message area.
| * | | | | | | | fix(lsp): defer writing error msgs (#27688)Jaehwang Jung2024-03-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Context: Nvim catches errors from the user's `on_exit` and rpc handler callbacks and prints the error message. Problem: Printing the error message uses Nvim api functions. But callbacks mentioned above run in `:h lua-loop-callbacks` where most of `vim.api` is not allowed, so Nvim itself raises error. Solution: `vim.schedule()` the error reporting when necessary.
| * | | | | | | | build(deps): bump treesitter-vimdoc to v2.2.0Christian Clason2024-03-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | adds support for `{arg}?` optional arguments #27644
| * | | | | | | | vim-patch:100a665634a0Christian Clason2024-03-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | runtime(java): Improve the recognition of literals (vim/vim#14120) * Emend the Unicode and octal escape sequence patterns; * Accept the (repeated) underscore separators in all numerical literals; * Recognise hexadecimal floating-point literals. (The space escape sequence '\s' will be introduced along with text blocks in another PR.) References: https://docs.oracle.com/javase/specs/jls/se17/html/jls-3.html#jls-3.3 https://docs.oracle.com/javase/specs/jls/se17/html/jls-3.html#jls-3.10.1 https://docs.oracle.com/javase/specs/jls/se17/html/jls-3.html#jls-3.10.2 https://docs.oracle.com/javase/specs/jls/se17/html/jls-3.html#jls-3.10.7 https://github.com/vim/vim/commit/100a665634a0a2edbc755daf453c4915800684dd Co-authored-by: Aliaksei Budavei <32549825+zzzyxwvut@users.noreply.github.com>
| * | | | | | | | fix(deps): bump luv to 1.48.0-2zhaozg2024-03-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | close #27678 Return a userdata wrapper around the uv_req_t to allow it to be garbage collected before the program exits. Previously, the returned userdata held a reference to itself in the Lua registry, meaning it would never be able to be garbage collected until the process ended. This reverts commit 0e4a895, which attempted a workaround for the same underlying problem, but introduced a use-after-free. ``` Application Specific Information: abort() called Thread 0 Crashed:: Dispatch queue: com.apple.main-thread 0 libsystem_kernel.dylib 0x18cde20dc __pthread_kill + 8 1 libsystem_pthread.dylib 0x18ce19cc0 pthread_kill + 288 2 libsystem_c.dylib 0x18cd25a40 abort + 180 3 libsystem_malloc.dylib 0x18cc3cb08 malloc_vreport + 908 4 libsystem_malloc.dylib 0x18cc403f4 malloc_report + 64 5 libsystem_malloc.dylib 0x18cc54ebc find_zone_and_free + 308 6 nvim 0x100eb13b8 uv__fs_scandir_cleanup + 84 7 nvim 0x100eb7e68 uv_fs_req_cleanup + 120 8 nvim 0x100e03634 luv_fs_gc + 132 9 nvim 0x100e42aec lj_BC_FUNCC + 44 10 nvim 0x100e44cc8 gc_call_finalizer + 148 (lj_gc.c:521) 11 nvim 0x100b7fdb4 nlua_push_Object + 320 (converter.c:781) 12 nvim 0x100b7fc48 nlua_push_Dictionary + 332 (converter.c:722) 13 nvim 0x100992228 nlua_api_nvim_get_mode + 160 (lua_api_c_bindings.generated.c:6379) 14 nvim 0x100e42aec lj_BC_FUNCC + 44 15 nvim 0x100e590b4 lua_pcall + 228 (lj_api.c:1150) ```
| * | | | | | | | Merge pull request #27347 from lewis6991/fswatchLewis Russell2024-03-01
| |\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | feat(lsp): add fswatch watchfunc backend
| | * | | | | | | | feat(lsp): add fswatch watchfunc backendLewis Russell2024-03-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: vim._watch.watchdirs has terrible performance. Solution: - On linux use fswatch as a watcher backend if available. - Add File watcher section to health:vim.lsp. Warn if watchfunc is libuv-poll.
| | * | | | | | | | fix(lsp): cancel watchers when closing a clientLewis Russell2024-03-01
| | | | | | | | | |
| | * | | | | | | | refactor(watch): simplify filechanges processingLewis Russell2024-03-01
| | | | | | | | | |
| | * | | | | | | | refactor(watch): general tidy upLewis Russell2024-03-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Rename watch.poll to watch.watchdirs - Unify how include and exclude is applied - Improve type hints
| * | | | | | | | | docs: improve/add documentation of Lua typesLewis Russell2024-03-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Added `@inlinedoc` so single use Lua types can be inlined into the functions docs. E.g. ```lua --- @class myopts --- @inlinedoc --- --- Documentation for some field --- @field somefield integer --- @param opts myOpts function foo(opts) end ``` Will be rendered as ``` foo(opts) Parameters: - {opts} (table) Object with the fields: - somefield (integer) Documentation for some field ``` - Marked many classes with with `@nodoc` or `(private)`. We can eventually introduce these when we want to.
| * | | | | | | | | fix(types): rename win_get_config return type to win_configWill Hopkins2024-03-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Follow-up to #27397
| * | | | | | | | | vim-patch:9.1.0146: v:echospace wrong with invalid value of 'showcmdloc' ↵zeertzjq2024-03-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#27697) Problem: v:echospace wrong after setting invalid value to 'showcmdloc'. Solution: Only call comp_col() if value is valid. (zeertzjq) closes: vim/vim#14119 https://github.com/vim/vim/commit/c27fcf4857228bc650943246ffbba444a085b3e7
| * | | | | | | | | vim-patch:87410ab3f556 (#27696)zeertzjq2024-03-02
| |/ / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | runtime(doc): some improvements to getregion() docs (vim/vim#14122) - Mention the default selection behavior - Remove useless sentence - Correct description about space padding https://github.com/vim/vim/commit/87410ab3f556121dfb3b30515f40c5f079edd004
| * / / / / / / / fix(lsp): rename undofile when renaming (#27684)Jaehwang Jung2024-03-01
| |/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: After `rename()`, the undo information for the renamed file(s) are lost. Solution: Rename the undofile as well.
| * | | | | | | vim-patch:9.1.0145: v:echospace not correct when 'showcmdloc' != last (#27682)zeertzjq2024-03-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: the amount of available space (v:echospace) on the command line is not correct when showcmdloc is drawn into the statusline or tabline. Solution: only add SHOWCMD_COLS to the shown command column when 'showcmdloc' is set to last (Sam-programs) closes: vim/vim#14108 https://github.com/vim/vim/commit/062141b1a70cf5364e6983ec901282e0111745c1 Co-authored-by: Sam-programs <130783534+Sam-programs@users.noreply.github.com>
| * | | | | | | vim-patch:9.1.0144: getregion() needs more tests (#27681)zeertzjq2024-03-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: getregion() needs more tests Solution: Run the getregion() test in both the legacy and Vim9 contexts (Yegappan Lakshmanan) closes: vim/vim#14114 https://github.com/vim/vim/commit/4d55c54e307c27600c644c6631ff673ed89dd53a Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
| * | | | | | | vim-patch:8fad5d58874eChristian Clason2024-02-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | runtime(doc,netrw): update "Last Change header", remove trailing whitespace Update Last-Change Header for netrw and doc/indent.txt, fix a trailing whitespace in indent.txt and make CI happy. https://github.com/vim/vim/commit/8fad5d58874ed724f673ac8a83739164cead3961 Co-authored-by: Christian Brabandt <cb@256bit.org>
| * | | | | | | vim-patch:b4eb3f1e4489Christian Clason2024-02-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | runtime(yaml): disable multiline_scalar detection by default There have been many complaints about Yaml indenting too much, because it considers values to be multi-line by default, which leads to unintended indenting for (apparently most) users. So let's hide this feature behind the new feature flag, keep it simple and prefer single line value key pairs by default. If you want the old behaviour, set the following value: > :let g:yaml_indent_multiline_scalar = 1 If not set, it will indent the same as the previous line. closes vim/vim#13845 https://github.com/vim/vim/commit/b4eb3f1e44896b12fdfa3885a78c6eaa181eaeff Co-authored-by: Christian Brabandt <cb@256bit.org>
| * | | | | | | vim-patch:56b7da3c051fChristian Clason2024-02-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | runtime(netrw): handle file/dir symlinks specifically in tree mode fixes: vim/vim#2386 related: vim/vim#3609 https://github.com/vim/vim/commit/56b7da3c051fe1a5fd76534998c17b22d83c0899 Co-authored-by: Christian Brabandt <cb@256bit.org>
| * | | | | | | docs(eval): getline and indent function support string typeglepnir2024-02-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: getline and indent function missing string type in param. Solution: add string type in eval gen.
| * | | | | | | fix(lsp): use plain loop for non-list-like table of protocol valuesChristian Clason2024-02-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixup for #27628 Closes #27669
| * | | | | | | vim-patch:9ecf02cd5f5fChristian Clason2024-02-29
| | |_|_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | runtime(java): Recognise _when_ clauses in _switch_ blocks Also: - distinguish _yield_ when used as a contextual keyword from when used qualified as a method or a method reference (as can be seen in testdir/input/java_switch.java, variables and method declarations named _yield_ will be recognised as the namesake keyword--consider picking other names for variables, and defining g:java_highlight_functions to have method names painted; since _yield_ statements can have trailing parens, they must be recognised as statements, for only qualified _yield_ method calls are supported); - recognise grouped _default_ _case_ labels; - describe primitive types for _case_ labels (JLS, §14.11, §3.10.1); - recognise some non-ASCII identifiers (see javaLambdaDef, javaUserLabel) (further improvement for better recognition of identifiers will be arranged in a separate PR). Because the arrow '->' is used in two kinds of expressions, lambda (abstractions) and _switch_, necessary changes were made for the recognition of either (and further improvement touching lambda expressions will be separately arranged). Because 'default' is used for instance method declarations in interfaces and in _switch_ labels, necessary changes were made for the recognition of either (and further improvement touching method declarations will be separately arranged). Finally, it deemed appropriate to put 'yield' in the syntax group of javaOperator rather than javaStatement, for its member 'var' is also another contextual keyword (e.g., this is valid syntax: "var var = var(test.var);"). References: https://openjdk.org/jeps/361 (Switch Expressions) https://openjdk.org/jeps/440 (Record Patterns) https://openjdk.org/jeps/441 (Pattern Matching for switch) Also, add a Java specific filetype plugin for the syntax test, so that no soft-wrapping of long indented lines occur. Otherwise the syntax scripts would miss a few lines during scrolling and verification of the screen dumps. closes: vim/vim#14105 https://github.com/vim/vim/commit/9ecf02cd5f5feabe096f66cd5f503a822c78793f Co-authored-by: Aliaksei Budavei <0x000c70@gmail.com>
| * | | | | | vim-patch:9.1.0143: [security]: autocmd causes use-after-free in ↵zeertzjq2024-02-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | set_curbuf() (#27664) Problem: [security]: autocmd cause use-after-free in set_curbuf() (kawarimidoll) Solution: check side-effect of BufLeave autocommand, when the number of windows changed, close windows containing buffers that will be wiped, if curbuf changed unexpectedly make sure b_nwindows is decremented otherwise it cannot be wiped set_curbuf() already makes some efforts to ensure the BufLeave autocommands do not cause issues. However there are still 2 issues that are not taken care of: 1) If a BufLeave autocommand opens a new window containing the same buffer as that is going got be closed in close_buffer() a bit later, we suddenly have another window open, containing a free'd buffer. So we must check if the number of windows changed and if it does (and the current buffer is going to be wiped (according to the 'bufhidden' setting), let's immediately close all windows containing the current buffer using close_windows() 2) If a BufLeave autocommand changes our current buffer (displays it in the current window), buf->b_nwindow will be incremented. As part of set_curbuf() we will however enter another buffer soon, which means, the newly created curbuf will have b_nwindows still have set, even so the buffer is no longer displayed in a window. This causes later problems, because it will no longer be possible to wipe such a buffer. So just before entering the final buffer, check if the curbuf changed when calling the BufLeave autocommand and if it does (and curbuf is still valid), decrement curbuf->b_nwindows. Both issues can be verified using the provided test (however the second issue only because such an impacted buffer won't be wiped, causing futher issues in later tests). fixes: vim/vim#13839 closes: vim/vim#14104 https://github.com/vim/vim/commit/55f8bba73be5f9c3a5a4d0d6c5f56e65f2c7d3fc Co-authored-by: Christian Brabandt <cb@256bit.org>
| * | | | | | refactor(defaults): use getregion() for Visual mode gx (#27663)zeertzjq2024-02-29
| | | | | | | | | | | | | | | | | | | | | Also make it work better on a multiline selection.
| * | | | | | vim-patch:9.1.0142: getregion() can be improved (#27662)zeertzjq2024-02-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: getregion() can be improved (after v9.1.120) Solution: change getregion() implementation to use pos as lists and one optional {opt} dictionary (Shougo Matsushita) Note: The following is a breaking change! Currently, the getregion() function (included as of patch v9.1.120) takes 3 arguments: the first 2 arguments are strings, describing a position, arg3 is the type string. However, that is slightly inflexible, there is no way to specify additional arguments. So let's instead change the function signature to: getregion(pos1, pos2 [, {Dict}]) where both pos1 and pos2 are lists. This is slightly cleaner, and gives us the flexibility to specify additional arguments as key/value pairs to the optional Dict arg. Now it supports the "type" key to specify the selection type (characterwise, blockwise or linewise) and now in addition one can also define the selection type, independently of what the 'selection' option actually is. Technically, this is a breaking change, but since the getregion() Vimscript function is still quite new, this should be fine. closes: vim/vim#14090 https://github.com/vim/vim/commit/19b718828d8d5fab52d94c6cdba694641879ab38 Co-authored-by: Shougo Matsushita <Shougo.Matsu@gmail.com>
| * | | | | | vim-patch:9.1.0141: Put in Visual mode wrong if it replaces fold marker (#27661)zeertzjq2024-02-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Put in Visual mode wrong if it replaces fold marker. Solution: Temporarily disable folding during put in Visual mode. (zeertzjq) fixes: vim/vim#14097 closes: vim/vim#14100 https://github.com/vim/vim/commit/4e141c66b9104136ddcf9cc240d2fbc83d825a5a
| * | | | | | docs(lpeg): remove double backticks from meta (#27659)Maria José Solano2024-02-29
| | | | | | |
| * | | | | | fix(lsp): handle reverse lookup in capabilitiesMaria José Solano2024-02-28
| | | | | | |
| * | | | | | refactor(lsp): remove outdated commentMaria José Solano2024-02-28
| | | | | | |
| * | | | | | fix(tohtml): set filetype of generated HTML to `html`Christian Clason2024-02-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: `:TOhtml` opens the generated HTML code in a split, meaning it inherits the `help` filetype if a help buffer is to be converted. Solution: Explicitly set the filetype to `html`.
| * | | | | | fix(lsp): correct the error message's cmd on spawning (#27632)notomo2024-02-28
| | | | | | |
| * | | | | | fix(lsp): remove unnecessary file load/write when renaming (#27621)Jaehwang Jung2024-02-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously rename would unconditionally read the to-be-renamed file from the disk and write it to the disk. This is redundant in some cases If the file is not already loaded, it's not attached to lsp client, so nvim doesn't need to care about this file. If the file is loaded but has no change, it doesn't need to be written.
| * | | | | | feat!: rewrite TOhtml in luaaltermo2024-02-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Co-authored-by: wookayin <wookayin@gmail.com> Co-authored-by: clason <c.clason@uni-graz.at> Co-authored-by: Lewis Russell <me@lewisr.dev>
| * | | | | | Merge pull request #27643 from bfredl/metadata2bfredl2024-02-28
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | refactor(metadata): generate all metadata in lua
| | * | | | | | refactor(metadata): generate all metadata in luabfredl2024-02-28
| |/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Then we can just load metadata in C as a single msgpack blob. Which also can be used directly as binarly data, instead of first unpacking all the functions and ui_events metadata to immediately pack it again, which was a bit of a silly walk (and one extra usecase of `msgpack_rpc_from_object` which will get yak shaved in the next PR)
| * | | | | | vim-patch:e84d2d4432cdChristian Clason2024-02-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | runtime(sh): Update ftplugin, fix vim/vim#14101 (vim/vim#14102) Add the 'b' flag to 'comments', so that the shebang line is not detected as comment. Fixes vim/vim#14101. https://github.com/vim/vim/commit/e84d2d4432cd6e43f2bb300d02abc90d551bcf4a Co-authored-by: dkearns <dougkearns@gmail.com>