Mark prompt lines

This commit is contained in:
Kovid Goyal
2021-07-12 14:54:44 +05:30
parent 46b9aca16e
commit 0d4237f802
4 changed files with 36 additions and 3 deletions

View File

@@ -56,6 +56,19 @@ linebuf_mark_line_as_not_continued(LineBuf *self, index_type y) {
self->line_attrs[y] &= ~CONTINUED_MASK;
}
void
linebuf_mark_line_as_prompt_start(LineBuf *self, index_type y) {
self->line_attrs[y] |= PROMPT_START_MASK;
self->line_attrs[y] &= ~OUTPUT_START_MASK;
}
void
linebuf_mark_line_as_output_start(LineBuf *self, index_type y) {
self->line_attrs[y] &= ~PROMPT_START_MASK;
self->line_attrs[y] |= OUTPUT_START_MASK;
}
static PyObject*
clear(LineBuf *self, PyObject *a UNUSED) {