qemacs-commit
[Top][All Lists]
Advanced

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

[Qemacs-commit] qemacs shell.c


From: Charlie Gordon
Subject: [Qemacs-commit] qemacs shell.c
Date: Wed, 07 Feb 2007 23:28:36 +0000

CVSROOT:        /cvsroot/qemacs
Module name:    qemacs
Changes by:     Charlie Gordon <chqrlie>        07/02/07 23:28:36

Modified files:
        .              : shell.c 

Log message:
        report correct column number in terminal emulation, fixed crash bug on 
TAB in process buffer non interactive mode

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemacs/shell.c?cvsroot=qemacs&r1=1.20&r2=1.21

Patches:
Index: shell.c
===================================================================
RCS file: /cvsroot/qemacs/qemacs/shell.c,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -b -r1.20 -r1.21
--- shell.c     31 Dec 2006 19:34:01 -0000      1.20
+++ shell.c     7 Feb 2007 23:28:36 -0000       1.21
@@ -872,7 +872,11 @@
                     /* XXX: send cursor position, just to be able to
                        launch qemacs in qemacs (in 8859-1) ! */
                     char buf2[20];
-                    snprintf(buf2, sizeof(buf2), "\033[%d;%dR", 1, 1);
+                    int col_num, cur_line;
+                    eb_get_pos(s->b, &cur_line, &col_num, s->cur_offset);
+                    /* XXX: actually send position of point in window */
+                    snprintf(buf2, sizeof(buf2), "\033[%d;%dR", 
+                             1, col_num + 1);
                     tty_write(s, buf2, -1);
                 }
                 break;
@@ -1228,13 +1232,15 @@
         ch = c;
         tty_write(s, &ch, 1);
     } else {
+        /* Should dispatch as in fundamental mode */
         switch (c) {
         case 4:
             do_delete_char(e);
             break;
-        case 9:
-            do_tab(e);
-            break;
+        // Do not do this: it is useless and causes infinite recursion 
+        //case 9:
+        //    do_tab(e);
+        //    break;
         case 11:
             do_kill_region(e, 2);
             break;




reply via email to

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