code icon indicating copy to clipboard operation
code copied to clipboard

Autosave of unsaved buffers not reliable

Open davidak opened this issue 3 years ago • 3 comments

What Happened?

https://youtu.be/LrOn42Y4aIE

This works with other editors like Atom and Sublime Text. It is an essential feature for me!

Steps to Reproduce

  1. Open Code
  2. New File
  3. Type "something"
  4. Close Code
  5. Open Code

Expected Behavior

The typed text should be saved.

OS Version

Other Linux

Software Version

Latest release (I have run all updates)

Log Output

No response

Hardware Info

No response

davidak avatar Apr 01 '22 19:04 davidak

Just a guess that autosave triggers after a short delay of no typing so if app closed soon after typing something that last typed content doesn't get saved. Fix would likely be to trigger any unsaved content explicitly on close document if the option is enabled?

vjr avatar Apr 02 '22 01:04 vjr

I am able to repro this issue - autosave works if you close just the tab - does not work if you either quickly click the X close button after typing fresh text or press the CTRL+Q quit shortcut.

Looking into a fix.

vjr avatar Apr 02 '22 11:04 vjr

@davidak If you are able to test out https://github.com/elementary/code/pull/1188 that would be helpful :smile:

jeremypw avatar Aug 07 '22 11:08 jeremypw