diff --git a/Userland/Applications/HexEditor/HexEditor.cpp b/Userland/Applications/HexEditor/HexEditor.cpp index 9aedb07366..6d01e93295 100644 --- a/Userland/Applications/HexEditor/HexEditor.cpp +++ b/Userland/Applications/HexEditor/HexEditor.cpp @@ -354,7 +354,7 @@ void HexEditor::mousemove_event(GUI::MouseEvent& event) return; m_selection_end = offset; - m_position = offset; + m_position = (m_selection_end <= m_selection_start) ? offset : offset - 1; scroll_position_into_view(offset); } @@ -369,7 +369,7 @@ void HexEditor::mousemove_event(GUI::MouseEvent& event) return; m_selection_end = offset; - m_position = offset; + m_position = (m_selection_end <= m_selection_start) ? offset : offset - 1; scroll_position_into_view(offset); } update_status();