summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHiltjo Posthuma <hiltjo@codemadness.org>2020-05-09 13:55:34 +0200
committerHiltjo Posthuma <hiltjo@codemadness.org>2020-05-09 14:05:04 +0200
commit87545c612e8ab6e7cd1ef38e2355d0cb86df79f2 (patch)
tree8a1e30f08dc32499d546d72ccfd75e86420f5de6
parentauto-sync: draw on idle to avoid flicker/tearing (diff)
downloadst-87545c612e8ab6e7cd1ef38e2355d0cb86df79f2.tar.gz
st-87545c612e8ab6e7cd1ef38e2355d0cb86df79f2.zip
tiny code-style and typo-fix in comment
-rw-r--r--st.c6
-rw-r--r--x.c2
2 files changed, 4 insertions, 4 deletions
diff --git a/st.c b/st.c
index 2bf133f..c161497 100644
--- a/st.c
+++ b/st.c
@@ -38,7 +38,7 @@
38 38
39/* macros */ 39/* macros */
40#define IS_SET(flag) ((term.mode & (flag)) != 0) 40#define IS_SET(flag) ((term.mode & (flag)) != 0)
41#define ISCONTROLC0(c) (BETWEEN(c, 0, 0x1f) || (c) == '\177') 41#define ISCONTROLC0(c) (BETWEEN(c, 0, 0x1f) || (c) == 0x7f)
42#define ISCONTROLC1(c) (BETWEEN(c, 0x80, 0x9f)) 42#define ISCONTROLC1(c) (BETWEEN(c, 0x80, 0x9f))
43#define ISCONTROL(c) (ISCONTROLC0(c) || ISCONTROLC1(c)) 43#define ISCONTROL(c) (ISCONTROLC0(c) || ISCONTROLC1(c))
44#define ISDELIM(u) (u && wcschr(worddelimiters, u)) 44#define ISDELIM(u) (u && wcschr(worddelimiters, u))
@@ -2023,7 +2023,7 @@ tdumpline(int n)
2023 bp = &term.line[n][0]; 2023 bp = &term.line[n][0];
2024 end = &bp[MIN(tlinelen(n), term.col) - 1]; 2024 end = &bp[MIN(tlinelen(n), term.col) - 1];
2025 if (bp != end || bp->u != ' ') { 2025 if (bp != end || bp->u != ' ') {
2026 for ( ;bp <= end; ++bp) 2026 for ( ; bp <= end; ++bp)
2027 tprinter(buf, utf8encode(bp->u, buf)); 2027 tprinter(buf, utf8encode(bp->u, buf));
2028 } 2028 }
2029 tprinter("\n", 1); 2029 tprinter("\n", 1);
@@ -2307,7 +2307,7 @@ tputc(Rune u)
2307 Glyph *gp; 2307 Glyph *gp;
2308 2308
2309 control = ISCONTROL(u); 2309 control = ISCONTROL(u);
2310 if (!IS_SET(MODE_UTF8) && !IS_SET(MODE_SIXEL)) { 2310 if (!IS_SET(MODE_UTF8 | MODE_SIXEL)) {
2311 c[0] = u; 2311 c[0] = u;
2312 width = len = 1; 2312 width = len = 1;
2313 } else { 2313 } else {
diff --git a/x.c b/x.c
index cbbd11f..7bfc36f 100644
--- a/x.c
+++ b/x.c
@@ -1927,7 +1927,7 @@ run(void)
1927 * triggers drawing, we first wait a bit to ensure we got 1927 * triggers drawing, we first wait a bit to ensure we got
1928 * everything, and if nothing new arrives - we draw. 1928 * everything, and if nothing new arrives - we draw.
1929 * We start with trying to wait minlatency ms. If more content 1929 * We start with trying to wait minlatency ms. If more content
1930 * arrives sooner, we retry with shorter and shorter preiods, 1930 * arrives sooner, we retry with shorter and shorter periods,
1931 * and eventually draw even without idle after maxlatency ms. 1931 * and eventually draw even without idle after maxlatency ms.
1932 * Typically this results in low latency while interacting, 1932 * Typically this results in low latency while interacting,
1933 * maximum latency intervals during `cat huge.txt`, and perfect 1933 * maximum latency intervals during `cat huge.txt`, and perfect