aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/EditView.cxx
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2018-04-17 08:23:18 +1000
committerNeil <nyamatongwe@gmail.com>2018-04-17 08:23:18 +1000
commit255d2d33abf4c2c5a918bacde049004e52b7986f (patch)
tree4a563a7d7a9594be0e67b6be6c2c493d8ffea9ec /src/EditView.cxx
parentec79c307ff36cdcce0e520e67bef69e64a3e19b5 (diff)
downloadscintilla-mirror-255d2d33abf4c2c5a918bacde049004e52b7986f.tar.gz
Add SC_DOCUMENTOPTION_TEXT_LARGE option for documents larger than 2 GigaBytes.
This option is provisional and experimental.
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 37a6a9f9e..3f490af5e 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);
}