Commit 718d59f1 authored by Waqar Ahmed's avatar Waqar Ahmed
Browse files

Make sure we can highlight more than 2 parameters

parent 0f6aef94
......@@ -612,7 +612,10 @@ static LSPSignatureHelp parseSignatureHelp(const QJsonValue &result)
ret.activeSignature = sig.value(QStringLiteral("activeSignature")).toInt(0);
ret.activeParameter = sig.value(QStringLiteral("activeParameter")).toInt(0);
ret.activeSignature = qMin(qMax(ret.activeSignature, 0), ret.signatures.size());
ret.activeParameter = qMin(qMax(ret.activeParameter, 0), ret.signatures.size());
ret.activeParameter = qMax(ret.activeParameter, 0);
if (!ret.signatures.isEmpty()) {
ret.activeParameter = qMin(ret.activeParameter, ret.signatures.at(ret.activeSignature).parameters.size());
}
return ret;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment