mirror of
git://git.sv.gnu.org/nano.git
synced 2024-11-21 20:31:20 +03:00
Not leaving curses mode in the formatter, as that would hide
error messages upon reentry. And, if there are any messages, allowing the user a little time to read them. git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5632 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
This commit is contained in:
parent
d4118efea5
commit
e39938c1fa
@ -1,6 +1,9 @@
|
||||
2016-02-11 Benno Schulenberg <bensberg@justemail.net>
|
||||
* src/text.c (do_linter): Go to the next item in the list before
|
||||
freeing the current one. This fixes Savannah bug #46796.
|
||||
* src/text.c (do_formatter): Don't leave curses mode, as that would
|
||||
hide any error messages upon reentry. And if there are any messages,
|
||||
allow the user a little time to read them.
|
||||
|
||||
2016-02-10 Benno Schulenberg <bensberg@justemail.net>
|
||||
* src/text.c (discard_until): Prevent a chain of editing actions from
|
||||
|
16
src/text.c
16
src/text.c
@ -3254,8 +3254,6 @@ void do_formatter(void)
|
||||
blank_bottombars();
|
||||
statusbar(_("Invoking formatter, please wait"));
|
||||
|
||||
endwin();
|
||||
|
||||
/* Set up an argument list to pass to execvp(). */
|
||||
if (formatargs == NULL) {
|
||||
formatargs = (char **)nmalloc(arglen * sizeof(char *));
|
||||
@ -3296,12 +3294,6 @@ void do_formatter(void)
|
||||
/* Wait for the formatter to finish. */
|
||||
wait(&format_status);
|
||||
|
||||
/* Reenter curses mode. */
|
||||
doupdate();
|
||||
|
||||
/* Restore the terminal to its previous state. */
|
||||
terminal_init();
|
||||
|
||||
if (!WIFEXITED(format_status) || WEXITSTATUS(format_status) != 0)
|
||||
finalstatus = invocation_error(openfile->syntax->formatter);
|
||||
else {
|
||||
@ -3327,11 +3319,15 @@ void do_formatter(void)
|
||||
allow_sigwinch(TRUE);
|
||||
#endif
|
||||
|
||||
statusbar(finalstatus);
|
||||
|
||||
/* If there were error messages, allow the user some time to read them. */
|
||||
if (WIFEXITED(format_status) && WEXITSTATUS(format_status) == 2)
|
||||
sleep(4);
|
||||
|
||||
/* If the formatter printed any error messages onscreen, make
|
||||
* sure that they're cleared off. */
|
||||
total_refresh();
|
||||
|
||||
statusbar(finalstatus);
|
||||
}
|
||||
#endif /* !DISABLE_SPELLER */
|
||||
#endif /* !DISABLE_COLOR */
|
||||
|
Loading…
Reference in New Issue
Block a user