autoformat
Some checks are pending
CI / Linux (python=3.14 cc=clang sanitize=1) (push) Waiting to run
CI / Linux (python=3.12 cc=gcc sanitize=0) (push) Waiting to run
CI / Linux (python=3.13 cc=gcc sanitize=1) (push) Waiting to run
CI / Linux package (push) Waiting to run
CI / Bundle test (macos-latest) (push) Waiting to run
CI / Bundle test (ubuntu-latest) (push) Waiting to run
CI / macOS Brew (push) Waiting to run
CI / Test ./dev.sh and benchmark (push) Waiting to run
CodeQL / CodeQL-Build (actions, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (c, macos-latest) (push) Waiting to run
CodeQL / CodeQL-Build (c, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (go, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (python, ubuntu-latest) (push) Waiting to run
Depscan / Scan dependencies for vulnerabilities (push) Waiting to run

This commit is contained in:
Kovid Goyal 2026-11-02 21:25:06 +05:30
parent 731e0856ec
commit bdafa913bf
No known key found for this signature in database
GPG key ID: 06BC317B515ACE7C
2 changed files with 5 additions and 3 deletions

View file

@ -3829,7 +3829,7 @@ copy_selections(Selections *dest, const Selections *src) {
return true;
}
static Line* render_line_for_virtual_y(Screen *self, int y, Line *line, index_type *lnum, bool *is_history);
static Line *render_line_for_virtual_y(Screen *self, int y, Line *line, index_type *lnum, bool *is_history);
bool
screen_pause_rendering(Screen *self, bool pause, int for_in_ms) {
@ -3875,7 +3875,8 @@ screen_pause_rendering(Screen *self, bool pause, int for_in_ms) {
}
Line line = {.text_cache = self->text_cache};
for (index_type y = 0; y < num_rows; y++) {
index_type lnum; bool is_history;
index_type lnum;
bool is_history;
Line *src = render_line_for_virtual_y(self, (int)y - (int)row_offset, &line, &lnum, &is_history);
if (src) {
linebuf_init_line(self->paused_rendering.linebuf, y);

View file

@ -240,7 +240,8 @@ typedef struct {
#define live_pixel_scroll_enabled(screen) (OPT(pixel_scroll) && (screen)->linebuf == (screen)->main_linebuf)
// While rendering is paused the pixel scroll state captured at pause time is used so that pausing does not change what is rendered
#define pixel_scroll_enabled(screen) ((screen)->paused_rendering.expires_at ? (screen)->paused_rendering.pixel_scroll : live_pixel_scroll_enabled(screen))
#define rendered_pixel_scroll_offset_y(screen) ((screen)->paused_rendering.expires_at ? (screen)->paused_rendering.pixel_scroll_offset_y : (screen)->pixel_scroll_offset_y)
#define rendered_pixel_scroll_offset_y(screen) \
((screen)->paused_rendering.expires_at ? (screen)->paused_rendering.pixel_scroll_offset_y : (screen)->pixel_scroll_offset_y)
#define render_lines_for_screen(screen) (screen->lines + pixel_scroll_enabled(screen))
void screen_align(Screen *);