0a82a96
To: vim-dev@vim.org
0a82a96
Subject: patch 7.1.109
0a82a96
Fcc: outbox
0a82a96
From: Bram Moolenaar <Bram@moolenaar.net>
0a82a96
Mime-Version: 1.0
0a82a96
Content-Type: text/plain; charset=ISO-8859-1
0a82a96
Content-Transfer-Encoding: 8bit
0a82a96
------------
0a82a96
0a82a96
Patch 7.1.109
0a82a96
Problem:    GTK: when there are many tab pages, clicking on the arrow left of
0a82a96
	    the labels moves to the next tab page on the right. (Simeon Bird)
0a82a96
Solution:   Check the X coordinate of the click and pass -1 as value for the
0a82a96
	    left arrow.
0a82a96
Files:	    src/gui_gtk_x11.c, src/term.c
0a82a96
0a82a96
0a82a96
*** ../vim-7.1.108/src/gui_gtk_x11.c	Wed Sep  5 21:45:54 2007
0a82a96
--- src/gui_gtk_x11.c	Fri Sep 14 20:59:55 2007
0a82a96
***************
0a82a96
*** 3223,3230 ****
0a82a96
  	{
0a82a96
  	    if (clicked_page == 0)
0a82a96
  	    {
0a82a96
! 		/* Click after all tabs moves to next tab page. */
0a82a96
! 		if (send_tabline_event(0) && gtk_main_level() > 0)
0a82a96
  		    gtk_main_quit();
0a82a96
  	    }
0a82a96
  #ifndef HAVE_GTK2
0a82a96
--- 3223,3231 ----
0a82a96
  	{
0a82a96
  	    if (clicked_page == 0)
0a82a96
  	    {
0a82a96
! 		/* Click after all tabs moves to next tab page.  When "x" is
0a82a96
! 		 * small guess it's the left button. */
0a82a96
! 		if (send_tabline_event(x < 50 ? -1 : 0) && gtk_main_level() > 0)
0a82a96
  		    gtk_main_quit();
0a82a96
  	    }
0a82a96
  #ifndef HAVE_GTK2
0a82a96
*** ../vim-7.1.108/src/term.c	Thu May 10 20:48:32 2007
0a82a96
--- src/term.c	Fri Sep 14 20:56:40 2007
0a82a96
***************
0a82a96
*** 4809,4814 ****
0a82a96
--- 4809,4816 ----
0a82a96
  	    if (num_bytes == -1)
0a82a96
  		return -1;
0a82a96
  	    current_tab = (int)bytes[0];
0a82a96
+ 	    if (current_tab == 255)	/* -1 in a byte gives 255 */
0a82a96
+ 		current_tab = -1;
0a82a96
  	    slen += num_bytes;
0a82a96
  	}
0a82a96
  	else if (key_name[0] == (int)KS_TABMENU)
0a82a96
*** ../vim-7.1.108/src/version.c	Fri Sep 14 19:56:18 2007
0a82a96
--- src/version.c	Sat Sep 15 14:05:25 2007
0a82a96
***************
0a82a96
*** 668,669 ****
0a82a96
--- 668,671 ----
0a82a96
  {   /* Add new patch number below this line */
0a82a96
+ /**/
0a82a96
+     109,
0a82a96
  /**/
0a82a96
0a82a96
-- 
0a82a96
No letters of the alphabet were harmed in the creation of this message.
0a82a96
0a82a96
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
0a82a96
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
0a82a96
\\\        download, build and distribute -- http://www.A-A-P.org        ///
0a82a96
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///