diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | Src/Zle/zle_refresh.c | 2 | ||||
-rw-r--r-- | Src/init.c | 5 |
3 files changed, 9 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog index 83e29c41e..077aaf821 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2014-02-08 Barton E. Schaefer <schaefer@zsh.org> + + * 32365: Src/Zle/zle_refresh.c, Src/init.c: another stab at the + heuristic for initializing rprompt_indent + 2014-02-07 Peter Stephenson <p.stephenson@samsung.com> * Martin Vaeth: 32356: Util/helpfiles: fix a typo. diff --git a/Src/Zle/zle_refresh.c b/Src/Zle/zle_refresh.c index fd5485770..2bedbc492 100644 --- a/Src/Zle/zle_refresh.c +++ b/Src/Zle/zle_refresh.c @@ -977,7 +977,7 @@ zrefresh(void) int tmpalloced; /* flag to free tmpline when finished */ int remetafy; /* flag that zle line is metafied */ int txtchange; /* attributes set after prompts */ - int rprompt_off; /* Offset of rprompt from right of screen */ + int rprompt_off = 1; /* Offset of rprompt from right of screen */ struct rparams rpms; #ifdef MULTIBYTE_SUPPORT int width; /* width of wide character */ 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; } |