home *** CD-ROM | disk | FTP | other *** search
/ vim.ftp.fu-berlin.de / 2015-02-03.vim.ftp.fu-berlin.de.tar / vim.ftp.fu-berlin.de / patches / 6.1.054 < prev    next >
Encoding:
Internet Message Format  |  2002-05-04  |  7.7 KB

  1. To: vim-dev@vim.org
  2. Subject: Patch 6.1.054
  3. Fcc: outbox
  4. From: Bram Moolenaar <Bram@moolenaar.net>
  5. MIME-Version: 1.0
  6. Content-Type: text/plain; charset=ISO-8859-1
  7. Content-Transfer-Encoding: 8bit
  8. ------------
  9.  
  10. Patch 6.1.054
  11. Problem:    GUI: A mouse click is not recognized at the more prompt, even when
  12.         'mouse' includes 'r'.
  13. Solution:   Recognize a mouse click at the more prompt.
  14.         Also accept a mouse click in the last line in the GUI.
  15.         Add "ml" entry in 'mouseshape'.
  16. Files:        src/gui.c, src/message.c, src/misc1.c, src/misc2.c, src/option.c,
  17.         src/structs.h
  18.  
  19.  
  20. *** ../vim61.053/src/gui.c    Sat May  4 22:23:07 2002
  21. --- src/gui.c    Sun May  5 21:48:29 2002
  22. ***************
  23. *** 2515,2521 ****
  24.   #endif
  25.       case INSERT:
  26.       case INSERT+LANGMAP:    checkfor = MOUSE_INSERT;    break;
  27. !     case HITRETURN:        checkfor = MOUSE_RETURN;    break;
  28.   
  29.           /*
  30.            * On the command line, use the clipboard selection on all lines
  31. --- 2515,2528 ----
  32.   #endif
  33.       case INSERT:
  34.       case INSERT+LANGMAP:    checkfor = MOUSE_INSERT;    break;
  35. !     case ASKMORE:
  36. !     case HITRETURN:        /* At the more- and hit-enter prompt pass the
  37. !                    mouse event for a click on the last line. */
  38. !                 if (Y_2_ROW(y) == Rows - 1)
  39. !                     checkfor = MOUSE_NORMAL;
  40. !                 else
  41. !                     checkfor = MOUSE_RETURN;
  42. !                 break;
  43.   
  44.           /*
  45.            * On the command line, use the clipboard selection on all lines
  46. ***************
  47. *** 3868,3874 ****
  48.       wp = mouse_find_win(&row, &col);
  49.   # ifdef FEAT_MOUSESHAPE
  50.       if (State == HITRETURN || State == ASKMORE)
  51. !     update_mouseshape(SHAPE_IDX_MORE);
  52.       else if (row > wp->w_height)    /* below status line */
  53.       update_mouseshape(SHAPE_IDX_CLINE);
  54.   #  ifdef FEAT_VERTSPLIT
  55. --- 3875,3886 ----
  56.       wp = mouse_find_win(&row, &col);
  57.   # ifdef FEAT_MOUSESHAPE
  58.       if (State == HITRETURN || State == ASKMORE)
  59. !     {
  60. !     if (Y_2_ROW(y) == Rows - 1)
  61. !         update_mouseshape(SHAPE_IDX_MOREL);
  62. !     else
  63. !         update_mouseshape(SHAPE_IDX_MORE);
  64. !     }
  65.       else if (row > wp->w_height)    /* below status line */
  66.       update_mouseshape(SHAPE_IDX_CLINE);
  67.   #  ifdef FEAT_VERTSPLIT
  68. *** ../vim61.053/src/message.c    Mon Apr 29 22:57:48 2002
  69. --- src/message.c    Sun May  5 21:07:23 2002
  70. ***************
  71. *** 792,797 ****
  72. --- 792,798 ----
  73.                   || c == K_RIGHTDRAG  || c == K_RIGHTRELEASE
  74.                   || c == K_MOUSEDOWN  || c == K_MOUSEUP
  75.                   || (!mouse_has(MOUSE_RETURN)
  76. +                     && mouse_row != Rows - 1
  77.                       && (c == K_LEFTMOUSE
  78.                       || c == K_MIDDLEMOUSE
  79.                       || c == K_RIGHTMOUSE))
  80. ***************
  81. *** 1748,1753 ****
  82. --- 1749,1755 ----
  83.               /*FALLTHROUGH*/
  84.               case ' ':        /* one extra page */
  85.               case K_PAGEDOWN:
  86. +             case K_LEFTMOUSE:
  87.               lines_left = Rows - 1;
  88.               break;
  89.   
  90. *** ../vim61.053/src/misc1.c    Wed May  1 19:40:35 2002
  91. --- src/misc1.c    Sun May  5 21:26:11 2002
  92. ***************
  93. *** 2531,2537 ****
  94.   
  95.   /*
  96.    * Get a key stroke directly from the user.
  97. !  * Ignores mouse clicks and scrollbar events.
  98.    * Doesn't use vgetc(), because it syncs undo and eats mapped characters.
  99.    * Disadvantage: typeahead is ignored.
  100.    * Translates the interrupt character for unix to ESC.
  101. --- 2531,2538 ----
  102.   
  103.   /*
  104.    * Get a key stroke directly from the user.
  105. !  * Ignores mouse clicks and scrollbar events, except a click for the left
  106. !  * button (used at the more prompt).
  107.    * Doesn't use vgetc(), because it syncs undo and eats mapped characters.
  108.    * Disadvantage: typeahead is ignored.
  109.    * Translates the interrupt character for unix to ESC.
  110. ***************
  111. *** 2579,2597 ****
  112.           if (buf[1] == KS_MODIFIER
  113.               || n == K_IGNORE
  114.   #ifdef FEAT_MOUSE
  115. -             || n == K_LEFTMOUSE
  116.               || n == K_LEFTMOUSE_NM
  117.               || n == K_LEFTDRAG
  118. !             || n ==  K_LEFTRELEASE
  119. !             || n ==  K_LEFTRELEASE_NM
  120. !             || n ==  K_MIDDLEMOUSE
  121. !             || n ==  K_MIDDLEDRAG
  122. !             || n ==  K_MIDDLERELEASE
  123. !             || n ==  K_RIGHTMOUSE
  124. !             || n ==  K_RIGHTDRAG
  125. !             || n ==  K_RIGHTRELEASE
  126. !             || n ==  K_MOUSEDOWN
  127. !             || n ==  K_MOUSEUP
  128.   # ifdef FEAT_GUI
  129.               || n == K_VER_SCROLLBAR
  130.               || n == K_HOR_SCROLLBAR
  131. --- 2580,2597 ----
  132.           if (buf[1] == KS_MODIFIER
  133.               || n == K_IGNORE
  134.   #ifdef FEAT_MOUSE
  135.               || n == K_LEFTMOUSE_NM
  136.               || n == K_LEFTDRAG
  137. !             || n == K_LEFTRELEASE
  138. !             || n == K_LEFTRELEASE_NM
  139. !             || n == K_MIDDLEMOUSE
  140. !             || n == K_MIDDLEDRAG
  141. !             || n == K_MIDDLERELEASE
  142. !             || n == K_RIGHTMOUSE
  143. !             || n == K_RIGHTDRAG
  144. !             || n == K_RIGHTRELEASE
  145. !             || n == K_MOUSEDOWN
  146. !             || n == K_MOUSEUP
  147.   # ifdef FEAT_GUI
  148.               || n == K_VER_SCROLLBAR
  149.               || n == K_HOR_SCROLLBAR
  150. *** ../vim61.053/src/misc2.c    Sun May  5 14:29:43 2002
  151. --- src/misc2.c    Sun May  5 21:48:59 2002
  152. ***************
  153. *** 2674,2679 ****
  154. --- 2674,2680 ----
  155.       {0,    0, 0,   0L,   0L,   0L, 0, 0, "vs", SHAPE_MOUSE},
  156.       {0,    0, 0,   0L,   0L,   0L, 0, 0, "vd", SHAPE_MOUSE},
  157.       {0,    0, 0,   0L,   0L,   0L, 0, 0, "m", SHAPE_MOUSE},
  158. +     {0,    0, 0,   0L,   0L,   0L, 0, 0, "ml", SHAPE_MOUSE},
  159.       {0,    0, 0, 100L, 100L, 100L, 0, 0, "sm", SHAPE_CURSOR},
  160.   };
  161.   
  162. ***************
  163. *** 2960,2966 ****
  164. --- 2961,2973 ----
  165.   {
  166.   #ifdef FEAT_MOUSESHAPE
  167.       if (mouse && (State == HITRETURN || State == ASKMORE))
  168. +     {
  169. + # ifdef FEAT_GUI
  170. +     if (Y_2_ROW(gui_mch_get_mouse_y()) == Rows - 1)
  171. +         return SHAPE_IDX_MOREL;
  172. + # endif
  173.       return SHAPE_IDX_MORE;
  174. +     }
  175.       if (mouse && drag_status_line)
  176.       return SHAPE_IDX_SDRAG;
  177.   # ifdef FEAT_VERTSPLIT
  178. *** ../vim61.053/src/option.c    Tue Apr  9 21:34:55 2002
  179. --- src/option.c    Sun May  5 21:44:55 2002
  180. ***************
  181. *** 1436,1442 ****
  182.       {"mouseshape",  "mouses",  P_STRING|P_VI_DEF|P_COMMA|P_NODUP,
  183.   #ifdef FEAT_MOUSESHAPE
  184.                   (char_u *)&p_mouseshape, PV_NONE,
  185. !                 {(char_u *)"i-r:beam,s:updown,sd:udsizing,vs:leftright,vd:lrsizing,m:no,v:rightup-arrow", (char_u *)0L}
  186.   #else
  187.                   (char_u *)NULL, PV_NONE,
  188.                   {(char_u *)NULL, (char_u *)0L}
  189. --- 1436,1442 ----
  190.       {"mouseshape",  "mouses",  P_STRING|P_VI_DEF|P_COMMA|P_NODUP,
  191.   #ifdef FEAT_MOUSESHAPE
  192.                   (char_u *)&p_mouseshape, PV_NONE,
  193. !                 {(char_u *)"i-r:beam,s:updown,sd:udsizing,vs:leftright,vd:lrsizing,m:no,ml:up-arrow,v:rightup-arrow", (char_u *)0L}
  194.   #else
  195.                   (char_u *)NULL, PV_NONE,
  196.                   {(char_u *)NULL, (char_u *)0L}
  197. *** ../vim61.053/src/structs.h    Fri Feb 22 16:58:41 2002
  198. --- src/structs.h    Sun May  5 21:46:09 2002
  199. ***************
  200. *** 1487,1494 ****
  201.   #define SHAPE_IDX_VSEP    12    /* A vertical separator line */
  202.   #define SHAPE_IDX_VDRAG 13    /* dragging a vertical separator line */
  203.   #define SHAPE_IDX_MORE    14    /* Hit-return or More */
  204. ! #define SHAPE_IDX_SM    15    /* showing matching paren */
  205. ! #define SHAPE_IDX_COUNT    16
  206.   
  207.   #define SHAPE_BLOCK    0    /* block cursor */
  208.   #define SHAPE_HOR    1    /* horizontal bar cursor */
  209. --- 1487,1495 ----
  210.   #define SHAPE_IDX_VSEP    12    /* A vertical separator line */
  211.   #define SHAPE_IDX_VDRAG 13    /* dragging a vertical separator line */
  212.   #define SHAPE_IDX_MORE    14    /* Hit-return or More */
  213. ! #define SHAPE_IDX_MOREL    15    /* Hit-return or More in last line */
  214. ! #define SHAPE_IDX_SM    16    /* showing matching paren */
  215. ! #define SHAPE_IDX_COUNT    17
  216.   
  217.   #define SHAPE_BLOCK    0    /* block cursor */
  218.   #define SHAPE_HOR    1    /* horizontal bar cursor */
  219. *** ../vim61.053/src/version.c    Sun May  5 19:05:22 2002
  220. --- src/version.c    Sun May  5 22:46:36 2002
  221. ***************
  222. *** 608,609 ****
  223. --- 608,611 ----
  224.   {   /* Add new patch number below this line */
  225. + /**/
  226. +     54,
  227.   /**/
  228.  
  229. -- 
  230. No children may attend school with their breath smelling of "wild onions."
  231.         [real standing law in West Virginia, United States of America]
  232.  
  233.  ///  Bram Moolenaar -- Bram@moolenaar.net -- http://www.moolenaar.net  \\\
  234. ///   Creator of Vim -- http://vim.sf.net -- ftp://ftp.vim.org/pub/vim   \\\
  235. \\\           Project leader for A-A-P -- http://www.a-a-p.org           ///
  236.  \\\  Help me helping AIDS orphans in Uganda - http://iccf-holland.org  ///
  237.