Sublime Forum

Is there a way to tell if the Autocomplete window is open?

#1

I’m working on a plugin and I was wondering if there is a way to tell when the autocomplete window is open?

0 Likes

#2

Depends on whether you need this programmatically or in a keymap.

[code]
{ “keys”: “escape”], “command”: “hide_auto_complete”, “context”:

		{ "key": "auto_complete_visible", "operator": "equal", "operand": true }
	]
},[/code]
0 Likes

#3

Programmatically if possible. Is your code there for if I needed it in a keymap?

0 Likes

#4

Yes, the code is a keymap binding with a context restriction. I do not know of a way to detect if the auto-complete window is open programmatically (in a plugin).

0 Likes

#5

Actually your code is exactly what I need, thanks for the tip! :smiley:

0 Likes