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.
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()).
https://github.com/vim/vim/pull/20008
(36 files)
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
thanks
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()