For textDocument/hover, do not error on empty results

This commit is contained in:
Fangrui Song 2017-12-18 23:10:42 -08:00 committed by Jacob Dufault
parent cf4603c6fa
commit 18f602c6e8

View File

@ -82,16 +82,8 @@ struct TextDocumentHoverHandler : BaseMessageHandler<Ipc_TextDocumentHover> {
break; break;
} }
if (out.result.contents.value.empty()) {
Out_Error out;
out.id = request->id;
out.error.code = lsErrorCodes::InternalError;
IpcManager::WriteStdout(IpcId::Unknown, out);
return;
}
IpcManager::WriteStdout(IpcId::TextDocumentHover, out); IpcManager::WriteStdout(IpcId::TextDocumentHover, out);
} }
}; };
REGISTER_MESSAGE_HANDLER(TextDocumentHoverHandler); REGISTER_MESSAGE_HANDLER(TextDocumentHoverHandler);
} // namespace } // namespace