Closed sigsergv closed 11 years ago
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 $
from separators list (word_separators
config option)? It's important.The code from pull request #9 has solved “disappearing” issue for me.
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:
<?php
$token = 444;
don't save
$to
on line below $token = 444;
and press completion keyIn my case complete text including $to
just disappears as it's just deleted.
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.