Bug#466789: Parsing of "terminal version" response too strict?

Bram Moolenaar Bram at moolenaar.net
Mon Feb 25 19:35:26 UTC 2008


Thomas -

> On Sun, Feb 24, 2008 at 11:00:18PM +0100, Bram Moolenaar wrote:
> > We don't know what it is.  Could be a function key.
> > 
> > > > I think every escape sequence is supposed to end in a letter.  So we
> > > > could use this loop:
> > > > 
> > > > 	for (i = 2 + (tp[0] != CSI); i < len && !ASCII_ISALPHA(tp[i]); ++i)
> > > 
> > > Quickly looking over xterm's control sequences[0], there are sequences
> > > that don't end in a letter but responses to T_CRV should always end in
> > > c.
> > 
> > You mean sequences that are send to the xterm?  We were talking about
> > sequences that xterm sends back to the application and start with CSI.
> > 
> > Oh, these sequences can also end in '~', I'll add that.
> 
> Technically, they could also end with '{', '|' or '}', though I don't
> recall any terminals which do this.

Good to know.  I now made it:

		for (i = 2 + (tp[0] != CSI); i < len
				&& !(tp[i] >= '{' && tp[i] <= '~')
				&& !ASCII_ISALPHA(tp[i]); ++i)

- Bram

-- 
hundred-and-one symptoms of being an internet addict:
42. Your virtual girlfriend finds a new net sweetheart with a larger bandwidth.

 /// Bram Moolenaar -- Bram at Moolenaar.net -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\        download, build and distribute -- http://www.A-A-P.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///





More information about the pkg-vim-maintainers mailing list