mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-08-12 01:20:13 +03:00
Basic debugging working.
This commit is contained in:
@@ -590,7 +590,7 @@ void UniversalLocator::initLocateBar( UILocateBar* locateBar, UITextInput* locat
|
||||
range = { pathAndPos.second, pathAndPos.second };
|
||||
}
|
||||
|
||||
focusOrLoadFile( path, range );
|
||||
mApp->focusOrLoadFile( path, range );
|
||||
mLocateBarLayout->execute( "close-locatebar" );
|
||||
}
|
||||
} );
|
||||
@@ -761,27 +761,6 @@ std::shared_ptr<FileListModel> UniversalLocator::openDocumentsModel( const std::
|
||||
return std::make_shared<FileListModel>( std::move( ffiles ), std::move( fnames ) );
|
||||
}
|
||||
|
||||
void UniversalLocator::focusOrLoadFile( const std::string& path, const TextRange& range ) {
|
||||
UITab* tab = mSplitter->isDocumentOpen( path, true );
|
||||
if ( !tab ) {
|
||||
FileInfo fileInfo( path );
|
||||
if ( fileInfo.exists() && fileInfo.isRegularFile() )
|
||||
mApp->loadFileFromPath(
|
||||
path, true, nullptr, [this, range]( UICodeEditor* editor, auto ) {
|
||||
if ( range.isValid() ) {
|
||||
editor->goToLine( range.start() );
|
||||
mSplitter->addEditorPositionToNavigationHistory( editor );
|
||||
}
|
||||
} );
|
||||
} else {
|
||||
tab->getTabWidget()->setTabSelected( tab );
|
||||
if ( range.isValid() ) {
|
||||
UICodeEditor* editor = tab->getOwnedWidget()->asType<UICodeEditor>();
|
||||
editor->goToLine( range.start() );
|
||||
mSplitter->addEditorPositionToNavigationHistory( editor );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void UniversalLocator::updateOpenDocumentsTable() {
|
||||
mLocateTable->setModel(
|
||||
|
||||
Reference in New Issue
Block a user