From d13283f952df0febd90aff7181b8c99b78f4553c Mon Sep 17 00:00:00 2001 From: Ben Wiederhake Date: Fri, 25 Mar 2022 01:22:42 +0100 Subject: [PATCH] LibVT: Fix tooltip condition, properly reset when tooltip not available --- Userland/Libraries/LibVT/TerminalWidget.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Userland/Libraries/LibVT/TerminalWidget.cpp b/Userland/Libraries/LibVT/TerminalWidget.cpp index 714b872c44..5c9b70121c 100644 --- a/Userland/Libraries/LibVT/TerminalWidget.cpp +++ b/Userland/Libraries/LibVT/TerminalWidget.cpp @@ -823,7 +823,7 @@ void TerminalWidget::mousemove_event(GUI::MouseEvent& event) auto attribute = m_terminal.attribute_at(position); if (attribute.href_id != m_hovered_href_id) { - if (m_active_href_id.is_null() || m_active_href_id == attribute.href_id) { + if (!attribute.href_id.is_null()) { m_hovered_href_id = attribute.href_id; m_hovered_href = attribute.href; @@ -839,6 +839,7 @@ void TerminalWidget::mousemove_event(GUI::MouseEvent& event) } else { m_hovered_href_id = {}; m_hovered_href = {}; + set_tooltip({}); } show_or_hide_tooltip(); if (!m_hovered_href.is_empty())