st-flexipatch

My st-flexipatch configuration
git clone git://git.ethandl.dev/st-flexipatch
Log | Files | Refs | README | LICENSE

commit d1b9cca73c954702efcfdcbcfaff8f2bc109cbfb
parent 286db8098b4612d47f2b3b0a499cdcff392d2cf4
Author: bakkeby <bakkeby@gmail.com>
Date:   Mon, 19 Jul 2021 10:14:56 +0200

Adding clearing of images and scrollback history when using clear ref. #30

Diffstat:
Mst.c | 17++++++++++++++++-
Mst.info | 2+-
2 files changed, 17 insertions(+), 2 deletions(-)

diff --git a/st.c b/st.c @@ -2201,8 +2201,23 @@ csihandle(void) tclearregion(0, 0, term.col-1, term.c.y-1); tclearregion(0, term.c.y, term.c.x, term.c.y); break; - case 2: /* all */ + case 2: /* screen */ + tclearregion(0, 0, term.col-1, term.row-1); + break; + case 3: /* all including scrollback */ tclearregion(0, 0, term.col-1, term.row-1); + + #if SCROLLBACK_PATCH + term.scr = 0; + term.histi = 0; + for (int i = 0; i < HISTSIZE; i++) + term.hist[i][0].u = '\0'; + #endif // SCROLLBACK_PATCH + + #if SIXEL_PATCH + for (im = term.images; im; im = im->next) + im->should_delete = 1; + #endif // SIXEL_PATCH break; default: goto unknown; diff --git a/st.info b/st.info @@ -10,7 +10,7 @@ st-mono| simpleterm monocolor, cbt=\E[Z, cvvis=\E[?25h, civis=\E[?25l, - clear=\E[H\E[2J, + clear=\E[H\E[3J, cnorm=\E[?12l\E[?25h, colors#2, cols#80,