When canceling during editing, a confirmation prompt currently only appears when the respective tiddler already exists in the store.
When editing a new tiddler or a shadow tiddler, there is no confirmation prompt - which is inconsistent and potentially harmful.
The attached patch thus makes the confirmation prompt when one of the following conditions is met:
- is existing tiddler and has changes
- is new tiddler (tiddler not in store)
- is shadow tiddler
Drawback:
Closing new tiddlers or shadow tiddlers will result in a confirmation prompt even if nothing has been altered there.