qemacs-commit
[Top][All Lists]
Advanced

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

[Qemacs-commit] qemacs x11.c


From: Charlie Gordon
Subject: [Qemacs-commit] qemacs x11.c
Date: Mon, 26 Dec 2016 08:44:42 -0500 (EST)

CVSROOT:        /sources/qemacs
Module name:    qemacs
Changes by:     Charlie Gordon <chqrlie>        16/12/26 08:44:42

Modified files:
        .              : x11.c 

Log message:
        display: improve handling of very long lines
        - simplify the code
        - fix display of continuation lines when line numbers are visible

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemacs/x11.c?cvsroot=qemacs&r1=1.43&r2=1.44

Patches:
Index: x11.c
===================================================================
RCS file: /sources/qemacs/qemacs/x11.c,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -b -r1.43 -r1.44
--- x11.c       25 Dec 2016 23:39:30 -0000      1.43
+++ x11.c       26 Dec 2016 13:44:42 -0000      1.44
@@ -1410,38 +1410,38 @@
             meta |= (xev.xkey.state & Mod2Mask);
 #endif
 #if 0
-            put_error(NULL, "keysym=%d %d %s%s%s len=%d buf[0]=%d",
-                      (int)keysym, (int)xev.xkey.state,
-                      shift ? "shft " : "",
-                      ctrl ? "ctrl " : "",
-                      meta ? "meta " : "",
+            fprintf(stderr, "keysym=%lx  state=%lx%s%s%s  len=%d  
buf[0]='\\x%02x'\n",
+                      (long)keysym, (long)xev.xkey.state,
+                      shift ? " shft" : "",
+                      ctrl ? " ctrl" : "",
+                      meta ? " meta" : "",
                       len, buf[0]);
 #endif
-            if (shift) {
+            if (meta) {
                 switch (keysym) {
-                case XK_ISO_Left_Tab:
-                    key = KEY_SHIFT_TAB; 
+                case XK_BackSpace:
+                    key = KEY_META(KEY_DEL);
                     goto got_key;
                 default:
                     if (len > 0) {
-                        key = buf[0] & 0xff;
+                        key = KEY_META(buf[0] & 0xff);
+                        goto got_key;
+                    }
+                    if (keysym >= ' ' && keysym <= '~') {
+                        key = KEY_META(' ') + keysym - ' ';
                         goto got_key;
                     }
                     break;
                 }
             } else
-            if (meta) {
+            if (shift) {
                 switch (keysym) {
-                case XK_BackSpace:
-                    key = KEY_META(KEY_DEL);
+                case XK_ISO_Left_Tab:
+                    key = KEY_SHIFT_TAB; 
                     goto got_key;
                 default:
                     if (len > 0) {
-                        key = KEY_META(buf[0] & 0xff);
-                        goto got_key;
-                    }
-                    if (keysym >= ' ' && keysym <= '~') {
-                        key = KEY_META(' ') + keysym - ' ';
+                        key = buf[0] & 0xff;
                         goto got_key;
                     }
                     break;



reply via email to

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