option_auto_syntax: change type to gboolean.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
Andrew Borodin 2016-12-01 11:52:46 +03:00
parent cd3a5ee373
commit d078ae4713
4 changed files with 6 additions and 6 deletions

View File

@ -113,7 +113,7 @@ edit_syntax_dialog (WEdit * edit)
{
gboolean force_reload = FALSE;
char *current_syntax;
int old_auto_syntax;
gboolean old_auto_syntax;
current_syntax = g_strdup (edit->syntax_type);
old_auto_syntax = option_auto_syntax;
@ -121,13 +121,13 @@ edit_syntax_dialog (WEdit * edit)
switch (syntax)
{
case 0: /* auto syntax */
option_auto_syntax = 1;
option_auto_syntax = TRUE;
break;
case 1: /* reload current syntax */
force_reload = TRUE;
break;
default:
option_auto_syntax = 0;
option_auto_syntax = FALSE;
g_free (edit->syntax_type);
edit->syntax_type = g_strdup (g_ptr_array_index (names, syntax - N_DFLT_ENTRIES));
}

View File

@ -127,7 +127,7 @@ extern edit_stack_type edit_history_moveto[MAX_HISTORY_MOVETO];
extern int option_line_state_width;
extern int option_max_undo;
extern int option_auto_syntax;
extern gboolean option_auto_syntax;
extern gboolean search_create_bookmark;

View File

@ -2082,7 +2082,7 @@ edit_init (WEdit * edit, int y, int x, int lines, int cols, const vfs_path_t * f
{
gboolean to_free = FALSE;
option_auto_syntax = 1; /* Resetting to auto on every invokation */
option_auto_syntax = TRUE; /* Resetting to auto on every invokation */
option_line_state_width = option_line_state ? LINE_STATE_WIDTH : 0;
if (edit != NULL)

View File

@ -67,7 +67,7 @@
/*** global variables ****************************************************************************/
gboolean option_syntax_highlighting = TRUE;
int option_auto_syntax = 1;
gboolean option_auto_syntax = TRUE;
/*** file scope macro definitions ****************************************************************/