[Top][All Lists]

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

lynx-dev backspace off a text entry (was Re: New editing key bindings)

From: aldomel
Subject: lynx-dev backspace off a text entry (was Re: New editing key bindings)
Date: Sat, 28 Nov 1998 22:45:17 -0500

>besides adding a new editing keys (which are not so easy to remember anyway),
>we have a following problem - while moving to beginning of line
>with "left arrow" or "backspace" we can easily went out of box
>and force go to previous document not intentionally...
>Is it possible to add a check so if we press several "left arrow"
>on input line we got a prompt (go to previous document? y/n [n])
>before leaving that field by this key. Something like this.

I hate accidently leaving a page, too.

If you want to make it always ask you, use this patch here:

It is a little quirky because you might be at the first page
and it wil ask if you want to go back anyway.

And, for the situation described by the comment, you must use C-v.

        * src/LYForms.c (form_getstr): always prompt left arrow at left of field

--- lynx2-8-1.old/src/LYForms.c Sat Nov 28 19:57:30 1998
+++ Sat Nov 28 22:02:00 1998
@@ -391,17 +391,16 @@
             *  Left arrrow in column 0 deserves special treatment here,
             *  else you can get trapped in a form without submit button!
            case LTARROW:
                if (MyEdit.pos == 0) {
-                   int c = 'Y';    /* Go back immediately if no changes */
-                   if (strcmp(MyEdit.buffer, value)) {
-                       _statusline(PREV_DOC_QUERY);
-                       c = LYgetch();
-                   }
+                   int c;
+                   _statusline(PREV_DOC_QUERY);
+                   c = LYgetch();
                    if (TOUPPER(c) == 'Y') {
                    } else {
                        if (form->disabled == YES)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]