diff options
author | zachir <zachir@librem.one> | 2023-06-01 16:57:50 -0500 |
---|---|---|
committer | zachir <zachir@librem.one> | 2023-06-01 16:57:50 -0500 |
commit | 7f0f15dd61863da9eae06391b47dcbd2878c3121 (patch) | |
tree | dbf03dcd13b2cb2cddf2020cde040a0bb0ff666c /st.c | |
parent | 5638a4ca099ec3dc884328133fba4c6cd3dceaf8 (diff) |
add patch to erase scrollback with clear
Diffstat (limited to 'st.c')
-rw-r--r-- | st.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -194,6 +194,7 @@ static void stty(char **); static void sigchld(int); static void ttywriteraw(const char *, size_t); +static void histclean(void); static void csidump(void); static void csihandle(void); static void readcolonargs(char **, int, int[][CAR_PER_ARG]); @@ -749,6 +750,7 @@ selclear(void) return; selremove(); tsetdirt(sel.nb.y, sel.ne.y); + histclean(); } void @@ -985,6 +987,13 @@ ttywrite(const char *s, size_t n, int may_echo) } void +histclean() +{ + for (int i = 0; i < HISTSIZE; i++) + term.hist[i] = xmalloc(term.col * sizeof(Glyph)); +} + +void ttywriteraw(const char *s, size_t n) { fd_set wfd, rfd; |