From dfe82ad946c0d87ba533f8f0b57c1e969125c97a Mon Sep 17 00:00:00 2001 From: pommicket Date: Wed, 13 Sep 2023 22:59:29 -0400 Subject: clip diagnostic rect to buffer --- buffer.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/buffer.c b/buffer.c index 0bfafb6..f4370ef 100644 --- a/buffer.c +++ b/buffer.c @@ -3470,7 +3470,8 @@ void buffer_render(TextBuffer *buffer, Rect r) { // change color so that line number is still visible line_number_color = alt_line_number_color; } - const Rect rect = rect4(x1, y, diagnostic_x2, y + char_height); + Rect rect = rect4(x1, y, diagnostic_x2, y + char_height); + buffer_clip_rect(buffer, &rect); gl_geometry_rect( rect, color & 0xffffff7f -- cgit v1.2.3