Update text_editor.cpp

This commit is contained in:
wheremyfoodat
2024-01-28 00:32:20 +02:00
committed by GitHub
parent 407411cc0b
commit c6d0769a95

View File

@@ -16,8 +16,8 @@ TextEditorWindow::TextEditorWindow(QWidget* parent, const std::string& filename,
ZepReplExCommand::Register(zepWidget.GetEditor(), &replProvider);
// Default to standard mode instead of vim mode, initialize text box
zepWidget.GetEditor().SetGlobalMode(Zep::ZepMode_Standard::StaticName());
zepWidget.GetEditor().InitWithText(filename, initialText);
zepWidget.GetEditor().SetGlobalMode(Zep::ZepMode_Standard::StaticName());
// Layout for widgets
QVBoxLayout* mainLayout = new QVBoxLayout();
@@ -41,4 +41,4 @@ TextEditorWindow::TextEditorWindow(QWidget* parent, const std::string& filename,
mainLayout->addWidget(button);
mainLayout->addWidget(&zepWidget);
}
}