diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2020-03-23 19:15:04 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2020-03-23 19:15:04 +0000 |
| commit | 7958f8b5efcadbb00f7a417f0c24c0c682b7a9dd (patch) | |
| tree | c37a609233e9db75e9bdce600bb04c2ad16ae368 | |
| parent | render: margins: caller explicitly asks for top/bottom margins (diff) | |
render: scroll: move comment to where it belongs
| -rw-r--r-- | render.c | 22 |
1 files changed, 10 insertions, 12 deletions
@@ -599,18 +599,6 @@ grid_render_scroll(struct terminal *term, struct buffer *buf, did_shm_scroll = shm_scroll( 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) LOG_DBG("fast scroll failed"); } else { @@ -620,6 +608,16 @@ grid_render_scroll(struct terminal *term, struct buffer *buf, 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) { /* Restore bottom scrolling region */ |
