From 8910226d2f63db6fc7256b388187a249c9384478 Mon Sep 17 00:00:00 2001 From: Grissiom Date: Fri, 24 Sep 2010 19:01:13 +0800 Subject: [PATCH] only count the last line of promt when caculate prompt width --- screen.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/screen.c b/screen.c index fb173ce60..0046e0cff 100644 --- a/screen.c +++ b/screen.c @@ -236,6 +236,10 @@ static int calc_prompt_width( wchar_t *prompt ) { res = next_tab_stop( res ); } + else if( prompt[j] == L'\n' ) + { + res = 0; + } else { /*