Problem:
Several gui_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 gui_T members to bool (stdbool.h) and update their assignments from TRUE/FALSE to true/false accordingly.
int -> bool (11 members): in_focus, in_use, starting, dying, dofork, dospawn, pointer_hidden, force_redraw, directx_enabled, font_can_bold, which_scrollbars[3]
char -> bool (2 members): cursor_is_valid, menu_is_active
No existing code compares these members against TRUE/FALSE explicitly (e.g. "== TRUE"), so only plain assignments are affected.
X11 Bool members (rsrc_rev_video, color_approx) are intentionally left unchanged: rsrc_rev_video is registered as an X Toolkit resource with XtRBool / sizeof(Bool) and must keep the int-sized X11 Bool type.
https://github.com/vim/vim/pull/20005
(8 files)
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
@h-east pushed 1 commit.
—
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.![]()