summaryrefslogtreecommitdiff
blob: fd712371800966265ecb1aa4c1112e60a9a0bd2f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
To: vim-dev@vim.org
Subject: Patch 6.1.054
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
------------

Patch 6.1.054
Problem:    GUI: A mouse click is not recognized at the more prompt, even when
	    'mouse' includes 'r'.
Solution:   Recognize a mouse click at the more prompt.
	    Also accept a mouse click in the last line in the GUI.
	    Add "ml" entry in 'mouseshape'.
Files:	    src/gui.c, src/message.c, src/misc1.c, src/misc2.c, src/option.c,
	    src/structs.h


*** ../vim61.053/src/gui.c	Sat May  4 22:23:07 2002
--- src/gui.c	Sun May  5 21:48:29 2002
***************
*** 2515,2521 ****
  #endif
  	case INSERT:
  	case INSERT+LANGMAP:	checkfor = MOUSE_INSERT;	break;
! 	case HITRETURN:		checkfor = MOUSE_RETURN;	break;
  
  	    /*
  	     * On the command line, use the clipboard selection on all lines
--- 2515,2528 ----
  #endif
  	case INSERT:
  	case INSERT+LANGMAP:	checkfor = MOUSE_INSERT;	break;
! 	case ASKMORE:
! 	case HITRETURN:		/* At the more- and hit-enter prompt pass the
! 				   mouse event for a click on the last line. */
! 				if (Y_2_ROW(y) == Rows - 1)
! 				    checkfor = MOUSE_NORMAL;
! 				else
! 				    checkfor = MOUSE_RETURN;
! 				break;
  
  	    /*
  	     * On the command line, use the clipboard selection on all lines
***************
*** 3868,3874 ****
      wp = mouse_find_win(&row, &col);
  # ifdef FEAT_MOUSESHAPE
      if (State == HITRETURN || State == ASKMORE)
! 	update_mouseshape(SHAPE_IDX_MORE);
      else if (row > wp->w_height)	/* below status line */
  	update_mouseshape(SHAPE_IDX_CLINE);
  #  ifdef FEAT_VERTSPLIT
--- 3875,3886 ----
      wp = mouse_find_win(&row, &col);
  # ifdef FEAT_MOUSESHAPE
      if (State == HITRETURN || State == ASKMORE)
!     {
! 	if (Y_2_ROW(y) == Rows - 1)
! 	    update_mouseshape(SHAPE_IDX_MOREL);
! 	else
! 	    update_mouseshape(SHAPE_IDX_MORE);
!     }
      else if (row > wp->w_height)	/* below status line */
  	update_mouseshape(SHAPE_IDX_CLINE);
  #  ifdef FEAT_VERTSPLIT
*** ../vim61.053/src/message.c	Mon Apr 29 22:57:48 2002
--- src/message.c	Sun May  5 21:07:23 2002
***************
*** 792,797 ****
--- 792,798 ----
  				|| c == K_RIGHTDRAG  || c == K_RIGHTRELEASE
  				|| c == K_MOUSEDOWN  || c == K_MOUSEUP
  				|| (!mouse_has(MOUSE_RETURN)
+ 				    && mouse_row != Rows - 1
  				    && (c == K_LEFTMOUSE
  					|| c == K_MIDDLEMOUSE
  					|| c == K_RIGHTMOUSE))
***************
*** 1748,1753 ****
--- 1749,1755 ----
  			/*FALLTHROUGH*/
  		    case ' ':		/* one extra page */
  		    case K_PAGEDOWN:
+ 		    case K_LEFTMOUSE:
  			lines_left = Rows - 1;
  			break;
  
