diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2020-03-23 19:12:19 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2020-03-23 19:12:19 +0000 |
| commit | 7fd691644633caeb04e0816b6743c99ffddce001 (patch) | |
| tree | fa8e8a7932a38797cd4d95735946526f27c72b9a | |
| parent | shm: add shm_can_scroll() (diff) | |
render: margins: regression: fix incorrect margins
| -rw-r--r-- | render.c | 23 |
1 files changed, 17 insertions, 6 deletions
@@ -509,15 +509,26 @@ render_margin(struct terminal *term, struct buffer *buf, int start_line, int end pixman_image_fill_rectangles( PIXMAN_OP_SRC, buf->pix, &bg, 2, (pixman_rectangle16_t[]){ - {0, term->margins.top + start_line * term->cell_height, - term->margins.left, (end_line - start_line) * term->cell_height}, /* Left */ - {rmargin, term->margins.top, term->margins.right, (end_line - start_line) * term->cell_height}, /* Right */ - }); + /* Left */ + {0, term->margins.top + start_line * term->cell_height, + term->margins.left, line_count * term->cell_height}, + /* Right */ + {rmargin, term->margins.top + start_line * term->cell_height, + term->margins.right, line_count * term->cell_height}, + }); + + /* Left */ wl_surface_damage_buffer( - term->window->surface, 0, term->margins.top, term->margins.left, (end_line - start_line) * term->cell_height); + term->window->surface, + 0, term->margins.top + start_line * term->cell_height, + term->margins.left, line_count * term->cell_height); + + /* Right */ wl_surface_damage_buffer( - term->window->surface, rmargin, term->margins.top, term->margins.right, (end_line - start_line) * term->cell_height); + term->window->surface, + rmargin, term->margins.top + start_line * term->cell_height, + term->margins.right, line_count * term->cell_height); } static void |
