Skip to content

Commit

Permalink
Removed scope check from triggered fill all command
Browse files Browse the repository at this point in the history
  • Loading branch information
r-stein committed Sep 14, 2016
1 parent cce57a8 commit d4308a0
Showing 1 changed file with 3 additions and 13 deletions.
16 changes: 3 additions & 13 deletions latex_fill_all.py
Original file line number Diff line number Diff line change
Expand Up @@ -652,9 +652,7 @@ def on_query_context(self, view, key, operator, operand, match_all):
# quick exit conditions
for sel in view.sel():
point = sel.b
if (
view.score_selector(point, "text.tex.latex") == 0
):
if not view.score_selector(point, "text.tex.latex"):
return None

# load the plugins
Expand Down Expand Up @@ -709,9 +707,7 @@ def on_query_context(self, view, key, operator, operand, match_all):

def on_query_completions(self, view, prefix, locations):
for location in locations:
if (
view.score_selector(location, "text.tex.latex") == 0
):
if not view.score_selector(location, "text.tex.latex"):
return

completion_types = self.get_completion_types()
Expand Down Expand Up @@ -882,9 +878,7 @@ def run(

for sel in view.sel():
point = sel.b
if (
view.score_selector(point, "text.tex.latex") == 0
):
if not view.score_selector(point, "text.tex.latex"):
self.complete_brackets(view, edit, insert_char)
return

Expand Down Expand Up @@ -1019,10 +1013,6 @@ def run(
self.complete_brackets(view, edit, insert_char)
return

selector = completion_type.get_supported_scope_selector()
if not self.score_selector(view, selector):
return

# we are not adding a bracket or comma, we do not have a fancy prefix
# and the overwrite and force options were not set, so calculate the
# prefix as the previous word
Expand Down

0 comments on commit d4308a0

Please sign in to comment.