Skip to content

Commit

Permalink
improves #2
Browse files Browse the repository at this point in the history
  • Loading branch information
isamert committed Apr 14, 2016
1 parent 2f6a4f1 commit cbff954
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions gracer.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ def init_racer(self, document, subcommand):
print(e)

temp_file.close()
print(output, "wqeqweqwewq")
return output

def get_matches(self, document):
Expand Down Expand Up @@ -234,12 +235,19 @@ def do_get_name(self):
return _("Gracer Rust Code Completion")

def do_match(self, context):
# checked this before at GracerPlugin.do_active
print(context)
_, iter = context.get_iter()
iter.backward_char()
ch = iter.get_char()
if not (ch in (':', '.', '&') or ch.isalnum()):
return False

return True

def do_get_priority(self):
return 0
return 1

def do_get_activation(self):
return GtkSource.CompletionActivation.INTERACTIVE

def do_populate(self, context):
_, it = context.get_iter()
Expand Down

0 comments on commit cbff954

Please sign in to comment.