aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/EditView.cxx
diff options
context:
space:
mode:
authormitchell <unknown>2018-05-05 23:10:51 -0400
committermitchell <unknown>2018-05-05 23:10:51 -0400
commit92676970616a5163636329e49c4cc825e46d6c7f (patch)
tree9e2cc612919e2bc1ee50a31dc0fd8bb7652d94d7 /src/EditView.cxx
parent74d9510a055d6b9aa9d7679522f255db62de76d0 (diff)
downloadscintilla-mirror-92676970616a5163636329e49c4cc825e46d6c7f.tar.gz
Backport: Add SC_DOCUMENTOPTION_TEXT_LARGE option for documents larger than 2 GigaBytes.
This option is provisional and experimental. Backport of changesets 6696:9729ff36c5b1 and 6723:cffe824ab55e. Also added '#include <cstddef>' to top of src/RESearch.cxx to fix 32-bit build error.
Diffstat (limited to 'src/EditView.cxx')
-rw-r--r--src/EditView.cxx7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/EditView.cxx b/src/EditView.cxx
index d9ca751a0..5ff43558d 100644
--- a/src/EditView.cxx
+++ b/src/EditView.cxx
@@ -2330,16 +2330,15 @@ Sci::Position EditView::FormatRange(bool draw, Sci_RangeToFormat *pfr, Surface *
if (draw && lineNumberWidth &&
(ypos + vsPrint.lineHeight <= pfr->rc.bottom) &&
(visibleLine >= 0)) {
- char number[100];
- sprintf(number, "%d" lineNumberPrintSpace, lineDoc + 1);
+ const std::string number = std::to_string(lineDoc + 1) + lineNumberPrintSpace;
PRectangle rcNumber = rcLine;
rcNumber.right = rcNumber.left + lineNumberWidth;
// Right justify
rcNumber.left = rcNumber.right - surfaceMeasure->WidthText(
- vsPrint.styles[STYLE_LINENUMBER].font, number, static_cast<int>(strlen(number)));
+ vsPrint.styles[STYLE_LINENUMBER].font, number.c_str(), static_cast<int>(number.length()));
surface->FlushCachedState();
surface->DrawTextNoClip(rcNumber, vsPrint.styles[STYLE_LINENUMBER].font,
- static_cast<XYPOSITION>(ypos + vsPrint.maxAscent), number, static_cast<int>(strlen(number)),
+ static_cast<XYPOSITION>(ypos + vsPrint.maxAscent), number.c_str(), static_cast<int>(number.length()),
vsPrint.styles[STYLE_LINENUMBER].fore,
vsPrint.styles[STYLE_LINENUMBER].back);
}