Step 241: text-first defaults and trim headers

This commit is contained in:
Bill
2026-02-10 11:22:44 -07:00
parent f074f51e7f
commit 686de5a4ef
27 changed files with 3821 additions and 3274 deletions

View File

@@ -10,14 +10,14 @@ static void renderMenuBar(EditorState& state) {
if (ImGui::MenuItem("New", state.keys.getBinding("file.new").toString().c_str()))
{
std::string lang = state.active() ? state.active()->language : "python";
state.createBuffer(state.makeUntitledName(), "", lang);
state.createBuffer(state.makeUntitledName(), "", lang, state.defaultBufferMode());
}
if (ImGui::MenuItem("Open...", state.keys.getBinding("file.open").toString().c_str()))
{
auto path = FileDialog::openFile({"Open File", {"*.py","*.cpp","*.h","*.el","*.js","*.ts","*.java","*.rs","*.go","*.org"}, state.lastDialogPath});
if (!path.empty()) {
state.lastDialogPath = path;
state.doOpen(path);
state.doOpen(path, state.defaultBufferMode());
}
}
if (ImGui::MenuItem("Open Project...")) {