tweaks: condense a couple of comments, and reshuffle a line
Этот коммит содержится в:
родитель
a521ac4ae7
Коммит
f21b094dad
12
src/nano.c
12
src/nano.c
@ -1297,10 +1297,8 @@ void regenerate_screen(void)
|
|||||||
if (result == -1)
|
if (result == -1)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* We could check whether the COLS or LINES changed, and return
|
/* We could check whether COLS or LINES changed, and return otherwise,
|
||||||
* otherwise. However, COLS and LINES are curses global variables,
|
* but it seems curses does not always update these global variables. */
|
||||||
* and in some cases curses has already updated them. But not in
|
|
||||||
* all cases. Argh. */
|
|
||||||
#ifdef REDEFINING_MACROS_OK
|
#ifdef REDEFINING_MACROS_OK
|
||||||
COLS = win.ws_col;
|
COLS = win.ws_col;
|
||||||
LINES = win.ws_row;
|
LINES = win.ws_row;
|
||||||
@ -1421,8 +1419,7 @@ void enable_signals(void)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Disable interpretation of the flow control characters in our terminal
|
/* Disable the terminal's XON/XOFF flow-control characters. */
|
||||||
* settings. */
|
|
||||||
void disable_flow_control(void)
|
void disable_flow_control(void)
|
||||||
{
|
{
|
||||||
#ifdef HAVE_TERMIOS_H
|
#ifdef HAVE_TERMIOS_H
|
||||||
@ -1434,8 +1431,7 @@ void disable_flow_control(void)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Enable interpretation of the flow control characters in our terminal
|
/* Enable the terminal's XON/XOFF flow-control characters. */
|
||||||
* settings. */
|
|
||||||
void enable_flow_control(void)
|
void enable_flow_control(void)
|
||||||
{
|
{
|
||||||
#ifdef HAVE_TERMIOS_H
|
#ifdef HAVE_TERMIOS_H
|
||||||
|
@ -2559,11 +2559,9 @@ const char *do_alt_speller(char *tempfile_name)
|
|||||||
wait(&alt_spell_status);
|
wait(&alt_spell_status);
|
||||||
block_sigwinch(FALSE);
|
block_sigwinch(FALSE);
|
||||||
|
|
||||||
/* Reenter curses mode. */
|
/* Set the desired terminal state again, and reenter curses mode. */
|
||||||
doupdate();
|
|
||||||
|
|
||||||
/* Restore the terminal to its previous state. */
|
|
||||||
terminal_init();
|
terminal_init();
|
||||||
|
doupdate();
|
||||||
|
|
||||||
if (!WIFEXITED(alt_spell_status) || WEXITSTATUS(alt_spell_status) != 0)
|
if (!WIFEXITED(alt_spell_status) || WEXITSTATUS(alt_spell_status) != 0)
|
||||||
return invocation_error(alt_speller);
|
return invocation_error(alt_speller);
|
||||||
|
Загрузка…
Ссылка в новой задаче
Block a user