patch 9.1.1584: using ints as boolean type
Commit:
https://github.com/vim/vim/commit/5608f3dc938c258f7a8b71f52a1e70c24e3906c0
Author: Hirohito Higashi <[email protected]>
Date: Wed Jul 23 20:41:11 2025 +0200
patch 9.1.1584: using ints as boolean type
Problem: using ints as bool
Solution: Include stdbool.h and start using bool type directly
(Hirohito Higashi)
This is a test to see if using the boolean types cause any issues.
If this change causes issues on any platform, please reach out.
closes: #17830
Signed-off-by: Hirohito Higashi <[email protected]>
Signed-off-by: Christian Brabandt <[email protected]>
diff --git a/src/gui.c b/src/gui.c
index 4d5965193..e125f8733 100644
--- a/src/gui.c
+++ b/src/gui.c
@@ -396,7 +396,7 @@ gui_init_check(void)
return result;
}
- gui.shell_created = FALSE;
+ gui.shell_created = false;
gui.dying = FALSE;
gui.in_focus = TRUE; // so the guicursor setting works
gui.dragged_sb = SBAR_NONE;
@@ -717,7 +717,7 @@ gui_init(void)
gui_init_which_components(NULL);
// All components of the GUI have been created now
- gui.shell_created = TRUE;
+ gui.shell_created = true;
#ifdef FEAT_GUI_MSWIN
// Set the shell size, adjusted for the screen size. For GTK this only
diff --git a/src/gui.h b/src/gui.h
index f9fdd2d66..5aa374b3c 100644
--- a/src/gui.h
+++ b/src/gui.h
@@ -234,7 +234,7 @@ typedef struct Gui
int in_focus; // Vim has input focus
int in_use; // Is the GUI being used?
int starting; // GUI will start in a little while
- int shell_created; // Has the shell been created yet?
+ bool shell_created; // Has the shell been created yet?
int dying; // Is vim dying? Then output to
terminal
int dofork; // Use fork() when GUI is starting
#ifdef GUI_MAY_SPAWN
diff --git a/src/version.c b/src/version.c
index 440ad9444..74aa8a18a 100644
--- a/src/version.c
+++ b/src/version.c
@@ -719,6 +719,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 1584,
/**/
1583,
/**/
diff --git a/src/vim.h b/src/vim.h
index 94a10a322..fcadb8912 100644
--- a/src/vim.h
+++ b/src/vim.h
@@ -522,6 +522,7 @@ typedef long long vimlong_T;
// for offsetof()
#include <stddef.h>
+#include <stdbool.h>
#if defined(HAVE_SYS_SELECT_H) && \
(!defined(HAVE_SYS_TIME_H) || defined(SYS_SELECT_WITH_SYS_TIME))
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion visit
https://groups.google.com/d/msgid/vim_dev/E1ueeSe-0067L1-Ie%40256bit.org.