aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAge
...
| * fix(api): don't try to get/set option for invalid option name (#31302)Famiu Haque2024-11-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: `validate_option_value_args()` returns `OK` even if option name is invalid or if option doesn't have the supported scope, which leads to Neovim still trying to erroneously get/set the option in those cases, which can lead to an assertion failure when `option_has_scope()` is invoked. This issue miraculously doesn't exist in release builds since the assertion is skipped and `(get/set)_option_value_for` returns if there is an error set, but that is not the intended location for that error to be caught. Solution: Make `validate_option_value_args()` return `FAIL` if there is an error set, which causes the API option functions to return early instead of trying to get/set an invalid option.
| * fix(highlight): 'winhl' shouldn't take priority over API (#31288)zeertzjq2024-11-22
| |
| * Merge pull request #31193 from bfredl/winrtbfredl2024-11-21
| |\ | | | | | | refactor(windows)!: only support UCRT, even for mingw
| | * refactor(windows)!: only support UCRT, even for mingwbfredl2024-11-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The newer UCRT runtime has native support for UTF-8, including forcing it as the active codepage even before `main()` is called. This means the c runtime will properly convert windows WCHAR:s into UTF-8 bytes, as early as the argv/argc params to `main()` . Whereas MSVCRT does not support this reliably and required us to use `wmain()`. Only MSVC supports using manifest files directly as source files. The solution for other Windows toolchains is to use a .rc file.
| * | docs: misc (#31138)dundargoc2024-11-21
| | | | | | | | | Co-authored-by: zeertzjq <zeertzjq@outlook.com>
| * | refactor(options): impl default 'titlestring' by format flags #30843zshuzh2024-11-20
| | | | | | | | | | | | | | | | | | | | | Problem: Unnecessary C impl of default 'titlestring'. Solutin: Define it using format flags.
| * | fix(messages): more ext_messages kinds #31279luukvbaal2024-11-20
| | | | | | | | | | | | Add kinds for various commands that output a list, the 'wildmode' list, and for number prompts.
| * | build(clint): make NOLINT work with header checks (#31281)zeertzjq2024-11-20
| | | | | | | | | | | | Problem: NOLINT doesn't work with header checks. Solution: Move these checks after ProcessLine() calls.
| * | fix(move): redraw for 'concealcursor' after changing w_wcol (#31276)zeertzjq2024-11-20
| | |
| * | fix(messages): no message kind for search pattern #31272Tomasz N2024-11-19
| | |
* | | Merge remote-tracking branch 'upstream/master' into mix_20240309Josh Rahm2024-11-25
|\| |
| * | vim-patch:9.1.0870: too many strlen() calls in eval.c (#31267)zeertzjq2024-11-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: too many strlen() calls in eval.c Solution: Refactor eval.c to remove calls to STRLEN() (John Marriott) closes: vim/vim#16066 https://github.com/vim/vim/commit/bd4614f43d0eac4aff743132bab8e53b015ac801 Co-authored-by: John Marriott <basilisk@internode.on.net>
| * | fix(api): nvim_get_option_value does not clean up on FileType error #31219altermo2024-11-18
| | | | | | | | | | | | | | | | | | | | | | | | Problem: If there's an error in `FileType` autocmd, the filetype get-opt buffer doesn't get cleaned up. Solution: Call `aucmd_restbuf`.
| * | fix(api): only flush nvim__redraw when necessary #31250luukvbaal2024-11-18
| | | | | | | | | | | | | | | | | | | | | | | | Problem: Not possible to only set a "redraw later" type with nvim__redraw, which seems to be desired for the treesitter highlighter. Solution: Do not update the screen when "flush" is explicitly set to false and only redraw later types are present. In that case, do not call ui_flush() either.
| * | vim-patch:9.1.0869: Problem: curswant not set on gm in folded line (#31247)zeertzjq2024-11-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: curswant not set on gm in folded line (citizenmatt) Solution: in a folded line, call update_curswant_force() fixes: vim/vim#11596 closes: vim/vim#11994 closes: vim/vim#15398 https://github.com/vim/vim/commit/9848face747ba91282d34a96dcb966bcb410bf2b Co-authored-by: Christian Brabandt <cb@256bit.org>
| * | feat(lsp): highlight hover target/range #31110Riley Bruins2024-11-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | **Problem:** Despite the LSP providing the option for language servers to specify a range with a hover response (for highlighting), Neovim does not give the option to highlight this range. **Solution:** Add an option to `buf.hover()` which causes this range to be highlighted. Co-authored-by: Mathias Fußenegger <mfussenegger@users.noreply.github.com>
| * | fix(api): update "range" windows in nvim__redraw #31042luukvbaal2024-11-17
| | | | | | | | | | | | | | | | | | | | | Problem: nvim__redraw's "range" marks a buffer range for redraw, and subsequently flushes the UI without updating the windows containing that buffer. Solution: Implicitly update the screen, unless specified otherwise. Only update the screen with the last call of the treesitter on_changedtree() callback.
| * | fix(messages): proper multiline Lua print() messages #31205luukvbaal2024-11-17
| | | | | | | | | | | | | | | | | | Problem: Separate message emitted for each newline present in Lua print() arguments. Solution: Make msg_multiline() handle NUL bytes. Refactor print() to use msg_multiline(). Refactor vim.print() to use print().
| * | fix(api): nvim_echo free text memory with invalid highlight (#31243)luukvbaal2024-11-17
| | | | | | | | | Fix regression from #31195
| * | build(deps): bump uncrustify to uncrustify-0.80.1Christian Clason2024-11-17
| | |
| * | fix(api): validation, documentation of hl_group #31195luukvbaal2024-11-16
| | | | | | | | | | | | | | | | | | | | | | | | Problem: Documentation for "hl_group" in nvim_buf_set_extmark() is unclear. "hl_group" in nvim_echo() does not accept highlight group id. Solution: Move documentation for highlight group name/id to first mention of hl_group. Update nvim_echo() to accept highlight group id.
| * | feat(ui): don't show unfocusable windows in :tabs, 'tabline' #27984luukvbaal2024-11-16
| | | | | | | | | | | | | | | | | | | | | Problem: Floating windows with focusable set to false can reasonably be expected to be UI elements but are listed in some outputs that should contain only regular windows. Solution: Hide unfocusable floating windows from the default tabline and :tabs.
| * | refactor(options): remove `.indir`, redesign option scopes #31066Famiu Haque2024-11-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: The way option scopes currently work is inflexible and does not allow for nested option scopes or easily finding the value of an option at any arbitrary scope without having to do long handwritten switch-case statements like in `get_varp()`. `.indir` is also confusing and redundant since option indices for each scope can be autogenerated. Solution: Expand option scopes in such a way that an option can support any amount of scopes using a set of scope flags, similarly to how it's already done for option types. Also make options contain information about its index at each scope it supports. This allows for massively simplifying `get_varp()` and `get_varp_scope()` in the future by just using a struct for options at each scope. This would be done by creating a table that stores the offset of an option's variable at a scope by using the option's index at that scope as a key. This PR also autogenerates enums for option indices at each scope to remove the need for `.indir` entirely, and also to allow easily iterating over options all options that support any scope. Ref: #29314
| * | build(deps): bump uncrustify to uncrustify-0.80.0Christian Clason2024-11-16
| |/
| * vim-patch:partial:9.1.0851: too many strlen() calls in getchar.c (#31230)zeertzjq2024-11-16
| | | | | | | | | | | | | | | | | | | | | | Problem: too many strlen() calls in getchar.c Solution: refactor code and reduce strlen() calls (John Marriott) closes: vim/vim#16017 https://github.com/vim/vim/commit/e7a1bbf2102ecd2083613ff18d7d46c45d1e568e Co-authored-by: John Marriott <basilisk@internode.on.net>
| * docs: standardize doc for ChanInfo/ChanOpen autocmds/v:event (#31099)errael2024-11-16
| |
| * fix(ui): no fast context for prompt message kinds #31224luukvbaal2024-11-15
| | | | | | | | | | | | | | Problem: No longer able to show prompt messages with vim.ui_attach(). Solution: Do not execute callback in fast context for prompt message kinds. These events must be safe to show the incoming message so the event itself serves to indicate that the message should be shown immediately.
| * vim-patch:9.1.0855: setting 'cmdheight' may missing output (#31216)zeertzjq2024-11-15
| | | | | | | | | | | | | | | | | | | | | | | | Problem: setting 'cmdheight' may cause hit-enter-prompt and echo output to be missing Solution: Before cleaning the cmdline, check the need_wait_return flag (nwounkn) closes: vim/vim#13432 https://github.com/vim/vim/commit/2e48567007f2becd484a3c3dd0706bf3a0beeae7 Co-authored-by: nwounkn <nwounkn@gmail.com>
| * vim-patch:9.1.0864: message history is fixed to 200 (#31215)zeertzjq2024-11-15
| | | | | | | | | | | | | | | | | | | | | | | | Problem: message history is fixed to 200 Solution: Add the 'msghistory' option, increase the default value to 500 (Shougo Matsushita) closes: vim/vim#16048 https://github.com/vim/vim/commit/4bd9b2b2467e696061104a029000e9824c6c609e Co-authored-by: Shougo Matsushita <Shougo.Matsu@gmail.com> Co-authored-by: Milly <milly.ca@gmail.com>
| * fix(messages)!: vim.ui_attach message callbacks are unsafeLuuk van Baal2024-11-14
| | | | | | | | | | | | | | | | Problem: Lua callbacks for "msg_show" events with vim.ui_attach() are executed when it is not safe. Solution: Disallow non-fast API calls for "msg_show" event callbacks. Automatically detach callback after excessive errors. Make sure fast APIs do not modify Nvim state.
| * fix(treesitter): show proper node name error messagesRiley Bruins2024-11-13
| | | | | | | | | | | | | | | | | | | | | | **Problem:** Currently node names with non-alphanumeric, non underscore/hyphen characters (only possible with anonymous nodes) are not given a proper error message. See tree-sitter issue 3892 for more details. **Solution:** Apply a different scanning logic to anonymous nodes to correctly identify the entire node name (i.e., up until the final double quote)
| * refactor(highlight): make enum of builtin highlights start with 1bfredl2024-11-13
| | | | | | | | | | This makes it possible to use HLF_ values directly as highlight id:s and avoids +1 adjustments especially around messages.
| * fix(startup): report --startuptime error to stderr (#31131)zeertzjq2024-11-13
| | | | | | | | | | Problem: Crash when initializing for --startuptime errors. Solution: Report the error to stderr, as neither logging nor messages have been initialized yet.
| * fix(messages): pass previous highlight id to ext chunksLuuk van Baal2024-11-11
| |
| * Merge pull request #27813 from luukvbaal/msgidbfredl2024-11-11
| |\ | | | | | | feat(ext_messages): add hl_id to ext_messages chunks
| | * feat(ext_messages): add hl_id to ext_messages chunksLuuk van Baal2024-11-09
| | | | | | | | | | | | | | | | | | | | | | | | Problem: Ext_messages chunks only contain the highlight attr id, which is not very useful for vim.ui_attach() consumers. Solotion: Add highlight group id to message chunks, which can easily be used to highlight text in the TUI through nvim_buf_set_extmark(): hl_group = synIDattr(id, "name").
| | * refactor(message): propagate highlight id instead of attrsLuuk van Baal2024-11-08
| | | | | | | | | | | | | | | | | | | | | Problem: Highlight group id is not propagated to the end of the message call stack, where ext_messages are emitted. Solution: Refactor message functions to pass along highlight group id instead of attr id.
| * | vim-patch:9.1.0849: there are a few typos in the source (#31159)zeertzjq2024-11-11
| | | | | | | | | | | | | | | | | | | | | | | | Problem: there are a few typos in the source. Solution: Correct typos (zeertzjq). closes: vim/vim#16026 https://github.com/vim/vim/commit/7c5152826f61bc968ba539ff6db3a55e75556bf2
| * | build: specify POST_BUILD when using add_custom_commanddundargoc2024-11-09
| | | | | | | | | | | | | | | | | | | | | | | | This is needed specifically for the second signature of add_custom_command, which appends an operation to an existing target. This will prevent the cmake warning CMP0175. Reference: https://cmake.org/cmake/help/latest/policy/CMP0175.html
| * | docs: misc (#30914)dundargoc2024-11-09
| | | | | | | | | | | | | | | | | | | | | Co-authored-by: Ernie Rael <errael@raelity.com> Co-authored-by: Famiu Haque <famiuhaque@proton.me> Co-authored-by: Jade <spacey-sooty@proton.me> Co-authored-by: glepnir <glephunter@gmail.com> Co-authored-by: zeertzjq <zeertzjq@outlook.com>
| * | fix(vim.system): resolve executable paths on windowsLewis Russell2024-11-08
| | | | | | | | | | | | Fixes #31107
| * | fix(cmdline): simplify and correct grapheme cluster adjustmentbfredl2024-11-08
| | |
| * | Merge pull request #31040 from luukvbaal/cmdpreviewcursbfredl2024-11-08
| |\ \ | | | | | | | | fix(inccommand): ensure cursor is where it belongs
| | * | fix(inccommand): ensure cursor is where it belongsLuuk van Baal2024-11-07
| | | | | | | | | | | | | | | | | | | | Problem: Inccommand preview callback may flush inaccurate cmdline cursor position. Solution: Ensure cursor is where it belongs when doing command preview.
| * | | refactor(options): use os_win/os_buf for local options (#31060)zeertzjq2024-11-08
| | | | | | | | | | | | Conversely, don't use them for global options.
| * | | refactor(options): remove `varp` argument for `set_option` (#31111)Famiu Haque2024-11-08
| | |/ | |/| | | | | | | | | | | | | | | | | | | Problem: The `varp` argument for `set_option` is extraneous as the option's variable pointer can be retrieved using the option's index and flags. Solution: Remove the `varp` argument for `set_option`
| * | test: add test for key following ignored mouse move (#31104)zeertzjq2024-11-07
| | |
| * | perf(mouse): only generate <MouseMove> for a new cell positon (#31103)errael2024-11-07
| | | | | | | | | | | | Problem: Can receive dozens of <MouseMove> events for same cell position. #30965 Solution: Leverage check_multiclick() to detect if cell position is unchanged.
| * | Merge pull request #31062 from famiu/refactor/options/ff_macrobfredl2024-11-06
| |\ \ | | | | | | | | refactor(options): remove fileformat macros
| | * | refactor(options): remove fileformat macrosFamiu Haque2024-11-05
| | | |