mirror of https://github.com/xzeldon/htop.git
Fix issue where last line is not cleared when SIGINT is received
When we close the application using the quit function F10, the last line is cleared so that on terminals which do not support ALTBUF the last line is not clobbered. This do not happen when the application exits as a result of a signal (SIGINT,SIGTERM,SIGQUIT). Move the logic to clear the last line into the CRT_done function. This ensures that it will be executed when the CRT_handleSIGTERM is called.
This commit is contained in:
parent
43e9be5a8f
commit
ff0ea41c86
5
CRT.c
5
CRT.c
|
@ -961,6 +961,11 @@ IGNORE_WCASTQUAL_END
|
||||||
}
|
}
|
||||||
|
|
||||||
void CRT_done() {
|
void CRT_done() {
|
||||||
|
attron(CRT_colors[RESET_COLOR]);
|
||||||
|
mvhline(LINES - 1, 0, ' ', COLS);
|
||||||
|
attroff(CRT_colors[RESET_COLOR]);
|
||||||
|
refresh();
|
||||||
|
|
||||||
curs_set(1);
|
curs_set(1);
|
||||||
endwin();
|
endwin();
|
||||||
|
|
||||||
|
|
|
@ -375,11 +375,6 @@ int CommandLine_run(const char* name, int argc, char** argv) {
|
||||||
|
|
||||||
ScreenManager_run(scr, NULL, NULL);
|
ScreenManager_run(scr, NULL, NULL);
|
||||||
|
|
||||||
attron(CRT_colors[RESET_COLOR]);
|
|
||||||
mvhline(LINES - 1, 0, ' ', COLS);
|
|
||||||
attroff(CRT_colors[RESET_COLOR]);
|
|
||||||
refresh();
|
|
||||||
|
|
||||||
Platform_done();
|
Platform_done();
|
||||||
|
|
||||||
CRT_done();
|
CRT_done();
|
||||||
|
|
Loading…
Reference in New Issue