diff options
author | Russ Cox <rsc@swtch.com> | 2008-06-01 09:11:21 -0400 |
---|---|---|
committer | Russ Cox <rsc@swtch.com> | 2008-06-01 09:11:21 -0400 |
commit | f0315273ec908f463929cfd3fb40a4c43945a678 (patch) | |
tree | 29dd67fd64ecc65496467873984ca10bcac3ce7b | |
parent | ff086a82325b22fcbd373edecfc3870e95049401 (diff) | |
download | plan9port-f0315273ec908f463929cfd3fb40a4c43945a678.tar.gz plan9port-f0315273ec908f463929cfd3fb40a4c43945a678.tar.bz2 plan9port-f0315273ec908f463929cfd3fb40a4c43945a678.zip |
acme: fix owner bug in elogapply
-rw-r--r-- | src/cmd/acme/elog.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/cmd/acme/elog.c b/src/cmd/acme/elog.c index 0fd45ddd..4ec3e3b2 100644 --- a/src/cmd/acme/elog.c +++ b/src/cmd/acme/elog.c @@ -221,6 +221,7 @@ elogapply(File *f) uint tq0, tq1; Buffer *log; Text *t; + int owner; elogflush(f); log = f->elogbuf; @@ -229,6 +230,13 @@ elogapply(File *f) 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, @@ -328,7 +336,7 @@ elogapply(File *f) } fbuffree(buf); elogterm(f); - + /* * Bad addresses will cause bufload to crash, so double check. * If changes were out of order, we expect problems so don't complain further. @@ -339,4 +347,7 @@ elogapply(File *f) t->q1 = min(t->q1, f->b.nc); t->q0 = min(t->q0, t->q1); } + + if(t->w) + t->w->owner = owner; } |