| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This simplifies some logic in `languagetree.lua`, removing the need for
`_has_regions`, and removing side effects in `:included_regions()`.
Before:
- Edit is made which sets `_regions = nil`
- Upon the next call to `included_regions()` (usually right after we
marked `_regions` as `nil` due to an `_iter_regions()` call), if
`_regions` is nil, we repopulate the table (as long as the tree
actually has regions)
After:
- Edit is made which resets `_regions` if it exists
- `included_regions()` no longer needs to perform this logic itself, and
also no longer needs to read a `_has_regions` variable
|
|
|
|
|
| |
Compute the diagnostics per line when `show` is called, allowing for
O(1) access for the diagnostics to display when the cursor line or the
list of diagnostics haven't changed.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before the 7121983c45d92349a6532f32dcde9f425e30781e refactoring this
loop added highlights from a `buf_hls` list that had filtered out
elements with `Attrs.None`. After the refactoring this added highlights
from `hls` directly, and those elements would fail with e.g.:
$ nvim 'man://math.h(0)'
Error detected while processing command line:
Error executing Lua callback: /usr/share/nvim/runtime/lua/man.lua:205: Invalid 'hl_group': Expected Lua string
stack traceback:
[C]: in function 'nvim_buf_add_highlight'
/usr/share/nvim/runtime/lua/man.lua:205: in function 'highlight_man_page'
/usr/share/nvim/runtime/lua/man.lua:632: in function 'init_pager'
/usr/share/nvim/runtime/plugin/man.lua:9: in function </usr/share/nvim/runtime/plugin/man.lua:6>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(#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:
The current implementation uses a global augroup for virtual lines in
diagnostics, which can lead to conflicts and unintended behavior when
multiple namespaces/buffers are involved.
Solution:
Refactor the code to use a namespace-specific augroup for virtual lines.
This ensures that each namespace has its own augroup.
Scope the clear commands to only the relevant buffer.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
fixes: vim/vim#16064
closes: vim/vim#16527
https://github.com/vim/vim/commit/a5d19aa44d97151d572362a24efccbfa09d560ae
Co-authored-by: Luca Saccarola <github.e41mv@aleeas.com>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
Users can parse this file to get the shasum they require.
|
|\
| |
| | |
Fix "vim_snprintf() positional arguments" failures on 32-bit systems
|
| |
| |
| |
| |
| | |
When 9.0.1856 was ported, the numbers being formatted as binary were cast
to "unsigned int" rather than uvarnumber_T, as is done upstream.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Since these assertions all use a common function to perform the test
assertions, it's difficult to figure out which test failed:
ERROR test/unit/testutil.lua @ 785: vim_snprintf() positional arguments
test/unit/testutil.lua:757: test/unit/testutil.lua:741: (string) '
test/unit/strings_spec.lua:143: Expected objects to be the same.
Passed in:
(number) 6400
Expected:
(number) 6'
exit code: 256
Adding context to the assertion makes it clearer what the problem is:
ERROR test/unit/testutil.lua @ 785: vim_snprintf() positional arguments
test/unit/testutil.lua:757: test/unit/testutil.lua:741: (string) '
test/unit/strings_spec.lua:149: snprintf(buf, 0, "%1$0.*2$b", cdata<unsigned int>: 0xf78d0f38, cdata<int>: 0xf78dc4e0) = 001100
Expected objects to be the same.
Passed in:
(number) 6400
Expected:
(number) 6'
exit code: 256
|
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| | |
Problem: Error occurs if delete buffer in the middle of parsing.
Solution: Check if buffer is valid in parsing.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: `TSHighlighter:destroy()` causes double-processing of the modeline
and failure of `b:undo_ftplugin`.
Solution: Disable modeline in `TSHighlighter:destroy()` by setting `modeline=false`
if executing `syntaxset` autocommands for the `FileType` event.
Co-authored-by: Daniel Petrovic <daniel.petrovic@ebcont.com>
|
|/ |
|
|
|
|
|
|
|
|
|
|
| |
**Problem:** In the case where the user sets the treesitter foldexpr upon startup in
their `init.lua`, the fold info will be calculated before the parser has
been loaded in, meaning folds will be properly calculated until edits or
`:e`.
**Solution:** Refresh fold information upon `VimEnter` as a sanity check
to ensure that a parser really doesn't exist before always returning
`'0'` in the foldexpr.
|
|
|
|
|
|
|
|
|
|
|
|
| |
**Problem:** Currently, if users want to efficiently disable injections,
they have to delete the injection query files at their runtime path.
This is because we only check for existence of the files before running
the query over the entire buffer.
**Solution:** Check for existence of query files, *and* that those files
actually have captures. This will allow users to just comment out
existing queries (or better yet, just add their own injection query to
`~/.config/nvim` which contains only comments) to disable running the
query over the entire buffer (a potentially slow operation)
|
| |
|
|
|
|
|
|
|
| |
Problem: dircolors syntaxt termguicolors support was not taking dynamic
termguicolors changes into account.
Solution: initializing missing script-internal data on dynamic
termguicolors change.
|
|
|
|
|
|
|
| |
Remove `nvim-linux64.tar.gz` and `nvim.appimage` as maintaining
these is too much work.
Also fix directory names to be consistent.
|
|
|
|
| |
Uses an overload to properly show the different return type based on the
input parameter.
|
| |
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
Problem: No releases for ARM Linux.
Solution: Provide appimages and tarballs for `linux-arm64`. Rename
x86 releases to `linux-x86_64` for consistency.
|
|
|
|
|
| |
Breaking change: `ts_node_child_containing_descendant()` was removed
Breaking change: tree-sitter 0.25 (HEAD) required
|
|
|
|
| |
Also use git tag archive over commit sha if possible.
|
|
|
|
|
|
|
|
| |
closes: vim/vim#16523
https://github.com/vim/vim/commit/db23436b92a1b08e91146ef462482f2c1a79dfe8
Co-authored-by: Nir Lichtman <nir@lichtman.org>
|
| |
|
| |
|
|
|
|
|
|
|
| |
Problem:
nvim_get_autocmds cannot filter by id.
Solution:
Support it.
|