Home Download Buy Blog Forum Support

ST3 Bug: on_query_completions not working properly with XML

ST3 Bug: on_query_completions not working properly with XML

Postby alvms on Wed Jun 19, 2013 12:37 pm

on_query_completions fails when used with XML files and when the cursor is placed right in between an opening and closing tags with no spaces in between like:

Code: Select all
<contact>(CURSOR HERE)</contact>


If there are spaces or new lines in between the opening and closing tags, the completion works properly. For example here:
Code: Select all
<contact>
(CURSOR_HERE)
</contact>


or here:
Code: Select all
<contact>   (CURSOR_HERE)</contact>


Steps to reproduce are:
1.- create simple plugin:
Code: Select all
import sublime
import sublime_plugin
class RuleCompletions(sublime_plugin.EventListener):
    def on_query_completions(self, view, prefix, locations):
        print(1)
        return [('1.0\tValue', '1.0'), ('2.0\tValue', '2.0'), ('3.0\tValue', '3.0'), ('4.0\tValue', '4.0'), ('5.0\tValue', '5.0')]

2.- Create simple XML file with XML syntax and press control space in between XML tags

Any idea why or how to fix it?

Thanks,
A
alvms
 
Posts: 26
Joined: Sun May 26, 2013 9:15 pm

Re: ST3 Bug: on_query_completions not working properly with XML

Postby alvms on Thu Jul 11, 2013 12:11 pm

Any idea how to open a bug for this?

Thanks,
A
alvms
 
Posts: 26
Joined: Sun May 26, 2013 9:15 pm


Return to Technical Support

Who is online

Users browsing this forum: Yahoo [Bot] and 30 guests