in syntax higlighting. (David Benbennick).
- Fix justify failing for certain lines, new function
nano.c:breakable() (David Benbennick).
+ - Fix screen getting trashed on signals nano can catch
+ (TERM and HUP). New global variable curses_ended,
+ changes to winio.c:statubar() and nano.c:die().
- cut.c:
do_cut_text()
- Fix incorrect cursor location when cutting long lines
statusbar(_("Cancelled"));
return -1;
}
- titlebar(NULL);
+ if (!tmp)
+ titlebar(NULL);
fileptr = fileage;
realname = real_dir_from_tilde(name);
subexpressions, max of 10 */
#endif
+int curses_ended = FALSE; /* Indicates to statusbar() to simply
+ * write to stderr, since endwin() has
+ * ended curses mode. */
+
+
int length_of_list(const shortcut *s)
{
int i = 0;
{
va_list ap;
+ endwin();
+ curses_ended = TRUE;
+
/* Restore the old term settings */
tcsetattr(0, TCSANOW, &oldterm);
- clear();
- refresh();
- resetty();
- endwin();
-
va_start(ap, msg);
vfprintf(stderr, msg, ap);
va_end(ap);
/* Handler for SIGHUP and SIGTERM */
RETSIGTYPE handle_hupterm(int signal)
{
- die(_("Received SIGHUP or SIGTERM"));
+ die(_("Received SIGHUP or SIGTERM\n"));
}
/* What do we do when we catch the suspend signal */
extern historyheadtype replace_history;
#endif
+extern int curses_ended;
+
/* Functions we want available */
/* Public functions in color.c */
int start_x = 0;
size_t foo_len;
+ va_start(ap, msg);
+
+ /* Curses mode is turned off. If we use wmove() now, it will muck up
+ the terminal settings. So we just use vfprintf(). */
+ if (curses_ended) {
+ vfprintf(stderr, msg, ap);
+ va_end(ap);
+ return;
+ }
+
assert(COLS >= 4);
foo = charalloc(COLS - 3);
- va_start(ap, msg);
vsnprintf(foo, COLS - 3, msg, ap);
va_end(ap);