summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--st.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/st.c b/st.c
index f98ec34..28a3aaf 100644
--- a/st.c
+++ b/st.c
@@ -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;