diff options
author | Andreas Kling <kling@serenityos.org> | 2020-05-10 12:50:01 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-05-10 13:45:04 +0200 |
commit | c10c6240f2acd0bd16b8f47738d67292d7c04764 (patch) | |
tree | bd133e783bddbd6def7b96d47b97ab378ab2e43d /Libraries/LibVT | |
parent | 3226276fe9a5951fa25e99e346b7a1224bb8c979 (diff) | |
download | serenity-c10c6240f2acd0bd16b8f47738d67292d7c04764.zip |
LibVT: Open hyperlinks on plain left-click instead of Ctrl+Click
Diffstat (limited to 'Libraries/LibVT')
-rw-r--r-- | Libraries/LibVT/TerminalWidget.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/Libraries/LibVT/TerminalWidget.cpp b/Libraries/LibVT/TerminalWidget.cpp index a9c78495c3..402ce83eaf 100644 --- a/Libraries/LibVT/TerminalWidget.cpp +++ b/Libraries/LibVT/TerminalWidget.cpp @@ -618,16 +618,14 @@ void TerminalWidget::copy() void TerminalWidget::mousedown_event(GUI::MouseEvent& event) { - if (event.modifiers() == Mod_Ctrl && event.button() == GUI::MouseButton::Left) { + if (event.button() == GUI::MouseButton::Left) { auto attribute = m_terminal.attribute_at(buffer_position_at(event.position())); if (!attribute.href.is_empty()) { - dbg() << "Open URL: _" << attribute.href << "_"; + dbg() << "Open hyperlinked URL: _" << attribute.href << "_"; Desktop::Launcher::open(attribute.href); + return; } - return; - } - if (event.button() == GUI::MouseButton::Left) { if (m_triple_click_timer.is_valid() && m_triple_click_timer.elapsed() < 250) { int start_column = 0; int end_column = m_terminal.columns() - 1; |