On 06/13/1999 (14:52:24), [EMAIL PROTECTED] wrote:
> >     * An answer to why if this problem has been around for
> >     such a long time (and has been discussed before), that why
> >     a solution hasn't been provided.
> >     * An actual solution to the problem.
> 
> This has nothing to do with whether or not slang writes spaces.  It
> has everything to do with how your terminal interprets displayed text
> on the screen.  For example, suppose your terminal is a vt100 and
> slang sends it the following:
> 
>     ESC[1;1H        Move cursor to 1,1
>     ESC[K           Erase to end of line
>     Foo             Write Foo
>     ESC[1;10H       Goto 1,10
>     Bar             Write Bar
> 
> This will cause the the top line to appear as:
> 
> Foo      Bar

        Correct. Most terminal emulation software will throw spaces
        inbetween Foo and Bar as to ensure a decent way of copy/pasting
        text to a clipboard or etc.

        My concern/complaint is not about spaces between two words
        or characters. My concern is with this:

        A string is "Hello", terminated with \0. If this string is
        printf()'d, it outputs "Hello". The terminal sees 5 characters,
        and therefore lets you select 5. Five are only sent over the
        tty as well.

        ncurses (and slang) applications are not doing this. I have
        Email messages which consist of lines such as (excluding
        double-quotes):

"From: Stan Ryckman <[EMAIL PROTECTED]>"

        However, when this line is actually output to the terminal
        with mutt (slang, ncurses, whatever people want to claim it
        is), the output is actually the following:

"From: Stan Ryckman <[EMAIL PROTECTED]>                            "

        (NOTE: This is taken from mutt's builtin pager using ncurses.
        Slang does the same, but to a more verbose effect -- meaning,
        it does it more commonly than ncurses. But, both do it!).

        People are blaming slang for this behaviour. Possibly the
        problem is with slang, and with ncurses as well.

> Finally, it is beyond the scope of the screen management library to
> second-guess the context of what the application displays on the
> screen.  The goal of the library is to manage the display in a way
> that is as efficient as possible.  The same comment should apply to the

        If your string is 25 characters long, and you are using a
        terminal window which is 132 characters wide, is it efficient
        to print out 107 blank spaces at the end of the line? :-) It
        may be on a LAN, but not over a dialup.

> If you are using rxvt, then apply the patch that I posted earlier.  If
> you are using some other terminal, you will have to look elsewhere for
> a solution.

        I have witnessed the aforementioned problem using the following
        software:

        CRT
        SecureCRT 
        Windows Telnet
        FreeBSD console
        Linux console
        Sun console

        I spent 2 days tinkering with my termcap entry, thinking it
        was plausible that the thing was padding spaces out on the
        end of each line -- however, this is not the case.

        Sidenote: Editors such as vim, elvis, and stock vi do not
        portrait this kind-of behaviour. vim and elvis both use
        ncurses :-).

        It is definitely a problem in either mutt, slang, or
        ncurses: or all three.

-- 
| Jeremy Chadwick                                   [EMAIL PROTECTED] |
| Parodius Networking                             [EMAIL PROTECTED] |
| UNIX System Administrator                   http://www.parodius.com/ |

Reply via email to