Re: [PATCH] Already running a command (& subshell prompt?)



Hi,

I forgot to remove the comment about subshell state ACTIVE. Added it to
the patch. No functional changes.

Leonard.

-- 
mount -t life -o ro /dev/dna /genetic/research

src/Changelog:
	subshell.c (invoke_subshell): Remove bad subshell hack on C-o.
	subshell.h: Remove unused subshell state ACTIVE

--- src/subshell.c.000	2004-11-07 13:42:53.000000000 +0100
+++ src/subshell.c	2004-11-17 01:36:05.000000000 +0100
@@ -99,7 +99,6 @@ static const char subshell_switch_key = 
 
 /* State of the subshell:
  * INACTIVE: the default state; awaiting a command
- * ACTIVE: remain in the shell until the user hits `subshell_switch_key'
  * RUNNING_COMMAND: return to MC when the current command finishes */
 enum subshell_state_enum subshell_state;
 
@@ -528,13 +528,7 @@ int invoke_subshell (const char *command
     
     if (command == NULL)  /* The user has done "C-o" from MC */
     {
-	if (subshell_state == INACTIVE)
-	{
-	    subshell_state = ACTIVE;
-	    /* FIXME: possibly take out this hack; the user can
-	       re-play it by hitting C-hyphen a few times! */
-	    write (subshell_pty, " \b", 2);  /* Hack to make prompt reappear */
-	}
+	;
     }
     else  /* MC has passed us a user command */
     {
--- src/subshell.h.000	2002-12-24 01:13:44.000000000 +0100
+++ src/subshell.h	2004-11-17 01:36:27.000000000 +0100
@@ -14,7 +14,7 @@ extern int use_subshell;
 extern int subshell_pty;
 
 /* State of the subshell; see subshell.c for an explanation */
-enum subshell_state_enum {INACTIVE, ACTIVE, RUNNING_COMMAND};
+enum subshell_state_enum {INACTIVE, RUNNING_COMMAND};
 extern enum subshell_state_enum subshell_state;
 
 /* Holds the latest prompt captured from the subshell */


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