commit 94d55c376f5921dd3841baef011f353b07189596
parent df5c78f6b27ce85cd3856f164aa4bbfccbc306aa
Author: ssnf <ssnf@ssnf.xyz>
Date: Wed, 18 May 2022 23:56:38 +0000
Improved frame update when file gets modified
Diffstat:
1 file changed, 3 insertions(+), 0 deletions(-)
diff --git a/sim.c b/sim.c
@@ -243,6 +243,7 @@ buf_add(Buffer* b, String* is, String* ds, uint c, uint arg, uint count, Posn p0
b->count[f->i] = count;
b->p0[f->i] = p0;
f->dirty = '*';
+ fr_zero(fr);
}
static void
@@ -379,6 +380,7 @@ redo(int arg)
str_insert(f->s, &buf->is[f->i], buf->p0[f->i]);
f->dot.p0 = f->dot.p1 = buf->p0[f->i];
f->dirty = '*';
+ fr_zero(fr);
fr_update();
}
@@ -1035,6 +1037,7 @@ undo(int arg)
str_insert(f->s, &buf->ds[f->i], buf->p0[f->i]);
f->dot.p0 = f->dot.p1 = buf->p0[f->i--];
f->dirty = '*';
+ fr_zero(fr);
fr_update();
}