mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-29 07:58:01 -04:00
render: scroll: move comment to where it belongs
This commit is contained in:
parent
9166be8aed
commit
7958f8b5ef
1 changed files with 10 additions and 12 deletions
22
render.c
22
render.c
|
|
@ -599,18 +599,6 @@ grid_render_scroll(struct terminal *term, struct buffer *buf,
|
||||||
did_shm_scroll = shm_scroll(
|
did_shm_scroll = shm_scroll(
|
||||||
term->wl->shm, buf, dmg->scroll.lines * term->cell_height);
|
term->wl->shm, buf, dmg->scroll.lines * term->cell_height);
|
||||||
|
|
||||||
/*
|
|
||||||
* When SHM scrolling succeeded, the scrolled in area is made
|
|
||||||
* up of newly allocated, zero-initialized memory. Thus we'll
|
|
||||||
* need to both copy the bottom scrolling region, and
|
|
||||||
* re-render the window margins.
|
|
||||||
*
|
|
||||||
* This is different from when we scroll with a simple
|
|
||||||
* memmove, since in that case, the scrolling region and
|
|
||||||
* margins are *copied*, and thus the original region+margin
|
|
||||||
* remains in place.
|
|
||||||
*/
|
|
||||||
|
|
||||||
if (!did_shm_scroll)
|
if (!did_shm_scroll)
|
||||||
LOG_DBG("fast scroll failed");
|
LOG_DBG("fast scroll failed");
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -620,6 +608,16 @@ grid_render_scroll(struct terminal *term, struct buffer *buf,
|
||||||
dmb->scroll.region.start, scroll_region_lines, term->rows);
|
dmb->scroll.region.start, scroll_region_lines, term->rows);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* When SHM scrolling succeeded, the scrolled in area is made up
|
||||||
|
* of newly allocated, zero-initialized memory. Thus we'll need to
|
||||||
|
* both copy the bottom scrolling region, and re-render the window
|
||||||
|
* margins.
|
||||||
|
*
|
||||||
|
* This is different from when we scroll with a simple memmove,
|
||||||
|
* since in that case, the scrolling region and margins are
|
||||||
|
* *copied*, and thus the original region+margin remains in place.
|
||||||
|
*/
|
||||||
if (did_shm_scroll) {
|
if (did_shm_scroll) {
|
||||||
|
|
||||||
/* Restore bottom scrolling region */
|
/* Restore bottom scrolling region */
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue