Skip to content
This repository was archived by the owner on Mar 3, 2023. It is now read-only.

Fix for #10474 - #12922

Merged
iolsen merged 3 commits into
atom:masterfrom
stereobooster:10474-prompt-to-save-unsaved-buffer
Oct 26, 2016
Merged

iolsen merged 3 commits into
atom:masterfrom
stereobooster:10474-prompt-to-save-unsaved-buffer

Conversation

@stereobooster

@stereobooster stereobooster commented Oct 9, 2016 •

Copy link
Copy Markdown
Contributor

If Atom opened with folder e.g. atom ./ it will save all buffers to workspace tied to this folder.
But if atom opened without folder e.g. atom it will prompt if you wan to save all unsaved buffers.

Testcase

  1. Open Atom (without params)
  2. Type some text in untitled buffer
  3. Quit Atom (Cmd + Q)

Expected behaviour:

  1. Shows Prompt whether you want to save or not
  2. Depending on user choice close Atom or not

Current behaviour

  1. Close Atom. All text in unsaved buffer is lost

Comment thread src/text-editor.coffee Outdated
shouldPromptToSave: ({windowCloseRequested}={}) ->
if windowCloseRequested
shouldPromptToSave: ({windowCloseRequested, projectHasPaths}={}) ->
if windowCloseRequested && projectHasPaths

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change && to and.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@stereobooster

Copy link
Copy Markdown
Contributor Author

@thomasjo anything else? Squish commits or something?

@thomasjo

Copy link
Copy Markdown
Contributor

This seems OK to me, but I'll let someone else have a look as well. /cc @atom/feedback

@iolsen iolsen self-assigned this Oct 13, 2016
@iolsen

iolsen commented Oct 26, 2016

Copy link
Copy Markdown
Contributor

💯 Awesome! Thanks for this contribution!

Merging now and this will be in the 1.13 beta.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants