Merge branch 'wip/chergert/gtk4-textview-fix-selections' into 'master'

textlinedisplaycache: short-circuit y_range invalidation

Closes #2975

See merge request GNOME/gtk!2348
This commit is contained in:
Matthias Clasen 2020-08-03 00:23:13 +00:00
commit 992c5fade7

View File

@ -663,6 +663,12 @@ gtk_text_line_display_cache_invalidate_y_range (GtkTextLineDisplayCache *cache,
STAT_INC (cache->inval_by_y_range);
if (y < 0)
{
gtk_text_line_display_cache_invalidate (cache);
return;
}
btree = _gtk_text_buffer_get_btree (layout->buffer);
iter = find_iter_at_at_y (cache, layout, y);