fix bug in acme Edit command that caused crash if you run acme, win, and then Edit X ,d in a tag other than the win tag Reference: /n/sources/patch/applied/acme-elog Date: Sun Jun 1 15:16:45 CES 2008 Signed-off-by: rsc@swtch.com --- /sys/src/cmd/acme/elog.c Sun Jun 1 15:16:15 2008 +++ /sys/src/cmd/acme/elog.c Sun Jun 1 15:16:15 2008 @@ -221,6 +221,7 @@ uint tq0, tq1; Buffer *log; Text *t; + int owner; elogflush(f); log = f->elogbuf; @@ -229,6 +230,13 @@ buf = fbufalloc(); mod = FALSE; + owner = 0; + if(t->w){ + owner = t->w->owner; + if(owner == 0) + t->w->owner = 'E'; + } + /* * The edit commands have already updated the selection in t->q0, t->q1, * but using coordinates relative to the unmodified buffer. As we apply the log, @@ -339,4 +347,7 @@ t->q1 = min(t->q1, f->nc); t->q0 = min(t->q0, t->q1); } + + if(t->w) + t->w->owner = owner; }