1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 11:38:11 +00:00

LibVT: Fix tooltip condition, properly reset when tooltip not available

This commit is contained in:
Ben Wiederhake 2022-03-25 01:22:42 +01:00 committed by Andreas Kling
parent 16e4f9d9da
commit d13283f952

View file

@ -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())