diff options
author | Neil <nyamatongwe@gmail.com> | 2016-09-29 13:36:43 +1000 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2016-09-29 13:36:43 +1000 |
commit | de7dccbae50c839869017a30cd5e57d6ef639242 (patch) | |
tree | 6bedd6676770b1381104cddea9d4f0ff17ca5402 /src/EditView.cxx | |
parent | cfe3c049555422cbc7dcf3fd2fadad2f08487dd7 (diff) | |
download | scintilla-mirror-de7dccbae50c839869017a30cd5e57d6ef639242.tar.gz |
The number of margins can be changed with SCI_SETMARGINS.
Diffstat (limited to 'src/EditView.cxx')
-rw-r--r-- | src/EditView.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
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<int>(margin); } else { vsPrint.ms[margin].width = 0; } |