void ICompletionWidget.SetCompletionText(CodeCompletionContext ctx, string partial_word, string complete_word) { int sp = editEntry.Position - partial_word.Length; editEntry.DeleteText(sp, sp + partial_word.Length); editEntry.InsertText(complete_word, ref sp); editEntry.Position = sp; // sp is incremented by InsertText }