aboutsummaryrefslogtreecommitdiff
path: root/ui-curses.c
diff options
context:
space:
mode:
authorMarc André Tanner <mat@brain-dump.org>2016-11-27 11:04:09 +0100
committerMarc André Tanner <mat@brain-dump.org>2016-11-27 11:04:09 +0100
commita02644ef5c685a60dc56aa758843a7d6815862a8 (patch)
treecad6e0977561d072d170f0fab0114a2880fbda9a /ui-curses.c
parentf0e87e3af9b64f5f5d96296a3baac62a1d2f8632 (diff)
downloadvis-a02644ef5c685a60dc56aa758843a7d6815862a8.tar.gz
vis-a02644ef5c685a60dc56aa758843a7d6815862a8.tar.xz
ui: remove terminal restore code
This is already taken care of by libtermkey. Also we did not check whether we actually had a valid state to restore.
Diffstat (limited to 'ui-curses.c')
-rw-r--r--ui-curses.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/ui-curses.c b/ui-curses.c
index 4e07e4c..b0422e4 100644
--- a/ui-curses.c
+++ b/ui-curses.c
@@ -84,7 +84,6 @@ typedef struct {
int width, height; /* terminal dimensions available for all windows */
enum UiLayout layout; /* whether windows are displayed horizontally or vertically */
TermKey *termkey; /* libtermkey instance to handle keyboard input (stdin or /dev/tty) */
- struct termios tio; /* terminal state to restore before exiting */
} UiCurses;
struct UiCursesWin {
@@ -1016,7 +1015,6 @@ __attribute__((noreturn)) static void ui_die(Ui *ui, const char *msg, va_list ap
endwin();
if (uic->termkey)
termkey_stop(uic->termkey);
- tcsetattr(STDERR_FILENO, TCSANOW, &uic->tio);
vfprintf(stderr, msg, ap);
exit(EXIT_FAILURE);
}
@@ -1123,7 +1121,6 @@ static bool ui_init(Ui *ui, Vis *vis) {
if (!term)
term = "xterm";
- tcgetattr(STDERR_FILENO, &uic->tio);
errno = 0;
if (!(uic->termkey = ui_termkey_new(STDIN_FILENO))) {
/* work around libtermkey bug which fails if stdin is /dev/null */
@@ -1206,6 +1203,5 @@ void ui_curses_free(Ui *ui) {
endwin();
if (uic->termkey)
termkey_destroy(uic->termkey);
- tcsetattr(STDERR_FILENO, TCSANOW, &uic->tio);
free(uic);
}