Don't instantiate a tooltip until it's really required by the widget (setting the tooltip text won't instantiate the tooltip).
ecode:
Closes SpartanJ/ecode#64 (Fix LSP rootPath initialization).
This commit is contained in:
Martín Lucas Golini
2023-02-24 21:30:13 -03:00
parent bf367b0dcb
commit cbce68e209
7 changed files with 41 additions and 27 deletions

View File

@@ -942,7 +942,9 @@ void LSPClientServer::initialize() {
{ "capabilities", capabilities },
{ "initializationOptions", mLSP.initializationOptions } };
URI rootPath( String::startsWith( mRootPath, "file://" ) ? mRootPath : "file://" + mRootPath );
URI rootPath( String::startsWith( mRootPath, "file://" ) && mRootPath != "file://"
? mRootPath
: ( !mRootPath.empty() ? "file://" + mRootPath : "" ) );
if ( rootPath.empty() ) {
if ( !mManager->getLSPWorkspaceFolder().uri.empty() ) {
rootPath = mManager->getLSPWorkspaceFolder().uri;