From cd1d0ab0b5ed07c03b066731328e9519cba5914c Mon Sep 17 00:00:00 2001 From: rsc Date: Thu, 12 Jan 2006 05:43:26 +0000 Subject: more tweaks --- src/cmd/acme/text.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/cmd/acme/text.c') diff --git a/src/cmd/acme/text.c b/src/cmd/acme/text.c index adde0dd7..0e089105 100644 --- a/src/cmd/acme/text.c +++ b/src/cmd/acme/text.c @@ -859,6 +859,16 @@ texttype(Text *t, Rune r) u->cq0 = t->q0; else if(t->q0 != u->cq0+u->ncache) error("text.type cq1"); + /* + * Change the tag before we add to ncache, + * so that if the window body is resized the + * commit will not find anything in ncache. + */ + if(u->what==Body && u->ncache == 0){ + u->needundo = TRUE; + winsettag(t->w); + u->needundo = FALSE; + } textinsert(u, t->q0, rp, nr, FALSE); if(u != t) textsetselect(u, u->q0, u->q1); -- cgit v1.2.3