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: Fri, 2 Oct 2020 16:16:09 -0400 (EDT)

CVSROOT:        /sources/qemacs
Module name:    qemacs
Changes by:     Charlie Gordon <chqrlie>        20/10/02 16:16:09

Modified files:
        .              : shell.c 

Log message:
        shell: small improvements
        
        - refine C-O interactive switch
        - fix disable shell_get_curpath lookup on comments

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

Patches:
Index: shell.c
===================================================================
RCS file: /sources/qemacs/qemacs/shell.c,v
retrieving revision 1.139
retrieving revision 1.140
diff -u -b -r1.139 -r1.140
--- shell.c     28 May 2019 04:28:49 -0000      1.139
+++ shell.c     2 Oct 2020 20:16:09 -0000       1.140
@@ -2708,22 +2708,24 @@
 {
     ShellState *s;
 
-    if (!(s = shell_get_state(e, 1)))
-        return;
-
+    if ((s = shell_get_state(e, 1)) != NULL) {
     if (e->interactive) {
         e->interactive = 0;
-    } else
-    if (s->shell_flags & SF_INTERACTIVE) {
+            return;
+        }
+        if ((s->shell_flags & SF_INTERACTIVE) && e->offset >= 
e->b->total_size) {
         e->interactive = 1;
         if (s->grab_keys)
             qe_grab_keys(shell_key, s);
-    }
 #if 0
     if (e->interactive) {
         qe_term_update_cursor(s);
     }
 #endif
+            return;
+        }
+    }
+    do_return(e, 0);
 }
 
 /* get current directory from prompt on current line */
@@ -2747,7 +2749,9 @@
             stop = stop0;
             break;
         }
-        if (c == ':' && line[i] != '\\')
+        if (c == ':' && line[i] != '\\'
+        &&  !(line[i] == '/' && line[i + 1] == '/')
+        &&  !(line[i] == '/' && line[i + 1] == '*'))
             start = i;
         if (c == ' ') {
             if (!start || start == i - 1)



reply via email to

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