about summary refs log tree commit diff
path: root/Src/init.c
diff options
context:
space:
mode:
authorBarton E. Schaefer <schaefer@zsh.org>2014-02-08 14:49:39 -0800
committerBarton E. Schaefer <schaefer@zsh.org>2014-02-08 14:49:39 -0800
commitba58bfe4bfa16e756c8f38cfa0e992ad38b00856 (patch)
tree51cdfaacc86014d7cf321075e8366f9f4d47325b /Src/init.c
parent045b2418bd9b564001d815f1167f0c8ee3786d32 (diff)
downloadzsh-ba58bfe4bfa16e756c8f38cfa0e992ad38b00856.tar.gz
zsh-ba58bfe4bfa16e756c8f38cfa0e992ad38b00856.tar.xz
zsh-ba58bfe4bfa16e756c8f38cfa0e992ad38b00856.zip
32365: another stab at the heuristic for initializing rprompt_indent
Diffstat (limited to 'Src/init.c')
-rw-r--r--Src/init.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/Src/init.c b/Src/init.c
index da2a1bf56..fd12412c7 100644
--- a/Src/init.c
+++ b/Src/init.c
@@ -77,7 +77,7 @@ mod_export int tclen[TC_COUNT];
 /**/
 int tclines, tccolumns;
 /**/
-mod_export int hasam, hasxn, hasye;
+mod_export int hasam, hasbw, hasxn, hasye;
 
 /* Value of the Co (max_colors) entry: may not be set */
 
@@ -698,6 +698,7 @@ init_term(void)
 
 	/* check whether terminal has automargin (wraparound) capability */
 	hasam = tgetflag("am");
+	hasbw = tgetflag("bw");
 	hasxn = tgetflag("xn"); /* also check for newline wraparound glitch */
 	hasye = tgetflag("YE"); /* print in last column does carriage return */
 
@@ -750,7 +751,7 @@ init_term(void)
 	    tclen[TCCLEARSCREEN] = 1;
 	}
 	/* This might work, but there may be more to it */
-	rprompt_indent = (hasye || !tccan(TCLEFT)) ? 1 : 0;
+	rprompt_indent = ((hasam && !hasbw) || hasye || !tccan(TCLEFT));
     }
     return 1;
 }