diff --git a/app/js/boot.js b/app/js/boot.js index 7232e3a1..70ba1f51 100644 --- a/app/js/boot.js +++ b/app/js/boot.js @@ -141,6 +141,8 @@ require(["../dep/architect", "./lib/options", "./fs_picker", "text!../manual/int setupBuiltinDoc("zed::start", introText); setupBuiltinDoc("zed::log", "Zed Log\n===========\n"); + + setupScratchBuffer(); } else { app.getService("eventbus").on("urlchanged", function() { @@ -172,6 +174,16 @@ require(["../dep/architect", "./lib/options", "./fs_picker", "text!../manual/int session_manager.specialDocs[path] = session; } + + function setupScratchBuffer() { + var path = "zed::notes"; + var editor = app.getService("editor"); + var session_manager = app.getService("session_manager"); + + var session = editor.createSession(path, ""); + + session_manager.specialDocs[path] = session; + } }); app.on("service", function(name) {