[vim/vim] refactor: change boolean gui_T members from int/char to bool (PR #20005)

0 views
Skip to first unread message

h_east

unread,
Apr 18, 2026, 10:08:28 AM (2 days ago) Apr 18
to vim/vim, Subscribed

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.


You can view, comment on, or merge this pull request online at:

  https://github.com/vim/vim/pull/20005

Commit Summary

  • 4295660 refactor: change boolean gui_T members from int/char to bool

File Changes

(8 files)

Patch Links:


Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/20005@github.com>

h_east

unread,
Apr 18, 2026, 10:45:42 AM (2 days ago) Apr 18
to vim/vim, Push

@h-east pushed 1 commit.

  • 85a8348 refactor: change boolean gui_T members from int/char to bool


View it on GitHub.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/20005/before/429566094f75a3b23fe08ed6096e1b8d493fa8c1/after/85a8348d14b474046c0b64369db53a502ba10239@github.com>

Christian Brabandt

unread,
12:33 PM (6 hours ago) 12:33 PM
to vim/vim, Subscribed
chrisbra left a comment (vim/vim#20005)

thanks


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/20005/c4282580224@github.com>

Christian Brabandt

unread,
12:41 PM (6 hours ago) 12:41 PM
to vim/vim, Subscribed

Closed #20005 via 3c3050e.


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/20005/issue_event/24686334920@github.com>

Reply all
Reply to author
Forward
0 new messages