summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2023-09-13 22:59:29 -0400
committerpommicket <pommicket@gmail.com>2023-09-13 22:59:40 -0400
commitdfe82ad946c0d87ba533f8f0b57c1e969125c97a (patch)
tree3a8224cdc58fc8fa1b7ca3bc432f83b03685ea1c
parent5370505f95b2539ab979e1daddae4a3b843f8d62 (diff)
clip diagnostic rect to buffer
-rw-r--r--buffer.c3
1 files changed, 2 insertions, 1 deletions
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