mirror of git://git.sv.gnu.org/nano.git
tweaks: clean up after the previous change
This commit is contained in:
parent
4f7593b704
commit
7ebf5f52b8
|
@ -68,15 +68,14 @@
|
|||
#define PATH_MAX 4096
|
||||
#endif
|
||||
|
||||
/* Ncurses support. */
|
||||
/* Prefer wide ncurses over normal ncurses over curses. */
|
||||
#if defined(HAVE_NCURSESW_NCURSES_H)
|
||||
#include <ncursesw/ncurses.h>
|
||||
#elif defined(HAVE_NCURSES_H)
|
||||
#include <ncurses.h>
|
||||
#else
|
||||
/* Curses support. */
|
||||
#include <curses.h>
|
||||
#endif /* CURSES_H */
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
/* Native language support. */
|
||||
|
|
16
src/nano.c
16
src/nano.c
|
@ -945,12 +945,11 @@ void do_suspend(int signal)
|
|||
/* Put nano to sleep (if suspension is enabled). */
|
||||
void do_suspend_void(void)
|
||||
{
|
||||
if (ISSET(SUSPENDABLE)) {
|
||||
do_suspend(0);
|
||||
} else {
|
||||
if (!ISSET(SUSPENDABLE)) {
|
||||
statusbar(_("Suspension is not enabled"));
|
||||
beep();
|
||||
}
|
||||
} else
|
||||
do_suspend(0);
|
||||
|
||||
ran_a_tool = TRUE;
|
||||
}
|
||||
|
@ -1184,6 +1183,7 @@ void terminal_init(void)
|
|||
raw();
|
||||
nonl();
|
||||
noecho();
|
||||
|
||||
disable_extended_io();
|
||||
|
||||
if (ISSET(PRESERVE))
|
||||
|
@ -1767,12 +1767,10 @@ int main(int argc, char **argv)
|
|||
fcntl(STDIN_FILENO, F_SETFL, stdin_flags & ~O_NONBLOCK);
|
||||
|
||||
#ifdef ENABLE_UTF8
|
||||
/* If setting the locale is successful and it uses UTF-8, we need
|
||||
* to use the multibyte functions for text processing. */
|
||||
if (setlocale(LC_ALL, "") != NULL &&
|
||||
strcmp(nl_langinfo(CODESET), "UTF-8") == 0) {
|
||||
/* If setting the locale is successful and it uses UTF-8, we will
|
||||
* need to use the multibyte functions for text processing. */
|
||||
if (setlocale(LC_ALL, "") && strcmp(nl_langinfo(CODESET), "UTF-8") == 0)
|
||||
utf8_init();
|
||||
}
|
||||
#else
|
||||
setlocale(LC_ALL, "");
|
||||
#endif
|
||||
|
|
|
@ -178,9 +178,8 @@ void read_keys_from(WINDOW *win)
|
|||
/* Before reading the first keycode, display any pending screen updates. */
|
||||
doupdate();
|
||||
|
||||
if (reveal_cursor) {
|
||||
if (reveal_cursor)
|
||||
curs_set(1);
|
||||
}
|
||||
|
||||
/* Read in the first keycode, waiting for it to arrive. */
|
||||
while (input == ERR) {
|
||||
|
|
Loading…
Reference in New Issue