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