John Little <john.b.lit...@gmail.com> writes:

> On Sunday, November 8, 2015 at 12:03:49 PM UTC+13, Random832 wrote:
>> When running in xterm (a real xterm, not any other terminal reporting
>> itself as "xterm") with TERM set to xterm, Vim puts the terminal in a
>> state where the screen clearing commands \e[K and \e[J do not work
>
> Are you sure it's vim?  If, at a bash prompt in an xterm, I run
>     echo -e '\eV'
> then the xterm gets in a state like you describe, particularly if I
> then run vim. Running
>     tput reset
> fixes it.  Does running tput reset before running vim exhibit your
> trouble?  Or even
>     tput reset;vim

Even outputting \e["q, the sequence that I know successfully gets it out
of the bad state, immediately before starting vim, doesn't fix it. It
also happens with xterm -e vim. And as I mentioned it is dependent on
the vim version.

I also figured out after sending my initial bug report, that this only
happens on a non-UTF8 xterm. It makes me wonder if Vim is sending a
UTF-8 character that contains 0x96, but I can't think of why that would
be happening.

> in case your shell's prompt command has the nasty sequence (mine does
> a bunch).

My shell prompt doesn't contain any escape sequences.

Gary Johnson <garyj...@spocom.com> writes:
> You might try running 'script' before running 'vim' to capture all
> the characters being sent to the terminal.

I think I found it. Vim, for some reason, outputs a unicode character
that contains 0x96 in its UTF-8 output:

"U+25BD WHITE DOWN-POINTING TRIANGLE"

I've actually seen a triangle like that on the screen before after
running vim, but never thought of anything of it.

In the source code, it looks like this character is used to determine
how the terminal treats the width of ambiguous characters. However,
it is printed in UTF-8 even if there is no reason for vim to think the
terminal or locale are UTF-8.

Apparently the other terminal descriptions I tested with didn't include
u7/u8, and therefore Vim doesn't do this check.

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui