ref: d8dffc9593a6d0784d948732393e710acc65d1e1
parent: 5395522745ea8903d5ec1a4d2ed5cff9803e839f
author: qwx <[email protected]>
date: Mon Jan 30 22:02:44 EST 2023
chunk: fix insertion at pos=0 not updating root
--- a/chunk.c
+++ b/chunk.c
@@ -369,6 +369,8 @@
dprint(c, "inserton from=%08zux to=%08zux\n", from, to);
left = cutrange(from, to, latch);
linkchunk(left, c);
+ if(from == 0)
+ norris = c;
dprint(nil, "done\n");
return left;
}
--- a/cmd.c
+++ b/cmd.c
@@ -330,7 +330,6 @@
}
close(fd);
dot = d;
- pushop(OPins, dot.from, dot.from+chunklen(c)-1, nil);
paste(nil, c);
dot.pos = dot.from;
setdot(&dot, nil);