Sublime Forum

ST3 Bug: on_query_completions not working properly with XML

#1

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:

<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:

<contact> (CURSOR_HERE) </contact>

or here:

<contact>	(CURSOR_HERE)</contact>

Steps to reproduce are:
1.- create simple plugin:

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

0 Likes

#2

Any idea how to open a bug for this?

Thanks,
A

0 Likes