Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Patch available for 3.0.6-pre-0



Hi!  I am glad to meet new stable zsh. (^_^)

I have a small dissatisfaction for zsh.  Zsh can NOT treat RPROMPT
to right place with some (special) terminal.

The terminal is as follows:

1. It does not have RI= entry for termcap database.

2. TAB stop is not set automatically when terminal size is changed.

The 'hpterm' is one of such terminal.


If terminal does not have RI= entry, zsh uses TAB character for
horizontal cursor move.  And zsh assumes that TAB stop is 8, 16, 24,
32, ..  But TAB stop is user definable, so this assumption is not
good.  And, generally, TAB stop is not set automatically when terminal
size is changed.  For example, the terminal width is 80, and TAB stop
is as follows:
    8, 16, 24, 32, 40, 48, 56, 64, 72, 80

Then terminal size is changed to 100.  Zsh assumes that TAB stop will
be set as follows:
    8, 16, 24, 32, 40, 48, 56, 64, 72, 80, 88, 96

But hpterm's is as follows:
    8, 16, 24, 32, 40, 48, 56, 64, 72, 80

So, RPROMPT is not display right place with hpterm.  when I use zsh
with hpterm, I must set TAB stop manually when I change terminal size.

I think that it is NOT hpterm's defect.  Because the standard for TAB
stop behavior is NOT exist, zsh should NOT assume such TAB stop.

Here is the patch for this problem.  This is for zsh-3.0.6-pre0.

diff -ur zsh-3.0.6-pre0/Src/zle_refresh.c zsh-3.0.6-pre0-new/Src/zle_refresh.c
--- zsh-3.0.6-pre0/Src/zle_refresh.c    Fri Sep 26 10:42:19 1997
+++ zsh-3.0.6-pre0-new/Src/zle_refresh.c        Wed Apr 21 19:59:45 1999
@@ -856,16 +856,6 @@
        return;
     }

-/* try tabs if tabs are non destructive and multright is not possible */
-    if (!oxtabs && tccan(TCNEXTTAB) && ((vcs | 7) < cl)) {
-       i = (vcs | 7) + 1;
-       tcout(TCNEXTTAB);
-       for ( ; i + 8 <= cl; i += 8)
-           tcout(TCNEXTTAB);
-       if ((ct = cl - i) == 0) /* number of chars still to move across */
-           return;
-    }
-
 /* otherwise _carefully_ write the contents of the video buffer.
    if we're anywhere in the prompt, goto the left column and write the whole
    prompt out unless lpptlen == pptw : we can cheat then */

-- 
Tatsuo Furukawa  (frkwtto@xxxxxxxxxxxxxx)



Messages sorted by: Reverse Date, Date, Thread, Author