diff options
author | nyamatongwe <unknown> | 2012-03-31 11:42:21 +1100 |
---|---|---|
committer | nyamatongwe <unknown> | 2012-03-31 11:42:21 +1100 |
commit | 0f0a1f403949f681348b1941229014758cc33e9e (patch) | |
tree | dd8e71ee4f7ce7a5446aef9ed11745059c2f9892 /src/Editor.cxx | |
parent | ac3f8a2e992e10e372c4053ca6f8258ca3342dec (diff) | |
download | scintilla-mirror-0f0a1f403949f681348b1941229014758cc33e9e.tar.gz |
Bug #3512961. Word wrap indentation for print using positions calculated for
display instead of printer.
Diffstat (limited to 'src/Editor.cxx')
-rw-r--r-- | src/Editor.cxx | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx index 9ae4fb59a..b287384d4 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -213,7 +213,6 @@ Editor::Editor() { wrapVisualFlagsLocation = 0; wrapVisualStartIndent = 0; wrapIndentMode = SC_WRAPINDENT_FIXED; - wrapAddIndent = 0; convertPastes = true; @@ -297,15 +296,6 @@ void Editor::RefreshStyleData() { if (surface) { vs.Refresh(*surface); } - if (wrapIndentMode == SC_WRAPINDENT_INDENT) { - wrapAddIndent = pdoc->IndentSize() * vs.spaceWidth; - } else if (wrapIndentMode == SC_WRAPINDENT_SAME) { - wrapAddIndent = 0; - } else { //SC_WRAPINDENT_FIXED - wrapAddIndent = wrapVisualStartIndent * vs.aveCharWidth; - if ((wrapVisualFlags & SC_WRAPVISUALFLAG_START) && (wrapAddIndent <= 0)) - wrapAddIndent = vs.aveCharWidth; // must indent to show start visual - } SetScrollBars(); SetRectangularRange(); } @@ -2318,6 +2308,17 @@ void Editor::LayoutLine(int line, Surface *surface, ViewStyle &vstyle, LineLayou width = 20; } if ((ll->validity == LineLayout::llPositions) || (ll->widthLine != width)) { + XYPOSITION wrapAddIndent = 0; // This will be added to initial indent of line + if (wrapIndentMode == SC_WRAPINDENT_INDENT) { + wrapAddIndent = pdoc->IndentSize() * vstyle.spaceWidth; + } else if (wrapIndentMode == SC_WRAPINDENT_SAME) { + wrapAddIndent = 0; + } else { //SC_WRAPINDENT_FIXED + wrapAddIndent = wrapVisualStartIndent * vstyle.aveCharWidth; + if ((wrapVisualFlags & SC_WRAPVISUALFLAG_START) && (wrapAddIndent <= 0)) + wrapAddIndent = vstyle.aveCharWidth; // must indent to show start visual + } + ll->widthLine = width; if (width == LineLayout::wrapWidthInfinite) { ll->lines = 1; |