From 39f21df49385473a5743c0838a5da344603f6494 Mon Sep 17 00:00:00 2001 From: Alastair Poole Date: Mon, 10 Aug 2020 11:17:32 +0100 Subject: [PATCH] elm_code: Always render N new lines (buffer). If we don't have a buffer here you CAN lose the race when scrolling. As there is a check later in the flow, we can just use a padding of 64 instead of checking the range. This ensures that scrolling is smooth and content is always rendered throughout an aggressive scroll. --- src/lib/elementary/elm_code_widget.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/elementary/elm_code_widget.c b/src/lib/elementary/elm_code_widget.c index 0507abd909..9e6d37cc95 100644 --- a/src/lib/elementary/elm_code_widget.c +++ b/src/lib/elementary/elm_code_widget.c @@ -2121,7 +2121,7 @@ _elm_code_widget_resize(Elm_Code_Widget *widget, Elm_Code_Line *newline) if (!newline && viewport) { /* Where possible render additional lines to the viewport. */ - _elm_code_widget_fill_range(widget, pd, first_row, last_row + 64 < (unsigned int) h ? last_row + 64 : last_row, NULL); + _elm_code_widget_fill_range(widget, pd, first_row, last_row + 64, NULL); return; }