> Here is a simpler one:
>
>         echo -n , >/mnt/acme/$winid/addr
>         echo -n >/mnt/acme/$winid/data
>

Maybe it's how I keyed it in, or that I've got the worst cold I've had
in about 6 or 7 years, but I'm getting invalid address with this
version.  It looks cleaner but for some reason it's just not liking
me.

Were you trying it on win(1)?
I think the original winclear was built for that.

The two-liner clears win, but then win stops responding to commands.

The following patch to win/main.c seems to make the two-liner work.

Arvindh

/acme/bin/source/win/main.c:237,243 - main.c:237,242
        sprint(buf, "#%lud,#%lud", q0, q0+n);
        winsetaddr(w, buf, 0);
        write(w->data, buf, 0);
-       *q1 -= n;
        return 0;
 }

/acme/bin/source/win/main.c:457,463 - main.c:456,466
                case 'F':       /* generated by our actions (specifically case 
'S' above) */
                        delta = e->q1-e->q0;
                        if(e->c2=='D'){
-                               /* we know about the delete by _sendinput */
+                               endpt -= delta;
+                               if(e->q1 < hostpt)
+                                       hostpt -= delta;
+                               else if(e->q0 < hostpt)
+                                       hostpt = e->q0;
                                break;
                        }
                        if(e->c2=='I'){

Reply via email to