Problem: The 'statusline'-format ui elements do not receive right
click events when "mousemodel" is "popup*"
Solution: Do not draw popupmenu and handle click event instead.
(cherry picked from commit 6b5b6e5e07)
Problem: 'statuscolumn' width may be reset after it has been drawn
when multiple windows contain the same buffer. This results
in an offset for the drawn cursor position.
Solution: Loop over all windows (twice) prior to drawing them to
reset the 'statuscolumn' width and validate the sign
column when necessary.
(cherry picked from commit 89f9921a9e)
This will add all interface include directories property from all
targets to main_lib. This may not be universally wanted, in which case
we can revisit/rework it.
Closes https://github.com/neovim/neovim/issues/23237.
(cherry picked from commit 096e91b988)
add screen:expect() calls after insert() to make sure the screen has
been drawn before we assert the state of the semantic tokens table
(cherry picked from commit e97b6536bb)
Problem:
`vim.split('a:::', ':', {trimempty=true})` trims inner empty items.
Regression from 9c49c10470
Solution:
Set `empty_start=false` when first non-empty item is found.
close#23212
(cherry picked from commit 622b1ae38a)
gsrc/nvim/ui_client.c: In function ‘ui_client_start_server’:
gsrc/nvim/ui_client.c:68:5: warning: ignoring return value of ‘dup’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
68 | dup(stderr_isatty ? STDERR_FILENO : STDOUT_FILENO);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
(cherry picked from commit 4d654472e6)
In file included from /usr/include/string.h:535,
from gsrc/nvim/statusline.c:10:
In function ‘strcat’,
inlined from ‘build_stl_str_hl’ at gsrc/nvim/statusline.c:1688:9:
/usr/include/bits/string_fortified.h:130:10: warning: ‘p’ may be used uninitialized [-Wmaybe-uninitialized]
130 | return __builtin___strcat_chk (__dest, __src, __glibc_objsize (__dest));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
(cherry picked from commit 54f5602038)
gsrc/nvim/linematch.c: In function ‘try_possible_paths’:
gsrc/nvim/linematch.c:204:35: warning: ‘from_vals’ may be used uninitialized [-Wmaybe-uninitialized]
204 | size_t unwrapped_idx_from = unwrap_indexes(from_vals, diff_len, ndiffs);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
(cherry picked from commit f5530bf566)
In function ‘cmdpreview_open_win’,
inlined from ‘cmdpreview_may_show’ at gsrc/nvim/ex_getln.c:2487:28:
gsrc/nvim/ex_getln.c:2251:16: warning: ‘cmdpreview_buf’ may be used uninitialized [-Wmaybe-uninitialized]
2251 | int result = do_buffer(DOBUF_GOTO, DOBUF_FIRST, FORWARD, cmdpreview_buf->handle, 0);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
(cherry picked from commit a114a21eff)
In file included from /usr/include/string.h:535,
from gsrc/nvim/eval/userfunc.c:11:
In function ‘strcpy’,
inlined from ‘cat_func_name’ at gsrc/nvim/eval/userfunc.c:662:5,
inlined from ‘get_user_func_name’ at gsrc/nvim/eval/userfunc.c:2854:5:
/usr/include/bits/string_fortified.h:79:10: warning: ‘__builtin___strcpy_chk’ offset 0 from the object at ‘<unknown>’ is out of the bounds of referenced subobject ‘uf_name’ with ty
pe ‘char[]’ at offset 0 [-Warray-bounds=]
79 | return __builtin___strcpy_chk (__dest, __src, __glibc_objsize (__dest));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from gsrc/nvim/eval/typval.h:10,
from gsrc/nvim/buffer_defs.h:20,
from gsrc/nvim/autocmd.h:8,
from gsrc/nvim/eval/userfunc.c:15:
gsrc/nvim/eval/typval_defs.h: In function ‘get_user_func_name’:
gsrc/nvim/eval/typval_defs.h:342:8: note: subobject ‘uf_name’ declared here
342 | char uf_name[]; ///< Name of function (actual size equals name);
| ^~~~~~~
(cherry picked from commit 9802de9334)
src/nvim/drawline.c: In function ‘win_line’:
src/nvim/drawline.c:1418:16: warning: ‘charsize’ may be used uninitialized [-Wmaybe-uninitialized]
1418 | wlv.vcol -= charsize;
| ^~
(cherry picked from commit 2819718873)
src/nvim/drawline.c: In function ‘draw_virt_text’:
src/nvim/drawline.c:298:28: warning: ‘col’ may be used uninitialized [-Wmaybe-uninitialized]
298 | state->eol_col = col + 1;
| ~~~~^~~
(cherry picked from commit e9280a68f7)
gsrc/nvim/api/vim.c: In function ‘nvim_eval_statusline’:
gsrc/nvim/api/vim.c:2268:55: warning: ‘%d’ directive output may be truncated writing between 1 and 10 bytes into a region of size 2 [-Wformat-tru
ncation=]
2268 | snprintf(user_group, sizeof(user_group), "User%d", sp->userhl);
| ^~
gsrc/nvim/api/vim.c:2268:50: note: directive argument in the range [1, 2147483647]
2268 | snprintf(user_group, sizeof(user_group), "User%d", sp->userhl);
| ^~~~~~~~
In file included from /usr/include/stdio.h:906,
from gsrc/nvim/api/vim.c:9:
In function ‘snprintf’,
inlined from ‘nvim_eval_statusline’ at gsrc/nvim/api/vim.c:2268:9:
/usr/include/bits/stdio2.h:54:10: note: ‘__builtin___snprintf_chk’ output between 6 and 15 bytes into a destination of size 6
54 | return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
55 | __glibc_objsize (__s), __fmt,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
56 | __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~
(cherry picked from commit ef7ae66eef)
fix(treesitter playground): wrong range of a node displayed in playground
The call parameters order of the function `get_range_str` is flipped for the last two arguments compared to the declaration.
(cherry picked from commit 8613ba118c)
Co-authored-by: William <50717946+BIKA-C@users.noreply.github.com>
fix(runtime): do not allow breakcheck inside runtime path calculation
problem: breakcheck might run arbitrary lua code, which might require
modules and thus invoke runtime path calculation recursively.
solution: Block the use of breakcheck when expanding glob patterns
inside 'runtimepath'
fixes#23012
(cherry picked from commit aee6f08ce1)
Co-authored-by: bfredl <bjorn.linse@gmail.com>
fix(loader): only keep hashes for the current loop iteration
(cherry picked from commit e12cfa567f)
Co-authored-by: Lewis Russell <lewis6991@gmail.com>
Problem: After neovim/neovim@846a056, only the ruler for current floating or
last window without a statusline is drawn in the cmdline. This means that if the
current window is not one of these, but has no statusline, its ruler will not be
drawn anymore.
Solution: Make `showmode()` draw the ruler of the current window or the last
window in the cmdline if it has no statusline. This also maintains the
previously restored floating window case (`float->w_status_height` should be 0).
This behaviour should again match Vim, but without the overdraw it seems to do
to achieve the same effect; it calls `showmode()` to draw the ruler for the last
window without a statusline, then may draw over it in `showruler()` (which is
now `show_cursor_info_later()` in Nvim) to show the ruler for the current
window..? It's very confusing.
Also update the logic in `win_redr_ruler()` to mirror the check done in
`showmode()`, so that the ruler doesn't potentially draw over the long
ins-completion mode message in some cases.
(cherry picked from commit 65dd3c1180)
Problem: Ruler not drawn correctly when using 'rulerformat'.
Solution: Adjust formatting depending on whether the ruler is drawn in the
statusline or the command line. (Sean Dewar, closesvim/vim#12246)
fc8a601c32
This issue was made apparent after neovim/neovim@0f1e2b6, as `showmode()` calls
`win_redr_ruler()` with `curwin` now if it's floating, rather than the last
window if there's no statusline (which usually already shares its right side
with that of the editor).
Co-authored-by: Sean Dewar <seandewar@users.noreply.github.com>
(cherry picked from commit 7095f8ff9d)
Problem: Insufficient testing for getcmdcompltype().
Solution: Add a few more test cases. (closesvim/vim#12268)
961b2e54bd
(cherry picked from commit 56472e5262)
Problem: find_file_in_path() is not reentrant.
Solution: Instead of global variables pass pointers to the functions.
(closesvim/vim#12093)
5145c9a829
Co-authored-by: Bram Moolenaar <Bram@vim.org>
(cherry picked from commit 7b8daa25cd)