mirror of
https://github.com/RGBCube/serenity
synced 2025-06-01 10:08:10 +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
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
Add a link
Reference in a new issue