ecode macOS fixes (WIP)

This commit is contained in:
Martín Lucas Golini
2023-07-18 02:32:07 -04:00
parent 6b7f6f85ac
commit 9e1549647b
4 changed files with 9 additions and 5 deletions

View File

@@ -170,7 +170,9 @@ void App::setAppTitle( const std::string& title ) {
if ( mBenchmarkMode )
fullTitle += " - " + String::toString( mWindow->getFPS() ) + " FPS";
mWindow->setTitle( fullTitle );
mUISceneNode->runOnMainThread( [this, fullTitle] {
mWindow->setTitle( fullTitle );
} );
}
void App::onDocumentModified( UICodeEditor* editor, TextDocument& ) {

View File

@@ -271,7 +271,8 @@ PluginRequestHandle LSPClientPlugin::processWorkspaceSymbol( const PluginMessage
if ( servers.empty() )
return {};
std::string query = msg.asJSON().value( "query", "" );
json jmsg = msg.asJSON();
std::string query = jmsg.value( "query", "" );
for ( const auto server : servers ) {
server->workspaceSymbol(
query, [&, query]( const PluginIDType& id, LSPSymbolInformationList&& info ) {

View File

@@ -412,7 +412,7 @@ void UniversalLocator::updateLocateBarSync() {
mLocateTable->setPixelsSize( width,
mLocateTable->getRowHeight() * LOCATEBAR_MAX_VISIBLE_ITEMS );
width -= mLocateTable->getVerticalScrollBar()->getPixelsSize().getWidth();
if ( mLocateTable->getModel()->columnCount() >= 2 ) {
if ( mLocateTable->getModel() && mLocateTable->getModel()->columnCount() >= 2 ) {
mLocateTable->setColumnsVisible( { 0, 1 } );
mLocateTable->setColumnWidth( 0, eeceil( width * 0.5 ) );
mLocateTable->setColumnWidth( 1, width - mLocateTable->getColumnWidth( 0 ) );
@@ -719,7 +719,8 @@ void UniversalLocator::requestWorkspaceSymbol() {
}
mLocateTable->setModel( mWorkspaceSymbolModel );
json j = json{ json{ "query", mWorkspaceSymbolQuery } };
json j;
j["query"] = mWorkspaceSymbolQuery;
mApp->getPluginManager()->sendRequest( PluginMessageType::WorkspaceSymbol,
PluginMessageFormat::JSON, &j );
} else if ( mWorkspaceSymbolModel && mWorkspaceSymbolModel.get() != mLocateTable->getModel() ) {