Fix completion when user already typed part of suggestion
strpart function takes "length" as a third parameter. Previous implmentation was using index.
@klew do you happen to have an example completion where this was being buggy for me to test?
@pqn I had some troubles in understandnig when this part of code should execute. For sure current code is not correct, because this method expects length as third parameter and, based on context, you wanted to get part of string between two indexes (between two columns).
One simple example where current code (with "cursor_col - 1") gives wrong behavior (set ft=cpp) :
int main(#)
"#" is a cursor. It is important to provide empty line above, because otherwise there are no suggestions. With "cursor_col - 1" it gets ~10 suggestions, but it failes to compare str part and ClearCompletion is called, so nothing is displayed (for majority of suggestions). After change to "cursor_col - col" it works better and display all suggestions with following closing bracket included.

Ah I see the problem. I'll try to push a fix for this soon.
I think #44 has likely resolved your issues, feel free to check.
It fixed that problem I shown in previous comment, however now it seems to interfere too much when I type or use backspace.
During typing, it enters chars at the end of line, then redraw it correctly. During using backspace, it puts remaining part of suggestion to the next line and everything below just "jumps".
Here is short video showing this behavior:
https://user-images.githubusercontent.com/205610/215292979-58f7f4f3-d4ab-4fcf-a919-d2bd1a039533.mp4