]>
Commit | Line | Data |
---|---|---|
8bb52fd3 ER |
1 | To: vim_dev@googlegroups.com |
2 | Subject: Patch 7.3.597 | |
3 | Fcc: outbox | |
4 | From: Bram Moolenaar <Bram@moolenaar.net> | |
5 | Mime-Version: 1.0 | |
6 | Content-Type: text/plain; charset=UTF-8 | |
7 | Content-Transfer-Encoding: 8bit | |
8 | ------------ | |
9 | ||
10 | Patch 7.3.597 | |
11 | Problem: 'clipboard' "autoselect" only applies to the * register. (Sergey | |
12 | Vakulenko) | |
13 | Solution: Make 'autoselect' work for the + register. (Christian Brabant) | |
14 | Add the "autoselectplus" option in 'clipboard' and the "P" flag in | |
15 | 'guioptions'. | |
16 | Files: runtime/doc/options.txt, src/normal.c, src/ops.c, src/screen.c, | |
17 | src/ui.c, src/globals.h, src/proto/ui.pro, src/option.h, src/gui.c | |
18 | ||
19 | ||
20 | *** ../vim-7.3.596/runtime/doc/options.txt 2012-02-20 22:18:23.000000000 +0100 | |
21 | --- runtime/doc/options.txt 2012-07-10 15:40:35.000000000 +0200 | |
22 | *************** | |
23 | *** 1437,1442 **** | |
24 | --- 1452,1458 ---- | |
25 | This option is a list of comma separated names. | |
26 | These names are recognized: | |
27 | ||
28 | + *clipboard-unnamed* | |
29 | unnamed When included, Vim will use the clipboard register '*' | |
30 | for all yank, delete, change and put operations which | |
31 | would normally go to the unnamed register. When a | |
32 | *************** | |
33 | *** 1446,1460 **** | |
34 | explicitly accessed using the "* notation. Also see | |
35 | |gui-clipboard|. | |
36 | ||
37 | unnamedplus A variant of "unnamed" flag which uses the clipboard | |
38 | register '+' (|quoteplus|) instead of register '*' for | |
39 | all operations except yank. Yank shall copy the text | |
40 | into register '+' and also into '*' when "unnamed" is | |
41 | included. | |
42 | ! Only available with the |+x11| feature. | |
43 | Availability can be checked with: > | |
44 | if has('unnamedplus') | |
45 | < | |
46 | autoselect Works like the 'a' flag in 'guioptions': If present, | |
47 | then whenever Visual mode is started, or the Visual | |
48 | area extended, Vim tries to become the owner of the | |
49 | --- 1462,1478 ---- | |
50 | explicitly accessed using the "* notation. Also see | |
51 | |gui-clipboard|. | |
52 | ||
53 | + *clipboard-unnamedplus* | |
54 | unnamedplus A variant of "unnamed" flag which uses the clipboard | |
55 | register '+' (|quoteplus|) instead of register '*' for | |
56 | all operations except yank. Yank shall copy the text | |
57 | into register '+' and also into '*' when "unnamed" is | |
58 | included. | |
59 | ! Only available with the |+X11| feature. | |
60 | Availability can be checked with: > | |
61 | if has('unnamedplus') | |
62 | < | |
63 | + *clipboard-autoselect* | |
64 | autoselect Works like the 'a' flag in 'guioptions': If present, | |
65 | then whenever Visual mode is started, or the Visual | |
66 | area extended, Vim tries to become the owner of the | |
67 | *************** | |
68 | *** 1466,1474 **** | |
69 | --- 1484,1499 ---- | |
70 | "autoselect" flag is used. | |
71 | Also applies to the modeless selection. | |
72 | ||
73 | + *clipboard-autoselectplus* | |
74 | + autoselectplus Like "autoselect" but using the + register instead of | |
75 | + the * register. Compare to the 'P' flag in | |
76 | + 'guioptions'. | |
77 | + | |
78 | + *clipboard-autoselectml* | |
79 | autoselectml Like "autoselect", but for the modeless selection | |
80 | only. Compare to the 'A' flag in 'guioptions'. | |
81 | ||
82 | + *clipboard-html* | |
83 | html When the clipboard contains HTML, use this when | |
84 | pasting. When putting text on the clipboard, mark it | |
85 | as HTML. This works to copy rendered HTML from | |
86 | *************** | |
87 | *** 1479,1484 **** | |
88 | --- 1504,1510 ---- | |
89 | Only supported for GTK version 2 and later. | |
90 | Only available with the |+multi_byte| feature. | |
91 | ||
92 | + *clipboard-exclude* | |
93 | exclude:{pattern} | |
94 | Defines a pattern that is matched against the name of | |
95 | the terminal 'term'. If there is a match, no | |
96 | *************** | |
97 | *** 3547,3552 **** | |
98 | --- 3600,3608 ---- | |
99 | windowing system's global selection unless explicitly told to | |
100 | by a yank or delete operation for the "* register. | |
101 | The same applies to the modeless selection. | |
102 | + *'go-P'* | |
103 | + 'P' Like autoselect but using the "+ register instead of the "* | |
104 | + register. | |
105 | *'go-A'* | |
106 | 'A' Autoselect for the modeless selection. Like 'a', but only | |
107 | applies to the modeless selection. | |
108 | *** ../vim-7.3.596/src/normal.c 2012-06-29 13:56:01.000000000 +0200 | |
109 | --- src/normal.c 2012-07-10 15:44:24.000000000 +0200 | |
110 | *************** | |
111 | *** 1451,1457 **** | |
112 | * This could call do_pending_operator() recursively, but that's OK | |
113 | * because gui_yank will be TRUE for the nested call. | |
114 | */ | |
115 | ! if (clip_star.available | |
116 | && oap->op_type != OP_NOP | |
117 | && !gui_yank | |
118 | # ifdef FEAT_VISUAL | |
119 | --- 1451,1457 ---- | |
120 | * This could call do_pending_operator() recursively, but that's OK | |
121 | * because gui_yank will be TRUE for the nested call. | |
122 | */ | |
123 | ! if ((clip_star.available || clip_plus.available) | |
124 | && oap->op_type != OP_NOP | |
125 | && !gui_yank | |
126 | # ifdef FEAT_VISUAL | |
127 | *** ../vim-7.3.596/src/ops.c 2012-06-29 13:34:15.000000000 +0200 | |
128 | --- src/ops.c 2012-07-10 16:20:29.000000000 +0200 | |
129 | *************** | |
130 | *** 962,969 **** | |
131 | * selection too. */ | |
132 | if (name == '*' && clip_star.available) | |
133 | { | |
134 | ! if (clip_isautosel()) | |
135 | ! clip_update_selection(); | |
136 | may_get_selection(name); | |
137 | } | |
138 | #endif | |
139 | --- 962,975 ---- | |
140 | * selection too. */ | |
141 | if (name == '*' && clip_star.available) | |
142 | { | |
143 | ! if (clip_isautosel_star()) | |
144 | ! clip_update_selection(&clip_star); | |
145 | ! may_get_selection(name); | |
146 | ! } | |
147 | ! if (name == '+' && clip_plus.available) | |
148 | ! { | |
149 | ! if (clip_isautosel_plus()) | |
150 | ! clip_update_selection(&clip_plus); | |
151 | may_get_selection(name); | |
152 | } | |
153 | #endif | |
154 | *************** | |
155 | *** 3190,3196 **** | |
156 | ||
157 | clip_own_selection(&clip_plus); | |
158 | clip_gen_set_selection(&clip_plus); | |
159 | ! if (!clip_isautosel() && !did_star && curr == &(y_regs[PLUS_REGISTER])) | |
160 | { | |
161 | copy_yank_reg(&(y_regs[STAR_REGISTER])); | |
162 | clip_own_selection(&clip_star); | |
163 | --- 3196,3203 ---- | |
164 | ||
165 | clip_own_selection(&clip_plus); | |
166 | clip_gen_set_selection(&clip_plus); | |
167 | ! if (!clip_isautosel_star() && !did_star | |
168 | ! && curr == &(y_regs[PLUS_REGISTER])) | |
169 | { | |
170 | copy_yank_reg(&(y_regs[STAR_REGISTER])); | |
171 | clip_own_selection(&clip_star); | |
172 | *** ../vim-7.3.596/src/screen.c 2012-06-13 18:06:32.000000000 +0200 | |
173 | --- src/screen.c 2012-07-10 16:39:01.000000000 +0200 | |
174 | *************** | |
175 | *** 519,526 **** | |
176 | # endif | |
177 | # ifdef FEAT_CLIPBOARD | |
178 | /* When Visual area changed, may have to update selection. */ | |
179 | ! if (clip_star.available && clip_isautosel()) | |
180 | ! clip_update_selection(); | |
181 | # endif | |
182 | #ifdef FEAT_GUI | |
183 | /* Remove the cursor before starting to do anything, because | |
184 | --- 519,528 ---- | |
185 | # endif | |
186 | # ifdef FEAT_CLIPBOARD | |
187 | /* When Visual area changed, may have to update selection. */ | |
188 | ! if (clip_star.available && clip_isautosel_star()) | |
189 | ! clip_update_selection(&clip_star); | |
190 | ! if (clip_plus.available && clip_isautosel_plus()) | |
191 | ! clip_update_selection(&clip_plus); | |
192 | # endif | |
193 | #ifdef FEAT_GUI | |
194 | /* Remove the cursor before starting to do anything, because | |
195 | *************** | |
196 | *** 814,821 **** | |
197 | ||
198 | #ifdef FEAT_CLIPBOARD | |
199 | /* When Visual area changed, may have to update selection. */ | |
200 | ! if (clip_star.available && clip_isautosel()) | |
201 | ! clip_update_selection(); | |
202 | #endif | |
203 | ||
204 | win_update(wp); | |
205 | --- 816,825 ---- | |
206 | ||
207 | #ifdef FEAT_CLIPBOARD | |
208 | /* When Visual area changed, may have to update selection. */ | |
209 | ! if (clip_star.available && clip_isautosel_star()) | |
210 | ! clip_update_selection(&clip_star); | |
211 | ! if (clip_plus.available && clip_isautosel_plus()) | |
212 | ! clip_update_selection(&clip_plus); | |
213 | #endif | |
214 | ||
215 | win_update(wp); | |
216 | *************** | |
217 | *** 3000,3006 **** | |
218 | area_highlighting = TRUE; | |
219 | attr = hl_attr(HLF_V); | |
220 | #if defined(FEAT_CLIPBOARD) && defined(FEAT_X11) | |
221 | ! if (clip_star.available && !clip_star.owned && clip_isautosel()) | |
222 | attr = hl_attr(HLF_VNC); | |
223 | #endif | |
224 | } | |
225 | --- 3004,3013 ---- | |
226 | area_highlighting = TRUE; | |
227 | attr = hl_attr(HLF_V); | |
228 | #if defined(FEAT_CLIPBOARD) && defined(FEAT_X11) | |
229 | ! if ((clip_star.available && !clip_star.owned | |
230 | ! && clip_isautosel_star()) | |
231 | ! || (clip_plus.available && !clip_plus.owned | |
232 | ! && clip_isautosel_plus())) | |
233 | attr = hl_attr(HLF_VNC); | |
234 | #endif | |
235 | } | |
236 | *************** | |
237 | *** 9060,9066 **** | |
238 | || (wp != NULL && wp->w_width != Columns) | |
239 | # endif | |
240 | ) | |
241 | ! clip_clear_selection(); | |
242 | else | |
243 | clip_scroll_selection(-line_count); | |
244 | #endif | |
245 | --- 9067,9073 ---- | |
246 | || (wp != NULL && wp->w_width != Columns) | |
247 | # endif | |
248 | ) | |
249 | ! clip_clear_selection(&clip_star); | |
250 | else | |
251 | clip_scroll_selection(-line_count); | |
252 | #endif | |
253 | *************** | |
254 | *** 9281,9287 **** | |
255 | || (wp != NULL && wp->w_width != Columns) | |
256 | # endif | |
257 | ) | |
258 | ! clip_clear_selection(); | |
259 | else | |
260 | clip_scroll_selection(line_count); | |
261 | #endif | |
262 | --- 9288,9294 ---- | |
263 | || (wp != NULL && wp->w_width != Columns) | |
264 | # endif | |
265 | ) | |
266 | ! clip_clear_selection(&clip_star); | |
267 | else | |
268 | clip_scroll_selection(line_count); | |
269 | #endif | |
270 | *** ../vim-7.3.596/src/ui.c 2012-02-12 01:35:06.000000000 +0100 | |
271 | --- src/ui.c 2012-07-10 16:43:17.000000000 +0200 | |
272 | *************** | |
273 | *** 381,386 **** | |
274 | --- 381,388 ---- | |
275 | ||
276 | #if defined(FEAT_CLIPBOARD) || defined(PROTO) | |
277 | ||
278 | + static void clip_copy_selection __ARGS((VimClipboard *clip)); | |
279 | + | |
280 | /* | |
281 | * Selection stuff using Visual mode, for cutting and pasting text to other | |
282 | * windows. | |
283 | *************** | |
284 | *** 423,431 **** | |
285 | * this is called whenever VIsual mode is ended. | |
286 | */ | |
287 | void | |
288 | ! clip_update_selection() | |
289 | { | |
290 | ! pos_T start, end; | |
291 | ||
292 | /* If visual mode is only due to a redo command ("."), then ignore it */ | |
293 | if (!redo_VIsual_busy && VIsual_active && (State & NORMAL)) | |
294 | --- 425,434 ---- | |
295 | * this is called whenever VIsual mode is ended. | |
296 | */ | |
297 | void | |
298 | ! clip_update_selection(clip) | |
299 | ! VimClipboard *clip; | |
300 | { | |
301 | ! pos_T start, end; | |
302 | ||
303 | /* If visual mode is only due to a redo command ("."), then ignore it */ | |
304 | if (!redo_VIsual_busy && VIsual_active && (State & NORMAL)) | |
305 | *************** | |
306 | *** 444,460 **** | |
307 | start = curwin->w_cursor; | |
308 | end = VIsual; | |
309 | } | |
310 | ! if (!equalpos(clip_star.start, start) | |
311 | ! || !equalpos(clip_star.end, end) | |
312 | ! || clip_star.vmode != VIsual_mode) | |
313 | { | |
314 | ! clip_clear_selection(); | |
315 | ! clip_star.start = start; | |
316 | ! clip_star.end = end; | |
317 | ! clip_star.vmode = VIsual_mode; | |
318 | ! clip_free_selection(&clip_star); | |
319 | ! clip_own_selection(&clip_star); | |
320 | ! clip_gen_set_selection(&clip_star); | |
321 | } | |
322 | } | |
323 | } | |
324 | --- 447,463 ---- | |
325 | start = curwin->w_cursor; | |
326 | end = VIsual; | |
327 | } | |
328 | ! if (!equalpos(clip->start, start) | |
329 | ! || !equalpos(clip->end, end) | |
330 | ! || clip->vmode != VIsual_mode) | |
331 | { | |
332 | ! clip_clear_selection(clip); | |
333 | ! clip->start = start; | |
334 | ! clip->end = end; | |
335 | ! clip->vmode = VIsual_mode; | |
336 | ! clip_free_selection(clip); | |
337 | ! clip_own_selection(clip); | |
338 | ! clip_gen_set_selection(clip); | |
339 | } | |
340 | } | |
341 | } | |
342 | *************** | |
343 | *** 475,481 **** | |
344 | int was_owned = cbd->owned; | |
345 | ||
346 | cbd->owned = (clip_gen_own_selection(cbd) == OK); | |
347 | ! if (!was_owned && cbd == &clip_star) | |
348 | { | |
349 | /* May have to show a different kind of highlighting for the | |
350 | * selected area. There is no specific redraw command for this, | |
351 | --- 478,484 ---- | |
352 | int was_owned = cbd->owned; | |
353 | ||
354 | cbd->owned = (clip_gen_own_selection(cbd) == OK); | |
355 | ! if (!was_owned && (cbd == &clip_star || cbd == &clip_plus)) | |
356 | { | |
357 | /* May have to show a different kind of highlighting for the | |
358 | * selected area. There is no specific redraw command for this, | |
359 | *************** | |
360 | *** 483,489 **** | |
361 | if (cbd->owned | |
362 | && (get_real_state() == VISUAL | |
363 | || get_real_state() == SELECTMODE) | |
364 | ! && clip_isautosel() | |
365 | && hl_attr(HLF_V) != hl_attr(HLF_VNC)) | |
366 | redraw_curbuf_later(INVERTED_ALL); | |
367 | } | |
368 | --- 486,493 ---- | |
369 | if (cbd->owned | |
370 | && (get_real_state() == VISUAL | |
371 | || get_real_state() == SELECTMODE) | |
372 | ! && (cbd == &clip_star ? clip_isautosel_star() | |
373 | ! : clip_isautosel_plus()) | |
374 | && hl_attr(HLF_V) != hl_attr(HLF_VNC)) | |
375 | redraw_curbuf_later(INVERTED_ALL); | |
376 | } | |
377 | *************** | |
378 | *** 502,513 **** | |
379 | #ifdef FEAT_X11 | |
380 | int was_owned = cbd->owned; | |
381 | #endif | |
382 | ! int visual_selection = (cbd == &clip_star); | |
383 | ||
384 | clip_free_selection(cbd); | |
385 | cbd->owned = FALSE; | |
386 | if (visual_selection) | |
387 | ! clip_clear_selection(); | |
388 | clip_gen_lose_selection(cbd); | |
389 | #ifdef FEAT_X11 | |
390 | if (visual_selection) | |
391 | --- 506,520 ---- | |
392 | #ifdef FEAT_X11 | |
393 | int was_owned = cbd->owned; | |
394 | #endif | |
395 | ! int visual_selection = FALSE; | |
396 | ! | |
397 | ! if (cbd == &clip_star || cbd == &clip_plus) | |
398 | ! visual_selection = TRUE; | |
399 | ||
400 | clip_free_selection(cbd); | |
401 | cbd->owned = FALSE; | |
402 | if (visual_selection) | |
403 | ! clip_clear_selection(cbd); | |
404 | clip_gen_lose_selection(cbd); | |
405 | #ifdef FEAT_X11 | |
406 | if (visual_selection) | |
407 | *************** | |
408 | *** 518,524 **** | |
409 | if (was_owned | |
410 | && (get_real_state() == VISUAL | |
411 | || get_real_state() == SELECTMODE) | |
412 | ! && clip_isautosel() | |
413 | && hl_attr(HLF_V) != hl_attr(HLF_VNC)) | |
414 | { | |
415 | update_curbuf(INVERTED_ALL); | |
416 | --- 525,532 ---- | |
417 | if (was_owned | |
418 | && (get_real_state() == VISUAL | |
419 | || get_real_state() == SELECTMODE) | |
420 | ! && (cbd == &clip_star ? | |
421 | ! clip_isautosel_star() : clip_isautosel_plus()) | |
422 | && hl_attr(HLF_V) != hl_attr(HLF_VNC)) | |
423 | { | |
424 | update_curbuf(INVERTED_ALL); | |
425 | *************** | |
426 | *** 534,551 **** | |
427 | #endif | |
428 | } | |
429 | ||
430 | ! void | |
431 | ! clip_copy_selection() | |
432 | ! { | |
433 | ! if (VIsual_active && (State & NORMAL) && clip_star.available) | |
434 | ! { | |
435 | ! if (clip_isautosel()) | |
436 | ! clip_update_selection(); | |
437 | ! clip_free_selection(&clip_star); | |
438 | ! clip_own_selection(&clip_star); | |
439 | ! if (clip_star.owned) | |
440 | ! clip_get_selection(&clip_star); | |
441 | ! clip_gen_set_selection(&clip_star); | |
442 | } | |
443 | } | |
444 | ||
445 | --- 542,559 ---- | |
446 | #endif | |
447 | } | |
448 | ||
449 | ! static void | |
450 | ! clip_copy_selection(clip) | |
451 | ! VimClipboard *clip; | |
452 | ! { | |
453 | ! if (VIsual_active && (State & NORMAL) && clip->available) | |
454 | ! { | |
455 | ! clip_update_selection(clip); | |
456 | ! clip_free_selection(clip); | |
457 | ! clip_own_selection(clip); | |
458 | ! if (clip->owned) | |
459 | ! clip_get_selection(clip); | |
460 | ! clip_gen_set_selection(clip); | |
461 | } | |
462 | } | |
463 | ||
464 | *************** | |
465 | *** 555,575 **** | |
466 | void | |
467 | clip_auto_select() | |
468 | { | |
469 | ! if (clip_isautosel()) | |
470 | ! clip_copy_selection(); | |
471 | } | |
472 | ||
473 | /* | |
474 | ! * Return TRUE if automatic selection of Visual area is desired. | |
475 | */ | |
476 | int | |
477 | ! clip_isautosel() | |
478 | { | |
479 | return ( | |
480 | #ifdef FEAT_GUI | |
481 | gui.in_use ? (vim_strchr(p_go, GO_ASEL) != NULL) : | |
482 | #endif | |
483 | ! clip_autoselect); | |
484 | } | |
485 | ||
486 | ||
487 | --- 563,600 ---- | |
488 | void | |
489 | clip_auto_select() | |
490 | { | |
491 | ! if (clip_isautosel_star()) | |
492 | ! clip_copy_selection(&clip_star); | |
493 | ! if (clip_isautosel_plus()) | |
494 | ! clip_copy_selection(&clip_plus); | |
495 | } | |
496 | ||
497 | /* | |
498 | ! * Return TRUE if automatic selection of Visual area is desired for the * | |
499 | ! * register. | |
500 | */ | |
501 | int | |
502 | ! clip_isautosel_star() | |
503 | { | |
504 | return ( | |
505 | #ifdef FEAT_GUI | |
506 | gui.in_use ? (vim_strchr(p_go, GO_ASEL) != NULL) : | |
507 | #endif | |
508 | ! clip_autoselect_star); | |
509 | ! } | |
510 | ! | |
511 | ! /* | |
512 | ! * Return TRUE if automatic selection of Visual area is desired for the + | |
513 | ! * register. | |
514 | ! */ | |
515 | ! int | |
516 | ! clip_isautosel_plus() | |
517 | ! { | |
518 | ! return ( | |
519 | ! #ifdef FEAT_GUI | |
520 | ! gui.in_use ? (vim_strchr(p_go, GO_ASELPLUS) != NULL) : | |
521 | ! #endif | |
522 | ! clip_autoselect_plus); | |
523 | } | |
524 | ||
525 | ||
526 | *************** | |
527 | *** 657,663 **** | |
528 | VimClipboard *cb = &clip_star; | |
529 | ||
530 | if (cb->state == SELECT_DONE) | |
531 | ! clip_clear_selection(); | |
532 | ||
533 | row = check_row(row); | |
534 | col = check_col(col); | |
535 | --- 682,688 ---- | |
536 | VimClipboard *cb = &clip_star; | |
537 | ||
538 | if (cb->state == SELECT_DONE) | |
539 | ! clip_clear_selection(cb); | |
540 | ||
541 | row = check_row(row); | |
542 | col = check_col(col); | |
543 | *************** | |
544 | *** 749,755 **** | |
545 | printf("Selection ended: (%u,%u) to (%u,%u)\n", cb->start.lnum, | |
546 | cb->start.col, cb->end.lnum, cb->end.col); | |
547 | #endif | |
548 | ! if (clip_isautosel() | |
549 | || ( | |
550 | #ifdef FEAT_GUI | |
551 | gui.in_use ? (vim_strchr(p_go, GO_ASELML) != NULL) : | |
552 | --- 774,780 ---- | |
553 | printf("Selection ended: (%u,%u) to (%u,%u)\n", cb->start.lnum, | |
554 | cb->start.col, cb->end.lnum, cb->end.col); | |
555 | #endif | |
556 | ! if (clip_isautosel_star() | |
557 | || ( | |
558 | #ifdef FEAT_GUI | |
559 | gui.in_use ? (vim_strchr(p_go, GO_ASELML) != NULL) : | |
560 | *************** | |
561 | *** 932,947 **** | |
562 | * Called from outside to clear selected region from the display | |
563 | */ | |
564 | void | |
565 | ! clip_clear_selection() | |
566 | { | |
567 | - VimClipboard *cb = &clip_star; | |
568 | ||
569 | ! if (cb->state == SELECT_CLEARED) | |
570 | return; | |
571 | ||
572 | ! clip_invert_area((int)cb->start.lnum, cb->start.col, (int)cb->end.lnum, | |
573 | ! cb->end.col, CLIP_CLEAR); | |
574 | ! cb->state = SELECT_CLEARED; | |
575 | } | |
576 | ||
577 | /* | |
578 | --- 957,972 ---- | |
579 | * Called from outside to clear selected region from the display | |
580 | */ | |
581 | void | |
582 | ! clip_clear_selection(cbd) | |
583 | ! VimClipboard *cbd; | |
584 | { | |
585 | ||
586 | ! if (cbd->state == SELECT_CLEARED) | |
587 | return; | |
588 | ||
589 | ! clip_invert_area((int)cbd->start.lnum, cbd->start.col, (int)cbd->end.lnum, | |
590 | ! cbd->end.col, CLIP_CLEAR); | |
591 | ! cbd->state = SELECT_CLEARED; | |
592 | } | |
593 | ||
594 | /* | |
595 | *************** | |
596 | *** 954,960 **** | |
597 | if (clip_star.state == SELECT_DONE | |
598 | && row2 >= clip_star.start.lnum | |
599 | && row1 <= clip_star.end.lnum) | |
600 | ! clip_clear_selection(); | |
601 | } | |
602 | ||
603 | /* | |
604 | --- 979,985 ---- | |
605 | if (clip_star.state == SELECT_DONE | |
606 | && row2 >= clip_star.start.lnum | |
607 | && row1 <= clip_star.end.lnum) | |
608 | ! clip_clear_selection(&clip_star); | |
609 | } | |
610 | ||
611 | /* | |
612 | *** ../vim-7.3.596/src/globals.h 2012-06-29 12:35:40.000000000 +0200 | |
613 | --- src/globals.h 2012-07-10 16:35:13.000000000 +0200 | |
614 | *************** | |
615 | *** 517,523 **** | |
616 | # define CLIP_UNNAMED_PLUS 2 | |
617 | EXTERN int clip_unnamed INIT(= 0); /* above two values or'ed */ | |
618 | ||
619 | ! EXTERN int clip_autoselect INIT(= FALSE); | |
620 | EXTERN int clip_autoselectml INIT(= FALSE); | |
621 | EXTERN int clip_html INIT(= FALSE); | |
622 | EXTERN regprog_T *clip_exclude_prog INIT(= NULL); | |
623 | --- 517,524 ---- | |
624 | # define CLIP_UNNAMED_PLUS 2 | |
625 | EXTERN int clip_unnamed INIT(= 0); /* above two values or'ed */ | |
626 | ||
627 | ! EXTERN int clip_autoselect_star INIT(= FALSE); | |
628 | ! EXTERN int clip_autoselect_plus INIT(= FALSE); | |
629 | EXTERN int clip_autoselectml INIT(= FALSE); | |
630 | EXTERN int clip_html INIT(= FALSE); | |
631 | EXTERN regprog_T *clip_exclude_prog INIT(= NULL); | |
632 | *** ../vim-7.3.596/src/proto/ui.pro 2010-08-15 21:57:28.000000000 +0200 | |
633 | --- src/proto/ui.pro 2012-07-10 16:37:35.000000000 +0200 | |
634 | *************** | |
635 | *** 11,27 **** | |
636 | void ui_new_shellsize __ARGS((void)); | |
637 | void ui_breakcheck __ARGS((void)); | |
638 | void clip_init __ARGS((int can_use)); | |
639 | ! void clip_update_selection __ARGS((void)); | |
640 | void clip_own_selection __ARGS((VimClipboard *cbd)); | |
641 | void clip_lose_selection __ARGS((VimClipboard *cbd)); | |
642 | - void clip_copy_selection __ARGS((void)); | |
643 | void clip_auto_select __ARGS((void)); | |
644 | ! int clip_isautosel __ARGS((void)); | |
645 | void clip_modeless __ARGS((int button, int is_click, int is_drag)); | |
646 | void clip_start_selection __ARGS((int col, int row, int repeated_click)); | |
647 | void clip_process_selection __ARGS((int button, int col, int row, int_u repeated_click)); | |
648 | void clip_may_redraw_selection __ARGS((int row, int col, int len)); | |
649 | ! void clip_clear_selection __ARGS((void)); | |
650 | void clip_may_clear_selection __ARGS((int row1, int row2)); | |
651 | void clip_scroll_selection __ARGS((int rows)); | |
652 | void clip_copy_modeless_selection __ARGS((int both)); | |
653 | --- 11,27 ---- | |
654 | void ui_new_shellsize __ARGS((void)); | |
655 | void ui_breakcheck __ARGS((void)); | |
656 | void clip_init __ARGS((int can_use)); | |
657 | ! void clip_update_selection __ARGS((VimClipboard *clip)); | |
658 | void clip_own_selection __ARGS((VimClipboard *cbd)); | |
659 | void clip_lose_selection __ARGS((VimClipboard *cbd)); | |
660 | void clip_auto_select __ARGS((void)); | |
661 | ! int clip_isautosel_star __ARGS((void)); | |
662 | ! int clip_isautosel_plus __ARGS((void)); | |
663 | void clip_modeless __ARGS((int button, int is_click, int is_drag)); | |
664 | void clip_start_selection __ARGS((int col, int row, int repeated_click)); | |
665 | void clip_process_selection __ARGS((int button, int col, int row, int_u repeated_click)); | |
666 | void clip_may_redraw_selection __ARGS((int row, int col, int len)); | |
667 | ! void clip_clear_selection __ARGS((VimClipboard *cbd)); | |
668 | void clip_may_clear_selection __ARGS((int row1, int row2)); | |
669 | void clip_scroll_selection __ARGS((int rows)); | |
670 | void clip_copy_modeless_selection __ARGS((int both)); | |
671 | *** ../vim-7.3.596/src/option.h 2012-06-06 16:12:54.000000000 +0200 | |
672 | --- src/option.h 2012-07-10 15:54:32.000000000 +0200 | |
673 | *************** | |
674 | *** 229,234 **** | |
675 | --- 229,235 ---- | |
676 | #define GO_MENUS 'm' /* use menu bar */ | |
677 | #define GO_NOSYSMENU 'M' /* don't source system menu */ | |
678 | #define GO_POINTER 'p' /* pointer enter/leave callbacks */ | |
679 | + #define GO_ASELPLUS 'P' /* autoselectPlus */ | |
680 | #define GO_RIGHT 'r' /* use right scrollbar */ | |
681 | #define GO_VRIGHT 'R' /* right scrollbar with vert split */ | |
682 | #define GO_TEAROFF 't' /* add tear-off menu items */ | |
683 | *** ../vim-7.3.596/src/gui.c 2012-05-27 00:37:45.000000000 +0200 | |
684 | --- src/gui.c 2012-07-10 16:43:34.000000000 +0200 | |
685 | *************** | |
686 | *** 3154,3160 **** | |
687 | } | |
688 | ||
689 | if (clip_star.state != SELECT_CLEARED && !did_clip) | |
690 | ! clip_clear_selection(); | |
691 | #endif | |
692 | ||
693 | /* Don't put events in the input queue now. */ | |
694 | --- 3154,3160 ---- | |
695 | } | |
696 | ||
697 | if (clip_star.state != SELECT_CLEARED && !did_clip) | |
698 | ! clip_clear_selection(&clip_star); | |
699 | #endif | |
700 | ||
701 | /* Don't put events in the input queue now. */ | |
702 | *** ../vim-7.3.596/src/version.c 2012-07-10 15:18:18.000000000 +0200 | |
703 | --- src/version.c 2012-07-10 16:32:16.000000000 +0200 | |
704 | *************** | |
705 | *** 716,717 **** | |
706 | --- 716,719 ---- | |
707 | { /* Add new patch number below this line */ | |
708 | + /**/ | |
709 | + 597, | |
710 | /**/ | |
711 | ||
712 | -- | |
713 | hundred-and-one symptoms of being an internet addict: | |
714 | 106. When told to "go to your room" you inform your parents that you | |
715 | can't...because you were kicked out and banned. | |
716 | ||
717 | /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ | |
718 | /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ | |
719 | \\\ an exciting new programming language -- http://www.Zimbu.org /// | |
720 | \\\ help me help AIDS victims -- http://ICCF-Holland.org /// |