mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-09-29 01:34:13 +03:00
IME fixes that should fix SpartanJ/ecode#355.
Fix a crash when loading empty file from disk.
This commit is contained in:
@@ -755,7 +755,10 @@ void AppConfig::loadProject( std::string projectFolder, UICodeEditorSplitter* ed
|
||||
|
||||
editorSplitter->loadAsyncFileFromPathInNewTab(
|
||||
snapshotFile.cachePath,
|
||||
[snapshotFile]( UICodeEditor* editor, const std::string& ) {
|
||||
[snapshotFile, editorSplitter]( UICodeEditor* editor, const std::string& ) {
|
||||
// Editor could have been closed right after load
|
||||
if ( !editorSplitter->editorExists( editor ) )
|
||||
return;
|
||||
TextDocument& doc = editor->getDocument();
|
||||
auto selection = TextRange::fromString( snapshotFile.selection );
|
||||
doc.setDefaultFileName( snapshotFile.name );
|
||||
|
||||
Reference in New Issue
Block a user