Skip to content

Commit

Permalink
fix regression, match unicode characters
Browse files Browse the repository at this point in the history
  • Loading branch information
predragnikolic committed Sep 28, 2022
1 parent 0539dd7 commit c5e76d6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions plugin/core/signature_help.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,10 @@ def _render_label(self, view: sublime.View, signature: SignatureInformation) ->
# route relies on the client being smart enough to figure where the parameter is inside of
# the signature label. The above case where the label is a tuple of (start, end) positions is much
# more robust.
label_match = re.search(r"\b{}\b".format(rawlabel), label[prev:])
start = label_match.start() if label_match else -1
label_match = re.search(r"\W{}\W".format(rawlabel), label[prev:])
start = -1
if label_match:
start = label_match.start() + 1 # skip the first matched \W by adding + 1
if start == -1:
debug("no match found for {}".format(rawlabel))
continue
Expand Down

0 comments on commit c5e76d6

Please sign in to comment.