For an existing tiddler, if you hit Esc accidentally while editing,
you can hit Esc again at the confirmation dialog and keep editing. But
if it's a new tiddler, the CloseOnCancelPlugin will close the tiddler,
regardless of how you respond to the confirmation dialog. So if you
never saved your new big tiddler before, if you hit Esc once (very
likely if you are a Vi user, I imagine), you are screwed no matter
what. To change that, here's the fix:

change
if (!store.tiddlerExists(title) && !store.isShadowTiddler(title))
to
if (!story.isDirty(title) && !store.tiddlerExists(title) && !
store.isShadowTiddler(title))

This doesn't look very elegant, but I couldn't think of a better one.
Does a handler have to always return false? Otherwise,
config.commands.cancelTiddler.handler could be changed to return true
or false depending on the confirmation.

--

You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/tiddlywiki?hl=.


Reply via email to