Gary Johnson wrote:
> On 2020-05-21, Dominique Pellé wrote:
> > 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
>
> I haven't reproduced the "ello" problem, but I do observe the
> "[>4;m" problem. I observe it when using GNOME Terminal, but not
> when using xterm or mintty.
>
> The "<esc>[>4;m" sequence is the modifyOtherKeys reset sequence.
> According to a number of articles found on the Web*, GNOME Terminal
> does not support modifyOtherKeys and is not likely to.
>
> xfce4-terminal returns the same v:termresponse sequence as GNOME
> Terminal, so I would expect xfce4-terminal to have the same
> shortcomings as GNOME Terminal.
>
> If Vim is going to continue to support modifyOtherKeys, then it
> should identify terminals that don't support it and not send that
> sequence to those terminals. In my experience, v:termresponse has
> been a reliable indicator of actual terminal type. The problem with
> it is that Vim doesn't know its value until after vimrc has been
> processed, so one has to defer some terminal-dependent processing to
> a TermResponse autocommand, which has its own problems.
>
> What I do is have my ~/.bashrc query the terminal for its
> termresponse, save that in the environment variable TERMRESPONSE,
> and use that value to make terminal-dependent selections in my vimrc
> and color scheme files.
>
> Alternatively, a GNOME Terminal user could set TERM=gnome, which is
> supposed to be a more accurate terminfo entry for a GNOME Terminal.
> The user could set TERM=gnome if COLORTERM=gnome-terminal. Vim
> could then use TERM=gnome or COLORTERM=gnome-terminal as a condition
> for disabling modifyOtherKeys.
>
> I've been testing this on an Ubuntu 18.04 system with Vim 8.2.803,
> xterm version 344 and GNOME Terminal version 3.28.2, as well as
> remotely over ssh from a Windows 10 system running Cygwin with
> mintty 3.1.5.
I believe the bug was fixed in a later version of gnome-terminal.
Unless we can recognize the broken version, I would rather just tell
users to not use a broken terminal.
--
hundred-and-one symptoms of being an internet addict:
187. You promise yourself that you'll only stay online for another
15 minutes...at least once every hour.
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/202005261845.04QIjEJf650341%40masaka.moolenaar.net.