From f16cbfbfa1e2e31e7da0fc9fd8a14b8e19a27522 Mon Sep 17 00:00:00 2001 From: Tony Brix Date: Fri, 26 May 2017 14:12:05 -0500 Subject: [PATCH 1/2] improve confirm documentation --- src/atom-environment.coffee | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/atom-environment.coffee b/src/atom-environment.coffee index e97b14508..860fcaf0e 100644 --- a/src/atom-environment.coffee +++ b/src/atom-environment.coffee @@ -821,6 +821,9 @@ class AtomEnvironment extends Model @emitter.emit 'did-beep' # Essential: A flexible way to open a dialog akin to an alert dialog. + # + # If the dialog is closed (via `Esc` key or `X` in the top corner) without selecting a button + # the first button will be clicked unless a "Cancel" or "No" button is provided. # # ## Examples # @@ -839,7 +842,7 @@ class AtomEnvironment extends Model # * `buttons` (optional) Either an array of strings or an object where keys are # button names and the values are callbacks to invoke when clicked. # - # Returns the chosen button index {Number} if the buttons option was an array. + # Returns the chosen button index {Number} if the buttons option is an array or the return value of the callback if the buttons option is an object. confirm: (params={}) -> @applicationDelegate.confirm(params) From 89d39a24d33b2c45e616d4df8b95527230bbb94b Mon Sep 17 00:00:00 2001 From: Tony Brix Date: Mon, 26 Jun 2017 10:37:08 -0500 Subject: [PATCH 2/2] fix linting --- src/atom-environment.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/atom-environment.coffee b/src/atom-environment.coffee index 860fcaf0e..5fa3b7846 100644 --- a/src/atom-environment.coffee +++ b/src/atom-environment.coffee @@ -821,7 +821,7 @@ class AtomEnvironment extends Model @emitter.emit 'did-beep' # Essential: A flexible way to open a dialog akin to an alert dialog. - # + # # If the dialog is closed (via `Esc` key or `X` in the top corner) without selecting a button # the first button will be clicked unless a "Cancel" or "No" button is provided. #