| 417 | } |
| 418 | |
| 419 | ZepBuffer* ZepEditor::InitWithText(const std::string& strName, const std::string& strText) { |
| 420 | auto pTab = EnsureTab(); |
| 421 | |
| 422 | auto pBuffer = GetEmptyBuffer(strName); |
| 423 | pBuffer->SetText(strText); |
| 424 | |
| 425 | pTab->AddWindow(pBuffer, nullptr, RegionLayoutType::HBox); |
| 426 | |
| 427 | return pBuffer; |
| 428 | } |
| 429 | |
| 430 | // Here we ensure that the editor is in a valid state, and cleanup Default buffers |
| 431 | void ZepEditor::UpdateWindowState() { |