textview: fix off-by-one in y_range invalidation

Previously, with selection bounds, we could have a state where a line
display with selections set would eroniously stay in the cache. This
aggresively releases those at the boundary cases fixing deselection
drawing state.
This commit is contained in:
Christian Hergert 2019-10-09 10:43:34 -07:00
parent 329f7c1c40
commit e4a00f864d

View File

@ -681,7 +681,7 @@ gtk_text_line_display_cache_invalidate_y_range (GtkTextLineDisplayCache *cache,
cache_y = _gtk_text_btree_find_line_top (btree, display->line, layout);
cache_height = display->height;
if (cache_y + cache_height > y && cache_y < y + old_height)
if (cache_y + cache_height >= y && cache_y <= y + old_height)
{
gtk_text_line_display_cache_invalidate_display (cache, display, cursors_only);