Skip to content

Commit 2263349

Browse files
committed
Misc: Allow showing command completions in widgets
Should the console input widget support completions in the future, we will be supporting it already.
1 parent b9f1fca commit 2263349

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

plugins_/command_completions/__init__.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,13 @@ def _escape_in_snippet(v):
3131

3232

3333
def is_plugin(view):
34-
"""Use some heuristics to determine whether a Python view shows a plugin."""
34+
"""Use some heuristics to determine whether a Python view shows a plugin.
35+
36+
Or the console input widget, should it be using the Python syntax.
37+
"""
3538
return (view.find("import sublime", 0, sublime.LITERAL) is not None
36-
or sublime.packages_path() in (view.file_name() or ""))
39+
or sublime.packages_path() in (view.file_name() or "")
40+
or view.settings().get('is_widget'))
3741

3842

3943
def create_args_snippet_from_command_args(command_args, quote_char='"', for_json=True):

0 commit comments

Comments
 (0)