lynx-dev
[Top][All Lists]
Advanced

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

lynx-dev [PATCH 2.8.4dev.20] keys vs actions


From: Ilya Zakharevich
Subject: lynx-dev [PATCH 2.8.4dev.20] keys vs actions
Date: Tue, 1 May 2001 22:01:47 -0400
User-agent: Mutt/1.2.5i

Yet another place when keys were "generated" instead of actions - thus
mouse navigation in input fields was broken with key redefinitions.

Enjoy,
Ilya

--- ./src/LYForms.c-pre Sun Apr  1 16:51:46 2001
+++ ./src/LYForms.c     Tue May  1 15:34:04 2001
@@ -492,6 +492,7 @@ again:
        }
 #endif /* VMS */
 
+       action = 0;
 #ifdef USE_MOUSE
 #  if defined(NCURSES) || defined(PDCURSES)
        if (ch != -1 && (ch & LKC_ISLAC) && !(ch & LKC_ISLECLAC)) /* already 
lynxactioncode? */
@@ -505,10 +506,10 @@ again:
            if (MOUSE_Y_POS == cury) {
                repeat = MOUSE_X_POS - curx;
                if (repeat < 0) {
-                   ch = LTARROW;
+                   action = LYE_BACK;
                    repeat = - repeat;
                } else
-                   ch = RTARROW;
+                   action = LYE_FORW;
            }
 #else
            MEVENT      event;
@@ -519,10 +520,10 @@ again:
            if (event.y == cury) {
                repeat = event.x - curx;
                if (repeat < 0) {
-                   ch = LTARROW;
+                   action = LYE_BACK;
                    repeat = - repeat;
                } else
-                   ch = RTARROW;
+                   action = LYE_FORW;
            }
 #endif /* PDCURSES */
            else {
@@ -553,7 +554,8 @@ again:
        if (peek_mouse_link() != -1)
            break;
 
-       action = EditBinding(ch);
+       if (!action)
+           action = EditBinding(ch);
        if ((action & LYE_DF) && !(action & LYE_FORM_LAC)) {
            last_xlkc = ch;
            action &= ~LYE_DF;
@@ -755,7 +757,7 @@ again:
                if (repeat < 0)
                    repeat = 1;
                while (repeat--) {
-                   int rc = LYLineEdit(&MyEdit, ch, TRUE);
+                   int rc = LYEdit1(&MyEdit, ch, action & ~LYE_DF, TRUE);
 
                    if (rc < 0) {
                        ch = -rc;

; To UNSUBSCRIBE: Send "unsubscribe lynx-dev" to address@hidden

reply via email to

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