acme: fix owner bug in elogapply
This commit is contained in:
parent
ff086a8232
commit
f0315273ec
1 changed files with 12 additions and 1 deletions
|
|
@ -221,6 +221,7 @@ elogapply(File *f)
|
||||||
uint tq0, tq1;
|
uint tq0, tq1;
|
||||||
Buffer *log;
|
Buffer *log;
|
||||||
Text *t;
|
Text *t;
|
||||||
|
int owner;
|
||||||
|
|
||||||
elogflush(f);
|
elogflush(f);
|
||||||
log = f->elogbuf;
|
log = f->elogbuf;
|
||||||
|
|
@ -229,6 +230,13 @@ elogapply(File *f)
|
||||||
buf = fbufalloc();
|
buf = fbufalloc();
|
||||||
mod = FALSE;
|
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,
|
* 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,
|
* but using coordinates relative to the unmodified buffer. As we apply the log,
|
||||||
|
|
@ -328,7 +336,7 @@ elogapply(File *f)
|
||||||
}
|
}
|
||||||
fbuffree(buf);
|
fbuffree(buf);
|
||||||
elogterm(f);
|
elogterm(f);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Bad addresses will cause bufload to crash, so double check.
|
* Bad addresses will cause bufload to crash, so double check.
|
||||||
* If changes were out of order, we expect problems so don't complain further.
|
* 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->q1 = min(t->q1, f->b.nc);
|
||||||
t->q0 = min(t->q0, t->q1);
|
t->q0 = min(t->q0, t->q1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(t->w)
|
||||||
|
t->w->owner = owner;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue