summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukas Fleischer <calcurse@cryptocrack.de>2011-07-05 15:42:40 +0200
committerLukas Fleischer <calcurse@cryptocrack.de>2011-07-05 16:04:33 +0200
commit2f8a4257564d0b96d7511574ea250363eb3b28a8 (patch)
treedcd93f8859bf68db7c21ee4de7b2b7539eb2152d
parent233980622f09bd51d2b7bf90f8371cd307e18ea6 (diff)
downloadcalcurse-2f8a4257564d0b96d7511574ea250363eb3b28a8.tar.gz
calcurse-2f8a4257564d0b96d7511574ea250363eb3b28a8.zip
Move endwin() down in wins_prepare_external()
Invoke endwin() *after* calling any other curses functions, such as refresh(). Calling refresh() after endwin() might restore curses mode which is a bad thing for a terminal mode initialization routine. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
-rw-r--r--src/wins.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/wins.c b/src/wins.c
index 2d6a932..2396a87 100644
--- a/src/wins.c
+++ b/src/wins.c
@@ -606,10 +606,10 @@ wins_prepare_external (void)
if (notify_bar ())
notify_stop_main_thread ();
def_prog_mode ();
- endwin ();
ui_mode = UI_CMDLINE;
clear ();
wins_refresh ();
+ endwin ();
}
/* Restore windows when returning from an external command. */