Skip to content

Commit

Permalink
small fixes
Browse files Browse the repository at this point in the history
- prevent custom tag completions from throwing an error when tag name is
missing
- minihtml.py should use 'view.line()' api method
  • Loading branch information
jcberquist committed Apr 26, 2016
1 parent c952435 commit 3729db2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
3 changes: 3 additions & 0 deletions src/custom_tags/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ def get_tags(view, prefix, position, info):
return None

def get_tag_attributes(view, prefix, position, info):
if not info["tag_name"]:
return None

if ":" in info["tag_name"] and info["project_name"] in custom_tags.projects:
completion_list = get_tag_attribute_completions(info["project_name"], info["tag_name"])
if completion_list:
Expand Down
5 changes: 1 addition & 4 deletions src/minihtml.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,7 @@ def from_view(view, region = None):
region.b = region.a + 5000
truncated = True

if view.substr(region.begin() - 1) != "\n":
region.a = view.find_by_class(region.begin(), False, sublime.CLASS_LINE_START)
if view.substr(region.end()) != "\n":
region.b = view.find_by_class(region.end(), True, sublime.CLASS_LINE_END)
region = view.line(region)

color_scheme = get_color_scheme()

Expand Down

0 comments on commit 3729db2

Please sign in to comment.