Skip to content

linedisplaycache: improve invalidation with y_range

When we invalidate a y_range using the common pattern of y==0 and old_height==new_height, we are generally invalidating the entire buffer.

This short-circuits that case to just invalidate the buffer in a faster and more complete form. The problem here appears to be that we can't always calculate the ranges properly to invalidate because validation has not run far enough.

This fixes an issue in the GtkSourceView port for GTK 4 where buffers are not correctly displayed with syntax highlighting upon loading.

Merge request reports