# HG changeset patch
# User Brodie Rao <[email protected]>
# Date 1361674349 28800
# Node ID 3e642ff45fb26f9c9cde50ff476b099eb802160b
# Parent  8b86b69546a9ea9309ebf7d05e1d443457cd58d8
Support mouse wheel scrolling of inactive windows in the terminal

diff --git a/src/edit.c b/src/edit.c
--- a/src/edit.c
+++ b/src/edit.c
@@ -9139,9 +9139,13 @@ ins_mousescroll(dir)
 
     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)
+# ifdef FEAT_WINDOWS
+    if (
+# ifdef FEAT_GUI
+            gui.in_use &&
+# endif
+            mouse_row >= 0 && mouse_col >= 0
+            )
     {
        int row, col;
 
@@ -9191,7 +9195,7 @@ ins_mousescroll(dir)
 # endif
     }
 
-# if defined(FEAT_GUI) && defined(FEAT_WINDOWS)
+# ifdef FEAT_WINDOWS
     curwin->w_redr_status = TRUE;
 
     curwin = old_curwin;
diff --git a/src/normal.c b/src/normal.c
--- a/src/normal.c
+++ b/src/normal.c
@@ -4649,11 +4649,15 @@ nv_screengo(oap, dir, dist)
 nv_mousescroll(cap)
     cmdarg_T   *cap;
 {
-# if defined(FEAT_GUI) && defined(FEAT_WINDOWS)
+# ifdef 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)
+    if (
+# ifdef FEAT_GUI
+            gui.in_use &&
+# endif
+            mouse_row >= 0 && mouse_col >= 0
+            )
     {
        int row, col;
 
@@ -4698,7 +4702,7 @@ nv_mousescroll(cap)
     }
 # endif
 
-# if defined(FEAT_GUI) && defined(FEAT_WINDOWS)
+# ifdef FEAT_WINDOWS
     curwin->w_redr_status = TRUE;
 
     curwin = old_curwin;

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Raspunde prin e-mail lui