]> git.ipfire.org Git - thirdparty/vim.git/commit
patch 9.1.1789: MS-Windows: using wrong check for bold font v9.1.1789
authorShay <shay_public@hotmail.com>
Thu, 25 Sep 2025 05:57:11 +0000 (05:57 +0000)
committerChristian Brabandt <cb@256bit.org>
Thu, 25 Sep 2025 05:57:11 +0000 (05:57 +0000)
commit36544c408e9b5a2d7ca480e34936d274df0331cd
tree293028ceb5c2b6fc1c71694b591de7f1293f249f
parent1ae980a9cb8d8cb5e5897f3708ddeb7c8c0555bd
patch 9.1.1789: MS-Windows: using wrong check for bold font

Problem:  MS-Windows: using wrong check for bold font
          (after v9.1.1347)
Solution: Test if lf.lfWeight == FW_BOLD instead of a simple truthiness
          test (Shay)

Commit 411ae58 replaced an operator conditional

`if lf.lfWeight == FW_BOLD`

with a truthiness check

`if lf.lfWeight`

This conditional determines whether `:b` is inserted into the value of
`guifont`. The truthiness check allowed both FW_STANDARD and FW_BOLD
font weights to trigger the insertion of `:b` into the `guifont` string.
This commit restores the `== FW_BOLD` condition.

fixes: #18383
closes: #18397

Signed-off-by: Shay <shay_public@hotmail.com>
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
src/gui_w32.c
src/version.c