aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAge
...
| * | | refactor(options): remove unnecessary call to `find_option()` (#31088)Famiu Haque2024-11-06
| |/ /
| * | feat(options)!: disallow setting hidden options #28400Famiu Haque2024-11-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: There are three different ways of marking an option as hidden, `enable_if = false`, `hidden = true` and `immutable = true`. These also have different behaviors. Options hidden with `enable_if = false` can't have their value fetched using Vim script or the API, but options hidden with `hidden = true` or `immutable = true` can. On the other hand, options with `hidden = true` do not error when trying to set their value, but options with `immutable = true` do. Solution: Remove `enable_if = false`, remove the `hidden` property for options, and use `immutable = true` to mark an option as hidden instead. Also make hidden option variable pointers always point to the default value, which allows fetching the value of every hidden option using Vim script and the API. This does also mean that trying to set a hidden option will now give an error instead of just being ignored.
| * | feat(editor): handle new multibyte sequences in normal mode replacementbfredl2024-11-04
| | | | | | | | | | | | | | | | | | | | | while the implementation is not tied to screen chars, it is a reasonable expectation to support the same size. If nvim is able to display a multibyte character, it will accept the same character as input, including in normal mode commands like r{char}
| * | vim-patch:9.1.0835: :setglobal doesn't work properly for 'ffu' and 'tsrfu'zeertzjq2024-11-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: :setglobal doesn't work properly for 'ffu' and 'tsrfu' when the local value is set (after v9.1.0831) Solution: Check os_flags instead of buffer option variable (zeertzjq). closes: vim/vim#15980 https://github.com/vim/vim/commit/6eda269600b5ca952f28e808c662f67e581933d7
| * | vim-patch:9.1.0832: :set doesn't work for 'cot' and 'bkc' after :setlocalzeertzjq2024-11-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: :set doesn't work for 'cot' and 'bkc' after :setlocal. Solution: clear the local flags when using :set (zeertzjq). closes: vim/vim#15981 https://github.com/vim/vim/commit/46dcd84d242db6b053cb5b777c896cede9ad9b27
| * | vim-patch:9.1.0831: 'findexpr' can't be used as lambad or Funcref (#31058)zeertzjq2024-11-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: 'findexpr' can't be used for lambads (Justin Keyes) Solution: Replace the findexpr option with the findfunc option (Yegappan Lakshmanan) related: vim/vim#15905 closes: vim/vim#15976 https://github.com/vim/vim/commit/a13f3a4f5de9c150f70298850e34747838904995 Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
| * | vim-patch:9.1.0830: using wrong highlight group for spaces for popupmenu ↵zeertzjq2024-11-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#31054) Problem: using wrong highlight group for spaces for popupmenu Solution: use original attribute instead of combined attributed (glepnir) closes: vim/vim#15978 https://github.com/vim/vim/commit/bc10be7a4060748ed1876ab91cf53a2a8701ac13 Co-authored-by: glepnir <glephunter@gmail.com>
| * | refactor(options): remove `get_option_value_strict`Famiu Haque2024-11-02
| |/ | | | | | | | | | | Problem: `get_option_value_for` can perfectly replace `get_option_value_strict`, making the latter redundant. Solution: Remove `get_option_value_strict`
| * fix(lua): show stacktrace for error in vim.on_key() callback (#31021)zeertzjq2024-11-02
| |
| * refactor(options): unify `put_set(num|bool|string)` (#30993)Famiu Haque2024-11-02
| | | | | | | | | | | | | | | | | | | | | | | | | | Problem: There are three separate functions for printing the `:set` command for an setting an option to a file descriptor. These functions are used when creating the session file for an option. Having a function for each type increase code duplication and also makes it harder to add logic for new option types. Solution: Replace `put_set(num|bool|string)` with a single `put_set` function which works for all option types, this reduces code duplication and also makes it trivial to add support for more option types in the future.
| * vim-patch:b5e7da1: runtime(doc): mention 'iskeyword' at :h charclass() (#31026)zeertzjq2024-11-01
| | | | | | | | | | | | | | fixes: vim/vim#15965 https://github.com/vim/vim/commit/b5e7da1f27241f7d770d342009e2fb443e45e6ce Co-authored-by: Christian Brabandt <cb@256bit.org>
| * vim-patch:9.1.0824: too many strlen() calls in register.c (#31022)zeertzjq2024-11-01
| | | | | | | | | | | | | | | | | | | | | | Problem: too many strlen() calls in register.c Solution: refactor code, add string_T struct to keep track of string lengths (John Marriott) closes: vim/vim#15952 https://github.com/vim/vim/commit/79f6ffd388299ef3b1c95cbe658785e6e66df144 Co-authored-by: John Marriott <basilisk@internode.on.net>
| * feat(lua): allow vim.on_key() callback to consume the key (#30939)errael2024-11-01
| |
| * feat(highlight): make `PmenuMatch` and `PmenuMatchSel` boldEvgeni Chasnovski2024-10-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: both `PmenuMatch` and `PmenuMatchSel` can provide helpful information about characters which actually match query in completion candidates. This is not as useful with default regular match, but much more useful with 'completopt+=fuzzy'. Solution: make both highlight groups bold. This will also affect (i.e. benefit) other color schemes which do not define groups separately. This is possible since the recently merged changes to `PmenuMatch` and `PmenuMatchSel` combine attributes with underlying "base" groups. See PR 29980.
| * vim-patch:9.1.0822: topline might be changed in diff mode unexpectedly (#30988)zeertzjq2024-10-30
| | | | | | | | | | | | | | | | | | | | | | | | | | Problem: topline might be changed in diff mode unexpectedly (Jaehwang Jung) Solution: do not re-calculate topline, when using line() func in diff mode. fixes: vim/vim#15812 closes: vim/vim#15950 https://github.com/vim/vim/commit/05a40e07c2f0e41b708c4c75a6aa7d0e7f6201a3 Co-authored-by: Christian Brabandt <cb@256bit.org>
| * docs(options): shell-powershell #30969Kai Moschcau2024-10-29
| | | | | | | | | | | | | | `-NonInteractive` at least somewhat hints to pwsh/powershell, that shell sessions created from :! are not interactive, though even that is not foolproof, because powershell is weird. `$PSStyle.OutputRendering='plaintext'` causes pwsh/powershell to omit ANSI escape sequences in its output.
| * vim-patch:9.1.0821: 'findexpr' completion doesn't set v:fname to cmdline ↵zeertzjq2024-10-29
| | | | | | | | | | | | | | | | | | | | | | argument Problem: 'findexpr' completion doesn't set v:fname to cmdline argument. Solution: Set v:fname to the cmdline argument as-is (zeertzjq). closes: vim/vim#15934 https://github.com/vim/vim/commit/20e045f78148c0ef0143c33ffe686fee72d29376
| * vim-patch:9.1.0811: :find expansion does not consider 'findexpr'zeertzjq2024-10-29
| | | | | | | | | | | | | | | | | | | | | | | | Problem: :find expansion does not consider 'findexpr' Solution: Support expanding :find command argument using 'findexpr' (Yegappan Lakshmanan) closes: vim/vim#15929 https://github.com/vim/vim/commit/2f6efaccfd5c4e7df1f54ed0f41f329abbe05f60 Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
| * vim-patch:9.1.0810: cannot easily adjust the |:find| commandzeertzjq2024-10-29
| | | | | | | | | | | | | | | | | | | | | | | | Problem: cannot easily adjust the |:find| command Solution: Add support for the 'findexpr' option (Yegappan Lakshmanan) closes: vim/vim#15901 closes: vim/vim#15905 https://github.com/vim/vim/commit/aeb1c97db5b9de4f4903e7f288f2aa5ad6c49440 Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
| * refactor: sort various Lua tables in src/ alphabetically (#30977)zeertzjq2024-10-29
| |
| * refactor(options): option flags enum #30961Famiu Haque2024-10-28
| | | | | | | | | | Problem: Currently we use macros with hardcoded flag values for option flags, which is messy and requires a lot of mental math for adding / removing option flags. Using macros for option flags also means that they cannot be used inside debuggers. Solution: Create a new `OptFlags` enum that stores all the option flags in an organized way that is easier to understand.
| * fix(pum): don't select item when clicking to the left/right (#30967)zeertzjq2024-10-28
| | | | | | | | | | | | | | Problem: Selecting an item in the right-click menu when clicking to the left/right of it is confusing, especially in a UI that doesn't support 'mousemoveevent'. Solution: Don't select an item when clicking to the left/right of the right-click menu.
| * fix(treesitter): correct condition in `__has_ancestor`Amaan Qureshi2024-10-27
| |
| * refactor(options): always allocate option values (#30917)Famiu Haque2024-10-27
| | | | | | | | | | | | | | Instead of keeping `P_ALLOCED` and `P_DEF_ALLOCED` flags to check if an option value is allocated, always allocate option values to simplify the logic. Ref: #25672
| * refactor(lsp): drop str_byteindex/str_utfindex wrappers #30915Tristan Knight2024-10-26
| | | | | | | | | | * deprecate old signatures * move to new str_byteindex/str_utfindex signature * use single-underscore name (double-underscore is reserved for Lua itself)
| * refactor(options)!: use OptVal for option defaults #26691Famiu Haque2024-10-25
| | | | | | | | | | | | | | | | | | Problem: We use `void *` for option default values, which is confusing and can cause problems with type-correctness. It also doesn't accomodate for multitype options. On top of that, it also leads to default boolean option values not behaving correctly on big endian systems. Solution: Use `OptVal` for option default values. BREAKING CHANGE: - `:set {option}<` removes the local value for all global-local options instead of just string global-local options. - `:setlocal {option}<` copies the global value to the local value for number and boolean global-local options instead of removing the local value.
| * vim-patch:9.1.0814: mapset() may remove unrelated mapping (#30941)zeertzjq2024-10-24
| | | | | | | | | | | | | | | | | | Problem: mapset() may remove unrelated mapping whose {rhs} matches the restored mapping's {lhs}. Solution: only match by {lhs} when unmapping for mapset() (zeertzjq). closes: vim/vim#15935 https://github.com/vim/vim/commit/fdf135a0525746cc0ff85bed2fbbde320ddb6d0d
| * fix(options): missing error check for global 'scl' and 'winhl' (#30919)zeertzjq2024-10-24
| |
| * vim-patch:9.1.0812: Coverity warns about dereferencing NULL ptrzeertzjq2024-10-24
| | | | | | | | | | | | | | | | | | | | | | | | Problem: Coverity warns about dereferencing NULL ptr in check_colorcolumn() Solution: verify that wp is not null before accessing it related: vim/vim#15914 https://github.com/vim/vim/commit/d0809869d6445faecd323fb33dc271d8c74a94fb Co-authored-by: Christian Brabandt <cb@256bit.org>
| * vim-patch:9.1.0806: tests: no error check when setting global 'briopt'zeertzjq2024-10-24
| | | | | | | | | | | | | | | | | | | | | | Problem: tests: no error check when setting global 'briopt' Solution: also parse and check global 'briopt' value (Milly) closes: vim/vim#15911 https://github.com/vim/vim/commit/b38700ac81d90a652e5c8495056dd78df5babdde Co-authored-by: Milly <milly.ca@gmail.com>
| * vim-patch:9.1.0804: tests: no error check when setting global 'cc'zeertzjq2024-10-24
| | | | | | | | | | | | | | | | | | | | | | Problem: tests: no error check when setting global 'cc' Solution: also parse and check global 'cc' value (Milly) closes: vim/vim#15914 https://github.com/vim/vim/commit/a441a3eaabbfc14b4772e07ecbecaaff3bd06a58 Co-authored-by: Milly <milly.ca@gmail.com>
| * vim-patch:9.1.0803: tests: no error check when setting global 'isk'zeertzjq2024-10-24
| | | | | | | | | | | | | | | | | | | | | | Problem: tests: no error check when setting global 'isk' Solution: also parse and check global 'isk' value (Milly) closes: vim/vim#15915 https://github.com/vim/vim/commit/5e7a6a4a106923e45c67dae6810e4c9753f88025 Co-authored-by: Milly <milly.ca@gmail.com>
| * vim-patch:9.1.0802: tests: no error check when setting global 'fdm' to empty ↵zeertzjq2024-10-24
| | | | | | | | | | | | | | | | | | | | | | | | | | value Problem: tests: no error check when setting global 'fdm' to empty value Solution: Also check global 'fdm' value for being empty (Milly). closes: vim/vim#15916 https://github.com/vim/vim/commit/142cad1f88d1d3aa34b6050151e620b66185112e Co-authored-by: Milly <milly.ca@gmail.com>
| * feat(stdlib): overload vim.str_byteindex, vim.str_utfindex #30735Tristan Knight2024-10-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PROBLEM: There are several limitations to vim.str_byteindex, vim.str_utfindex: 1. They throw given out-of-range indexes. An invalid (often user/lsp-provided) index doesn't feel exceptional and should be handled by the caller. `:help dev-error-patterns` suggests that `retval, errmsg` is the preferred way to handle this kind of failure. 2. They cannot accept an encoding. So LSP needs wrapper functions. #25272 3. The current signatures are not extensible. * Calling: The function currently uses a fairly opaque boolean value to indicate to identify the encoding. * Returns: The fact it can throw requires wrapping in pcall. 4. The current name doesn't follow suggestions in `:h dev-naming` and I think `get` would be suitable. SOLUTION: - Because these are performance-sensitive, don't introduce `opts`. - Introduce an "overload" that accepts `encoding:string` and `strict_indexing:bool` params. ```lua local col = vim.str_utfindex(line, encoding, [index, [no_out_of_range]]) ``` Support the old versions by dispatching on the type of argument 2, and deprecate that form. ```lua vim.str_utfindex(line) -- (utf-32 length, utf-16 length), deprecated vim.str_utfindex(line, index) -- (utf-32 index, utf-16 index), deprecated vim.str_utfindex(line, 'utf-16') -- utf-16 length vim.str_utfindex(line, 'utf-16', index) -- utf-16 index vim.str_utfindex(line, 'utf-16', math.huge) -- error: index out of range vim.str_utfindex(line, 'utf-16', math.huge, false) -- utf-16 length ```
| * docs: miscdundargoc2024-10-23
| | | | | | | | | | | | | | Co-authored-by: David Pedersen <limero@me.com> Co-authored-by: Gregory Anders <greg@gpanders.com> Co-authored-by: Leo Schlosser <Leo.Schlosser@Student.HTW-Berlin.de> Co-authored-by: zeertzjq <zeertzjq@outlook.com>
| * test: port libvterm unit test to neovim test suitedundargoc2024-10-22
| | | | | | | | | | | | | | These were imported from the v0.3.3 git tag https://github.com/neovim/libvterm/tree/v0.3.3 and not the latest commit. This is for compatibility reasons as the libvterm code was imported from v0.3.3.
| * fix(options): fix 'winhl' still accepting invalid value (#30896)zeertzjq2024-10-22
| |
| * refactor(eval): fix clear_evalarg() called with wrong argument (#30899)zeertzjq2024-10-22
| |
| * vim-patch:9.1.0798: too many strlen() calls in cmdhist.c (#30895)zeertzjq2024-10-22
| | | | | | | | | | | | | | | | | | | | | | Problem: too many strlen() calls in cmdhist.c Solution: refactor code and remove strlen() calls (John Marriott) closes: vim/vim#15888 https://github.com/vim/vim/commit/8df07d0ca310a55e1540f7d234b536abee49abd4 Co-authored-by: John Marriott <basilisk@internode.on.net>
| * fix(options): fix :setglobal not working for 'spelloptions' (#30894)zeertzjq2024-10-22
| |
| * vim-patch:9.1.0797: testing of options can be further improved (#30893)zeertzjq2024-10-22
| | | | | | | | | | | | | | | | | | | | | | Problem: testing of options can be further improved Solution: split the generated option test into test_options_all.vim, add more test cases, save and restore values, fix use-after-free closes: vim/vim#15894 https://github.com/vim/vim/commit/6eca04e9f1d446dc509ba51e32da56fa413fe2f0 Co-authored-by: Milly <milly.ca@gmail.com>
| * fix(meta): do not use hyphens in param namesLewis Russell2024-10-21
| | | | | | | | Fixes #30882
| * fix(exit): close memfiles after processing events (#30872)zeertzjq2024-10-21
| | | | | | | | | | Problem: When exiting, processed events may still use memfiles after they are closed. Solution: Close memfiles after processing events.
| * feat(float): allow enabling mouse for non-focusable window (#30844)zeertzjq2024-10-20
| | | | | | | | Problem: Cannot allow mouse interaction for non-focusable float window. Solution: Add a "mouse" field to float window config.
| * feat(terminal)!: make 'belloff' and 'visualbell' apply to terminal bell (#30859)zeertzjq2024-10-20
| | | | | | | | | | | | | | vim-patch:8.2.4744: a terminal window can't use the bell vim-patch:8.2.4745: using wrong flag for using bell in the terminal BREAKING CHANGE: Bells from :terminal are now silent by default, unless 'belloff' option doesn't contain "term" or "all".
| * fix(options): fix some 'belloff' flags not working properly (#30856)zeertzjq2024-10-18
| | | | | | | | Problem: Some 'belloff' flags don't work properly. Solution: Keep BO_ flags and p_bo_values[] in sync.
| * Merge pull request #30825 from lewis6991/refactor/lsputilLewis Russell2024-10-17
| |\
| | * feat(meta): add type for quickfix entriesLewis Russell2024-10-17
| | |
| * | vim-patch:6c2fc37: runtime(help): Update help syntaxzeertzjq2024-10-17
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit makaes the following changes to the vim help syntax: - fix excessive URL detection in help, because `file:{filename}` in doc/options.txt is determined to be a URL. - update highlighting N for :resize in help - split Italian-specific syntax into separate help script - highlight `Note` in parentheses in help - update 'titlestring' behaviour in documentation for invalid '%' format closes: vim/vim#15883 https://github.com/vim/vim/commit/6c2fc377bfbfb6f1a46b1061413cd21116b596ed Co-authored-by: Milly <milly.ca@gmail.com>
| * fix(runtime): clean up one-off scriptsChristian Clason2024-10-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Some runtime files no longer spark joy. Solution: Kondo the place up. Still sparks _some_ joy (moved to new `runtime/scripts` folder): * `macros/less.*` * `mswin.vim` * `tools/emoji_list.lua` No longer sparks joy (removed): * `macmap.vim` (gvimrc file; not useful in Nvim) * `tools/check_colors.vim` (no longer useful with new default colorscheme and treesitter) * `macros/editexisting.vim` (throws error on current Nvim) * `macros/justify.vim` (obsolete shim for `packadd! justify`) * `macros/matchit.vim` (same) * `macros/shellmenu.vim` (same) * `macros/swapmous.vim` (same)