aboutsummaryrefslogtreecommitdiffstats
path: root/src/display.c
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2014-05-04 18:20:15 -0400
committerJesse Luehrs <doy@tozt.net>2014-05-04 18:20:15 -0400
commit24fba6a5e6371d5e79c63c776fd4d7ee34e57f6f (patch)
tree7577c5a9c8f9b542ca9245b58128fcc18323c8f5 /src/display.c
parent3b2af69bba2079617528da71d5e3b0e644ab3483 (diff)
downloadrunes-24fba6a5e6371d5e79c63c776fd4d7ee34e57f6f.tar.gz
runes-24fba6a5e6371d5e79c63c776fd4d7ee34e57f6f.zip
keep a scrollback buffer when we scroll down
Diffstat (limited to 'src/display.c')
-rw-r--r--src/display.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/display.c b/src/display.c
index cc56202..185ca7c 100644
--- a/src/display.c
+++ b/src/display.c
@@ -123,7 +123,7 @@ void runes_display_draw_cursor(RunesTerm *t, cairo_t *cr)
cairo_stroke(cr);
}
else {
- struct runes_cell *cell = &t->scr.rows[row].cells[col];
+ struct runes_cell *cell = &t->scr.rows[t->scr.row_top + row].cells[col];
cairo_rectangle(
cr,
@@ -179,7 +179,7 @@ static void runes_display_recalculate_font_metrics(RunesTerm *t)
static int runes_display_draw_cell(RunesTerm *t, int row, int col)
{
- struct runes_cell *cell = &t->scr.rows[row].cells[col];
+ struct runes_cell *cell = &t->scr.rows[row + t->scr.row_top].cells[col];
cairo_pattern_t *bg = NULL, *fg = NULL;
int bg_is_custom = 0, fg_is_custom = 0;