To: [email protected]
Subject: Patch 6.0ax.007
Fcc: outbox
From: Bram Moolenaar <[email protected]>
------------

Patch 6.0ax.007
Problem:    When using GPM (mouse driver in a Linux console) a double click is
           interpreted as a scroll wheel click.
Solution:   Check if GPM is being used when deciding if a mouse event is for
           the scroll wheel.
Files:      src/term.c


*** ../vim60ax.6/src/term.c     Tue Sep 11 19:08:13 2001
--- src/term.c  Thu Sep 20 21:31:38 2001
***************
*** 3665,3670 ****
--- 3665,3673 ----
 # endif
 #endif
     int               cpo_koffset;
+ #ifdef FEAT_MOUSE_GPM
+     extern int        gpm_flag; /* gpm library variable */
+ #endif

     cpo_koffset = (vim_strchr(p_cpo, CPO_KOFFSET) != NULL);

***************
*** 3960,3972 ****
 #  if !defined(MSWIN) && !defined(MSDOS)
               /*
                * Handle mouse events.
!                * Recognize the xterm mouse wheel, but not in the GUI
!                * and the MS-DOS or Win32 console (multi-clicks use >= 0x60).
                */
               if (mouse_code >= MOUSEWHEEL_LOW
 #   ifdef FEAT_GUI
                       && !gui.in_use
 #   endif
                       )
               {
                   /* Keep the mouse_code before it's changed, so that we
--- 3963,3979 ----
 #  if !defined(MSWIN) && !defined(MSDOS)
               /*
                * Handle mouse events.
!                * Recognize the xterm mouse wheel, but not in the GUI, the
!                * Linux console with GPM and the MS-DOS or Win32 console
!                * (multi-clicks use >= 0x60).
                */
               if (mouse_code >= MOUSEWHEEL_LOW
 #   ifdef FEAT_GUI
                       && !gui.in_use
 #   endif
+ #   ifdef FEAT_MOUSE_GPM
+                       && gpm_flag == 0
+ #   endif
                       )
               {
                   /* Keep the mouse_code before it's changed, so that we
***************
*** 4355,4361 ****
           {
 # ifdef CHECK_DOUBLE_CLICK
 #  ifdef FEAT_MOUSE_GPM
-               extern int gpm_flag; /* gpm library variable */
 #   ifdef FEAT_GUI
               /*
                * Only for Unix, when GUI or gpm is not active, we handle
--- 4362,4367 ----
*** ../vim60ax.6/src/version.c  Fri Sep 21 10:21:46 2001
--- src/version.c       Fri Sep 21 11:56:46 2001
***************
*** 608,609 ****
--- 608,611 ----
 {   /* Add new patch number below this line */
+ /**/
+     7,
 /**/

--
ARTHUR:          But if he was dying, he wouldn't bother to carve
                "Aaaaarrrrrrggghhh".  He'd just say it.
BROTHER MAYNARD: It's down there carved in stone.
GALAHAD:         Perhaps he was dictating.
                "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

///  Bram Moolenaar -- [email protected] -- http://www.moolenaar.net  \\\
(((   Creator of Vim -- http://vim.sf.net -- ftp://ftp.vim.org/pub/vim   )))
\\\  Help me helping AIDS orphans in Uganda - http://iccf-holland.org  ///