On Wed, Aug 30, 2017 at 01:48:21PM +0200, Bram Moolenaar wrote:
> Marius Gedminas wrote:
> > libvte version is more relevant.  On my system (GNOME Terminal 3.20.2,
> > VTE 0.44.2) printf '\033[?12$p' produces garbage on screen instead of
> > responding with the expected reply.
> > 
> > But then again I can't find any trace of DECRQM handling in vte's git
> > master, so I'm surprised you don't see this problem.
> 
> It is supposed to swallow any escape sequence starting with CSI and
> ending with a letter.  Perhaps the "$" causes the problem.

Oh, interesting!  I saw "Vte should ignore escape sequences it doesn't
about" in the open bug list[*] and assumed it didn't (yet).  Also, my
experiments with

  printf '\033[?12$p'
  printf '\033[?12p'
  printf '\033[12p'

show that it doesn't ignore any of those.

[*] https://bugzilla.gnome.org/show_bug.cgi?id=403130

> > I've filed a vte bug: https://bugzilla.gnome.org/show_bug.cgi?id=787007
> > 
> > I've little hope of the fix (even if it's made) making its way into
> > Linux distros that are used today (e.g. latest upstream VTE is version
> > 0.49.1, while latest Ubuntu release is still on 0.44.2).
> 
> I'm getting tired of those terminals that say they are xterm while they
> are not...

(I remember the pain of fixing the terminfo databases on all the remote
machines (including random Linux-based handheld PCs) so they would
understand my $TERM, and I understand why terminal emulators pretend to
be xterm.)

> My gnome-terminal reports this version:  <esc>[>1;4402;0c
> What does yours say?

<esc>[>1;4402;0c

The 4402 part is computed from the VTE version number (major * 10000 +
minor * 100 + patchlevel), thus 0.44.2 => 4402.

> Since a real xterm only has a version in the 300 range now, we could
> take a version >4000 as Gnome perhaps?

To be safer you could in addition check whether the terminal reports a
hardcoded icon label ("LTerminal") and title ("lTerminal") in response
to to CSI 20t and CSI 21t.

Ideally libvte upstream will implement the DECRQM.

Marius Gedminas
-- 
Users will less and less tolerate the risk of being attacked from anywhere in
the universe.
        -- David Clark about network security, 1992

-- 
-- 
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].
For more options, visit https://groups.google.com/d/optout.

Attachment: signature.asc
Description: PGP signature

Raspunde prin e-mail lui