diff --git a/src/lsp-client/LSPEditorWrapper.cpp b/src/lsp-client/LSPEditorWrapper.cpp index 62308a00..3c3333c7 100644 --- a/src/lsp-client/LSPEditorWrapper.cpp +++ b/src/lsp-client/LSPEditorWrapper.cpp @@ -481,13 +481,18 @@ LSPEditorWrapper::_ShowToolTip(const char* text) void LSPEditorWrapper::_DoHover(nlohmann::json& result) { - if (result == nlohmann::detail::value_t::null) { + if (result == nlohmann::detail::value_t::null && + !result["contents"].contains("value")) { EndHover(); return; } std::string tip = result["contents"]["value"].get(); + if (tip.empty()) { + EndHover(); + return; + } _ShowToolTip(tip.c_str()); }