Skip to content

Auto-save is feature fired on every focus lost, even internal one, like opening "Save as..." dialog #574

@mrfatguy

Description

@mrfatguy

There's a bug in auto-save feature -- the one, that saves any changes to file when ST3 looses focus.

Currently, by "looses focus" ST3 understands "any focus lost to main window". While it should react only on "navigation to another application" (that is onAppDeactivate event). Why? Because it will auto-save changes to file even when user press F12 to save current file under new name. ST will decect opening "Save as..." dialog as focus lost and save current file. Which isn't expected behaviour in most situatons.

Steps to reproduce:

  1. Create a "File A" with any random content.
  2. Save it.
  3. Change anything in file's content.
  4. Press F12 and save file under "File B" name.
  5. Check contents of both files -- BOTH files have new / changed content, while only second should.

Current implementation of that feature causes, that you can't work with any kind of templates in ST3. For example: I have a file named migration_template.txt, which I want to open, change anything and save under new_migration_name_or_something.dbm. But, I wan't migration_template.txt to remain untouched. Currently, I can't. Any press to F12 to save migration_template.txt under new name causes both files to be written with a new content.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions