public bool AcceptActiveSnippets()
{
if (this._snippetLinks.IsActive && !Scintilla.AutoComplete.IsActive)
{
int pos = Scintilla.Caret.Position;
bool end = false;
foreach (SnippetLink sl in this._snippetLinks.Values)
{
foreach (SnippetLinkRange sr in sl.Ranges)
{
if (sr.PositionInRange(pos))
{
end = true;
break;
}
}
if (end)
break;
}
if (end)
{
this.cascadeSnippetLinkRangeChange(this._snippetLinks.ActiveSnippetLink, this._snippetLinks.ActiveRange);
if (this._snippetLinks.EndPoint != null)
Scintilla.Caret.Goto(this._snippetLinks.EndPoint.Start);
this.IsActive = false;
Scintilla.Commands.StopProcessingCommands = true;
return true;
}
}
return false;
}