I'm writing a custom language plugin where you can invoke autocompletion. But when I choose an item from the pop up, it doesn't insert where my caret is but goes to start of the line and inserts it from there. To give you guys a better idea, I have attached two screen shots.
I invoke the popup after the token * but when I choose the item it removes it and places it on the start of the line. Should I do something to handle proper insertion of the auto completed item. Since it is inserted without a * , it changes the token type also.