aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
...
* | Merge pull request #32797 from zeertzjq/vim-3d1a437zeertzjq2025-03-09
|\ \ | | | | | | vim-patch:{3d1a437,d89770e}
| * | vim-patch:d89770e: runtime(doc): use GNOME instead of Gnomezeertzjq2025-03-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's called "GNOME Terminal" in https://gitlab.gnome.org/GNOME/gnome-terminal It's also called GNOME Terminal in English Wikipedia https://en.wikipedia.org/wiki/GNOME_Terminal and the Wikipedia pages of 8 other languages. Also, make line wrapping the same in insert.txt and cmdline.txt. closes: vim/vim#16832 https://github.com/vim/vim/commit/d89770eb987768aca78fef74d8d8601ce53fc435
| * | vim-patch:3d1a437: runtime(doc): warn users about potentially risky hotkeyzeertzjq2025-03-09
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also, mention that CTRL-SHIFT-V might be mapped to paste text, similar to the note about CTRL-V. References: https://gitlab.gnome.org/GNOME/gnome-terminal/-/blob/2d7e9d78c9631be63b6b381f6966cb8808865ffb/src/org.gnome.Terminal.gschema.xml#L395-398 https://gitlab.gnome.org/chergert/ptyxis/-/blob/8942adde5b98c82c85238851743b371a034a1c1b/src/org.gnome.Ptyxis.gschema.xml.in#L529-L533 closes: vim/vim#16816 https://github.com/vim/vim/commit/3d1a437f1bb41933739445a8436fdc1902e4ea98 Co-authored-by: David Mandelberg <david@mandelberg.org>
* | refactor(hashy): use case labels instead of TOLOWER_ASC() (#32795)zeertzjq2025-03-09
| | | | | | | | | | | | | | | | | | Follow-up to #32768 This is slightly faster according to the benchmark. This also makes it a build error if hashy is used incorrectly (generating a case-insensitive hash function from mixed-case strings), as duplicate case labels aren't allowed.
* | vim-patch:9.1.1184: Unnecessary use of vim_tolower() in vim_strnicmp_asc() ↵zeertzjq2025-03-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#32792) Problem: Unnecessary use of vim_tolower() in vim_strnicmp_asc(). Solution: Use TOLOWER_ASC() instead (zeertzjq). It was passing *s1 and *s2 to vim_tolower(). When char is signed, which is the case on most platforms, c < 0x80 is always true, so it already behaves the same as TOLOWER_ASC(). closes: vim/vim#16826 https://github.com/vim/vim/commit/b7dc5d3b6169efc8aa0b9d86476072877e74bc2c Use this function for hashy case-insensitive lookup, as it's ASCII-only. Note that this function doesn't cast TOLOWER_ASC() argument to uint8_t, so it'll treat a UTF-8 byte as smaller than NUL. It doesn't matter, as one of the strings being compared is ASCII-only, and its behavior still leads to consistent ordering.
* | refactor(generator): remove nested loop for event aliases (#32780)zeertzjq2025-03-09
| | | | | | | | After #32777 the aliases no longer need to come later, so the list of autocommand names can be fully sorted.
* | docs(events): document events that can always be nested (#32778)zeertzjq2025-03-09
| | | | | | | | | | | | | | | | | | Follow-up to #32706 vim-patch:af05694: runtime(doc): CmdUndefined and FuncUndefined can always be nested closes: vim/vim#16825 https://github.com/vim/vim/commit/af056949007b2395b3f8ca8c7efb591fe9d4be9e
* | refactor(multiqueue): rename multiqueue_new_parent #32767Justin M. Keyes2025-03-08
| |
* | vim-patch:62e8228: runtime(go): add 'keywordprg' and 'formatprg' to ftpluginChristian Clason2025-03-08
| | | | | | | | | | | | | | | | closes: vim/vim#16804 https://github.com/vim/vim/commit/62e822808e364c84e8abfbc4827bf6012e5b32e0 Co-authored-by: Phạm Bình An <phambinhanctb2004@gmail.com>
* | test(lsp/utils): prevent CursorMoved closing float immediately (#32782)zeertzjq2025-03-08
| | | | | | This fixes the flakiness observed in https://github.com/neovim/neovim/actions/runs/13733258040/job/38413757162?pr=32780
* | docs: OSC 133 shell config #32771Justin M. Keyes2025-03-07
| |
* | fix(types): do not mark unstable API as privateLewis Russell2025-03-08
| | | | | | | | | | These functions are allowed to be used downstream, they are just not API stable.
* | perf(events): remove unnecessary loop in event_nr2name() (#32777)zeertzjq2025-03-08
| | | | | | | | | | | | | | It's no longer needed after #32152. I'll not apply this change to Vim first, because Nvim's event name aliases are a bit different from Vim. After this change there is a small speedup in nvim_exec_autocmds as per test/benchmark/autocmd_spec.lua.
* | fix(events): always allow some events to be nested (#32706)zeertzjq2025-03-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Always allow the following four events to be nested, as they may contain important information, and are triggered on the event loop, which may be processed by a blocking call inside another autocommand. - ChanInfo - ChanOpen - TermRequest - TermResponse There are some other events that are triggered on the event loop, but they are mostly triggered by user actions in a UI client, and therefore not very likely to happen during another autocommand, so leave them unchanged for now.
* | vim-patch:6bdfeb0: runtime(vim): Update base-syntax, bug fixes (#32775)zeertzjq2025-03-07
| | | | | | | | | | | | | | | | | | | | | | | | - Allow trailing backslashes in option values. - Match :map-special modifier. - Match :map-arguments case-sensitively. - Remove <*Leader> from map modifier list and allow in RHS of a mapping. closes: vim/vim#16822 https://github.com/vim/vim/commit/6bdfeb099a4d814f2686af427360da13578906eb Co-authored-by: Doug Kearns <dougkearns@gmail.com>
* | Merge pull request #32768 from zeertzjq/vim-9.1.1179zeertzjq2025-03-08
|\ \ | | | | | | perf(keycodes): use hashy for string lookup
| * | perf(keycodes): use hashy for string lookupzeertzjq2025-03-08
| | | | | | | | | | | | | | | This is slightly faster than the binary search as per the benchmark, and allows handling the vim/vim#16821 situation in generator code.
| * | vim-patch:partial:9.1.1179: too many strlen() calls in misc2.czeertzjq2025-03-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: too many strlen() calls in misc2.c Solution: refactor misc2.c and use bsearch() instead of a linear search to find matches in the key_names_table array (John Marriott). This commit changes misc2.c to use bsearch() to perform string searches of the key_names_table array. Implementation detail: - Some entries in this array have alternate names. Add field alt_name to point to the alternate name. - Some entries in this array are only available if a given feature is defined. Keep them in the array, but add a boolean field enabled to indicate if the record can be used or not. If the feature is not available, the corresponding enabled field is set to FALSE. In my measurements running the test suite on a huge non-gui build on linux, the number of string comparisons in get_special_key_code(): Before (linear search): 2,214,957 After (binary search): 297,770 A side effect of this is 1477 calls to STRLEN() in get_special_key_name() for the same test run are no longer necessary. closes: vim/vim#16788 https://github.com/vim/vim/commit/4a1e6dacbb2cc833353983bea7eac38191c9d3b4 Skip the mouse shape changes. Co-authored-by: John Marriott <basilisk@internode.on.net>
| * | test: add benchmark for nvim_replace_termcodes and keytrans()zeertzjq2025-03-08
| | |
| * | refactor(keycodes): generate key_names_table[] using Luazeertzjq2025-03-08
|/ / | | | | | | This allows easier refactoring.
* | fix(terminal): avoid rescheduling events onto the same queue (#32755)Gregory Anders2025-03-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: When a function like vim.wait() is used, we continuously drain the main event queue until it is empty, never stopping for user input. This means the libuv timer never runs and the terminal never gets refreshed, so emit_termrequest continously reschedules itself onto the same event queue, causing an infinite loop. Solution: Use a separate "pending" event queue, where events that require a terminal refresh are temporarily placed. Drain this queue after a terminal refresh and events are copied back onto the main queue. This prevents infinite loops since the main event queue will always be able to properly drain.
* | fix(marks): mark winline as invalid if change is in a concealed line (#32766)luukvbaal2025-03-07
| | | | | | | | Code that checks whether a `w_lines` entry has become invalid due to a change in a folded line should now also check for concealed lines.
* | feat(defaults): jump between :terminal shell prompts with ]]/[[ #32736Gregory Anders2025-03-07
| |
* | fix(lua): always use vim.inspect() for :lua= (#32715)zeertzjq2025-03-07
| |
* | fix(lsp): use unresolved code action when `codeAction/resolve` failsMaria José Solano2025-03-07
| |
* | vim-patch:9.1.1177: filetype: tera files not detectedChristian Clason2025-03-07
| | | | | | | | | | | | | | | | | | | | | | | | | | Problem: filetype: tera files not detected Solution: detect '*.tera' files as tera filetype, include a simple filetype plugin (MuntasirSZN) closes: vim/vim#16806 https://github.com/vim/vim/commit/5daaf2326800ff0683a5be9a7f475667a4fc09db Co-authored-by: MuntasirSZN <muntasir.joypurhat@gmail.com>
* | fix(marks): wrong winline info for concealed line with below virt line (#32747)luukvbaal2025-03-06
| | | | | | | | | | | | | | Problem: Skipping over a concealed line for which `win_line()` _should_ be called because it has `virt_lines_above = false` lines associated with it. Solution: Don't include such a line in `wl_lastlnum` from the line above.
* | vim-patch:08a410f: runtime(vim): recognize <...> strings (and keys) for ↵zeertzjq2025-03-06
| | | | | | | | | | | | | | | | | | | | | | 'keywordprg' (#32752) see :help E499 and :h key-notation closes: vim/vim#16795 https://github.com/vim/vim/commit/08a410f674a340f137623526bf8159d5a476f729 Co-authored-by: Konfekt <Konfekt@users.noreply.github.com>
* | vim-patch:9.1.1173: filetype: ABNF files are not detected (#32751)zeertzjq2025-03-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: filetype: ABNF files are not detected Solution: detect '.abnf' file as abnf filetype and include an abnf syntax plugin (A4-Tacks). References: - RFC5234 - RFC7405 closes: vim/vim#16802 https://github.com/vim/vim/commit/9f827ec58728c4ea55a8d71d40a283ca2ce5b058 Co-authored-by: A4-Tacks <wdsjxhno1001@163.com>
* | fix(terminal): improve cursor refresh handling (#32596)Sean Dewar2025-03-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: terminal mode cursor refresh logic has too many edge cases where it fails when events change curbuf. Solution: change the logic. Introduce cursor_visible to TerminalState to more reliably track if terminal mode has changed busy. Move visibility handling to refresh_cursor and move its call in refresh_terminal to terminal_check to avoid temporarily changed curbufs from influencing cursor state. This has the effect of "debouncing" shape/visibility updates to once per terminal state tick (with the final attributes taking effect, as expected). I think this is OK, but as a result it may also be warranted to update when redrawing during the same state tick (e.g: from events executing :redraw); this can be added later, if wanted. Also move previous tests to a more appropriate place.
* | feat(lsp): support for resolving code action command (#32704)Maria José Solano2025-03-06
| | | | | | | | | | * fix(lsp): don't call codeAction_resolve with commands * feat(lsp): support for resolving code action command
* | fix(tui): remove DCS escaping in tmux (#32723)Gregory Anders2025-03-05
| | | | | | | | Per https://github.com/tmux/tmux/issues/4386, tmux does not support DCS responses, even if the initial request was escaped.
* | vim-patch:9.1.1176: wrong indent when expanding multiple lines (#32746)zeertzjq2025-03-06
| | | | | | | | | | | | | | | | | | | | Problem: wrong indentation of lastline when expanding multiple lines Solution: Check OPENLINE_FORCE_INDENT flag in open_line() (glepnir) closes: vim/vim#16786 https://github.com/vim/vim/commit/34a7d82aaed9836174f4ea84af047db3fdf6c8b3 Co-authored-by: glepnir <glephunter@gmail.com>
* | vim-patch:9.1.1175: inconsistent behaviour with exclusive selection and ↵zeertzjq2025-03-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | motion commands (#32745) Problem: inconsistent behaviour with exclusive selection and motion commands (aidancz) Solution: adjust cursor position when selection is exclusive (Jim Zhou) fixes: vim/vim#16278 closes: vim/vim#16784 https://github.com/vim/vim/commit/c8cce711dde2d8abcf0929b3b12c4bfc5547a89d Co-authored-by: Jim Zhou <jimzhouzzy@gmail.com> Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
* | vim-patch:9.1.1174: tests: Test_complete_cmdline() may fail (#32743)zeertzjq2025-03-05
| | | | | | | | | | | | | | | | | | | | | | | | | | Problem: tests: when the file 'TestCommand?Test' exists, 'Test_complete_cmdline()' will fail when writing the file. And there's no related cleaning operation for this kind of file before the test run. Solution: modify `write` to `write!` to override (Jim Zhou). closes: vim/vim#16799 https://github.com/vim/vim/commit/f7087cbec7ec1d32465c2460f2665725c8d3a06a Co-authored-by: Jim Zhou <jimzhouzzy@gmail.com>
* | vim-patch:4783a2c: runtime(doc): mention bzip3 in gzip plugin documentation ↵zeertzjq2025-03-05
| | | | | | | | | | | | | | | | | | (#32742) closes: vim/vim#16800 https://github.com/vim/vim/commit/4783a2c073ecc075a6d1b23414901e78e1f18383 Co-authored-by: Jim Zhou <jimzhouzzy@gmail.com>
* | vim-patch:9.1.1172: [security]: overflow with 'nostartofline' and Ex command ↵zeertzjq2025-03-06
| | | | | | | | | | | | | | | | | | | | | | in tag file (#32739) Problem: heap-buffer-overflow with 'nostartofline' and Ex command in tag file. Solution: Set cursor column when moving cursor to line 1 (zeertzjq). closes: vim/vim#16796 https://github.com/vim/vim/commit/3ed6659549e447ff00def8edc841321e497f70a8
* | feat(terminal)!: include cursor position in TermRequest event data (#31609)Gregory Anders2025-03-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a plugin registers a TermRequest handler there is currently no way for the handler to know where the terminal's cursor position was when the sequence was received. This is often useful information, e.g. for OSC 133 sequences which are used to annotate shell prompts. Modify the event data for the TermRequest autocommand to be a table instead of just a string. The "sequence" field of the table contains the sequence string and the "cursor" field contains the cursor position when the sequence was received. To maintain consistency between TermRequest and TermResponse (and to future proof the latter), TermResponse's event data is also updated to be a table with a "sequence" field. BREAKING CHANGE: event data for TermRequest and TermResponse is now a table
* | Merge pull request #12049 from bfredl/luverrbfredl2025-03-05
|\ \ | | | | | | convert non-string errors using tostring()
| * | fix(lua): format errors from luv callbacks using __tostringbfredl2025-03-05
|/ /
* | build(deps): bump tree-sitter to v0.25.3Christian Clason2025-03-05
| |
* | vim-patch:9.1.1170: wildmenu highlighting in popup can be improved (#32728)zeertzjq2025-03-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: wildmenu highlighting in popup can be improved Solution: Check if the completion items contain submatches of the entered text (Girish Palya). This update enables highlighting in the popup menu even when the matched fragment or pattern appears within an item (string) rather than only at the beginning. This is especially useful for custom completion, where menu items may not always start with the typed pattern. For specific use cases, refer to the two examples in https://github.com/vim/vim/pull/16759 A sliding window approach is used with direct string comparison. Performance is not a concern, as highlighting is applied only to displayed lines, even if the menu list is arbitrarily long. closes: vim/vim#16785 https://github.com/vim/vim/commit/4ec46f32102e5569b247840e05a99221747a9381 Co-authored-by: Girish Palya <girishji@gmail.com>
* | vim-patch:9.1.1171: tests: wrong arguments passed to assert_equal() (#32727)zeertzjq2025-03-05
| | | | | | | | | | | | | | | | | | Problem: tests: wrong arguments passed to assert_equal() (after v9.1.1167). Solution: Swap arguments in the assert_equal() call (zeertzjq). closes: vim/vim#16782 https://github.com/vim/vim/commit/a95085e0fc2e46c7136982e8ba1ae91375991bfd
* | fix(display): adjust winline info for concealed lines below last line (#32708)luukvbaal2025-03-04
| | | | | | | | | | | | | | Problem: Last line in a window does not store correct `wl_lastlnum` if lines below it are concealed (resulting in e.g. incorrect cursor row). Solution: Increment `wl_lastlnum` while it points to a line above a concealed line.
* | fix(lsp): open_floating_preview() ignores max_height (#32716)Robert Muir2025-03-04
| | | | | | | | | | | | | | Problem: After 47aaddfa the max_height option is no longer respected. Hover documentation and Signature help windows take up the entire text height. Solution: Compare to window's current height and only modify the height if it would reduce the height, not enlarge it.
* | fix(diagnostic): virtual_lines diagnostic columns (#32703)James Trew2025-03-04
| | | | | | | | | | When multiple diagnostics appear on a single line, the virtual lines for all diagnostics except the first were rendered with progressively fewer columns.
* | Merge pull request #32608 from bfredl/nolegacyhlbfredl2025-03-04
|\ \ | | | | | | refactor(tests): use new-style highlight spec in legacy/
| * | refactor(tests): use new-style highlight spec in legacy/bfredl2025-03-04
|/ /
* | vim-patch:9.1.1169: using global variable for get_insert()/get_lambda_name() ↵zeertzjq2025-03-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#32713) Problem: using global variable for get_insert()/get_lambda_name() (after v9.1.1151) Solution: let the functions return a string_T object instead (Yee Cheng Chin) In vim/vim#16720, `get_insert()` was modified to store a string length in a global variable to be queried immediately by another `get_insert_len()` function, which is somewhat fragile. Instead, just have the function itself return a `string_T` object instead. Also do the same for `get_lambda_name()` which has similar issues. closes: vim/vim#16775 https://github.com/vim/vim/commit/0b5fe420715786249cd121d845dbd6a81f962d1b Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
* | vim-patch:9.1.1167: mark '] wrong after copying text object (#32712)zeertzjq2025-03-04
| | | | | | | | | | | | | | | | | | | | | | | | Problem: mark '] wrong after copying text object (ubaldot) Solution: Adjust position of '] for non-linewise, exclusive motions (Jim Zhou) related: vim/vim#16679 closes: vim/vim#16772 https://github.com/vim/vim/commit/360a39ae6c823dd3e3c89c209b544f345c6d86dd Co-authored-by: Jim Zhou <jimzhouzzy@gmail.com>