mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-24 13:35:12 +00:00
LibGUI: Make empty TextRange invalid
Having TextRange which is empty doesn't make any sense. So it confuses the functions that rely on having valid range, and causes them to do no action. Fixes #5341
This commit is contained in:
parent
2b9098f540
commit
c58570ebaf
Notes:
sideshowbarker
2024-07-18 21:53:18 +09:00
Author: https://github.com/speles Commit: https://github.com/SerenityOS/serenity/commit/c58570ebafa Pull-request: https://github.com/SerenityOS/serenity/pull/5520 Issue: https://github.com/SerenityOS/serenity/issues/5341
1 changed files with 1 additions and 1 deletions
|
@ -40,7 +40,7 @@ public:
|
|||
{
|
||||
}
|
||||
|
||||
bool is_valid() const { return m_start.is_valid() && m_end.is_valid(); }
|
||||
bool is_valid() const { return m_start.is_valid() && m_end.is_valid() && m_start != m_end; }
|
||||
void clear()
|
||||
{
|
||||
m_start = {};
|
||||
|
|
Loading…
Add table
Reference in a new issue