Karsten Hopp 1ae198
To: vim_dev@googlegroups.com
Karsten Hopp 1ae198
Subject: Patch 7.3.833
Karsten Hopp 1ae198
Fcc: outbox
Karsten Hopp 1ae198
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp 1ae198
Mime-Version: 1.0
Karsten Hopp 1ae198
Content-Type: text/plain; charset=UTF-8
Karsten Hopp 1ae198
Content-Transfer-Encoding: 8bit
Karsten Hopp 1ae198
------------
Karsten Hopp 1ae198
Karsten Hopp 1ae198
Patch 7.3.833
Karsten Hopp 1ae198
Problem:    In the terminal the scroll wheel always scrolls the active window.
Karsten Hopp 1ae198
Solution:   Scroll the window under the mouse pointer, like in the GUI.
Karsten Hopp 1ae198
	    (Bradie Rao)
Karsten Hopp 1ae198
Files:	    src/edit.c, src/normal.c
Karsten Hopp 1ae198
Karsten Hopp 1ae198
Karsten Hopp 1ae198
*** ../vim-7.3.832/src/edit.c	2013-02-13 16:30:17.000000000 +0100
Karsten Hopp 1ae198
--- src/edit.c	2013-02-26 11:20:31.000000000 +0100
Karsten Hopp 1ae198
***************
Karsten Hopp 1ae198
*** 9139,9147 ****
Karsten Hopp 1ae198
  
Karsten Hopp 1ae198
      tpos = curwin->w_cursor;
Karsten Hopp 1ae198
  
Karsten Hopp 1ae198
! # if defined(FEAT_GUI) && defined(FEAT_WINDOWS)
Karsten Hopp 1ae198
!     /* Currently the mouse coordinates are only known in the GUI. */
Karsten Hopp 1ae198
!     if (gui.in_use && mouse_row >= 0 && mouse_col >= 0)
Karsten Hopp 1ae198
      {
Karsten Hopp 1ae198
  	int row, col;
Karsten Hopp 1ae198
  
Karsten Hopp 1ae198
--- 9139,9146 ----
Karsten Hopp 1ae198
  
Karsten Hopp 1ae198
      tpos = curwin->w_cursor;
Karsten Hopp 1ae198
  
Karsten Hopp 1ae198
! # ifdef FEAT_WINDOWS
Karsten Hopp 1ae198
!     if (mouse_row >= 0 && mouse_col >= 0)
Karsten Hopp 1ae198
      {
Karsten Hopp 1ae198
  	int row, col;
Karsten Hopp 1ae198
  
Karsten Hopp 1ae198
***************
Karsten Hopp 1ae198
*** 9191,9197 ****
Karsten Hopp 1ae198
  # endif
Karsten Hopp 1ae198
      }
Karsten Hopp 1ae198
  
Karsten Hopp 1ae198
! # if defined(FEAT_GUI) && defined(FEAT_WINDOWS)
Karsten Hopp 1ae198
      curwin->w_redr_status = TRUE;
Karsten Hopp 1ae198
  
Karsten Hopp 1ae198
      curwin = old_curwin;
Karsten Hopp 1ae198
--- 9190,9196 ----
Karsten Hopp 1ae198
  # endif
Karsten Hopp 1ae198
      }
Karsten Hopp 1ae198
  
Karsten Hopp 1ae198
! # ifdef FEAT_WINDOWS
Karsten Hopp 1ae198
      curwin->w_redr_status = TRUE;
Karsten Hopp 1ae198
  
Karsten Hopp 1ae198
      curwin = old_curwin;
Karsten Hopp 1ae198
*** ../vim-7.3.832/src/normal.c	2013-02-14 22:11:31.000000000 +0100
Karsten Hopp 1ae198
--- src/normal.c	2013-02-26 11:20:31.000000000 +0100
Karsten Hopp 1ae198
***************
Karsten Hopp 1ae198
*** 4649,4659 ****
Karsten Hopp 1ae198
  nv_mousescroll(cap)
Karsten Hopp 1ae198
      cmdarg_T	*cap;
Karsten Hopp 1ae198
  {
Karsten Hopp 1ae198
! # if defined(FEAT_GUI) && defined(FEAT_WINDOWS)
Karsten Hopp 1ae198
      win_T *old_curwin = curwin;
Karsten Hopp 1ae198
  
Karsten Hopp 1ae198
!     /* Currently we only get the mouse coordinates in the GUI. */
Karsten Hopp 1ae198
!     if (gui.in_use && mouse_row >= 0 && mouse_col >= 0)
Karsten Hopp 1ae198
      {
Karsten Hopp 1ae198
  	int row, col;
Karsten Hopp 1ae198
  
Karsten Hopp 1ae198
--- 4649,4658 ----
Karsten Hopp 1ae198
  nv_mousescroll(cap)
Karsten Hopp 1ae198
      cmdarg_T	*cap;
Karsten Hopp 1ae198
  {
Karsten Hopp 1ae198
! # ifdef FEAT_WINDOWS
Karsten Hopp 1ae198
      win_T *old_curwin = curwin;
Karsten Hopp 1ae198
  
Karsten Hopp 1ae198
!     if (mouse_row >= 0 && mouse_col >= 0)
Karsten Hopp 1ae198
      {
Karsten Hopp 1ae198
  	int row, col;
Karsten Hopp 1ae198
  
Karsten Hopp 1ae198
***************
Karsten Hopp 1ae198
*** 4698,4704 ****
Karsten Hopp 1ae198
      }
Karsten Hopp 1ae198
  # endif
Karsten Hopp 1ae198
  
Karsten Hopp 1ae198
! # if defined(FEAT_GUI) && defined(FEAT_WINDOWS)
Karsten Hopp 1ae198
      curwin->w_redr_status = TRUE;
Karsten Hopp 1ae198
  
Karsten Hopp 1ae198
      curwin = old_curwin;
Karsten Hopp 1ae198
--- 4697,4703 ----
Karsten Hopp 1ae198
      }
Karsten Hopp 1ae198
  # endif
Karsten Hopp 1ae198
  
Karsten Hopp 1ae198
! # ifdef FEAT_WINDOWS
Karsten Hopp 1ae198
      curwin->w_redr_status = TRUE;
Karsten Hopp 1ae198
  
Karsten Hopp 1ae198
      curwin = old_curwin;
Karsten Hopp 1ae198
*** ../vim-7.3.832/src/version.c	2013-02-26 11:25:28.000000000 +0100
Karsten Hopp 1ae198
--- src/version.c	2013-02-26 13:28:51.000000000 +0100
Karsten Hopp 1ae198
***************
Karsten Hopp 1ae198
*** 730,731 ****
Karsten Hopp 1ae198
--- 730,733 ----
Karsten Hopp 1ae198
  {   /* Add new patch number below this line */
Karsten Hopp 1ae198
+ /**/
Karsten Hopp 1ae198
+     833,
Karsten Hopp 1ae198
  /**/
Karsten Hopp 1ae198
Karsten Hopp 1ae198
-- 
Karsten Hopp 1ae198
Female engineers become irresistible at the age of consent and remain that
Karsten Hopp 1ae198
way until about thirty minutes after their clinical death.  Longer if it's a
Karsten Hopp 1ae198
warm day.
Karsten Hopp 1ae198
				(Scott Adams - The Dilbert principle)
Karsten Hopp 1ae198
Karsten Hopp 1ae198
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp 1ae198
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp 1ae198
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
Karsten Hopp 1ae198
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///