summaryrefslogtreecommitdiff
path: root/find.c
diff options
context:
space:
mode:
authorLeo Tenenbaum <pommicket@gmail.com>2021-02-28 21:46:18 -0500
committerLeo Tenenbaum <pommicket@gmail.com>2021-02-28 21:46:18 -0500
commit9d9993607c9093bd59a02138f5e51f1c678e17e9 (patch)
treeb26210dc32e96409e029488ad62309699919a5bf /find.c
parentd00c3247691c2f30214bcfeffb1830d725a173b9 (diff)
fix find highlighting when cursor is on same line
Diffstat (limited to 'find.c')
-rw-r--r--find.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/find.c b/find.c
index 7694a15..58bff8c 100644
--- a/find.c
+++ b/find.c
@@ -309,7 +309,7 @@ static void find_replace_all(Ted *ted) {
}
}
-static void find_menu_frame(Ted *ted, float x1, float y1, float x2, float y2) {
+static void find_menu_frame(Ted *ted, Rect menu_bounds) {
Font *font = ted->font, *font_bold = ted->font_bold;
float const char_height = text_font_char_height(font),
char_height_bold = text_font_char_height(font_bold);
@@ -326,7 +326,8 @@ static void find_menu_frame(Ted *ted, float x1, float y1, float x2, float y2) {
u32 last_rendered_line = buffer_last_rendered_line(buffer);
- Rect menu_bounds = rect4(x1, y1, x2, y2);
+ float x1, y1, x2, y2;
+ rect_coords(menu_bounds, &x1, &y1, &x2, &y2);
x1 += padding;
y1 += padding;