aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authornyamatongwe <unknown>2003-01-01 05:25:59 +0000
committernyamatongwe <unknown>2003-01-01 05:25:59 +0000
commit01b4c0c57e540f45782d6e2b81c2486c8c4c78d4 (patch)
tree8d2918e65ba317deb7cc79f8a9be7317bf30789e /src
parent043edb4a70cdb5f964f5d7e1b5df0c4377e80541 (diff)
downloadscintilla-mirror-01b4c0c57e540f45782d6e2b81c2486c8c4c78d4.tar.gz
Changed wrapped printing to be more similar to wrapped display.
Diffstat (limited to 'src')
-rw-r--r--src/Editor.cxx16
-rw-r--r--src/Editor.h2
2 files changed, 9 insertions, 9 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx
index 9f10e3894..01c850176 100644
--- a/src/Editor.cxx
+++ b/src/Editor.cxx
@@ -285,7 +285,7 @@ Editor::Editor() {
printMagnification = 0;
printColourMode = SC_PRINT_NORMAL;
- printWraps = true;
+ printWrapState = eWrapWord;
cursorMode = SC_CURSORNORMAL;
controlCharSymbol = 0; /* Draw the control characters */
@@ -2442,7 +2442,7 @@ long Editor::FormatRange(bool draw, RangeToFormat *pfr) {
int nPrintPos = pfr->chrg.cpMin;
int visibleLine = 0;
int widthPrint = pfr->rc.Width() - lineNumberWidth;
- if (!printWraps)
+ if (printWrapState == eWrapNone)
widthPrint = LineLayout::wrapWidthInfinite;
while (lineDoc <= linePrintLast && ypos < pfr->rc.bottom) {
@@ -2484,7 +2484,7 @@ long Editor::FormatRange(bool draw, RangeToFormat *pfr) {
}
}
- if (draw && lineNumberWidth &&
+ if (draw && lineNumberWidth &&
(ypos + vsPrint.lineHeight <= pfr->rc.bottom) &&
(visibleLine >= 0)) {
char number[100];
@@ -2517,7 +2517,7 @@ long Editor::FormatRange(bool draw, RangeToFormat *pfr) {
visibleLine++;
if (iwl == ll.lines-1)
nPrintPos = pdoc->LineStart(lineDoc + 1);
- else
+ else
nPrintPos += ll.LineStart(iwl+1) - ll.LineStart(iwl);
}
}
@@ -4965,12 +4965,12 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) {
case SCI_GETPRINTCOLOURMODE:
return printColourMode;
- case SCI_SETPRINTWRAPS:
- printWraps = wParam != 0;
+ case SCI_SETPRINTWRAPMODE:
+ printWrapState = (wParam == SC_WRAP_WORD) ? eWrapWord : eWrapNone;
break;
- case SCI_GETPRINTWRAPS:
- return printWraps;
+ case SCI_GETPRINTWRAPMODE:
+ return printWrapState;
case SCI_GETSTYLEAT:
if (static_cast<short>(wParam) >= pdoc->Length())
diff --git a/src/Editor.h b/src/Editor.h
index 15995e7ea..714efc755 100644
--- a/src/Editor.h
+++ b/src/Editor.h
@@ -184,7 +184,7 @@ protected: // ScintillaBase subclass needs access to much of Editor
int printMagnification;
int printColourMode;
- bool printWraps;
+ int printWrapState;
int cursorMode;
int controlCharSymbol;