From de7dccbae50c839869017a30cd5e57d6ef639242 Mon Sep 17 00:00:00 2001 From: Neil Date: Thu, 29 Sep 2016 13:36:43 +1000 Subject: The number of margins can be changed with SCI_SETMARGINS. --- src/EditView.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/EditView.cxx') diff --git a/src/EditView.cxx b/src/EditView.cxx index 074c23fc9..92c341d8f 100644 --- a/src/EditView.cxx +++ b/src/EditView.cxx @@ -1982,9 +1982,9 @@ long EditView::FormatRange(bool draw, Sci_RangeToFormat *pfr, Surface *surface, // Modify the view style for printing as do not normally want any of the transient features to be printed // Printing supports only the line number margin. int lineNumberIndex = -1; - for (int margin = 0; margin <= SC_MAX_MARGIN; margin++) { + for (size_t margin = 0; margin < vs.ms.size(); margin++) { if ((vsPrint.ms[margin].style == SC_MARGIN_NUMBER) && (vsPrint.ms[margin].width > 0)) { - lineNumberIndex = margin; + lineNumberIndex = static_cast(margin); } else { vsPrint.ms[margin].width = 0; } -- cgit v1.2.3