ARCed.Scintilla.DocumentNavigation.NavigateBackward C# (CSharp) Method

NavigateBackward() public method

Causes the current position to navigate to the last snapshotted document position.
public NavigateBackward ( ) : void
return void
        public void NavigateBackward()
        {
            if (this._backwardStack.Count == 0)
                return;

            int currentPos = Scintilla.Caret.Position;
            if (currentPos == this._backwardStack.Current.Start && this._backwardStack.Count == 1)
                return;

            int pos = this._backwardStack.Pop().Start;

            if (pos != currentPos)
            {
                this._forewardStack.Push(this.NewRange(currentPos));
                Scintilla.Caret.Goto(pos);
            }
            else
            {
                this._forewardStack.Push(this.NewRange(pos));
                Scintilla.Caret.Goto(this._backwardStack.Current.Start);
            }

            this._supressNext = true;
        }