X-Git-Url: https://git.danieliu.xyz/?a=blobdiff_plain;f=x.c;h=210f184a31f3a8a83705f44d9c1ce0432deb38fa;hb=dec6b530a4fddf405c1822b2cac6e2036d3c8b75;hp=cbbd11f0c407dadb615f8ba10ce46a92e9312c7f;hpb=1d590910652519268152eae6b97cf30ace4e90c0;p=st.git diff --git a/x.c b/x.c index cbbd11f..210f184 100644 --- a/x.c +++ b/x.c @@ -1526,8 +1526,9 @@ xdrawcursor(int cx, int cy, Glyph g, int ox, int oy, Glyph og) /* draw the new one */ if (IS_SET(MODE_FOCUSED)) { switch (win.cursor) { - case 7: /* st extension: snowman (U+2603) */ - g.u = 0x2603; + case 7: /* st extension */ + g.u = 0x2603; /* snowman (U+2603) */ + /* FALLTHROUGH */ case 0: /* Blinking Block */ case 1: /* Blinking Block (Default) */ case 2: /* Steady Block */ @@ -1689,8 +1690,7 @@ xsetmode(int set, unsigned int flags) int xsetcursor(int cursor) { - DEFAULT(cursor, 1); - if (!BETWEEN(cursor, 0, 6)) + if (!BETWEEN(cursor, 0, 7)) /* 7: st extension */ return 1; win.cursor = cursor; return 0; @@ -1927,7 +1927,7 @@ run(void) * triggers drawing, we first wait a bit to ensure we got * everything, and if nothing new arrives - we draw. * We start with trying to wait minlatency ms. If more content - * arrives sooner, we retry with shorter and shorter preiods, + * arrives sooner, we retry with shorter and shorter periods, * and eventually draw even without idle after maxlatency ms. * Typically this results in low latency while interacting, * maximum latency intervals during `cat huge.txt`, and perfect @@ -1982,7 +1982,7 @@ main(int argc, char *argv[]) { xw.l = xw.t = 0; xw.isfixed = False; - win.cursor = cursorshape; + xsetcursor(cursorshape); ARGBEGIN { case 'a':