subshell prompt fix



Hello,

this simple one-liner fixes the following cases:

a) subshell prompt is drawn at the same line after chdir in mc

b) frequently subshell prompt after C-o isn't drawn at the first column
in a terminal but at random position

to reproduce a):

1) run mc, chdir to /usr/share
2) C-o
3) C-o again and chdir to /usr/share/doc
4) C-o

in 2) you see: [jnovy obelix share]$
in 4) you see: [jnovy obelix share]$ [jnovy obelix doc]$

greetings,
Jindrich

-- 
Jindrich Novy <jnovy redhat com>, http://people.redhat.com/jnovy/
--- mc-4.6.1-20041103/src/main.c.promptfix	2004-10-22 07:47:25.000000000 +0200
+++ mc-4.6.1-20041103/src/main.c	2004-11-03 10:02:05.923393096 +0100
@@ -434,7 +434,7 @@ void
 do_update_prompt (void)
 {
     if (update_prompt) {
-	printf ("%s", subshell_prompt);
+	printf ("\n\r%s", subshell_prompt);
 	fflush (stdout);
 	update_prompt = 0;
     }


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