*** ../vim61.053/src/misc1.c	Wed May  1 19:40:35 2002
--- src/misc1.c	Sun May  5 21:26:11 2002
***************
*** 2531,2537 ****
  
  /*
   * Get a key stroke directly from the user.
!  * Ignores mouse clicks and scrollbar events.
   * Doesn't use vgetc(), because it syncs undo and eats mapped characters.
   * Disadvantage: typeahead is ignored.
   * Translates the interrupt character for unix to ESC.
--- 2531,2538 ----
  
  /*
   * Get a key stroke directly from the user.
!  * Ignores mouse clicks and scrollbar events, except a click for the left
!  * button (used at the more prompt).
   * Doesn't use vgetc(), because it syncs undo and eats mapped characters.
   * Disadvantage: typeahead is ignored.
   * Translates the interrupt character for unix to ESC.
***************
*** 2579,2597 ****
  	    if (buf[1] == KS_MODIFIER
  		    || n == K_IGNORE
  #ifdef FEAT_MOUSE
- 		    || n == K_LEFTMOUSE
  		    || n == K_LEFTMOUSE_NM
  		    || n == K_LEFTDRAG
! 		    || n ==  K_LEFTRELEASE
! 		    || n ==  K_LEFTRELEASE_NM
! 		    || n ==  K_MIDDLEMOUSE
! 		    || n ==  K_MIDDLEDRAG
! 		    || n ==  K_MIDDLERELEASE
! 		    || n ==  K_RIGHTMOUSE
! 		    || n ==  K_RIGHTDRAG
! 		    || n ==  K_RIGHTRELEASE
! 		    || n ==  K_MOUSEDOWN
! 		    || n ==  K_MOUSEUP
  # ifdef FEAT_GUI
  		    || n == K_VER_SCROLLBAR
  		    || n == K_HOR_SCROLLBAR
--- 2580,2597 ----
  	    if (buf[1] == KS_MODIFIER
  		    || n == K_IGNORE
  #ifdef FEAT_MOUSE
  		    || n == K_LEFTMOUSE_NM
  		    || n == K_LEFTDRAG
! 		    || n == K_LEFTRELEASE
! 		    || n == K_LEFTRELEASE_NM
! 		    || n == K_MIDDLEMOUSE
! 		    || n == K_MIDDLEDRAG
! 		    || n == K_MIDDLERELEASE
! 		    || n == K_RIGHTMOUSE
! 		    || n == K_RIGHTDRAG
! 		    || n == K_RIGHTRELEASE
! 		    || n == K_MOUSEDOWN
! 		    || n == K_MOUSEUP
  # ifdef FEAT_GUI
  		    || n == K_VER_SCROLLBAR
  		    || n == K_HOR_SCROLLBAR
*** ../vim61.053/src/misc2.c	Sun May  5 14:29:43 2002
--- src/misc2.c	Sun May  5 21:48:59 2002
***************
*** 2674,2679 ****
--- 2674,2680 ----
      {0,	0, 0,   0L,   0L,   0L, 0, 0, "vs", SHAPE_MOUSE},
      {0,	0, 0,   0L,   0L,   0L, 0, 0, "vd", SHAPE_MOUSE},
      {0,	0, 0,   0L,   0L,   0L, 0, 0, "m", SHAPE_MOUSE},
+     {0,	0, 0,   0L,   0L,   0L, 0, 0, "ml", SHAPE_MOUSE},
      {0,	0, 0, 100L, 100L, 100L, 0, 0, "sm", SHAPE_CURSOR},
  };
  
***************
*** 2960,2966 ****
--- 2961,2973 ----
  {
  #ifdef FEAT_MOUSESHAPE
      if (mouse && (State == HITRETURN || State == ASKMORE))
+     {
+ # ifdef FEAT_GUI
+ 	if (Y_2_ROW(gui_mch_get_mouse_y()) == Rows - 1)
+ 	    return SHAPE_IDX_MOREL;
+ # endif
  	return SHAPE_IDX_MORE;
+     }
      if (mouse && drag_status_line)
  	return SHAPE_IDX_SDRAG;
  # ifdef FEAT_VERTSPLIT
*** ../vim61.053/src/option.c	Tue Apr  9 21:34:55 2002
--- src/option.c	Sun May  5 21:44:55 2002
***************
*** 1436,1442 ****
      {"mouseshape",  "mouses",  P_STRING|P_VI_DEF|P_COMMA|P_NODUP,
  #ifdef FEAT_MOUSESHAPE
  			    (char_u *)&p_mouseshape, PV_NONE,
! 			    {(char_u *)"i-r:beam,s:updown,sd:udsizing,vs:leftright,vd:lrsizing,m:no,v:rightup-arrow", (char_u *)0L}
  #else
  			    (char_u *)NULL, PV_NONE,
  			    {(char_u *)NULL, (char_u *)0L}
--- 1436,1442 ----
      {"mouseshape",  "mouses",  P_STRING|P_VI_DEF|P_COMMA|P_NODUP,
  #ifdef FEAT_MOUSESHAPE
  			    (char_u *)&p_mouseshape, PV_NONE,
! 			    {(char_u *)"i-r:beam,s:updown,sd:udsizing,vs:leftright,vd:lrsizing,m:no,ml:up-arrow,v:rightup-arrow", (char_u *)0L}
  #else
  			    (char_u *)NULL, PV_NONE,
  			    {(char_u *)NULL, (char_u *)0L}
*** ../vim61.053/src/structs.h	Fri Feb 22 16:58:41 2002
--- src/structs.h	Sun May  5 21:46:09 2002
***************
*** 1487,1494 ****
  #define SHAPE_IDX_VSEP	12	/* A vertical separator line */
  #define SHAPE_IDX_VDRAG 13	/* dragging a vertical separator line */
  #define SHAPE_IDX_MORE	14	/* Hit-return or More */
! #define SHAPE_IDX_SM	15	/* showing matching paren */
! #define SHAPE_IDX_COUNT	16
  
  #define SHAPE_BLOCK	0	/* block cursor */
  #define SHAPE_HOR	1	/* horizontal bar cursor */
--- 1487,1495 ----
  #define SHAPE_IDX_VSEP	12	/* A vertical separator line */
  #define SHAPE_IDX_VDRAG 13	/* dragging a vertical separator line */
  #define SHAPE_IDX_MORE	14	/* Hit-return or More */
! #define SHAPE_IDX_MOREL	15	/* Hit-return or More in last line */
! #define SHAPE_IDX_SM	16	/* showing matching paren */
! #define SHAPE_IDX_COUNT	17
  
  #define SHAPE_BLOCK	0	/* block cursor */
  #define SHAPE_HOR	1	/* horizontal bar cursor */
*** ../vim61.053/src/version.c	Sun May  5 19:05:22 2002
--- src/version.c	Sun May  5 22:46:36 2002
***************
*** 608,609 ****
--- 608,611 ----
  {   /* Add new patch number below this line */
+ /**/
+     54,
  /**/

-- 
No children may attend school with their breath smelling of "wild onions."
		[real standing law in West Virginia, United States of America]

 ///  Bram Moolenaar -- Bram@moolenaar.net -- http://www.moolenaar.net  \\\
///   Creator of Vim -- http://vim.sf.net -- ftp://ftp.vim.org/pub/vim   \\\
\\\           Project leader for A-A-P -- http://www.a-a-p.org           ///
 \\\  Help me helping AIDS orphans in Uganda - http://iccf-holland.org  ///