summaryrefslogtreecommitdiff
path: root/Userland
diff options
context:
space:
mode:
authorBen Wiederhake <BenWiederhake.GitHub@gmx.de>2022-03-25 01:22:42 +0100
committerAndreas Kling <kling@serenityos.org>2022-03-25 02:33:23 +0100
commitd13283f952df0febd90aff7181b8c99b78f4553c (patch)
tree1bd472f08ee6ff027dc41dcb59295cc28a6a7609 /Userland
parent16e4f9d9daeabba11e2c022cb783a5a0321d2ed7 (diff)
downloadserenity-d13283f952df0febd90aff7181b8c99b78f4553c.zip
LibVT: Fix tooltip condition, properly reset when tooltip not available
Diffstat (limited to 'Userland')
-rw-r--r--Userland/Libraries/LibVT/TerminalWidget.cpp3
1 files changed, 2 insertions, 1 deletions
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())