ref: db5d849be4549bf431b61670ca2ea71f144a8aca
parent: 112a91646c0597cdc2db4231efc15a7f31992ee3
author: phil9 <telephil9@gmail.com>
date: Tue Dec 28 11:10:29 EST 2021
recompute buf lines after edition this would make the scrollbar using wrong bounds to compute its size and scrolling
--- a/vexed.c
+++ b/vexed.c
@@ -54,6 +54,7 @@
if(sel == buf.count)
--sel;
modified = 1;
+ blines = buf.count/16;
redraw();
}
@@ -63,6 +64,7 @@
if(insert(&buf, sel) < 0)
sysfatal("insert: %r");
modified = 1;
+ blines = buf.count/16;
redraw();
}
@@ -73,6 +75,7 @@
sysfatal("append: %r");
sel += 1;
modified = 1;
+ blines = buf.count/16;
redraw();
}