- Timestamp:
- Jun 22, 2006, 12:06:02 AM (19 years ago)
- Branches:
- clfs-1.2, clfs-2.1, clfs-3.0.0-systemd, clfs-3.0.0-sysvinit, master, systemd, sysvinit
- Children:
- cf4bffa
- Parents:
- 0a461e0
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
patches/vim-7.0-fixes-4.patch
r0a461e0 r4f46927 1 Submitted By: J eremy Huntwork (jhuntworkat linuxfromscratch dot org)2 Date: 2006-0 5-251 Submitted By: Jim Gifford (jim at linuxfromscratch dot org) 2 Date: 2006-06-21 3 3 Initial Package Version: 7.0 4 4 Origin: Upstream 5 5 Upstream Status: Applied 6 Description: Contains Patch 001-004 and 006-0 17from Upstream6 Description: Contains Patch 001-004 and 006-022 from Upstream 7 7 005 is for the extras and Windows 32 only 8 8 9 diff -Naur vim70 -orig/runtime/autoload/ccomplete.vim vim70/runtime/autoload/ccomplete.vim10 --- vim70 -orig/runtime/autoload/ccomplete.vim 2006-05-03 10:35:56.000000000 -040011 +++ vim70/runtime/autoload/ccomplete.vim 2006-0 5-25 09:13:10.000000000 -04009 diff -Naur vim70.orig/runtime/autoload/ccomplete.vim vim70/runtime/autoload/ccomplete.vim 10 --- vim70.orig/runtime/autoload/ccomplete.vim 2006-05-03 07:35:56.000000000 -0700 11 +++ vim70/runtime/autoload/ccomplete.vim 2006-06-21 23:50:50.000000000 -0700 12 12 @@ -1,7 +1,7 @@ 13 13 " Vim completion script … … 28 28 return [] 29 29 endif 30 diff -Naur vim70 -orig/runtime/autoload/spellfile.vim vim70/runtime/autoload/spellfile.vim31 --- vim70 -orig/runtime/autoload/spellfile.vim 2006-02-01 07:12:24.000000000 -050032 +++ vim70/runtime/autoload/spellfile.vim 2006-0 5-25 09:13:12.000000000 -040030 diff -Naur vim70.orig/runtime/autoload/spellfile.vim vim70/runtime/autoload/spellfile.vim 31 --- vim70.orig/runtime/autoload/spellfile.vim 2006-02-01 04:12:24.000000000 -0800 32 +++ vim70/runtime/autoload/spellfile.vim 2006-06-21 23:50:50.000000000 -0700 33 33 @@ -1,9 +1,9 @@ 34 34 " Vim script to download a missing spell file … … 79 79 + exe 'Nread "' . machine . ' anonymous vim7user ' . dir . '/' . a:fname . '"' 80 80 +endfunc 81 diff -Naur vim70 -orig/runtime/plugin/matchparen.vim vim70/runtime/plugin/matchparen.vim82 --- vim70 -orig/runtime/plugin/matchparen.vim 2006-04-27 09:31:26.000000000 -040083 +++ vim70/runtime/plugin/matchparen.vim 2006-0 5-25 09:13:12.000000000 -040081 diff -Naur vim70.orig/runtime/plugin/matchparen.vim vim70/runtime/plugin/matchparen.vim 82 --- vim70.orig/runtime/plugin/matchparen.vim 2006-04-27 06:31:26.000000000 -0700 83 +++ vim70/runtime/plugin/matchparen.vim 2006-06-21 23:50:50.000000000 -0700 84 84 @@ -1,6 +1,6 @@ 85 85 " Vim plugin for showing matching parens … … 108 108 109 109 " If a match is found setup match highlighting. 110 diff -Naur vim70 -orig/src/edit.c vim70/src/edit.c111 --- vim70 -orig/src/edit.c 2006-05-07 07:48:51.000000000 -0400112 +++ vim70/src/edit.c 2006-0 5-25 09:13:12.000000000 -0400110 diff -Naur vim70.orig/src/edit.c vim70/src/edit.c 111 --- vim70.orig/src/edit.c 2006-05-07 04:48:51.000000000 -0700 112 +++ vim70/src/edit.c 2006-06-21 23:50:50.000000000 -0700 113 113 @@ -751,7 +751,7 @@ 114 114 continue; … … 201 201 202 202 if (allow_get_expansion && insert_match 203 diff -Naur vim70 -orig/src/eval.c vim70/src/eval.c204 --- vim70 -orig/src/eval.c 2006-05-05 13:15:26.000000000 -0400205 +++ vim70/src/eval.c 2006-0 5-25 09:13:11.000000000 -0400203 diff -Naur vim70.orig/src/eval.c vim70/src/eval.c 204 --- vim70.orig/src/eval.c 2006-05-05 10:15:26.000000000 -0700 205 +++ vim70/src/eval.c 2006-06-21 23:50:50.000000000 -0700 206 206 @@ -11372,7 +11372,7 @@ 207 207 if (argvars[2].v_type != VAR_UNKNOWN) … … 223 223 /* It's "s:" or "<SID>" */ 224 224 if (current_SID <= 0) 225 diff -Naur vim70 -orig/src/ex_docmd.c vim70/src/ex_docmd.c226 --- vim70 -orig/src/ex_docmd.c 2006-05-05 12:33:19.000000000 -0400227 +++ vim70/src/ex_docmd.c 2006-0 5-25 09:13:10.000000000 -0400225 diff -Naur vim70.orig/src/ex_docmd.c vim70/src/ex_docmd.c 226 --- vim70.orig/src/ex_docmd.c 2006-05-05 09:33:19.000000000 -0700 227 +++ vim70/src/ex_docmd.c 2006-06-21 23:50:50.000000000 -0700 228 228 @@ -833,7 +833,7 @@ 229 229 * If requested, store and reset the global values controlling the … … 235 235 236 236 initial_trylevel = trylevel; 237 diff -Naur vim70 -orig/src/gui_at_fs.c vim70/src/gui_at_fs.c238 --- vim70 -orig/src/gui_at_fs.c 2005-07-09 07:30:17.000000000 -0400239 +++ vim70/src/gui_at_fs.c 2006-0 5-25 09:13:13.000000000 -0400237 diff -Naur vim70.orig/src/gui_at_fs.c vim70/src/gui_at_fs.c 238 --- vim70.orig/src/gui_at_fs.c 2005-07-09 04:30:17.000000000 -0700 239 +++ vim70/src/gui_at_fs.c 2006-06-21 23:50:50.000000000 -0700 240 240 @@ -1861,27 +1861,27 @@ 241 241 XtPointer pnew; … … 351 351 if (nw > SFdirEnd - 3) 352 352 nw = SFdirEnd - 3; 353 diff -Naur vim70-orig/src/gui.c vim70/src/gui.c 354 --- vim70-orig/src/gui.c 2006-05-03 07:00:59.000000000 -0400 355 +++ vim70/src/gui.c 2006-05-25 09:13:10.000000000 -0400 353 diff -Naur vim70.orig/src/gui.c vim70/src/gui.c 354 --- vim70.orig/src/gui.c 2006-05-03 04:00:59.000000000 -0700 355 +++ vim70/src/gui.c 2006-06-21 23:52:38.000000000 -0700 356 @@ -4515,7 +4515,7 @@ 357 int y; 358 { 359 win_T *wp; 360 - char_u st[6]; 361 + char_u st[8]; 362 363 /* Ignore this while still starting up. */ 364 if (!gui.in_use || gui.starting) 356 365 @@ -4603,11 +4603,11 @@ 357 366 /* Don't move the mouse when it's left or right of the Vim window */ … … 369 378 if (wp != curwin && wp != NULL) /* If in other than current window */ 370 379 { 371 diff -Naur vim70 -orig/src/gui_xmebw.c vim70/src/gui_xmebw.c372 --- vim70 -orig/src/gui_xmebw.c 2006-04-30 11:32:32.000000000 -0400373 +++ vim70/src/gui_xmebw.c 2006-0 5-25 09:13:13.000000000 -0400380 diff -Naur vim70.orig/src/gui_xmebw.c vim70/src/gui_xmebw.c 381 --- vim70.orig/src/gui_xmebw.c 2006-04-30 08:32:32.000000000 -0700 382 +++ vim70/src/gui_xmebw.c 2006-06-21 23:50:50.000000000 -0700 374 383 @@ -47,13 +47,13 @@ 375 384 #include "gui_xmebwp.h" … … 469 478 * Compute location of bounding box to contain the 470 479 * defaultButtonShadow. 471 diff -Naur vim70-orig/src/Makefile vim70/src/Makefile 472 --- vim70-orig/src/Makefile 2006-05-07 09:25:27.000000000 -0400 473 +++ vim70/src/Makefile 2006-05-25 09:13:11.000000000 -0400 480 diff -Naur vim70.orig/src/if_ruby.c vim70/src/if_ruby.c 481 --- vim70.orig/src/if_ruby.c 2006-04-30 08:37:52.000000000 -0700 482 +++ vim70/src/if_ruby.c 2006-06-21 23:56:28.000000000 -0700 483 @@ -643,11 +643,23 @@ 484 485 static VALUE set_buffer_line(buf_T *buf, linenr_T n, VALUE str) 486 { 487 - buf_T *savebuf = curbuf; 488 - char *line = STR2CSTR(str); 489 + char *line = STR2CSTR(str); 490 +#ifdef FEAT_AUTOCMD 491 + aco_save_T aco; 492 +#else 493 + buf_T *save_curbuf = curbuf; 494 +#endif 495 496 - if (n > 0 && n <= buf->b_ml.ml_line_count && line != NULL) { 497 + if (n > 0 && n <= buf->b_ml.ml_line_count && line != NULL) 498 + { 499 +#ifdef FEAT_AUTOCMD 500 + /* set curwin/curbuf for "buf" and save some things */ 501 + aucmd_prepbuf(&aco, buf); 502 +#else 503 curbuf = buf; 504 + curwin->w_buffer = buf; 505 +#endif 506 + 507 if (u_savesub(n) == OK) { 508 ml_replace(n, (char_u *)line, TRUE); 509 changed(); 510 @@ -655,10 +667,19 @@ 511 syn_changed(n); /* recompute syntax hl. for this line */ 512 #endif 513 } 514 - curbuf = savebuf; 515 + 516 +#ifdef FEAT_AUTOCMD 517 + /* restore curwin/curbuf and a few other things */ 518 + aucmd_restbuf(&aco); 519 + /* Careful: autocommands may have made "buf" invalid! */ 520 +#else 521 + curwin->w_buffer = save_curbuf; 522 + curbuf = save_curbuf; 523 +#endif 524 update_curbuf(NOT_VALID); 525 } 526 - else { 527 + else 528 + { 529 rb_raise(rb_eIndexError, "index %d out of buffer", n); 530 return Qnil; /* For stop warning */ 531 } 532 @@ -676,12 +697,24 @@ 533 534 static VALUE buffer_delete(VALUE self, VALUE num) 535 { 536 - buf_T *buf = get_buf(self); 537 - buf_T *savebuf = curbuf; 538 - long n = NUM2LONG(num); 539 + buf_T *buf = get_buf(self); 540 + long n = NUM2LONG(num); 541 +#ifdef FEAT_AUTOCMD 542 + aco_save_T aco; 543 +#else 544 + buf_T *save_curbuf = curbuf; 545 +#endif 546 547 - if (n > 0 && n <= buf->b_ml.ml_line_count) { 548 + if (n > 0 && n <= buf->b_ml.ml_line_count) 549 + { 550 +#ifdef FEAT_AUTOCMD 551 + /* set curwin/curbuf for "buf" and save some things */ 552 + aucmd_prepbuf(&aco, buf); 553 +#else 554 curbuf = buf; 555 + curwin->w_buffer = buf; 556 +#endif 557 + 558 if (u_savedel(n, 1) == OK) { 559 ml_delete(n, 0); 560 561 @@ -691,10 +724,19 @@ 562 563 changed(); 564 } 565 - curbuf = savebuf; 566 + 567 +#ifdef FEAT_AUTOCMD 568 + /* restore curwin/curbuf and a few other things */ 569 + aucmd_restbuf(&aco); 570 + /* Careful: autocommands may have made "buf" invalid! */ 571 +#else 572 + curwin->w_buffer = save_curbuf; 573 + curbuf = save_curbuf; 574 +#endif 575 update_curbuf(NOT_VALID); 576 } 577 - else { 578 + else 579 + { 580 rb_raise(rb_eIndexError, "index %d out of buffer", n); 581 } 582 return Qnil; 583 @@ -702,13 +744,25 @@ 584 585 static VALUE buffer_append(VALUE self, VALUE num, VALUE str) 586 { 587 - buf_T *buf = get_buf(self); 588 - buf_T *savebuf = curbuf; 589 - char *line = STR2CSTR(str); 590 - long n = NUM2LONG(num); 591 + buf_T *buf = get_buf(self); 592 + char *line = STR2CSTR(str); 593 + long n = NUM2LONG(num); 594 +#ifdef FEAT_AUTOCMD 595 + aco_save_T aco; 596 +#else 597 + buf_T *save_curbuf = curbuf; 598 +#endif 599 600 - if (n >= 0 && n <= buf->b_ml.ml_line_count && line != NULL) { 601 + if (n >= 0 && n <= buf->b_ml.ml_line_count && line != NULL) 602 + { 603 +#ifdef FEAT_AUTOCMD 604 + /* set curwin/curbuf for "buf" and save some things */ 605 + aucmd_prepbuf(&aco, buf); 606 +#else 607 curbuf = buf; 608 + curwin->w_buffer = buf; 609 +#endif 610 + 611 if (u_inssub(n + 1) == OK) { 612 ml_append(n, (char_u *) line, (colnr_T) 0, FALSE); 613 614 @@ -718,7 +772,15 @@ 615 616 changed(); 617 } 618 - curbuf = savebuf; 619 + 620 +#ifdef FEAT_AUTOCMD 621 + /* restore curwin/curbuf and a few other things */ 622 + aucmd_restbuf(&aco); 623 + /* Careful: autocommands may have made "buf" invalid! */ 624 +#else 625 + curwin->w_buffer = save_curbuf; 626 + curbuf = save_curbuf; 627 +#endif 628 update_curbuf(NOT_VALID); 629 } 630 else { 631 diff -Naur vim70.orig/src/main.c vim70/src/main.c 632 --- vim70.orig/src/main.c 2006-05-03 10:36:44.000000000 -0700 633 +++ vim70/src/main.c 2006-06-21 23:51:37.000000000 -0700 634 @@ -564,7 +564,11 @@ 635 */ 636 if (p_lpl) 637 { 638 +# ifdef VMS /* Somehow VMS doesn't handle the "**". */ 639 + source_runtime((char_u *)"plugin/*.vim", TRUE); 640 +# else 641 source_runtime((char_u *)"plugin/**/*.vim", TRUE); 642 +# endif 643 TIME_MSG("loading plugins"); 644 } 645 #endif 646 diff -Naur vim70.orig/src/Makefile vim70/src/Makefile 647 --- vim70.orig/src/Makefile 2006-05-07 06:25:27.000000000 -0700 648 +++ vim70/src/Makefile 2006-06-21 23:50:50.000000000 -0700 474 649 @@ -2177,6 +2177,7 @@ 475 650 cd $(SHADOWDIR)/xxd; ln -s ../../xxd/*.[ch] ../../xxd/Make* . … … 480 655 fi 481 656 mkdir $(SHADOWDIR)/testdir 482 diff -Naur vim70 -orig/src/mbyte.c vim70/src/mbyte.c483 --- vim70 -orig/src/mbyte.c 2006-04-30 07:51:01.000000000 -0400484 +++ vim70/src/mbyte.c 2006-0 5-25 09:13:13.000000000 -0400657 diff -Naur vim70.orig/src/mbyte.c vim70/src/mbyte.c 658 --- vim70.orig/src/mbyte.c 2006-04-30 04:51:01.000000000 -0700 659 +++ vim70/src/mbyte.c 2006-06-21 23:50:50.000000000 -0700 485 660 @@ -311,7 +311,11 @@ 486 661 … … 504 679 }; 505 680 506 diff -Naur vim70 -orig/src/message.c vim70/src/message.c507 --- vim70 -orig/src/message.c 2006-05-06 16:07:37.000000000 -0400508 +++ vim70/src/message.c 2006-0 5-25 09:13:11.000000000 -0400681 diff -Naur vim70.orig/src/message.c vim70/src/message.c 682 --- vim70.orig/src/message.c 2006-05-06 13:07:37.000000000 -0700 683 +++ vim70/src/message.c 2006-06-21 23:50:50.000000000 -0700 509 684 @@ -4175,15 +4175,16 @@ 510 685 str_arg_l = 0; … … 530 705 } 531 706 break; 532 diff -Naur vim70-orig/src/option.c vim70/src/option.c 533 --- vim70-orig/src/option.c 2006-05-03 13:32:28.000000000 -0400 534 +++ vim70/src/option.c 2006-05-25 09:13:12.000000000 -0400 707 diff -Naur vim70.orig/src/ops.c vim70/src/ops.c 708 --- vim70.orig/src/ops.c 2006-04-30 08:13:44.000000000 -0700 709 +++ vim70/src/ops.c 2006-06-21 23:52:03.000000000 -0700 710 @@ -2413,6 +2413,7 @@ 711 else 712 { 713 curwin->w_cursor = oap->end; 714 + check_cursor_col(); 715 716 /* Works just like an 'i'nsert on the next character. */ 717 if (!lineempty(curwin->w_cursor.lnum) 718 diff -Naur vim70.orig/src/option.c vim70/src/option.c 719 --- vim70.orig/src/option.c 2006-05-03 10:32:28.000000000 -0700 720 +++ vim70/src/option.c 2006-06-21 23:50:50.000000000 -0700 535 721 @@ -2294,7 +2294,7 @@ 536 722 {(char_u *)0L, (char_u *)0L} … … 558 744 case PV_INDE: return &curbuf->b_p_inde_flags; 559 745 # endif 560 diff -Naur vim70-orig/src/spell.c vim70/src/spell.c 561 --- vim70-orig/src/spell.c 2006-05-05 03:49:58.000000000 -0400 562 +++ vim70/src/spell.c 2006-05-25 09:13:11.000000000 -0400 746 diff -Naur vim70.orig/src/quickfix.c vim70/src/quickfix.c 747 --- vim70.orig/src/quickfix.c 2006-05-03 00:47:42.000000000 -0700 748 +++ vim70/src/quickfix.c 2006-06-21 23:54:05.000000000 -0700 749 @@ -602,13 +602,19 @@ 750 else 751 type = 0; 752 /* 753 - * Extract error message data from matched line 754 + * Extract error message data from matched line. 755 + * We check for an actual submatch, because "\[" and "\]" in 756 + * the 'errorformat' may cause the wrong submatch to be used. 757 */ 758 if ((i = (int)fmt_ptr->addr[0]) > 0) /* %f */ 759 { 760 - int c = *regmatch.endp[i]; 761 + int c; 762 + 763 + if (regmatch.startp[i] == NULL || regmatch.endp[i] == NULL) 764 + continue; 765 766 /* Expand ~/file and $HOME/file to full path. */ 767 + c = *regmatch.endp[i]; 768 *regmatch.endp[i] = NUL; 769 expand_env(regmatch.startp[i], namebuf, CMDBUFFSIZE); 770 *regmatch.endp[i] = c; 771 @@ -618,35 +624,63 @@ 772 continue; 773 } 774 if ((i = (int)fmt_ptr->addr[1]) > 0) /* %n */ 775 + { 776 + if (regmatch.startp[i] == NULL) 777 + continue; 778 enr = (int)atol((char *)regmatch.startp[i]); 779 + } 780 if ((i = (int)fmt_ptr->addr[2]) > 0) /* %l */ 781 + { 782 + if (regmatch.startp[i] == NULL) 783 + continue; 784 lnum = atol((char *)regmatch.startp[i]); 785 + } 786 if ((i = (int)fmt_ptr->addr[3]) > 0) /* %c */ 787 + { 788 + if (regmatch.startp[i] == NULL) 789 + continue; 790 col = (int)atol((char *)regmatch.startp[i]); 791 + } 792 if ((i = (int)fmt_ptr->addr[4]) > 0) /* %t */ 793 + { 794 + if (regmatch.startp[i] == NULL) 795 + continue; 796 type = *regmatch.startp[i]; 797 + } 798 if (fmt_ptr->flags == '+' && !multiscan) /* %+ */ 799 STRCPY(errmsg, IObuff); 800 else if ((i = (int)fmt_ptr->addr[5]) > 0) /* %m */ 801 { 802 + if (regmatch.startp[i] == NULL || regmatch.endp[i] == NULL) 803 + continue; 804 len = (int)(regmatch.endp[i] - regmatch.startp[i]); 805 vim_strncpy(errmsg, regmatch.startp[i], len); 806 } 807 if ((i = (int)fmt_ptr->addr[6]) > 0) /* %r */ 808 + { 809 + if (regmatch.startp[i] == NULL) 810 + continue; 811 tail = regmatch.startp[i]; 812 + } 813 if ((i = (int)fmt_ptr->addr[7]) > 0) /* %p */ 814 { 815 + if (regmatch.startp[i] == NULL || regmatch.endp[i] == NULL) 816 + continue; 817 col = (int)(regmatch.endp[i] - regmatch.startp[i] + 1); 818 if (*((char_u *)regmatch.startp[i]) != TAB) 819 use_viscol = TRUE; 820 } 821 if ((i = (int)fmt_ptr->addr[8]) > 0) /* %v */ 822 { 823 + if (regmatch.startp[i] == NULL) 824 + continue; 825 col = (int)atol((char *)regmatch.startp[i]); 826 use_viscol = TRUE; 827 } 828 if ((i = (int)fmt_ptr->addr[9]) > 0) /* %s */ 829 { 830 + if (regmatch.startp[i] == NULL || regmatch.endp[i] == NULL) 831 + continue; 832 len = (int)(regmatch.endp[i] - regmatch.startp[i]); 833 if (len > CMDBUFFSIZE - 5) 834 len = CMDBUFFSIZE - 5; 835 diff -Naur vim70.orig/src/spell.c vim70/src/spell.c 836 --- vim70.orig/src/spell.c 2006-05-05 00:49:58.000000000 -0700 837 +++ vim70/src/spell.c 2006-06-21 23:50:50.000000000 -0700 563 838 @@ -2108,7 +2108,8 @@ 564 839 * possible. */ … … 571 846 p = buf + skip; 572 847 endp = buf + len; 573 diff -Naur vim70 -orig/src/version.c vim70/src/version.c574 --- vim70 -orig/src/version.c 2006-05-03 03:50:42.000000000 -0400575 +++ vim70/src/version.c 2006-0 5-25 09:13:13.000000000 -0400576 @@ -667,6 +667, 38 @@848 diff -Naur vim70.orig/src/version.c vim70/src/version.c 849 --- vim70.orig/src/version.c 2006-05-03 00:50:42.000000000 -0700 850 +++ vim70/src/version.c 2006-06-21 23:56:28.000000000 -0700 851 @@ -667,6 +667,48 @@ 577 852 static int included_patches[] = 578 853 { /* Add new patch number below this line */ 579 854 /**/ 855 + 22, 856 +/**/ 857 + 21, 858 +/**/ 859 + 20, 860 +/**/ 861 + 19, 862 +/**/ 863 + 18, 864 +/**/ 580 865 + 17, 581 866 +/**/ … … 613 898 }; 614 899 900
Note:
See TracChangeset
for help on using the changeset viewer.