X-Git-Url: https://git.danieliu.xyz/?a=blobdiff_plain;f=st.c;h=c0a9bf3361f877c2939c4f7d922a04c828ebd23d;hb=8e15887de95a7076b9515dcbb428b364f6dc3849;hp=c2da66bf7610fa0d6b1b3f57a7e9d1cf901c1bcb;hpb=ae1923d27533ff46400d93765e971558201ca1ee;p=st.git diff --git a/st.c b/st.c index c2da66b..c0a9bf3 100644 --- a/st.c +++ b/st.c @@ -1069,6 +1069,7 @@ void selclear(XEvent *e) { if(sel.ob.x == -1) return; + sel.mode = SEL_IDLE; sel.ob.x = -1; tsetdirt(sel.nb.y, sel.ne.y); } @@ -3663,7 +3664,7 @@ drawregion(int x1, int y1, int x2, int y2) { term.dirty[y] = 0; specs = term.specbuf; - numspecs = xmakeglyphfontspecs(specs, &term.line[y][0], x2 - x1, x1, y); + numspecs = xmakeglyphfontspecs(specs, &term.line[y][x1], x2 - x1, x1, y); i = ox = 0; for(x = x1; x < x2 && i < numspecs; x++) {