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

@@ -222,7 +222,7 @@ int main(int, char**) {
char* droppedFile = event.drop.file;
if (droppedFile) {
DragDropHandler::handleDrop(droppedFile,
[&](const std::string& p) { state.doOpen(p); },
[&](const std::string& p) { state.doOpen(p, state.defaultBufferMode()); },
[&](const std::string& p) {
state.workspaceRoot = p;
state.fileTreeDirty = true;
@@ -310,7 +310,7 @@ int main(int, char**) {
else if (action == "file.save") state.doSave();
else if (action == "file.new") {
std::string lang = state.active() ? state.active()->language : "python";
state.createBuffer(state.makeUntitledName(), "", lang);
state.createBuffer(state.makeUntitledName(), "", lang, state.defaultBufferMode());
}
else if (action == "build.run") state.runActiveFile(false);
else if (action == "build.build") state.runActiveFile(true);