From fec8ea42729278e66f1b212bce38f5a7848275d0 Mon Sep 17 00:00:00 2001 From: vegar Date: Tue, 17 Mar 2015 20:09:37 +0100 Subject: [PATCH] Documentation: workspace.open( ) with no URI I just learned that [calling open on workspace](https://discuss.atom.io/t/how-can-we-help-you-write-packages/4268/67) without specifying an uri is the way to go for getting a new tab with a new document. I can't find anything about this in either the docs or the [api documentation.](https://atom.io/docs/api/v0.187.0/Workspace#instance-open) Should `uri` be marked optional, like the `options` params? And should it be added a line stating that no uri opens a blank editor? (and there's an extra `a` in the title..) --- src/workspace.coffee | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/workspace.coffee b/src/workspace.coffee index 49f84f9b8..c8040f920 100644 --- a/src/workspace.coffee +++ b/src/workspace.coffee @@ -371,9 +371,11 @@ class Workspace extends Model Section: Opening ### - # Essential: Open a given a URI in Atom asynchronously. - # - # * `uri` A {String} containing a URI. + # Essential: Open a given URI in Atom asynchronously. + # If no URI is given, or URI does not resolve to an existing file, + # a new empty text edtior is created. + # + # * `uri` (optional) A {String} containing a URI. # * `options` (optional) {Object} # * `initialLine` A {Number} indicating which row to move the cursor to # initially. Defaults to `0`.