Changeset 8c75f86f for patches/vim-7.2-branch_update-11.patch
- Timestamp:
- Mar 12, 2009, 11:59:27 AM (16 years ago)
- Branches:
- clfs-1.2, clfs-2.1, clfs-3.0.0-systemd, clfs-3.0.0-sysvinit, master, systemd, sysvinit
- Children:
- 2e93485
- Parents:
- 73fb3dc5
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
patches/vim-7.2-branch_update-11.patch
r73fb3dc5 r8c75f86f 1 1 Submitted By: Jim Gifford (jim at cross-lfs dot org) 2 Date: 03- 01-20092 Date: 03-12-2009 3 3 Initial Package Version: 7.2 4 4 Origin: Upstream 5 5 Upstream Status: Applied 6 Description: Contains all upstream patches up to 7.2.1 286 Description: Contains all upstream patches up to 7.2.141 7 7 The following patches were skipped 8 007 036 041 049 071 072 074 088 089 093 101 8 007 036 041 049 071 072 074 088 089 093 101 138 9 9 10 10 diff -Naur vim72.orig/Filelist vim72/Filelist 11 11 --- vim72.orig/Filelist 2008-07-06 11:02:23.000000000 -0700 12 +++ vim72/Filelist 2009-03- 01 11:06:57.584431903 -080012 +++ vim72/Filelist 2009-03-12 11:54:40.397486521 -0700 13 13 @@ -285,6 +285,7 @@ 14 14 src/proto/os_win32.pro \ … … 21 21 diff -Naur vim72.orig/runtime/doc/cmdline.txt vim72/runtime/doc/cmdline.txt 22 22 --- vim72.orig/runtime/doc/cmdline.txt 2008-08-09 07:22:59.000000000 -0700 23 +++ vim72/runtime/doc/cmdline.txt 2009-03- 01 11:07:42.747327559 -080023 +++ vim72/runtime/doc/cmdline.txt 2009-03-12 11:54:40.529493784 -0700 24 24 @@ -1,4 +1,4 @@ 25 25 -*cmdline.txt* For Vim version 7.2. Last change: 2008 Jul 29 … … 80 80 diff -Naur vim72.orig/runtime/doc/eval.txt vim72/runtime/doc/eval.txt 81 81 --- vim72.orig/runtime/doc/eval.txt 2008-08-09 07:22:59.000000000 -0700 82 +++ vim72/runtime/doc/eval.txt 2009-03- 01 11:10:05.720489174 -080082 +++ vim72/runtime/doc/eval.txt 2009-03-12 11:54:50.318122364 -0700 83 83 @@ -1,4 +1,4 @@ 84 84 -*eval.txt* For Vim version 7.2. Last change: 2008 Aug 09 … … 200 200 diff -Naur vim72.orig/runtime/doc/netbeans.txt vim72/runtime/doc/netbeans.txt 201 201 --- vim72.orig/runtime/doc/netbeans.txt 2008-08-09 07:22:59.000000000 -0700 202 +++ vim72/runtime/doc/netbeans.txt 2009-03- 01 11:10:39.066624388 -0800202 +++ vim72/runtime/doc/netbeans.txt 2009-03-12 11:54:59.850731108 -0700 203 203 @@ -1,4 +1,4 @@ 204 204 -*netbeans.txt* For Vim version 7.2. Last change: 2008 Jun 28 … … 222 222 diff -Naur vim72.orig/runtime/doc/options.txt vim72/runtime/doc/options.txt 223 223 --- vim72.orig/runtime/doc/options.txt 2008-08-09 07:22:59.000000000 -0700 224 +++ vim72/runtime/doc/options.txt 2009-03- 01 11:11:54.531461377 -0800224 +++ vim72/runtime/doc/options.txt 2009-03-12 11:55:13.407601900 -0700 225 225 @@ -1,4 +1,4 @@ 226 226 -*options.txt* For Vim version 7.2. Last change: 2008 Aug 06 … … 253 253 diff -Naur vim72.orig/runtime/doc/spell.txt vim72/runtime/doc/spell.txt 254 254 --- vim72.orig/runtime/doc/spell.txt 2008-08-09 07:23:00.000000000 -0700 255 +++ vim72/runtime/doc/spell.txt 2009-03- 01 11:09:50.439508031 -0800255 +++ vim72/runtime/doc/spell.txt 2009-03-12 11:54:50.218113983 -0700 256 256 @@ -1,4 +1,4 @@ 257 257 -*spell.txt* For Vim version 7.2. Last change: 2008 Jun 21 … … 383 383 diff -Naur vim72.orig/runtime/doc/starting.txt vim72/runtime/doc/starting.txt 384 384 --- vim72.orig/runtime/doc/starting.txt 2008-08-09 07:23:00.000000000 -0700 385 +++ vim72/runtime/doc/starting.txt 2009-03- 01 11:07:42.747327559 -0800385 +++ vim72/runtime/doc/starting.txt 2009-03-12 11:54:40.533495740 -0700 386 386 @@ -1,4 +1,4 @@ 387 387 -*starting.txt* For Vim version 7.2. Last change: 2008 Jun 21 … … 445 445 diff -Naur vim72.orig/runtime/doc/usr_21.txt vim72/runtime/doc/usr_21.txt 446 446 --- vim72.orig/runtime/doc/usr_21.txt 2008-08-09 07:23:01.000000000 -0700 447 +++ vim72/runtime/doc/usr_21.txt 2009-03- 01 11:07:42.751325883 -0800447 +++ vim72/runtime/doc/usr_21.txt 2009-03-12 11:54:40.533495740 -0700 448 448 @@ -1,4 +1,4 @@ 449 449 -*usr_21.txt* For Vim version 7.2. Last change: 2007 May 01 … … 512 512 diff -Naur vim72.orig/runtime/scripts.vim vim72/runtime/scripts.vim 513 513 --- vim72.orig/runtime/scripts.vim 2008-08-08 15:27:21.000000000 -0700 514 +++ vim72/runtime/scripts.vim 2009-03- 01 11:05:28.166702332 -0800514 +++ vim72/runtime/scripts.vim 2009-03-12 11:54:28.900750105 -0700 515 515 @@ -234,6 +234,10 @@ 516 516 elseif s:line1 =~ '\<DTD\s\+XHTML\s' … … 526 526 diff -Naur vim72.orig/src/auto/configure vim72/src/auto/configure 527 527 --- vim72.orig/src/auto/configure 2008-07-24 05:40:36.000000000 -0700 528 +++ vim72/src/auto/configure 2009-03-01 11:08:15.605433440 -0800 529 @@ -16819,21 +16819,29 @@ 528 +++ vim72/src/auto/configure 2009-03-12 11:55:13.667618383 -0700 529 @@ -11565,6 +11565,67 @@ 530 531 fi 532 533 +{ $as_echo "$as_me:$LINENO: checking for working volatile" >&5 534 +$as_echo_n "checking for working volatile... " >&6; } 535 +if test "${ac_cv_c_volatile+set}" = set; then 536 + $as_echo_n "(cached) " >&6 537 +else 538 + cat >conftest.$ac_ext <<_ACEOF 539 +/* confdefs.h. */ 540 +_ACEOF 541 +cat confdefs.h >>conftest.$ac_ext 542 +cat >>conftest.$ac_ext <<_ACEOF 543 +/* end confdefs.h. */ 544 + 545 +int 546 +main () 547 +{ 548 + 549 +volatile int x; 550 +int * volatile y = (int *) 0; 551 +return !x && !y; 552 + ; 553 + return 0; 554 +} 555 +_ACEOF 556 +rm -f conftest.$ac_objext 557 +if { (ac_try="$ac_compile" 558 +case "(($ac_try" in 559 + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 560 + *) ac_try_echo=$ac_try;; 561 +esac 562 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 563 +$as_echo "$ac_try_echo") >&5 564 + (eval "$ac_compile") 2>conftest.er1 565 + ac_status=$? 566 + grep -v '^ *+' conftest.er1 >conftest.err 567 + rm -f conftest.er1 568 + cat conftest.err >&5 569 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 570 + (exit $ac_status); } && { 571 + test -z "$ac_c_werror_flag" || 572 + test ! -s conftest.err 573 + } && test -s conftest.$ac_objext; then 574 + ac_cv_c_volatile=yes 575 +else 576 + $as_echo "$as_me: failed program was:" >&5 577 +sed 's/^/| /' conftest.$ac_ext >&5 578 + 579 + ac_cv_c_volatile=no 580 +fi 581 + 582 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 583 +fi 584 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_volatile" >&5 585 +$as_echo "$ac_cv_c_volatile" >&6; } 586 +if test $ac_cv_c_volatile = no; then 587 + 588 +cat >>confdefs.h <<\_ACEOF 589 +#define volatile /**/ 590 +_ACEOF 591 + 592 +fi 593 + 594 { $as_echo "$as_me:$LINENO: checking for mode_t" >&5 595 $as_echo_n "checking for mode_t... " >&6; } 596 if test "${ac_cv_type_mode_t+set}" = set; then 597 @@ -16819,21 +16880,29 @@ 530 598 LDFLAGS="$LDFLAGS -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc" 531 599 fi … … 567 635 diff -Naur vim72.orig/src/buffer.c vim72/src/buffer.c 568 636 --- vim72.orig/src/buffer.c 2008-08-06 04:00:48.000000000 -0700 569 +++ vim72/src/buffer.c 2009-03- 01 11:12:14.420733621 -0800637 +++ vim72/src/buffer.c 2009-03-12 11:55:13.507605811 -0700 570 638 @@ -437,10 +437,6 @@ 571 639 return; … … 693 761 #endif 694 762 if (buf->b_fname == NULL) 763 diff -Naur vim72.orig/src/config.h.in vim72/src/config.h.in 764 --- vim72.orig/src/config.h.in 2008-06-21 08:01:41.000000000 -0700 765 +++ vim72/src/config.h.in 2009-03-12 11:55:13.667618383 -0700 766 @@ -50,6 +50,9 @@ 767 /* Define to empty if the keyword does not work. */ 768 #undef const 769 770 +/* Define to empty if the keyword does not work. */ 771 +#undef volatile 772 + 773 /* Define to `int' if <sys/types.h> doesn't define. */ 774 #undef mode_t 775 695 776 diff -Naur vim72.orig/src/configure.in vim72/src/configure.in 696 777 --- vim72.orig/src/configure.in 2008-07-24 05:40:26.000000000 -0700 697 +++ vim72/src/configure.in 2009-03-01 11:08:15.605433440 -0800 698 @@ -3152,18 +3152,25 @@ 778 +++ vim72/src/configure.in 2009-03-12 11:55:13.667618383 -0700 779 @@ -2148,6 +2148,7 @@ 780 dnl Checks for typedefs, structures, and compiler characteristics. 781 AC_PROG_GCC_TRADITIONAL 782 AC_C_CONST 783 +AC_C_VOLATILE 784 AC_TYPE_MODE_T 785 AC_TYPE_OFF_T 786 AC_TYPE_PID_T 787 @@ -3152,18 +3153,25 @@ 699 788 dnl But only when making dependencies, cproto and lint don't take "-isystem". 700 789 dnl Mac gcc returns "powerpc-apple-darwin8-gcc-4.0.1 (GCC)...", need to allow … … 730 819 diff -Naur vim72.orig/src/diff.c vim72/src/diff.c 731 820 --- vim72.orig/src/diff.c 2008-03-05 03:16:56.000000000 -0800 732 +++ vim72/src/diff.c 2009-03- 01 11:10:56.831763654 -0800821 +++ vim72/src/diff.c 2009-03-12 11:55:16.155775667 -0700 733 822 @@ -8,7 +8,7 @@ 734 823 */ … … 845 934 } 846 935 #endif 936 @@ -1138,7 +1153,7 @@ 937 938 for (wp = firstwin; wp != NULL; wp = wp->w_next) 939 { 940 - if (wp == curwin || eap->forceit) 941 + if (wp == curwin || (eap->forceit && wp->w_p_diff)) 942 { 943 /* Set 'diff', 'scrollbind' off and 'wrap' on. */ 944 wp->w_p_diff = FALSE; 847 945 @@ -2114,6 +2129,8 @@ 848 946 EMSG2(_("E102: Can't find buffer \"%s\""), eap->arg); … … 856 954 diff -Naur vim72.orig/src/edit.c vim72/src/edit.c 857 955 --- vim72.orig/src/edit.c 2008-08-06 05:51:17.000000000 -0700 858 +++ vim72/src/edit.c 2009-03- 01 11:11:54.531461377 -0800956 +++ vim72/src/edit.c 2009-03-12 11:55:13.411601900 -0700 859 957 @@ -147,6 +147,7 @@ 860 958 static int ins_compl_bs __ARGS((void)); … … 1116 1214 diff -Naur vim72.orig/src/eval.c vim72/src/eval.c 1117 1215 --- vim72.orig/src/eval.c 2008-08-07 12:37:22.000000000 -0700 1118 +++ vim72/src/eval.c 2009-03- 01 11:11:26.821685989 -08001216 +++ vim72/src/eval.c 2009-03-12 11:55:08.231269731 -0700 1119 1217 @@ -32,6 +32,9 @@ 1120 1218 … … 2005 2103 diff -Naur vim72.orig/src/ex_cmds2.c vim72/src/ex_cmds2.c 2006 2104 --- vim72.orig/src/ex_cmds2.c 2008-07-13 09:18:22.000000000 -0700 2007 +++ vim72/src/ex_cmds2.c 2009-03- 01 11:11:36.726320435 -08002105 +++ vim72/src/ex_cmds2.c 2009-03-12 11:55:13.311593519 -0700 2008 2106 @@ -2842,6 +2842,7 @@ 2009 2107 linenr_T save_sourcing_lnum; … … 2098 2196 diff -Naur vim72.orig/src/ex_cmds.c vim72/src/ex_cmds.c 2099 2197 --- vim72.orig/src/ex_cmds.c 2008-08-04 12:15:00.000000000 -0700 2100 +++ vim72/src/ex_cmds.c 2009-03- 01 11:12:37.162193043 -08002198 +++ vim72/src/ex_cmds.c 2009-03-12 11:55:13.611614471 -0700 2101 2199 @@ -24,7 +24,7 @@ 2102 2200 static void do_filter __ARGS((linenr_T line1, linenr_T line2, exarg_T *eap, char_u *cmd, int do_in, int do_out)); … … 2363 2461 diff -Naur vim72.orig/src/ex_cmds.h vim72/src/ex_cmds.h 2364 2462 --- vim72.orig/src/ex_cmds.h 2008-06-21 11:47:57.000000000 -0700 2365 +++ vim72/src/ex_cmds.h 2009-03- 01 11:07:42.759326442 -08002463 +++ vim72/src/ex_cmds.h 2009-03-12 11:54:40.541495740 -0700 2366 2464 @@ -278,7 +278,7 @@ 2367 2465 EX(CMD_crewind, "crewind", ex_cc, … … 2411 2509 diff -Naur vim72.orig/src/ex_docmd.c vim72/src/ex_docmd.c 2412 2510 --- vim72.orig/src/ex_docmd.c 2008-07-26 04:51:05.000000000 -0700 2413 +++ vim72/src/ex_docmd.c 2009-03- 01 11:12:42.138510127 -08002511 +++ vim72/src/ex_docmd.c 2009-03-12 11:55:24.900337757 -0700 2414 2512 @@ -364,6 +364,7 @@ 2415 2513 # define ex_function ex_ni … … 2445 2543 #endif 2446 2544 case CMD_set: 2447 @@ -5479,6 +5482,9 @@ 2545 @@ -5121,7 +5124,11 @@ 2546 } 2547 2548 vim_free(cmd->uc_rep); 2549 - cmd->uc_rep = 0; 2550 + cmd->uc_rep = NULL; 2551 +#if defined(FEAT_EVAL) && defined(FEAT_CMDL_COMPL) 2552 + vim_free(cmd->uc_compl_arg); 2553 + cmd->uc_compl_arg = NULL; 2554 +#endif 2555 break; 2556 } 2557 2558 @@ -5479,6 +5486,9 @@ 2448 2559 return OK; 2449 2560 } … … 2455 2566 ex_command(eap) 2456 2567 exarg_T *eap; 2457 @@ -5910,7 +59 16,8 @@2568 @@ -5910,7 +5920,8 @@ 2458 2569 char_u *q; 2459 2570 … … 2465 2576 2466 2577 size_t split_len = 0; 2467 @@ -5927,16 +593 4,51 @@2578 @@ -5927,16 +5938,51 @@ 2468 2579 2469 2580 /* … … 2478 2589 - q = buf; 2479 2590 + p = cmd->uc_rep; /* source */ 2480 + q = buf; /* destinat eion */2591 + q = buf; /* destination */ 2481 2592 totlen = 0; 2482 2593 - while ((start = vim_strchr(p, '<')) != NULL … … 2521 2632 ++end; 2522 2633 2523 @@ -8749,8 +8791,8 @@ 2634 @@ -7803,6 +7849,9 @@ 2635 { 2636 vim_free(prev_dir); 2637 prev_dir = NULL; 2638 + 2639 + vim_free(globaldir); 2640 + globaldir = NULL; 2641 } 2642 #endif 2643 2644 @@ -7825,6 +7874,10 @@ 2645 else 2646 #endif 2647 { 2648 +#ifdef FEAT_AUTOCMD 2649 + if (allbuf_locked()) 2650 + return; 2651 +#endif 2652 if (vim_strchr(p_cpo, CPO_CHDIR) != NULL && curbufIsChanged() 2653 && !eap->forceit) 2654 { 2655 @@ -8749,8 +8802,8 @@ 2524 2656 else if (*dirnow != NUL 2525 2657 && (ssop_flags & SSOP_CURDIR) && globaldir != NULL) … … 2532 2664 2533 2665 failed |= (makeopens(fd, dirnow) == FAIL); 2534 @@ -9506,24 +95 48,50 @@2666 @@ -9506,24 +9559,50 @@ 2535 2667 break; 2536 2668 } … … 2593 2725 2594 2726 #ifdef FEAT_SEARCHPATH 2595 @@ -9541,6 +96 09,15 @@2727 @@ -9541,6 +9620,15 @@ 2596 2728 #ifdef FEAT_AUTOCMD 2597 2729 case SPEC_AFILE: /* file name for autocommand */ … … 2609 2741 { 2610 2742 *errormsg = (char_u *)_("E495: no autocommand file name to substitute for \"<afile>\""); 2611 @@ -10067,7 +101 44,7 @@2743 @@ -10067,7 +10155,7 @@ 2612 2744 */ 2613 2745 if (put_line(fd, "let s:sx = expand(\"<sfile>:p:r\").\"x.vim\"") == FAIL … … 2618 2750 return FAIL; 2619 2751 2620 @@ -10689,7 +107 66,8 @@2752 @@ -10689,7 +10777,8 @@ 2621 2753 p_viminfo = (char_u *)"'100"; 2622 2754 if (eap->cmdidx == CMD_rviminfo) … … 2630 2762 diff -Naur vim72.orig/src/ex_getln.c vim72/src/ex_getln.c 2631 2763 --- vim72.orig/src/ex_getln.c 2008-08-08 02:31:33.000000000 -0700 2632 +++ vim72/src/ex_getln.c 2009-03- 01 11:08:34.930671043 -08002764 +++ vim72/src/ex_getln.c 2009-03-12 11:55:13.699620338 -0700 2633 2765 @@ -31,6 +31,8 @@ 2634 2766 int cmdattr; /* attributes for prompt */ … … 2690 2822 #ifdef FEAT_SEARCH_EXTRA 2691 2823 if (did_incsearch) 2692 @@ -2508,6 +2518,20 @@ 2824 @@ -1990,8 +2000,8 @@ 2825 2826 #if defined(FEAT_AUTOCMD) || defined(PROTO) 2827 /* 2828 - * Check if "curbuf_lock" is set and return TRUE when it is and give an error 2829 - * message. 2830 + * Check if "curbuf_lock" or "allbuf_lock" is set and return TRUE when it is 2831 + * and give an error message. 2832 */ 2833 int 2834 curbuf_locked() 2835 @@ -2001,6 +2011,21 @@ 2836 EMSG(_("E788: Not allowed to edit another buffer now")); 2837 return TRUE; 2838 } 2839 + return allbuf_locked(); 2840 +} 2841 + 2842 +/* 2843 + * Check if "allbuf_lock" is set and return TRUE when it is and give an error 2844 + * message. 2845 + */ 2846 + int 2847 +allbuf_locked() 2848 +{ 2849 + if (allbuf_lock > 0) 2850 + { 2851 + EMSG(_("E811: Not allowed to change buffer information now")); 2852 + return TRUE; 2853 + } 2854 return FALSE; 2855 } 2856 #endif 2857 @@ -2508,6 +2533,20 @@ 2693 2858 } 2694 2859 mch_memmove(ccline.cmdbuff, p, (size_t)ccline.cmdlen + 1); … … 2711 2876 } 2712 2877 2713 @@ -2875,6 +2 899,7 @@2878 @@ -2875,6 +2914,7 @@ 2714 2879 prev_ccline = ccline; 2715 2880 ccline.cmdbuff = NULL; … … 2719 2884 2720 2885 /* 2721 @@ -3582,6 +36 07,7 @@2886 @@ -3582,6 +3622,7 @@ 2722 2887 ExpandInit(xp) 2723 2888 expand_T *xp; … … 2727 2892 #ifndef BACKSLASH_IN_FILENAME 2728 2893 xp->xp_shell = FALSE; 2729 @@ -4871,7 +4 897,7 @@2894 @@ -4871,7 +4912,7 @@ 2730 2895 if (s == NULL) 2731 2896 return FAIL; … … 2736 2901 if (all == NULL) 2737 2902 return FAIL; 2738 @@ -4912,9 +49 38,10 @@2903 @@ -4912,9 +4953,10 @@ 2739 2904 * newlines. Returns NULL for an error or no matches. 2740 2905 */ … … 2748 2913 expand_T xpc; 2749 2914 char_u *buf; 2750 @@ -4943,10 +49 70,10 @@2915 @@ -4943,10 +4985,10 @@ 2751 2916 { 2752 2917 add_pathsep(buf); … … 2762 2927 len += (int)STRLEN(p[i]) + 1; 2763 2928 2929 @@ -6020,9 +6062,7 @@ 2930 # endif 2931 return K_IGNORE; 2932 } 2933 - cmdwin_type = ccline.cmdfirstc; 2934 - if (cmdwin_type == NUL) 2935 - cmdwin_type = '-'; 2936 + cmdwin_type = get_cmdline_type(); 2937 2938 /* Create the command-line buffer empty. */ 2939 (void)do_ecmd(0, NULL, NULL, NULL, ECMD_ONE, ECMD_HIDE); 2940 @@ -6046,7 +6086,7 @@ 2941 /* Showing the prompt may have set need_wait_return, reset it. */ 2942 need_wait_return = FALSE; 2943 2944 - histtype = hist_char2type(ccline.cmdfirstc); 2945 + histtype = hist_char2type(cmdwin_type); 2946 if (histtype == HIST_CMD || histtype == HIST_DEBUG) 2947 { 2948 if (p_wc == TAB) 2764 2949 diff -Naur vim72.orig/src/feature.h vim72/src/feature.h 2765 2950 --- vim72.orig/src/feature.h 2008-08-06 04:00:39.000000000 -0700 2766 +++ vim72/src/feature.h 2009-03- 01 11:07:42.763326442 -08002951 +++ vim72/src/feature.h 2009-03-12 11:54:40.545495740 -0700 2767 2952 @@ -767,9 +767,13 @@ 2768 2953 … … 2783 2968 diff -Naur vim72.orig/src/fileio.c vim72/src/fileio.c 2784 2969 --- vim72.orig/src/fileio.c 2008-08-06 04:01:03.000000000 -0700 2785 +++ vim72/src/fileio.c 2009-03-01 11:10:34.002299762 -0800 2786 @@ -932,7 +932,10 @@ 2970 +++ vim72/src/fileio.c 2009-03-12 11:55:18.711941333 -0700 2971 @@ -69,7 +69,7 @@ 2972 static int au_find_group __ARGS((char_u *name)); 2973 2974 # define AUGROUP_DEFAULT -1 /* default autocmd group */ 2975 -# define AUGROUP_ERROR -2 /* errornouse autocmd group */ 2976 +# define AUGROUP_ERROR -2 /* erroneous autocmd group */ 2977 # define AUGROUP_ALL -3 /* all autocmd groups */ 2978 #endif 2979 2980 @@ -144,7 +144,9 @@ 2981 # endif 2982 #endif 2983 static int move_lines __ARGS((buf_T *frombuf, buf_T *tobuf)); 2984 - 2985 +#ifdef FEAT_AUTOCMD 2986 +static char *e_auchangedbuf = N_("E812: Autocommands changed buffer or buffer name"); 2987 +#endif 2988 2989 void 2990 filemess(buf, name, s, attr) 2991 @@ -295,6 +297,19 @@ 2992 int conv_restlen = 0; /* nr of bytes in conv_rest[] */ 2993 #endif 2994 2995 +#ifdef FEAT_AUTOCMD 2996 + /* Remember the initial values of curbuf, curbuf->b_ffname and 2997 + * curbuf->b_fname to detect whether they are altered as a result of 2998 + * executing nasty autocommands. Also check if "fname" and "sfname" 2999 + * point to one of these values. */ 3000 + buf_T *old_curbuf = curbuf; 3001 + char_u *old_b_ffname = curbuf->b_ffname; 3002 + char_u *old_b_fname = curbuf->b_fname; 3003 + int using_b_ffname = (fname == curbuf->b_ffname) 3004 + || (sfname == curbuf->b_ffname); 3005 + int using_b_fname = (fname == curbuf->b_fname) 3006 + || (sfname == curbuf->b_fname); 3007 +#endif 3008 write_no_eol_lnum = 0; /* in case it was set by the previous read */ 3009 3010 /* 3011 @@ -589,7 +604,21 @@ 3012 #ifdef FEAT_QUICKFIX 3013 if (!bt_dontwrite(curbuf)) 3014 #endif 3015 + { 3016 check_need_swap(newfile); 3017 +#ifdef FEAT_AUTOCMD 3018 + /* SwapExists autocommand may mess things up */ 3019 + if (curbuf != old_curbuf 3020 + || (using_b_ffname 3021 + && (old_b_ffname != curbuf->b_ffname)) 3022 + || (using_b_fname 3023 + && (old_b_fname != curbuf->b_fname))) 3024 + { 3025 + EMSG(_(e_auchangedbuf)); 3026 + return FAIL; 3027 + } 3028 +#endif 3029 + } 3030 if (dir_of_file_exists(fname)) 3031 filemess(curbuf, sfname, (char_u *)_("[New File]"), 0); 3032 else 3033 @@ -668,6 +697,17 @@ 3034 #endif 3035 { 3036 check_need_swap(newfile); 3037 +#ifdef FEAT_AUTOCMD 3038 + if (!read_stdin && (curbuf != old_curbuf 3039 + || (using_b_ffname && (old_b_ffname != curbuf->b_ffname)) 3040 + || (using_b_fname && (old_b_fname != curbuf->b_fname)))) 3041 + { 3042 + EMSG(_(e_auchangedbuf)); 3043 + if (!read_buffer) 3044 + close(fd); 3045 + return FAIL; 3046 + } 3047 +#endif 3048 #ifdef UNIX 3049 /* Set swap file protection bits after creating it. */ 3050 if (swap_mode > 0 && curbuf->b_ml.ml_mfp->mf_fname != NULL) 3051 @@ -698,7 +738,6 @@ 3052 { 3053 int m = msg_scroll; 3054 int n = msg_scrolled; 3055 - buf_T *old_curbuf = curbuf; 3056 3057 /* 3058 * The file must be closed again, the autocommands may want to change 3059 @@ -740,8 +779,13 @@ 3060 /* 3061 * Don't allow the autocommands to change the current buffer. 3062 * Try to re-open the file. 3063 + * 3064 + * Don't allow the autocommands to change the buffer name either 3065 + * (cd for example) if it invalidates fname or sfname. 3066 */ 3067 if (!read_stdin && (curbuf != old_curbuf 3068 + || (using_b_ffname && (old_b_ffname != curbuf->b_ffname)) 3069 + || (using_b_fname && (old_b_fname != curbuf->b_fname)) 3070 || (fd = mch_open((char *)fname, O_RDONLY | O_EXTRA, 0)) < 0)) 3071 { 3072 --no_wait_return; 3073 @@ -932,7 +976,10 @@ 2787 3074 else 2788 3075 { … … 2795 3082 fileformat = EOL_UNIX; /* binary: use Unix format */ 2796 3083 else if (*p_ffs == NUL) 2797 @@ -2211,7 +22 14,7 @@3084 @@ -2211,7 +2258,7 @@ 2798 3085 { 2799 3086 /* Use stderr for stdin, makes shell commands work. */ … … 2804 3091 #endif 2805 3092 2806 @@ -2341,11 +23 44,6 @@3093 @@ -2341,11 +2388,6 @@ 2807 3094 STRCAT(IObuff, _("[CR missing]")); 2808 3095 c = TRUE; … … 2816 3103 { 2817 3104 STRCAT(IObuff, _("[long lines split]")); 2818 @@ -2711,7 +27 09,7 @@3105 @@ -2711,7 +2753,7 @@ 2819 3106 { 2820 3107 if (!curbuf->b_marks_read && get_viminfo_parameter('\'') > 0 … … 2825 3112 /* Always set b_marks_read; needed when 'viminfo' is changed to include 2826 3113 * the ' parameter after opening a buffer. */ 2827 @@ -3451,7 +34 49,7 @@3114 @@ -3451,7 +3493,7 @@ 2828 3115 { 2829 3116 # ifdef UNIX … … 2834 3121 if (mch_stat((char *)IObuff, &st) < 0 2835 3122 || st.st_uid != st_old.st_uid 2836 @@ -4367,7 +4 365,7 @@3123 @@ -4367,7 +4409,7 @@ 2837 3124 || st.st_uid != st_old.st_uid 2838 3125 || st.st_gid != st_old.st_gid) … … 2843 3130 (void)mch_setperm(wfname, perm); 2844 3131 } 2845 @@ -5550,9 +5548,10 @@ 3132 @@ -5246,13 +5288,16 @@ 3133 /* Convert with iconv(). */ 3134 if (ip->bw_restlen > 0) 3135 { 3136 + char *fp; 3137 + 3138 /* Need to concatenate the remainder of the previous call and 3139 * the bytes of the current call. Use the end of the 3140 * conversion buffer for this. */ 3141 fromlen = len + ip->bw_restlen; 3142 - from = (char *)ip->bw_conv_buf + ip->bw_conv_buflen - fromlen; 3143 - mch_memmove((void *)from, ip->bw_rest, (size_t)ip->bw_restlen); 3144 - mch_memmove((void *)(from + ip->bw_restlen), buf, (size_t)len); 3145 + fp = (char *)ip->bw_conv_buf + ip->bw_conv_buflen - fromlen; 3146 + mch_memmove(fp, ip->bw_rest, (size_t)ip->bw_restlen); 3147 + mch_memmove(fp + ip->bw_restlen, buf, (size_t)len); 3148 + from = fp; 3149 tolen = ip->bw_conv_buflen - fromlen; 3150 } 3151 else 3152 @@ -5550,9 +5595,10 @@ 2846 3153 name = "ucs-4le"; /* FF FE 00 00 */ 2847 3154 len = 4; … … 2856 3163 } 2857 3164 else if (p[0] == 0xfe && p[1] == 0xff 2858 @@ -6031,9 +60 30,9 @@3165 @@ -6031,9 +6077,9 @@ 2859 3166 { 2860 3167 tbuf[FGETS_SIZE - 2] = NUL; … … 2868 3175 } while (tbuf[FGETS_SIZE - 2] != NUL && tbuf[FGETS_SIZE - 2] != '\n'); 2869 3176 } 2870 @@ -6107,12 +61 06,24 @@3177 @@ -6107,12 +6153,24 @@ 2871 3178 #ifdef HAVE_ACL 2872 3179 vim_acl_T acl; /* ACL from original file */ … … 2895 3202 /* 2896 3203 * Fail if the "from" file doesn't exist. Avoids that "to" is deleted. 2897 @@ -6120,6 +61 31,55 @@3204 @@ -6120,6 +6178,55 @@ 2898 3205 if (mch_stat((char *)from, &st) < 0) 2899 3206 return -1; … … 2951 3258 * Delete the "to" file, this is required on some systems to make the 2952 3259 * mch_rename() work, on other systems it makes sure that we don't have 2953 @@ -8523,6 +8583,7 @@ 3260 @@ -6260,7 +6367,7 @@ 3261 3262 if (!stuff_empty() || global_busy || !typebuf_typed() 3263 #ifdef FEAT_AUTOCMD 3264 - || autocmd_busy || curbuf_lock > 0 3265 + || autocmd_busy || curbuf_lock > 0 || allbuf_lock > 0 3266 #endif 3267 ) 3268 need_check_timestamps = TRUE; /* check later */ 3269 @@ -6462,8 +6569,10 @@ 3270 set_vim_var_string(VV_FCS_REASON, (char_u *)reason, -1); 3271 set_vim_var_string(VV_FCS_CHOICE, (char_u *)"", -1); 3272 # endif 3273 + ++allbuf_lock; 3274 n = apply_autocmds(EVENT_FILECHANGEDSHELL, 3275 buf->b_fname, buf->b_fname, FALSE, buf); 3276 + --allbuf_lock; 3277 busy = FALSE; 3278 if (n) 3279 { 3280 @@ -8523,6 +8632,7 @@ 2954 3281 char_u *save_sourcing_name; 2955 3282 linenr_T save_sourcing_lnum; … … 2959 3286 char_u *save_autocmd_match; 2960 3287 int save_autocmd_busy; 2961 @@ -8601,6 +8 662,7 @@3288 @@ -8601,6 +8711,7 @@ 2962 3289 * Save the autocmd_* variables and info about the current buffer. 2963 3290 */ … … 2967 3294 save_autocmd_match = autocmd_match; 2968 3295 save_autocmd_busy = autocmd_busy; 2969 @@ -8618,14 +8 680,15 @@3296 @@ -8618,14 +8729,15 @@ 2970 3297 if (fname != NULL && *fname != NUL) 2971 3298 autocmd_fname = fname; … … 2985 3312 /* 2986 3313 * Set the buffer number to be used for <abuf>. 2987 @@ -8810,6 +8 873,7 @@3314 @@ -8810,6 +8922,7 @@ 2988 3315 sourcing_lnum = save_sourcing_lnum; 2989 3316 vim_free(autocmd_fname); … … 2993 3320 autocmd_match = save_autocmd_match; 2994 3321 #ifdef FEAT_EVAL 2995 @@ -8918,7 + 8982,7 @@3322 @@ -8918,7 +9031,7 @@ 2996 3323 { 2997 3324 apc->curpat = NULL; … … 3002 3329 * buffer number. */ 3003 3330 if (ap->pat != NULL && ap->cmds != NULL 3004 @@ -9104,7 +9 168,7 @@3331 @@ -9104,7 +9217,7 @@ 3005 3332 set_context_in_autocmd(xp, arg, doautocmd) 3006 3333 expand_T *xp; … … 3013 3340 diff -Naur vim72.orig/src/fold.c vim72/src/fold.c 3014 3341 --- vim72.orig/src/fold.c 2008-08-06 04:01:12.000000000 -0700 3015 +++ vim72/src/fold.c 2009-03- 01 11:10:36.446457605 -08003342 +++ vim72/src/fold.c 2009-03-12 11:54:59.842732505 -0700 3016 3343 @@ -48,7 +48,7 @@ 3017 3344 static int foldFind __ARGS((garray_T *gap, linenr_T lnum, fold_T **fpp)); … … 3102 3429 diff -Naur vim72.orig/src/getchar.c vim72/src/getchar.c 3103 3430 --- vim72.orig/src/getchar.c 2008-07-22 09:57:48.000000000 -0700 3104 +++ vim72/src/getchar.c 2009-03- 01 11:12:29.677711691 -08003431 +++ vim72/src/getchar.c 2009-03-12 11:55:13.579612236 -0700 3105 3432 @@ -3816,7 +3816,11 @@ 3106 3433 int len = 1; … … 3135 3462 diff -Naur vim72.orig/src/globals.h vim72/src/globals.h 3136 3463 --- vim72.orig/src/globals.h 2008-07-26 04:53:29.000000000 -0700 3137 +++ vim72/src/globals.h 2009-03-01 11:10:39.066624388 -0800 3138 @@ -1022,6 +1022,7 @@ 3464 +++ vim72/src/globals.h 2009-03-12 11:55:13.699620338 -0700 3465 @@ -482,8 +482,10 @@ 3466 /* 3467 * While executing external commands or in Ex mode, should not insert GUI 3468 * events in the input buffer: Set hold_gui_events to non-zero. 3469 + * 3470 + * volatile because it is used in signal handler sig_sysmouse(). 3471 */ 3472 -EXTERN int hold_gui_events INIT(= 0); 3473 +EXTERN volatile int hold_gui_events INIT(= 0); 3474 3475 /* 3476 * When resizing the shell is postponed, remember the new size, and call 3477 @@ -597,7 +599,8 @@ 3478 EXTERN int really_exiting INIT(= FALSE); 3479 /* TRUE when we are sure to exit, e.g., after 3480 * a deadly signal */ 3481 -EXTERN int full_screen INIT(= FALSE); 3482 +/* volatile because it is used in signal handler deathtrap(). */ 3483 +EXTERN volatile int full_screen INIT(= FALSE); 3484 /* TRUE when doing full-screen output 3485 * otherwise only writing some messages */ 3486 3487 @@ -616,6 +619,11 @@ 3488 EXTERN int curbuf_lock INIT(= 0); 3489 /* non-zero when the current buffer can't be 3490 * changed. Used for FileChangedRO. */ 3491 +EXTERN int allbuf_lock INIT(= 0); 3492 + /* non-zero when no buffer name can be 3493 + * changed, no buffer can be deleted and 3494 + * current directory can't be changed. 3495 + * Used for SwapExists et al. */ 3496 #endif 3497 #ifdef FEAT_EVAL 3498 # define HAVE_SANDBOX 3499 @@ -739,10 +747,12 @@ 3500 */ 3501 EXTERN JMP_BUF lc_jump_env; /* argument to SETJMP() */ 3502 # ifdef SIGHASARG 3503 -EXTERN int lc_signal; /* catched signal number, 0 when no was signal 3504 - catched; used for mch_libcall() */ 3505 +/* volatile because it is used in signal handlers. */ 3506 +EXTERN volatile int lc_signal; /* caught signal number, 0 when no was signal 3507 + caught; used for mch_libcall() */ 3508 # endif 3509 -EXTERN int lc_active INIT(= FALSE); /* TRUE when lc_jump_env is valid. */ 3510 +/* volatile because it is used in signal handler deathtrap(). */ 3511 +EXTERN volatile int lc_active INIT(= FALSE); /* TRUE when lc_jump_env is valid. */ 3512 #endif 3513 3514 #if defined(FEAT_MBYTE) || defined(FEAT_POSTSCRIPT) 3515 @@ -986,7 +996,8 @@ 3516 EXTERN FILE *scriptout INIT(= NULL); /* stream to write script to */ 3517 EXTERN int read_cmd_fd INIT(= 0); /* fd to read commands from */ 3518 3519 -EXTERN int got_int INIT(= FALSE); /* set to TRUE when interrupt 3520 +/* volatile because it is used in signal handler catch_sigint(). */ 3521 +EXTERN volatile int got_int INIT(= FALSE); /* set to TRUE when interrupt 3522 signal occurred */ 3523 #ifdef USE_TERM_CONSOLE 3524 EXTERN int term_console INIT(= FALSE); /* set to TRUE when console used */ 3525 @@ -1022,6 +1033,7 @@ 3139 3526 #endif 3140 3527 #ifdef FEAT_AUTOCMD … … 3144 3531 EXTERN char_u *autocmd_match INIT(= NULL); /* name for <amatch> on cmdline */ 3145 3532 EXTERN int did_cursorhold INIT(= FALSE); /* set when CursorHold t'gerd */ 3146 @@ -1339,7 +13 40,6 @@3533 @@ -1339,7 +1351,6 @@ 3147 3534 3148 3535 #ifdef FEAT_NETBEANS_INTG … … 3152 3539 EXTERN int netbeansForcedQuit INIT(= 0);/* don't write modified files */ 3153 3540 EXTERN int netbeansReadFile INIT(= 1); /* OK to read from disk if != 0 */ 3154 @@ -1548,6 +15 48,14 @@3541 @@ -1548,6 +1559,14 @@ 3155 3542 EXTERN time_t starttime; 3156 3543 … … 3169 3556 diff -Naur vim72.orig/src/gui_at_sb.c vim72/src/gui_at_sb.c 3170 3557 --- vim72.orig/src/gui_at_sb.c 2004-06-07 07:32:25.000000000 -0700 3171 +++ vim72/src/gui_at_sb.c 2009-03- 01 11:08:45.631356893 -08003558 +++ vim72/src/gui_at_sb.c 2009-03-12 11:54:50.138110630 -0700 3172 3559 @@ -1078,6 +1078,12 @@ 3173 3560 Cardinal *num_params; /* unused */ … … 3195 3582 diff -Naur vim72.orig/src/gui.c vim72/src/gui.c 3196 3583 --- vim72.orig/src/gui.c 2008-07-27 12:32:14.000000000 -0700 3197 +++ vim72/src/gui.c 2009-03- 01 11:10:03.076318759 -08003584 +++ vim72/src/gui.c 2009-03-12 11:54:50.298121805 -0700 3198 3585 @@ -139,7 +139,7 @@ 3199 3586 /* The read returns when the child closes the pipe (or when … … 3288 3675 diff -Naur vim72.orig/src/gui_gtk_x11.c vim72/src/gui_gtk_x11.c 3289 3676 --- vim72.orig/src/gui_gtk_x11.c 2008-07-04 03:46:24.000000000 -0700 3290 +++ vim72/src/gui_gtk_x11.c 2009-03- 01 11:08:45.631356893 -08003677 +++ vim72/src/gui_gtk_x11.c 2009-03-12 11:54:50.138110630 -0700 3291 3678 @@ -4070,14 +4070,14 @@ 3292 3679 … … 3312 3699 diff -Naur vim72.orig/src/gui_x11.c vim72/src/gui_x11.c 3313 3700 --- vim72.orig/src/gui_x11.c 2008-06-08 08:13:45.000000000 -0700 3314 +++ vim72/src/gui_x11.c 2009-03- 01 11:12:34.666031009 -08003701 +++ vim72/src/gui_x11.c 2009-03-12 11:55:13.599613075 -0700 3315 3702 @@ -1587,6 +1587,8 @@ 3316 3703 XtCloseDisplay(gui.dpy); … … 3421 3808 diff -Naur vim72.orig/src/gui_xmdlg.c vim72/src/gui_xmdlg.c 3422 3809 --- vim72.orig/src/gui_xmdlg.c 2008-06-21 09:05:32.000000000 -0700 3423 +++ vim72/src/gui_xmdlg.c 2009-03- 01 11:08:45.635357731 -08003810 +++ vim72/src/gui_xmdlg.c 2009-03-12 11:54:50.142110910 -0700 3424 3811 @@ -369,10 +369,10 @@ 3425 3812 char buf[TEMP_BUF_SIZE]; … … 3577 3964 diff -Naur vim72.orig/src/gui_xmebw.c vim72/src/gui_xmebw.c 3578 3965 --- vim72.orig/src/gui_xmebw.c 2007-09-06 03:57:51.000000000 -0700 3579 +++ vim72/src/gui_xmebw.c 2009-03- 01 11:08:45.635357731 -08003966 +++ vim72/src/gui_xmebw.c 2009-03-12 11:54:50.142110910 -0700 3580 3967 @@ -1256,7 +1256,7 @@ 3581 3968 } … … 3604 3991 diff -Naur vim72.orig/src/if_cscope.c vim72/src/if_cscope.c 3605 3992 --- vim72.orig/src/if_cscope.c 2008-06-24 09:32:34.000000000 -0700 3606 +++ vim72/src/if_cscope.c 2009-03- 01 11:11:09.312562089 -08003993 +++ vim72/src/if_cscope.c 2009-03-12 11:55:05.383086185 -0700 3607 3994 @@ -74,7 +74,7 @@ 3608 3995 { "add", cs_add, … … 3647 4034 diff -Naur vim72.orig/src/if_cscope.h vim72/src/if_cscope.h 3648 4035 --- vim72.orig/src/if_cscope.h 2007-09-02 07:51:08.000000000 -0700 3649 +++ vim72/src/if_cscope.h 2009-03- 01 11:05:23.086376868 -08004036 +++ vim72/src/if_cscope.h 2009-03-12 11:54:28.876748429 -0700 3650 4037 @@ -42,17 +42,6 @@ 3651 4038 * f 7name Find this file … … 3668 4055 diff -Naur vim72.orig/src/if_perl.xs vim72/src/if_perl.xs 3669 4056 --- vim72.orig/src/if_perl.xs 2008-07-17 13:55:09.000000000 -0700 3670 +++ vim72/src/if_perl.xs 2009-03- 01 11:09:57.879986590 -08004057 +++ vim72/src/if_perl.xs 2009-03-12 11:54:50.278119291 -0700 3671 4058 @@ -136,6 +136,9 @@ 3672 4059 # define Perl_newXS_flags dll_Perl_newXS_flags … … 3719 4106 diff -Naur vim72.orig/src/if_python.c vim72/src/if_python.c 3720 4107 --- vim72.orig/src/if_python.c 2008-07-17 14:09:32.000000000 -0700 3721 +++ vim72/src/if_python.c 2009-03- 01 11:10:51.831442100 -08004108 +++ vim72/src/if_python.c 2009-03-12 11:54:59.902735857 -0700 3722 4109 @@ -531,6 +531,12 @@ 3723 4110 if (PythonMod_Init()) … … 3821 4208 diff -Naur vim72.orig/src/if_xcmdsrv.c vim72/src/if_xcmdsrv.c 3822 4209 --- vim72.orig/src/if_xcmdsrv.c 2008-07-18 06:05:03.000000000 -0700 3823 +++ vim72/src/if_xcmdsrv.c 2009-03- 01 11:08:00.312452856 -08004210 +++ vim72/src/if_xcmdsrv.c 2009-03-12 11:54:43.269670345 -0700 3824 4211 @@ -736,7 +736,7 @@ 3825 4212 + serverReply.ga_len; … … 3851 4238 diff -Naur vim72.orig/src/macros.h vim72/src/macros.h 3852 4239 --- vim72.orig/src/macros.h 2007-08-04 04:44:18.000000000 -0700 3853 +++ vim72/src/macros.h 2009-03- 01 11:11:54.531461377 -08004240 +++ vim72/src/macros.h 2009-03-12 11:55:13.411601900 -0700 3854 4241 @@ -127,15 +127,31 @@ 3855 4242 #ifdef FEAT_LANGMAP … … 3891 4278 diff -Naur vim72.orig/src/main.c vim72/src/main.c 3892 4279 --- vim72.orig/src/main.c 2008-07-24 01:40:56.000000000 -0700 3893 +++ vim72/src/main.c 2009-03- 01 11:08:45.635357731 -08004280 +++ vim72/src/main.c 2009-03-12 11:54:50.142110910 -0700 3894 4281 @@ -645,11 +645,12 @@ 3895 4282 … … 3953 4340 diff -Naur vim72.orig/src/mark.c vim72/src/mark.c 3954 4341 --- vim72.orig/src/mark.c 2008-08-08 15:06:49.000000000 -0700 3955 +++ vim72/src/mark.c 2009-03- 01 11:07:42.767327000 -08004342 +++ vim72/src/mark.c 2009-03-12 11:54:40.549496299 -0700 3956 4343 @@ -1627,15 +1627,17 @@ 3957 4344 … … 4022 4409 diff -Naur vim72.orig/src/mbyte.c vim72/src/mbyte.c 4023 4410 --- vim72.orig/src/mbyte.c 2008-07-14 05:38:05.000000000 -0700 4024 +++ vim72/src/mbyte.c 2009-03- 01 11:08:45.635357731 -08004411 +++ vim72/src/mbyte.c 2009-03-12 11:54:50.142110910 -0700 4025 4412 @@ -717,7 +717,7 @@ 4026 4413 * where mblen() returns 0 for invalid character. … … 4104 4491 diff -Naur vim72.orig/src/menu.c vim72/src/menu.c 4105 4492 --- vim72.orig/src/menu.c 2008-06-21 12:53:43.000000000 -0700 4106 +++ vim72/src/menu.c 2009-03- 01 11:05:17.942048889 -08004493 +++ vim72/src/menu.c 2009-03-12 11:54:28.852745635 -0700 4107 4494 @@ -1120,6 +1120,7 @@ 4108 4495 parent = menu; … … 4115 4502 diff -Naur vim72.orig/src/message.c vim72/src/message.c 4116 4503 --- vim72.orig/src/message.c 2008-07-09 11:24:55.000000000 -0700 4117 +++ vim72/src/message.c 2009-03- 01 11:12:39.674353959 -08004504 +++ vim72/src/message.c 2009-03-12 11:55:13.623615309 -0700 4118 4505 @@ -976,7 +976,7 @@ 4119 4506 } … … 4277 4664 diff -Naur vim72.orig/src/misc1.c vim72/src/misc1.c 4278 4665 --- vim72.orig/src/misc1.c 2008-07-12 12:20:53.000000000 -0700 4279 +++ vim72/src/misc1.c 2009-03- 01 11:07:42.767327000 -08004666 +++ vim72/src/misc1.c 2009-03-12 11:54:40.553496578 -0700 4280 4667 @@ -3245,9 +3245,9 @@ 4281 4668 … … 4292 4679 diff -Naur vim72.orig/src/misc2.c vim72/src/misc2.c 4293 4680 --- vim72.orig/src/misc2.c 2008-07-23 12:12:56.000000000 -0700 4294 +++ vim72/src/misc2.c 2009-03-01 11:12:37.162193043 -0800 4295 @@ -873,7 +873,7 @@ 4681 +++ vim72/src/misc2.c 2009-03-12 11:55:33.688900964 -0700 4682 @@ -496,7 +496,8 @@ 4683 { 4684 colnr_T len; 4685 #ifdef FEAT_VIRTUALEDIT 4686 - colnr_T oldcol = curwin->w_cursor.col + curwin->w_cursor.coladd; 4687 + colnr_T oldcol = curwin->w_cursor.col; 4688 + colnr_T oldcoladd = curwin->w_cursor.col + curwin->w_cursor.coladd; 4689 #endif 4690 4691 len = (colnr_T)STRLEN(ml_get_curline()); 4692 @@ -535,7 +536,13 @@ 4693 if (oldcol == MAXCOL) 4694 curwin->w_cursor.coladd = 0; 4695 else if (ve_flags == VE_ALL) 4696 - curwin->w_cursor.coladd = oldcol - curwin->w_cursor.col; 4697 + { 4698 + if (oldcoladd > curwin->w_cursor.col) 4699 + curwin->w_cursor.coladd = oldcoladd - curwin->w_cursor.col; 4700 + else 4701 + /* avoid weird number when there is a miscalculation or overflow */ 4702 + curwin->w_cursor.coladd = 0; 4703 + } 4704 #endif 4705 } 4706 4707 @@ -873,7 +880,7 @@ 4296 4708 /* 3. check for available memory: call mch_avail_mem() */ 4297 4709 if (mch_avail_mem(TRUE) < KEEP_ROOM && !releasing) … … 4302 4714 } 4303 4715 else 4304 @@ -1010,6 +101 0,9 @@4716 @@ -1010,6 +1017,9 @@ 4305 4717 # if defined(FEAT_PROFILE) 4306 4718 do_cmdline_cmd((char_u *)"profdel *"); … … 4312 4724 # ifdef FEAT_TITLE 4313 4725 free_titles(); 4314 @@ -1034,6 +10 37,9 @@4726 @@ -1034,6 +1044,9 @@ 4315 4727 free_regexp_stuff(); 4316 4728 free_tag_stuff(); … … 4322 4734 set_expr_line(NULL); 4323 4735 # endif 4324 @@ -1257,7 +12 63,6 @@4736 @@ -1257,7 +1270,6 @@ 4325 4737 return escaped_string; 4326 4738 } … … 4330 4742 * Return TRUE when 'shell' has "csh" in the tail. 4331 4743 */ 4332 @@ -1266,9 +127 1,7 @@4744 @@ -1266,9 +1278,7 @@ 4333 4745 { 4334 4746 return (strstr((char *)gettail(p_sh), "csh") != NULL); … … 4340 4752 * Escape "string" for use as a shell argument with system(). 4341 4753 * This uses single quotes, except when we know we need to use double qoutes 4342 @@ -1391,7 +1 394,6 @@4754 @@ -1391,7 +1401,6 @@ 4343 4755 4344 4756 return escaped_string; … … 4348 4760 /* 4349 4761 * Like vim_strsave(), but make all characters uppercase. 4350 @@ -2565,7 +25 67,7 @@4762 @@ -2565,7 +2574,7 @@ 4351 4763 int key; 4352 4764 int dlen = 0; … … 4357 4769 return 0; 4358 4770 4359 @@ -2601,10 +26 03,11 @@4771 @@ -2601,10 +2610,11 @@ 4360 4772 * returns 0 if there is no match. 4361 4773 */ … … 4371 4783 char_u *last_dash; 4372 4784 char_u *end_of_name; 4373 @@ -2672,7 +26 75,8 @@4785 @@ -2672,7 +2682,8 @@ 4374 4786 else 4375 4787 { … … 4381 4793 4382 4794 /* 4383 @@ -4698,7 +470 2,8 @@4795 @@ -4698,7 +4709,8 @@ 4384 4796 stackp->ffs_filearray_cur = i + 1; 4385 4797 ff_push(search_ctx, stackp); … … 4393 4805 diff -Naur vim72.orig/src/move.c vim72/src/move.c 4394 4806 --- vim72.orig/src/move.c 2008-07-12 09:26:47.000000000 -0700 4395 +++ vim72/src/move.c 2009-03- 01 11:08:10.621111607 -08004807 +++ vim72/src/move.c 2009-03-12 11:54:46.913903059 -0700 4396 4808 @@ -280,18 +280,20 @@ 4397 4809 … … 4443 4855 diff -Naur vim72.orig/src/nbdebug.c vim72/src/nbdebug.c 4444 4856 --- vim72.orig/src/nbdebug.c 2008-06-22 08:38:58.000000000 -0700 4445 +++ vim72/src/nbdebug.c 2009-03- 01 11:12:09.456415979 -08004857 +++ vim72/src/nbdebug.c 2009-03-12 11:55:13.487606370 -0700 4446 4858 @@ -33,7 +33,6 @@ 4447 4859 u_int nb_dlevel = 0; /* nb_debug verbosity level */ … … 4504 4916 diff -Naur vim72.orig/src/nbdebug.h vim72/src/nbdebug.h 4505 4917 --- vim72.orig/src/nbdebug.h 2008-06-22 07:31:50.000000000 -0700 4506 +++ vim72/src/nbdebug.h 2009-03- 01 11:12:09.456415979 -08004918 +++ vim72/src/nbdebug.h 2009-03-12 11:55:13.487606370 -0700 4507 4919 @@ -43,8 +43,6 @@ 4508 4920 … … 4536 4948 diff -Naur vim72.orig/src/netbeans.c vim72/src/netbeans.c 4537 4949 --- vim72.orig/src/netbeans.c 2008-07-13 09:19:54.000000000 -0700 4538 +++ vim72/src/netbeans.c 2009-03- 01 11:12:06.976258974 -08004950 +++ vim72/src/netbeans.c 2009-03-12 11:55:13.479606090 -0700 4539 4951 @@ -1043,7 +1043,7 @@ 4540 4952 nbdebug(("EVT: %s", buf)); … … 4652 5064 diff -Naur vim72.orig/src/normal.c vim72/src/normal.c 4653 5065 --- vim72.orig/src/normal.c 2008-07-31 13:03:08.000000000 -0700 4654 +++ vim72/src/normal.c 2009-03- 01 11:11:54.535461935 -08005066 +++ vim72/src/normal.c 2009-03-12 11:55:13.415602459 -0700 4655 5067 @@ -183,6 +183,8 @@ 4656 5068 static void nv_cursorhold __ARGS((cmdarg_T *cap)); … … 4930 5342 diff -Naur vim72.orig/src/ops.c vim72/src/ops.c 4931 5343 --- vim72.orig/src/ops.c 2008-06-21 13:08:59.000000000 -0700 4932 +++ vim72/src/ops.c 2009-03-01 11:10:00.468150579 -0800 4933 @@ -2209,12 +2209,15 @@ 5344 +++ vim72/src/ops.c 2009-03-12 11:55:27.544506216 -0700 5345 @@ -72,11 +72,11 @@ 5346 */ 5347 struct block_def 5348 { 5349 - int startspaces; /* 'extra' cols of first char */ 5350 - int endspaces; /* 'extra' cols of first char */ 5351 + int startspaces; /* 'extra' cols before first char */ 5352 + int endspaces; /* 'extra' cols after last char */ 5353 int textlen; /* chars in block */ 5354 - char_u *textstart; /* pointer to 1st char in block */ 5355 - colnr_T textcol; /* cols of chars (at least part.) in block */ 5356 + char_u *textstart; /* pointer to 1st char (partially) in block */ 5357 + colnr_T textcol; /* index of chars (partially) in block */ 5358 colnr_T start_vcol; /* start col of 1st char wholly inside block */ 5359 colnr_T end_vcol; /* start col of 1st char wholly after block */ 5360 #ifdef FEAT_VISUALEXTRA 5361 @@ -382,15 +382,14 @@ 5362 { 5363 int left = (oap->op_type == OP_LSHIFT); 5364 int oldstate = State; 5365 - int total, split; 5366 - char_u *newp, *oldp, *midp, *ptr; 5367 + int total; 5368 + char_u *newp, *oldp; 5369 int oldcol = curwin->w_cursor.col; 5370 int p_sw = (int)curbuf->b_p_sw; 5371 int p_ts = (int)curbuf->b_p_ts; 5372 struct block_def bd; 5373 - int internal = 0; 5374 int incr; 5375 - colnr_T vcol, col = 0, ws_vcol; 5376 + colnr_T ws_vcol; 5377 int i = 0, j = 0; 5378 int len; 5379 5380 @@ -456,67 +455,89 @@ 5381 } 5382 else /* left */ 5383 { 5384 - vcol = oap->start_vcol; 5385 - /* walk vcol past ws to be removed */ 5386 - for (midp = oldp + bd.textcol; 5387 - vcol < (oap->start_vcol + total) && vim_iswhite(*midp); ) 5388 - { 5389 - incr = lbr_chartabsize_adv(&midp, (colnr_T)vcol); 5390 - vcol += incr; 5391 - } 5392 - /* internal is the block-internal ws replacing a split TAB */ 5393 - if (vcol > (oap->start_vcol + total)) 5394 - { 5395 - /* we have to split the TAB *(midp-1) */ 5396 - internal = vcol - (oap->start_vcol + total); 5397 - } 5398 - /* if 'expandtab' is not set, use TABs */ 5399 + colnr_T destination_col; /* column to which text in block will 5400 + be shifted */ 5401 + char_u *verbatim_copy_end; /* end of the part of the line which is 5402 + copied verbatim */ 5403 + colnr_T verbatim_copy_width;/* the (displayed) width of this part 5404 + of line */ 5405 + unsigned fill; /* nr of spaces that replace a TAB */ 5406 + unsigned new_line_len; /* the length of the line after the 5407 + block shift */ 5408 + size_t block_space_width; 5409 + size_t shift_amount; 5410 + char_u *non_white = bd.textstart; 5411 + colnr_T non_white_col; 5412 5413 - split = bd.startspaces + internal; 5414 - if (split > 0) 5415 - { 5416 - if (!curbuf->b_p_et) 5417 - { 5418 - for (ptr = oldp, col = 0; ptr < oldp+bd.textcol; ) 5419 - col += lbr_chartabsize_adv(&ptr, (colnr_T)col); 5420 + /* 5421 + * Firstly, let's find the first non-whitespace character that is 5422 + * displayed after the block's start column and the character's column 5423 + * number. Also, let's calculate the width of all the whitespace 5424 + * characters that are displayed in the block and precede the searched 5425 + * non-whitespace character. 5426 + */ 5427 5428 - /* col+1 now equals the start col of the first char of the 5429 - * block (may be < oap.start_vcol if we're splitting a TAB) */ 5430 - i = ((col % p_ts) + split) / p_ts; /* number of tabs */ 5431 - } 5432 - if (i) 5433 - j = ((col % p_ts) + split) % p_ts; /* number of spp */ 5434 - else 5435 - j = split; 5436 - } 5437 + /* If "bd.startspaces" is set, "bd.textstart" points to the character, 5438 + * the part of which is displayed at the block's beginning. Let's start 5439 + * searching from the next character. */ 5440 + if (bd.startspaces) 5441 + mb_ptr_adv(non_white); 5442 5443 - newp = alloc_check(bd.textcol + i + j + (unsigned)STRLEN(midp) + 1); 5444 - if (newp == NULL) 5445 - return; 5446 - vim_memset(newp, NUL, (size_t)(bd.textcol + i + j + STRLEN(midp) + 1)); 5447 + /* The character's column is in "bd.start_vcol". */ 5448 + non_white_col = bd.start_vcol; 5449 5450 - /* copy first part we want to keep */ 5451 - mch_memmove(newp, oldp, (size_t)bd.textcol); 5452 - /* Now copy any TABS and spp to ensure correct alignment! */ 5453 - while (vim_iswhite(*midp)) 5454 + while (vim_iswhite(*non_white)) 5455 { 5456 - if (*midp == TAB) 5457 - i++; 5458 - else /*space */ 5459 - j++; 5460 - midp++; 5461 + incr = lbr_chartabsize_adv(&non_white, non_white_col); 5462 + non_white_col += incr; 5463 } 5464 - /* We might have an extra TAB worth of spp now! */ 5465 - if (j / p_ts && !curbuf->b_p_et) 5466 + 5467 + block_space_width = non_white_col - oap->start_vcol; 5468 + /* We will shift by "total" or "block_space_width", whichever is less. 5469 + */ 5470 + shift_amount = (block_space_width < total? block_space_width: total); 5471 + 5472 + /* The column to which we will shift the text. */ 5473 + destination_col = non_white_col - shift_amount; 5474 + 5475 + /* Now let's find out how much of the beginning of the line we can 5476 + * reuse without modification. */ 5477 + verbatim_copy_end = bd.textstart; 5478 + verbatim_copy_width = bd.start_vcol; 5479 + 5480 + /* If "bd.startspaces" is set, "bd.textstart" points to the character 5481 + * preceding the block. We have to subtract its width to obtain its 5482 + * column number. */ 5483 + if (bd.startspaces) 5484 + verbatim_copy_width -= bd.start_char_vcols; 5485 + while (verbatim_copy_width < destination_col) 5486 { 5487 - i++; 5488 - j -= p_ts; 5489 + incr = lbr_chartabsize(verbatim_copy_end, verbatim_copy_width); 5490 + if (verbatim_copy_width + incr > destination_col) 5491 + break; 5492 + verbatim_copy_width += incr; 5493 + mb_ptr_adv(verbatim_copy_end); 5494 } 5495 - copy_chars(newp + bd.textcol, (size_t)i, TAB); 5496 - copy_spaces(newp + bd.textcol + i, (size_t)j); 5497 5498 - /* the end */ 5499 - STRMOVE(newp + STRLEN(newp), midp); 5500 + /* If "destination_col" is different from the width of the initial 5501 + * part of the line that will be copied, it means we encountered a tab 5502 + * character, which we will have to partly replace with spaces. */ 5503 + fill = destination_col - verbatim_copy_width; 5504 + 5505 + /* The replacement line will consist of: 5506 + * - the beginning of the original line up to "verbatim_copy_end", 5507 + * - "fill" number of spaces, 5508 + * - the rest of the line, pointed to by non_white. */ 5509 + new_line_len = (unsigned)(verbatim_copy_end - oldp) 5510 + + fill 5511 + + (unsigned)STRLEN(non_white) + 1; 5512 + 5513 + newp = alloc_check(new_line_len); 5514 + if (newp == NULL) 5515 + return; 5516 + mch_memmove(newp, oldp, (size_t)(verbatim_copy_end - oldp)); 5517 + copy_spaces(newp + (verbatim_copy_end - oldp), (size_t)fill); 5518 + STRMOVE(newp + (verbatim_copy_end - oldp) + fill, non_white); 5519 } 5520 /* replace the line */ 5521 ml_replace(curwin->w_cursor.lnum, newp, FALSE); 5522 @@ -2209,12 +2230,15 @@ 4934 5523 { 4935 5524 for (; pos.lnum <= oap->end.lnum; ++pos.lnum) … … 4949 5538 char_u *ptr = ml_get_buf(curbuf, pos.lnum, FALSE); 4950 5539 5540 @@ -4848,7 +4872,8 @@ 5541 * - textlen includes the first/last char to be (partly) deleted 5542 * - start/endspaces is the number of columns that are taken by the 5543 * first/last deleted char minus the number of columns that have to be 5544 - * deleted. for yank and tilde: 5545 + * deleted. 5546 + * for yank and tilde: 5547 * - textlen includes the first/last char to be wholly yanked 5548 * - start/endspaces is the number of columns of the first/last yanked char 5549 * that are to be yanked. 4951 5550 diff -Naur vim72.orig/src/option.c vim72/src/option.c 4952 5551 --- vim72.orig/src/option.c 2008-07-18 06:05:33.000000000 -0700 4953 +++ vim72/src/option.c 2009-03- 01 11:11:54.539461935 -08005552 +++ vim72/src/option.c 2009-03-12 11:55:13.683619779 -0700 4954 5553 @@ -2593,13 +2593,13 @@ 4955 5554 #ifdef FEAT_VIMINFO … … 5048 5647 } 5049 5648 } 5050 @@ -5796,7 +5827,7 @@ 5649 @@ -5766,14 +5797,28 @@ 5650 /* load or unload key mapping tables */ 5651 errmsg = keymap_init(); 5652 5653 - /* When successfully installed a new keymap switch on using it. */ 5654 - if (*curbuf->b_p_keymap != NUL && errmsg == NULL) 5655 + if (errmsg == NULL) 5656 { 5657 - curbuf->b_p_iminsert = B_IMODE_LMAP; 5658 - if (curbuf->b_p_imsearch != B_IMODE_USE_INSERT) 5659 - curbuf->b_p_imsearch = B_IMODE_LMAP; 5660 - set_iminsert_global(); 5661 - set_imsearch_global(); 5662 + if (*curbuf->b_p_keymap != NUL) 5663 + { 5664 + /* Installed a new keymap, switch on using it. */ 5665 + curbuf->b_p_iminsert = B_IMODE_LMAP; 5666 + if (curbuf->b_p_imsearch != B_IMODE_USE_INSERT) 5667 + curbuf->b_p_imsearch = B_IMODE_LMAP; 5668 + } 5669 + else 5670 + { 5671 + /* Cleared the keymap, may reset 'iminsert' and 'imsearch'. */ 5672 + if (curbuf->b_p_iminsert == B_IMODE_LMAP) 5673 + curbuf->b_p_iminsert = B_IMODE_NONE; 5674 + if (curbuf->b_p_imsearch == B_IMODE_LMAP) 5675 + curbuf->b_p_imsearch = B_IMODE_USE_INSERT; 5676 + } 5677 + if ((opt_flags & OPT_LOCAL) == 0) 5678 + { 5679 + set_iminsert_global(); 5680 + set_imsearch_global(); 5681 + } 5682 # ifdef FEAT_WINDOWS 5683 status_redraw_curbuf(); 5684 # endif 5685 @@ -5796,7 +5841,7 @@ 5051 5686 else 5052 5687 curbuf->b_p_tx = FALSE; … … 5057 5692 /* update flag in swap file */ 5058 5693 ml_setflags(curbuf); 5059 @@ -6055,6 +6 086,7 @@5694 @@ -6055,6 +6100,7 @@ 5060 5695 errmsg = (char_u *)N_("E596: Invalid font(s)"); 5061 5696 } … … 5065 5700 # ifdef FEAT_XFONTSET 5066 5701 else if (varp == &p_guifontset) 5067 @@ -6063,6 +6 095,7 @@5702 @@ -6063,6 +6109,7 @@ 5068 5703 errmsg = (char_u *)N_("E597: can't select fontset"); 5069 5704 else if (gui.in_use && gui_init_font(p_guifontset, TRUE) != OK) … … 5073 5708 # endif 5074 5709 # ifdef FEAT_MBYTE 5075 @@ -6072,6 +61 05,7 @@5710 @@ -6072,6 +6119,7 @@ 5076 5711 errmsg = (char_u *)N_("E533: can't select wide font"); 5077 5712 else if (gui_get_wide_font() == FAIL) … … 5081 5716 # endif 5082 5717 #endif 5083 @@ -6133,13 +61 67,24 @@5718 @@ -6133,13 +6181,24 @@ 5084 5719 #ifdef FEAT_GUI 5085 5720 /* 'guioptions' */ … … 5106 5741 5107 5742 #if defined(FEAT_MOUSE_TTY) && (defined(UNIX) || defined(VMS)) 5108 @@ -6717,7 +67 62,11 @@5743 @@ -6717,7 +6776,11 @@ 5109 5744 5110 5745 if (curwin->w_curswant != MAXCOL) … … 5119 5754 return errmsg; 5120 5755 } 5121 @@ -7105,22 +71 54,28 @@5756 @@ -7105,22 +7168,28 @@ 5122 5757 curbuf->b_did_warn = FALSE; 5123 5758 … … 5155 5790 5156 5791 /* when 'bin' is set also set some other options */ 5157 @@ -7128,7 +71 83,7 @@5792 @@ -7128,7 +7197,7 @@ 5158 5793 { 5159 5794 set_options_bin(old_value, curbuf->b_p_bin, opt_flags); … … 5164 5799 } 5165 5800 5166 @@ -7279,7 +73 34,7 @@5801 @@ -7279,7 +7348,7 @@ 5167 5802 if (!value) 5168 5803 save_file_ff(curbuf); /* Buffer is unchanged */ … … 5173 5808 #ifdef FEAT_AUTOCMD 5174 5809 modified_was_set = value; 5175 @@ -7714,7 +77 69,7 @@5810 @@ -7714,7 +7783,7 @@ 5176 5811 newFoldLevel(); 5177 5812 } … … 5182 5817 { 5183 5818 foldUpdateAll(curwin); 5184 @@ -7974,6 +80 29,11 @@5819 @@ -7974,6 +8043,11 @@ 5185 5820 else /* curwin->w_p_scr > curwin->w_height */ 5186 5821 curwin->w_p_scr = curwin->w_height; … … 5194 5829 { 5195 5830 errmsg = e_positive; 5196 @@ -8227,13 +8 287,13 @@5831 @@ -8227,13 +8301,13 @@ 5197 5832 { 5198 5833 if (number == 0 && string != NULL) … … 5211 5846 /* There's another character after zeros or the string 5212 5847 * is empty. In both cases, we are trying to set a 5213 @@ -8323,7 +83 83,7 @@5848 @@ -8323,7 +8397,7 @@ 5214 5849 { 5215 5850 --arg; /* put arg at the '<' */ … … 5220 5855 key = 0; 5221 5856 } 5222 @@ -10093,25 +101 53,110 @@5857 @@ -10093,25 +10167,110 @@ 5223 5858 5224 5859 #ifdef FEAT_LANGMAP … … 5238 5873 + * langmap_entry_T. This does the same as langmap_mapchar[] for characters >= 5239 5874 + * 256. 5240 +*/5875 */ 5241 5876 +# ifdef FEAT_MBYTE 5242 5877 +/* 5243 5878 + * With multi-byte support use growarray for 'langmap' chars >= 256 5244 5879 + */ 5245 5880 +typedef struct 5246 5881 +{ … … 5340 5975 5341 5976 /* 5342 @@ -10125,7 +102 70,10 @@5977 @@ -10125,7 +10284,10 @@ 5343 5978 char_u *p2; 5344 5979 int from, to; … … 5352 5987 for (p = p_langmap; p[0] != NUL; ) 5353 5988 { 5354 @@ -10175,7 +103 23,13 @@5989 @@ -10175,7 +10337,13 @@ 5355 5990 transchar(from)); 5356 5991 return; … … 5369 6004 diff -Naur vim72.orig/src/os_unix.c vim72/src/os_unix.c 5370 6005 --- vim72.orig/src/os_unix.c 2008-08-06 04:01:40.000000000 -0700 5371 +++ vim72/src/os_unix.c 2009-03-01 11:12:24.577385947 -0800 5372 @@ -315,12 +315,15 @@ 6006 +++ vim72/src/os_unix.c 2009-03-12 11:55:13.671618662 -0700 6007 @@ -181,7 +181,8 @@ 6008 && defined(FEAT_TITLE) && !defined(FEAT_GUI_GTK) 6009 # define SET_SIG_ALARM 6010 static RETSIGTYPE sig_alarm __ARGS(SIGPROTOARG); 6011 -static int sig_alarm_called; 6012 +/* volatile because it is used in signal handler sig_alarm(). */ 6013 +static volatile int sig_alarm_called; 6014 #endif 6015 static RETSIGTYPE deathtrap __ARGS(SIGPROTOARG); 6016 6017 @@ -201,13 +202,16 @@ 6018 # define SIG_ERR ((RETSIGTYPE (*)())-1) 6019 #endif 6020 6021 -static int do_resize = FALSE; 6022 +/* volatile because it is used in signal handler sig_winch(). */ 6023 +static volatile int do_resize = FALSE; 6024 #ifndef __EMX__ 6025 static char_u *extra_shell_arg = NULL; 6026 static int show_shell_mess = TRUE; 6027 #endif 6028 -static int deadly_signal = 0; /* The signal we caught */ 6029 -static int in_mch_delay = FALSE; /* sleeping in mch_delay() */ 6030 +/* volatile because it is used in signal handler deathtrap(). */ 6031 +static volatile int deadly_signal = 0; /* The signal we caught */ 6032 +/* volatile because it is used in signal handler deathtrap(). */ 6033 +static volatile int in_mch_delay = FALSE; /* sleeping in mch_delay() */ 6034 6035 static int curr_tmode = TMODE_COOK; /* contains current terminal mode */ 6036 6037 @@ -315,12 +319,15 @@ 5373 6038 {-1, "Unknown!", FALSE} 5374 6039 }; … … 5387 6052 RealWaitForChar(read_cmd_fd, p_wd, NULL); 5388 6053 } 5389 @@ -2905,7 +2908,7 @@ 6054 @@ -799,7 +806,7 @@ 6055 #endif 6056 6057 /* 6058 - * We need correct potatotypes for a signal function, otherwise mean compilers 6059 + * We need correct prototypes for a signal function, otherwise mean compilers 6060 * will barf when the second argument to signal() is ``wrong''. 6061 * Let me try it with a few tricky defines from my own osdef.h (jw). 6062 */ 6063 @@ -1065,13 +1072,18 @@ 6064 SIGRETURN; 6065 } 6066 6067 -#ifdef _REENTRANT 6068 +#if defined(_REENTRANT) && defined(SIGCONT) 6069 /* 6070 * On Solaris with multi-threading, suspending might not work immediately. 6071 * Catch the SIGCONT signal, which will be used as an indication whether the 6072 * suspending has been done or not. 6073 + * 6074 + * On Linux, signal is not always handled immediately either. 6075 + * See https://bugs.launchpad.net/bugs/291373 6076 + * 6077 + * volatile because it is used in in signal handler sigcont_handler(). 6078 */ 6079 -static int sigcont_received; 6080 +static volatile int sigcont_received; 6081 static RETSIGTYPE sigcont_handler __ARGS(SIGPROTOARG); 6082 6083 /* 6084 @@ -1115,15 +1127,28 @@ 6085 } 6086 # endif 6087 6088 -# ifdef _REENTRANT 6089 +# if defined(_REENTRANT) && defined(SIGCONT) 6090 sigcont_received = FALSE; 6091 # endif 6092 kill(0, SIGTSTP); /* send ourselves a STOP signal */ 6093 -# ifdef _REENTRANT 6094 - /* When we didn't suspend immediately in the kill(), do it now. Happens 6095 - * on multi-threaded Solaris. */ 6096 - if (!sigcont_received) 6097 - pause(); 6098 +# if defined(_REENTRANT) && defined(SIGCONT) 6099 + /* 6100 + * Wait for the SIGCONT signal to be handled. It generally happens 6101 + * immediately, but somehow not all the time. Do not call pause() 6102 + * because there would be race condition which would hang Vim if 6103 + * signal happened in between the test of sigcont_received and the 6104 + * call to pause(). If signal is not yet received, call sleep(0) 6105 + * to just yield CPU. Signal should then be received. If somehow 6106 + * it's still not received, sleep 1, 2, 3 ms. Don't bother waiting 6107 + * further if signal is not received after 1+2+3+4 ms (not expected 6108 + * to happen). 6109 + */ 6110 + { 6111 + long wait; 6112 + for (wait = 0; !sigcont_received && wait <= 3L; wait++) 6113 + /* Loop is not entered most of the time */ 6114 + mch_delay(wait, FALSE); 6115 + } 6116 # endif 6117 6118 # ifdef FEAT_TITLE 6119 @@ -1172,7 +1197,7 @@ 6120 #ifdef SIGTSTP 6121 signal(SIGTSTP, restricted ? SIG_IGN : SIG_DFL); 6122 #endif 6123 -#ifdef _REENTRANT 6124 +#if defined(_REENTRANT) && defined(SIGCONT) 6125 signal(SIGCONT, sigcont_handler); 6126 #endif 6127 6128 @@ -1231,7 +1256,7 @@ 6129 reset_signals() 6130 { 6131 catch_signals(SIG_DFL, SIG_DFL); 6132 -#ifdef _REENTRANT 6133 +#if defined(_REENTRANT) && defined(SIGCONT) 6134 /* SIGCONT isn't in the list, because its default action is ignore */ 6135 signal(SIGCONT, SIG_DFL); 6136 #endif 6137 @@ -2905,7 +2930,7 @@ 5390 6138 * Ignore any errors. 5391 6139 */ … … 5396 6144 #endif 5397 6145 } 5398 @@ -2936,7 +29 39,8 @@6146 @@ -2936,7 +2961,8 @@ 5399 6147 } 5400 6148 # endif … … 5406 6154 # ifdef FEAT_XCLIPBOARD 5407 6155 && x11_display != xterm_dpy 5408 @@ -3926,9 +39 30,9 @@6156 @@ -3926,9 +3952,9 @@ 5409 6157 */ 5410 6158 if (fd >= 0) … … 5419 6167 /* Don't need this now that we've duplicated it */ 5420 6168 close(fd); 5421 @@ -3946,7 +39 50,17 @@6169 @@ -3946,7 +3972,17 @@ 5422 6170 * children can be kill()ed. Don't do this when using pipes, 5423 6171 * because stdin is not a tty, we would lose /dev/tty. */ … … 5437 6185 # ifdef FEAT_GUI 5438 6186 if (pty_slave_fd >= 0) 5439 @@ -3996,13 +40 10,13 @@6187 @@ -3996,13 +4032,13 @@ 5440 6188 5441 6189 /* set up stdin/stdout/stderr for the child */ … … 5454 6202 5455 6203 close(pty_slave_fd); /* has been dupped, close it now */ 5456 @@ -4013,13 +40 27,13 @@6204 @@ -4013,13 +4049,13 @@ 5457 6205 /* set up stdin for the child */ 5458 6206 close(fd_toshell[1]); … … 5470 6218 5471 6219 # ifdef FEAT_GUI 5472 @@ -4027,7 +40 41,7 @@6220 @@ -4027,7 +4063,7 @@ 5473 6221 { 5474 6222 /* set up stderr for the child */ … … 5479 6227 # endif 5480 6228 } 5481 @@ -4078,6 +4 092,9 @@6229 @@ -4078,6 +4114,9 @@ 5482 6230 int fromshell_fd; 5483 6231 garray_T ga; … … 5489 6237 # ifdef FEAT_GUI 5490 6238 if (pty_master_fd >= 0) 5491 @@ -4158,7 +41 75,8 @@6239 @@ -4158,7 +4197,8 @@ 5492 6240 && (lnum != 5493 6241 curbuf->b_ml.ml_line_count … … 5499 6247 if (lnum > curbuf->b_op_end.lnum) 5500 6248 { 5501 @@ -4186,7 +42 04,9 @@6249 @@ -4186,7 +4226,9 @@ 5502 6250 ga_init2(&ga, 1, BUFLEN); 5503 6251 … … 5510 6258 { 5511 6259 /* 5512 @@ -4199,25 +42 19,34 @@6260 @@ -4199,25 +4241,34 @@ 5513 6261 * that a typed password is echoed for ssh or gpg command. 5514 6262 * Don't get characters when the child has already … … 5553 6301 * For pipes: 5554 6302 * Check for CTRL-C: send interrupt signal to child. 5555 @@ -4319,9 +43 48,9 @@6303 @@ -4319,9 +4370,9 @@ 5556 6304 { 5557 6305 ta_len -= len; … … 5564 6312 5565 6313 if (got_int) 5566 @@ -4429,6 +44 58,25 @@6314 @@ -4429,6 +4480,25 @@ 5567 6315 out_flush(); 5568 6316 if (got_int) … … 5590 6338 5591 6339 /* If we already detected the child has finished break the 5592 @@ -6814,7 +6862,8 @@ 6340 @@ -5851,7 +5921,9 @@ 6341 * we are going to suspend or starting an external process 6342 * so we shouldn't have problem with this 6343 */ 6344 +# ifdef SIGTSTP 6345 signal(SIGTSTP, restricted ? SIG_IGN : SIG_DFL); 6346 +# endif 6347 return 1; /* succeed */ 6348 } 6349 if (gpm_fd == -2) 6350 @@ -6814,7 +6886,8 @@ 5593 6351 if (xsmp_icefd != -1) 5594 6352 { … … 5602 6360 diff -Naur vim72.orig/src/proto/eval.pro vim72/src/proto/eval.pro 5603 6361 --- vim72.orig/src/proto/eval.pro 2008-08-09 07:31:25.000000000 -0700 5604 +++ vim72/src/proto/eval.pro 2009-03- 01 11:08:25.566070959 -08006362 +++ vim72/src/proto/eval.pro 2009-03-12 11:54:47.005909205 -0700 5605 6363 @@ -17,7 +17,7 @@ 5606 6364 int eval_to_bool __ARGS((char_u *arg, int *error, char_u **nextcmd, int skip)); … … 5644 6402 diff -Naur vim72.orig/src/proto/ex_cmds.pro vim72/src/proto/ex_cmds.pro 5645 6403 --- vim72.orig/src/proto/ex_cmds.pro 2008-08-09 07:31:25.000000000 -0700 5646 +++ vim72/src/proto/ex_cmds.pro 2009-03- 01 11:12:37.166193602 -08006404 +++ vim72/src/proto/ex_cmds.pro 2009-03-12 11:55:13.611614471 -0700 5647 6405 @@ -11,7 +11,7 @@ 5648 6406 char_u *make_filter_cmd __ARGS((char_u *cmd, char_u *itmp, char_u *otmp)); … … 5664 6422 diff -Naur vim72.orig/src/proto/ex_getln.pro vim72/src/proto/ex_getln.pro 5665 6423 --- vim72.orig/src/proto/ex_getln.pro 2008-08-09 07:31:28.000000000 -0700 5666 +++ vim72/src/proto/ex_getln.pro 2009-03-01 11:08:34.934671881 -0800 5667 @@ -31,7 +31,7 @@ 6424 +++ vim72/src/proto/ex_getln.pro 2009-03-12 11:55:13.703620617 -0700 6425 @@ -4,6 +4,7 @@ 6426 int text_locked __ARGS((void)); 6427 void text_locked_msg __ARGS((void)); 6428 int curbuf_locked __ARGS((void)); 6429 +int allbuf_locked __ARGS((void)); 6430 char_u *getexline __ARGS((int c, void *dummy, int indent)); 6431 char_u *getexmodeline __ARGS((int promptc, void *dummy, int indent)); 6432 int cmdline_overstrike __ARGS((void)); 6433 @@ -31,7 +32,7 @@ 5668 6434 void set_cmd_context __ARGS((expand_T *xp, char_u *str, int len, int col)); 5669 6435 int expand_cmdline __ARGS((expand_T *xp, char_u *str, int col, int *matchcount, char_u ***matches)); … … 5676 6442 diff -Naur vim72.orig/src/proto/mark.pro vim72/src/proto/mark.pro 5677 6443 --- vim72.orig/src/proto/mark.pro 2008-08-09 07:31:36.000000000 -0700 5678 +++ vim72/src/proto/mark.pro 2009-03- 01 11:07:42.771327000 -08006444 +++ vim72/src/proto/mark.pro 2009-03-12 11:54:40.553496578 -0700 5679 6445 @@ -26,5 +26,5 @@ 5680 6446 void write_viminfo_filemarks __ARGS((FILE *fp)); … … 5686 6452 diff -Naur vim72.orig/src/proto/misc2.pro vim72/src/proto/misc2.pro 5687 6453 --- vim72.orig/src/proto/misc2.pro 2008-08-09 07:31:40.000000000 -0700 5688 +++ vim72/src/proto/misc2.pro 2009-03- 01 11:10:23.869653024 -08006454 +++ vim72/src/proto/misc2.pro 2009-03-12 11:54:56.454515435 -0700 5689 6455 @@ -59,7 +59,7 @@ 5690 6456 int handle_x_keys __ARGS((int key)); … … 5698 6464 diff -Naur vim72.orig/src/proto/netbeans.pro vim72/src/proto/netbeans.pro 5699 6465 --- vim72.orig/src/proto/netbeans.pro 2008-08-09 07:31:56.000000000 -0700 5700 +++ vim72/src/proto/netbeans.pro 2009-03- 01 11:10:39.070626065 -08006466 +++ vim72/src/proto/netbeans.pro 2009-03-12 11:54:59.854733063 -0700 5701 6467 @@ -11,7 +11,7 @@ 5702 6468 void netbeans_frame_moved __ARGS((int new_x, int new_y)); … … 5710 6476 diff -Naur vim72.orig/src/proto/option.pro vim72/src/proto/option.pro 5711 6477 --- vim72.orig/src/proto/option.pro 2008-08-09 07:31:43.000000000 -0700 5712 +++ vim72/src/proto/option.pro 2009-03- 01 11:11:54.539461935 -08006478 +++ vim72/src/proto/option.pro 2009-03-12 11:55:13.419602459 -0700 5713 6479 @@ -44,6 +44,7 @@ 5714 6480 void set_context_in_set_cmd __ARGS((expand_T *xp, char_u *arg, int opt_flags)); … … 5721 6487 diff -Naur vim72.orig/src/pty.c vim72/src/pty.c 5722 6488 --- vim72.orig/src/pty.c 2008-06-21 11:52:58.000000000 -0700 5723 +++ vim72/src/pty.c 2009-03- 01 11:05:15.481889369 -08006489 +++ vim72/src/pty.c 2009-03-12 11:54:28.844744238 -0700 5724 6490 @@ -270,9 +270,10 @@ 5725 6491 } … … 5737 6503 diff -Naur vim72.orig/src/quickfix.c vim72/src/quickfix.c 5738 6504 --- vim72.orig/src/quickfix.c 2008-07-18 05:53:02.000000000 -0700 5739 +++ vim72/src/quickfix.c 2009-03- 01 11:12:22.073226148 -08006505 +++ vim72/src/quickfix.c 2009-03-12 11:55:13.547610560 -0700 5740 6506 @@ -1419,6 +1419,7 @@ 5741 6507 int opened_window = FALSE; … … 5834 6600 diff -Naur vim72.orig/src/regexp.c vim72/src/regexp.c 5835 6601 --- vim72.orig/src/regexp.c 2008-08-07 12:58:50.000000000 -0700 5836 +++ vim72/src/regexp.c 2009-03- 01 11:12:04.508100572 -08006602 +++ vim72/src/regexp.c 2009-03-12 11:55:13.471605532 -0700 5837 6603 @@ -4532,7 +4532,7 @@ 5838 6604 cleanup_subexpr(); … … 5871 6637 diff -Naur vim72.orig/src/screen.c vim72/src/screen.c 5872 6638 --- vim72.orig/src/screen.c 2008-07-24 07:45:07.000000000 -0700 5873 +++ vim72/src/screen.c 2009-03- 01 11:12:27.069546305 -08006639 +++ vim72/src/screen.c 2009-03-12 11:55:39.893297947 -0700 5874 6640 @@ -2439,9 +2439,17 @@ 5875 6641 … … 5921 6687 area_attr = attr; /* start highlighting */ 5922 6688 else if (area_attr != 0 5923 @@ -4549,7 +4560,8 @@ 6689 @@ -3544,7 +3555,8 @@ 6690 /* Use line_attr when not in the Visual or 'incsearch' area 6691 * (area_attr may be 0 when "noinvcur" is set). */ 6692 else if (line_attr != 0 && ((fromcol == -10 && tocol == MAXCOL) 6693 - || (vcol < fromcol || vcol >= tocol))) 6694 + || vcol < fromcol || vcol_prev < fromcol_prev 6695 + || vcol >= tocol)) 6696 char_attr = line_attr; 6697 #endif 6698 else 6699 @@ -4549,7 +4561,8 @@ 5924 6700 * highlight the cursor position itself. */ 5925 6701 if (wp->w_p_cuc && vcol == (long)wp->w_virtcol … … 5931 6707 vcol_save_attr = char_attr; 5932 6708 char_attr = hl_combine_attr(char_attr, hl_attr(HLF_CUC)); 5933 @@ -6350,7 +6362,7 @@ 6709 @@ -5119,8 +5132,8 @@ 6710 #endif 6711 6712 #if defined(FEAT_GUI) || defined(UNIX) 6713 - /* The bold trick makes a single row of pixels appear in the next 6714 - * character. When a bold character is removed, the next 6715 + /* The bold trick makes a single column of pixels appear in the 6716 + * next character. When a bold character is removed, the next 6717 * character should be redrawn too. This happens for our own GUI 6718 * and for some xterms. */ 6719 if ( 6720 @@ -6263,9 +6276,15 @@ 6721 int pcc[MAX_MCO]; 6722 # endif 6723 #endif 6724 +#if defined(FEAT_MBYTE) || defined(FEAT_GUI) || defined(UNIX) 6725 + int force_redraw_this; 6726 + int force_redraw_next = FALSE; 6727 +#endif 6728 + int need_redraw; 6729 6730 if (ScreenLines == NULL || row >= screen_Rows) /* safety check */ 6731 return; 6732 + off = LineOffset[row] + col; 6733 6734 #ifdef FEAT_MBYTE 6735 /* When drawing over the right halve of a double-wide char clear out the 6736 @@ -6275,10 +6294,21 @@ 6737 && !gui.in_use 6738 # endif 6739 && mb_fix_col(col, row) != col) 6740 - screen_puts_len((char_u *)" ", 1, row, col - 1, 0); 6741 + { 6742 + ScreenLines[off - 1] = ' '; 6743 + ScreenAttrs[off - 1] = 0; 6744 + if (enc_utf8) 6745 + { 6746 + ScreenLinesUC[off - 1] = 0; 6747 + ScreenLinesC[0][off - 1] = 0; 6748 + } 6749 + /* redraw the previous cell, make it empty */ 6750 + screen_char(off - 1, row, col - 1); 6751 + /* force the cell at "col" to be redrawn */ 6752 + force_redraw_next = TRUE; 6753 + } 6754 #endif 6755 6756 - off = LineOffset[row] + col; 6757 #ifdef FEAT_MBYTE 6758 max_off = LineOffset[row] + screen_Columns; 6759 #endif 6760 @@ -6342,7 +6372,12 @@ 6761 } 6762 #endif 6763 6764 - if (ScreenLines[off] != c 6765 +#if defined(FEAT_MBYTE) || defined(FEAT_GUI) || defined(UNIX) 6766 + force_redraw_this = force_redraw_next; 6767 + force_redraw_next = FALSE; 6768 +#endif 6769 + 6770 + need_redraw = ScreenLines[off] != c 6771 #ifdef FEAT_MBYTE 6772 || (mbyte_cells == 2 6773 && ScreenLines[off + 1] != (enc_dbcs ? ptr[1] : 0)) 6774 @@ -6350,24 +6385,24 @@ 5934 6775 && c == 0x8e 5935 6776 && ScreenLines2[off] != ptr[1]) … … 5940 6781 #endif 5941 6782 || ScreenAttrs[off] != attr 5942 @@ -7356,7 +7368,11 @@ 6783 - || exmode_active 6784 + || exmode_active; 6785 + 6786 + if (need_redraw 6787 +#if defined(FEAT_MBYTE) || defined(FEAT_GUI) || defined(UNIX) 6788 + || force_redraw_this 6789 +#endif 6790 ) 6791 { 6792 #if defined(FEAT_GUI) || defined(UNIX) 6793 /* The bold trick makes a single row of pixels appear in the next 6794 * character. When a bold character is removed, the next 6795 * character should be redrawn too. This happens for our own GUI 6796 - * and for some xterms. 6797 - * Force the redraw by setting the attribute to a different value 6798 - * than "attr", the contents of ScreenLines[] may be needed by 6799 - * mb_off2cells() further on. 6800 - * Don't do this for the last drawn character, because the next 6801 - * character may not be redrawn. */ 6802 - if ( 6803 + * and for some xterms. */ 6804 + if (need_redraw && ScreenLines[off] != ' ' && ( 6805 # ifdef FEAT_GUI 6806 gui.in_use 6807 # endif 6808 @@ -6377,23 +6412,14 @@ 6809 # ifdef UNIX 6810 term_is_xterm 6811 # endif 6812 - ) 6813 + )) 6814 { 6815 - int n; 6816 + int n = ScreenAttrs[off]; 6817 6818 - n = ScreenAttrs[off]; 6819 -# ifdef FEAT_MBYTE 6820 - if (col + mbyte_cells < screen_Columns 6821 - && (n > HL_ALL || (n & HL_BOLD)) 6822 - && (len < 0 ? ptr[mbyte_blen] != NUL 6823 - : ptr + mbyte_blen < text + len)) 6824 - ScreenAttrs[off + mbyte_cells] = attr + 1; 6825 -# else 6826 - if (col + 1 < screen_Columns 6827 - && (n > HL_ALL || (n & HL_BOLD)) 6828 - && (len < 0 ? ptr[1] != NUL : ptr + 1 < text + len)) 6829 - ScreenLines[off + 1] = 0; 6830 -# endif 6831 + if (n > HL_ALL) 6832 + n = syn_attr2attr(n); 6833 + if (n & HL_BOLD) 6834 + force_redraw_next = TRUE; 6835 } 6836 #endif 6837 #ifdef FEAT_MBYTE 6838 @@ -6480,6 +6506,20 @@ 6839 ++ptr; 6840 } 6841 } 6842 + 6843 +#if defined(FEAT_MBYTE) || defined(FEAT_GUI) || defined(UNIX) 6844 + /* If we detected the next character needs to be redrawn, but the text 6845 + * doesn't extend up to there, update the character here. */ 6846 + if (force_redraw_next && col < screen_Columns) 6847 + { 6848 +# ifdef FEAT_MBYTE 6849 + if (enc_dbcs != 0 && dbcs_off2cells(off, max_off) > 1) 6850 + screen_char_2(off, row, col); 6851 + else 6852 +# endif 6853 + screen_char(off, row, col); 6854 + } 6855 +#endif 6856 } 6857 6858 #ifdef FEAT_SEARCH_EXTRA 6859 @@ -7356,7 +7396,11 @@ 5943 6860 #endif 5944 6861 static int entered = FALSE; /* avoid recursiveness */ … … 5952 6869 * Allocation of the screen buffers is done only when the size changes and 5953 6870 * when Rows and Columns have been set and we have started doing full 5954 @@ -7440,10 +74 56,13 @@6871 @@ -7440,10 +7484,13 @@ 5955 6872 { 5956 6873 outofmem = TRUE; … … 5967 6884 #ifdef FEAT_MBYTE 5968 6885 for (i = 0; i < p_mco; ++i) 5969 @@ -7628,8 +76 47,17 @@6886 @@ -7628,8 +7675,17 @@ 5970 6887 --RedrawingDisabled; 5971 6888 … … 5988 6905 diff -Naur vim72.orig/src/spell.c vim72/src/spell.c 5989 6906 --- vim72.orig/src/spell.c 2008-07-12 12:20:55.000000000 -0700 5990 +++ vim72/src/spell.c 2009-03- 01 11:11:46.782964939 -08006907 +++ vim72/src/spell.c 2009-03-12 11:55:13.363596871 -0700 5991 6908 @@ -77,7 +77,7 @@ 5992 6909 … … 6859 7776 diff -Naur vim72.orig/src/structs.h vim72/src/structs.h 6860 7777 --- vim72.orig/src/structs.h 2008-07-30 13:02:50.000000000 -0700 6861 +++ vim72/src/structs.h 2009-03- 01 11:08:10.625114401 -08007778 +++ vim72/src/structs.h 2009-03-12 11:54:46.913903059 -0700 6862 7779 @@ -459,7 +459,7 @@ 6863 7780 typedef struct … … 6888 7805 diff -Naur vim72.orig/src/tag.c vim72/src/tag.c 6889 7806 --- vim72.orig/src/tag.c 2008-07-16 14:31:30.000000000 -0700 6890 +++ vim72/src/tag.c 2009-03- 01 11:12:32.157870372 -08007807 +++ vim72/src/tag.c 2009-03-12 11:55:13.591613075 -0700 6891 7808 @@ -515,7 +515,7 @@ 6892 7809 * If a count is supplied to the ":tag <name>" command, then … … 7019 7936 diff -Naur vim72.orig/src/term.c vim72/src/term.c 7020 7937 --- vim72.orig/src/term.c 2008-07-27 04:48:06.000000000 -0700 7021 +++ vim72/src/term.c 2009-03- 01 11:10:54.343604693 -08007938 +++ vim72/src/term.c 2009-03-12 11:54:59.914737254 -0700 7022 7939 @@ -4920,7 +4920,15 @@ 7023 7940 key_name[0] = KEY2TERMCAP0(key); … … 7039 7956 diff -Naur vim72.orig/src/testdir/Makefile vim72/src/testdir/Makefile 7040 7957 --- vim72.orig/src/testdir/Makefile 2008-06-19 13:29:46.000000000 -0700 7041 +++ vim72/src/testdir/Makefile 2009-03-01 11:05:52.680272943 -0800 7042 @@ -26,15 +26,17 @@ 7958 +++ vim72/src/testdir/Makefile 2009-03-12 11:55:27.544506216 -0700 7959 @@ -20,21 +20,23 @@ 7960 test48.out test49.out test51.out test52.out test53.out \ 7961 test54.out test55.out test56.out test57.out test58.out \ 7962 test59.out test60.out test61.out test62.out test63.out \ 7963 - test64.out test65.out 7964 + test64.out test65.out test66.out 7965 7966 SCRIPTS_GUI = test16.out 7043 7967 7044 7968 .SUFFIXES: .in .out … … 7073 7997 diff -Naur vim72.orig/src/testdir/Make_ming.mak vim72/src/testdir/Make_ming.mak 7074 7998 --- vim72.orig/src/testdir/Make_ming.mak 1969-12-31 16:00:00.000000000 -0800 7075 +++ vim72/src/testdir/Make_ming.mak 2009-03- 01 11:06:57.588433300 -08007999 +++ vim72/src/testdir/Make_ming.mak 2009-03-12 11:54:40.397486521 -0700 7076 8000 @@ -0,0 +1,91 @@ 7077 8001 +# Makefile to run tests for Vim, on Dos-like machines … … 7168 8092 diff -Naur vim72.orig/src/testdir/test42.ok vim72/src/testdir/test42.ok 7169 8093 --- vim72.orig/src/testdir/test42.ok 2008-02-20 04:27:37.000000000 -0800 7170 +++ vim72/src/testdir/test42.ok 2009-03- 01 11:07:47.727646598 -08008094 +++ vim72/src/testdir/test42.ok 2009-03-12 11:54:40.601499372 -0700 7171 8095 @@ -20,7 +20,7 @@ 7172 8096 ucs-2 … … 7178 8102 ucs-2le 7179 8103 8104 diff -Naur vim72.orig/src/testdir/test66.in vim72/src/testdir/test66.in 8105 --- vim72.orig/src/testdir/test66.in 1969-12-31 16:00:00.000000000 -0800 8106 +++ vim72/src/testdir/test66.in 2009-03-12 11:55:27.544506216 -0700 8107 @@ -0,0 +1,25 @@ 8108 + 8109 +Test for visual block shift and tab characters. 8110 + 8111 +STARTTEST 8112 +:so small.vim 8113 +/^abcdefgh 8114 +4jI j<<11|D 8115 +7|a 8116 +7|a 8117 +7|a 4k13|4j< 8118 +:$-4,$w! test.out 8119 +:$-4,$s/\s\+//g 8120 +4kI j<< 8121 +7|a 8122 +7|a 8123 +7|a 4k13|4j3< 8124 +:$-4,$w >> test.out 8125 +:qa! 8126 +ENDTEST 8127 + 8128 +abcdefghijklmnopqrstuvwxyz 8129 +abcdefghijklmnopqrstuvwxyz 8130 +abcdefghijklmnopqrstuvwxyz 8131 +abcdefghijklmnopqrstuvwxyz 8132 +abcdefghijklmnopqrstuvwxyz 8133 diff -Naur vim72.orig/src/testdir/test66.ok vim72/src/testdir/test66.ok 8134 --- vim72.orig/src/testdir/test66.ok 1969-12-31 16:00:00.000000000 -0800 8135 +++ vim72/src/testdir/test66.ok 2009-03-12 11:55:27.544506216 -0700 8136 @@ -0,0 +1,10 @@ 8137 + abcdefghijklmnopqrstuvwxyz 8138 +abcdefghij 8139 + abc defghijklmnopqrstuvwxyz 8140 + abc defghijklmnopqrstuvwxyz 8141 + abc defghijklmnopqrstuvwxyz 8142 + abcdefghijklmnopqrstuvwxyz 8143 +abcdefghij 8144 + abc defghijklmnopqrstuvwxyz 8145 + abc defghijklmnopqrstuvwxyz 8146 + abc defghijklmnopqrstuvwxyz 7180 8147 diff -Naur vim72.orig/src/ui.c vim72/src/ui.c 7181 8148 --- vim72.orig/src/ui.c 2008-07-14 11:14:56.000000000 -0700 7182 +++ vim72/src/ui.c 2009-03- 01 11:08:45.651358290 -08008149 +++ vim72/src/ui.c 2009-03-12 11:54:50.158111748 -0700 7183 8150 @@ -1820,7 +1820,7 @@ 7184 8151 #ifdef HAVE_DUP … … 7288 8255 diff -Naur vim72.orig/src/version.c vim72/src/version.c 7289 8256 --- vim72.orig/src/version.c 2008-08-09 07:24:52.000000000 -0700 7290 +++ vim72/src/version.c 2009-03- 01 11:12:42.142512361 -08007291 @@ -677,9 +677,2 56@@8257 +++ vim72/src/version.c 2009-03-12 11:55:39.893297947 -0700 8258 @@ -677,9 +677,280 @@ 7292 8259 static int included_patches[] = 7293 8260 { /* Add new patch number below this line */ 7294 8261 /**/ 8262 + 141, 8263 +/**/ 8264 + 140, 8265 +/**/ 8266 + 139, 8267 +/**/ 8268 + 137, 8269 +/**/ 8270 + 136, 8271 +/**/ 8272 + 135, 8273 +/**/ 8274 + 134, 8275 +/**/ 8276 + 133, 8277 +/**/ 8278 + 132, 8279 +/**/ 8280 + 131, 8281 +/**/ 8282 + 130, 8283 +/**/ 8284 + 129, 8285 +/**/ 7295 8286 + 128, 7296 8287 +/**/ … … 7546 8537 highest_patch() 7547 8538 { 7548 @@ -786,7 +10 33,7 @@8539 @@ -786,7 +1057,7 @@ 7549 8540 MSG_PUTS(_("\nRISC OS version")); 7550 8541 #endif … … 7555 8546 if (*compiled_arch != NUL) 7556 8547 { 7557 @@ -825,6 +10 72,19 @@8548 @@ -825,6 +1096,19 @@ 7558 8549 } 7559 8550 } … … 7577 8568 diff -Naur vim72.orig/src/vim.h vim72/src/vim.h 7578 8569 --- vim72.orig/src/vim.h 2008-08-09 09:03:38.000000000 -0700 7579 +++ vim72/src/vim.h 2009-03- 01 11:12:22.073226148 -08008570 +++ vim72/src/vim.h 2009-03-12 11:55:13.547610560 -0700 7580 8571 @@ -341,8 +341,14 @@ 7581 8572 #ifdef BACKSLASH_IN_FILENAME … … 7645 8636 diff -Naur vim72.orig/src/window.c vim72/src/window.c 7646 8637 --- vim72.orig/src/window.c 2008-08-06 04:00:30.000000000 -0700 7647 +++ vim72/src/window.c 2009-03- 01 11:12:22.073226148 -08008638 +++ vim72/src/window.c 2009-03-12 11:55:13.547610560 -0700 7648 8639 @@ -12,7 +12,7 @@ 7649 8640 static int path_is_url __ARGS((char_u *p)); … … 7736 8727 diff -Naur vim72.orig/src/workshop.c vim72/src/workshop.c 7737 8728 --- vim72.orig/src/workshop.c 2008-06-21 11:53:26.000000000 -0700 7738 +++ vim72/src/workshop.c 2009-03- 01 11:08:39.914989523 -08008729 +++ vim72/src/workshop.c 2009-03-12 11:54:50.062104763 -0700 7739 8730 @@ -1121,8 +1121,12 @@ 7740 8731 ? (char *)curbuf->b_sfname : "<None>");
Note:
See TracChangeset
for help on using the changeset viewer.