aboutsummaryrefslogtreecommitdiff
path: root/src/nvim
Commit message (Collapse)AuthorAge
...
| * | refactor(tui): reorder functions for query and response (#28051)zeertzjq2024-03-27
| | | | | | | | | | | | | | | | | | | | | - Group functions for key encoding together. - Move the handle_modereport() branch before the handle_unknown_csi() branch to match the order of the corresponding functions, but don't move handle_term_response() yet, as that will be subject to further changes (e.g. for #26744).
| * | vim-patch:9.1.0207: No autocommand when writing session file (#28048)zeertzjq2024-03-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: No autocommand when writing session file Solution: Add SessionWritePost autocommand (Colin Kennedy) fixes: vim/vim#14242 closes: vim/vim#14288 https://github.com/vim/vim/commit/e5f2280381250801a28dcff9823e6f94e7b163fc Co-authored-by: Colin Kennedy <colinvfx@gmail.com>
| * | refactor(options): make `immutable` and `hidden` options distinctFamiu Haque2024-03-26
| | | | | | | | | | | | | | | | | | Problem: Currently, the `immutable` property of options can be applied for options that are hidden and options whose value simply can't be changed. Which is problematic when attempting to convert an option like `'maxcombine'` into an immutable option, because trying to `:set` an immutable option currently gives an error, which is only desired behavior for hidden options, not options that are actually immutable. Solution: Separate the `immutable` property into two distinct `hidden` and `immutable` properties. Change all options with the `immutable` property to use the `hidden` property instead. Also add `p_mco` as an `immutable` option, as its value cannot be changed, and the underlying variable is not used anywhere.
| * | docs: remove remaining mentions of hkmap (#28038)zeertzjq2024-03-26
| | |
| * | feat(tui): support undercurl in WezTerm (#28037)zeertzjq2024-03-26
| | | | | | | | | | | | | | | Also fix some typos in windows.ti while at it. Close #21699
| * | vim-patch:9.1.0204: Backspace inserts spaces with virtual text and ↵zeertzjq2024-03-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'smarttab' (#28032) Problem: Backspace inserts spaces with virtual text and 'smarttab'. Solution: Ignore virtual text and wrapping when backspacing. (zeertzjq) related: neovim/neovim#28005 closes: vim/vim#14296 https://github.com/vim/vim/commit/0185c7701434f1fbbf83fecd6384a19c1d2fc44e Co-authored-by: VanaIgr <vanaigranov@gmail.com>
| * | fix(edit): backspace adds extra spaces for inline virtual text (#28005)vanaigr2024-03-26
| | | | | | | | | | | | Problem: Backspace adds extra spaces for inline virtual text. Solution: Ignore virtual text and wrapping when backspacing.
| * | vim-patch:ab01adf7c65bChristian Clason2024-03-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | runtime(doc): Update options.txt closes: vim/vim#14295 https://github.com/vim/vim/commit/ab01adf7c65b4ee350b402ab3ef1e7dfa5e074f1 Co-authored-by: Song-Tianxiang <149415622+Song-Tianxiang@users.noreply.github.com>
| * | vim-patch:9.1.0205: Cannot use modifiers before :-Ntabmove (#28031)zeertzjq2024-03-26
| |/ | | | | | | | | | | | | | | | | | | Problem: Cannot use modifiers before :-Ntabmove. Solution: Check backwards from the command instead of checking from the start of the command line. Slightly adjust docs to make them more consistent (zeertzjq). closes: vim/vim#14289 https://github.com/vim/vim/commit/076faac5378cf517baa8c331c57488d39efadec0
| * refactor(backup): remove duplicate os_copy_xattr() (#28020)zeertzjq2024-03-25
| | | | | | | | The first os_copy_xattr() is inside #ifdef UNIX, while the second isn't, so the first one isn't actually needed.
| * fix(backup): E1509 when writing extended attr to symlink (#28014)Razvan-Adrian Ciochina2024-03-25
| | | | | | | | | | | | | | | | Problem: E1509 when writing extended attributes to a symlink. Solution: Copy the file before copying extended attributes. On Fedora, the attribute being set is "security.selinux". For normal, non-symlink files this attribute doesn't show up and that's why calling os_copy_xattr() doesn't break in that case.
| * ci(windows): optionally test windows with ASANdundargoc2024-03-23
| | | | | | | | Add the label `ci:windows-asan` to enable it.
| * vim-patch:9.1.0199: Not enough tests for the slice() function (#27991)zeertzjq2024-03-23
| | | | | | | | | | | | | | | | | | | | Problem: Not enough tests for the slice() function. Solution: Test with multibyte chars, and in both Legacy and Vim9 script. Update docs to be clearer about how it treats composing chars. (zeertzjq) closes: vim/vim#14275 https://github.com/vim/vim/commit/ad38769030b5fa86aa0e8f1f0b4266690dfad4c9
| * vim-patch:8.2.2605: Vim9: string index and slice does not include composing ↵zeertzjq2024-03-23
| | | | | | | | | | | | | | | | | | | | | | chars Problem: Vim9: string index and slice does not include composing chars. Solution: Include composing characters. (issue vim/vim#6563) https://github.com/vim/vim/commit/0289a093a4d65c6280a3be118d1d3696d1aa74da Co-authored-by: Bram Moolenaar <Bram@vim.org>
| * vim-patch:8.2.2318: Vim9: string and list index work differentlyzeertzjq2024-03-23
| | | | | | | | | | | | | | | | | | Problem: Vim9: string and list index work differently. Solution: Make string index work like list index. (closes vim/vim#7643) https://github.com/vim/vim/commit/e7525c552060dd04aacdbca6bb5fe6460cf4da60 Co-authored-by: Bram Moolenaar <Bram@vim.org>
| * Merge pull request #26970 from famiu/refactor/options/set_option_directzeertzjq2024-03-22
| |\ | | | | | | refactor(options): remove `set_string_option_direct()`
| | * refactor(options): remove `set_string_option_direct()`Famiu Haque2024-03-21
| | | | | | | | | | | | | | | | | | Problem: `set_string_option_direct()` contains a separate codepath specifically for setting string options. Not only is that unnecessary code duplication, but it's also limited to only string options. Solution: Replace `set_string_option_direct()` with `set_option_direct()` which calls `set_option()` under the hood. This reduces code duplication and allows directly setting an option of any type.
| | * refactor(options): add `direct` flag to `set_option()`Famiu Haque2024-03-21
| | |
| | * refactor(options): restructure `set_option`Famiu Haque2024-03-21
| | |
| * | vim-patch:9.1.0195: memleak with ex_drop, NULL dereferencezeertzjq2024-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: memleak with ex_drop(), NULL dereference (zeertzjq) Solution: revert back to ex_rewind(), use curbuf instead of buf fixes: vim/vim#14246 closes: vim/vim#14251 https://github.com/vim/vim/commit/85a769d466d2009db6a318fd120d9691344664ba Co-authored-by: Christian Brabandt <cb@256bit.org>
| * | vim-patch:9.1.0192: drop: don't rewind when editing the same filezeertzjq2024-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: :drop tries to :rewind the argumentlist, which results in E37 (after v9.1.0046) Solution: instead of calling ex_rewind(), call open_buffer() only when re-using the initial empty buffer fixes: vim/vim#14219 closes: vim/vim#14220 https://github.com/vim/vim/commit/978178823b7c62a0249411f3d1f584f8a3144c5d Co-authored-by: Christian Brabandt <cb@256bit.org>
| * | vim-patch:9.1.0194: gcc complains about uninitialized var (#27970)zeertzjq2024-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: gcc complains about uninitialized var (Tony Mechelynck) Solution: initialize to NULL https://github.com/vim/vim/commit/9eb236f455df75af858a37a3d98f190c977deaf4 Co-authored-by: Christian Brabandt <cb@256bit.org>
| * | refactor(misc): use MSVC compiler builtin for `xctz()`Famiu Haque2024-03-22
| | | | | | | | | | | | | | | | | | Problem: `xctz()` uses a fallback algorithm for MSVC, even though a compiler builtin exists. Solution: Make `xctz()` use the compiler builtin for MSVC compiler.
| * | fix(rpc): do not crash when no input is consumedbfredl2024-03-21
| |/ | | | | | | | | | | fixes #23781 Co-authored-by: glacambre <code@lacamb.re>
| * feat(colorscheme): add semantic tokens modifiers to builtin color schemeEvgeni Chasnovski2024-03-21
| |
| * vim-patch:9.1.0190: complete_info() returns wrong order of items (#27955)zeertzjq2024-03-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: complete_info() returns wrong order of items (after v9.0.2018) Solution: Revert Patch v9.0.2018 (Girish Palya) bug fix: complete_info() gives wrong results 1) complete_info() reverses list of items during <c-p> 2) 'selected' item index is wrong during <c-p> 3) number of items returnd can be wrong Solution: - Decouple 'cp_number' from 'selected' index since they need not be correlated - Do not iterate the list backwards - Add targeted tests Regression introduced by https://github.com/vim/vim/commit/69fb5afb3bc9da24c2fb0eafb0027ba9c6502fc2 Following are unnecessary commits to patch problems from above: https://github.com/vim/vim/commit/fef66301665027f1801a18d796f74584666f41ef https://github.com/vim/vim/commit/daef8c74375141974d61b85199b383017644978c All the tests from above commits are retained though. fixes: vim/vim#14204 closes: vim/vim#14241 https://github.com/vim/vim/commit/8950bf7f8b85c1287d4e696965d88091fcc60594 Remove EMPTY_IF_NULL() as it has been unnecessary since #12673. Co-authored-by: Girish Palya <girishji@gmail.com>
| * fix(cmdline): wrong 'incsearch' highlighting after :redraw (#27947)luukvbaal2024-03-20
| | | | | | | | Problem: Calling :redraw from a timer callback clears 'incsearch' highlighting. Solution: Re-apply 'incsearch' highlighting if the screen was updated.
| * Merge #27930 nvim_create_buf fixesJustin M. Keyes2024-03-20
| |\
| | * fix(api): nvim_create_buf assert fails if autocmds set &swapfileSean Dewar2024-03-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: assertion failure in nvim_create_buf if buflist_new autocommands open a swapfile when "scratch" is set. Solution: block autocommands when setting up the buffer; fire them later instead. Note that, unlike buflist_new, I don't check if autocommands aborted script processing; the buffer is already created and configured at that point, so might as well return the handle anyway. Rather than repeat try_{start,end} and {un}block_autocmds for each relevant operation, just do it at the start and near the end. This means that, if TermResponse fires from unblock_autocmds for whatever reason, it can see the buffer in an already configured state if we didn't bail due to an error (plus it's probably a bit cleaner this way).
| | * fix(api): nvim_create_buf leaks memory if buffer is loaded earlySean Dewar2024-03-19
| | | | | | | | | | | | | | | | | | | | | Problem: memory leak in nvim_create_buf if buflist_new autocommands load the new buffer early. Solution: do not open a memfile in that case.
| * | refactor(treesitter): handle coverity warnings betterLewis Russell2024-03-20
| | |
| * | fix(treesitter): treecursor regressionLewis Russell2024-03-20
| | | | | | | | | | | | | | | | | | - Also address some coverity warnings Fixes #27942
| * | refactor(treesitter): reorder functionsLewis Russell2024-03-19
| | |
| * | refactor(treesitter): simplify argument checks for userdataLewis Russell2024-03-19
| |/
| * refactor(treesitter): redesign query iteratingLewis Russell2024-03-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: `TSNode:_rawquery()` is complicated, has known issues and the Lua and C code is awkwardly coupled (see logic with `active`). Solution: - Add `TSQueryCursor` and `TSQueryMatch` bindings. - Replace `TSNode:_rawquery()` with `TSQueryCursor:next_capture()` and `TSQueryCursor:next_match()` - Do more stuff in Lua - API for `Query:iter_captures()` and `Query:iter_matches()` remains the same. - `treesitter.c` no longer contains any logic related to predicates. - Add `match_limit` option to `iter_matches()`. Default is still 256.
| * fix(terminal): don't pass incomplete UTF-8 sequence to libvterm (#27922)zeertzjq2024-03-19
| |
| * fix(treesitter): document more standard highlight groupsChristian Clason2024-03-19
| | | | | | | | | | | | | | | | | | Problem: Not all standard treesitter groups are documented. Solution: Document them all (without relying on fallback); add default link for new `*.builtin` groups to `Special` and `@keyword.type` to `Structure`. Remove `@markup.environment.*` which only made sense for LaTeX.
| * fix(pager): handle consecutive newlines properly (#27913)zeertzjq2024-03-18
| |
| * refactor(messages): remove condition that is always true (#27909)zeertzjq2024-03-18
| | | | | | | | | | | | After #25470 the `s` pointer is advanced before calling store_sb_text() when a newline character is found, and store_sb_text() sets `sb_str` to `s`, so it's not possible for `s == sb_str + 1` and `*sb_str == '\n'` to be satisfied at the same time.
| * vim-patch:9.1.0186: cursor pos wrong on mouse click after eol with 'rl', ↵zeertzjq2024-03-18
| | | | | | | | | | | | | | | | | | | | | | | | 've' and conceal (#27903) Problem: Wrong cursor position when clicking after end of line with 'rightleft', 'virtualedit' and conceal. Solution: Set values in ScreenCols[] also with SLF_RIGHTLEFT. Also fix off-by-one cursor position with 'colorcolumn' (zeertzjq). closes: vim/vim#14218 https://github.com/vim/vim/commit/deb2204bffa075ed5485415fc2dbd20e75d87ea4
| * fix(messages): allow more prompt in headless mode with UI (#27905)zeertzjq2024-03-18
| | | | | | | | | | Problem: More prompt is not shown in headless mode even if there is a UI attached. Solution: Don't skip more prompt when there is a UI active.
| * fix(mouse): click after eol with conceal and virtual text (#27897)zeertzjq2024-03-17
| | | | | | | | | | Problem: Wrong cursor position when clicking after end of line with 'virtualedit', conceal and virtual text. Solution: Always fill linebuf_vcol[] for the columns to clear.
| * refactor(drawline): integrate terminal hl with eol loop (#27893)zeertzjq2024-03-17
| | | | | | | | | | | | | | There is no test for using 'cursorline' in Normal mode in a terminal buffer, so add a test and fix 'cursorcolumn' remaining when entering Terminal mode. Also move synIDattr() tests to ui/highlight_spec.lua.
| * fix(normal): don't check conceal when pressing 'r' (#27892)zeertzjq2024-03-17
| | | | | | | | | | | | | | | | Problem: Cursor line is unconcealed when pressing 'r' in Normal mode when 'concealcursor' contains 'n' but not 'i'. Solution: Don't check conceal when pressing 'r' in Normal mode. Vim doesn't have this problem because it doesn't call redrawWinline() in conceal_check_cursor_line() and instead sets a global variable.
| * vim-patch:9.1.0184: Cursor pos wrong when clicking with conceal and wrap ↵zeertzjq2024-03-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#27890) Problem: Cursor position wrong when clicking with conceal and wrap. Solution: Use the virtual column of the last char for ScreenCols[] in boguscols. Remove use of MAXCOL in ScreenCols[]. Rename third argument of wlv_screen_line() to "clear_end" as that's clearer what it does (zeertzjq). related: 14192 closes: vim/vim#14200 https://github.com/vim/vim/commit/d0c1b7723f7e73763597af2f97a53d94ab7ed020 Rename win_put_linebuf() to wlv_put_linebuf().
| * fix(drawline): check filler_todo in place of removed draw_state (#27889)zeertzjq2024-03-17
| | | | | | | | The only place it matters is the conceal wcol check, but it can avoid unnecessary computations at other places.
| * fix(lsp): add missing LSP semantic token highlight linksCaleb Marshall2024-03-16
| | | | | | | | | | | | | | | | | | | | | | | | | | Added the following LSP semantic token types to be linked to highlight groups by default: * @lsp.type.event * @lsp.type.keyword * @lsp.type.modifier * @lsp.type.number * @lsp.type.operator * @lsp.type.regexp * @lsp.type.string
| * vim-patch:9.1.0182: Can define function with invalid name inside ↵zeertzjq2024-03-16
| | | | | | | | | | | | | | | | | | | | | | 'formatexpr' (#27883) Problem: Can define function with invalid name inside 'formatexpr'. Solution: Use goto instead of checking for did_emsg later. (zeertzjq) closes: vim/vim#14209 https://github.com/vim/vim/commit/6a04bf5ee523b2d6d01d7290e356a30de219f465
| * vim-patch:9.1.0183: Wrong display or screenpos() result when toggling diff ↵zeertzjq2024-03-16
| | | | | | | | | | | | | | | | | | | | | | | | mode (#27882) Problem: Wrong display or screenpos() result when toggling diff mode. Solution: Reset w_skipcol when disabling 'wrap'. Reset w_leftcol when enabling 'wrap' (zeertzjq). fixes: vim/vim#14210 closes: vim/vim#14211 https://github.com/vim/vim/commit/9e7f1fc2f159d58b2a4cd4b7060bead126fead49
| * vim-patch:8.2.3782: Vim9: no error if a function shadows a script variable ↵zeertzjq2024-03-16
| | | | | | | | | | | | | | | | | | | | | | | | (#27881) Problem: Vim9: no error if a function shadows a script variable. Solution: Check the function doesn't shadow a variable. (closes vim/vim#9310) https://github.com/vim/vim/commit/052ff291d72bc9c176f9562f021d7e8e030e74c0 Omit EVAL_VAR_NO_FUNC: Vim9 script only. Co-authored-by: Bram Moolenaar <Bram@vim.org>