Zettlr allows editing a "no file open" window but doesn't save its content

Created on 31 Jul 2020  Â·  5Comments  Â·  Source: Zettlr/Zettlr

Zettlr allows editing a "no file open" window but doesn't save its content, which vanishes if you open any other file.

Reproducing

1) Close all tabs
2) Click on the editor window (there is a "No open files" alert above but the editor is active
3) Create content
4) Open any other file
5) The "anonymous content" is gone and apparently is unrecoverable.

Expected behaviour

It should either

  • Do not allow editing a "no file" screen
  • Detect the presence of text in the "no file" screen and ask for a file name for it before opening other files


Screenshots

Platform

  • OS and version: Mac OS Catalina
  • Zettlr Version: 1.7.2
  • Screen Resolution: N/A

Additional information

I lost quite a chunk of text because of this bug, since I was assuming that being editable that window was at least in some kind of buffer. I should have saved it before, true, but the bug seems serious anyway.

UX bug [non-critical] confirmed enhancement mid v1.7.x

All 5 comments

Yep, a known behavior, but I haven't had any idea of how to actually improve this behavior!

Are you able to detect some onchange() like event in the editor component?

If so maybe you can either disable the text entry or force the file name dialog used in File/New.

Not sure if it may help, but even trying to save the text buffer does not work as the system does not offer the filename modal, apparently the text is really orphaned.

Yeah, I'm pretty sure I simply forgot to reimplement that functionality … I'll see to it ;)

Fixed in last commit!

Was this page helpful?
0 / 5 - 0 ratings