Commit e2d1f1b7 authored by Waqar Ahmed's avatar Waqar Ahmed
Browse files

Fix lsp completion not triggered on user invocation

For user invocation it should always be triggered.

(cherry picked from commit a96d0337)
parent 82ae08c6
Pipeline #266093 passed with stage
in 9 minutes and 11 seconds
......@@ -325,7 +325,8 @@ public:
qCInfo(LSPCLIENT) << "completion invoked" << m_server;
if (it == UserInvocation && range.isEmpty() && m_signatureHelp) {
const bool userInocation = it == UserInvocation;
if (userInocation && range.isEmpty() && m_signatureHelp) {
// If this is a user invocation (ctrl-space), check the last non-space char for sig help trigger
QChar c;
int i = range.start().column() - 1;
......@@ -396,7 +397,7 @@ public:
auto cursor = qMax(range.start(), qMin(range.end(), position));
m_manager->update(document, false);
if (m_triggerCompletion) {
if (m_triggerCompletion || userInocation) {
m_handle = m_server->documentCompletion(document->url(), {cursor.line(), cursor.column()}, this, handler);
}
......
Supports Markdown
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