3rdparty/NRefactory/ICSharpCode.NRefactory.CSharp/IndentEngine/IndentState.cs
/// <summary>
///     Common logic behind the push method.
///     Each state can override this method and implement its own logic.
/// </summary>
/// <param name="ch">
///     The current character that's being pushed.
/// </param>
Common logic behind the push method.
Each state can override this method and implement its own logic.
Common logic behind the push method . Each state can override this method and implement its own logic .
public virtual void Push(char ch)
		{
			if (ch == Engine.newLineChar)
			{
				var delta = Engine.textEditorOptions.ContinuationIndent;
				while (NextLineIndent.CurIndent - ThisLineIndent.CurIndent > delta &&
					   NextLineIndent.PopIf(IndentType.Continuation)) ;
				ThisLineIndent = NextLineIndent.Clone();
			}
		}
public virtual void Push ( char ch ) { if ( ch == Engine . newLineChar ) { var delta = Engine . textEditorOptions . ContinuationIndent ; while ( NextLineIndent . CurIndent - ThisLineIndent . CurIndent > delta && NextLineIndent . PopIf ( IndentType . Continuation ) ) ; ThisLineIndent = NextLineIndent . Clone ( ) ; } }
Common logic behind the push method.
Common logic behind the push method .
// replace ThisLineIndent with NextLineIndent if the newLineChar is pushed
ch
char
The current character that's being pushed.
The current character that ' s being pushed .