ref: d8f18c2bdf5f7348de4d5133faaba2d822b08297
parent: 1ed61fa980d084564599dcb2f89665f568ef9011
author: qwx <qwx@sciops.net>
date: Wed Feb 1 01:45:18 EST 2023
cmd: reset position to start of chunk on delete
--- a/chunk.c
+++ b/chunk.c
@@ -262,6 +262,7 @@
}
#undef ASSERT
+/* FIXME: should set .pos as well? or just bounds? s/setdot/setbounds/? */
void
setdot(Dot *dot, Chunk *right)
{
--- a/cmd.c
+++ b/cmd.c
@@ -199,6 +199,7 @@
dprint(latch, "latched\n");
snarf(clone(latch, latch->left));
pushop(OPdel, dot.from, dot.from+chunklen(latch)-1, latch);
+ dot.pos = dot.from;
setdot(&dot, nil);
return 1;
}