aboutsummaryrefslogtreecommitdiffstats
path: root/buffer.c
diff options
context:
space:
mode:
authornytpu <alex@nytpu.com>2021-05-31 13:08:33 -0600
committernytpu <alex@nytpu.com>2021-05-31 13:08:33 -0600
commit944e7fde4e31798c84e6e88593163f60cbc350dc (patch)
treec513336ccfaa75f2bda75a4918d8e6d620b2371f /buffer.c
parentadd RowNum define (diff)
downloaded-944e7fde4e31798c84e6e88593163f60cbc350dc.tar.bz2
ed-944e7fde4e31798c84e6e88593163f60cbc350dc.zip
add delete_rows() function
Diffstat (limited to 'buffer.c')
-rw-r--r--buffer.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/buffer.c b/buffer.c
index 54fa51d..107ed17 100644
--- a/buffer.c
+++ b/buffer.c
@@ -40,3 +40,10 @@ delete_row(RowNum at)
--B.numrows;
B.dirty = true;
}
+
+void
+delete_rows(RowNum from, RowNum to)
+{
+ if (from < 0 || to >= B.numrows) return;
+ for (; from != to; ++from) delete_row(from);
+}