Karsten Hopp 7cc804
To: vim_dev@googlegroups.com
Karsten Hopp 7cc804
Subject: Patch 7.3.1281
Karsten Hopp 7cc804
Fcc: outbox
Karsten Hopp 7cc804
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp 7cc804
Mime-Version: 1.0
Karsten Hopp 7cc804
Content-Type: text/plain; charset=UTF-8
Karsten Hopp 7cc804
Content-Transfer-Encoding: 8bit
Karsten Hopp 7cc804
------------
Karsten Hopp 7cc804
Karsten Hopp 7cc804
Patch 7.3.1281
Karsten Hopp 7cc804
Problem:    When 'ttymouse' is set to "xterm2" clicking in column 123 moves
Karsten Hopp 7cc804
	    the cursor to column 96. (Kevin Goodsell)
Karsten Hopp 7cc804
Solution:   Decode KE_CSI.
Karsten Hopp 7cc804
Files:	    src/term.c
Karsten Hopp 7cc804
Karsten Hopp 7cc804
Karsten Hopp 7cc804
*** ../vim-7.3.1280/src/term.c	2013-06-30 17:51:46.000000000 +0200
Karsten Hopp 7cc804
--- src/term.c	2013-07-01 19:58:02.000000000 +0200
Karsten Hopp 7cc804
***************
Karsten Hopp 7cc804
*** 2947,2954 ****
Karsten Hopp 7cc804
  		return -1;
Karsten Hopp 7cc804
  	    if (buf[len++] == (int)KS_ZERO)
Karsten Hopp 7cc804
  		c = NUL;
Karsten Hopp 7cc804
! 	    ++len;	/* skip KE_FILLER */
Karsten Hopp 7cc804
! 	    /* else it should be KS_SPECIAL, and c already equals K_SPECIAL */
Karsten Hopp 7cc804
  	}
Karsten Hopp 7cc804
  	else if (c == CSI && buf[len] == KS_EXTRA
Karsten Hopp 7cc804
  					       && buf[len + 1] == (int)KE_CSI)
Karsten Hopp 7cc804
--- 2947,2956 ----
Karsten Hopp 7cc804
  		return -1;
Karsten Hopp 7cc804
  	    if (buf[len++] == (int)KS_ZERO)
Karsten Hopp 7cc804
  		c = NUL;
Karsten Hopp 7cc804
! 	    /* else it should be KS_SPECIAL; when followed by KE_FILLER c is
Karsten Hopp 7cc804
! 	     * K_SPECIAL, or followed by KE_CSI and c must be CSI. */
Karsten Hopp 7cc804
! 	    if (buf[len++] == (int)KE_CSI)
Karsten Hopp 7cc804
! 		c = CSI;
Karsten Hopp 7cc804
  	}
Karsten Hopp 7cc804
  	else if (c == CSI && buf[len] == KS_EXTRA
Karsten Hopp 7cc804
  					       && buf[len + 1] == (int)KE_CSI)
Karsten Hopp 7cc804
*** ../vim-7.3.1280/src/version.c	2013-06-30 23:24:03.000000000 +0200
Karsten Hopp 7cc804
--- src/version.c	2013-07-01 20:00:11.000000000 +0200
Karsten Hopp 7cc804
***************
Karsten Hopp 7cc804
*** 730,731 ****
Karsten Hopp 7cc804
--- 730,733 ----
Karsten Hopp 7cc804
  {   /* Add new patch number below this line */
Karsten Hopp 7cc804
+ /**/
Karsten Hopp 7cc804
+     1281,
Karsten Hopp 7cc804
  /**/
Karsten Hopp 7cc804
Karsten Hopp 7cc804
-- 
Karsten Hopp 7cc804
ARTHUR:  Be quiet!
Karsten Hopp 7cc804
DENNIS:  Well you can't expect to wield supreme executive power just 'cause
Karsten Hopp 7cc804
         some watery tart threw a sword at you!
Karsten Hopp 7cc804
ARTHUR:  Shut up!
Karsten Hopp 7cc804
DENNIS:  I mean, if I went around sayin' I was an empereror just because some
Karsten Hopp 7cc804
         moistened bint had lobbed a scimitar at me they'd put me away!
Karsten Hopp 7cc804
                                  The Quest for the Holy Grail (Monty Python)
Karsten Hopp 7cc804
Karsten Hopp 7cc804
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp 7cc804
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp 7cc804
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
Karsten Hopp 7cc804
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///