Ignore:
Timestamp:
Oct 21, 2006, 9:10:09 PM (18 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:
18e9f9f
Parents:
054bf2ad
Message:

Updated CLFS patches

File:
1 moved

Legend:

Unmodified
Added
Removed
  • patches/vim-7.0-fixes-15.patch

    r054bf2ad r862e2c0  
    11Submitted By: Jim Gifford (jim at linuxfromscratch dot org)
    2 Date: 2006-10-13
     2Date: 2006-10-21
    33Initial Package Version: 7.0
    44Origin: Upstream
    55Upstream Status: Applied
    6 Description: Contains all upstream patches up to 7.0.132
    7              The following patches were skipped
    8                 005 027 028 032 045 057 065 074 108 130 131 132
    9 
     6Description: Contains all upstream patches up to 7.0.146
     7             The following patches were skipped
     8                005 027 028 032 045 057 065 074 108 130 131 132 138
    109diff -Naur vim70.orig/configure vim70/configure
    1110--- vim70.orig/configure        2004-07-05 02:02:24.000000000 -0700
    12 +++ vim70/configure     2006-10-13 01:02:48.000000000 -0700
     11+++ vim70/configure     2006-10-21 21:08:54.000000000 -0700
    1312@@ -3,4 +3,4 @@
    1413 # This is just a stub for the Unix configure script, to provide support for
     
    1918diff -Naur vim70.orig/runtime/autoload/ccomplete.vim vim70/runtime/autoload/ccomplete.vim
    2019--- vim70.orig/runtime/autoload/ccomplete.vim   2006-05-03 07:35:56.000000000 -0700
    21 +++ vim70/runtime/autoload/ccomplete.vim        2006-10-13 01:02:42.000000000 -0700
     20+++ vim70/runtime/autoload/ccomplete.vim        2006-10-21 21:08:49.000000000 -0700
    2221@@ -1,7 +1,7 @@
    2322 " Vim completion script
     
    4039diff -Naur vim70.orig/runtime/autoload/gzip.vim vim70/runtime/autoload/gzip.vim
    4140--- vim70.orig/runtime/autoload/gzip.vim        2006-03-31 07:12:15.000000000 -0800
    42 +++ vim70/runtime/autoload/gzip.vim     2006-10-13 01:03:07.000000000 -0700
     41+++ vim70/runtime/autoload/gzip.vim     2006-10-21 21:09:06.000000000 -0700
    4342@@ -1,6 +1,6 @@
    4443 " Vim autoload file for editing compressed files.
     
    101100diff -Naur vim70.orig/runtime/autoload/paste.vim vim70/runtime/autoload/paste.vim
    102101--- vim70.orig/runtime/autoload/paste.vim       2006-04-21 11:31:01.000000000 -0700
    103 +++ vim70/runtime/autoload/paste.vim    2006-10-13 01:02:46.000000000 -0700
     102+++ vim70/runtime/autoload/paste.vim    2006-10-21 21:08:52.000000000 -0700
    104103@@ -1,6 +1,6 @@
    105104 " Vim support file to help with paste mappings and menus
     
    121120diff -Naur vim70.orig/runtime/autoload/spellfile.vim vim70/runtime/autoload/spellfile.vim
    122121--- vim70.orig/runtime/autoload/spellfile.vim   2006-02-01 04:12:24.000000000 -0800
    123 +++ vim70/runtime/autoload/spellfile.vim        2006-10-13 01:02:54.000000000 -0700
     122+++ vim70/runtime/autoload/spellfile.vim        2006-10-21 21:09:00.000000000 -0700
    124123@@ -1,9 +1,9 @@
    125124 " Vim script to download a missing spell file
     
    177176diff -Naur vim70.orig/runtime/doc/eval.txt vim70/runtime/doc/eval.txt
    178177--- vim70.orig/runtime/doc/eval.txt     2006-05-07 05:16:44.000000000 -0700
    179 +++ vim70/runtime/doc/eval.txt  2006-10-13 01:03:07.000000000 -0700
     178+++ vim70/runtime/doc/eval.txt  2006-10-21 21:09:06.000000000 -0700
    180179@@ -1,4 +1,4 @@
    181180-*eval.txt*      For Vim version 7.0.  Last change: 2006 May 06
     
    217216diff -Naur vim70.orig/runtime/menu.vim vim70/runtime/menu.vim
    218217--- vim70.orig/runtime/menu.vim 2006-04-17 06:47:28.000000000 -0700
    219 +++ vim70/runtime/menu.vim      2006-10-13 01:03:05.000000000 -0700
     218+++ vim70/runtime/menu.vim      2006-10-21 21:09:05.000000000 -0700
    220219@@ -2,7 +2,7 @@
    221220 " You can also use this as a start for your own set of menus.
     
    284283diff -Naur vim70.orig/runtime/plugin/matchparen.vim vim70/runtime/plugin/matchparen.vim
    285284--- vim70.orig/runtime/plugin/matchparen.vim    2006-04-27 06:31:26.000000000 -0700
    286 +++ vim70/runtime/plugin/matchparen.vim 2006-10-13 01:02:59.000000000 -0700
     285+++ vim70/runtime/plugin/matchparen.vim 2006-10-21 21:09:04.000000000 -0700
    287286@@ -1,6 +1,6 @@
    288287 " Vim plugin for showing matching parens
     
    327326diff -Naur vim70.orig/runtime/scripts.vim vim70/runtime/scripts.vim
    328327--- vim70.orig/runtime/scripts.vim      2006-03-28 11:30:49.000000000 -0800
    329 +++ vim70/runtime/scripts.vim   2006-10-13 01:02:48.000000000 -0700
     328+++ vim70/runtime/scripts.vim   2006-10-21 21:08:54.000000000 -0700
    330329@@ -1,7 +1,7 @@
    331330 " Vim support file to detect file types in scripts
     
    352351diff -Naur vim70.orig/runtime/tutor/Makefile vim70/runtime/tutor/Makefile
    353352--- vim70.orig/runtime/tutor/Makefile   2004-06-07 07:32:39.000000000 -0700
    354 +++ vim70/runtime/tutor/Makefile        2006-10-13 01:02:59.000000000 -0700
     353+++ vim70/runtime/tutor/Makefile        2006-10-21 21:09:04.000000000 -0700
    355354@@ -2,8 +2,13 @@
    356355 #
     
    386385diff -Naur vim70.orig/runtime/tutor/tutor.gr.utf-8 vim70/runtime/tutor/tutor.gr.utf-8
    387386--- vim70.orig/runtime/tutor/tutor.gr.utf-8     1969-12-31 16:00:00.000000000 -0800
    388 +++ vim70/runtime/tutor/tutor.gr.utf-8  2006-10-13 01:02:59.000000000 -0700
     387+++ vim70/runtime/tutor/tutor.gr.utf-8  2006-10-21 21:09:04.000000000 -0700
    389388@@ -0,0 +1,815 @@
    390389+===============================================================================
     
    14191418diff -Naur vim70.orig/runtime/tutor/tutor.ru.utf-8 vim70/runtime/tutor/tutor.ru.utf-8
    14201419--- vim70.orig/runtime/tutor/tutor.ru.utf-8     1969-12-31 16:00:00.000000000 -0800
    1421 +++ vim70/runtime/tutor/tutor.ru.utf-8  2006-10-13 01:02:54.000000000 -0700
     1420+++ vim70/runtime/tutor/tutor.ru.utf-8  2006-10-21 21:09:00.000000000 -0700
    14221421@@ -0,0 +1,834 @@
    14231422+===============================================================================
     
    23402339diff -Naur vim70.orig/runtime/tutor/tutor.vim vim70/runtime/tutor/tutor.vim
    23412340--- vim70.orig/runtime/tutor/tutor.vim  2006-03-18 12:20:36.000000000 -0800
    2342 +++ vim70/runtime/tutor/tutor.vim       2006-10-13 01:02:59.000000000 -0700
     2341+++ vim70/runtime/tutor/tutor.vim       2006-10-21 21:09:04.000000000 -0700
    23432342@@ -1,6 +1,6 @@
    23442343 " Vim tutor support file
     
    23922391diff -Naur vim70.orig/src/auto/configure vim70/src/auto/configure
    23932392--- vim70.orig/src/auto/configure       2006-05-04 03:46:19.000000000 -0700
    2394 +++ vim70/src/auto/configure    2006-10-13 01:03:10.000000000 -0700
     2393+++ vim70/src/auto/configure    2006-10-21 21:09:10.000000000 -0700
    23952394@@ -4014,7 +4014,7 @@
    23962395       LDFLAGS=$ldflags_save
     
    24222421   esac
    24232422   for libname in $tlibs; do
     2423@@ -15302,7 +15302,7 @@
     2424        && test "x$GUITYPE" != "xCARBONGUI"; then
     2425   echo "$as_me:$LINENO: checking whether we need -framework Carbon" >&5
     2426 echo $ECHO_N "checking whether we need -framework Carbon... $ECHO_C" >&6
     2427-    if test "x$enable_multibyte" = "xyes" || test "x$features" == "xbig" \
     2428+    if test "x$enable_multibyte" = "xyes" || test "x$features" = "xbig" \
     2429        || test "x$features" = "xhuge"; then
     2430     LIBS="$LIBS -framework Carbon"
     2431     echo "$as_me:$LINENO: result: yes" >&5
    24242432diff -Naur vim70.orig/src/buffer.c vim70/src/buffer.c
    24252433--- vim70.orig/src/buffer.c     2006-04-26 14:37:23.000000000 -0700
    2426 +++ vim70/src/buffer.c  2006-10-13 01:02:59.000000000 -0700
     2434+++ vim70/src/buffer.c  2006-10-21 21:09:11.000000000 -0700
    24272435@@ -434,12 +434,8 @@
    24282436     if (usingNetbeans)
     
    24402448     /*
    24412449      * Remove the buffer from the list.
     2450@@ -1212,11 +1208,11 @@
     2451     {
     2452 # ifdef FEAT_WINDOWS
     2453        /* jump to first window containing buf if one exists ("useopen") */
     2454-       if (vim_strchr(p_swb, 'o') && buf_jump_open_win(buf))
     2455+       if (vim_strchr(p_swb, 'o') != NULL && buf_jump_open_win(buf))
     2456            return OK;
     2457        /* jump to first window in any tab page containing buf if one exists
     2458         * ("usetab") */
     2459-       if (vim_strchr(p_swb, 'a') && buf_jump_open_tab(buf))
     2460+       if (vim_strchr(p_swb, 'a') != NULL && buf_jump_open_tab(buf))
     2461            return OK;
     2462        if (win_split(0, 0) == FAIL)
     2463 # endif
    24422464@@ -1390,7 +1386,8 @@
    24432465     }
     
    24842506  * functions for dealing with the buffer list
    24852507  */
     2508@@ -1837,13 +1842,13 @@
     2509     if (options & GETF_SWITCH)
     2510     {
     2511        /* use existing open window for buffer if wanted */
     2512-       if (vim_strchr(p_swb, 'o'))     /* useopen */
     2513+       if (vim_strchr(p_swb, 'o') != NULL)     /* useopen */
     2514            wp = buf_jump_open_win(buf);
     2515        /* use existing open window in any tab page for buffer if wanted */
     2516-       if (vim_strchr(p_swb, 'a'))     /* usetab */
     2517+       if (vim_strchr(p_swb, 'a') != NULL)     /* usetab */
     2518            wp = buf_jump_open_tab(buf);
     2519        /* split window if wanted ("split") */
     2520-       if (wp == NULL && vim_strchr(p_swb, 't') && !bufempty())
     2521+       if (wp == NULL && vim_strchr(p_swb, 'l') != NULL && !bufempty())
     2522        {
     2523            if (win_split(0, 0) == FAIL)
     2524                return FAIL;
    24862525@@ -3324,7 +3329,7 @@
    24872526     {
     
    25352574diff -Naur vim70.orig/src/configure vim70/src/configure
    25362575--- vim70.orig/src/configure    2006-05-07 07:17:49.000000000 -0700
    2537 +++ vim70/src/configure 2006-10-13 01:02:48.000000000 -0700
     2576+++ vim70/src/configure 2006-10-21 21:08:54.000000000 -0700
    25382577@@ -2,5 +2,9 @@
    25392578 # run the automatically generated configure script
     
    25482587diff -Naur vim70.orig/src/configure.in vim70/src/configure.in
    25492588--- vim70.orig/src/configure.in 2006-05-04 03:46:11.000000000 -0700
    2550 +++ vim70/src/configure.in      2006-10-13 01:03:09.000000000 -0700
     2589+++ vim70/src/configure.in      2006-10-21 21:09:10.000000000 -0700
    25512590@@ -508,7 +508,8 @@
    25522591       LDFLAGS=$ldflags_save
     
    25802619   esac
    25812620   for libname in $tlibs; do
     2621@@ -2835,7 +2838,7 @@
     2622        && test "x$GUITYPE" != "xCARBONGUI"; then
     2623   AC_MSG_CHECKING(whether we need -framework Carbon)
     2624   dnl check for MACOSX without Carbon GUI, but with FEAT_MBYTE
     2625-  if test "x$enable_multibyte" = "xyes" || test "x$features" == "xbig" \
     2626+  if test "x$enable_multibyte" = "xyes" || test "x$features" = "xbig" \
     2627        || test "x$features" = "xhuge"; then
     2628     LIBS="$LIBS -framework Carbon"
     2629     AC_MSG_RESULT(yes)
    25822630diff -Naur vim70.orig/src/edit.c vim70/src/edit.c
    25832631--- vim70.orig/src/edit.c       2006-05-07 04:48:51.000000000 -0700
    2584 +++ vim70/src/edit.c    2006-10-13 01:03:10.000000000 -0700
     2632+++ vim70/src/edit.c    2006-10-21 21:09:10.000000000 -0700
    25852633@@ -129,7 +129,7 @@
    25862634 
     
    29152963            break;
    29162964 
    2917 @@ -3971,7 +4018,7 @@
     2965@@ -3862,6 +3909,8 @@
     2966            {
     2967                int     flags = 0;
     2968 
     2969+               ++msg_silent;  /* Don't want messages for wrapscan. */
     2970+
     2971                /* ctrl_x_mode == CTRL_X_WHOLE_LINE || word-wise search that
     2972                 * has added a word that was at the beginning of the line */
     2973                if (    ctrl_x_mode == CTRL_X_WHOLE_LINE
     2974@@ -3873,6 +3922,7 @@
     2975                                                              compl_direction,
     2976                                 compl_pattern, 1L, SEARCH_KEEP + SEARCH_NFMSG,
     2977                                                        RE_LAST, (linenr_T)0);
     2978+               --msg_silent;
     2979                if (!compl_started)
     2980                {
     2981                    /* set "compl_started" even on fail */
     2982@@ -3971,7 +4021,7 @@
    29182983                            continue;
    29192984                    }
     
    29242989                                           0, flags) != NOTDONE)
    29252990                {
    2926 @@ -3996,7 +4043,7 @@
     2991@@ -3996,7 +4046,7 @@
    29272992            if (got_int)
    29282993                break;
     
    29332998 
    29342999            if ((ctrl_x_mode != 0 && ctrl_x_mode != CTRL_X_WHOLE_LINE)
    2935 @@ -4100,6 +4147,21 @@
     3000@@ -4100,6 +4150,21 @@
    29363001                && compl_shown_match->cp_next != NULL
    29373002                && compl_shown_match->cp_next != compl_first_match)
     
    29553020 
    29563021     if (allow_get_expansion && insert_match
    2957 @@ -4124,8 +4186,6 @@
     3022@@ -4124,8 +4189,6 @@
    29583023     {
    29593024        if (compl_shows_dir == FORWARD && compl_shown_match->cp_next != NULL)
     
    29643029            found_end = (compl_first_match != NULL
    29653030                           && (compl_shown_match->cp_next == compl_first_match
    2966 @@ -4134,14 +4194,24 @@
     3031@@ -4134,14 +4197,24 @@
    29673032        else if (compl_shows_dir == BACKWARD
    29683033                                        && compl_shown_match->cp_prev != NULL)
     
    29913056            {
    29923057                if (compl_shows_dir == BACKWARD)
    2993 @@ -4149,14 +4219,27 @@
     3058@@ -4149,14 +4222,27 @@
    29943059                else
    29953060                    ++compl_pending;
     
    30233088        }
    30243089        if ((compl_shown_match->cp_flags & ORIGINAL_TEXT) == 0
    3025 @@ -4265,9 +4348,9 @@
     3090@@ -4265,9 +4351,9 @@
    30263091        return;
    30273092     count = 0;
     
    30353100     {
    30363101        if (vim_is_ctrl_x_key(c) && c != Ctrl_X && c != Ctrl_R)
    3037 @@ -4277,12 +4360,27 @@
     3102@@ -4277,12 +4363,27 @@
    30383103            (void)ins_compl_next(FALSE, ins_compl_key2count(c),
    30393104                                                    c != K_UP && c != K_DOWN);
     
    30673132 
    30683133 /*
    3069 @@ -4611,10 +4709,12 @@
     3134@@ -4611,10 +4712,12 @@
    30703135                                     (int)STRLEN(compl_pattern), curs_col);
    30713136            if (compl_xp.xp_context == EXPAND_UNSUCCESSFUL
     
    30843149        else if (ctrl_x_mode == CTRL_X_FUNCTION || ctrl_x_mode == CTRL_X_OMNI)
    30853150        {
    3086 @@ -4668,11 +4768,17 @@
     3151@@ -4668,11 +4771,17 @@
    30873152            else
    30883153                compl_col = spell_word_start(startcol);
     
    31053170            if (compl_pattern == NULL)
    31063171 #endif
    3107 @@ -4720,7 +4826,7 @@
     3172@@ -4720,7 +4829,7 @@
    31083173        vim_free(compl_orig_text);
    31093174        compl_orig_text = vim_strnsave(line + compl_col, compl_length);
     
    31143179            vim_free(compl_pattern);
    31153180            compl_pattern = NULL;
    3116 @@ -5227,8 +5333,16 @@
     3181@@ -5227,8 +5336,16 @@
    31173182        /* Format with 'formatexpr' when it's set.  Use internal formatting
    31183183         * when 'formatexpr' isn't set or it returns non-zero. */
     
    31333198            internal_format(textwidth, second_indent, flags, c == NUL);
    31343199     }
    3135 @@ -8508,7 +8622,12 @@
     3200@@ -8508,7 +8625,12 @@
    31363201     tpos = curwin->w_cursor;
    31373202     if (oneleft() == OK)
     
    31473212        /* If exit reversed string, position is fixed */
    31483213        if (revins_scol != -1 && (int)curwin->w_cursor.col >= revins_scol)
     3214@@ -8700,7 +8822,11 @@
     3215     if (mod_mask & MOD_MASK_CTRL)
     3216     {
     3217        /* <C-PageUp>: tab page back */
     3218-       goto_tabpage(-1);
     3219+       if (first_tabpage->tp_next != NULL)
     3220+       {
     3221+           start_arrow(&curwin->w_cursor);
     3222+           goto_tabpage(-1);
     3223+       }
     3224        return;
     3225     }
     3226 #endif
     3227@@ -8759,7 +8885,11 @@
     3228     if (mod_mask & MOD_MASK_CTRL)
     3229     {
     3230        /* <C-PageDown>: tab page forward */
     3231-       goto_tabpage(0);
     3232+       if (first_tabpage->tp_next != NULL)
     3233+       {
     3234+           start_arrow(&curwin->w_cursor);
     3235+           goto_tabpage(0);
     3236+       }
     3237        return;
     3238     }
     3239 #endif
    31493240diff -Naur vim70.orig/src/eval.c vim70/src/eval.c
    31503241--- vim70.orig/src/eval.c       2006-05-05 10:15:26.000000000 -0700
    3151 +++ vim70/src/eval.c    2006-10-13 01:03:10.000000000 -0700
    3152 @@ -454,7 +454,7 @@
     3242+++ vim70/src/eval.c    2006-10-21 21:09:11.000000000 -0700
     3243@@ -191,8 +191,6 @@
     3244 #define FC_RANGE    2          /* function accepts range */
     3245 #define FC_DICT            4           /* Dict function, uses "self" */
     3246 
     3247-#define DEL_REFCOUNT   999999  /* list/dict is being deleted */
     3248-
     3249 /*
     3250  * All user-defined functions are found in this hashtable.
     3251  */
     3252@@ -435,7 +433,7 @@
     3253 static void set_ref_in_list __ARGS((list_T *l, int copyID));
     3254 static void set_ref_in_item __ARGS((typval_T *tv, int copyID));
     3255 static void dict_unref __ARGS((dict_T *d));
     3256-static void dict_free __ARGS((dict_T *d));
     3257+static void dict_free __ARGS((dict_T *d, int recurse));
     3258 static dictitem_T *dictitem_alloc __ARGS((char_u *key));
     3259 static dictitem_T *dictitem_copy __ARGS((dictitem_T *org));
     3260 static void dictitem_remove __ARGS((dict_T *dict, dictitem_T *item));
     3261@@ -454,7 +452,7 @@
    31533262 static char_u *deref_func_name __ARGS((char_u *name, int *lenp));
    31543263 static int get_func_tv __ARGS((char_u *name, int len, typval_T *rettv, char_u **arg, linenr_T firstline, linenr_T lastline, int *doesrange, int evaluate, dict_T *selfdict));
     
    31593268 static void f_add __ARGS((typval_T *argvars, typval_T *rettv));
    31603269 static void f_append __ARGS((typval_T *argvars, typval_T *rettv));
    3161 @@ -622,6 +622,7 @@
     3270@@ -622,6 +620,7 @@
    31623271 static void f_setreg __ARGS((typval_T *argvars, typval_T *rettv));
    31633272 static void f_settabwinvar __ARGS((typval_T *argvars, typval_T *rettv));
     
    31673276 static void f_sort __ARGS((typval_T *argvars, typval_T *rettv));
    31683277 static void f_soundfold __ARGS((typval_T *argvars, typval_T *rettv));
    3169 @@ -701,6 +702,7 @@
     3278@@ -701,6 +700,7 @@
    31703279 static void list_one_var_a __ARGS((char_u *prefix, char_u *name, int type, char_u *string));
    31713280 static void set_var __ARGS((char_u *name, typval_T *varp, int copy));
     
    31753284 static void copy_tv __ARGS((typval_T *from, typval_T *to));
    31763285 static int item_copy __ARGS((typval_T *from, typval_T *to, int deep, int copyID));
    3177 @@ -2260,7 +2262,7 @@
     3286@@ -2260,7 +2260,7 @@
    31783287            EMSG(_(e_letunexp));
    31793288        else
     
    31843293 
    31853294            p = get_tv_string_chk(tv);
    3186 @@ -2269,7 +2271,7 @@
     3295@@ -2269,7 +2269,7 @@
    31873296                s = get_reg_contents(*arg == '@' ? '"' : *arg, TRUE, TRUE);
    31883297                if (s != NULL)
     
    31933302                }
    31943303            }
    3195 @@ -2278,7 +2280,7 @@
     3304@@ -2278,7 +2278,7 @@
    31963305                write_reg_contents(*arg == '@' ? '"' : *arg, p, -1, FALSE);
    31973306                arg_end = arg + 1;
     
    32023311     }
    32033312 
    3204 @@ -3364,6 +3366,8 @@
     3313@@ -3364,6 +3364,8 @@
    32053314        hi = hash_find(ht, varname);
    32063315        if (!HASHITEM_EMPTY(hi))
     
    32113320                return FAIL;
    32123321            delete_var(ht, hi);
    3213 @@ -6059,6 +6063,10 @@
     3322@@ -4895,7 +4897,7 @@
     3323                    {
     3324                        if (list_append_tv(l, &item->li_tv) == FAIL)
     3325                        {
     3326-                           list_free(l);
     3327+                           list_free(l, TRUE);
     3328                            return FAIL;
     3329                        }
     3330                        item = item->li_next;
     3331@@ -5295,7 +5297,7 @@
     3332        EMSG2(_("E697: Missing end of List ']': %s"), *arg);
     3333 failret:
     3334        if (evaluate)
     3335-           list_free(l);
     3336+           list_free(l, TRUE);
     3337        return FAIL;
     3338     }
     3339 
     3340@@ -5359,8 +5361,8 @@
     3341 list_unref(l)
     3342     list_T *l;
     3343 {
     3344-    if (l != NULL && l->lv_refcount != DEL_REFCOUNT && --l->lv_refcount <= 0)
     3345-       list_free(l);
     3346+    if (l != NULL && --l->lv_refcount <= 0)
     3347+       list_free(l, TRUE);
     3348 }
     3349 
     3350 /*
     3351@@ -5368,14 +5370,12 @@
     3352  * Ignores the reference count.
     3353  */
     3354     void
     3355-list_free(l)
     3356-    list_T *l;
     3357+list_free(l, recurse)
     3358+    list_T  *l;
     3359+    int            recurse;    /* Free Lists and Dictionaries recursively. */
     3360 {
     3361     listitem_T *item;
     3362 
     3363-    /* Avoid that recursive reference to the list frees us again. */
     3364-    l->lv_refcount = DEL_REFCOUNT;
     3365-
     3366     /* Remove the list from the list of lists for garbage collection. */
     3367     if (l->lv_used_prev == NULL)
     3368        first_list = l->lv_used_next;
     3369@@ -5388,7 +5388,10 @@
     3370     {
     3371        /* Remove the item before deleting it. */
     3372        l->lv_first = item->li_next;
     3373-       listitem_free(item);
     3374+       if (recurse || (item->li_tv.v_type != VAR_LIST
     3375+                                          && item->li_tv.v_type != VAR_DICT))
     3376+           clear_tv(&item->li_tv);
     3377+       vim_free(item);
     3378     }
     3379     vim_free(l);
     3380 }
     3381@@ -5448,6 +5451,8 @@
     3382 {
     3383     listitem_T *item1, *item2;
     3384 
     3385+    if (l1 == l2)
     3386+       return TRUE;
     3387     if (list_len(l1) != list_len(l2))
     3388        return FALSE;
     3389 
     3390@@ -5484,6 +5489,8 @@
     3391     dictitem_T *item2;
     3392     int                todo;
     3393 
     3394+    if (d1 == d2)
     3395+       return TRUE;
     3396     if (dict_len(d1) != dict_len(d2))
     3397        return FALSE;
     3398 
     3399@@ -5516,19 +5523,29 @@
     3400 {
     3401     char_u     buf1[NUMBUFLEN], buf2[NUMBUFLEN];
     3402     char_u     *s1, *s2;
     3403+    static int  recursive = 0;     /* cach recursive loops */
     3404+    int                r;
     3405 
     3406     if (tv1->v_type != tv2->v_type)
     3407        return FALSE;
     3408+    /* Catch lists and dicts that have an endless loop by limiting
     3409+     * recursiveness to 1000.  We guess they are equal then. */
     3410+    if (recursive >= 1000)
     3411+       return TRUE;
     3412 
     3413     switch (tv1->v_type)
     3414     {
     3415        case VAR_LIST:
     3416-           /* recursive! */
     3417-           return list_equal(tv1->vval.v_list, tv2->vval.v_list, ic);
     3418+           ++recursive;
     3419+           r = list_equal(tv1->vval.v_list, tv2->vval.v_list, ic);
     3420+           --recursive;
     3421+           return r;
     3422 
     3423        case VAR_DICT:
     3424-           /* recursive! */
     3425-           return dict_equal(tv1->vval.v_dict, tv2->vval.v_dict, ic);
     3426+           ++recursive;
     3427+           r = dict_equal(tv1->vval.v_dict, tv2->vval.v_dict, ic);
     3428+           --recursive;
     3429+           return r;
     3430 
     3431        case VAR_FUNC:
     3432            return (tv1->vval.v_string != NULL
     3433@@ -6059,6 +6076,10 @@
    32143434     tabpage_T  *tp;
    32153435 #endif
     
    32223442      * 1. Go through all accessible variables and mark all lists and dicts
    32233443      *    with copyID.
    3224 @@ -7139,6 +7147,7 @@
     3444@@ -6097,7 +6118,10 @@
     3445     for (dd = first_dict; dd != NULL; )
     3446        if (dd->dv_copyID != copyID)
     3447        {
     3448-           dict_free(dd);
     3449+           /* Free the Dictionary and ordinary items it contains, but don't
     3450+            * recurse into Lists and Dictionaries, they will be in the list
     3451+            * of dicts or list of lists. */
     3452+           dict_free(dd, FALSE);
     3453            did_free = TRUE;
     3454 
     3455            /* restart, next dict may also have been freed */
     3456@@ -6114,7 +6138,10 @@
     3457     for (ll = first_list; ll != NULL; )
     3458        if (ll->lv_copyID != copyID && ll->lv_watch == NULL)
     3459        {
     3460-           list_free(ll);
     3461+           /* Free the List and ordinary items it contains, but don't recurse
     3462+            * into Lists and Dictionaries, they will be in the list of dicts
     3463+            * or list of lists. */
     3464+           list_free(ll, FALSE);
     3465            did_free = TRUE;
     3466 
     3467            /* restart, next list may also have been freed */
     3468@@ -6207,11 +6234,12 @@
     3469     d = (dict_T *)alloc(sizeof(dict_T));
     3470     if (d != NULL)
     3471     {
     3472-       /* Add the list to the hashtable for garbage collection. */
     3473+       /* Add the list to the list of dicts for garbage collection. */
     3474        if (first_dict != NULL)
     3475            first_dict->dv_used_prev = d;
     3476        d->dv_used_next = first_dict;
     3477        d->dv_used_prev = NULL;
     3478+       first_dict = d;
     3479 
     3480        hash_init(&d->dv_hashtab);
     3481        d->dv_lock = 0;
     3482@@ -6229,8 +6257,8 @@
     3483 dict_unref(d)
     3484     dict_T *d;
     3485 {
     3486-    if (d != NULL && d->dv_refcount != DEL_REFCOUNT && --d->dv_refcount <= 0)
     3487-       dict_free(d);
     3488+    if (d != NULL && --d->dv_refcount <= 0)
     3489+       dict_free(d, TRUE);
     3490 }
     3491 
     3492 /*
     3493@@ -6238,16 +6266,14 @@
     3494  * Ignores the reference count.
     3495  */
     3496     static void
     3497-dict_free(d)
     3498-    dict_T *d;
     3499+dict_free(d, recurse)
     3500+    dict_T  *d;
     3501+    int            recurse;    /* Free Lists and Dictionaries recursively. */
     3502 {
     3503     int                todo;
     3504     hashitem_T *hi;
     3505     dictitem_T *di;
     3506 
     3507-    /* Avoid that recursive reference to the dict frees us again. */
     3508-    d->dv_refcount = DEL_REFCOUNT;
     3509-
     3510     /* Remove the dict from the list of dicts for garbage collection. */
     3511     if (d->dv_used_prev == NULL)
     3512        first_dict = d->dv_used_next;
     3513@@ -6267,7 +6293,10 @@
     3514             * something recursive causing trouble. */
     3515            di = HI2DI(hi);
     3516            hash_remove(&d->dv_hashtab, hi);
     3517-           dictitem_free(di);
     3518+           if (recurse || (di->di_tv.v_type != VAR_LIST
     3519+                                            && di->di_tv.v_type != VAR_DICT))
     3520+               clear_tv(&di->di_tv);
     3521+           vim_free(di);
     3522            --todo;
     3523        }
     3524     }
     3525@@ -6718,7 +6747,7 @@
     3526        EMSG2(_("E723: Missing end of Dictionary '}': %s"), *arg);
     3527 failret:
     3528        if (evaluate)
     3529-           dict_free(d);
     3530+           dict_free(d, TRUE);
     3531        return FAIL;
     3532     }
     3533 
     3534@@ -7139,6 +7168,7 @@
    32253535     {"setreg",         2, 3, f_setreg},
    32263536     {"settabwinvar",   4, 4, f_settabwinvar},
     
    32303540     {"sort",           1, 2, f_sort},
    32313541     {"soundfold",      1, 1, f_soundfold},
    3232 @@ -7595,8 +7604,8 @@
     3542@@ -7595,8 +7625,8 @@
    32333543  * Give an error message with a function name.  Handle <SNR> things.
    32343544  */
     
    32413551 {
    32423552     char_u     *p;
    3243 @@ -7605,7 +7614,7 @@
     3553@@ -7605,7 +7635,7 @@
    32443554        p = concat_str((char_u *)"<SNR>", name + 3);
    32453555     else
     
    32503560        vim_free(p);
    32513561 }
    3252 @@ -8252,6 +8261,12 @@
     3562@@ -8252,6 +8282,12 @@
    32533563        EMSG(_("E785: complete() can only be used in Insert mode"));
    32543564        return;
     
    32633573     {
    32643574        EMSG(_(e_invarg));
    3265 @@ -9173,25 +9188,25 @@
     3575@@ -9173,25 +9209,25 @@
    32663576     typval_T   save_key;
    32673577     int                rem;
     
    32933603     }
    32943604 
    3295 @@ -9223,7 +9238,7 @@
     3605@@ -9223,7 +9259,7 @@
    32963606                {
    32973607                    --todo;
     
    33023612                    vimvars[VV_KEY].vv_str = vim_strsave(di->di_key);
    33033613                    if (filter_map_one(&di->di_tv, expr, map, &rem) == FAIL
    3304 @@ -9242,7 +9257,7 @@
     3614@@ -9242,7 +9278,7 @@
    33053615        {
    33063616            for (li = l->lv_first; li != NULL; li = nli)
     
    33113621                nli = li->li_next;
    33123622                if (filter_map_one(&li->li_tv, expr, map, &rem) == FAIL
    3313 @@ -9598,7 +9613,9 @@
     3623@@ -9598,7 +9634,9 @@
    33143624     typval_T   *argvars;
    33153625     typval_T   *rettv;
     
    33223632 
    33233633 /*
    3324 @@ -9792,6 +9809,9 @@
     3634@@ -9792,6 +9830,9 @@
    33253635     varnumber_T                n;
    33263636     int                        error = FALSE;
     
    33323642     ++allow_keys;
    33333643     if (argvars[0].v_type == VAR_UNKNOWN)
    3334 @@ -10412,20 +10432,14 @@
     3644@@ -10412,20 +10453,14 @@
    33353645 
    33363646     if (win != NULL && varname != NULL)
     
    33593669        {
    33603670            if (*varname == NUL)
    3361 @@ -10438,6 +10452,10 @@
     3671@@ -10438,6 +10473,10 @@
    33623672            if (v != NULL)
    33633673                copy_tv(&v->di_tv, rettv);
     
    33703680 
    33713681     --emsg_off;
    3372 @@ -11312,14 +11330,19 @@
     3682@@ -11312,14 +11351,19 @@
    33733683 
    33743684 static int inputsecret_flag = 0;
     
    33933703     char_u     *prompt = get_tv_string_chk(&argvars[0]);
    33943704     char_u     *p = NULL;
    3395 @@ -11369,10 +11392,10 @@
     3705@@ -11369,10 +11413,10 @@
    33963706            if (defstr != NULL)
    33973707                stuffReadbuffSpec(defstr);
     
    34063716 
    34073717                rettv->vval.v_string = NULL;
    3408 @@ -11404,6 +11427,18 @@
     3718@@ -11404,6 +11448,18 @@
    34093719 }
    34103720 
     
    34253735  */
    34263736     static void
    3427 @@ -11443,7 +11478,7 @@
     3737@@ -11443,7 +11499,7 @@
    34283738     }
    34293739     else
     
    34343744 
    34353745 /*
    3436 @@ -11471,6 +11506,7 @@
     3746@@ -11471,6 +11527,7 @@
    34373747     }
    34383748 
     
    34423752     msg_scroll = TRUE;
    34433753     msg_clr_eos();
    3444 @@ -13250,7 +13286,7 @@
     3754@@ -13250,7 +13307,7 @@
    34453755        if (argvars[2].v_type != VAR_UNKNOWN)
    34463756            EMSG2(_(e_toomanyarg), "remove()");
     
    34513761            key = get_tv_string_chk(&argvars[1]);
    34523762            if (key != NULL)
    3453 @@ -13270,7 +13306,7 @@
     3763@@ -13270,7 +13327,7 @@
    34543764     else if (argvars[0].v_type != VAR_LIST)
    34553765        EMSG2(_(e_listdictarg), "remove()");
     
    34603770        int         error = FALSE;
    34613771 
    3462 @@ -14157,11 +14193,7 @@
     3772@@ -14157,11 +14214,7 @@
    34633773     typval_T   *rettv;
    34643774 {
     
    34723782     typval_T   *varp;
    34733783     char_u     nbuf[NUMBUFLEN];
    3474 @@ -14178,12 +14210,7 @@
     3784@@ -14178,12 +14231,7 @@
    34753785     if (buf != NULL && varname != NULL && varp != NULL)
    34763786     {
     
    34853795        if (*varname == '&')
    34863796        {
    3487 @@ -14210,11 +14237,7 @@
     3797@@ -14210,11 +14258,7 @@
    34883798        }
    34893799 
     
    34973807 }
    34983808 
    3499 @@ -14582,6 +14605,18 @@
     3809@@ -14582,6 +14626,18 @@
    35003810 }
    35013811 
     
    35163826  */
    35173827     static void
    3518 @@ -16173,7 +16208,7 @@
     3828@@ -16173,7 +16229,7 @@
    35193829        curwin->w_curswant = get_dict_number(dict, (char_u *)"curswant");
    35203830        curwin->w_set_curswant = FALSE;
     
    35253835        curwin->w_topfill = get_dict_number(dict, (char_u *)"topfill");
    35263836 #endif
    3527 @@ -16218,6 +16253,7 @@
     3837@@ -16218,6 +16274,7 @@
    35283838 #ifdef FEAT_VIRTUALEDIT
    35293839     dict_add_nr_str(dict, "coladd", (long)curwin->w_cursor.coladd, NULL);
     
    35333843 
    35343844     dict_add_nr_str(dict, "topline", (long)curwin->w_topline, NULL);
    3535 @@ -16438,9 +16474,12 @@
     3845@@ -16438,9 +16495,12 @@
    35363846     long       i = 0;
    35373847     long       n;
     
    35493859 
    35503860     if (fnump != NULL)
    3551 @@ -16466,8 +16505,9 @@
     3861@@ -16466,8 +16526,9 @@
    35523862 #ifdef FEAT_VIRTUALEDIT
    35533863     n = list_find_nr(l, i, NULL);
     
    35613871 
    35623872     return OK;
    3563 @@ -17759,6 +17799,13 @@
     3873@@ -17759,6 +17820,13 @@
    35643874     }
    35653875     else                   /* add a new variable */
     
    35753885        for (p = varname; *p != NUL; ++p)
    35763886            if (!eval_isnamec1(*p) && (p == varname || !VIM_ISDIGIT(*p))
    3577 @@ -17792,7 +17839,7 @@
     3887@@ -17792,7 +17860,7 @@
    35783888 }
    35793889 
     
    35843894  */
    35853895     static int
    3586 @@ -17814,6 +17861,23 @@
     3896@@ -17814,6 +17882,23 @@
    35873897 }
    35883898 
     
    36083918  * Also give an error message, using "name".
    36093919  */
    3610 @@ -18786,6 +18850,7 @@
     3920@@ -18786,6 +18871,7 @@
    36113921                if (dict_add(fudi.fd_dict, fudi.fd_di) == FAIL)
    36123922                {
     
    36163926                }
    36173927            }
    3618 @@ -18963,7 +19028,8 @@
     3928@@ -18963,7 +19049,8 @@
    36193929     else if (lead > 0)
    36203930     {
     
    36263936            /* It's "s:" or "<SID>" */
    36273937            if (current_SID <= 0)
    3628 @@ -19685,6 +19751,7 @@
     3938@@ -19685,6 +19772,7 @@
    36293939     v->di_tv.vval.v_list = &fc.l_varlist;
    36303940     vim_memset(&fc.l_varlist, 0, sizeof(list_T));
     
    36343944     /*
    36353945      * Set a:firstline to "firstline" and a:lastline to "lastline".
    3636 @@ -19761,7 +19828,7 @@
     3946@@ -19761,7 +19849,7 @@
    36373947            if (p_verbose >= 14)
    36383948            {
     
    36433953 
    36443954                msg_puts((char_u *)"(");
    3645 @@ -19773,8 +19840,8 @@
     3955@@ -19773,8 +19861,8 @@
    36463956                        msg_outnum((long)argvars[i].vval.v_number);
    36473957                    else
     
    36543964                        vim_free(tofree);
    36553965                    }
    3656 @@ -19852,13 +19919,13 @@
     3966@@ -19852,13 +19940,13 @@
    36573967        else
    36583968        {
     
    36723982diff -Naur vim70.orig/src/ex_cmds2.c vim70/src/ex_cmds2.c
    36733983--- vim70.orig/src/ex_cmds2.c   2006-04-17 03:19:07.000000000 -0700
    3674 +++ vim70/src/ex_cmds2.c        2006-10-13 01:02:52.000000000 -0700
     3984+++ vim70/src/ex_cmds2.c        2006-10-21 21:08:58.000000000 -0700
    36753985@@ -3648,13 +3648,13 @@
    36763986  * Return FALSE when not sourcing a file.
     
    36934003diff -Naur vim70.orig/src/ex_cmds.c vim70/src/ex_cmds.c
    36944004--- vim70.orig/src/ex_cmds.c    2006-04-22 11:56:56.000000000 -0700
    3695 +++ vim70/src/ex_cmds.c 2006-10-13 01:02:58.000000000 -0700
     4005+++ vim70/src/ex_cmds.c 2006-10-21 21:09:02.000000000 -0700
    36964006@@ -95,7 +95,10 @@
    36974007                _("<%s>%s%s  %d,  Hex %02x,  Octal %03o"),
     
    38044114diff -Naur vim70.orig/src/ex_cmds.h vim70/src/ex_cmds.h
    38054115--- vim70.orig/src/ex_cmds.h    2006-04-07 02:44:46.000000000 -0700
    3806 +++ vim70/src/ex_cmds.h 2006-10-13 01:02:46.000000000 -0700
     4116+++ vim70/src/ex_cmds.h 2006-10-21 21:08:52.000000000 -0700
    38074117@@ -262,7 +262,7 @@
    38084118 EX(CMD_comclear,       "comclear",     ex_comclear,
     
    38164126diff -Naur vim70.orig/src/ex_docmd.c vim70/src/ex_docmd.c
    38174127--- vim70.orig/src/ex_docmd.c   2006-05-05 09:33:19.000000000 -0700
    3818 +++ vim70/src/ex_docmd.c        2006-10-13 01:03:00.000000000 -0700
     4128+++ vim70/src/ex_docmd.c        2006-10-21 21:09:04.000000000 -0700
    38194129@@ -58,9 +58,9 @@
    38204130 #endif
     
    40884398diff -Naur vim70.orig/src/ex_getln.c vim70/src/ex_getln.c
    40894399--- vim70.orig/src/ex_getln.c   2006-04-30 08:32:01.000000000 -0700
    4090 +++ vim70/src/ex_getln.c        2006-10-13 01:03:05.000000000 -0700
     4400+++ vim70/src/ex_getln.c        2006-10-21 21:09:11.000000000 -0700
     4401@@ -86,7 +86,7 @@
     4402 static void    draw_cmdline __ARGS((int start, int len));
     4403 static void    save_cmdline __ARGS((struct cmdline_info *ccp));
     4404 static void    restore_cmdline __ARGS((struct cmdline_info *ccp));
     4405-static int     cmdline_paste __ARGS((int regname, int literally));
     4406+static int     cmdline_paste __ARGS((int regname, int literally, int remcr));
     4407 #if defined(FEAT_XIM) && defined(FEAT_GUI_GTK)
     4408 static void    redrawcmd_preedit __ARGS((void));
     4409 #endif
    40914410@@ -324,6 +324,9 @@
    40924411      */
     
    40994418        dont_scroll = FALSE;    /* allow scrolling here */
    41004419 #endif
     4420@@ -1113,7 +1116,7 @@
     4421 #endif
     4422                if (c != ESC)       /* use ESC to cancel inserting register */
     4423                {
     4424-                   cmdline_paste(c, i == Ctrl_R);
     4425+                   cmdline_paste(c, i == Ctrl_R, FALSE);
     4426 
     4427 #ifdef FEAT_EVAL
     4428                    /* When there was a serious error abort getting the
     4429@@ -1228,16 +1231,16 @@
     4430                        goto cmdline_not_changed;   /* Ignore mouse */
     4431 # ifdef FEAT_CLIPBOARD
     4432                if (clip_star.available)
     4433-                   cmdline_paste('*', TRUE);
     4434+                   cmdline_paste('*', TRUE, TRUE);
     4435                else
     4436 # endif
     4437-                   cmdline_paste(0, TRUE);
     4438+                   cmdline_paste(0, TRUE, TRUE);
     4439                redrawcmd();
     4440                goto cmdline_changed;
     4441 
     4442 # ifdef FEAT_DND
     4443        case K_DROP:
     4444-               cmdline_paste('~', TRUE);
     4445+               cmdline_paste('~', TRUE, FALSE);
     4446                redrawcmd();
     4447                goto cmdline_changed;
     4448 # endif
    41014449@@ -1753,6 +1756,11 @@
    41024450                end_pos = curwin->w_cursor; /* shutup gcc 4 */
     
    41204468            && im_is_preediting())
    41214469     {
    4122 @@ -4521,7 +4529,9 @@
     4470@@ -2882,9 +2890,10 @@
     4471  * return FAIL for failure, OK otherwise
     4472  */
     4473     static int
     4474-cmdline_paste(regname, literally)
     4475+cmdline_paste(regname, literally, remcr)
     4476     int regname;
     4477     int literally;     /* Insert text literally instead of "as typed" */
     4478+    int remcr;         /* remove trailing CR */
     4479 {
     4480     long               i;
     4481     char_u             *arg;
     4482@@ -2960,7 +2969,7 @@
     4483        return OK;
     4484     }
     4485 
     4486-    return cmdline_paste_reg(regname, literally);
     4487+    return cmdline_paste_reg(regname, literally, remcr);
     4488 }
     4489 
     4490 /*
     4491@@ -4521,7 +4530,9 @@
    41234492     flags |= EW_FILE | EW_EXEC;
    41244493 
     
    41314500        path = (char_u *)".";
    41324501     else
    4133 @@ -4534,6 +4544,9 @@
     4502@@ -4534,6 +4545,9 @@
    41344503     ga_init2(&ga, (int)sizeof(char *), 10);
    41354504     for (s = path; *s != NUL; s = e)
     
    41414510        e = vim_strchr(s, ';');
    41424511 #else
    4143 @@ -5982,6 +5995,8 @@
     4512@@ -5982,6 +5996,8 @@
    41444513     typestr[0] = cmdwin_type;
    41454514     typestr[1] = NUL;
     
    41524521diff -Naur vim70.orig/src/fileio.c vim70/src/fileio.c
    41534522--- vim70.orig/src/fileio.c     2006-04-30 08:28:57.000000000 -0700
    4154 +++ vim70/src/fileio.c  2006-10-13 01:03:05.000000000 -0700
     4523+++ vim70/src/fileio.c  2006-10-21 21:09:05.000000000 -0700
    41554524@@ -316,6 +316,9 @@
    41564525      * display the line. */
     
    42744643diff -Naur vim70.orig/src/getchar.c vim70/src/getchar.c
    42754644--- vim70.orig/src/getchar.c    2006-05-03 10:29:21.000000000 -0700
    4276 +++ vim70/src/getchar.c 2006-10-13 01:03:08.000000000 -0700
     4645+++ vim70/src/getchar.c 2006-10-21 21:09:07.000000000 -0700
    42774646@@ -1451,7 +1451,8 @@
    42784647 {
     
    43604729diff -Naur vim70.orig/src/globals.h vim70/src/globals.h
    43614730--- vim70.orig/src/globals.h    2006-04-30 06:16:23.000000000 -0700
    4362 +++ vim70/src/globals.h 2006-10-13 01:02:55.000000000 -0700
    4363 @@ -300,9 +300,16 @@
     4731+++ vim70/src/globals.h 2006-10-21 21:09:09.000000000 -0700
     4732@@ -166,6 +166,7 @@
     4733 EXTERN int     emsg_off INIT(= 0);         /* don't display errors for now,
     4734                                               unless 'debug' is set. */
     4735 EXTERN int     info_message INIT(= FALSE); /* printing informative message */
     4736+EXTERN int      msg_hist_off INIT(= FALSE); /* don't add messages to history */
     4737 #ifdef FEAT_EVAL
     4738 EXTERN int     emsg_skip INIT(= 0);        /* don't display errors for
     4739                                               expression that is skipped */
     4740@@ -300,9 +301,16 @@
    43644741 #endif
    43654742 
     
    43814758 
    43824759 #if defined(FEAT_EVAL) || defined(FEAT_SYN_HL)
    4383 @@ -1441,7 +1448,7 @@
     4760@@ -1441,7 +1449,7 @@
    43844761 EXTERN char_u e_readonly[]     INIT(= N_("E45: 'readonly' option is set (add ! to override)"));
    43854762 #ifdef FEAT_EVAL
     
    43924769diff -Naur vim70.orig/src/gui_at_fs.c vim70/src/gui_at_fs.c
    43934770--- vim70.orig/src/gui_at_fs.c  2005-07-09 04:30:17.000000000 -0700
    4394 +++ vim70/src/gui_at_fs.c       2006-10-13 01:02:44.000000000 -0700
     4771+++ vim70/src/gui_at_fs.c       2006-10-21 21:08:51.000000000 -0700
    43954772@@ -1861,27 +1861,27 @@
    43964773     XtPointer  pnew;
     
    45084885diff -Naur vim70.orig/src/gui_beval.c vim70/src/gui_beval.c
    45094886--- vim70.orig/src/gui_beval.c  2006-05-04 12:29:51.000000000 -0700
    4510 +++ vim70/src/gui_beval.c       2006-10-13 01:02:52.000000000 -0700
     4887+++ vim70/src/gui_beval.c       2006-10-21 21:08:58.000000000 -0700
    45114888@@ -926,7 +926,7 @@
    45124889 #  define IS_NONPRINTABLE(c) (((c) < 0x20 && (c) != TAB && (c) != NL) \
     
    45474924diff -Naur vim70.orig/src/gui.c vim70/src/gui.c
    45484925--- vim70.orig/src/gui.c        2006-05-03 04:00:59.000000000 -0700
    4549 +++ vim70/src/gui.c     2006-10-13 01:03:11.000000000 -0700
     4926+++ vim70/src/gui.c     2006-10-21 21:09:09.000000000 -0700
    45504927@@ -187,9 +187,10 @@
    45514928 #endif
     
    46505027diff -Naur vim70.orig/src/gui_gtk.c vim70/src/gui_gtk.c
    46515028--- vim70.orig/src/gui_gtk.c    2006-05-05 04:52:52.000000000 -0700
    4652 +++ vim70/src/gui_gtk.c 2006-10-13 01:03:11.000000000 -0700
     5029+++ vim70/src/gui_gtk.c 2006-10-21 21:09:09.000000000 -0700
    46535030@@ -957,15 +957,15 @@
    46545031 get_menu_position(vimmenu_T *menu)
     
    47385115diff -Naur vim70.orig/src/gui_gtk_x11.c vim70/src/gui_gtk_x11.c
    47395116--- vim70.orig/src/gui_gtk_x11.c        2006-05-04 23:58:59.000000000 -0700
    4740 +++ vim70/src/gui_gtk_x11.c     2006-10-13 01:02:52.000000000 -0700
     5117+++ vim70/src/gui_gtk_x11.c     2006-10-21 21:08:58.000000000 -0700
    47415118@@ -3233,12 +3233,12 @@
    47425119 on_select_tab(
     
    48035180diff -Naur vim70.orig/src/gui_xmebw.c vim70/src/gui_xmebw.c
    48045181--- vim70.orig/src/gui_xmebw.c  2006-04-30 08:32:32.000000000 -0700
    4805 +++ vim70/src/gui_xmebw.c       2006-10-13 01:02:44.000000000 -0700
     5182+++ vim70/src/gui_xmebw.c       2006-10-21 21:08:51.000000000 -0700
    48065183@@ -47,13 +47,13 @@
    48075184 #include "gui_xmebwp.h"
     
    49035280diff -Naur vim70.orig/src/hardcopy.c vim70/src/hardcopy.c
    49045281--- vim70.orig/src/hardcopy.c   2006-05-04 03:09:58.000000000 -0700
    4905 +++ vim70/src/hardcopy.c        2006-10-13 01:02:52.000000000 -0700
     5282+++ vim70/src/hardcopy.c        2006-10-21 21:08:58.000000000 -0700
    49065283@@ -1794,29 +1794,27 @@
    49075284     static int
     
    50065383diff -Naur vim70.orig/src/if_cscope.c vim70/src/if_cscope.c
    50075384--- vim70.orig/src/if_cscope.c  2006-04-18 01:54:15.000000000 -0700
    5008 +++ vim70/src/if_cscope.c       2006-10-13 01:02:52.000000000 -0700
     5385+++ vim70/src/if_cscope.c       2006-10-21 21:08:58.000000000 -0700
    50095386@@ -989,8 +989,7 @@
    50105387 {
     
    50295406diff -Naur vim70.orig/src/if_perl.xs vim70/src/if_perl.xs
    50305407--- vim70.orig/src/if_perl.xs   2006-03-06 10:57:16.000000000 -0800
    5031 +++ vim70/src/if_perl.xs        2006-10-13 01:02:49.000000000 -0700
     5408+++ vim70/src/if_perl.xs        2006-10-21 21:08:55.000000000 -0700
    50325409@@ -155,8 +155,8 @@
    50335410 static int (*perl_run)(PerlInterpreter*);
     
    51445521diff -Naur vim70.orig/src/if_python.c vim70/src/if_python.c
    51455522--- vim70.orig/src/if_python.c  2006-04-30 08:31:36.000000000 -0700
    5146 +++ vim70/src/if_python.c       2006-10-13 01:03:07.000000000 -0700
     5523+++ vim70/src/if_python.c       2006-10-21 21:09:06.000000000 -0700
    51475524@@ -1463,7 +1463,7 @@
    51485525     if (this->buf && this->buf != INVALID_BUFFER_VALUE)
     
    51835560diff -Naur vim70.orig/src/if_ruby.c vim70/src/if_ruby.c
    51845561--- vim70.orig/src/if_ruby.c    2006-04-30 08:37:52.000000000 -0700
    5185 +++ vim70/src/if_ruby.c 2006-10-13 01:02:49.000000000 -0700
     5562+++ vim70/src/if_ruby.c 2006-10-21 21:08:55.000000000 -0700
    51865563@@ -643,11 +643,14 @@
    51875564 
     
    52985675diff -Naur vim70.orig/src/macros.h vim70/src/macros.h
    52995676--- vim70.orig/src/macros.h     2006-03-01 04:01:10.000000000 -0800
    5300 +++ vim70/src/macros.h  2006-10-13 01:02:56.000000000 -0700
     5677+++ vim70/src/macros.h  2006-10-21 21:09:01.000000000 -0700
    53015678@@ -276,3 +276,9 @@
    53025679 # define MB_CHARLEN(p)         STRLEN(p)
     
    53115688diff -Naur vim70.orig/src/main.c vim70/src/main.c
    53125689--- vim70.orig/src/main.c       2006-05-03 10:36:44.000000000 -0700
    5313 +++ vim70/src/main.c    2006-10-13 01:02:55.000000000 -0700
     5690+++ vim70/src/main.c    2006-10-21 21:09:01.000000000 -0700
    53145691@@ -564,7 +564,11 @@
    53155692      */
     
    54005777diff -Naur vim70.orig/src/Makefile vim70/src/Makefile
    54015778--- vim70.orig/src/Makefile     2006-05-07 06:25:27.000000000 -0700
    5402 +++ vim70/src/Makefile  2006-10-13 01:02:54.000000000 -0700
     5779+++ vim70/src/Makefile  2006-10-21 21:09:00.000000000 -0700
    54035780@@ -2177,6 +2177,7 @@
    54045781        cd $(SHADOWDIR)/xxd; ln -s ../../xxd/*.[ch] ../../xxd/Make* .
     
    54205797diff -Naur vim70.orig/src/mbyte.c vim70/src/mbyte.c
    54215798--- vim70.orig/src/mbyte.c      2006-04-30 04:51:01.000000000 -0700
    5422 +++ vim70/src/mbyte.c   2006-10-13 01:02:52.000000000 -0700
     5799+++ vim70/src/mbyte.c   2006-10-21 21:08:58.000000000 -0700
    54235800@@ -311,7 +311,11 @@
    54245801 
     
    55025879diff -Naur vim70.orig/src/memfile.c vim70/src/memfile.c
    55035880--- vim70.orig/src/memfile.c    2006-03-06 00:59:15.000000000 -0800
    5504 +++ vim70/src/memfile.c 2006-10-13 01:03:06.000000000 -0700
     5881+++ vim70/src/memfile.c 2006-10-21 21:09:06.000000000 -0700
    55055882@@ -517,7 +517,7 @@
    55065883        mf_ins_free(mfp, hp);   /* put *hp in the free list */
     
    55355912diff -Naur vim70.orig/src/memline.c vim70/src/memline.c
    55365913--- vim70.orig/src/memline.c    2006-04-20 14:00:21.000000000 -0700
    5537 +++ vim70/src/memline.c 2006-10-13 01:03:11.000000000 -0700
     5914+++ vim70/src/memline.c 2006-10-21 21:09:09.000000000 -0700
    55385915@@ -215,7 +215,7 @@
    55395916 #define ML_FLUSH       0x02        /* flush locked block */
     
    56115988diff -Naur vim70.orig/src/menu.c vim70/src/menu.c
    56125989--- vim70.orig/src/menu.c       2006-05-03 10:30:48.000000000 -0700
    5613 +++ vim70/src/menu.c    2006-10-13 01:02:50.000000000 -0700
     5990+++ vim70/src/menu.c    2006-10-21 21:08:56.000000000 -0700
    56145991@@ -511,6 +511,14 @@
    56155992         * name (without mnemonic and accelerator text). */
     
    56886065diff -Naur vim70.orig/src/message.c vim70/src/message.c
    56896066--- vim70.orig/src/message.c    2006-05-06 13:07:37.000000000 -0700
    5690 +++ vim70/src/message.c 2006-10-13 01:03:09.000000000 -0700
    5691 @@ -1925,7 +1925,8 @@
     6067+++ vim70/src/message.c 2006-10-21 21:09:09.000000000 -0700
     6068@@ -53,7 +53,6 @@
     6069 static struct msg_hist *first_msg_hist = NULL;
     6070 static struct msg_hist *last_msg_hist = NULL;
     6071 static int msg_hist_len = 0;
     6072-static int msg_hist_off = FALSE;       /* don't add messages to history */
     6073 
     6074 /*
     6075  * When writing messages to the screen, there are many different situations.
     6076@@ -1925,7 +1924,8 @@
    56926077             * If screen is completely filled and 'more' is set then wait
    56936078             * for a character.
     
    56996084            {
    57006085 #ifdef FEAT_CON_DIALOG
    5701 @@ -4123,8 +4124,6 @@
     6086@@ -4123,8 +4123,6 @@
    57026087            case 'c':
    57036088            case 's':
     
    57086093                switch (fmt_spec)
    57096094                {
    5710 @@ -4175,15 +4174,16 @@
     6095@@ -4175,15 +4173,16 @@
    57116096                        str_arg_l = 0;
    57126097                    else
     
    57336118diff -Naur vim70.orig/src/misc1.c vim70/src/misc1.c
    57346119--- vim70.orig/src/misc1.c      2006-04-30 08:30:02.000000000 -0700
    5735 +++ vim70/src/misc1.c   2006-10-13 01:03:06.000000000 -0700
    5736 @@ -3016,6 +3016,7 @@
     6120+++ vim70/src/misc1.c   2006-10-21 21:09:10.000000000 -0700
     6121@@ -2842,7 +2842,8 @@
     6122 
     6123 #ifdef FEAT_AUTOCMD
     6124     /* when the cursor line is changed always trigger CursorMoved */
     6125-    if (lnum <= curwin->w_cursor.lnum && lnume > curwin->w_cursor.lnum)
     6126+    if (lnum <= curwin->w_cursor.lnum
     6127+                && lnume + (xtra < 0 ? -xtra : xtra) > curwin->w_cursor.lnum)
     6128        last_cursormoved.lnum = 0;
     6129 #endif
     6130 }
     6131@@ -3016,6 +3017,7 @@
    57376132     int                len = 0;
    57386133     int                n;
     
    57426137     mapped_ctrl_c = FALSE;     /* mappings are not used here */
    57436138     for (;;)
    5744 @@ -3034,11 +3035,16 @@
     6139@@ -3034,11 +3036,16 @@
    57456140            /* Replace zero and CSI by a special key code. */
    57466141            n = fix_input_buffer(buf + len, n, FALSE);
     
    57616156        if (n > 0)
    57626157            len = n;
    5763 @@ -3196,14 +3202,12 @@
     6158@@ -3196,14 +3203,12 @@
    57646159     else
    57656160        MSG_PUTS(_("Choice number (<Enter> cancels): "));
     
    57806175     i = get_number(TRUE, mouse_used);
    57816176     if (KeyTyped)
    5782 @@ -4492,7 +4496,7 @@
     6177@@ -4492,7 +4497,7 @@
    57836178                int l = mb_ptr2len(s);
    57846179 
     
    57896184 # endif
    57906185        }
    5791 @@ -8070,9 +8074,20 @@
     6186@@ -8070,9 +8075,20 @@
    57926187                }
    57936188                if (*that == '"' && *(that + 1) != NUL)
     
    58156210diff -Naur vim70.orig/src/misc2.c vim70/src/misc2.c
    58166211--- vim70.orig/src/misc2.c      2006-05-04 05:12:38.000000000 -0700
    5817 +++ vim70/src/misc2.c   2006-10-13 01:03:07.000000000 -0700
     6212+++ vim70/src/misc2.c   2006-10-21 21:09:06.000000000 -0700
    58186213@@ -1229,6 +1229,94 @@
    58196214     return escaped_string;
     
    59136308diff -Naur vim70.orig/src/netbeans.c vim70/src/netbeans.c
    59146309--- vim70.orig/src/netbeans.c   2006-04-22 11:00:05.000000000 -0700
    5915 +++ vim70/src/netbeans.c        2006-10-13 01:02:52.000000000 -0700
     6310+++ vim70/src/netbeans.c        2006-10-21 21:08:58.000000000 -0700
    59166311@@ -103,7 +103,7 @@
    59176312 static int  inputHandler = -1;         /* simply ret.value of WSAAsyncSelect() */
     
    60836478diff -Naur vim70.orig/src/normal.c vim70/src/normal.c
    60846479--- vim70.orig/src/normal.c     2006-04-29 06:11:18.000000000 -0700
    6085 +++ vim70/src/normal.c  2006-10-13 01:03:10.000000000 -0700
     6480+++ vim70/src/normal.c  2006-10-21 21:09:11.000000000 -0700
    60866481@@ -1477,14 +1477,17 @@
    60876482        }
     
    61086503            /* In Select mode, a linewise selection is operated upon like a
    61096504             * characterwise selection. */
    6110 @@ -2504,7 +2507,8 @@
     6505@@ -2377,11 +2380,20 @@
     6506            /*
     6507             * If visual was active, yank the highlighted text and put it
     6508             * before the mouse pointer position.
     6509+            * In Select mode replace the highlighted text with the clipboard.
     6510             */
     6511            if (VIsual_active)
     6512            {
     6513-               stuffcharReadbuff('y');
     6514-               stuffcharReadbuff(K_MIDDLEMOUSE);
     6515+               if (VIsual_select)
     6516+               {
     6517+                   stuffcharReadbuff(Ctrl_G);
     6518+                   stuffReadbuff((char_u *)"\"+p");
     6519+               }
     6520+               else
     6521+               {
     6522+                   stuffcharReadbuff('y');
     6523+                   stuffcharReadbuff(K_MIDDLEMOUSE);
     6524+               }
     6525                do_always = TRUE;       /* ignore 'mouse' setting next time */
     6526                return FALSE;
     6527            }
     6528@@ -2504,7 +2516,8 @@
    61116529             * NOTE: Ignore right button down and drag mouse events.
    61126530             * Windows only shows the popup menu on the button up event.
     
    61186536                return FALSE;
    61196537 #endif
    6120 @@ -4126,7 +4130,7 @@
     6538@@ -4126,7 +4139,7 @@
    61216539     int                save_p_ws;
    61226540     int                save_p_scs;
     
    61276545     if ((pat = alloc(len + 7)) == NULL)
    61286546        return FAIL;
    6129 @@ -4146,7 +4150,7 @@
     6547@@ -4146,7 +4159,7 @@
    61306548      * With "gd" Search back for the start of the current function, then go
    61316549      * back until a blank line.  If this fails go to line 1.
     
    61386556diff -Naur vim70.orig/src/ops.c vim70/src/ops.c
    61396557--- vim70.orig/src/ops.c        2006-04-30 08:13:44.000000000 -0700
    6140 +++ vim70/src/ops.c     2006-10-13 01:03:09.000000000 -0700
     6558+++ vim70/src/ops.c     2006-10-21 21:09:11.000000000 -0700
    61416559@@ -770,6 +770,7 @@
    61426560 {
     
    61626580     return rv;
    61636581 }
    6164 @@ -2413,6 +2421,7 @@
     6582@@ -1472,9 +1480,10 @@
     6583  * return FAIL for failure, OK otherwise
     6584  */
     6585     int
     6586-cmdline_paste_reg(regname, literally)
     6587+cmdline_paste_reg(regname, literally, remcr)
     6588     int regname;
     6589     int literally;     /* Insert text literally instead of "as typed" */
     6590+    int remcr;         /* don't add trailing CR */
     6591 {
     6592     long       i;
     6593 
     6594@@ -1486,8 +1495,13 @@
     6595     {
     6596        cmdline_paste_str(y_current->y_array[i], literally);
     6597 
     6598-       /* insert ^M between lines and after last line if type is MLINE */
     6599-       if (y_current->y_type == MLINE || i < y_current->y_size - 1)
     6600+       /* Insert ^M between lines and after last line if type is MLINE.
     6601+        * Don't do this when "remcr" is TRUE and the next line is empty. */
     6602+       if (y_current->y_type == MLINE
     6603+               || (i < y_current->y_size - 1
     6604+                   && !(remcr
     6605+                       && i == y_current->y_size - 2
     6606+                       && *y_current->y_array[i + 1] == NUL)))
     6607            cmdline_paste_str((char_u *)"\r", literally);
     6608 
     6609        /* Check for CTRL-C, in case someone tries to paste a few thousand
     6610@@ -2413,6 +2427,7 @@
    61656611        else
    61666612        {
     
    61706616            /* Works just like an 'i'nsert on the next character. */
    61716617            if (!lineempty(curwin->w_cursor.lnum)
    6172 @@ -3492,8 +3501,15 @@
     6618@@ -3492,8 +3507,15 @@
    61736619 # endif
    61746620        if (flags & PUT_CURSEND)
     
    61886634diff -Naur vim70.orig/src/option.c vim70/src/option.c
    61896635--- vim70.orig/src/option.c     2006-05-03 10:32:28.000000000 -0700
    6190 +++ vim70/src/option.c  2006-10-13 01:02:56.000000000 -0700
     6636+++ vim70/src/option.c  2006-10-21 21:09:11.000000000 -0700
    61916637@@ -2294,7 +2294,7 @@
    61926638                            {(char_u *)0L, (char_u *)0L}
     
    61986644                            (char_u *)&p_sps, PV_NONE,
    61996645                            {(char_u *)"best", (char_u *)0L}
     6646@@ -3397,7 +3397,7 @@
     6647        }
     6648        else if (flags & P_NUM)
     6649        {
     6650-           if (varp == (char_u *)PV_SCROLL)
     6651+           if (options[opt_idx].indir == PV_SCROLL)
     6652                win_comp_scroll(curwin);
     6653            else
     6654            {
    62006655@@ -5227,13 +5227,13 @@
    62016656            case PV_STL:        return &curwin->w_p_stl_flags;
     
    62956750diff -Naur vim70.orig/src/os_unix.c vim70/src/os_unix.c
    62966751--- vim70.orig/src/os_unix.c    2006-05-01 01:13:15.000000000 -0700
    6297 +++ vim70/src/os_unix.c 2006-10-13 01:02:52.000000000 -0700
     6752+++ vim70/src/os_unix.c 2006-10-21 21:08:58.000000000 -0700
    62986753@@ -3934,7 +3934,7 @@
    62996754                    {
     
    63546809diff -Naur vim70.orig/src/popupmnu.c vim70/src/popupmnu.c
    63556810--- vim70.orig/src/popupmnu.c   2006-04-20 13:18:37.000000000 -0700
    6356 +++ vim70/src/popupmnu.c        2006-10-13 01:02:50.000000000 -0700
     6811+++ vim70/src/popupmnu.c        2006-10-21 21:08:56.000000000 -0700
    63576812@@ -552,6 +552,9 @@
    63586813 {
     
    63676822diff -Naur vim70.orig/src/proto/buffer.pro vim70/src/proto/buffer.pro
    63686823--- vim70.orig/src/proto/buffer.pro     2006-05-07 06:08:29.000000000 -0700
    6369 +++ vim70/src/proto/buffer.pro  2006-10-13 01:02:56.000000000 -0700
     6824+++ vim70/src/proto/buffer.pro  2006-10-21 21:09:01.000000000 -0700
    63706825@@ -10,6 +10,7 @@
    63716826 extern int do_buffer __ARGS((int action, int start, int dir, int count, int forceit));
     
    63766831 extern void free_buf_options __ARGS((buf_T *buf, int free_p_ff));
    63776832 extern int buflist_getfile __ARGS((int n, linenr_T lnum, int options, int forceit));
     6833diff -Naur vim70.orig/src/proto/eval.pro vim70/src/proto/eval.pro
     6834--- vim70.orig/src/proto/eval.pro       2006-05-07 06:08:33.000000000 -0700
     6835+++ vim70/src/proto/eval.pro    2006-10-21 21:09:10.000000000 -0700
     6836@@ -44,7 +44,7 @@
     6837 extern char_u *get_user_var_name __ARGS((expand_T *xp, int idx));
     6838 extern list_T *list_alloc __ARGS((void));
     6839 extern void list_unref __ARGS((list_T *l));
     6840-extern void list_free __ARGS((list_T *l));
     6841+extern void list_free __ARGS((list_T *l, int recurse));
     6842 extern dictitem_T *dict_lookup __ARGS((hashitem_T *hi));
     6843 extern int list_append_dict __ARGS((list_T *list, dict_T *dict));
     6844 extern int garbage_collect __ARGS((void));
    63786845diff -Naur vim70.orig/src/proto/menu.pro vim70/src/proto/menu.pro
    63796846--- vim70.orig/src/proto/menu.pro       2006-05-07 06:08:51.000000000 -0700
    6380 +++ vim70/src/proto/menu.pro    2006-10-13 01:02:50.000000000 -0700
     6847+++ vim70/src/proto/menu.pro    2006-10-21 21:08:56.000000000 -0700
    63816848@@ -10,6 +10,7 @@
    63826849 extern int menu_is_child_of_popup __ARGS((vimmenu_T *menu));
     
    63896856diff -Naur vim70.orig/src/proto/misc2.pro vim70/src/proto/misc2.pro
    63906857--- vim70.orig/src/proto/misc2.pro      2006-05-07 06:08:54.000000000 -0700
    6391 +++ vim70/src/proto/misc2.pro   2006-10-13 01:03:07.000000000 -0700
     6858+++ vim70/src/proto/misc2.pro   2006-10-21 21:09:06.000000000 -0700
    63926859@@ -29,6 +29,7 @@
    63936860 extern char_u *vim_strnsave __ARGS((char_u *string, int len));
     
    63986865 extern char_u *vim_strnsave_up __ARGS((char_u *string, int len));
    63996866 extern void vim_strup __ARGS((char_u *p));
     6867diff -Naur vim70.orig/src/proto/ops.pro vim70/src/proto/ops.pro
     6868--- vim70.orig/src/proto/ops.pro        2006-05-07 06:08:58.000000000 -0700
     6869+++ vim70/src/proto/ops.pro     2006-10-21 21:09:11.000000000 -0700
     6870@@ -20,7 +20,7 @@
     6871 extern int do_execreg __ARGS((int regname, int colon, int addcr));
     6872 extern int insert_reg __ARGS((int regname, int literally));
     6873 extern int get_spec_reg __ARGS((int regname, char_u **argp, int *allocated, int errmsg));
     6874-extern int cmdline_paste_reg __ARGS((int regname, int literally));
     6875+extern int cmdline_paste_reg __ARGS((int regname, int literally, int remcr));
     6876 extern void adjust_clip_reg __ARGS((int *rp));
     6877 extern int op_delete __ARGS((oparg_T *oap));
     6878 extern int op_replace __ARGS((oparg_T *oap, int c));
    64006879diff -Naur vim70.orig/src/proto/undo.pro vim70/src/proto/undo.pro
    64016880--- vim70.orig/src/proto/undo.pro       2006-05-07 06:09:11.000000000 -0700
    6402 +++ vim70/src/proto/undo.pro    2006-10-13 01:02:47.000000000 -0700
     6881+++ vim70/src/proto/undo.pro    2006-10-21 21:08:53.000000000 -0700
    64036882@@ -4,6 +4,7 @@
    64046883 extern int u_savesub __ARGS((linenr_T lnum));
     
    64116890diff -Naur vim70.orig/src/quickfix.c vim70/src/quickfix.c
    64126891--- vim70.orig/src/quickfix.c   2006-05-03 00:47:42.000000000 -0700
    6413 +++ vim70/src/quickfix.c        2006-10-13 01:02:56.000000000 -0700
     6892+++ vim70/src/quickfix.c        2006-10-21 21:09:11.000000000 -0700
    64146893@@ -500,8 +500,6 @@
    64156894        {
     
    65076986                    if (len > CMDBUFFSIZE - 5)
    65086987                        len = CMDBUFFSIZE - 5;
    6509 @@ -2429,32 +2461,19 @@
     6988@@ -1554,10 +1586,30 @@
     6989            }
     6990 
     6991        /*
     6992-        * If there is only one window, create a new one above the quickfix
     6993-        * window.
     6994+        * If no usable window is found and 'switchbuf' is set to 'usetab'
     6995+        * then search in other tabs.
     6996         */
     6997-       if (firstwin == lastwin || !usable_win)
     6998+       if (!usable_win && vim_strchr(p_swb, 'a') != NULL)
     6999+       {
     7000+           tabpage_T   *tp;
     7001+           win_T       *wp;
     7002+
     7003+           FOR_ALL_TAB_WINDOWS(tp, wp)
     7004+           {
     7005+               if (wp->w_buffer->b_fnum == qf_ptr->qf_fnum)
     7006+               {
     7007+                   goto_tabpage_win(tp, wp);
     7008+                   usable_win = 1;
     7009+                   break;
     7010+               }
     7011+           }
     7012+       }
     7013+
     7014+       /*
     7015+        * If there is only one window and is the quickfix window, create a new
     7016+        * one above the quickfix window.
     7017+        */
     7018+       if (((firstwin == lastwin) && bt_quickfix(curbuf)) || !usable_win)
     7019        {
     7020            ll_ref = curwin->w_llist_ref;
     7021 
     7022@@ -2429,32 +2481,19 @@
    65107023     qf_info_T  *qi;
    65117024 {
     
    65407053        (void)qf_win_pos_update(qi, 0);
    65417054     }
    6542 @@ -2943,10 +2962,8 @@
     7055@@ -2943,10 +2982,8 @@
    65437056 #if defined(FEAT_AUTOCMD) && defined(FEAT_SYN_HL)
    65447057     char_u     *save_ei = NULL;
     
    65527065     int                flags = 0;
    65537066     colnr_T    col;
    6554 @@ -3167,24 +3184,13 @@
     7067@@ -3167,24 +3204,13 @@
    65557068                     * need to be done now, in that buffer.  And the modelines
    65567069                     * need to be done (again).  But not the window-local
     
    65777090            }
    65787091        }
    6579 @@ -3285,11 +3291,7 @@
     7092@@ -3285,11 +3311,7 @@
    65807093 {
    65817094     buf_T      *newbuf;
     
    65897102     /* Allocate a buffer without putting it in the buffer list. */
    65907103     newbuf = buflist_new(NULL, NULL, (linenr_T)1, BLN_DUMMY);
    6591 @@ -3299,13 +3301,8 @@
     7104@@ -3299,13 +3321,8 @@
    65927105     /* Init the options. */
    65937106     buf_copy_options(newbuf, BCO_ENTER | BCO_NOHELP);
     
    66037116     /* Need to set the filename for autocommands. */
    66047117     (void)setfname(curbuf, fname, NULL, FALSE);
    6605 @@ -3336,13 +3333,8 @@
     7118@@ -3336,13 +3353,8 @@
    66067119        }
    66077120     }
     
    66177130     if (!buf_valid(newbuf))
    66187131        return NULL;
    6619 @@ -3434,8 +3426,10 @@
     7132@@ -3434,8 +3446,10 @@
    66207133          || dict_add_nr_str(dict, "col",   (long)qfp->qf_col, NULL) == FAIL
    66217134          || dict_add_nr_str(dict, "vcol",  (long)qfp->qf_viscol, NULL) == FAIL
     
    66327145diff -Naur vim70.orig/src/regexp.c vim70/src/regexp.c
    66337146--- vim70.orig/src/regexp.c     2006-04-30 08:31:50.000000000 -0700
    6634 +++ vim70/src/regexp.c  2006-10-13 01:02:53.000000000 -0700
     7147+++ vim70/src/regexp.c  2006-10-21 21:09:11.000000000 -0700
     7148@@ -3777,8 +3777,8 @@
     7149 
     7150        op = OP(scan);
     7151        /* Check for character class with NL added. */
     7152-       if (!reg_line_lbr && WITH_NL(op) && *reginput == NUL
     7153-                                                   && reglnum <= reg_maxline)
     7154+       if (!reg_line_lbr && WITH_NL(op) && REG_MULTI
     7155+                               && *reginput == NUL && reglnum <= reg_maxline)
     7156        {
     7157            reg_nextline();
     7158        }
    66357159@@ -3912,7 +3912,7 @@
    66367160                {
     
    66637187                opnd = OPERAND(scan);
    66647188                /* Safety check (just in case 'encoding' was changed since
     7189@@ -4855,8 +4855,8 @@
     7190            break;
     7191 
     7192          case NEWL:
     7193-           if ((c != NUL || reglnum > reg_maxline || reg_line_lbr)
     7194-                                             && (c != '\n' || !reg_line_lbr))
     7195+           if ((c != NUL || !REG_MULTI || reglnum > reg_maxline
     7196+                            || reg_line_lbr) && (c != '\n' || !reg_line_lbr))
     7197                status = RA_NOMATCH;
     7198            else if (reg_line_lbr)
     7199                ADVANCE_REGINPUT();
     7200@@ -5316,8 +5316,8 @@
     7201                ++count;
     7202                mb_ptr_adv(scan);
     7203            }
     7204-           if (!WITH_NL(OP(p)) || reglnum > reg_maxline || reg_line_lbr
     7205-                                                        || count == maxcount)
     7206+           if (!REG_MULTI || !WITH_NL(OP(p)) || reglnum > reg_maxline
     7207+                                        || reg_line_lbr || count == maxcount)
     7208                break;
     7209            ++count;            /* count the line-break */
     7210            reg_nextline();
     7211@@ -5341,7 +5341,8 @@
     7212            }
     7213            else if (*scan == NUL)
     7214            {
     7215-               if (!WITH_NL(OP(p)) || reglnum > reg_maxline || reg_line_lbr)
     7216+               if (!REG_MULTI || !WITH_NL(OP(p)) || reglnum > reg_maxline
     7217+                                                             || reg_line_lbr)
     7218                    break;
     7219                reg_nextline();
     7220                scan = reginput;
     7221@@ -5370,7 +5371,8 @@
     7222            }
     7223            else if (*scan == NUL)
     7224            {
     7225-               if (!WITH_NL(OP(p)) || reglnum > reg_maxline || reg_line_lbr)
     7226+               if (!REG_MULTI || !WITH_NL(OP(p)) || reglnum > reg_maxline
     7227+                                                             || reg_line_lbr)
     7228                    break;
     7229                reg_nextline();
     7230                scan = reginput;
     7231@@ -5399,7 +5401,8 @@
     7232            }
     7233            else if (*scan == NUL)
     7234            {
     7235-               if (!WITH_NL(OP(p)) || reglnum > reg_maxline || reg_line_lbr)
     7236+               if (!REG_MULTI || !WITH_NL(OP(p)) || reglnum > reg_maxline
     7237+                                                             || reg_line_lbr)
     7238                    break;
     7239                reg_nextline();
     7240                scan = reginput;
     7241@@ -5424,7 +5427,8 @@
     7242        {
     7243            if (*scan == NUL)
     7244            {
     7245-               if (!WITH_NL(OP(p)) || reglnum > reg_maxline || reg_line_lbr)
     7246+               if (!REG_MULTI || !WITH_NL(OP(p)) || reglnum > reg_maxline
     7247+                                                             || reg_line_lbr)
     7248                    break;
     7249                reg_nextline();
     7250                scan = reginput;
     7251@@ -5454,7 +5458,8 @@
     7252 #endif
     7253            if (*scan == NUL)
     7254            {
     7255-               if (!WITH_NL(OP(p)) || reglnum > reg_maxline || reg_line_lbr)
     7256+               if (!REG_MULTI || !WITH_NL(OP(p)) || reglnum > reg_maxline
     7257+                                                             || reg_line_lbr)
     7258                    break;
     7259                reg_nextline();
     7260                scan = reginput;
     7261@@ -5617,7 +5622,8 @@
     7262 #endif
     7263            if (*scan == NUL)
     7264            {
     7265-               if (!WITH_NL(OP(p)) || reglnum > reg_maxline || reg_line_lbr)
     7266+               if (!REG_MULTI || !WITH_NL(OP(p)) || reglnum > reg_maxline
     7267+                                                             || reg_line_lbr)
     7268                    break;
     7269                reg_nextline();
     7270                scan = reginput;
     7271@@ -5646,8 +5652,8 @@
     7272 
     7273       case NEWL:
     7274        while (count < maxcount
     7275-               && ((*scan == NUL && reglnum <= reg_maxline && !reg_line_lbr)
     7276-                   || (*scan == '\n' && reg_line_lbr)))
     7277+               && ((*scan == NUL && reglnum <= reg_maxline && !reg_line_lbr
     7278+                           && REG_MULTI) || (*scan == '\n' && reg_line_lbr)))
     7279        {
     7280            count++;
     7281            if (reg_line_lbr)
    66657282diff -Naur vim70.orig/src/screen.c vim70/src/screen.c
    66667283--- vim70.orig/src/screen.c     2006-05-05 03:13:55.000000000 -0700
    6667 +++ vim70/src/screen.c  2006-10-13 01:03:09.000000000 -0700
     7284+++ vim70/src/screen.c  2006-10-21 21:09:08.000000000 -0700
    66687285@@ -1228,7 +1228,14 @@
    66697286        {
     
    68417458diff -Naur vim70.orig/src/search.c vim70/src/search.c
    68427459--- vim70.orig/src/search.c     2006-05-05 05:12:13.000000000 -0700
    6843 +++ vim70/src/search.c  2006-10-13 01:02:53.000000000 -0700
     7460+++ vim70/src/search.c  2006-10-21 21:09:09.000000000 -0700
    68447461@@ -1259,7 +1259,7 @@
    68457462        /*
     
    68517468            if (spats[0].off.line)      /* Add the offset to the line number. */
    68527469            {
    6853 @@ -4826,15 +4826,20 @@
     7470@@ -4688,6 +4688,7 @@
     7471 #ifdef FEAT_INS_EXPAND
     7472                    if (action == ACTION_EXPAND)
     7473                    {
     7474+                       msg_hist_off = TRUE;    /* reset in msg_trunc_attr() */
     7475                        vim_snprintf((char*)IObuff, IOSIZE,
     7476                                _("Scanning included file: %s"),
     7477                                (char *)new_fname);
     7478@@ -4826,15 +4827,20 @@
    68547479 
    68557480                if ((compl_cont_status & CONT_ADDING) && i == compl_length)
     
    68797504 
    68807505                    /* we read a line, set "already" to check this "line" later
    6881 @@ -4871,7 +4876,7 @@
     7506@@ -4871,7 +4877,7 @@
    68827507                        goto exit_matched;
    68837508                }
     
    68907515diff -Naur vim70.orig/src/spell.c vim70/src/spell.c
    68917516--- vim70.orig/src/spell.c      2006-05-05 00:49:58.000000000 -0700
    6892 +++ vim70/src/spell.c   2006-10-13 01:03:05.000000000 -0700
     7517+++ vim70/src/spell.c   2006-10-21 21:09:05.000000000 -0700
    68937518@@ -1483,7 +1483,7 @@
    68947519            else if ((mode == FIND_COMPOUND || mode == FIND_KEEPCOMPOUND
     
    72217846diff -Naur vim70.orig/src/structs.h vim70/src/structs.h
    72227847--- vim70.orig/src/structs.h    2006-04-09 10:57:46.000000000 -0700
    7223 +++ vim70/src/structs.h 2006-10-13 01:02:50.000000000 -0700
     7848+++ vim70/src/structs.h 2006-10-21 21:08:55.000000000 -0700
    72247849@@ -2213,18 +2213,20 @@
    72257850 
     
    72477872diff -Naur vim70.orig/src/syntax.c vim70/src/syntax.c
    72487873--- vim70.orig/src/syntax.c     2006-04-26 05:49:45.000000000 -0700
    7249 +++ vim70/src/syntax.c  2006-10-13 01:03:08.000000000 -0700
     7874+++ vim70/src/syntax.c  2006-10-21 21:09:07.000000000 -0700
    72507875@@ -977,6 +977,7 @@
    72517876 {
     
    73397964diff -Naur vim70.orig/src/tag.c vim70/src/tag.c
    73407965--- vim70.orig/src/tag.c        2006-04-27 06:11:21.000000000 -0700
    7341 +++ vim70/src/tag.c     2006-10-13 01:02:59.000000000 -0700
     7966+++ vim70/src/tag.c     2006-10-21 21:09:10.000000000 -0700
     7967@@ -911,7 +911,7 @@
     7968 
     7969                set_errorlist(curwin, list, ' ');
     7970 
     7971-               list_free(list);
     7972+               list_free(list, TRUE);
     7973 
     7974                cur_match = 0;          /* Jump to the first tag */
     7975            }
    73427976@@ -3787,6 +3787,7 @@
    73437977 {
     
    73728006diff -Naur vim70.orig/src/term.c vim70/src/term.c
    73738007--- vim70.orig/src/term.c       2006-05-03 10:34:57.000000000 -0700
    7374 +++ vim70/src/term.c    2006-10-13 01:02:50.000000000 -0700
     8008+++ vim70/src/term.c    2006-10-21 21:08:56.000000000 -0700
    73758009@@ -4783,6 +4783,14 @@
    73768010                return -1;
     
    73908024diff -Naur vim70.orig/src/testdir/test56.in vim70/src/testdir/test56.in
    73918025--- vim70.orig/src/testdir/test56.in    2005-05-18 08:37:37.000000000 -0700
    7392 +++ vim70/src/testdir/test56.in 2006-10-13 01:02:56.000000000 -0700
     8026+++ vim70/src/testdir/test56.in 2006-10-21 21:09:01.000000000 -0700
    73938027@@ -3,7 +3,7 @@
    73948028 STARTTEST
     
    74028036diff -Naur vim70.orig/src/ui.c vim70/src/ui.c
    74038037--- vim70.orig/src/ui.c 2006-03-27 11:15:09.000000000 -0800
    7404 +++ vim70/src/ui.c      2006-10-13 01:02:53.000000000 -0700
     8038+++ vim70/src/ui.c      2006-10-21 21:08:58.000000000 -0700
    74058039@@ -1137,7 +1137,6 @@
    74068040     int                len;
     
    74228056diff -Naur vim70.orig/src/undo.c vim70/src/undo.c
    74238057--- vim70.orig/src/undo.c       2006-04-21 02:30:59.000000000 -0700
    7424 +++ vim70/src/undo.c    2006-10-13 01:02:53.000000000 -0700
     8058+++ vim70/src/undo.c    2006-10-21 21:08:58.000000000 -0700
    74258059@@ -84,7 +84,6 @@
    74268060 static void u_unch_branch __ARGS((u_header_T *uhp));
     
    74878121diff -Naur vim70.orig/src/version.c vim70/src/version.c
    74888122--- vim70.orig/src/version.c    2006-05-03 00:50:42.000000000 -0700
    7489 +++ vim70/src/version.c 2006-10-13 01:03:11.000000000 -0700
    7490 @@ -667,6 +667,246 @@
     8123+++ vim70/src/version.c 2006-10-21 21:09:11.000000000 -0700
     8124@@ -667,6 +667,272 @@
    74918125 static int included_patches[] =
    74928126 {   /* Add new patch number below this line */
    74938127 /**/
     8128+    146,
     8129+/**/
     8130+    145,
     8131+/**/
     8132+    144,
     8133+/**/
     8134+    143,
     8135+/**/
     8136+    142,
     8137+/**/
     8138+    141,
     8139+/**/
     8140+    140,
     8141+/**/
     8142+    139,
     8143+/**/
     8144+    137,
     8145+/**/
     8146+    136,
     8147+/**/
     8148+    135,
     8149+/**/
     8150+    134,
     8151+/**/
     8152+    133,
     8153+/**/
    74948154+    129,
    74958155+/**/
     
    77358395 };
    77368396 
    7737 @@ -731,7 +971,11 @@
     8397@@ -731,7 +997,11 @@
    77388398     /* Only MS VC 4.1 and earlier can do Win32s */
    77398399     MSG_PUTS(_("\nMS-Windows 16/32 bit GUI version"));
     
    77478407     if (gui_is_win32s())
    77488408        MSG_PUTS(_(" in Win32s mode"));
    7749 diff -Naur vim70.orig/src/version.c~ vim70/src/version.c~
    7750 --- vim70.orig/src/version.c~   1969-12-31 16:00:00.000000000 -0800
    7751 +++ vim70/src/version.c~        2006-10-13 01:03:08.000000000 -0700
    7752 @@ -0,0 +1,1450 @@
    7753 +/* vi:set ts=8 sts=4 sw=4:
    7754 + *
    7755 + * VIM - Vi IMproved           by Bram Moolenaar
    7756 + *
    7757 + * Do ":help uganda"  in Vim to read copying and usage conditions.
    7758 + * Do ":help credits" in Vim to see a list of people who contributed.
    7759 + * See README.txt for an overview of the Vim source code.
    7760 + */
    7761 +
    7762 +#include "vim.h"
    7763 +
    7764 +#ifdef AMIGA
    7765 +# include <time.h>     /* for time() */
    7766 +#endif
    7767 +
    7768 +/*
    7769 + * Vim originated from Stevie version 3.6 (Fish disk 217) by GRWalter (Fred)
    7770 + * It has been changed beyond recognition since then.
    7771 + *
    7772 + * Differences between version 6.x and 7.x can be found with ":help version7".
    7773 + * Differences between version 5.x and 6.x can be found with ":help version6".
    7774 + * Differences between version 4.x and 5.x can be found with ":help version5".
    7775 + * Differences between version 3.0 and 4.x can be found with ":help version4".
    7776 + * All the remarks about older versions have been removed, they are not very
    7777 + * interesting.
    7778 + */
    7779 +
    7780 +#include "version.h"
    7781 +
    7782 +char           *Version = VIM_VERSION_SHORT;
    7783 +static char    *mediumVersion = VIM_VERSION_MEDIUM;
    7784 +
    7785 +#if defined(HAVE_DATE_TIME) || defined(PROTO)
    7786 +# if (defined(VMS) && defined(VAXC)) || defined(PROTO)
    7787 +char   longVersion[sizeof(VIM_VERSION_LONG_DATE) + sizeof(__DATE__)
    7788 +                                                     + sizeof(__TIME__) + 3];
    7789 +    void
    7790 +make_version()
    7791 +{
    7792 +    /*
    7793 +     * Construct the long version string.  Necessary because
    7794 +     * VAX C can't catenate strings in the preprocessor.
    7795 +     */
    7796 +    strcpy(longVersion, VIM_VERSION_LONG_DATE);
    7797 +    strcat(longVersion, __DATE__);
    7798 +    strcat(longVersion, " ");
    7799 +    strcat(longVersion, __TIME__);
    7800 +    strcat(longVersion, ")");
    7801 +}
    7802 +# else
    7803 +char   *longVersion = VIM_VERSION_LONG_DATE __DATE__ " " __TIME__ ")";
    7804 +# endif
    7805 +#else
    7806 +char   *longVersion = VIM_VERSION_LONG;
    7807 +#endif
    7808 +
    7809 +static void version_msg __ARGS((char *s));
    7810 +
    7811 +static char *(features[]) =
    7812 +{
    7813 +#ifdef AMIGA           /* only for Amiga systems */
    7814 +# ifdef FEAT_ARP
    7815 +       "+ARP",
    7816 +# else
    7817 +       "-ARP",
    7818 +# endif
    7819 +#endif
    7820 +#ifdef FEAT_ARABIC
    7821 +       "+arabic",
    7822 +#else
    7823 +       "-arabic",
    7824 +#endif
    7825 +#ifdef FEAT_AUTOCMD
    7826 +       "+autocmd",
    7827 +#else
    7828 +       "-autocmd",
    7829 +#endif
    7830 +#ifdef FEAT_BEVAL
    7831 +       "+balloon_eval",
    7832 +#else
    7833 +       "-balloon_eval",
    7834 +#endif
    7835 +#ifdef FEAT_BROWSE
    7836 +       "+browse",
    7837 +#else
    7838 +       "-browse",
    7839 +#endif
    7840 +#ifdef NO_BUILTIN_TCAPS
    7841 +       "-builtin_terms",
    7842 +#endif
    7843 +#ifdef SOME_BUILTIN_TCAPS
    7844 +       "+builtin_terms",
    7845 +#endif
    7846 +#ifdef ALL_BUILTIN_TCAPS
    7847 +       "++builtin_terms",
    7848 +#endif
    7849 +#ifdef FEAT_BYTEOFF
    7850 +       "+byte_offset",
    7851 +#else
    7852 +       "-byte_offset",
    7853 +#endif
    7854 +#ifdef FEAT_CINDENT
    7855 +       "+cindent",
    7856 +#else
    7857 +       "-cindent",
    7858 +#endif
    7859 +#ifdef FEAT_CLIENTSERVER
    7860 +       "+clientserver",
    7861 +#else
    7862 +       "-clientserver",
    7863 +#endif
    7864 +#ifdef FEAT_CLIPBOARD
    7865 +       "+clipboard",
    7866 +#else
    7867 +       "-clipboard",
    7868 +#endif
    7869 +#ifdef FEAT_CMDL_COMPL
    7870 +       "+cmdline_compl",
    7871 +#else
    7872 +       "-cmdline_compl",
    7873 +#endif
    7874 +#ifdef FEAT_CMDHIST
    7875 +       "+cmdline_hist",
    7876 +#else
    7877 +       "-cmdline_hist",
    7878 +#endif
    7879 +#ifdef FEAT_CMDL_INFO
    7880 +       "+cmdline_info",
    7881 +#else
    7882 +       "-cmdline_info",
    7883 +#endif
    7884 +#ifdef FEAT_COMMENTS
    7885 +       "+comments",
    7886 +#else
    7887 +       "-comments",
    7888 +#endif
    7889 +#ifdef FEAT_CRYPT
    7890 +       "+cryptv",
    7891 +#else
    7892 +       "-cryptv",
    7893 +#endif
    7894 +#ifdef FEAT_CSCOPE
    7895 +       "+cscope",
    7896 +#else
    7897 +       "-cscope",
    7898 +#endif
    7899 +#ifdef CURSOR_SHAPE
    7900 +       "+cursorshape",
    7901 +#else
    7902 +       "-cursorshape",
    7903 +#endif
    7904 +#if defined(FEAT_CON_DIALOG) && defined(FEAT_GUI_DIALOG)
    7905 +       "+dialog_con_gui",
    7906 +#else
    7907 +# if defined(FEAT_CON_DIALOG)
    7908 +       "+dialog_con",
    7909 +# else
    7910 +#  if defined(FEAT_GUI_DIALOG)
    7911 +       "+dialog_gui",
    7912 +#  else
    7913 +       "-dialog",
    7914 +#  endif
    7915 +# endif
    7916 +#endif
    7917 +#ifdef FEAT_DIFF
    7918 +       "+diff",
    7919 +#else
    7920 +       "-diff",
    7921 +#endif
    7922 +#ifdef FEAT_DIGRAPHS
    7923 +       "+digraphs",
    7924 +#else
    7925 +       "-digraphs",
    7926 +#endif
    7927 +#ifdef FEAT_DND
    7928 +       "+dnd",
    7929 +#else
    7930 +       "-dnd",
    7931 +#endif
    7932 +#ifdef EBCDIC
    7933 +       "+ebcdic",
    7934 +#else
    7935 +       "-ebcdic",
    7936 +#endif
    7937 +#ifdef FEAT_EMACS_TAGS
    7938 +       "+emacs_tags",
    7939 +#else
    7940 +       "-emacs_tags",
    7941 +#endif
    7942 +#ifdef FEAT_EVAL
    7943 +       "+eval",
    7944 +#else
    7945 +       "-eval",
    7946 +#endif
    7947 +#ifdef FEAT_EX_EXTRA
    7948 +       "+ex_extra",
    7949 +#else
    7950 +       "-ex_extra",
    7951 +#endif
    7952 +#ifdef FEAT_SEARCH_EXTRA
    7953 +       "+extra_search",
    7954 +#else
    7955 +       "-extra_search",
    7956 +#endif
    7957 +#ifdef FEAT_FKMAP
    7958 +       "+farsi",
    7959 +#else
    7960 +       "-farsi",
    7961 +#endif
    7962 +#ifdef FEAT_SEARCHPATH
    7963 +       "+file_in_path",
    7964 +#else
    7965 +       "-file_in_path",
    7966 +#endif
    7967 +#ifdef FEAT_FIND_ID
    7968 +       "+find_in_path",
    7969 +#else
    7970 +       "-find_in_path",
    7971 +#endif
    7972 +#ifdef FEAT_FOLDING
    7973 +       "+folding",
    7974 +#else
    7975 +       "-folding",
    7976 +#endif
    7977 +#ifdef FEAT_FOOTER
    7978 +       "+footer",
    7979 +#else
    7980 +       "-footer",
    7981 +#endif
    7982 +           /* only interesting on Unix systems */
    7983 +#if !defined(USE_SYSTEM) && defined(UNIX)
    7984 +       "+fork()",
    7985 +#endif
    7986 +#ifdef FEAT_GETTEXT
    7987 +# ifdef DYNAMIC_GETTEXT
    7988 +       "+gettext/dyn",
    7989 +# else
    7990 +       "+gettext",
    7991 +# endif
    7992 +#else
    7993 +       "-gettext",
    7994 +#endif
    7995 +#ifdef FEAT_HANGULIN
    7996 +       "+hangul_input",
    7997 +#else
    7998 +       "-hangul_input",
    7999 +#endif
    8000 +#if (defined(HAVE_ICONV_H) && defined(USE_ICONV)) || defined(DYNAMIC_ICONV)
    8001 +# ifdef DYNAMIC_ICONV
    8002 +       "+iconv/dyn",
    8003 +# else
    8004 +       "+iconv",
    8005 +# endif
    8006 +#else
    8007 +       "-iconv",
    8008 +#endif
    8009 +#ifdef FEAT_INS_EXPAND
    8010 +       "+insert_expand",
    8011 +#else
    8012 +       "-insert_expand",
    8013 +#endif
    8014 +#ifdef FEAT_JUMPLIST
    8015 +       "+jumplist",
    8016 +#else
    8017 +       "-jumplist",
    8018 +#endif
    8019 +#ifdef FEAT_KEYMAP
    8020 +       "+keymap",
    8021 +#else
    8022 +       "-keymap",
    8023 +#endif
    8024 +#ifdef FEAT_LANGMAP
    8025 +       "+langmap",
    8026 +#else
    8027 +       "-langmap",
    8028 +#endif
    8029 +#ifdef FEAT_LIBCALL
    8030 +       "+libcall",
    8031 +#else
    8032 +       "-libcall",
    8033 +#endif
    8034 +#ifdef FEAT_LINEBREAK
    8035 +       "+linebreak",
    8036 +#else
    8037 +       "-linebreak",
    8038 +#endif
    8039 +#ifdef FEAT_LISP
    8040 +       "+lispindent",
    8041 +#else
    8042 +       "-lispindent",
    8043 +#endif
    8044 +#ifdef FEAT_LISTCMDS
    8045 +       "+listcmds",
    8046 +#else
    8047 +       "-listcmds",
    8048 +#endif
    8049 +#ifdef FEAT_LOCALMAP
    8050 +       "+localmap",
    8051 +#else
    8052 +       "-localmap",
    8053 +#endif
    8054 +#ifdef FEAT_MENU
    8055 +       "+menu",
    8056 +#else
    8057 +       "-menu",
    8058 +#endif
    8059 +#ifdef FEAT_SESSION
    8060 +       "+mksession",
    8061 +#else
    8062 +       "-mksession",
    8063 +#endif
    8064 +#ifdef FEAT_MODIFY_FNAME
    8065 +       "+modify_fname",
    8066 +#else
    8067 +       "-modify_fname",
    8068 +#endif
    8069 +#ifdef FEAT_MOUSE
    8070 +       "+mouse",
    8071 +#  ifdef FEAT_MOUSESHAPE
    8072 +       "+mouseshape",
    8073 +#  else
    8074 +       "-mouseshape",
    8075 +#  endif
    8076 +# else
    8077 +       "-mouse",
    8078 +#endif
    8079 +#if defined(UNIX) || defined(VMS)
    8080 +# ifdef FEAT_MOUSE_DEC
    8081 +       "+mouse_dec",
    8082 +# else
    8083 +       "-mouse_dec",
    8084 +# endif
    8085 +# ifdef FEAT_MOUSE_GPM
    8086 +       "+mouse_gpm",
    8087 +# else
    8088 +       "-mouse_gpm",
    8089 +# endif
    8090 +# ifdef FEAT_MOUSE_JSB
    8091 +       "+mouse_jsbterm",
    8092 +# else
    8093 +       "-mouse_jsbterm",
    8094 +# endif
    8095 +# ifdef FEAT_MOUSE_NET
    8096 +       "+mouse_netterm",
    8097 +# else
    8098 +       "-mouse_netterm",
    8099 +# endif
    8100 +# ifdef FEAT_MOUSE_XTERM
    8101 +       "+mouse_xterm",
    8102 +# else
    8103 +       "-mouse_xterm",
    8104 +# endif
    8105 +#endif
    8106 +#ifdef __QNX__
    8107 +# ifdef FEAT_MOUSE_PTERM
    8108 +       "+mouse_pterm",
    8109 +# else
    8110 +       "-mouse_pterm",
    8111 +# endif
    8112 +#endif
    8113 +#ifdef FEAT_MBYTE_IME
    8114 +# ifdef DYNAMIC_IME
    8115 +       "+multi_byte_ime/dyn",
    8116 +# else
    8117 +       "+multi_byte_ime",
    8118 +# endif
    8119 +#else
    8120 +# ifdef FEAT_MBYTE
    8121 +       "+multi_byte",
    8122 +# else
    8123 +       "-multi_byte",
    8124 +# endif
    8125 +#endif
    8126 +#ifdef FEAT_MULTI_LANG
    8127 +       "+multi_lang",
    8128 +#else
    8129 +       "-multi_lang",
    8130 +#endif
    8131 +#ifdef FEAT_MZSCHEME
    8132 +# ifdef DYNAMIC_MZSCHEME
    8133 +       "+mzscheme/dyn",
    8134 +# else
    8135 +       "+mzscheme",
    8136 +# endif
    8137 +#else
    8138 +       "-mzscheme",
    8139 +#endif
    8140 +#ifdef FEAT_NETBEANS_INTG
    8141 +       "+netbeans_intg",
    8142 +#else
    8143 +       "-netbeans_intg",
    8144 +#endif
    8145 +#ifdef FEAT_GUI_W32
    8146 +# ifdef FEAT_OLE
    8147 +       "+ole",
    8148 +# else
    8149 +       "-ole",
    8150 +# endif
    8151 +#endif
    8152 +#ifdef FEAT_OSFILETYPE
    8153 +       "+osfiletype",
    8154 +#else
    8155 +       "-osfiletype",
    8156 +#endif
    8157 +#ifdef FEAT_PATH_EXTRA
    8158 +       "+path_extra",
    8159 +#else
    8160 +       "-path_extra",
    8161 +#endif
    8162 +#ifdef FEAT_PERL
    8163 +# ifdef DYNAMIC_PERL
    8164 +       "+perl/dyn",
    8165 +# else
    8166 +       "+perl",
    8167 +# endif
    8168 +#else
    8169 +       "-perl",
    8170 +#endif
    8171 +#ifdef FEAT_PRINTER
    8172 +# ifdef FEAT_POSTSCRIPT
    8173 +       "+postscript",
    8174 +# else
    8175 +       "-postscript",
    8176 +# endif
    8177 +       "+printer",
    8178 +#else
    8179 +       "-printer",
    8180 +#endif
    8181 +#ifdef FEAT_PROFILE
    8182 +       "+profile",
    8183 +#else
    8184 +       "-profile",
    8185 +#endif
    8186 +#ifdef FEAT_PYTHON
    8187 +# ifdef DYNAMIC_PYTHON
    8188 +       "+python/dyn",
    8189 +# else
    8190 +       "+python",
    8191 +# endif
    8192 +#else
    8193 +       "-python",
    8194 +#endif
    8195 +#ifdef FEAT_QUICKFIX
    8196 +       "+quickfix",
    8197 +#else
    8198 +       "-quickfix",
    8199 +#endif
    8200 +#ifdef FEAT_RELTIME
    8201 +       "+reltime",
    8202 +#else
    8203 +       "-reltime",
    8204 +#endif
    8205 +#ifdef FEAT_RIGHTLEFT
    8206 +       "+rightleft",
    8207 +#else
    8208 +       "-rightleft",
    8209 +#endif
    8210 +#ifdef FEAT_RUBY
    8211 +# ifdef DYNAMIC_RUBY
    8212 +       "+ruby/dyn",
    8213 +# else
    8214 +       "+ruby",
    8215 +# endif
    8216 +#else
    8217 +       "-ruby",
    8218 +#endif
    8219 +#ifdef FEAT_SCROLLBIND
    8220 +       "+scrollbind",
    8221 +#else
    8222 +       "-scrollbind",
    8223 +#endif
    8224 +#ifdef FEAT_SIGNS
    8225 +       "+signs",
    8226 +#else
    8227 +       "-signs",
    8228 +#endif
    8229 +#ifdef FEAT_SMARTINDENT
    8230 +       "+smartindent",
    8231 +#else
    8232 +       "-smartindent",
    8233 +#endif
    8234 +#ifdef FEAT_SNIFF
    8235 +       "+sniff",
    8236 +#else
    8237 +       "-sniff",
    8238 +#endif
    8239 +#ifdef FEAT_STL_OPT
    8240 +       "+statusline",
    8241 +#else
    8242 +       "-statusline",
    8243 +#endif
    8244 +#ifdef FEAT_SUN_WORKSHOP
    8245 +       "+sun_workshop",
    8246 +#else
    8247 +       "-sun_workshop",
    8248 +#endif
    8249 +#ifdef FEAT_SYN_HL
    8250 +       "+syntax",
    8251 +#else
    8252 +       "-syntax",
    8253 +#endif
    8254 +           /* only interesting on Unix systems */
    8255 +#if defined(USE_SYSTEM) && (defined(UNIX) || defined(__EMX__))
    8256 +       "+system()",
    8257 +#endif
    8258 +#ifdef FEAT_TAG_BINS
    8259 +       "+tag_binary",
    8260 +#else
    8261 +       "-tag_binary",
    8262 +#endif
    8263 +#ifdef FEAT_TAG_OLDSTATIC
    8264 +       "+tag_old_static",
    8265 +#else
    8266 +       "-tag_old_static",
    8267 +#endif
    8268 +#ifdef FEAT_TAG_ANYWHITE
    8269 +       "+tag_any_white",
    8270 +#else
    8271 +       "-tag_any_white",
    8272 +#endif
    8273 +#ifdef FEAT_TCL
    8274 +# ifdef DYNAMIC_TCL
    8275 +       "+tcl/dyn",
    8276 +# else
    8277 +       "+tcl",
    8278 +# endif
    8279 +#else
    8280 +       "-tcl",
    8281 +#endif
    8282 +#if defined(UNIX) || defined(__EMX__)
    8283 +/* only Unix (or OS/2 with EMX!) can have terminfo instead of termcap */
    8284 +# ifdef TERMINFO
    8285 +       "+terminfo",
    8286 +# else
    8287 +       "-terminfo",
    8288 +# endif
    8289 +#else              /* unix always includes termcap support */
    8290 +# ifdef HAVE_TGETENT
    8291 +       "+tgetent",
    8292 +# else
    8293 +       "-tgetent",
    8294 +# endif
    8295 +#endif
    8296 +#ifdef FEAT_TERMRESPONSE
    8297 +       "+termresponse",
    8298 +#else
    8299 +       "-termresponse",
    8300 +#endif
    8301 +#ifdef FEAT_TEXTOBJ
    8302 +       "+textobjects",
    8303 +#else
    8304 +       "-textobjects",
    8305 +#endif
    8306 +#ifdef FEAT_TITLE
    8307 +       "+title",
    8308 +#else
    8309 +       "-title",
    8310 +#endif
    8311 +#ifdef FEAT_TOOLBAR
    8312 +       "+toolbar",
    8313 +#else
    8314 +       "-toolbar",
    8315 +#endif
    8316 +#ifdef FEAT_USR_CMDS
    8317 +       "+user_commands",
    8318 +#else
    8319 +       "-user_commands",
    8320 +#endif
    8321 +#ifdef FEAT_VERTSPLIT
    8322 +       "+vertsplit",
    8323 +#else
    8324 +       "-vertsplit",
    8325 +#endif
    8326 +#ifdef FEAT_VIRTUALEDIT
    8327 +       "+virtualedit",
    8328 +#else
    8329 +       "-virtualedit",
    8330 +#endif
    8331 +#ifdef FEAT_VISUAL
    8332 +       "+visual",
    8333 +# ifdef FEAT_VISUALEXTRA
    8334 +       "+visualextra",
    8335 +# else
    8336 +       "-visualextra",
    8337 +# endif
    8338 +#else
    8339 +       "-visual",
    8340 +#endif
    8341 +#ifdef FEAT_VIMINFO
    8342 +       "+viminfo",
    8343 +#else
    8344 +       "-viminfo",
    8345 +#endif
    8346 +#ifdef FEAT_VREPLACE
    8347 +       "+vreplace",
    8348 +#else
    8349 +       "-vreplace",
    8350 +#endif
    8351 +#ifdef FEAT_WILDIGN
    8352 +       "+wildignore",
    8353 +#else
    8354 +       "-wildignore",
    8355 +#endif
    8356 +#ifdef FEAT_WILDMENU
    8357 +       "+wildmenu",
    8358 +#else
    8359 +       "-wildmenu",
    8360 +#endif
    8361 +#ifdef FEAT_WINDOWS
    8362 +       "+windows",
    8363 +#else
    8364 +       "-windows",
    8365 +#endif
    8366 +#ifdef FEAT_WRITEBACKUP
    8367 +       "+writebackup",
    8368 +#else
    8369 +       "-writebackup",
    8370 +#endif
    8371 +#if defined(UNIX) || defined(VMS)
    8372 +# ifdef FEAT_X11
    8373 +       "+X11",
    8374 +# else
    8375 +       "-X11",
    8376 +# endif
    8377 +#endif
    8378 +#ifdef FEAT_XFONTSET
    8379 +       "+xfontset",
    8380 +#else
    8381 +       "-xfontset",
    8382 +#endif
    8383 +#ifdef FEAT_XIM
    8384 +       "+xim",
    8385 +#else
    8386 +       "-xim",
    8387 +#endif
    8388 +#if defined(UNIX) || defined(VMS)
    8389 +# ifdef USE_XSMP_INTERACT
    8390 +       "+xsmp_interact",
    8391 +# else
    8392 +#  ifdef USE_XSMP
    8393 +       "+xsmp",
    8394 +#  else
    8395 +       "-xsmp",
    8396 +#  endif
    8397 +# endif
    8398 +# ifdef FEAT_XCLIPBOARD
    8399 +       "+xterm_clipboard",
    8400 +# else
    8401 +       "-xterm_clipboard",
    8402 +# endif
    8403 +#endif
    8404 +#ifdef FEAT_XTERM_SAVE
    8405 +       "+xterm_save",
    8406 +#else
    8407 +       "-xterm_save",
    8408 +#endif
    8409 +#ifdef WIN3264
    8410 +# ifdef FEAT_XPM_W32
    8411 +       "+xpm_w32",
    8412 +# else
    8413 +       "-xpm_w32",
    8414 +# endif
    8415 +#endif
    8416 +       NULL
    8417 +};
    8418 +
    8419 +static int included_patches[] =
    8420 +{   /* Add new patch number below this line */
    8421 +/**/
    8422 +    115,
    8423 +/**/
    8424 +    114,
    8425 +/**/
    8426 +    113,
    8427 +/**/
    8428 +    112,
    8429 +/**/
    8430 +    111,
    8431 +/**/
    8432 +    110,
    8433 +/**/
    8434 +    109,
    8435 +/**/
    8436 +    107,
    8437 +/**/
    8438 +    106,
    8439 +/**/
    8440 +    105,
    8441 +/**/
    8442 +    104,
    8443 +/**/
    8444 +    103,
    8445 +/**/
    8446 +    102,
    8447 +/**/
    8448 +    101,
    8449 +/**/
    8450 +    100,
    8451 +/**/
    8452 +    99,
    8453 +/**/
    8454 +    98,
    8455 +/**/
    8456 +    97,
    8457 +/**/
    8458 +    96,
    8459 +/**/
    8460 +    95,
    8461 +/**/
    8462 +    94,
    8463 +/**/
    8464 +    93,
    8465 +/**/
    8466 +    92,
    8467 +/**/
    8468 +    91,
    8469 +/**/
    8470 +    90,
    8471 +/**/
    8472 +    89,
    8473 +/**/
    8474 +    88,
    8475 +/**/
    8476 +    87,
    8477 +/**/
    8478 +    86,
    8479 +/**/
    8480 +    85,
    8481 +/**/
    8482 +    84,
    8483 +/**/
    8484 +    83,
    8485 +/**/
    8486 +    82,
    8487 +/**/
    8488 +    81,
    8489 +/**/
    8490 +    80,
    8491 +/**/
    8492 +    79,
    8493 +/**/
    8494 +    78,
    8495 +/**/
    8496 +    77,
    8497 +/**/
    8498 +    76,
    8499 +/**/
    8500 +    75,
    8501 +/**/
    8502 +    73,
    8503 +/**/
    8504 +    72,
    8505 +/**/
    8506 +    71,
    8507 +/**/
    8508 +    70,
    8509 +/**/
    8510 +    69,
    8511 +/**/
    8512 +    68,
    8513 +/**/
    8514 +    67,
    8515 +/**/
    8516 +    66,
    8517 +/**/
    8518 +    64,
    8519 +/**/
    8520 +    63,
    8521 +/**/
    8522 +    62,
    8523 +/**/
    8524 +    61,
    8525 +/**/
    8526 +    60,
    8527 +/**/
    8528 +    59,
    8529 +/**/
    8530 +    58,
    8531 +/**/
    8532 +    56,
    8533 +/**/
    8534 +    55,
    8535 +/**/
    8536 +    54,
    8537 +/**/
    8538 +    53,
    8539 +/**/
    8540 +    52,
    8541 +/**/
    8542 +    51,
    8543 +/**/
    8544 +    50,
    8545 +/**/
    8546 +    49,
    8547 +/**/
    8548 +    48,
    8549 +/**/
    8550 +    47,
    8551 +/**/
    8552 +    46,
    8553 +/**/
    8554 +    44,
    8555 +/**/
    8556 +    43,
    8557 +/**/
    8558 +    42,
    8559 +/**/
    8560 +    41,
    8561 +/**/
    8562 +    40,
    8563 +/**/
    8564 +    39,
    8565 +/**/
    8566 +    38,
    8567 +/**/
    8568 +    37,
    8569 +/**/
    8570 +    36,
    8571 +/**/
    8572 +    35,
    8573 +/**/
    8574 +    34,
    8575 +/**/
    8576 +    33,
    8577 +/**/
    8578 +    31,
    8579 +/**/
    8580 +    30,
    8581 +/**/
    8582 +    29,
    8583 +/**/
    8584 +    26,
    8585 +/**/
    8586 +    25,
    8587 +/**/
    8588 +    24,
    8589 +/**/
    8590 +    23,
    8591 +/**/
    8592 +    22,
    8593 +/**/
    8594 +    21,
    8595 +/**/
    8596 +    20,
    8597 +/**/
    8598 +    19,
    8599 +/**/
    8600 +    18,
    8601 +/**/
    8602 +    17,
    8603 +/**/
    8604 +    16,
    8605 +/**/
    8606 +    15,
    8607 +/**/
    8608 +    14,
    8609 +/**/
    8610 +    13,
    8611 +/**/
    8612 +    12,
    8613 +/**/
    8614 +    11,
    8615 +/**/
    8616 +    10,
    8617 +/**/
    8618 +    9,
    8619 +/**/
    8620 +    8,
    8621 +/**/
    8622 +    7,
    8623 +/**/
    8624 +    6,
    8625 +/**/
    8626 +    4,
    8627 +/**/
    8628 +    3,
    8629 +/**/
    8630 +    2,
    8631 +/**/
    8632 +    1,
    8633 +/**/
    8634 +    0
    8635 +};
    8636 +
    8637 +    int
    8638 +highest_patch()
    8639 +{
    8640 +    int                i;
    8641 +    int                h = 0;
    8642 +
    8643 +    for (i = 0; included_patches[i] != 0; ++i)
    8644 +       if (included_patches[i] > h)
    8645 +           h = included_patches[i];
    8646 +    return h;
    8647 +}
    8648 +
    8649 +#if defined(FEAT_EVAL) || defined(PROTO)
    8650 +/*
    8651 + * Return TRUE if patch "n" has been included.
    8652 + */
    8653 +    int
    8654 +has_patch(n)
    8655 +    int                n;
    8656 +{
    8657 +    int                i;
    8658 +
    8659 +    for (i = 0; included_patches[i] != 0; ++i)
    8660 +       if (included_patches[i] == n)
    8661 +           return TRUE;
    8662 +    return FALSE;
    8663 +}
    8664 +#endif
    8665 +
    8666 +    void
    8667 +ex_version(eap)
    8668 +    exarg_T    *eap;
    8669 +{
    8670 +    /*
    8671 +     * Ignore a ":version 9.99" command.
    8672 +     */
    8673 +    if (*eap->arg == NUL)
    8674 +    {
    8675 +       msg_putchar('\n');
    8676 +       list_version();
    8677 +    }
    8678 +}
    8679 +
    8680 +    void
    8681 +list_version()
    8682 +{
    8683 +    int                i;
    8684 +    int                first;
    8685 +    char       *s = "";
    8686 +
    8687 +    /*
    8688 +     * When adding features here, don't forget to update the list of
    8689 +     * internal variables in eval.c!
    8690 +     */
    8691 +    MSG(longVersion);
    8692 +#ifdef WIN3264
    8693 +# ifdef FEAT_GUI_W32
    8694 +#  if defined(_MSC_VER) && (_MSC_VER <= 1010)
    8695 +    /* Only MS VC 4.1 and earlier can do Win32s */
    8696 +    MSG_PUTS(_("\nMS-Windows 16/32 bit GUI version"));
    8697 +#  else
    8698 +    MSG_PUTS(_("\nMS-Windows 32 bit GUI version"));
    8699 +#  endif
    8700 +    if (gui_is_win32s())
    8701 +       MSG_PUTS(_(" in Win32s mode"));
    8702 +# ifdef FEAT_OLE
    8703 +    MSG_PUTS(_(" with OLE support"));
    8704 +# endif
    8705 +# else
    8706 +    MSG_PUTS(_("\nMS-Windows 32 bit console version"));
    8707 +# endif
    8708 +#endif
    8709 +#ifdef WIN16
    8710 +    MSG_PUTS(_("\nMS-Windows 16 bit version"));
    8711 +#endif
    8712 +#ifdef MSDOS
    8713 +# ifdef DJGPP
    8714 +    MSG_PUTS(_("\n32 bit MS-DOS version"));
    8715 +# else
    8716 +    MSG_PUTS(_("\n16 bit MS-DOS version"));
    8717 +# endif
    8718 +#endif
    8719 +#ifdef MACOS
    8720 +# ifdef MACOS_X
    8721 +#  ifdef MACOS_X_UNIX
    8722 +    MSG_PUTS(_("\nMacOS X (unix) version"));
    8723 +#  else
    8724 +    MSG_PUTS(_("\nMacOS X version"));
    8725 +#  endif
    8726 +#else
    8727 +    MSG_PUTS(_("\nMacOS version"));
    8728 +# endif
    8729 +#endif
    8730 +
    8731 +#ifdef RISCOS
    8732 +    MSG_PUTS(_("\nRISC OS version"));
    8733 +#endif
    8734 +#ifdef VMS
    8735 +    MSG_PUTS("\nOpenVMS version");
    8736 +#endif
    8737 +
    8738 +    /* Print the list of patch numbers if there is at least one. */
    8739 +    /* Print a range when patches are consecutive: "1-10, 12, 15-40, 42-45" */
    8740 +    if (included_patches[0] != 0)
    8741 +    {
    8742 +       MSG_PUTS(_("\nIncluded patches: "));
    8743 +       first = -1;
    8744 +       /* find last one */
    8745 +       for (i = 0; included_patches[i] != 0; ++i)
    8746 +           ;
    8747 +       while (--i >= 0)
    8748 +       {
    8749 +           if (first < 0)
    8750 +               first = included_patches[i];
    8751 +           if (i == 0 || included_patches[i - 1] != included_patches[i] + 1)
    8752 +           {
    8753 +               MSG_PUTS(s);
    8754 +               s = ", ";
    8755 +               msg_outnum((long)first);
    8756 +               if (first != included_patches[i])
    8757 +               {
    8758 +                   MSG_PUTS("-");
    8759 +                   msg_outnum((long)included_patches[i]);
    8760 +               }
    8761 +               first = -1;
    8762 +           }
    8763 +       }
    8764 +    }
    8765 +
    8766 +#ifdef MODIFIED_BY
    8767 +    MSG_PUTS("\n");
    8768 +    MSG_PUTS(_("Modified by "));
    8769 +    MSG_PUTS(MODIFIED_BY);
    8770 +#endif
    8771 +
    8772 +#ifdef HAVE_PATHDEF
    8773 +    if (*compiled_user != NUL || *compiled_sys != NUL)
    8774 +    {
    8775 +       MSG_PUTS(_("\nCompiled "));
    8776 +       if (*compiled_user != NUL)
    8777 +       {
    8778 +           MSG_PUTS(_("by "));
    8779 +           MSG_PUTS(compiled_user);
    8780 +       }
    8781 +       if (*compiled_sys != NUL)
    8782 +       {
    8783 +           MSG_PUTS("@");
    8784 +           MSG_PUTS(compiled_sys);
    8785 +       }
    8786 +    }
    8787 +#endif
    8788 +
    8789 +#ifdef FEAT_HUGE
    8790 +    MSG_PUTS(_("\nHuge version "));
    8791 +#else
    8792 +# ifdef FEAT_BIG
    8793 +    MSG_PUTS(_("\nBig version "));
    8794 +# else
    8795 +#  ifdef FEAT_NORMAL
    8796 +    MSG_PUTS(_("\nNormal version "));
    8797 +#  else
    8798 +#   ifdef FEAT_SMALL
    8799 +    MSG_PUTS(_("\nSmall version "));
    8800 +#   else
    8801 +    MSG_PUTS(_("\nTiny version "));
    8802 +#   endif
    8803 +#  endif
    8804 +# endif
    8805 +#endif
    8806 +#ifndef FEAT_GUI
    8807 +    MSG_PUTS(_("without GUI."));
    8808 +#else
    8809 +# ifdef FEAT_GUI_GTK
    8810 +#  ifdef FEAT_GUI_GNOME
    8811 +#   ifdef HAVE_GTK2
    8812 +    MSG_PUTS(_("with GTK2-GNOME GUI."));
    8813 +#   else
    8814 +    MSG_PUTS(_("with GTK-GNOME GUI."));
    8815 +#   endif
    8816 +#  else
    8817 +#   ifdef HAVE_GTK2
    8818 +    MSG_PUTS(_("with GTK2 GUI."));
    8819 +#   else
    8820 +    MSG_PUTS(_("with GTK GUI."));
    8821 +#   endif
    8822 +#  endif
    8823 +# else
    8824 +#  ifdef FEAT_GUI_MOTIF
    8825 +    MSG_PUTS(_("with X11-Motif GUI."));
    8826 +#  else
    8827 +#   ifdef FEAT_GUI_ATHENA
    8828 +#    ifdef FEAT_GUI_NEXTAW
    8829 +    MSG_PUTS(_("with X11-neXtaw GUI."));
    8830 +#    else
    8831 +    MSG_PUTS(_("with X11-Athena GUI."));
    8832 +#    endif
    8833 +#   else
    8834 +#     ifdef FEAT_GUI_PHOTON
    8835 +    MSG_PUTS(_("with Photon GUI."));
    8836 +#     else
    8837 +#      if defined(MSWIN)
    8838 +    MSG_PUTS(_("with GUI."));
    8839 +#      else
    8840 +#      if defined (TARGET_API_MAC_CARBON) && TARGET_API_MAC_CARBON
    8841 +    MSG_PUTS(_("with Carbon GUI."));
    8842 +#      else
    8843 +#       if defined (TARGET_API_MAC_OSX) && TARGET_API_MAC_OSX
    8844 +    MSG_PUTS(_("with Cocoa GUI."));
    8845 +#       else
    8846 +#        if defined (MACOS)
    8847 +    MSG_PUTS(_("with (classic) GUI."));
    8848 +#        endif
    8849 +#       endif
    8850 +#      endif
    8851 +#      endif
    8852 +#    endif
    8853 +#   endif
    8854 +#  endif
    8855 +# endif
    8856 +#endif
    8857 +    version_msg(_("  Features included (+) or not (-):\n"));
    8858 +
    8859 +    /* print all the features */
    8860 +    for (i = 0; features[i] != NULL; ++i)
    8861 +    {
    8862 +       version_msg(features[i]);
    8863 +       if (msg_col > 0)
    8864 +           version_msg(" ");
    8865 +    }
    8866 +
    8867 +    version_msg("\n");
    8868 +#ifdef SYS_VIMRC_FILE
    8869 +    version_msg(_("   system vimrc file: \""));
    8870 +    version_msg(SYS_VIMRC_FILE);
    8871 +    version_msg("\"\n");
    8872 +#endif
    8873 +#ifdef USR_VIMRC_FILE
    8874 +    version_msg(_("     user vimrc file: \""));
    8875 +    version_msg(USR_VIMRC_FILE);
    8876 +    version_msg("\"\n");
    8877 +#endif
    8878 +#ifdef USR_VIMRC_FILE2
    8879 +    version_msg(_(" 2nd user vimrc file: \""));
    8880 +    version_msg(USR_VIMRC_FILE2);
    8881 +    version_msg("\"\n");
    8882 +#endif
    8883 +#ifdef USR_VIMRC_FILE3
    8884 +    version_msg(_(" 3rd user vimrc file: \""));
    8885 +    version_msg(USR_VIMRC_FILE3);
    8886 +    version_msg("\"\n");
    8887 +#endif
    8888 +#ifdef USR_EXRC_FILE
    8889 +    version_msg(_("      user exrc file: \""));
    8890 +    version_msg(USR_EXRC_FILE);
    8891 +    version_msg("\"\n");
    8892 +#endif
    8893 +#ifdef USR_EXRC_FILE2
    8894 +    version_msg(_("  2nd user exrc file: \""));
    8895 +    version_msg(USR_EXRC_FILE2);
    8896 +    version_msg("\"\n");
    8897 +#endif
    8898 +#ifdef FEAT_GUI
    8899 +# ifdef SYS_GVIMRC_FILE
    8900 +    version_msg(_("  system gvimrc file: \""));
    8901 +    version_msg(SYS_GVIMRC_FILE);
    8902 +    version_msg("\"\n");
    8903 +# endif
    8904 +    version_msg(_("    user gvimrc file: \""));
    8905 +    version_msg(USR_GVIMRC_FILE);
    8906 +    version_msg("\"\n");
    8907 +# ifdef USR_GVIMRC_FILE2
    8908 +    version_msg(_("2nd user gvimrc file: \""));
    8909 +    version_msg(USR_GVIMRC_FILE2);
    8910 +    version_msg("\"\n");
    8911 +# endif
    8912 +# ifdef USR_GVIMRC_FILE3
    8913 +    version_msg(_("3rd user gvimrc file: \""));
    8914 +    version_msg(USR_GVIMRC_FILE3);
    8915 +    version_msg("\"\n");
    8916 +# endif
    8917 +#endif
    8918 +#ifdef FEAT_GUI
    8919 +# ifdef SYS_MENU_FILE
    8920 +    version_msg(_("    system menu file: \""));
    8921 +    version_msg(SYS_MENU_FILE);
    8922 +    version_msg("\"\n");
    8923 +# endif
    8924 +#endif
    8925 +#ifdef HAVE_PATHDEF
    8926 +    if (*default_vim_dir != NUL)
    8927 +    {
    8928 +       version_msg(_("  fall-back for $VIM: \""));
    8929 +       version_msg((char *)default_vim_dir);
    8930 +       version_msg("\"\n");
    8931 +    }
    8932 +    if (*default_vimruntime_dir != NUL)
    8933 +    {
    8934 +       version_msg(_(" f-b for $VIMRUNTIME: \""));
    8935 +       version_msg((char *)default_vimruntime_dir);
    8936 +       version_msg("\"\n");
    8937 +    }
    8938 +    version_msg(_("Compilation: "));
    8939 +    version_msg((char *)all_cflags);
    8940 +    version_msg("\n");
    8941 +#ifdef VMS
    8942 +    if (*compiler_version != NUL)
    8943 +    {
    8944 +       version_msg(_("Compiler: "));
    8945 +       version_msg((char *)compiler_version);
    8946 +       version_msg("\n");
    8947 +    }
    8948 +#endif
    8949 +    version_msg(_("Linking: "));
    8950 +    version_msg((char *)all_lflags);
    8951 +#endif
    8952 +#ifdef DEBUG
    8953 +    version_msg("\n");
    8954 +    version_msg(_("  DEBUG BUILD"));
    8955 +#endif
    8956 +}
    8957 +
    8958 +/*
    8959 + * Output a string for the version message.  If it's going to wrap, output a
    8960 + * newline, unless the message is too long to fit on the screen anyway.
    8961 + */
    8962 +    static void
    8963 +version_msg(s)
    8964 +    char       *s;
    8965 +{
    8966 +    int                len = (int)STRLEN(s);
    8967 +
    8968 +    if (!got_int && len < (int)Columns && msg_col + len >= (int)Columns
    8969 +                                                               && *s != '\n')
    8970 +       msg_putchar('\n');
    8971 +    if (!got_int)
    8972 +       MSG_PUTS(s);
    8973 +}
    8974 +
    8975 +static void do_intro_line __ARGS((int row, char_u *mesg, int add_version, int attr));
    8976 +
    8977 +/*
    8978 + * Give an introductory message about Vim.
    8979 + * Only used when starting Vim on an empty file, without a file name.
    8980 + * Or with the ":intro" command (for Sven :-).
    8981 + */
    8982 +    void
    8983 +intro_message(colon)
    8984 +    int                colon;          /* TRUE for ":intro" */
    8985 +{
    8986 +    int                i;
    8987 +    int                row;
    8988 +    int                blanklines;
    8989 +    int                sponsor;
    8990 +    char       *p;
    8991 +    static char        *(lines[]) =
    8992 +    {
    8993 +       N_("VIM - Vi IMproved"),
    8994 +       "",
    8995 +       N_("version "),
    8996 +       N_("by Bram Moolenaar et al."),
    8997 +#ifdef MODIFIED_BY
    8998 +       " ",
    8999 +#endif
    9000 +       N_("Vim is open source and freely distributable"),
    9001 +       "",
    9002 +       N_("Help poor children in Uganda!"),
    9003 +       N_("type  :help iccf<Enter>       for information "),
    9004 +       "",
    9005 +       N_("type  :q<Enter>               to exit         "),
    9006 +       N_("type  :help<Enter>  or  <F1>  for on-line help"),
    9007 +       N_("type  :help version7<Enter>   for version info"),
    9008 +       NULL,
    9009 +       "",
    9010 +       N_("Running in Vi compatible mode"),
    9011 +       N_("type  :set nocp<Enter>        for Vim defaults"),
    9012 +       N_("type  :help cp-default<Enter> for info on this"),
    9013 +    };
    9014 +#ifdef FEAT_GUI
    9015 +    static char        *(gui_lines[]) =
    9016 +    {
    9017 +       NULL,
    9018 +       NULL,
    9019 +       NULL,
    9020 +       NULL,
    9021 +#ifdef MODIFIED_BY
    9022 +       NULL,
    9023 +#endif
    9024 +       NULL,
    9025 +       NULL,
    9026 +       NULL,
    9027 +       N_("menu  Help->Orphans           for information    "),
    9028 +       NULL,
    9029 +       N_("Running modeless, typed text is inserted"),
    9030 +       N_("menu  Edit->Global Settings->Toggle Insert Mode  "),
    9031 +       N_("                              for two modes      "),
    9032 +       NULL,
    9033 +       NULL,
    9034 +       NULL,
    9035 +       N_("menu  Edit->Global Settings->Toggle Vi Compatible"),
    9036 +       N_("                              for Vim defaults   "),
    9037 +    };
    9038 +#endif
    9039 +
    9040 +    /* blanklines = screen height - # message lines */
    9041 +    blanklines = (int)Rows - ((sizeof(lines) / sizeof(char *)) - 1);
    9042 +    if (!p_cp)
    9043 +       blanklines += 4;  /* add 4 for not showing "Vi compatible" message */
    9044 +#if defined(WIN3264) && !defined(FEAT_GUI_W32)
    9045 +    if (mch_windows95())
    9046 +       blanklines -= 3;  /* subtract 3 for showing "Windows 95" message */
    9047 +#endif
    9048 +
    9049 +#ifdef FEAT_WINDOWS
    9050 +    /* Don't overwrite a statusline.  Depends on 'cmdheight'. */
    9051 +    if (p_ls > 1)
    9052 +       blanklines -= Rows - topframe->fr_height;
    9053 +#endif
    9054 +    if (blanklines < 0)
    9055 +       blanklines = 0;
    9056 +
    9057 +    /* Show the sponsor and register message one out of four times, the Uganda
    9058 +     * message two out of four times. */
    9059 +    sponsor = (int)time(NULL);
    9060 +    sponsor = ((sponsor & 2) == 0) - ((sponsor & 4) == 0);
    9061 +
    9062 +    /* start displaying the message lines after half of the blank lines */
    9063 +    row = blanklines / 2;
    9064 +    if ((row >= 2 && Columns >= 50) || colon)
    9065 +    {
    9066 +       for (i = 0; i < (int)(sizeof(lines) / sizeof(char *)); ++i)
    9067 +       {
    9068 +           p = lines[i];
    9069 +#ifdef FEAT_GUI
    9070 +           if (p_im && gui.in_use && gui_lines[i] != NULL)
    9071 +               p = gui_lines[i];
    9072 +#endif
    9073 +           if (p == NULL)
    9074 +           {
    9075 +               if (!p_cp)
    9076 +                   break;
    9077 +               continue;
    9078 +           }
    9079 +           if (sponsor != 0)
    9080 +           {
    9081 +               if (strstr(p, "children") != NULL)
    9082 +                   p = sponsor < 0
    9083 +                       ? N_("Sponsor Vim development!")
    9084 +                       : N_("Become a registered Vim user!");
    9085 +               else if (strstr(p, "iccf") != NULL)
    9086 +                   p = sponsor < 0
    9087 +                       ? N_("type  :help sponsor<Enter>    for information ")
    9088 +                       : N_("type  :help register<Enter>   for information ");
    9089 +               else if (strstr(p, "Orphans") != NULL)
    9090 +                   p = N_("menu  Help->Sponsor/Register  for information    ");
    9091 +           }
    9092 +           if (*p != NUL)
    9093 +               do_intro_line(row, (char_u *)_(p), i == 2, 0);
    9094 +           ++row;
    9095 +       }
    9096 +#if defined(WIN3264) && !defined(FEAT_GUI_W32)
    9097 +       if (mch_windows95())
    9098 +       {
    9099 +           do_intro_line(++row,
    9100 +                   (char_u *)_("WARNING: Windows 95/98/ME detected"),
    9101 +                                                       FALSE, hl_attr(HLF_E));
    9102 +           do_intro_line(++row,
    9103 +               (char_u *)_("type  :help windows95<Enter>  for info on this"),
    9104 +                                                                   FALSE, 0);
    9105 +       }
    9106 +#endif
    9107 +    }
    9108 +
    9109 +    /* Make the wait-return message appear just below the text. */
    9110 +    if (colon)
    9111 +       msg_row = row;
    9112 +}
    9113 +
    9114 +    static void
    9115 +do_intro_line(row, mesg, add_version, attr)
    9116 +    int                row;
    9117 +    char_u     *mesg;
    9118 +    int                add_version;
    9119 +    int                attr;
    9120 +{
    9121 +    char_u     vers[20];
    9122 +    int                col;
    9123 +    char_u     *p;
    9124 +    int                l;
    9125 +    int                clen;
    9126 +#ifdef MODIFIED_BY
    9127 +# define MODBY_LEN 150
    9128 +    char_u     modby[MODBY_LEN];
    9129 +
    9130 +    if (*mesg == ' ')
    9131 +    {
    9132 +       vim_strncpy(modby, _("Modified by "), MODBY_LEN - 1);
    9133 +       l = STRLEN(modby);
    9134 +       vim_strncpy(modby + l, MODIFIED_BY, MODBY_LEN - l - 1);
    9135 +       mesg = modby;
    9136 +    }
    9137 +#endif
    9138 +
    9139 +    /* Center the message horizontally. */
    9140 +    col = vim_strsize(mesg);
    9141 +    if (add_version)
    9142 +    {
    9143 +       STRCPY(vers, mediumVersion);
    9144 +       if (highest_patch())
    9145 +       {
    9146 +           /* Check for 9.9x or 9.9xx, alpha/beta version */
    9147 +           if (isalpha((int)mediumVersion[3]))
    9148 +           {
    9149 +               if (isalpha((int)mediumVersion[4]))
    9150 +                   sprintf((char *)vers + 5, ".%d%s", highest_patch(),
    9151 +                                                          mediumVersion + 5);
    9152 +               else
    9153 +                   sprintf((char *)vers + 4, ".%d%s", highest_patch(),
    9154 +                                                          mediumVersion + 4);
    9155 +           }
    9156 +           else
    9157 +               sprintf((char *)vers + 3, ".%d", highest_patch());
    9158 +       }
    9159 +       col += (int)STRLEN(vers);
    9160 +    }
    9161 +    col = (Columns - col) / 2;
    9162 +    if (col < 0)
    9163 +       col = 0;
    9164 +
    9165 +    /* Split up in parts to highlight <> items differently. */
    9166 +    for (p = mesg; *p != NUL; p += l)
    9167 +    {
    9168 +       clen = 0;
    9169 +       for (l = 0; p[l] != NUL
    9170 +                        && (l == 0 || (p[l] != '<' && p[l - 1] != '>')); ++l)
    9171 +       {
    9172 +#ifdef FEAT_MBYTE
    9173 +           if (has_mbyte)
    9174 +           {
    9175 +               clen += ptr2cells(p + l);
    9176 +               l += (*mb_ptr2len)(p + l) - 1;
    9177 +           }
    9178 +           else
    9179 +#endif
    9180 +               clen += byte2cells(p[l]);
    9181 +       }
    9182 +       screen_puts_len(p, l, row, col, *p == '<' ? hl_attr(HLF_8) : attr);
    9183 +       col += clen;
    9184 +    }
    9185 +
    9186 +    /* Add the version number to the version line. */
    9187 +    if (add_version)
    9188 +       screen_puts(vers, row, col, 0);
    9189 +}
    9190 +
    9191 +/*
    9192 + * ":intro": clear screen, display intro screen and wait for return.
    9193 + */
    9194 +/*ARGSUSED*/
    9195 +    void
    9196 +ex_intro(eap)
    9197 +    exarg_T    *eap;
    9198 +{
    9199 +    screenclear();
    9200 +    intro_message(TRUE);
    9201 +    wait_return(TRUE);
    9202 +}
    92038409diff -Naur vim70.orig/src/vim.h vim70/src/vim.h
    92048410--- vim70.orig/src/vim.h        2006-04-30 08:32:38.000000000 -0700
    9205 +++ vim70/src/vim.h     2006-10-13 01:02:53.000000000 -0700
     8411+++ vim70/src/vim.h     2006-10-21 21:08:59.000000000 -0700
    92068412@@ -585,7 +585,6 @@
    92078413 #define INSERT         0x10    /* Insert mode */
     
    92328438diff -Naur vim70.orig/src/window.c vim70/src/window.c
    92338439--- vim70.orig/src/window.c     2006-05-06 03:54:51.000000000 -0700
    9234 +++ vim70/src/window.c  2006-10-13 01:02:56.000000000 -0700
     8440+++ vim70/src/window.c  2006-10-21 21:09:02.000000000 -0700
    92358441@@ -340,10 +340,10 @@
    92368442                {
     
    92628468 #endif /* FEAT_WINDOWS */
    92638469
    9264        
    9265 
Note: See TracChangeset for help on using the changeset viewer.