New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Autocomplete for php code works incorrectly in some cases #8
Comments
Your pull request #9 doesn't seem to fix the problem. Did that do anything in your case? The API call to extract_completions() returns no matches if the first character of the prefix string is a $. I also tested with a colon and it is the same problem. I tried to re.escape() the prefix but that didn't help. I suspect that Sublime doesn't respect word_separators when tokenizing the content to match it against prefix in extract_completions(). Hence there's never a match. I'm only speculating but we can't check since we don't have access to the source. There's probably nothing we can do, except for reporting the problem. |
Did you remove character |
Yes, I removed $. The behavior I see is that when I start typing $te there is no completion. I.e., the autocomplete dialog disappears because the are no matches. Is this the "disappearing issue" or do you experience something different? I'd like to understand and be able to reproduce the problem before adding an extra case. |
OK, let's try another example:
don't save
In my case complete text including |
I still can't reproduce. Removed $ from word_separators, then did what you said above. When I start typing $to I don't get an autocompleter dialog. Does anyone else have this problem? |
To reproduce you must change settings parameter
word_separators
and remove character$
there, like this (inPreferences.sublime-settings
):After that create new file with the following content:
and try to auto-complete word
$test
there, you should fail, word just disappears.It looks like somethere inside sublimetext character
$
treated as something special (incorrect regexp generation maybe) so if returned value fromon_query_completions
starts with$
it will break the completion.The text was updated successfully, but these errors were encountered: