[patch] applied: acme-elog

0 views
Skip to first unread message

9cha...@cat-v.org

unread,
Jun 1, 2008, 7:26:04 PM6/1/08
to plan9c...@googlegroups.com
Created Jun 1 17:26 by rsc
Processed Jun 1 23:26 by geoff

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


--
/sys/src/cmd/acme/elog.c
elog.c.orig:221,226 - /n/sources/patch/applied/acme-elog/elog.c:221,227
uint tq0, tq1;
Buffer *log;
Text *t;
+ int owner;

elogflush(f);
log = f->elogbuf;
elog.c.orig:229,234 - /n/sources/patch/applied/acme-elog/elog.c:230,242
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,
elog.c.orig:339,342 - /n/sources/patch/applied/acme-elog/elog.c:347,353
t->q1 = min(t->q1, f->nc);
t->q0 = min(t->q0, t->q1);
}
+
+ if(t->w)
+ t->w->owner = owner;
}

Reply all
Reply to author
Forward
0 new messages