summaryrefslogtreecommitdiffstats
path: root/src/cmd/acme/text.c
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2006-01-12 05:43:26 +0000
committerrsc <devnull@localhost>2006-01-12 05:43:26 +0000
commitcd1d0ab0b5ed07c03b066731328e9519cba5914c (patch)
treec4d50a6baae2af09a4d0d3ce4102d80677237d41 /src/cmd/acme/text.c
parent77c5c852e499362b4fdf7a636e541bab6d496130 (diff)
downloadplan9port-cd1d0ab0b5ed07c03b066731328e9519cba5914c.tar.gz
plan9port-cd1d0ab0b5ed07c03b066731328e9519cba5914c.zip
more tweaks
Diffstat (limited to 'src/cmd/acme/text.c')
-rw-r--r--src/cmd/acme/text.c10
1 files changed, 10 insertions, 0 deletions
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);