From 49418c2f53c38a8ec1e6d136f77c17625130639d Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 5 Jan 2023 15:28:02 +0530 Subject: [PATCH] Show the hyperlink target bar on the top more often than the bottom. This is because the text cursor is usually closer to the bottom. --- kitty/shaders.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kitty/shaders.c b/kitty/shaders.c index 514f187da..b0e8d06f5 100644 --- a/kitty/shaders.c +++ b/kitty/shaders.c @@ -635,7 +635,7 @@ draw_hyperlink_target(OSWindow *os_window, Screen *screen, const CellRenderData bd->needs_render = true; } if (bd->last_drawn_title_object_id == NULL) return; - const bool along_bottom = screen->lines < 3 || screen->current_hyperlink_under_mouse.y < screen->lines - 2; + const bool along_bottom = screen->current_hyperlink_under_mouse.y < 3; PyObject *ref = bd->last_drawn_title_object_id; Py_INCREF(ref); render_a_bar(os_window, screen, crd, &window->title_bar_data, bd->last_drawn_title_object_id, along_bottom);