With a clean Vim, I am seeing unwanted output when piping from the command line. I'm told v8.2.0767 introduced this regression.
vim -Nu NONE:w !bashI expect to see a "hello" clearly displayed.
Instead, I see this (using od so we can see if there are any extra characters there.) in terminator, and this in xterm.
VIM - Vi IMproved 8.2 (2019 Dec 12, compiled May 21 2020 14:10:56)
Included patches: 1-803
Slackware 14.2
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.![]()
What does Vim answer to the following (with the cursor on "echo hello")?
verbose set enc? fenc? bomb?
(the question marks are part of the command)
I suspect encoding=utf-8 fileencoding=utf-8 bomb
In that case, does the problem still happen after
:setlocal nobomb
? With me it does before but not after.
Best regards,
Tony.
I can reproduce it with the latest vim-8.2.803 on
xubuntu-18.03, with xfce4-terminal and gnome-terminal,
which print:
$ ./vim --clean -c ':call setline(1, "echo hello")' -c 'w !bash'
�[>4;mhello
And also with xterm which prints ello instead of hello:
$ ./vim --clean -c ':call setline(1, "echo hello")' -c 'w !bash'
ello
In reply to @tonymec: it's got nothing to do with 'nobomb'
since it happens when starting vim with: vim --clean.
With vim --clean in konsole I get the expected result, but in xterm I get ello. What is strange is that with
echo 1 2 3 4 5 6 hello
I still get "ello" in xterm. OTOH, |od -tx1 gives a different (higher) count for echo 1 2 3 4 5 6 hello than for plain echo hello; but the count does not agree to what it types.
Best regards,
Tony.
To @tonymec
Since you can reproduce the issue with xterm, what Linux distribution do you use?
I'm asking as the spurious characters after 8.2.0767 affects at least Ubuntu-18.04 and Slackware 14.2. I'm curious whether it affects other distributions.
What version of xterm do you use?
For me on Ubuntu-18.04 (where I also see the issue), I have:
$ xterm -v
XTerm(330)
If you know that some terminal doesn't support modifyOtherKeys, then when running in that terminal (and with has('gui_running') being false) you can set t_TI and T_TE to empty to avoid using that facility. Or if you can find some terminal name correctly describing that terminal in the termcap/terminfo database, and with those two codes empty, so much the better.
Best regards,
Tony.
—
You are receiving this because you commented.
So, to summarise, this is a bug with the terminal emulator, not an issue with Vim, so can't/won't be fixed by Vim, and until one's terminal emulator is fixed, a workaround for seeing thie behaviour in Vim is to unset t_TI and t_TE?
—
You are receiving this because you commented.
With the latest Vim I cannot reproduce this problem, neither in xterm or in gnome-terminal.
—
You are receiving this because you commented.
I stumbled upon this page for the solution of the issue, but found that setting t_TI and t_TE to empty doesn't work. So, I would like to add (for someone like me) that a solution stated at https://stackoverflow.com/a/75432130 to do following works:
set keyprotocol=
let &term=&term
—
Reply to this email directly, view it on GitHub.
You are receiving this because you commented.![]()