1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-01 02:28:12 +00:00

HexEditor: Fix crash of copy action when selection is empty

Closes: #11925
This commit is contained in:
Federico Guerinoni 2022-01-16 10:58:09 +01:00 committed by Andreas Kling
parent 53ff271c6f
commit 932ce93fd7

View file

@ -41,7 +41,7 @@ public:
bool save();
void select_all();
bool has_selection() const { return !((m_selection_end < m_selection_start) || m_document->size()); }
bool has_selection() const { return m_selection_start < m_selection_end && m_document->size() > 0; }
size_t selection_size();
size_t selection_start_offset() const { return m_selection_start; }
bool copy_selected_text_to_clipboard();