summaryrefslogtreecommitdiff
path: root/src/screen.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/screen.h')
-rw-r--r--src/screen.h23
1 files changed, 2 insertions, 21 deletions
diff --git a/src/screen.h b/src/screen.h
index 50e18c6..8498e9d 100644
--- a/src/screen.h
+++ b/src/screen.h
@@ -161,15 +161,7 @@ static inline struct srow *screen_row_at(const struct screen *s, int y)
static inline struct srow *term_row(const struct term *t, int y)
{
- int p = t->scr.top + y;
- struct srow *row = &t->scr.slot[p >= t->scr.rows ? p - t->scr.rows : p];
- srow_materialize_text(row);
- return row;
-}
-
-static inline struct srow *term_screen_row(const struct term *t, int y)
-{
- return term_row(t, y);
+ return screen_get_row(&t->scr, y);
}
/* Write the cells of a text row to out: its text, then its fill blanks.
@@ -361,17 +353,6 @@ static inline void mark_row_blank(struct term *t, int p, uint32_t fg, uint32_t b
(void)bg;
}
-static inline void row_fill_gap(struct term *t, int p, struct cell *row, int x)
-{
- struct screen *s = term_active_screen(t);
- struct srow *r = &s->slot[p];
- if (x > r->len) {
- if (!(r->flags & RF_TAIL_PADDED))
- fill_cells(row + r->len, x - r->len, TERM_COLOR_FG, TERM_COLOR_BG);
- r->len = (uint16_t)x;
- }
-}
-
static inline void term_row_fill_gap(struct srow *row, int x)
{
if (x > row->len) {
@@ -413,7 +394,7 @@ static inline void erase_span(struct term *t, int p, int from, int to)
row_set_wrapped(row, false);
if (!pristine) {
- row_fill_gap(t, p, cells, from);
+ term_row_fill_gap(row, from);
fill_cells(cells + from, to - from, t->cur_fg, t->cur_bg);
if (to > len) {
row->len = (uint16_t)to;