RA
unread,Nov 20, 2009, 7:58:01 PM11/20/09Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to TiddlyWiki
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.