lib/widget/input.c: (quote): change type to gboolean.

This commit is contained in:
Andrew Borodin 2016-02-07 11:47:58 +03:00
parent a52cb840ae
commit 4db17d31f9

View File

@ -10,7 +10,7 @@
Jakub Jelinek, 1995 Jakub Jelinek, 1995
Andrej Borsenkow, 1996 Andrej Borsenkow, 1996
Norbert Warmuth, 1997 Norbert Warmuth, 1997
Andrew Borodin <aborodin@vmail.ru>, 2009-2014 Andrew Borodin <aborodin@vmail.ru>, 2009-2016
This file is part of the Midnight Commander. This file is part of the Midnight Commander.
@ -55,7 +55,7 @@
/*** global variables ****************************************************************************/ /*** global variables ****************************************************************************/
int quote = 0; gboolean quote = FALSE;
const global_keymap_t *input_map = NULL; const global_keymap_t *input_map = NULL;
@ -1067,9 +1067,9 @@ input_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *d
case MSG_KEY: case MSG_KEY:
if (parm == XCTRL ('q')) if (parm == XCTRL ('q'))
{ {
quote = 1; quote = TRUE;
v = input_handle_char (in, ascii_alpha_to_cntrl (tty_getch ())); v = input_handle_char (in, ascii_alpha_to_cntrl (tty_getch ()));
quote = 0; quote = FALSE;
return v; return v;
} }
@ -1081,9 +1081,9 @@ input_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *d
/* When pasting multiline text, insert literal Enter */ /* When pasting multiline text, insert literal Enter */
if ((parm & ~KEY_M_MASK) == '\n') if ((parm & ~KEY_M_MASK) == '\n')
{ {
quote = 1; quote = TRUE;
v = input_handle_char (in, '\n'); v = input_handle_char (in, '\n');
quote = 0; quote = FALSE;
return v; return v;
} }
@ -1135,12 +1135,12 @@ input_handle_char (WInput * in, int key)
cb_ret_t v; cb_ret_t v;
long command; long command;
if (quote != 0) if (quote)
{ {
input_free_completions (in); input_free_completions (in);
v = insert_char (in, key); v = insert_char (in, key);
input_update (in, TRUE); input_update (in, TRUE);
quote = 0; quote = FALSE;
return v; return v;
} }