diff options
author | Neil <nyamatongwe@gmail.com> | 2021-05-07 17:24:58 +1000 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2021-05-07 17:24:58 +1000 |
commit | da718f8909b937bd839fc8e09d0b81727644c5fd (patch) | |
tree | 58df42332ba07f3c28475461135fef393b99f564 /src/PositionCache.h | |
parent | ed07e1aa1c0c5ae0168add6ed9964c6aefc19578 (diff) | |
download | scintilla-mirror-da718f8909b937bd839fc8e09d0b81727644c5fd.tar.gz |
Add lineNumber_ argument to LineLayout constructor so always knows which line it
is for. Add accessor for line number and method to say whether compatible with
a line number and number of characters.
Since LineLayout can report its line number, remove line argument from
EditView::LayoutLine which simplifies calling it.
Diffstat (limited to 'src/PositionCache.h')
-rw-r--r-- | src/PositionCache.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/PositionCache.h b/src/PositionCache.h index e86b2bd51..479476eb9 100644 --- a/src/PositionCache.h +++ b/src/PositionCache.h @@ -88,7 +88,7 @@ public: int lines; XYPOSITION wrapIndent; // In pixels - explicit LineLayout(int maxLineLength_); + LineLayout(Sci::Line lineNumber_, int maxLineLength_); // Deleted so LineLayout objects can not be copied. LineLayout(const LineLayout &) = delete; LineLayout(LineLayout &&) = delete; @@ -99,6 +99,8 @@ public: void EnsureBidiData(); void Free() noexcept; void Invalidate(ValidLevel validity_) noexcept; + Sci::Line LineNumber() const noexcept; + bool CanHold(Sci::Line lineDoc, int lineLength_) const noexcept; int LineStart(int line) const noexcept; int LineLength(int line) const noexcept; enum class Scope { visibleOnly, includeEnd }; |