]> git.mdlowis.com Git - projs/tide.git/commitdiff
fixed delete function
authorMichael D. Lowis <mike.lowis@gentex.com>
Mon, 2 Apr 2018 19:28:38 +0000 (15:28 -0400)
committerMichael D. Lowis <mike.lowis@gentex.com>
Mon, 2 Apr 2018 19:28:38 +0000 (15:28 -0400)
lib/buf.c

index 4adfc0e1f57b91937f751fa3a2a4fa0bcb4891fb..426338b7950286030bc3578f96bbd50ea300a88c 100644 (file)
--- a/lib/buf.c
+++ b/lib/buf.c
@@ -191,6 +191,8 @@ void buf_del(Buf* buf, Sel* p_sel) {
         //char* str = buf_gets(buf, &sel);
         syncgap(buf, sel.beg);
         buf->gapend += nbytes;
+        sel.end = sel.beg;
+        setsel(buf, p_sel, &sel);
         // update log here
         // free(str);
     }