X-Git-Url: https://git.danieliu.xyz/?a=blobdiff_plain;f=st.c;h=97e1800d5196f160d777d0a06acdd7cdf213a59c;hb=684f0a0729442e18115f71bc594a159725418ce8;hp=e65e9813f5fe635a8cfe35d74d3b20241ffa106f;hpb=261ea4b7e0b8d979c0c91ec75251c6970caf39e2;p=st.git diff --git a/st.c b/st.c index e65e981..97e1800 100644 --- a/st.c +++ b/st.c @@ -558,10 +558,10 @@ static int frclen = 0; ssize_t xwrite(int fd, const char *s, size_t len) { - size_t aux = len; + size_t aux = len, r; while (len > 0) { - ssize_t r = write(fd, s, len); + r = write(fd, s, len); if (r < 0) return r; len -= r; @@ -1044,7 +1044,7 @@ propnotify(XEvent *e) if (xpev->state == PropertyNewValue && (xpev->atom == XA_PRIMARY || xpev->atom == clipboard)) { - slenotify(e); + selnotify(e); } } @@ -1056,6 +1056,8 @@ selnotify(XEvent *e) uchar *data, *last, *repl; Atom type, incratom, property; + incratom = XInternAtom(xw.dpy, "INCR", 0); + ofs = 0; if (e->type == SelectionNotify) { property = e->xselection.property; @@ -4314,3 +4316,4 @@ run: return 0; } +