diff options
| author | zeertzjq <zeertzjq@outlook.com> | 2026-04-21 08:56:33 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-04-21 08:56:33 +0800 |
| commit | c69af050031e46ad4bd75607d066fb1875b25443 (patch) | |
| tree | f9f9c0866855b2025212353acd593ae3876ed956 /test/functional/vimscript/executable_spec.lua | |
| parent | 49d63ca5484da5ad35d6059b67ff1e526c164eeb (diff) | |
vim-patch:9.2.0378: Using int as bool type in win_T struct (#39263)
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#20008
https://github.com/vim/vim/commit/146d5da0d16b7ea9c767a978cf02384d0831eb92
Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'test/functional/vimscript/executable_spec.lua')
0 files changed, 0 insertions, 0 deletions
