summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlastair Poole <netstar@gmail.com>2020-08-10 11:17:32 +0100
committerAlastair Poole <netstar@gmail.com>2020-08-10 11:17:32 +0100
commit39f21df49385473a5743c0838a5da344603f6494 (patch)
treeefaed871f5f008a15aaea41c9d7c61e78e536214
parent7d2f3e85ecd3b96e79b3eef6aec7f8efb0e7250e (diff)
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.
-rw-r--r--src/lib/elementary/elm_code_widget.c2
1 files changed, 1 insertions, 1 deletions
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)
2121 if (!newline && viewport) 2121 if (!newline && viewport)
2122 { 2122 {
2123 /* Where possible render additional lines to the viewport. */ 2123 /* Where possible render additional lines to the viewport. */
2124 _elm_code_widget_fill_range(widget, pd, first_row, last_row + 64 < (unsigned int) h ? last_row + 64 : last_row, NULL); 2124 _elm_code_widget_fill_range(widget, pd, first_row, last_row + 64, NULL);
2125 return; 2125 return;
2126 } 2126 }
2127 2127