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/Editor.cxx | |
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/Editor.cxx')
-rw-r--r-- | src/Editor.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx index bfe68bad7..bca4bb0b2 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -1493,7 +1493,7 @@ bool Editor::WrapOneLine(Surface *surface, Sci::Line lineToWrap) { AutoLineLayout ll(view.llc, view.RetrieveLineLayout(lineToWrap, *this)); int linesWrapped = 1; if (ll) { - view.LayoutLine(*this, lineToWrap, surface, vs, ll, wrapWidth); + view.LayoutLine(*this, surface, vs, ll, wrapWidth); linesWrapped = ll->lines; } return pcs->SetHeight(lineToWrap, linesWrapped + @@ -1654,7 +1654,7 @@ void Editor::LinesSplit(int pixelWidth) { AutoLineLayout ll(view.llc, view.RetrieveLineLayout(line, *this)); if (surface && ll) { const Sci::Position posLineStart = pdoc->LineStart(line); - view.LayoutLine(*this, line, surface, vs, ll, pixelWidth); + view.LayoutLine(*this, surface, vs, ll, pixelWidth); Sci::Position lengthInsertedTotal = 0; for (int subLine = 1; subLine < ll->lines; subLine++) { const Sci::Position lengthInserted = pdoc->InsertString( @@ -5267,7 +5267,7 @@ void Editor::SetAnnotationHeights(Sci::Line start, Sci::Line end) { AutoSurface surface(this); AutoLineLayout ll(view.llc, view.RetrieveLineLayout(line, *this)); if (surface && ll) { - view.LayoutLine(*this, line, surface, vs, ll, wrapWidth); + view.LayoutLine(*this, surface, vs, ll, wrapWidth); linesWrapped = ll->lines; } } @@ -5669,7 +5669,7 @@ Sci::Line Editor::WrapCount(Sci::Line line) { AutoLineLayout ll(view.llc, view.RetrieveLineLayout(line, *this)); if (surface && ll) { - view.LayoutLine(*this, line, surface, vs, ll, wrapWidth); + view.LayoutLine(*this, surface, vs, ll, wrapWidth); return ll->lines; } else { return 1; |