[crash] call endwin() after a crash

Fixes #438
pull/233/merge
Timothy Stack 7 years ago
parent 9764cb1a93
commit 7f5916d480

@ -57,14 +57,19 @@
#if defined HAVE_NCURSESW_CURSES_H
# include <ncursesw/termcap.h>
# include <ncursesw/curses.h>
#elif defined HAVE_NCURSESW_H
# include <termcap.h>
# include <ncursesw.h>
#elif defined HAVE_NCURSES_CURSES_H
# include <ncurses/termcap.h>
# include <ncurses/curses.h>
#elif defined HAVE_NCURSES_H
# include <termcap.h>
# include <ncurses.h>
#elif defined HAVE_CURSES_H
# include <termcap.h>
# include <curses.h>
#else
# error "SysV or X/Open-compatible Curses header file required"
#endif
@ -368,6 +373,7 @@ static void sigabrt(int sig)
}
if (lnav_log_orig_termios != NULL) {
endwin();
tcsetattr(STDOUT_FILENO, TCSAFLUSH, lnav_log_orig_termios);
}
fprintf(stderr, CRASH_MSG, crash_path);

@ -595,6 +595,7 @@ struct json_path_handler format_handlers[] = {
struct json_path_handler root_format_handler[] = {
json_path_handler("/(?<format_name>\\w+)/")
.with_description("The definition of a log file format.")
.with_obj_provider(ensure_format)
.with_children(format_handlers),

@ -54,6 +54,7 @@ AM_LDFLAGS = \
$(STATIC_LDFLAGS) \
$(SQLITE3_LDFLAGS) \
$(READLINE_LDFLAGS) \
$(CURSES_LIB) \
-pthread
CONFIG_OBJS = \
@ -253,6 +254,7 @@ dist_noinst_DATA = \
bad-config/formats/no-samples/format.json \
bad-config-json/formats/invalid-json/format.json \
bad-config-json/formats/invalid-json/format2.json \
bad-config-json/formats/invalid-key/format.json \
datafile_simple.0 \
datafile_simple.1 \
datafile_simple.2 \

Loading…
Cancel
Save