diff options
author | nyamatongwe <unknown> | 2012-04-03 23:11:58 +1000 |
---|---|---|
committer | nyamatongwe <unknown> | 2012-04-03 23:11:58 +1000 |
commit | 5ee33cf1f506870d74b9eea40bdc72535e414fdb (patch) | |
tree | 148258ad9c0739b97430700d5327e70030e4fd0e /src/Editor.cxx | |
parent | 0b945bc19acc4a3c7ae5342ea4f2cd14f45f539f (diff) | |
download | scintilla-mirror-5ee33cf1f506870d74b9eea40bdc72535e414fdb.tar.gz |
Moved wrap indent code to wrapping branch.
Diffstat (limited to 'src/Editor.cxx')
-rw-r--r-- | src/Editor.cxx | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx index b287384d4..7adff4037 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -2308,17 +2308,6 @@ 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; @@ -2329,6 +2318,12 @@ void Editor::LayoutLine(int line, Surface *surface, ViewStyle &vstyle, LineLayou if (wrapVisualFlags & SC_WRAPVISUALFLAG_END) { width -= static_cast<int>(vstyle.aveCharWidth); // take into account the space for end wrap mark } + 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_FIXED) { + wrapAddIndent = wrapVisualStartIndent * vstyle.aveCharWidth; + } ll->wrapIndent = wrapAddIndent; if (wrapIndentMode != SC_WRAPINDENT_FIXED) for (int i = 0; i < ll->numCharsInLine; i++) { |