ARCed.Scintilla.DropMarkers.Collect C# (CSharp) Method

Collect() public method

Collects the last dropped DropMarker
When a DropMarker is collected the current document posision is moved to the DropMarker posision, the DropMarker is removed from the stack and the visual indicator is removed.
public Collect ( ) : void
return void
        public void Collect()
        {
            while (this._markerStack.Count > 0)
            {
                DropMarker dm = this._markerStack.Pop();

                //	If the Drop Marker was deleted in the document by
                //	a user action it will be disposed but not removed
                //	from the marker stack. In this case just pretend
                //	like it doesn't exist and go on to the next one
                if (dm.IsDisposed)
                    continue;

                //	The MarkerCollection fires a cancellable event.
                //	If it is canclled the Collect() method will return
                //	false. In this case we need to push the marker back
                //	on the stack so that it will still be collected in
                //	the future.
                if (!dm.Collect())
                    this._markerStack.Push(dm);

                return;
            }
        }