internal void DoAutoComplete() { var input_box = InputBox; var info = _GetAutocompleteInfo(_Parser.Parse(CurrentCommandText, lenient: true)); input_box.MoveCursor(info.LastCharIndex, info.FirstCharIndex - 1); // CursorIndex is 0-indexed }
public string Execute(int index) { if (index < 0 || index >= Entries.Count) { throw new Exception("Tried to execute command from history at nonexistant index."); } return(_Executor.ExecuteCommand(_Parser.Parse(Entries[index]), index)); }