fluid: Clear button clears scroll history too

This commit is contained in:
Greg Ercolano 2023-12-06 15:37:36 -08:00
parent 2571f20111
commit e77ec078e9
2 changed files with 4 additions and 2 deletions

View File

@ -3032,7 +3032,8 @@ Fl_Double_Window *shell_run_window=(Fl_Double_Window *)0;
Fl_Terminal *shell_run_terminal=(Fl_Terminal *)0;
static void cb_Clear(Fl_Button*, void*) {
shell_run_terminal->append("\033[2J\033[H");
// clear screen, clear scrollback, home cursor
shell_run_terminal->append("\033[2J\033[3J\033[H");
}
Fl_Return_Button *shell_run_button=(Fl_Return_Button *)0;

View File

@ -1584,7 +1584,8 @@ Function {make_shell_window()} {open
} {
Fl_Button {} {
label Clear
callback {shell_run_terminal->append("\\033[2J\\033[H");}
callback {// clear screen, clear scrollback, home cursor
shell_run_terminal->append("\\033[2J\\033[3J\\033[H");}
xywh {10 395 94 25}
}
Fl_Box {} {