diff --git a/plugin/core/signature_help.py b/plugin/core/signature_help.py index 07f178456..d1bbf38c3 100644 --- a/plugin/core/signature_help.py +++ b/plugin/core/signature_help.py @@ -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