| Commit message (Collapse) | Author | Age |
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem:
RPC log messages show `log_notify` function name, which is not useful:
DBG 2025-02-04T22:28:02.419 ui.37862 log_notify:57: RPC -> 3: [notify] nvim_ui_set_focus
DBG 2025-02-04T22:28:02.419 nvim.37863.0 log_notify:57: RPC <- 1: [notify] nvim_ui_set_focus
Solution:
Call logmsg() directly.
DBG 2025-02-04T22:42:00.104 ui.40680 RPC: -> 3: [notify] nvim_ui_attach
DBG 2025-02-04T22:42:00.104 ui.40680 RPC: -> 3: [notify] nvim_set_client_info
|
| |
| |
| |
| | |
Before #31525 the prompts had a trailing space.
Also add a test for #7857.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: vim_strnchr() is strange and unnecessary (after v9.1.1009)
Solution: Remove vim_strnchr() and use memchr() instead. Also remove a
comment referencing an #if that is no longer present.
vim_strnchr() is strange in several ways:
- It's named like vim_strchr(), but unlike vim_strchr() it doesn't
support finding a multibyte char.
- Its logic is similar to vim_strbyte(), but unlike vim_strbyte() it
uses char instead of char_u.
- It takes a pointer as its size argument, which isn't convenient for
all its callers.
- It allows embedded NULs, unlike other "strn*" functions which stop
when encountering a NUL byte.
In comparison, memchr() also allows embedded NULs, and it converts bytes
in the string to (unsigned char).
closes: vim/vim#16579
https://github.com/vim/vim/commit/34e1e8de91ff4a8922d454e3147ea425784aa0a0
|
| |
| |
| | |
Follow-up to #27358.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: no sanitize check when running linematch
Solution: add sanitize check before applying the linematch algorithm,
similar to diff_find_change() (Jonathon)
closes: vim/vim#16446
https://github.com/vim/vim/commit/ca307efe486670b76563a4a287bc94dace57fb74
Co-authored-by: Jonathon <jonathonwhite@protonmail.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Coverity complains about dereferencing NULL pointer
Solution: Verify curdiff is not null before dereferencing it
closes: vim/vim#16437
https://github.com/vim/vim/commit/a9f77be9223f8b886d89f7fac778d363586beb85
Co-authored-by: Christian Brabandt <cb@256bit.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: linematch option value not completed
(after v9.1.1009)
Solution: Update diffoption completion values
related: vim/vim#9661
closes: vim/vim#16437
https://github.com/vim/vim/commit/9162e636b31dcac57876cbdec15a683cedd9760e
Co-authored-by: Christian Brabandt <cb@256bit.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: diff feature can be improved
Solution: include the linematch diff alignment algorithm
(Jonathon)
closes: vim/vim#9661
https://github.com/vim/vim/commit/7c7a4e6d1ad50d5b25b42aa2d5a33a8d04a4cc8a
Co-authored-by: Jonathon <jonathonwhite@protonmail.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
(#32317)
Problem: Strange error when heredoc marker starts with "trim".
Solution: Check for whitespace after "trim" or "eval" (zeertzjq)
For :python3 etc., a heredoc marker that starts with a lower-case letter
is valid, and when it starts with "trim" it works in a script but not in
a function, and this PR makes it works in a function.
For :let, a heredoc marker that starts with a lower-case letter is not
valid, but when it starts with "trim" or "eval" the error can be a bit
confusing in a function, and this PR make it less confusing.
closes: vim/vim#16574
https://github.com/vim/vim/commit/449c2e5454735fe1cfc8c21b2c6880d6bdf4cd6e
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem:
's 'guicursor' cursor color not working in suckless terminal (ST).
Nvim's builtin terminfo for ST lacks a "Cs" entry, even though ST does
support the cursor color to be set via termcodes.
Solution:
- In `augment_terminfo()`, assume that `st` always supports color cursor.
- Thomas Dickey will add a "Cs" entry for st to ncurses, from which
Nvim's builtin terminfos are generated.
Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: "clear" macros are not always used.
Solution: Use ALLOC_ONE, VIM_CLEAR, CLEAR_POINTER and CLEAR_FIELD in more
places. (Yegappan Lakshmanan, closes vim/vim#12104)
https://github.com/vim/vim/commit/960dcbd098c761dd623bec9492d5391ff6e8dceb
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Cannot use Perl heredoc in nested :def function. (Virginia
Senioria)
Solution: Only concatenate heredoc lines when not in a nested function.
(closes vim/vim#10415)
https://github.com/vim/vim/commit/d881d1598467d88808bafd2fa86982ebbca7dcc1
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Arguments of a function are missing after failing to redefine
it (after 8.2.2505), and heap-use-after-free with script-local
function (after 9.1.1063).
Solution: Don't clear arguments or free uf_name_exp when failing to
redefine an existing function (zeertzjq)
closes: vim/vim#16567
https://github.com/vim/vim/commit/04d2a3fdc051d6a419dc0ea4de7a9640cefccd31
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
:14verbose
Problem: heap-use-after-free and stack-use-after-scope with :14verbose
when using :return and :try (after 9.1.1063).
Solution: Move back the vim_free(tofree) and the scope of numbuf[].
(zeertzjq)
closes: vim/vim#16563
https://github.com/vim/vim/commit/2101230f4013860dbafcb0cab3f4e6bc92fb6f35
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: too many strlen() calls in userfunc.c
Solution: refactor userfunc.c and remove calls to strlen(),
drop set_ufunc_name() and roll it into alloc_ufunc(),
check for out-of-memory condition in trans_function_name_ext()
(John Marriott)
closes: vim/vim#16537
https://github.com/vim/vim/commit/b32800f7c51c866dc0e87244eb4902540982309d
Add missing change to call_user_func() from patch 8.1.1007.
Consistently use PRIdSCID instead of PRId64 for script IDs.
Co-authored-by: John Marriott <basilisk@internode.on.net>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Crash and/or memory leak when redefining function after error.
Solution: Clear pointer after making a copy. Clear arrays on failure.
(closes vim/vim#11774)
https://github.com/vim/vim/commit/f057171d8b562c72334fd7c15c89ff787358ce3a
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Vim9: crash after defining function with invalid return type.
Solution: Clear function growarrays. Fix memory leak.
https://github.com/vim/vim/commit/31842cd0772b557eb9584a13740430db29de8a51
Cherry-pick free_fp from patch 8.2.3812.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Vim9: function expanded name is cleared when sourcing a script
again.
Solution: Only clear the expanded name when deleting the function.
(closes vim/vim#6707)
https://github.com/vim/vim/commit/c4ce36d48698669f81ec90f7c9dc9ab8c362e538
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: def_function() may return pointer that was freed.
Solution: Set "fp" to NULL after freeing it.
https://github.com/vim/vim/commit/a14e6975478adeddcc2161edc1ec611016aa89f3
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Cannot control cursor positioning of getchar().
Solution: Add "cursor" flag to {opts}, with possible values "hide",
"keep" and "msg".
related: vim/vim#10603
closes: vim/vim#16569
https://github.com/vim/vim/commit/edf0f7db28f87611368e158210e58ed30f673098
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem:
When an evaluation {-item calls `nvim_eval_statusline()`, that nested
call may overwrite the same memory used for `stl_items`.
Solution:
Make `curitem` static and use it to compute an offset to avoid
overwriting `stl_items` in nested calls to `build_stl_str_hl()`. Move
miscellaneous statusline tests into `describe()` block.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem:
When running an initial parse, parse() returns an empty table rather
than an actual range. In `languagetree.lua`, we manually check if
a parse was incremental to determine the changed parse region.
Solution:
- Always return a range (in the C side) from parse().
- Simplify the language tree code a bit.
- Logger no longer shows empty ranges on the initial parse.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
(#32296)
Problem: preinsert text completions not deleted with <C-W>/<C-U>
(ddad431, after v9.1.1059)
Solution: handle <C-W> or <C-U> specifically and clear the completion
(glepnir)
fixes: vim/vim#16557
closes: vim/vim#16565
https://github.com/vim/vim/commit/001c26cd6194fba2bfccb06dec30fdc9e1410e62
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: getchar() can't distinguish between C-I and Tab.
Solution: Add {opts} to pass extra flags to getchar() and getcharstr(),
with "number" and "simplify" keys.
related: vim/vim#10603
closes: vim/vim#16554
https://github.com/vim/vim/commit/e0a2ab397fd13a71efec85b017d5d4d62baf7f63
Cherry-pick tv_dict_has_key() from patch 8.2.4683.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem:
`AucmdExecutable` adds 2 layers of indirection. Although formalizing
a `union` is good practice for shared interfaces, this struct is mainly
for `autocmd_register` which is internal to this module.
Solution:
- Store the cmd/fn fields directly on the `AutoCmd` struct.
- Drop `AucmdExecutable` and related structures.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Port one_function_arg() and get_function_body() from Vim.
vim-patch:8.2.2865: skipping over function body fails
Problem: Skipping over function body fails.
Solution: Do not define the function when skipping.
https://github.com/vim/vim/commit/d87c21a918d8d611750f22d68fc638bf7a79b1d5
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem:
Event handler declared with `once=true` can re-trigger itself (i.e. more
than once!) by calling `nvim_exec_autocmds` or `:doautocmd`.
Analysis:
This happens because the callback is executed before deletion/cleanup
(`aucmd_del`). And calling `aucmd_del` before `call_autocmd_callback`
breaks the autocmd execution...
Solution:
Set `ac->pat=NULL` to temporarily "delete" the autocmd, then restore it
after executing the callback.
Fix #25526
Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: no digraph for "Approaches the limit"
Solution: Add the digraph using .= (Hans Ginzel)
Add digraph Approaches the Limit
≐ U+2250 https://www.fileformat.info/info/unicode/char/2250/index.htm
closes: vim/vim#16508
https://github.com/vim/vim/commit/3a621188ee52badfe7aa783db12588a78dcd8ed6
Co-authored-by: Hans Ginzel <hans@matfyz.cz>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
adding leader (#32276)
Problem: completion: input text deleted with preinsert when adding leader
Solution: remove compl_length and check the ptr for being equal
to pattern when preinsert is active (glepnir)
closes: vim/vim#16545
https://github.com/vim/vim/commit/bfb4eea7869b0118221cd145a774d74191ce6130
Co-authored-by: glepnir <glephunter@gmail.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Co-authored-by: Dustin S. <dstackmasta27@gmail.com>
Co-authored-by: Ferenc Fejes <fejes@inf.elte.hu>
Co-authored-by: Maria José Solano <majosolano99@gmail.com>
Co-authored-by: Yochem van Rosmalen <git@yochem.nl>
Co-authored-by: brianhuster <phambinhanctb2004@gmail.com>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: currently `CursorLine`, `Folded`, `StatusLineNC` highlight
groups have the same background color in default color scheme (Grey3).
This is a result of optimizing their highlighting to be different from
`Normal` but not draw too much attention.
However, this design has a usability issue as those groups are
sometimes appear together which can make it hard (but not impossible)
to differentiate between them.
This was previously partially resolved with `StatusLineNC` using Grey1
as background (and thus be different from `CursorLine` but closer to
`Normal`), but optimizing more towards it being a visible separator
between windows was decided to be more important.
Solution: make `Folded` use Grey1 and `StatusLineNC` use Grey4. This
makes all three highlight groups have different backgrounds with the
following consequences:
- Folds now have the same background as floating windows. It makes
them there differentiable only by the value of 'foldtext' (which
is usually enough). Optimizing for the case "cursor line is next
to the fold" seems to be more useful than for the case "make folds
in floating window differ by background".
- Statusline of inactive windows now draw more attention to them.
The benefits are that they are different from cursor column and
are better window separators.
- Inactive tabline (both `TabLine` and `TabLineFill`) now also draws
a bit more attention to it (as they are linked to `StatusLineNC`)
but with the benefit of also being different from `CursorLine`.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Superfluous cleanup steps in test_ins_complete.vim.
Solution: Remove unnecessary :bw! and :autocmd! commands.
Also remove unnecessary STRLEN() in insexpand.c
(zeertzjq)
closes: vim/vim#16542
https://github.com/vim/vim/commit/8297e2cee337c626c6691e81b25e1f1897c71b86
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
completing (#32251)
Problem: Vim doesn't highlight to be inserted text when completing
Solution: Add support for the "preinsert" 'completeopt' value
(glepnir)
Support automatically inserting the currently selected candidate word
that does not belong to the latter part of the leader.
fixes: vim/vim#3433
closes: vim/vim#16403
https://github.com/vim/vim/commit/edd4ac3e895ce16034c7e098f1d68e0155d97886
Co-authored-by: glepnir <glephunter@gmail.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: `cmdline_show` is emitted unnecessarily each event
loop iteration, because `cmdline_was_last_drawn` is never set.
Solution: Keep track of whether the cmdline was last drawn to avoid
unnecessarily emitting cmdline_show. Set `redraw_state` to
emit `cmdline_pos` when emitting `CursorMovedC`. Only emit
`cmdline_pos` when cmdline was last drawn.
|
| |
| |
| |
| |
| | |
This causes build failures with gcc 15.
Fixes #31723
|
| |
| |
| |
| |
| |
| |
| |
| | |
Problem:
`nvim_win_set_config` cannot set the title and footer independently.
When only one is given, the other is reset to the default of "left".
Solution:
Reuse existing title/footer value if not provided.
|
| |
| |
| |
| |
| | |
Breaking change: `ts_node_child_containing_descendant()` was removed
Breaking change: tree-sitter 0.25 (HEAD) required
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
Problem:
nvim_get_autocmds cannot filter by id.
Solution:
Support it.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
in 'completeopt'
Problem: "nosort" enables fuzzy filtering even if "fuzzy" isn't in
'completeopt' (after v9.1.1049)
Solution: Only enable fuzzy filtering when "fuzzy" is in 'completeopt'.
(zeertzjq)
closes: vim/vim#16510
https://github.com/vim/vim/commit/d65aa1bbdb808ef8fecde6df240c48cc39a52a8e
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: insert-completed items are always sorted, although the LSP
spec[1] standard defines sortText in the returned
completionitem list. This means that the server has sorted the
results. When fuzzy is enabled, this will break the server's
sorting results.
Solution: disable sorting of candidates when "nosort" is set in
'completeopt'
[1]
https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#completionItem
closes: vim/vim#16501
https://github.com/vim/vim/commit/f400a0cc41113eb75516bdd7f38aeaa15208ba2c
Co-authored-by: glepnir <glephunter@gmail.com>
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Right aligned virtual text can cover up buffer text if virtual
text is too long
Solution: An additional option for `virt_text_pos` called
`eol_right_align` has been added to truncate virtual text if it would
have otherwise covered up buffer text. This ensures the virtual text
extends no further left than EOL.
|
| |
| |
| |
| |
| |
| | |
Problem: nlua_call_ref_ctx() does not pop the return value in fast
context that did not error.
Solution: Fall through to end; calling nlua_call_pop_retval().
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: too many strlen() calls in os_unix.c
Solution: refactor os_unix.c and remove calls to strlen()
(John Marriott)
closes: vim/vim#16496
https://github.com/vim/vim/commit/efc41a5958bf25b352e0916af5f57dafbbb44f17
Omit os_expand_wildcards() change: Nvim's code is more complicated and
harder to refactor.
Co-authored-by: John Marriott <basilisk@internode.on.net>
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: A right-click on the 'statuscolumn' does not open the
popupmenu, even if a cell without a clickdef is clicked.
Clicking the %C fold item does not open/close the fold.
Solution: Open the popupmenu when there is no clickdef like right-clicking
the sign/numbercolumn does. Fill "linebuf_vcol" when drawing the
'statuscolumn' to handle foldcolumn item clicks.
|