Hook up render_line

This commit is contained in:
Kovid Goyal
2017-11-09 16:17:24 +05:30
parent 6c838bbc28
commit 79d8c04b00
5 changed files with 42 additions and 5 deletions

View File

@@ -72,6 +72,7 @@ init_line(HistoryBuf *self, index_type num, Line *l) {
// Initialize the line l, setting its pointer to the offsets for the line at index (buffer position) num
l->cells = lineptr(self, num);
l->continued = self->line_attrs[num] & CONTINUED_MASK;
l->has_dirty_text = self->line_attrs[num] & TEXT_DIRTY_MASK ? true : false;
}
void
@@ -79,6 +80,16 @@ historybuf_init_line(HistoryBuf *self, index_type lnum, Line *l) {
init_line(self, index_of(self, lnum), l);
}
void
historybuf_mark_line_clean(HistoryBuf *self, index_type y) {
self->line_attrs[index_of(self, y)] &= ~TEXT_DIRTY_MASK;
}
void
historybuf_mark_line_dirty(HistoryBuf *self, index_type y) {
self->line_attrs[index_of(self, y)] |= TEXT_DIRTY_MASK;
}
static inline index_type
historybuf_push(HistoryBuf *self) {
index_type idx = (self->start_of_data + self->count) % self->ynum;