diff options
author | Neil <nyamatongwe@gmail.com> | 2023-03-02 22:02:19 +1100 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2023-03-02 22:02:19 +1100 |
commit | 43ba96d61994db084e61b31df278d2d87c1f313c (patch) | |
tree | 9ec2084b3a8594434889fb622f2fe7c5446dc0a9 /src/Document.h | |
parent | c61df8742a4865ac9c67f8ed017248b82fe5574e (diff) | |
download | scintilla-mirror-43ba96d61994db084e61b31df278d2d87c1f313c.tar.gz |
Add multithreaded wrap to significantly improve performance of wrapping large
files.
Diffstat (limited to 'src/Document.h')
-rw-r--r-- | src/Document.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/Document.h b/src/Document.h index 9f4811073..72ed532b3 100644 --- a/src/Document.h +++ b/src/Document.h @@ -50,6 +50,10 @@ public: return start == end; } + [[nodiscard]] Sci::Position Length() const noexcept { + return (start <= end) ? (end - start) : (start - end); + } + Sci::Position First() const noexcept { return (start <= end) ? start : end; } @@ -450,6 +454,7 @@ public: int MarkerNumberFromLine(Sci::Line line, int which) const noexcept; int MarkerHandleFromLine(Sci::Line line, int which) const noexcept; Sci_Position SCI_METHOD LineStart(Sci_Position line) const override; + [[nodiscard]] Range LineRange(Sci::Line line) const noexcept; bool IsLineStartPosition(Sci::Position position) const; Sci_Position SCI_METHOD LineEnd(Sci_Position line) const override; Sci::Position LineEndPosition(Sci::Position position) const; |