Add linebuf_continued_lines_count()

This commit is contained in:
Eddie Lebow
2021-03-14 01:49:15 -05:00
parent c93c87e8fe
commit 4682da83c1
2 changed files with 10 additions and 0 deletions

View File

@@ -326,6 +326,15 @@ is_continued(LineBuf *self, PyObject *val) {
Py_RETURN_FALSE;
}
unsigned int
linebuf_continued_lines_count(LineBuf *self, index_type stop_at_line) {
unsigned int count = 0;
for (unsigned int i = 0; i < self->ynum && i < stop_at_line; i++)
if (self->line_attrs[i] & CONTINUED_MASK) count++;
return count;
}
void
linebuf_insert_lines(LineBuf *self, unsigned int num, unsigned int y, unsigned int bottom) {
index_type i;