Problem:
Build fails if user cloned the repo to a path with "%" chars:
src/gen/gen_char_blob.lua:51: bad argument #1 to 'format' (number expected, got string)
Solution:
- Escape "%" chars.
- Also use "%q" in case the path has spaces...
Problem: filetype: ghostty config files are not recognized
Solution: Detect ghostty configuration files as ghostty filetype,
include a simple ghostty filetype plugin (Bez Hermoso)
closes: vim/vim#20002b30803b231
Co-authored-by: Bez Hermoso <bezalelhermoso@gmail.com>
Co-authored-by: Christian Brabandt <cb@256bit.org>
Also:
- drop a few trailing whitespaces
- mark the oneline keyword for :syn keyword as error in the
Vim syntax script, add tests for it.
closes: vim/vim#200181c88aee1fa
Co-authored-by: Eisuke Kawashima <e-kwsm@users.noreply.github.com>
Problem: ins_compl_stop() sets compl_best_matches = 0, but that's a
pointer, should reset compl_num_bests instead,
find_common_prefix() reads cpt_sources_array[cur_source] without
checking cur_source != -1 which causes an OOB for -1,
find_next_completion_match(): second `if` in the pending loop
should be `else if`. Forward paging only moves one step per call.
Solution: Reset compl_num_bests instead, add a check for cur_source not
equal -1, change if to else if (glepnir)
closes: vim/vim#20000b328686d6a
Co-authored-by: glepnir <glephunter@gmail.com>
Problem: Several win_T fields are declared as "int" or "char" but are
used strictly as boolean flags with TRUE/FALSE values. The
integer types obscure the boolean intent and are wider than
needed.
Solution: Change the following win_T members to bool (stdbool.h) and
update their assignments from TRUE/FALSE to true/false
accordingly.
The following conversions have been done:
- int -> bool (10 members):
w_set_curswant, w_botfill, w_old_botfill, w_do_win_fix_cursor,
w_popup_fixed, w_border_highlight_isset, w_cline_folded,
w_redr_status, w_arg_idx_invalid, w_has_scrollbar
- char -> bool (4 members):
w_topline_was_set, w_ru_empty, w_fold_manual, w_foldinvalid
No existing code compares these members against TRUE/FALSE explicitly or
uses ++/-- / bitwise ops on them, so only plain assignments are
affected.
Excluded:
- w_locked (recursion counter with ++/--),
- w_want_scrollbar (may hold -1 from dict_get_bool),
- w_winbar_height (used in arithmetic and exposed as number via
getwininfo()).
related: vim/vim#20005
closes: vim/vim#20008146d5da0d1
Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Problem: Ctrl-R mapping not triggered during completion.
Solution: Move Ctrl-R check out of vim_is_ctrl_x_key()
(zeertzjq).
fixes: vim/vim#20004closes: vim/vim#2000649e8630a28
vim-patch:8.2.0900: function list test fails on MS-Windows
vim-patch:8.2.3918: function list test fails
vim-patch:9.2.0347: Vim9: script-local variable not found
vim-patch:f9cb0d14d CI: Separate out ASan tests
vim-patch:9.2.0361: tests: no tests for ch_listen() with IPs
vim-patch:336533b35 CI: Bump the github-actions group across 2 directories with 4 updates
vim-patch:9.2.0363: Vim9: variable shadowed by script-local function
vim-patch:8.2.0150: cannot define python function when using :execute
vim-patch:8.2.0344: ":def" not skipped properly
vim-patch:8.2.0755: Vim9: No error when variable initializer is not a constant
vim-patch:8.2.1732: stuck when win_execute() for a popup causes an error
vim-patch:8.2.2967: Vim9: crash when using two levels of partials
vim-patch:8.2.3023: Vim9: arguments for execute() not checked at compile time
vim-patch:8.2.3816: compiler warning for posible loss of data on MS-Windows
vim-patch:9.0.0028: MS-Windows: tests fail if there is a "runtime" directory
vim-patch:9.0.0571: MS-Windows: CTRL-C can make Vim exit
vim-patch:9.0.0720: MS-Windows GUI may have pixel dust from antialiasing
vim-patch:9.0.0763: MS-Windows: warning for using int for size_t
vim-patch:9.0.0938: MS-Windows: debug executable not found when running test
vim-patch:9.0.1023: MS-Windows: dynamic loading of libsodium doesn't work
vim-patch:c98bfb9f59b8045372e4c0e396d707f55d9d027a
vim-patch:9.1.1207: MS-Windows: build warning in filepath.c
vim-patch:9.1.1499: MS-Windows: no indication of ARM64 architecture
vim-patch:9.1.1706: MS-Windows: Compile error when building with if_ruby
vim-patch:9.1.1813: MS-Windows: title bar is always white
vim-patch:9.1.1830: MS-Windows: Dark mode titlebar is not configurable
vim-patch:9.1.1966: MS-Windows: dark mode in gui is not supported
vim-patch:9.1.2006: MS-Windows: ANSI colors not correct in terminal
vim-patch:9.1.2046: MS-Windows: compile warnings
vim-patch:9.1.2081: MS-Windows: unnecessary "#ifdef FEAT_GUI" in os_win32.c
vim-patch:9.1.2129: MS-Windows: font size calculation slightly wrong, causing line gaps
vim-patch:9.1.2142: MS-Windows: mouse scroll events not handled for popups
vim-patch:9.2.0011: A few double semicolons after statement
vim-patch:9.2.0163: MS-Windows: Compile warning for unused variable
vim-patch:9.2.0179: MS-Windows: Compiler warning for converting from size_t to int
vim-patch:9.2.0215: MS-Windows: several tests fail in the Windows CUI.
vim-patch:9.2.0216: MS-Windows: Rendering artifacts with DirectX
vim-patch:9.2.0321: MS-Windows: No OpenType font support
vim-patch:dc47344: Fix a few typos
vim-patch:9.2.0353: Missing out-of-memory check in register.c
Problem: Invalid check for non-typed key to dismiss expanded cmdline.
Unable to delay the timer that removes a message from the msg
window.
Solution: Check for empty string instead of nil to determine whether a
key is typed.
Restart the timer if it expires while the user is in the msg
window. Allow entering the msg window with a mouse click.
Problem: After closing a tabpage while the msg window is showing a
message, it is hidden while the msg window still contains a
message.
Solution: Unhide the msg window after entering a tabpage and it still
contains a message.
Co-authored-by: Linykq <yukunlin590@gmail.com>
Problem:
When auto-backport fails, it adds a `needs:backport` label. But that
label isn't being used AFAIK, based on the fact there were 30+ old PRs
with that label from last year (I have since cleaned those up). So the
extra step of having to remove the label is unnecessary friction.
In practice, when a manual backport is needed, it's best to either do it
immediately or just remove the `backport-xx` label.
Also, the presence of an unresolved "Failed backport" comment from the
bot is already a kind of marker that indicates a backport is needed.
Solution:
Don't add `needs:backport` label on failed backport.
Reverts https://github.com/neovim/neovim/pull/30363
Problem: fg_indexed/bg_indexed were dropped from nvim_get_hl output due
to a wrong short_keys guard. HL_FG_INDEXED also wasn't cleared in
hl_blend_attrs, and HLATTRS_DICT_SIZE was too small.
Solution: Remove the short_keys guard, clear HL_FG_INDEXED in
hl_blend_attrs, bump HLATTRS_DICT_SIZE to 24, and clarify docs that
these flags mean rgb is an approximation of the cterm palette index.
Problem: too many strlen() calls when adding strings to dicts
Solution: Refactor code to use string_T, use dict_add_string_len()
instead of dict_add_string() (John Marriott)
Additionally:
- In textprop.c, in function prop_fill_dict() use a string_T to store
local variable text_align.
- In popupwin.c, use a string_T to store struct member pp_name in struct
poppos_entry_T.
- In mark.c, refactor function add_mark() to pass in the length of
argument mname.
- In insexpand.c:
->Use a string_T to store the elements of static array
ctrl_x_mode_names.
->Refactor function trigger_complete_done_event():
->->change type of argument char_u *word to string_T *word.
->->make one access of array ctrl_x_mode_names instead of two.
->Refactor function ins_compl_mode() to accept a string_T to return the
resulting string.
- In fileio.c:
->Refactor function getftypewfd() to accept a string_T to return the
resulting string.
->In function create_readdirex_item() use a string_T to store local
variable q.
- In cmdexpand.c, store global cmdline_orig as a string_T.
- In autocmd.c, in function f_autocmd_get() use a string_T to store local
variables event_name and group_name. Measure their lengths once when
they are assigned so they are not remeasured on each call to
dict_add_string() in the subsequent for loop.
- In channel.c, in function channel_part_info() drop local variable status
and use s instead. Make s a string_T.
closes: vim/vim#19999c13232699d
Co-authored-by: John Marriott <basilisk@internode.on.net>
Problem: Using execute() to define a lambda doesn't work. (Ernie Rael)
Solution: Put the getline function in evalarg. (closesvim/vim#10375)
a7583c42cd
Co-authored-by: Bram Moolenaar <Bram@vim.org>
vim-patch:9.2.0362: division by zero with smoothscroll and small windows
Problem: Resizing a smoothscrolled wrapped window to its textoff width
with 'showbreak' can leave wrapped continuation lines with
zero text width. win_lbr_chartabsize() still runs the partial max_head_vcol calculation in
that state and divides by width2, crashing during redraw.
Solution: Skip that partial head calculation when the wrapped
continuation width is zero, matching the other width2 guards
in charset.c (Jaehwang Jung)
closes: vim/vim#20012
AI-assisted: Codex
0e31fb024c
Problem: using int as bool
Solution: refactor: use bool type for internal flags in buf_T
(Hirohito Higashi)
Change the type of 23 internal state flag fields in buf_T from int
to bool for improved type clarity and code readability.
These fields are pure boolean flags that are never accessed via the
option system's varp (which uses *(int *)varp = value), never compared
with int fields holding non-0/1 values, and never use tristate values.
Converted fields:
- State flags: b_dev_valid, b_saving, b_mod_set, b_new_change,
b_marks_read, b_modified_was_set, b_did_filetype, b_keep_filetype,
b_au_did_filetype, b_u_synced, b_scanned, b_p_initialized
- Characteristic flags: b_has_textprop, b_may_swap, b_did_warn,
b_help, b_spell, b_shortname, b_has_sign_column, b_netbeans_file,
b_was_netbeans_file, b_write_to_channel, b_diff_failed
All TRUE/FALSE assignments to these fields have been updated to
true/false accordingly. The type of temporary save variables
(e.g. help_save in tag.c) has also been adjusted to bool.
Option value fields (b_p_XXX) are kept as int because they are
accessed via the option system and some use tristate (-1) semantics.
Fields compared with int option values (b_start_eof, b_start_eol,
b_start_bomb) are also kept as int to preserve comparison integrity.
closes: vim/vim#200201966a1c896
Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Problem:
- Unable to "pin" a window to prevent closing without specifically
being targeted.
- :fclose closes hidden windows (even before visible windows).
Solution:
- Add 'winpinned' window-local option. When set, window is skipped by
:fclose and :only. Pin the ui2 cmdline window (which should always be
visible), so that it is not closed by :only/fclose.
- Skip over hidden (and pinned) windows with :fclose.
Co-authored-by: glepnir <glephunter@gmail.com>
Although `nlua_call_excmd` is semantically for implementing Ex-commands,
the `require()` should never fail, so that's a "Lua error".
But if the call itself fails (the later `semsg` call), that's an "Ex
cmd" error.
Problem:
win_line() falls into infinite loop when a diff window has top filler
above its first visible buffer line, that first visible buffer line is a
closed fold, and the folded line uses normal non-empty foldtext.
Solution:
Allow flushing pending diff filler rows even when the underlying buffer
line is folded with foldtext.
AI-assisted: Codex
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Problem:
`api.nvim_buf_del_mark` already emits a `MarkSet` event with `col` and `line` set to 0. However, `:delmarks` currently emits no events.
Solution:
Change `:delmarks` to emit the same `col==line==0` event.
Problem: Vim9: return value of winrestcmd() cannot be executed.
Solution: Put colons before each range. (closesvim/vim#7571)
285b15fce1
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem:
Codelens virtual lines remain on stale rows after an external file
change and buffer reload.
Solution:
Clear codelens extmarks and cached row/version state in `on_reload`
before requesting fresh code lenses.
Problem: completionItem/resolve response's `detail` field is silently
dropped. Only `documentation` is shown in the popup.
Solution: Prepend `detail` as a fenced code block before `documentation`
in the info popup, skipping if documentation already contains it.
Problem:
After on_refresh() sends a textDocument/codeLens request, the buffer may
be deleted before the response arrives. The response callback then tries
to redraw that deleted buffer and raises Invalid buffer id error.
Solution:
Check buffer validity before redrawing.
AI-assisted: Codex
Co-authored-by: Yi Ming <ofseed@foxmail.com>
Problem:
No LuaLS types for event-data fields (ev.data). Types are only
documented ad hoc in scattered locations.
Solution:
Add runtime/lua/vim/_meta/events.lua defining vim.event.<name>.data
classes for events that provide ev.data. Reference the types from
each event's help in autocmd.txt, lsp.txt, and pack.txt.
Problem: Using `buf=0`/`win=0` context in `vim._with` should be
equivalent to using explicit buffer/window identifier respectively.
Solution: Explicitly adjust context in case of `buf=0` or `win=0`.
Problem:
Too much boilerplate needed to use Lua to impl an excmd or f_xx
function.
Solution:
- Add `nlua_call_vimfn` which takes the args typval, executes
Lua, and returns a typval.
- refactor(excmd): lua impl for :log, :lsp