aboutsummaryrefslogtreecommitdiffhomepage
path: root/screen.c
diff options
context:
space:
mode:
authorGravatar Grissiom <chaos.proton@gmail.com>2010-09-24 19:01:13 +0800
committerGravatar Grissiom <chaos.proton@gmail.com>2010-09-24 19:01:13 +0800
commit8910226d2f63db6fc7256b388187a249c9384478 (patch)
treeaaecec50f9ff36915880085bd8caaabb33f9f013 /screen.c
parent04f58b1a31b3dcabe80d7b6fa9ab441c1909df12 (diff)
only count the last line of promt when caculate prompt width
Diffstat (limited to 'screen.c')
-rw-r--r--screen.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/screen.c b/screen.c
index fb173ce6..0046e0cf 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
{
/*