diff options
author | Matthias Clasen <mclasen@redhat.com> | 2020-08-03 00:23:13 +0000 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2020-08-03 00:23:13 +0000 |
commit | 992c5fade79102bccc31de96d643a2bd21bbee99 (patch) | |
tree | d05f7de3dfe53b9ea1cea17e864654defc1016e3 /gtk | |
parent | 75d09d5ab301ac21a0be1284b06851d44bed39c0 (diff) | |
parent | 94d17a68093d623a07018a5279175cfcf56ec409 (diff) | |
download | gtk+-992c5fade79102bccc31de96d643a2bd21bbee99.tar.gz |
Merge branch 'wip/chergert/gtk4-textview-fix-selections' into 'master'
textlinedisplaycache: short-circuit y_range invalidation
Closes #2975
See merge request GNOME/gtk!2348
Diffstat (limited to 'gtk')
-rw-r--r-- | gtk/gtktextlinedisplaycache.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gtk/gtktextlinedisplaycache.c b/gtk/gtktextlinedisplaycache.c index fa595644ff..91ce0d98e4 100644 --- a/gtk/gtktextlinedisplaycache.c +++ b/gtk/gtktextlinedisplaycache.c @@ -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); |