mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-03-22 13:27:46 +00:00
LibGUI: Add TextRange::line_count()
This commit is contained in:
committed by
Andreas Kling
parent
640f6f476c
commit
96cf9355b2
@@ -32,6 +32,8 @@ public:
|
||||
TextPosition const& start() const { return m_start; }
|
||||
TextPosition const& end() const { return m_end; }
|
||||
|
||||
size_t line_count() const { return normalized_end().line() - normalized_start().line() + 1; }
|
||||
|
||||
TextRange normalized() const { return TextRange(normalized_start(), normalized_end()); }
|
||||
|
||||
void set_start(TextPosition const& position) { m_start = position; }
|
||||
|
||||
Reference in New Issue
Block a user