Changeset 8c75f86f for patches


Ignore:
Timestamp:
Mar 12, 2009, 11:59:27 AM (15 years ago)
Author:
Jim Gifford <clfs@…>
Branches:
clfs-1.2, clfs-2.1, clfs-3.0.0-systemd, clfs-3.0.0-sysvinit, master, systemd, sysvinit
Children:
2e93485
Parents:
73fb3dc5
Message:

Updated VIM Branch Update Patch to -11

File:
1 moved

Legend:

Unmodified
Added
Removed
  • patches/vim-7.2-branch_update-11.patch

    r73fb3dc5 r8c75f86f  
    11Submitted By: Jim Gifford (jim at cross-lfs dot org)
    2 Date: 03-01-2009
     2Date: 03-12-2009
    33Initial Package Version: 7.2
    44Origin: Upstream
    55Upstream Status: Applied
    6 Description: Contains all upstream patches up to 7.2.128
     6Description: Contains all upstream patches up to 7.2.141
    77             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
    99
    1010diff -Naur vim72.orig/Filelist vim72/Filelist
    1111--- vim72.orig/Filelist 2008-07-06 11:02:23.000000000 -0700
    12 +++ vim72/Filelist      2009-03-01 11:06:57.584431903 -0800
     12+++ vim72/Filelist      2009-03-12 11:54:40.397486521 -0700
    1313@@ -285,6 +285,7 @@
    1414                src/proto/os_win32.pro \
     
    2121diff -Naur vim72.orig/runtime/doc/cmdline.txt vim72/runtime/doc/cmdline.txt
    2222--- 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 -0800
     23+++ vim72/runtime/doc/cmdline.txt       2009-03-12 11:54:40.529493784 -0700
    2424@@ -1,4 +1,4 @@
    2525-*cmdline.txt*   For Vim version 7.2.  Last change: 2008 Jul 29
     
    8080diff -Naur vim72.orig/runtime/doc/eval.txt vim72/runtime/doc/eval.txt
    8181--- 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 -0800
     82+++ vim72/runtime/doc/eval.txt  2009-03-12 11:54:50.318122364 -0700
    8383@@ -1,4 +1,4 @@
    8484-*eval.txt*     For Vim version 7.2.  Last change: 2008 Aug 09
     
    200200diff -Naur vim72.orig/runtime/doc/netbeans.txt vim72/runtime/doc/netbeans.txt
    201201--- 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 -0800
     202+++ vim72/runtime/doc/netbeans.txt      2009-03-12 11:54:59.850731108 -0700
    203203@@ -1,4 +1,4 @@
    204204-*netbeans.txt*  For Vim version 7.2.  Last change: 2008 Jun 28
     
    222222diff -Naur vim72.orig/runtime/doc/options.txt vim72/runtime/doc/options.txt
    223223--- 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 -0800
     224+++ vim72/runtime/doc/options.txt       2009-03-12 11:55:13.407601900 -0700
    225225@@ -1,4 +1,4 @@
    226226-*options.txt*  For Vim version 7.2.  Last change: 2008 Aug 06
     
    253253diff -Naur vim72.orig/runtime/doc/spell.txt vim72/runtime/doc/spell.txt
    254254--- 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 -0800
     255+++ vim72/runtime/doc/spell.txt 2009-03-12 11:54:50.218113983 -0700
    256256@@ -1,4 +1,4 @@
    257257-*spell.txt*    For Vim version 7.2.  Last change: 2008 Jun 21
     
    383383diff -Naur vim72.orig/runtime/doc/starting.txt vim72/runtime/doc/starting.txt
    384384--- 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 -0800
     385+++ vim72/runtime/doc/starting.txt      2009-03-12 11:54:40.533495740 -0700
    386386@@ -1,4 +1,4 @@
    387387-*starting.txt*  For Vim version 7.2.  Last change: 2008 Jun 21
     
    445445diff -Naur vim72.orig/runtime/doc/usr_21.txt vim72/runtime/doc/usr_21.txt
    446446--- 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 -0800
     447+++ vim72/runtime/doc/usr_21.txt        2009-03-12 11:54:40.533495740 -0700
    448448@@ -1,4 +1,4 @@
    449449-*usr_21.txt*   For Vim version 7.2.  Last change: 2007 May 01
     
    512512diff -Naur vim72.orig/runtime/scripts.vim vim72/runtime/scripts.vim
    513513--- 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 -0800
     514+++ vim72/runtime/scripts.vim   2009-03-12 11:54:28.900750105 -0700
    515515@@ -234,6 +234,10 @@
    516516   elseif s:line1 =~ '\<DTD\s\+XHTML\s'
     
    526526diff -Naur vim72.orig/src/auto/configure vim72/src/auto/configure
    527527--- 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 @@
    530598   LDFLAGS="$LDFLAGS -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc"
    531599 fi
     
    567635diff -Naur vim72.orig/src/buffer.c vim72/src/buffer.c
    568636--- 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 -0800
     637+++ vim72/src/buffer.c  2009-03-12 11:55:13.507605811 -0700
    570638@@ -437,10 +437,6 @@
    571639        return;
     
    693761 #endif
    694762     if (buf->b_fname == NULL)
     763diff -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 
    695776diff -Naur vim72.orig/src/configure.in vim72/src/configure.in
    696777--- 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 @@
    699788 dnl But only when making dependencies, cproto and lint don't take "-isystem".
    700789 dnl Mac gcc returns "powerpc-apple-darwin8-gcc-4.0.1 (GCC)...", need to allow
     
    730819diff -Naur vim72.orig/src/diff.c vim72/src/diff.c
    731820--- 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 -0800
     821+++ vim72/src/diff.c    2009-03-12 11:55:16.155775667 -0700
    733822@@ -8,7 +8,7 @@
    734823  */
     
    845934     }
    846935 #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;
    847945@@ -2114,6 +2129,8 @@
    848946            EMSG2(_("E102: Can't find buffer \"%s\""), eap->arg);
     
    856954diff -Naur vim72.orig/src/edit.c vim72/src/edit.c
    857955--- 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 -0800
     956+++ vim72/src/edit.c    2009-03-12 11:55:13.411601900 -0700
    859957@@ -147,6 +147,7 @@
    860958 static int  ins_compl_bs __ARGS((void));
     
    11161214diff -Naur vim72.orig/src/eval.c vim72/src/eval.c
    11171215--- 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 -0800
     1216+++ vim72/src/eval.c    2009-03-12 11:55:08.231269731 -0700
    11191217@@ -32,6 +32,9 @@
    11201218 
     
    20052103diff -Naur vim72.orig/src/ex_cmds2.c vim72/src/ex_cmds2.c
    20062104--- 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 -0800
     2105+++ vim72/src/ex_cmds2.c        2009-03-12 11:55:13.311593519 -0700
    20082106@@ -2842,6 +2842,7 @@
    20092107     linenr_T               save_sourcing_lnum;
     
    20982196diff -Naur vim72.orig/src/ex_cmds.c vim72/src/ex_cmds.c
    20992197--- 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 -0800
     2198+++ vim72/src/ex_cmds.c 2009-03-12 11:55:13.611614471 -0700
    21012199@@ -24,7 +24,7 @@
    21022200 static void do_filter __ARGS((linenr_T line1, linenr_T line2, exarg_T *eap, char_u *cmd, int do_in, int do_out));
     
    23632461diff -Naur vim72.orig/src/ex_cmds.h vim72/src/ex_cmds.h
    23642462--- 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 -0800
     2463+++ vim72/src/ex_cmds.h 2009-03-12 11:54:40.541495740 -0700
    23662464@@ -278,7 +278,7 @@
    23672465 EX(CMD_crewind,                "crewind",      ex_cc,
     
    24112509diff -Naur vim72.orig/src/ex_docmd.c vim72/src/ex_docmd.c
    24122510--- 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 -0800
     2511+++ vim72/src/ex_docmd.c        2009-03-12 11:55:24.900337757 -0700
    24142512@@ -364,6 +364,7 @@
    24152513 # define ex_function           ex_ni
     
    24452543 #endif
    24462544        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 @@
    24482559     return OK;
    24492560 }
     
    24552566 ex_command(eap)
    24562567     exarg_T   *eap;
    2457 @@ -5910,7 +5916,8 @@
     2568@@ -5910,7 +5920,8 @@
    24582569     char_u     *q;
    24592570 
     
    24652576 
    24662577     size_t     split_len = 0;
    2467 @@ -5927,16 +5934,51 @@
     2578@@ -5927,16 +5938,51 @@
    24682579 
    24692580     /*
     
    24782589-       q = buf;
    24792590+       p = cmd->uc_rep;    /* source */
    2480 +       q = buf;            /* destinateion */
     2591+       q = buf;            /* destination */
    24812592        totlen = 0;
    24822593-       while ((start = vim_strchr(p, '<')) != NULL
     
    25212632            ++end;
    25222633 
    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 @@
    25242656                else if (*dirnow != NUL
    25252657                        && (ssop_flags & SSOP_CURDIR) && globaldir != NULL)
     
    25322664 
    25332665                failed |= (makeopens(fd, dirnow) == FAIL);
    2534 @@ -9506,24 +9548,50 @@
     2666@@ -9506,24 +9559,50 @@
    25352667                    break;
    25362668                }
     
    25932725 
    25942726 #ifdef FEAT_SEARCHPATH
    2595 @@ -9541,6 +9609,15 @@
     2727@@ -9541,6 +9620,15 @@
    25962728 #ifdef FEAT_AUTOCMD
    25972729        case SPEC_AFILE:        /* file name for autocommand */
     
    26092741                {
    26102742                    *errormsg = (char_u *)_("E495: no autocommand file name to substitute for \"<afile>\"");
    2611 @@ -10067,7 +10144,7 @@
     2743@@ -10067,7 +10155,7 @@
    26122744      */
    26132745     if (put_line(fd, "let s:sx = expand(\"<sfile>:p:r\").\"x.vim\"") == FAIL
     
    26182750        return FAIL;
    26192751 
    2620 @@ -10689,7 +10766,8 @@
     2752@@ -10689,7 +10777,8 @@
    26212753        p_viminfo = (char_u *)"'100";
    26222754     if (eap->cmdidx == CMD_rviminfo)
     
    26302762diff -Naur vim72.orig/src/ex_getln.c vim72/src/ex_getln.c
    26312763--- 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 -0800
     2764+++ vim72/src/ex_getln.c        2009-03-12 11:55:13.699620338 -0700
    26332765@@ -31,6 +31,8 @@
    26342766     int                cmdattr;        /* attributes for prompt */
     
    26902822 #ifdef FEAT_SEARCH_EXTRA
    26912823     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 @@
    26932858     }
    26942859     mch_memmove(ccline.cmdbuff, p, (size_t)ccline.cmdlen + 1);
     
    27112876 }
    27122877 
    2713 @@ -2875,6 +2899,7 @@
     2878@@ -2875,6 +2914,7 @@
    27142879     prev_ccline = ccline;
    27152880     ccline.cmdbuff = NULL;
     
    27192884 
    27202885 /*
    2721 @@ -3582,6 +3607,7 @@
     2886@@ -3582,6 +3622,7 @@
    27222887 ExpandInit(xp)
    27232888     expand_T   *xp;
     
    27272892 #ifndef BACKSLASH_IN_FILENAME
    27282893     xp->xp_shell = FALSE;
    2729 @@ -4871,7 +4897,7 @@
     2894@@ -4871,7 +4912,7 @@
    27302895     if (s == NULL)
    27312896        return FAIL;
     
    27362901     if (all == NULL)
    27372902        return FAIL;
    2738 @@ -4912,9 +4938,10 @@
     2903@@ -4912,9 +4953,10 @@
    27392904  * newlines.  Returns NULL for an error or no matches.
    27402905  */
     
    27482913     expand_T   xpc;
    27492914     char_u     *buf;
    2750 @@ -4943,10 +4970,10 @@
     2915@@ -4943,10 +4985,10 @@
    27512916        {
    27522917            add_pathsep(buf);
     
    27622927                    len += (int)STRLEN(p[i]) + 1;
    27632928 
     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)
    27642949diff -Naur vim72.orig/src/feature.h vim72/src/feature.h
    27652950--- 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 -0800
     2951+++ vim72/src/feature.h 2009-03-12 11:54:40.545495740 -0700
    27672952@@ -767,9 +767,13 @@
    27682953 
     
    27832968diff -Naur vim72.orig/src/fileio.c vim72/src/fileio.c
    27842969--- 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 @@
    27873074     else
    27883075     {
     
    27953082            fileformat = EOL_UNIX;              /* binary: use Unix format */
    27963083        else if (*p_ffs == NUL)
    2797 @@ -2211,7 +2214,7 @@
     3084@@ -2211,7 +2258,7 @@
    27983085     {
    27993086        /* Use stderr for stdin, makes shell commands work. */
     
    28043091 #endif
    28053092 
    2806 @@ -2341,11 +2344,6 @@
     3093@@ -2341,11 +2388,6 @@
    28073094                STRCAT(IObuff, _("[CR missing]"));
    28083095                c = TRUE;
     
    28163103            {
    28173104                STRCAT(IObuff, _("[long lines split]"));
    2818 @@ -2711,7 +2709,7 @@
     3105@@ -2711,7 +2753,7 @@
    28193106 {
    28203107     if (!curbuf->b_marks_read && get_viminfo_parameter('\'') > 0
     
    28253112     /* Always set b_marks_read; needed when 'viminfo' is changed to include
    28263113      * the ' parameter after opening a buffer. */
    2827 @@ -3451,7 +3449,7 @@
     3114@@ -3451,7 +3493,7 @@
    28283115                {
    28293116 # ifdef UNIX
     
    28343121                    if (mch_stat((char *)IObuff, &st) < 0
    28353122                            || st.st_uid != st_old.st_uid
    2836 @@ -4367,7 +4365,7 @@
     3123@@ -4367,7 +4409,7 @@
    28373124                || st.st_uid != st_old.st_uid
    28383125                || st.st_gid != st_old.st_gid)
     
    28433130                (void)mch_setperm(wfname, perm);
    28443131        }
    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 @@
    28463153            name = "ucs-4le";   /* FF FE 00 00 */
    28473154            len = 4;
     
    28563163     }
    28573164     else if (p[0] == 0xfe && p[1] == 0xff
    2858 @@ -6031,9 +6030,9 @@
     3165@@ -6031,9 +6077,9 @@
    28593166        {
    28603167            tbuf[FGETS_SIZE - 2] = NUL;
     
    28683175        } while (tbuf[FGETS_SIZE - 2] != NUL && tbuf[FGETS_SIZE - 2] != '\n');
    28693176     }
    2870 @@ -6107,12 +6106,24 @@
     3177@@ -6107,12 +6153,24 @@
    28713178 #ifdef HAVE_ACL
    28723179     vim_acl_T  acl;            /* ACL from original file */
     
    28953202     /*
    28963203      * Fail if the "from" file doesn't exist.  Avoids that "to" is deleted.
    2897 @@ -6120,6 +6131,55 @@
     3204@@ -6120,6 +6178,55 @@
    28983205     if (mch_stat((char *)from, &st) < 0)
    28993206        return -1;
     
    29513258      * Delete the "to" file, this is required on some systems to make the
    29523259      * 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 @@
    29543281     char_u     *save_sourcing_name;
    29553282     linenr_T   save_sourcing_lnum;
     
    29593286     char_u     *save_autocmd_match;
    29603287     int                save_autocmd_busy;
    2961 @@ -8601,6 +8662,7 @@
     3288@@ -8601,6 +8711,7 @@
    29623289      * Save the autocmd_* variables and info about the current buffer.
    29633290      */
     
    29673294     save_autocmd_match = autocmd_match;
    29683295     save_autocmd_busy = autocmd_busy;
    2969 @@ -8618,14 +8680,15 @@
     3296@@ -8618,14 +8729,15 @@
    29703297        if (fname != NULL && *fname != NUL)
    29713298            autocmd_fname = fname;
     
    29853312     /*
    29863313      * Set the buffer number to be used for <abuf>.
    2987 @@ -8810,6 +8873,7 @@
     3314@@ -8810,6 +8922,7 @@
    29883315     sourcing_lnum = save_sourcing_lnum;
    29893316     vim_free(autocmd_fname);
     
    29933320     autocmd_match = save_autocmd_match;
    29943321 #ifdef FEAT_EVAL
    2995 @@ -8918,7 +8982,7 @@
     3322@@ -8918,7 +9031,7 @@
    29963323     {
    29973324        apc->curpat = NULL;
     
    30023329         * buffer number. */
    30033330        if (ap->pat != NULL && ap->cmds != NULL
    3004 @@ -9104,7 +9168,7 @@
     3331@@ -9104,7 +9217,7 @@
    30053332 set_context_in_autocmd(xp, arg, doautocmd)
    30063333     expand_T   *xp;
     
    30133340diff -Naur vim72.orig/src/fold.c vim72/src/fold.c
    30143341--- 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 -0800
     3342+++ vim72/src/fold.c    2009-03-12 11:54:59.842732505 -0700
    30163343@@ -48,7 +48,7 @@
    30173344 static int foldFind __ARGS((garray_T *gap, linenr_T lnum, fold_T **fpp));
     
    31023429diff -Naur vim72.orig/src/getchar.c vim72/src/getchar.c
    31033430--- 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 -0800
     3431+++ vim72/src/getchar.c 2009-03-12 11:55:13.579612236 -0700
    31053432@@ -3816,7 +3816,11 @@
    31063433     int len = 1;
     
    31353462diff -Naur vim72.orig/src/globals.h vim72/src/globals.h
    31363463--- 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 @@
    31393526 #endif
    31403527 #ifdef FEAT_AUTOCMD
     
    31443531 EXTERN char_u  *autocmd_match INIT(= NULL); /* name for <amatch> on cmdline */
    31453532 EXTERN int     did_cursorhold INIT(= FALSE); /* set when CursorHold t'gerd */
    3146 @@ -1339,7 +1340,6 @@
     3533@@ -1339,7 +1351,6 @@
    31473534 
    31483535 #ifdef FEAT_NETBEANS_INTG
     
    31523539 EXTERN int netbeansForcedQuit INIT(= 0);/* don't write modified files */
    31533540 EXTERN int netbeansReadFile INIT(= 1); /* OK to read from disk if != 0 */
    3154 @@ -1548,6 +1548,14 @@
     3541@@ -1548,6 +1559,14 @@
    31553542 EXTERN time_t starttime;
    31563543 
     
    31693556diff -Naur vim72.orig/src/gui_at_sb.c vim72/src/gui_at_sb.c
    31703557--- 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 -0800
     3558+++ vim72/src/gui_at_sb.c       2009-03-12 11:54:50.138110630 -0700
    31723559@@ -1078,6 +1078,12 @@
    31733560     Cardinal   *num_params;    /* unused */
     
    31953582diff -Naur vim72.orig/src/gui.c vim72/src/gui.c
    31963583--- 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 -0800
     3584+++ vim72/src/gui.c     2009-03-12 11:54:50.298121805 -0700
    31983585@@ -139,7 +139,7 @@
    31993586                /* The read returns when the child closes the pipe (or when
     
    32883675diff -Naur vim72.orig/src/gui_gtk_x11.c vim72/src/gui_gtk_x11.c
    32893676--- 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 -0800
     3677+++ vim72/src/gui_gtk_x11.c     2009-03-12 11:54:50.138110630 -0700
    32913678@@ -4070,14 +4070,14 @@
    32923679 
     
    33123699diff -Naur vim72.orig/src/gui_x11.c vim72/src/gui_x11.c
    33133700--- 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 -0800
     3701+++ vim72/src/gui_x11.c 2009-03-12 11:55:13.599613075 -0700
    33153702@@ -1587,6 +1587,8 @@
    33163703     XtCloseDisplay(gui.dpy);
     
    34213808diff -Naur vim72.orig/src/gui_xmdlg.c vim72/src/gui_xmdlg.c
    34223809--- 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 -0800
     3810+++ vim72/src/gui_xmdlg.c       2009-03-12 11:54:50.142110910 -0700
    34243811@@ -369,10 +369,10 @@
    34253812     char       buf[TEMP_BUF_SIZE];
     
    35773964diff -Naur vim72.orig/src/gui_xmebw.c vim72/src/gui_xmebw.c
    35783965--- 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 -0800
     3966+++ vim72/src/gui_xmebw.c       2009-03-12 11:54:50.142110910 -0700
    35803967@@ -1256,7 +1256,7 @@
    35813968     }
     
    36043991diff -Naur vim72.orig/src/if_cscope.c vim72/src/if_cscope.c
    36053992--- 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 -0800
     3993+++ vim72/src/if_cscope.c       2009-03-12 11:55:05.383086185 -0700
    36073994@@ -74,7 +74,7 @@
    36083995     { "add",   cs_add,
     
    36474034diff -Naur vim72.orig/src/if_cscope.h vim72/src/if_cscope.h
    36484035--- 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 -0800
     4036+++ vim72/src/if_cscope.h       2009-03-12 11:54:28.876748429 -0700
    36504037@@ -42,17 +42,6 @@
    36514038  * f 7name     Find this file
     
    36684055diff -Naur vim72.orig/src/if_perl.xs vim72/src/if_perl.xs
    36694056--- 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 -0800
     4057+++ vim72/src/if_perl.xs        2009-03-12 11:54:50.278119291 -0700
    36714058@@ -136,6 +136,9 @@
    36724059 #  define Perl_newXS_flags dll_Perl_newXS_flags
     
    37194106diff -Naur vim72.orig/src/if_python.c vim72/src/if_python.c
    37204107--- 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 -0800
     4108+++ vim72/src/if_python.c       2009-03-12 11:54:59.902735857 -0700
    37224109@@ -531,6 +531,12 @@
    37234110        if (PythonMod_Init())
     
    38214208diff -Naur vim72.orig/src/if_xcmdsrv.c vim72/src/if_xcmdsrv.c
    38224209--- 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 -0800
     4210+++ vim72/src/if_xcmdsrv.c      2009-03-12 11:54:43.269670345 -0700
    38244211@@ -736,7 +736,7 @@
    38254212                + serverReply.ga_len;
     
    38514238diff -Naur vim72.orig/src/macros.h vim72/src/macros.h
    38524239--- 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 -0800
     4240+++ vim72/src/macros.h  2009-03-12 11:55:13.411601900 -0700
    38544241@@ -127,15 +127,31 @@
    38554242 #ifdef FEAT_LANGMAP
     
    38914278diff -Naur vim72.orig/src/main.c vim72/src/main.c
    38924279--- 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 -0800
     4280+++ vim72/src/main.c    2009-03-12 11:54:50.142110910 -0700
    38944281@@ -645,11 +645,12 @@
    38954282 
     
    39534340diff -Naur vim72.orig/src/mark.c vim72/src/mark.c
    39544341--- 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 -0800
     4342+++ vim72/src/mark.c    2009-03-12 11:54:40.549496299 -0700
    39564343@@ -1627,15 +1627,17 @@
    39574344 
     
    40224409diff -Naur vim72.orig/src/mbyte.c vim72/src/mbyte.c
    40234410--- 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 -0800
     4411+++ vim72/src/mbyte.c   2009-03-12 11:54:50.142110910 -0700
    40254412@@ -717,7 +717,7 @@
    40264413                     * where mblen() returns 0 for invalid character.
     
    41044491diff -Naur vim72.orig/src/menu.c vim72/src/menu.c
    41054492--- 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 -0800
     4493+++ vim72/src/menu.c    2009-03-12 11:54:28.852745635 -0700
    41074494@@ -1120,6 +1120,7 @@
    41084495        parent = menu;
     
    41154502diff -Naur vim72.orig/src/message.c vim72/src/message.c
    41164503--- 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 -0800
     4504+++ vim72/src/message.c 2009-03-12 11:55:13.623615309 -0700
    41184505@@ -976,7 +976,7 @@
    41194506                    }
     
    42774664diff -Naur vim72.orig/src/misc1.c vim72/src/misc1.c
    42784665--- 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 -0800
     4666+++ vim72/src/misc1.c   2009-03-12 11:54:40.553496578 -0700
    42804667@@ -3245,9 +3245,9 @@
    42814668 
     
    42924679diff -Naur vim72.orig/src/misc2.c vim72/src/misc2.c
    42934680--- 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 @@
    42964708            /* 3. check for available memory: call mch_avail_mem() */
    42974709            if (mch_avail_mem(TRUE) < KEEP_ROOM && !releasing)
     
    43024714            }
    43034715            else
    4304 @@ -1010,6 +1010,9 @@
     4716@@ -1010,6 +1017,9 @@
    43054717 # if defined(FEAT_PROFILE)
    43064718     do_cmdline_cmd((char_u *)"profdel *");
     
    43124724 # ifdef FEAT_TITLE
    43134725     free_titles();
    4314 @@ -1034,6 +1037,9 @@
     4726@@ -1034,6 +1044,9 @@
    43154727     free_regexp_stuff();
    43164728     free_tag_stuff();
     
    43224734     set_expr_line(NULL);
    43234735 # endif
    4324 @@ -1257,7 +1263,6 @@
     4736@@ -1257,7 +1270,6 @@
    43254737     return escaped_string;
    43264738 }
     
    43304742  * Return TRUE when 'shell' has "csh" in the tail.
    43314743  */
    4332 @@ -1266,9 +1271,7 @@
     4744@@ -1266,9 +1278,7 @@
    43334745 {
    43344746     return (strstr((char *)gettail(p_sh), "csh") != NULL);
     
    43404752  * Escape "string" for use as a shell argument with system().
    43414753  * This uses single quotes, except when we know we need to use double qoutes
    4342 @@ -1391,7 +1394,6 @@
     4754@@ -1391,7 +1401,6 @@
    43434755 
    43444756     return escaped_string;
     
    43484760 /*
    43494761  * Like vim_strsave(), but make all characters uppercase.
    4350 @@ -2565,7 +2567,7 @@
     4762@@ -2565,7 +2574,7 @@
    43514763     int                key;
    43524764     int                dlen = 0;
     
    43574769        return 0;
    43584770 
    4359 @@ -2601,10 +2603,11 @@
     4771@@ -2601,10 +2610,11 @@
    43604772  * returns 0 if there is no match.
    43614773  */
     
    43714783     char_u     *last_dash;
    43724784     char_u     *end_of_name;
    4373 @@ -2672,7 +2675,8 @@
     4785@@ -2672,7 +2682,8 @@
    43744786            else
    43754787            {
     
    43814793 
    43824794            /*
    4383 @@ -4698,7 +4702,8 @@
     4795@@ -4698,7 +4709,8 @@
    43844796                                stackp->ffs_filearray_cur = i + 1;
    43854797                                ff_push(search_ctx, stackp);
     
    43934805diff -Naur vim72.orig/src/move.c vim72/src/move.c
    43944806--- 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 -0800
     4807+++ vim72/src/move.c    2009-03-12 11:54:46.913903059 -0700
    43964808@@ -280,18 +280,20 @@
    43974809 
     
    44434855diff -Naur vim72.orig/src/nbdebug.c vim72/src/nbdebug.c
    44444856--- 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 -0800
     4857+++ vim72/src/nbdebug.c 2009-03-12 11:55:13.487606370 -0700
    44464858@@ -33,7 +33,6 @@
    44474859 u_int           nb_dlevel = 0;         /* nb_debug verbosity level */
     
    45044916diff -Naur vim72.orig/src/nbdebug.h vim72/src/nbdebug.h
    45054917--- 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 -0800
     4918+++ vim72/src/nbdebug.h 2009-03-12 11:55:13.487606370 -0700
    45074919@@ -43,8 +43,6 @@
    45084920 
     
    45364948diff -Naur vim72.orig/src/netbeans.c vim72/src/netbeans.c
    45374949--- 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 -0800
     4950+++ vim72/src/netbeans.c        2009-03-12 11:55:13.479606090 -0700
    45394951@@ -1043,7 +1043,7 @@
    45404952        nbdebug(("EVT: %s", buf));
     
    46525064diff -Naur vim72.orig/src/normal.c vim72/src/normal.c
    46535065--- 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 -0800
     5066+++ vim72/src/normal.c  2009-03-12 11:55:13.415602459 -0700
    46555067@@ -183,6 +183,8 @@
    46565068 static void    nv_cursorhold __ARGS((cmdarg_T *cap));
     
    49305342diff -Naur vim72.orig/src/ops.c vim72/src/ops.c
    49315343--- 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 @@
    49345523     {
    49355524        for (; pos.lnum <= oap->end.lnum; ++pos.lnum)
     
    49495538                char_u *ptr = ml_get_buf(curbuf, pos.lnum, FALSE);
    49505539 
     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.
    49515550diff -Naur vim72.orig/src/option.c vim72/src/option.c
    49525551--- 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 -0800
     5552+++ vim72/src/option.c  2009-03-12 11:55:13.683619779 -0700
    49545553@@ -2593,13 +2593,13 @@
    49555554 #ifdef FEAT_VIMINFO
     
    50485647            }
    50495648        }
    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 @@
    50515686            else
    50525687                curbuf->b_p_tx = FALSE;
     
    50575692            /* update flag in swap file */
    50585693            ml_setflags(curbuf);
    5059 @@ -6055,6 +6086,7 @@
     5694@@ -6055,6 +6100,7 @@
    50605695                    errmsg = (char_u *)N_("E596: Invalid font(s)");
    50615696            }
     
    50655700 # ifdef FEAT_XFONTSET
    50665701     else if (varp == &p_guifontset)
    5067 @@ -6063,6 +6095,7 @@
     5702@@ -6063,6 +6109,7 @@
    50685703            errmsg = (char_u *)N_("E597: can't select fontset");
    50695704        else if (gui.in_use && gui_init_font(p_guifontset, TRUE) != OK)
     
    50735708 # endif
    50745709 # ifdef FEAT_MBYTE
    5075 @@ -6072,6 +6105,7 @@
     5710@@ -6072,6 +6119,7 @@
    50765711            errmsg = (char_u *)N_("E533: can't select wide font");
    50775712        else if (gui_get_wide_font() == FAIL)
     
    50815716 # endif
    50825717 #endif
    5083 @@ -6133,13 +6167,24 @@
     5718@@ -6133,13 +6181,24 @@
    50845719 #ifdef FEAT_GUI
    50855720     /* 'guioptions' */
     
    51065741 
    51075742 #if defined(FEAT_MOUSE_TTY) && (defined(UNIX) || defined(VMS))
    5108 @@ -6717,7 +6762,11 @@
     5743@@ -6717,7 +6776,11 @@
    51095744 
    51105745     if (curwin->w_curswant != MAXCOL)
     
    51195754     return errmsg;
    51205755 }
    5121 @@ -7105,22 +7154,28 @@
     5756@@ -7105,22 +7168,28 @@
    51225757            curbuf->b_did_warn = FALSE;
    51235758 
     
    51555790 
    51565791     /* when 'bin' is set also set some other options */
    5157 @@ -7128,7 +7183,7 @@
     5792@@ -7128,7 +7197,7 @@
    51585793     {
    51595794        set_options_bin(old_value, curbuf->b_p_bin, opt_flags);
     
    51645799     }
    51655800 
    5166 @@ -7279,7 +7334,7 @@
     5801@@ -7279,7 +7348,7 @@
    51675802        if (!value)
    51685803            save_file_ff(curbuf);       /* Buffer is unchanged */
     
    51735808 #ifdef FEAT_AUTOCMD
    51745809        modified_was_set = value;
    5175 @@ -7714,7 +7769,7 @@
     5810@@ -7714,7 +7783,7 @@
    51765811        newFoldLevel();
    51775812     }
     
    51825817     {
    51835818        foldUpdateAll(curwin);
    5184 @@ -7974,6 +8029,11 @@
     5819@@ -7974,6 +8043,11 @@
    51855820        else /* curwin->w_p_scr > curwin->w_height */
    51865821            curwin->w_p_scr = curwin->w_height;
     
    51945829     {
    51955830        errmsg = e_positive;
    5196 @@ -8227,13 +8287,13 @@
     5831@@ -8227,13 +8301,13 @@
    51975832            {
    51985833                if (number == 0 && string != NULL)
     
    52115846                        /* There's another character after zeros or the string
    52125847                         * is empty.  In both cases, we are trying to set a
    5213 @@ -8323,7 +8383,7 @@
     5848@@ -8323,7 +8397,7 @@
    52145849     {
    52155850        --arg;                      /* put arg at the '<' */
     
    52205855            key = 0;
    52215856     }
    5222 @@ -10093,25 +10153,110 @@
     5857@@ -10093,25 +10167,110 @@
    52235858 
    52245859 #ifdef FEAT_LANGMAP
     
    52385873+ * langmap_entry_T.  This does the same as langmap_mapchar[] for characters >=
    52395874+ * 256.
    5240 + */
     5875  */
    52415876+# ifdef FEAT_MBYTE
    52425877+/*
    52435878+ * With multi-byte support use growarray for 'langmap' chars >= 256
    5244   */
     5879+ */
    52455880+typedef struct
    52465881+{
     
    53405975 
    53415976 /*
    5342 @@ -10125,7 +10270,10 @@
     5977@@ -10125,7 +10284,10 @@
    53435978     char_u  *p2;
    53445979     int            from, to;
     
    53525987     for (p = p_langmap; p[0] != NUL; )
    53535988     {
    5354 @@ -10175,7 +10323,13 @@
     5989@@ -10175,7 +10337,13 @@
    53555990                                                             transchar(from));
    53565991                return;
     
    53696004diff -Naur vim72.orig/src/os_unix.c vim72/src/os_unix.c
    53706005--- 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 @@
    53736038     {-1,           "Unknown!", FALSE}
    53746039 };
     
    53876052        RealWaitForChar(read_cmd_fd, p_wd, NULL);
    53886053 }
    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 @@
    53906138      * Ignore any errors.
    53916139      */
     
    53966144 #endif
    53976145 }
    5398 @@ -2936,7 +2939,8 @@
     6146@@ -2936,7 +2961,8 @@
    53996147     }
    54006148 #  endif
     
    54066154 #  ifdef FEAT_XCLIPBOARD
    54076155            && x11_display != xterm_dpy
    5408 @@ -3926,9 +3930,9 @@
     6156@@ -3926,9 +3952,9 @@
    54096157                 */
    54106158                if (fd >= 0)
     
    54196167                    /* Don't need this now that we've duplicated it */
    54206168                    close(fd);
    5421 @@ -3946,7 +3950,17 @@
     6169@@ -3946,7 +3972,17 @@
    54226170                 * children can be kill()ed.  Don't do this when using pipes,
    54236171                 * because stdin is not a tty, we would lose /dev/tty. */
     
    54376185 # ifdef FEAT_GUI
    54386186                if (pty_slave_fd >= 0)
    5439 @@ -3996,13 +4010,13 @@
     6187@@ -3996,13 +4032,13 @@
    54406188 
    54416189                    /* set up stdin/stdout/stderr for the child */
     
    54546202 
    54556203                    close(pty_slave_fd);    /* has been dupped, close it now */
    5456 @@ -4013,13 +4027,13 @@
     6204@@ -4013,13 +4049,13 @@
    54576205                    /* set up stdin for the child */
    54586206                    close(fd_toshell[1]);
     
    54706218 
    54716219 # ifdef FEAT_GUI
    5472 @@ -4027,7 +4041,7 @@
     6220@@ -4027,7 +4063,7 @@
    54736221                    {
    54746222                        /* set up stderr for the child */
     
    54796227 # endif
    54806228                }
    5481 @@ -4078,6 +4092,9 @@
     6229@@ -4078,6 +4114,9 @@
    54826230                int         fromshell_fd;
    54836231                garray_T    ga;
     
    54896237 # ifdef FEAT_GUI
    54906238                if (pty_master_fd >= 0)
    5491 @@ -4158,7 +4175,8 @@
     6239@@ -4158,7 +4197,8 @@
    54926240                                            && (lnum !=
    54936241                                                    curbuf->b_ml.ml_line_count
     
    54996247                                if (lnum > curbuf->b_op_end.lnum)
    55006248                                {
    5501 @@ -4186,7 +4204,9 @@
     6249@@ -4186,7 +4226,9 @@
    55026250                    ga_init2(&ga, 1, BUFLEN);
    55036251 
     
    55106258                {
    55116259                    /*
    5512 @@ -4199,25 +4219,34 @@
     6260@@ -4199,25 +4241,34 @@
    55136261                     * that a typed password is echoed for ssh or gpg command.
    55146262                     * Don't get characters when the child has already
     
    55536301                         * For pipes:
    55546302                         * Check for CTRL-C: send interrupt signal to child.
    5555 @@ -4319,9 +4348,9 @@
     6303@@ -4319,9 +4370,9 @@
    55566304                            {
    55576305                                ta_len -= len;
     
    55646312 
    55656313                    if (got_int)
    5566 @@ -4429,6 +4458,25 @@
     6314@@ -4429,6 +4480,25 @@
    55676315                        out_flush();
    55686316                        if (got_int)
     
    55906338 
    55916339                    /* 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 @@
    55936351     if (xsmp_icefd != -1)
    55946352     {
     
    56026360diff -Naur vim72.orig/src/proto/eval.pro vim72/src/proto/eval.pro
    56036361--- 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 -0800
     6362+++ vim72/src/proto/eval.pro    2009-03-12 11:54:47.005909205 -0700
    56056363@@ -17,7 +17,7 @@
    56066364 int eval_to_bool __ARGS((char_u *arg, int *error, char_u **nextcmd, int skip));
     
    56446402diff -Naur vim72.orig/src/proto/ex_cmds.pro vim72/src/proto/ex_cmds.pro
    56456403--- 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 -0800
     6404+++ vim72/src/proto/ex_cmds.pro 2009-03-12 11:55:13.611614471 -0700
    56476405@@ -11,7 +11,7 @@
    56486406 char_u *make_filter_cmd __ARGS((char_u *cmd, char_u *itmp, char_u *otmp));
     
    56646422diff -Naur vim72.orig/src/proto/ex_getln.pro vim72/src/proto/ex_getln.pro
    56656423--- 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 @@
    56686434 void set_cmd_context __ARGS((expand_T *xp, char_u *str, int len, int col));
    56696435 int expand_cmdline __ARGS((expand_T *xp, char_u *str, int col, int *matchcount, char_u ***matches));
     
    56766442diff -Naur vim72.orig/src/proto/mark.pro vim72/src/proto/mark.pro
    56776443--- 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 -0800
     6444+++ vim72/src/proto/mark.pro    2009-03-12 11:54:40.553496578 -0700
    56796445@@ -26,5 +26,5 @@
    56806446 void write_viminfo_filemarks __ARGS((FILE *fp));
     
    56866452diff -Naur vim72.orig/src/proto/misc2.pro vim72/src/proto/misc2.pro
    56876453--- 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 -0800
     6454+++ vim72/src/proto/misc2.pro   2009-03-12 11:54:56.454515435 -0700
    56896455@@ -59,7 +59,7 @@
    56906456 int handle_x_keys __ARGS((int key));
     
    56986464diff -Naur vim72.orig/src/proto/netbeans.pro vim72/src/proto/netbeans.pro
    56996465--- 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 -0800
     6466+++ vim72/src/proto/netbeans.pro        2009-03-12 11:54:59.854733063 -0700
    57016467@@ -11,7 +11,7 @@
    57026468 void netbeans_frame_moved __ARGS((int new_x, int new_y));
     
    57106476diff -Naur vim72.orig/src/proto/option.pro vim72/src/proto/option.pro
    57116477--- 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 -0800
     6478+++ vim72/src/proto/option.pro  2009-03-12 11:55:13.419602459 -0700
    57136479@@ -44,6 +44,7 @@
    57146480 void set_context_in_set_cmd __ARGS((expand_T *xp, char_u *arg, int opt_flags));
     
    57216487diff -Naur vim72.orig/src/pty.c vim72/src/pty.c
    57226488--- 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 -0800
     6489+++ vim72/src/pty.c     2009-03-12 11:54:28.844744238 -0700
    57246490@@ -270,9 +270,10 @@
    57256491 }
     
    57376503diff -Naur vim72.orig/src/quickfix.c vim72/src/quickfix.c
    57386504--- 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 -0800
     6505+++ vim72/src/quickfix.c        2009-03-12 11:55:13.547610560 -0700
    57406506@@ -1419,6 +1419,7 @@
    57416507     int                        opened_window = FALSE;
     
    58346600diff -Naur vim72.orig/src/regexp.c vim72/src/regexp.c
    58356601--- 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 -0800
     6602+++ vim72/src/regexp.c  2009-03-12 11:55:13.471605532 -0700
    58376603@@ -4532,7 +4532,7 @@
    58386604                cleanup_subexpr();
     
    58716637diff -Naur vim72.orig/src/screen.c vim72/src/screen.c
    58726638--- 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 -0800
     6639+++ vim72/src/screen.c  2009-03-12 11:55:39.893297947 -0700
    58746640@@ -2439,9 +2439,17 @@
    58756641 
     
    59216687                area_attr = attr;               /* start highlighting */
    59226688            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 @@
    59246700         * highlight the cursor position itself. */
    59256701        if (wp->w_p_cuc && vcol == (long)wp->w_virtcol
     
    59316707            vcol_save_attr = char_attr;
    59326708            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 @@
    59346775                    && c == 0x8e
    59356776                    && ScreenLines2[off] != ptr[1])
     
    59406781 #endif
    59416782                || 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 @@
    59436860 #endif
    59446861     static int     entered = FALSE;            /* avoid recursiveness */
     
    59526869      * Allocation of the screen buffers is done only when the size changes and
    59536870      * when Rows and Columns have been set and we have started doing full
    5954 @@ -7440,10 +7456,13 @@
     6871@@ -7440,10 +7484,13 @@
    59556872        {
    59566873            outofmem = TRUE;
     
    59676884 #ifdef FEAT_MBYTE
    59686885     for (i = 0; i < p_mco; ++i)
    5969 @@ -7628,8 +7647,17 @@
     6886@@ -7628,8 +7675,17 @@
    59706887     --RedrawingDisabled;
    59716888 
     
    59886905diff -Naur vim72.orig/src/spell.c vim72/src/spell.c
    59896906--- 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 -0800
     6907+++ vim72/src/spell.c   2009-03-12 11:55:13.363596871 -0700
    59916908@@ -77,7 +77,7 @@
    59926909 
     
    68597776diff -Naur vim72.orig/src/structs.h vim72/src/structs.h
    68607777--- 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 -0800
     7778+++ vim72/src/structs.h 2009-03-12 11:54:46.913903059 -0700
    68627779@@ -459,7 +459,7 @@
    68637780 typedef struct
     
    68887805diff -Naur vim72.orig/src/tag.c vim72/src/tag.c
    68897806--- 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 -0800
     7807+++ vim72/src/tag.c     2009-03-12 11:55:13.591613075 -0700
    68917808@@ -515,7 +515,7 @@
    68927809             * If a count is supplied to the ":tag <name>" command, then
     
    70197936diff -Naur vim72.orig/src/term.c vim72/src/term.c
    70207937--- 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 -0800
     7938+++ vim72/src/term.c    2009-03-12 11:54:59.914737254 -0700
    70227939@@ -4920,7 +4920,15 @@
    70237940        key_name[0] = KEY2TERMCAP0(key);
     
    70397956diff -Naur vim72.orig/src/testdir/Makefile vim72/src/testdir/Makefile
    70407957--- 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
    70437967 
    70447968 .SUFFIXES: .in .out
     
    70737997diff -Naur vim72.orig/src/testdir/Make_ming.mak vim72/src/testdir/Make_ming.mak
    70747998--- 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 -0800
     7999+++ vim72/src/testdir/Make_ming.mak     2009-03-12 11:54:40.397486521 -0700
    70768000@@ -0,0 +1,91 @@
    70778001+# Makefile to run tests for Vim, on Dos-like machines
     
    71688092diff -Naur vim72.orig/src/testdir/test42.ok vim72/src/testdir/test42.ok
    71698093--- 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 -0800
     8094+++ vim72/src/testdir/test42.ok 2009-03-12 11:54:40.601499372 -0700
    71718095@@ -20,7 +20,7 @@
    71728096 ucs-2
     
    71788102 ucs-2le
    71798103 
     8104diff -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
     8133diff -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
    71808147diff -Naur vim72.orig/src/ui.c vim72/src/ui.c
    71818148--- 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 -0800
     8149+++ vim72/src/ui.c      2009-03-12 11:54:50.158111748 -0700
    71838150@@ -1820,7 +1820,7 @@
    71848151 #ifdef HAVE_DUP
     
    72888255diff -Naur vim72.orig/src/version.c vim72/src/version.c
    72898256--- 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 -0800
    7291 @@ -677,9 +677,256 @@
     8257+++ vim72/src/version.c 2009-03-12 11:55:39.893297947 -0700
     8258@@ -677,9 +677,280 @@
    72928259 static int included_patches[] =
    72938260 {   /* Add new patch number below this line */
    72948261 /**/
     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+/**/
    72958286+    128,
    72968287+/**/
     
    75468537 highest_patch()
    75478538 {
    7548 @@ -786,7 +1033,7 @@
     8539@@ -786,7 +1057,7 @@
    75498540     MSG_PUTS(_("\nRISC OS version"));
    75508541 #endif
     
    75558546     if (*compiled_arch != NUL)
    75568547     {
    7557 @@ -825,6 +1072,19 @@
     8548@@ -825,6 +1096,19 @@
    75588549        }
    75598550     }
     
    75778568diff -Naur vim72.orig/src/vim.h vim72/src/vim.h
    75788569--- 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 -0800
     8570+++ vim72/src/vim.h     2009-03-12 11:55:13.547610560 -0700
    75808571@@ -341,8 +341,14 @@
    75818572 #ifdef BACKSLASH_IN_FILENAME
     
    76458636diff -Naur vim72.orig/src/window.c vim72/src/window.c
    76468637--- 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 -0800
     8638+++ vim72/src/window.c  2009-03-12 11:55:13.547610560 -0700
    76488639@@ -12,7 +12,7 @@
    76498640 static int path_is_url __ARGS((char_u *p));
     
    77368727diff -Naur vim72.orig/src/workshop.c vim72/src/workshop.c
    77378728--- 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 -0800
     8729+++ vim72/src/workshop.c        2009-03-12 11:54:50.062104763 -0700
    77398730@@ -1121,8 +1121,12 @@
    77408731                                      ? (char *)curbuf->b_sfname : "<None>");
Note: See TracChangeset for help on using the changeset viewer.