Add linebuf_continued_lines_count()
This commit is contained in:
parent
c93c87e8fe
commit
4682da83c1
@ -326,6 +326,15 @@ is_continued(LineBuf *self, PyObject *val) {
|
|||||||
Py_RETURN_FALSE;
|
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
|
void
|
||||||
linebuf_insert_lines(LineBuf *self, unsigned int num, unsigned int y, unsigned int bottom) {
|
linebuf_insert_lines(LineBuf *self, unsigned int num, unsigned int y, unsigned int bottom) {
|
||||||
index_type i;
|
index_type i;
|
||||||
|
|||||||
@ -91,6 +91,7 @@ void linebuf_clear(LineBuf *, char_type ch);
|
|||||||
void linebuf_index(LineBuf* self, index_type top, index_type bottom);
|
void linebuf_index(LineBuf* self, index_type top, index_type bottom);
|
||||||
void linebuf_reverse_index(LineBuf *self, index_type top, index_type bottom);
|
void linebuf_reverse_index(LineBuf *self, index_type top, index_type bottom);
|
||||||
void linebuf_clear_line(LineBuf *self, index_type y);
|
void linebuf_clear_line(LineBuf *self, index_type y);
|
||||||
|
unsigned int linebuf_continued_lines_count(LineBuf *, index_type);
|
||||||
void linebuf_insert_lines(LineBuf *self, unsigned int num, unsigned int y, unsigned int bottom);
|
void linebuf_insert_lines(LineBuf *self, unsigned int num, unsigned int y, unsigned int bottom);
|
||||||
void linebuf_delete_lines(LineBuf *self, index_type num, index_type y, index_type bottom);
|
void linebuf_delete_lines(LineBuf *self, index_type num, index_type y, index_type bottom);
|
||||||
void linebuf_add_line_to_top(LineBuf *, Line *);
|
void linebuf_add_line_to_top(LineBuf *, Line *);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user