diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/Editor.cxx | 21 | ||||
| -rw-r--r-- | src/Editor.h | 1 | 
2 files changed, 11 insertions, 11 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; diff --git a/src/Editor.h b/src/Editor.h index 0923f4051..b407789a1 100644 --- a/src/Editor.h +++ b/src/Editor.h @@ -264,7 +264,6 @@ protected:	// ScintillaBase subclass needs access to much of Editor  	int wrapVisualFlags;  	int wrapVisualFlagsLocation;  	int wrapVisualStartIndent; -	XYPOSITION wrapAddIndent; // This will be added to initial indent of line  	int wrapIndentMode; // SC_WRAPINDENT_FIXED, _SAME, _INDENT  	bool convertPastes; | 
