Skip to content

Ctrl+Q closes second windows with loss of unsaved changesΒ #721

@mcclurgm

Description

@mcclurgm

Describe the bug

The key shortcut Ctrl+Q, which I use to quit all windows of an app, only closes the frontmost window in Code. If used with multiple windows with unsaved documents, this behavior loses those documents without warning.

Since Ctrl+Q is used to quit (with state restored when you reopen), it doesn't warn about the unsaved document. However, since it only works on one window at a time, this window's content is the only one that's saved. When I close a second window, the same behavior repeats but any unsaved content is not cached for restore.

To Reproduce

Steps to reproduce the behavior:

  1. Open two new documents in separate windows and type in them to create unsaved changes
  2. Quit one window using Ctrl+Q
  3. Quit the other window using Ctrl+Q
  4. Open Code, only the first window to close will be restored

Expected behavior

All unsaved content will either be cached for restore or disappear with a warning to the user.

Screenshots or screen recordings

State before quitting the app:
Screenshot from 2019-10-27 12-37-24

I quit the left window first, then the right. Then I open Code:
Screenshot from 2019-10-27 12-37-32

Note how some application state (open documents) is restored from the first window, while other (window size and position) is restored from the second window.

Platform Information

image

  • I'm using the latest version from git that I've manually compiled
  • I'm using the latest released stable version

Metadata

Metadata

Assignees

No one assigned

    Labels

    Priority: MediumShould be addressed when time allowsStatus: ConfirmedVerified by someone other than the reporter

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions