Skip to content

Commit

Permalink
Merge pull request #30 from rwols/fixnone
Browse files Browse the repository at this point in the history
Account for syntax being none in some cases
  • Loading branch information
zyxar committed Aug 6, 2017
2 parents ae888b4 + df031f5 commit ff9a800
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion AutoComplete.py
Expand Up @@ -6,7 +6,12 @@ class AutoComplete(sublime_plugin.ViewEventListener):

@classmethod
def is_applicable(cls, settings):
return settings.get("syntax", "").endswith("CMake.sublime-syntax")
if not settings:
return False
syntax = settings.get("syntax", None)
if not syntax:
return False
return syntax.endswith("CMake.sublime-syntax")

def on_query_completions(self, prefix, locations):
for point in locations:
Expand Down

0 comments on commit ff9a800

Please sign in to comment.