Re: Ctrl+single quote key kills editing session



On Sat, 5 Jul 2003, David Sterba wrote:

I have unfortunately discovered that hitting Ctrl+single quote key
(the one next to the enter key on my keyboard that has the double
quote in shift) kills the editor, i.e. it terminates without asking me
if I want to save anything. This is 4.6.0. Is this me or is this a
feature?
Well, it looks like a misfeature. Without going into mc/mcedit internal
details, Ctrl+<singlequote> produces the same action as Ctrl+g, which
means "Cancel".

Workaround can be more complicated, because there should be a way to
determine such key-code conflicts (internally).

Anyway, mcedit should catch the Ctrl+g key and ask for confirmation.

Yes, it's a very bad bug, so I decided to put a more reliable fix than
hardcoding Ctrl-g.  There should be no way to exit the dialog without
asking the user, even if the widget library is changed to use another
key to close dialogs.

I've added support for DLG_VALIDATE event in the editor callback.  Now the
check for unsaved changes is done by the dialog.

I'm going to rename DLG_VALIDATE because it has nothing to do with
validation the data and is called even on escape when data in ordinary
dialogs would be discarded.

Since it's a bug that can lead to loss of productivity, we probably should
release version 4.6.1 earlier and mark it as a bugfix release.

-- 
Regards,
Pavel Roskin




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]