Changeset f38c7e1 in clfs-sysroot


Ignore:
Timestamp:
Feb 19, 2007, 2:16:44 PM (17 years ago)
Author:
Joe Ciccone <jciccone@…>
Branches:
master
Children:
673b687
Parents:
9401f22
Message:

Update vim patch.

Files:
1 edited
1 moved

Legend:

Unmodified
Added
Removed
  • BOOK/patches.ent

    r9401f22 rf38c7e1  
    109109<!ENTITY vim-cross_compile-patch-size "28 KB">
    110110
    111 <!ENTITY vim-fixes-patch "vim-&vim-version;-fixes-22.patch">
    112 <!ENTITY vim-fixes-patch-md5 "389430e83aaa8c2b68b2a05321c89c28">
    113 <!ENTITY vim-fixes-patch-size "328 KB">
     111<!ENTITY vim-fixes-patch "vim-&vim-version;-fixes-23.patch">
     112<!ENTITY vim-fixes-patch-md5 "695ef97cf6cd5afce5f803a693ef6545">
     113<!ENTITY vim-fixes-patch-size "344 KB">
    114114
    115115<!ENTITY zlib-fpic-patch "zlib-&zlib-version;-fPIC-1.patch">
  • patches/vim-7.0-fixes-23.patch

    r9401f22 rf38c7e1  
    11Submitted By: Jim Gifford (jim at linuxfromscratch dot org)
    2 Date: 01-23-2007
     2Date: 02-15-2007
    33Initial Package Version: 7.0
    44Origin: Upstream
    55Upstream Status: Applied
    6 Description: Contains all upstream patches up to 7.0.188
     6Description: Contains all upstream patches up to 7.0.195
    77             The following patches were skipped
    88             005 027 028 032 045 057 065 074 108 130 131 132 138 156 161 170 171 180
     
    1010diff -Naur vim70.orig/configure vim70/configure
    1111--- vim70.orig/configure        2004-07-05 02:02:24.000000000 -0700
    12 +++ vim70/configure     2007-01-23 17:14:51.000000000 -0800
     12+++ vim70/configure     2007-02-15 21:22:24.000000000 -0800
    1313@@ -3,4 +3,4 @@
    1414 # This is just a stub for the Unix configure script, to provide support for
     
    1919diff -Naur vim70.orig/runtime/autoload/ccomplete.vim vim70/runtime/autoload/ccomplete.vim
    2020--- vim70.orig/runtime/autoload/ccomplete.vim   2006-05-03 07:35:56.000000000 -0700
    21 +++ vim70/runtime/autoload/ccomplete.vim        2007-01-23 17:14:45.000000000 -0800
     21+++ vim70/runtime/autoload/ccomplete.vim        2007-02-15 21:22:24.000000000 -0800
    2222@@ -1,7 +1,7 @@
    2323 " Vim completion script
     
    4040diff -Naur vim70.orig/runtime/autoload/gzip.vim vim70/runtime/autoload/gzip.vim
    4141--- vim70.orig/runtime/autoload/gzip.vim        2006-03-31 07:12:15.000000000 -0800
    42 +++ vim70/runtime/autoload/gzip.vim     2007-01-23 17:15:02.000000000 -0800
     42+++ vim70/runtime/autoload/gzip.vim     2007-02-15 21:22:25.000000000 -0800
    4343@@ -1,6 +1,6 @@
    4444 " Vim autoload file for editing compressed files.
     
    101101diff -Naur vim70.orig/runtime/autoload/paste.vim vim70/runtime/autoload/paste.vim
    102102--- vim70.orig/runtime/autoload/paste.vim       2006-04-21 11:31:01.000000000 -0700
    103 +++ vim70/runtime/autoload/paste.vim    2007-01-23 17:14:49.000000000 -0800
     103+++ vim70/runtime/autoload/paste.vim    2007-02-15 21:22:24.000000000 -0800
    104104@@ -1,6 +1,6 @@
    105105 " Vim support file to help with paste mappings and menus
     
    121121diff -Naur vim70.orig/runtime/autoload/spellfile.vim vim70/runtime/autoload/spellfile.vim
    122122--- vim70.orig/runtime/autoload/spellfile.vim   2006-02-01 04:12:24.000000000 -0800
    123 +++ vim70/runtime/autoload/spellfile.vim        2007-01-23 17:14:56.000000000 -0800
     123+++ vim70/runtime/autoload/spellfile.vim        2007-02-15 21:22:25.000000000 -0800
    124124@@ -1,9 +1,9 @@
    125125 " Vim script to download a missing spell file
     
    177177diff -Naur vim70.orig/runtime/doc/autocmd.txt vim70/runtime/doc/autocmd.txt
    178178--- vim70.orig/runtime/doc/autocmd.txt  2006-05-07 05:16:44.000000000 -0700
    179 +++ vim70/runtime/doc/autocmd.txt       2007-01-23 17:15:23.000000000 -0800
     179+++ vim70/runtime/doc/autocmd.txt       2007-02-15 21:22:27.000000000 -0800
    180180@@ -1,4 +1,4 @@
    181181-*autocmd.txt*   For Vim version 7.0.  Last change: 2006 May 06
     
    239239diff -Naur vim70.orig/runtime/doc/eval.txt vim70/runtime/doc/eval.txt
    240240--- vim70.orig/runtime/doc/eval.txt     2006-05-07 05:16:44.000000000 -0700
    241 +++ vim70/runtime/doc/eval.txt  2007-01-23 17:15:09.000000000 -0800
     241+++ vim70/runtime/doc/eval.txt  2007-02-15 21:22:27.000000000 -0800
    242242@@ -1,4 +1,4 @@
    243243-*eval.txt*      For Vim version 7.0.  Last change: 2006 May 06
     
    295295                user that a character has to be typed.
    296296                There is no mapping for the character.
    297 @@ -4434,6 +4462,21 @@
     297@@ -2869,12 +2897,14 @@
     298                        vcol    non-zero: "col" is visual column
     299                                zero: "col" is byte index
     300                        nr      error number
     301+                       pattern search pattern used to locate the error
     302                        text    description of the error
     303                        type    type of the error, 'E', '1', etc.
     304                        valid   non-zero: recognized error message
     305 
     306                When there is no error list or it's empty an empty list is
     307-               returned.
     308+               returned. Quickfix list entries with non-existing buffer
     309+               number are returned with "bufnr" set to zero.
     310 
     311                Useful application: Find pattern matches in multiple files and
     312                do something with them: >
     313@@ -4343,7 +4373,10 @@
     314                Non-dictionary items in {list} are ignored.  Each dictionary
     315                item can contain the following entries:
     316 
     317-                   filename    name of a file
     318+                   bufnr       buffer number; must be the number of a valid
     319+                               buffer
     320+                   filename    name of a file; only used when "bufnr" is not
     321+                               present or it is invalid.
     322                    lnum        line number in the file
     323                    pattern     search pattern used to locate the error
     324                    col         column number
     325@@ -4356,11 +4389,13 @@
     326                The "col", "vcol", "nr", "type" and "text" entries are
     327                optional.  Either "lnum" or "pattern" entry can be used to
     328                locate a matching error line.
     329-               If the "filename" entry is not present or neither the "lnum"
     330-               or "pattern" entries are present, then the item will not be
     331-               handled as an error line.
     332+               If the "filename" and "bufnr" entries are not present or
     333+               neither the "lnum" or "pattern" entries are present, then the
     334+               item will not be handled as an error line.
     335                If both "pattern" and "lnum" are present then "pattern" will
     336                be used.
     337+               Note that the list is not exactly the same as what
     338+               |getqflist()| returns.
     339 
     340                If {action} is set to 'a', then the items from {list} are
     341                added to the existing quickfix list. If there is no existing
     342@@ -4434,6 +4469,21 @@
    298343                        :call setwinvar(1, "&list", 0)
    299344                        :call setwinvar(2, "myvar", "foobar")
     
    319364diff -Naur vim70.orig/runtime/doc/netbeans.txt vim70/runtime/doc/netbeans.txt
    320365--- vim70.orig/runtime/doc/netbeans.txt 2006-05-07 05:16:45.000000000 -0700
    321 +++ vim70/runtime/doc/netbeans.txt      2007-01-23 17:15:10.000000000 -0800
     366+++ vim70/runtime/doc/netbeans.txt      2007-02-15 21:22:26.000000000 -0800
    322367@@ -1,4 +1,4 @@
    323368-*netbeans.txt*  For Vim version 7.0.  Last change: 2006 Mar 09
     
    355400diff -Naur vim70.orig/runtime/menu.vim vim70/runtime/menu.vim
    356401--- vim70.orig/runtime/menu.vim 2006-04-17 06:47:28.000000000 -0700
    357 +++ vim70/runtime/menu.vim      2007-01-23 17:15:02.000000000 -0800
     402+++ vim70/runtime/menu.vim      2007-02-15 21:22:25.000000000 -0800
    358403@@ -2,7 +2,7 @@
    359404 " You can also use this as a start for your own set of menus.
     
    422467diff -Naur vim70.orig/runtime/plugin/matchparen.vim vim70/runtime/plugin/matchparen.vim
    423468--- vim70.orig/runtime/plugin/matchparen.vim    2006-04-27 06:31:26.000000000 -0700
    424 +++ vim70/runtime/plugin/matchparen.vim 2007-01-23 17:15:00.000000000 -0800
     469+++ vim70/runtime/plugin/matchparen.vim 2007-02-15 21:22:25.000000000 -0800
    425470@@ -1,6 +1,6 @@
    426471 " Vim plugin for showing matching parens
     
    465510diff -Naur vim70.orig/runtime/scripts.vim vim70/runtime/scripts.vim
    466511--- vim70.orig/runtime/scripts.vim      2006-03-28 11:30:49.000000000 -0800
    467 +++ vim70/runtime/scripts.vim   2007-01-23 17:14:51.000000000 -0800
     512+++ vim70/runtime/scripts.vim   2007-02-15 21:22:24.000000000 -0800
    468513@@ -1,7 +1,7 @@
    469514 " Vim support file to detect file types in scripts
     
    490535diff -Naur vim70.orig/runtime/tutor/Makefile vim70/runtime/tutor/Makefile
    491536--- vim70.orig/runtime/tutor/Makefile   2004-06-07 07:32:39.000000000 -0700
    492 +++ vim70/runtime/tutor/Makefile        2007-01-23 17:15:00.000000000 -0800
     537+++ vim70/runtime/tutor/Makefile        2007-02-15 21:22:25.000000000 -0800
    493538@@ -2,8 +2,13 @@
    494539 #
     
    524569diff -Naur vim70.orig/runtime/tutor/tutor.gr.utf-8 vim70/runtime/tutor/tutor.gr.utf-8
    525570--- vim70.orig/runtime/tutor/tutor.gr.utf-8     1969-12-31 16:00:00.000000000 -0800
    526 +++ vim70/runtime/tutor/tutor.gr.utf-8  2007-01-23 17:15:00.000000000 -0800
     571+++ vim70/runtime/tutor/tutor.gr.utf-8  2007-02-15 21:22:25.000000000 -0800
    527572@@ -0,0 +1,815 @@
    528573+===============================================================================
     
    15571602diff -Naur vim70.orig/runtime/tutor/tutor.ru.utf-8 vim70/runtime/tutor/tutor.ru.utf-8
    15581603--- vim70.orig/runtime/tutor/tutor.ru.utf-8     1969-12-31 16:00:00.000000000 -0800
    1559 +++ vim70/runtime/tutor/tutor.ru.utf-8  2007-01-23 17:14:56.000000000 -0800
     1604+++ vim70/runtime/tutor/tutor.ru.utf-8  2007-02-15 21:22:25.000000000 -0800
    15601605@@ -0,0 +1,834 @@
    15611606+===============================================================================
     
    24782523diff -Naur vim70.orig/runtime/tutor/tutor.vim vim70/runtime/tutor/tutor.vim
    24792524--- vim70.orig/runtime/tutor/tutor.vim  2006-03-18 12:20:36.000000000 -0800
    2480 +++ vim70/runtime/tutor/tutor.vim       2007-01-23 17:15:00.000000000 -0800
     2525+++ vim70/runtime/tutor/tutor.vim       2007-02-15 21:22:25.000000000 -0800
    24812526@@ -1,6 +1,6 @@
    24822527 " Vim tutor support file
     
    25282573 
    25292574 " Somehow ".ge" (Germany) is sometimes used for ".de" (Deutsch).
     2575diff -Naur vim70.orig/src/Makefile vim70/src/Makefile
     2576--- vim70.orig/src/Makefile     2006-05-07 06:25:27.000000000 -0700
     2577+++ vim70/src/Makefile  2007-02-15 21:22:25.000000000 -0800
     2578@@ -2177,6 +2177,7 @@
     2579        cd $(SHADOWDIR)/xxd; ln -s ../../xxd/*.[ch] ../../xxd/Make* .
     2580        if test -d $(RSRC_DIR); then \
     2581                cd $(SHADOWDIR); \
     2582+               ln -s ../infplist.xml .; \
     2583                ln -s ../$(RSRC_DIR) ../os_mac.rsr.hqx ../dehqx.py .; \
     2584        fi
     2585        mkdir $(SHADOWDIR)/testdir
     2586@@ -2260,7 +2261,7 @@
     2587 auto/osdef.h: auto/config.h osdef.sh osdef1.h.in osdef2.h.in
     2588        CC="$(CC) $(OSDEF_CFLAGS)" srcdir=$(srcdir) sh $(srcdir)/osdef.sh
     2589 
     2590-QUOTESED = sed -e 's/"/\\"/g' -e 's/\\"/"/' -e 's/\\";$$/";/'
     2591+QUOTESED = sed -e 's/[\\"]/\\&/g' -e 's/\\"/"/' -e 's/\\";$$/";/'
     2592 auto/pathdef.c: Makefile auto/config.mk
     2593        -@echo creating $@
     2594        -@echo '/* pathdef.c */' > $@
    25302595diff -Naur vim70.orig/src/auto/configure vim70/src/auto/configure
    25312596--- vim70.orig/src/auto/configure       2006-05-04 03:46:19.000000000 -0700
    2532 +++ vim70/src/auto/configure    2007-01-23 17:15:06.000000000 -0800
     2597+++ vim70/src/auto/configure    2007-02-15 21:22:26.000000000 -0800
    25332598@@ -4014,7 +4014,7 @@
    25342599       LDFLAGS=$ldflags_save
     
    25712636diff -Naur vim70.orig/src/buffer.c vim70/src/buffer.c
    25722637--- vim70.orig/src/buffer.c     2006-04-26 14:37:23.000000000 -0700
    2573 +++ vim70/src/buffer.c  2007-01-23 17:15:10.000000000 -0800
     2638+++ vim70/src/buffer.c  2007-02-15 21:22:26.000000000 -0800
    25742639@@ -434,12 +434,8 @@
    25752640     if (usingNetbeans)
     
    27222787diff -Naur vim70.orig/src/configure vim70/src/configure
    27232788--- vim70.orig/src/configure    2006-05-07 07:17:49.000000000 -0700
    2724 +++ vim70/src/configure 2007-01-23 17:14:51.000000000 -0800
     2789+++ vim70/src/configure 2007-02-15 21:22:24.000000000 -0800
    27252790@@ -2,5 +2,9 @@
    27262791 # run the automatically generated configure script
     
    27352800diff -Naur vim70.orig/src/configure.in vim70/src/configure.in
    27362801--- vim70.orig/src/configure.in 2006-05-04 03:46:11.000000000 -0700
    2737 +++ vim70/src/configure.in      2007-01-23 17:15:06.000000000 -0800
     2802+++ vim70/src/configure.in      2007-02-15 21:22:26.000000000 -0800
    27382803@@ -508,7 +508,8 @@
    27392804       LDFLAGS=$ldflags_save
     
    27782843diff -Naur vim70.orig/src/edit.c vim70/src/edit.c
    27792844--- vim70.orig/src/edit.c       2006-05-07 04:48:51.000000000 -0700
    2780 +++ vim70/src/edit.c    2007-01-23 17:15:10.000000000 -0800
     2845+++ vim70/src/edit.c    2007-02-15 21:22:27.000000000 -0800
    27812846@@ -129,7 +129,7 @@
    27822847 
     
    33273392            vim_free(compl_pattern);
    33283393            compl_pattern = NULL;
    3329 @@ -5227,8 +5336,16 @@
     3394@@ -4861,16 +4970,18 @@
     3395             * just a safety check. */
     3396            if (compl_curr_match->cp_number != -1)
     3397            {
     3398-               /* Space for 10 text chars. + 2x10-digit no.s */
     3399-               static char_u match_ref[31];
     3400+               /* Space for 10 text chars. + 2x10-digit no.s = 31.
     3401+                * Translations may need more than twice that. */
     3402+               static char_u match_ref[81];
     3403 
     3404                if (compl_matches > 0)
     3405-                   sprintf((char *)IObuff, _("match %d of %d"),
     3406+                   vim_snprintf((char *)match_ref, sizeof(match_ref),
     3407+                               _("match %d of %d"),
     3408                                compl_curr_match->cp_number, compl_matches);
     3409                else
     3410-                   sprintf((char *)IObuff, _("match %d"),
     3411-                                                compl_curr_match->cp_number);
     3412-               vim_strncpy(match_ref, IObuff, 30);
     3413+                   vim_snprintf((char *)match_ref, sizeof(match_ref),
     3414+                               _("match %d"),
     3415+                               compl_curr_match->cp_number);
     3416                edit_submode_extra = match_ref;
     3417                edit_submode_highl = HLF_R;
     3418                if (dollar_vcol)
     3419@@ -5227,8 +5338,16 @@
    33303420        /* Format with 'formatexpr' when it's set.  Use internal formatting
    33313421         * when 'formatexpr' isn't set or it returns non-zero. */
     
    33463436            internal_format(textwidth, second_indent, flags, c == NUL);
    33473437     }
    3348 @@ -8508,7 +8625,12 @@
     3438@@ -8508,7 +8627,12 @@
    33493439     tpos = curwin->w_cursor;
    33503440     if (oneleft() == OK)
     
    33603450        /* If exit reversed string, position is fixed */
    33613451        if (revins_scol != -1 && (int)curwin->w_cursor.col >= revins_scol)
    3362 @@ -8700,7 +8822,11 @@
     3452@@ -8700,7 +8824,11 @@
    33633453     if (mod_mask & MOD_MASK_CTRL)
    33643454     {
     
    33733463     }
    33743464 #endif
    3375 @@ -8759,7 +8885,11 @@
     3465@@ -8759,7 +8887,11 @@
    33763466     if (mod_mask & MOD_MASK_CTRL)
    33773467     {
     
    33863476     }
    33873477 #endif
    3388 @@ -9074,6 +9204,10 @@
     3478@@ -9074,6 +9206,10 @@
    33893479 #ifdef FEAT_CINDENT
    33903480     can_cindent = TRUE;
     
    33993489diff -Naur vim70.orig/src/eval.c vim70/src/eval.c
    34003490--- vim70.orig/src/eval.c       2006-05-05 10:15:26.000000000 -0700
    3401 +++ vim70/src/eval.c    2007-01-23 17:15:12.000000000 -0800
     3491+++ vim70/src/eval.c    2007-02-15 21:22:27.000000000 -0800
    34023492@@ -166,7 +166,6 @@
    34033493     int                uf_tm_count;    /* nr of calls */
     
    44214511            smsg((char_u *)_("%s returning %s"), sourcing_name, buf);
    44224512            vim_free(tofree);
    4423 diff -Naur vim70.orig/src/ex_cmds2.c vim70/src/ex_cmds2.c
    4424 --- vim70.orig/src/ex_cmds2.c   2006-04-17 03:19:07.000000000 -0700
    4425 +++ vim70/src/ex_cmds2.c        2007-01-23 17:15:23.000000000 -0800
    4426 @@ -2811,6 +2811,17 @@
    4427      }
    4428  
    4429  #ifdef FEAT_AUTOCMD
    4430 +    /* Apply SourceCmd autocommands, they should get the file and source it. */
    4431 +    if (has_autocmd(EVENT_SOURCECMD, fname_exp, NULL)
    4432 +           && apply_autocmds(EVENT_SOURCECMD, fname_exp, fname_exp,
    4433 +                                                              FALSE, curbuf))
    4434 +# ifdef FEAT_EVAL
    4435 +       return aborting() ? FAIL : OK;
    4436 +# else
    4437 +       return OK;
    4438 +# endif
    4439 +
    4440 +    /* Apply SourcePre autocommands, they may get the file. */
    4441      apply_autocmds(EVENT_SOURCEPRE, fname_exp, fname_exp, FALSE, curbuf);
    4442  #endif
    4443  
    4444 @@ -3648,13 +3659,13 @@
    4445   * Return FALSE when not sourcing a file.
    4446   */
    4447      int
    4448 -source_finished(getline, cookie)
    4449 -    char_u     *(*getline) __ARGS((int, void *, int));
    4450 +source_finished(fgetline, cookie)
    4451 +    char_u     *(*fgetline) __ARGS((int, void *, int));
    4452      void       *cookie;
    4453  {
    4454 -    return (getline_equal(getline, cookie, getsourceline)
    4455 +    return (getline_equal(fgetline, cookie, getsourceline)
    4456             && ((struct source_cookie *)getline_cookie(
    4457 -                                                getline, cookie))->finished);
    4458 +                                               fgetline, cookie))->finished);
    4459  }
    4460  #endif
    4461  
    44624513diff -Naur vim70.orig/src/ex_cmds.c vim70/src/ex_cmds.c
    44634514--- vim70.orig/src/ex_cmds.c    2006-04-22 11:56:56.000000000 -0700
    4464 +++ vim70/src/ex_cmds.c 2007-01-23 17:14:59.000000000 -0800
     4515+++ vim70/src/ex_cmds.c 2007-02-15 21:22:27.000000000 -0800
    44654516@@ -95,7 +95,10 @@
    44664517                _("<%s>%s%s  %d,  Hex %02x,  Octal %03o"),
     
    45714622 #if defined(FEAT_SUN_WORKSHOP) || defined(FEAT_NETBEANS_INTG)
    45724623     if (gui.in_use && curbuf->b_ffname != NULL)
     4624@@ -6960,6 +6967,14 @@
     4625      */
     4626     set_arglist(eap->arg);
     4627 
     4628+    /*
     4629+     * Expanding wildcards may result in an empty argument list.  E.g. when
     4630+     * editing "foo.pyc" and ".pyc" is in 'wildignore'.  Assume that we
     4631+     * already did an error message for this.
     4632+     */
     4633+    if (ARGCOUNT == 0)
     4634+       return;
     4635+
     4636 # ifdef FEAT_WINDOWS
     4637     if (cmdmod.tab)
     4638     {
    45734639diff -Naur vim70.orig/src/ex_cmds.h vim70/src/ex_cmds.h
    45744640--- vim70.orig/src/ex_cmds.h    2006-04-07 02:44:46.000000000 -0700
    4575 +++ vim70/src/ex_cmds.h 2007-01-23 17:14:49.000000000 -0800
     4641+++ vim70/src/ex_cmds.h 2007-02-15 21:22:24.000000000 -0800
    45764642@@ -262,7 +262,7 @@
    45774643 EX(CMD_comclear,       "comclear",     ex_comclear,
     
    45834649                        TRLBAR|SBOXOK|CMDWIN),
    45844650 EX(CMD_confirm,                "confirm",      ex_wrongmodifier,
     4651diff -Naur vim70.orig/src/ex_cmds2.c vim70/src/ex_cmds2.c
     4652--- vim70.orig/src/ex_cmds2.c   2006-04-17 03:19:07.000000000 -0700
     4653+++ vim70/src/ex_cmds2.c        2007-02-15 21:22:27.000000000 -0800
     4654@@ -1242,14 +1242,22 @@
     4655     buf_T      *buf;
     4656     int                forceit;
     4657 {
     4658+    int                r;
     4659+
     4660     if (!(p_aw || p_awa) || !p_write
     4661 #ifdef FEAT_QUICKFIX
     4662-       /* never autowrite a "nofile" or "nowrite" buffer */
     4663-       || bt_dontwrite(buf)
     4664+           /* never autowrite a "nofile" or "nowrite" buffer */
     4665+           || bt_dontwrite(buf)
     4666 #endif
     4667-       || (!forceit && buf->b_p_ro) || buf->b_ffname == NULL)
     4668+           || (!forceit && buf->b_p_ro) || buf->b_ffname == NULL)
     4669        return FAIL;
     4670-    return buf_write_all(buf, forceit);
     4671+    r = buf_write_all(buf, forceit);
     4672+
     4673+    /* Writing may succeed but the buffer still changed, e.g., when there is a
     4674+     * conversion error.  We do want to return FAIL then. */
     4675+    if (buf_valid(buf) && bufIsChanged(buf))
     4676+       r = FAIL;
     4677+    return r;
     4678 }
     4679 
     4680 /*
     4681@@ -1472,6 +1480,8 @@
     4682        if (buf == NULL)    /* No buffers changed */
     4683            return FALSE;
     4684 
     4685+       /* Try auto-writing the buffer.  If this fails but the buffer no
     4686+        * longer exists it's not changed, that's OK. */
     4687        if (check_changed(buf, p_awa, TRUE, FALSE, TRUE) && buf_valid(buf))
     4688            break;          /* didn't save - still changes */
     4689     }
     4690@@ -2811,6 +2821,17 @@
     4691     }
     4692 
     4693 #ifdef FEAT_AUTOCMD
     4694+    /* Apply SourceCmd autocommands, they should get the file and source it. */
     4695+    if (has_autocmd(EVENT_SOURCECMD, fname_exp, NULL)
     4696+           && apply_autocmds(EVENT_SOURCECMD, fname_exp, fname_exp,
     4697+                                                              FALSE, curbuf))
     4698+# ifdef FEAT_EVAL
     4699+       return aborting() ? FAIL : OK;
     4700+# else
     4701+       return OK;
     4702+# endif
     4703+
     4704+    /* Apply SourcePre autocommands, they may get the file. */
     4705     apply_autocmds(EVENT_SOURCEPRE, fname_exp, fname_exp, FALSE, curbuf);
     4706 #endif
     4707 
     4708@@ -3648,13 +3669,13 @@
     4709  * Return FALSE when not sourcing a file.
     4710  */
     4711     int
     4712-source_finished(getline, cookie)
     4713-    char_u     *(*getline) __ARGS((int, void *, int));
     4714+source_finished(fgetline, cookie)
     4715+    char_u     *(*fgetline) __ARGS((int, void *, int));
     4716     void       *cookie;
     4717 {
     4718-    return (getline_equal(getline, cookie, getsourceline)
     4719+    return (getline_equal(fgetline, cookie, getsourceline)
     4720            && ((struct source_cookie *)getline_cookie(
     4721-                                                getline, cookie))->finished);
     4722+                                               fgetline, cookie))->finished);
     4723 }
     4724 #endif
     4725 
    45854726diff -Naur vim70.orig/src/ex_docmd.c vim70/src/ex_docmd.c
    45864727--- vim70.orig/src/ex_docmd.c   2006-05-05 09:33:19.000000000 -0700
    4587 +++ vim70/src/ex_docmd.c        2007-01-23 17:15:11.000000000 -0800
     4728+++ vim70/src/ex_docmd.c        2007-02-15 21:22:27.000000000 -0800
    45884729@@ -58,9 +58,9 @@
    45894730 #endif
     
    50485189diff -Naur vim70.orig/src/ex_eval.c vim70/src/ex_eval.c
    50495190--- vim70.orig/src/ex_eval.c    2006-04-22 12:22:27.000000000 -0700
    5050 +++ vim70/src/ex_eval.c 2007-01-23 17:15:11.000000000 -0800
     5191+++ vim70/src/ex_eval.c 2007-02-15 21:22:26.000000000 -0800
    50515192@@ -340,7 +340,7 @@
    50525193 
     
    50745215diff -Naur vim70.orig/src/ex_getln.c vim70/src/ex_getln.c
    50755216--- vim70.orig/src/ex_getln.c   2006-04-30 08:32:01.000000000 -0700
    5076 +++ vim70/src/ex_getln.c        2007-01-23 17:15:10.000000000 -0800
     5217+++ vim70/src/ex_getln.c        2007-02-15 21:22:26.000000000 -0800
    50775218@@ -34,7 +34,7 @@
    50785219     int                xp_context;     /* type of expansion */
     
    52245365diff -Naur vim70.orig/src/fileio.c vim70/src/fileio.c
    52255366--- vim70.orig/src/fileio.c     2006-04-30 08:28:57.000000000 -0700
    5226 +++ vim70/src/fileio.c  2007-01-23 17:15:23.000000000 -0800
     5367+++ vim70/src/fileio.c  2007-02-15 21:22:27.000000000 -0800
    52275368@@ -316,6 +316,9 @@
    52285369      * display the line. */
     
    53655506diff -Naur vim70.orig/src/fold.c vim70/src/fold.c
    53665507--- vim70.orig/src/fold.c       2006-04-22 12:35:56.000000000 -0700
    5367 +++ vim70/src/fold.c    2007-01-23 17:15:09.000000000 -0800
     5508+++ vim70/src/fold.c    2007-02-15 21:22:26.000000000 -0800
    53685509@@ -2971,7 +2971,11 @@
    53695510     else
     
    53805521diff -Naur vim70.orig/src/getchar.c vim70/src/getchar.c
    53815522--- vim70.orig/src/getchar.c    2006-05-03 10:29:21.000000000 -0700
    5382 +++ vim70/src/getchar.c 2007-01-23 17:15:12.000000000 -0800
     5523+++ vim70/src/getchar.c 2007-02-15 21:22:27.000000000 -0800
    53835524@@ -76,7 +76,7 @@
    53845525  */
     
    55155656diff -Naur vim70.orig/src/globals.h vim70/src/globals.h
    55165657--- vim70.orig/src/globals.h    2006-04-30 06:16:23.000000000 -0700
    5517 +++ vim70/src/globals.h 2007-01-23 17:15:05.000000000 -0800
     5658+++ vim70/src/globals.h 2007-02-15 21:22:27.000000000 -0800
    55185659@@ -166,6 +166,7 @@
    55195660 EXTERN int     emsg_off INIT(= 0);         /* don't display errors for now,
     
    55445685 
    55455686 #if defined(FEAT_EVAL) || defined(FEAT_SYN_HL)
    5546 @@ -1441,7 +1449,7 @@
     5687@@ -547,6 +555,10 @@
     5688 EXTERN buf_T   *lastbuf INIT(= NULL);  /* last buffer */
     5689 EXTERN buf_T   *curbuf INIT(= NULL);   /* currently active buffer */
     5690 
     5691+/* Flag that is set when switching off 'swapfile'.  It means that all blocks
     5692+ * are to be loaded into memory.  Shouldn't be global... */
     5693+EXTERN int     mf_dont_release INIT(= FALSE);  /* don't release blocks */
     5694+
     5695 /*
     5696  * List of files being edited (global argument list).  curwin->w_alist points
     5697  * to this when the window is using the global argument list.
     5698@@ -1441,7 +1453,7 @@
    55475699 EXTERN char_u e_readonly[]     INIT(= N_("E45: 'readonly' option is set (add ! to override)"));
    55485700 #ifdef FEAT_EVAL
     
    55535705 #ifdef FEAT_QUICKFIX
    55545706 EXTERN char_u e_readerrf[]     INIT(= N_("E47: Error while reading errorfile"));
    5555 diff -Naur vim70.orig/src/gui_at_fs.c vim70/src/gui_at_fs.c
    5556 --- vim70.orig/src/gui_at_fs.c  2005-07-09 04:30:17.000000000 -0700
    5557 +++ vim70/src/gui_at_fs.c       2007-01-23 17:14:47.000000000 -0800
    5558 @@ -1861,27 +1861,27 @@
    5559      XtPointer  pnew;
    5560  {
    5561      SFDir      *dir;
    5562 -    int                nw;
    5563 +    int                nw = (int)(long)pnew;
    5564  
    5565      dir = &(SFdirs[SFdirPtr + (int)(long)n]);
    5566  
    5567  #ifdef FEAT_GUI_NEXTAW
    5568 -    if ((int)(long)pnew < 0)
    5569 +    if (nw < 0)
    5570      {
    5571 -       if ((int)(long)pnew > -SFvScrollHeight)
    5572 -           (int)(long)pnew = -1;
    5573 +       if (nw > -SFvScrollHeight)
    5574 +           nw = -1;
    5575         else
    5576 -           (int)(long)pnew = -SFlistSize;
    5577 +           nw = -SFlistSize;
    5578      }
    5579 -    else if ((int)(long)pnew > 0)
    5580 +    else if (nw > 0)
    5581      {
    5582 -       if ((int)(long)pnew < SFvScrollHeight)
    5583 -           (int)(long)pnew = 1;
    5584 +       if (nw < SFvScrollHeight)
    5585 +           nw = 1;
    5586         else
    5587 -           (int)(long)pnew = SFlistSize;
    5588 +           nw = SFlistSize;
    5589      }
    5590  #endif
    5591 -    nw = dir->vOrigin + (int)(long)pnew;
    5592 +    nw += dir->vOrigin;
    5593  
    5594      if (nw > dir->nEntries - SFlistSize)
    5595         nw = dir->nEntries - SFlistSize;
    5596 @@ -1941,27 +1941,27 @@
    5597      XtPointer  pnew;
    5598  {
    5599      SFDir      *dir;
    5600 -    int                nw;
    5601 +    int                nw = (int)(long)pnew;
    5602  
    5603      dir = &(SFdirs[SFdirPtr + (int)(long)n]);
    5604  
    5605  #ifdef FEAT_GUI_NEXTAW
    5606 -    if ((int)(long)pnew < 0)
    5607 +    if (nw < 0)
    5608      {
    5609 -       if ((int)(long)pnew > -SFhScrollWidth)
    5610 -           (int)(long)pnew = -1;
    5611 +       if (nw > -SFhScrollWidth)
    5612 +           nw = -1;
    5613         else
    5614 -           (int)(long)pnew = -SFcharsPerEntry;
    5615 +           nw = -SFcharsPerEntry;
    5616      }
    5617 -    else if ((int)(long)pnew > 0)
    5618 +    else if (nw > 0)
    5619      {
    5620 -       if ((int)(long)pnew < SFhScrollWidth)
    5621 -           (int)(long)pnew = 1;
    5622 +       if (nw < SFhScrollWidth)
    5623 +           nw = 1;
    5624         else
    5625 -           (int)(long)pnew = SFcharsPerEntry;
    5626 +           nw = SFcharsPerEntry;
    5627      }
    5628  #endif
    5629 -    nw = dir->hOrigin + (int)(long)pnew;
    5630 +    nw += dir->hOrigin;
    5631  
    5632      if (nw > dir->nChars - SFcharsPerEntry)
    5633         nw = dir->nChars - SFcharsPerEntry;
    5634 @@ -2038,26 +2038,26 @@
    5635      XtPointer  client_data;
    5636      XtPointer  pnew;
    5637  {
    5638 -    int                nw;
    5639 +    int                nw = (int)(long)pnew;
    5640      float      f;
    5641  
    5642  #ifdef FEAT_GUI_NEXTAW
    5643 -    if ((int)(long)pnew < 0)
    5644 +    if (nw < 0)
    5645      {
    5646 -       if ((int)(long)pnew > -SFpathScrollWidth)
    5647 -           (int)(long)pnew = -1;
    5648 +       if (nw > -SFpathScrollWidth)
    5649 +           nw = -1;
    5650         else
    5651 -           (int)(long)pnew = -3;
    5652 +           nw = -3;
    5653      }
    5654 -    else if ((int)(long)pnew > 0)
    5655 +    else if (nw > 0)
    5656      {
    5657 -       if ((int)(long)pnew < SFpathScrollWidth)
    5658 -           (int)(long)pnew = 1;
    5659 +       if (nw < SFpathScrollWidth)
    5660 +           nw = 1;
    5661         else
    5662 -           (int)(long)pnew = 3;
    5663 +           nw = 3;
    5664      }
    5665  #endif
    5666 -    nw = SFdirPtr + (int)(long)pnew;
    5667 +    nw += SFdirPtr;
    5668  
    5669      if (nw > SFdirEnd - 3)
    5670         nw = SFdirEnd - 3;
    5671 diff -Naur vim70.orig/src/gui_beval.c vim70/src/gui_beval.c
    5672 --- vim70.orig/src/gui_beval.c  2006-05-04 12:29:51.000000000 -0700
    5673 +++ vim70/src/gui_beval.c       2007-01-23 17:14:55.000000000 -0800
    5674 @@ -926,7 +926,7 @@
    5675  #  define IS_NONPRINTABLE(c) (((c) < 0x20 && (c) != TAB && (c) != NL) \
    5676                               || (c) == DEL)
    5677      static void
    5678 -set_printable_label_text(GtkLabel *label, char_u *msg)
    5679 +set_printable_label_text(GtkLabel *label, char_u *text)
    5680  {
    5681      char_u         *convbuf = NULL;
    5682      char_u         *buf;
    5683 @@ -940,14 +940,14 @@
    5684      /* Convert to UTF-8 if it isn't already */
    5685      if (output_conv.vc_type != CONV_NONE)
    5686      {
    5687 -       convbuf = string_convert(&output_conv, msg, NULL);
    5688 +       convbuf = string_convert(&output_conv, text, NULL);
    5689         if (convbuf != NULL)
    5690 -           msg = convbuf;
    5691 +           text = convbuf;
    5692      }
    5693  
    5694      /* First let's see how much we need to allocate */
    5695      len = 0;
    5696 -    for (p = msg; *p != NUL; p += charlen)
    5697 +    for (p = text; *p != NUL; p += charlen)
    5698      {
    5699         if ((*p & 0x80) == 0)   /* be quick for ASCII */
    5700         {
    5701 @@ -992,7 +992,7 @@
    5702                                      (unsigned long)pixel, &color);
    5703  
    5704         pdest = buf;
    5705 -       p = msg;
    5706 +       p = text;
    5707         while (*p != NUL)
    5708         {
    5709             /* Be quick for ASCII */
    57105707diff -Naur vim70.orig/src/gui.c vim70/src/gui.c
    57115708--- vim70.orig/src/gui.c        2006-05-03 04:00:59.000000000 -0700
    5712 +++ vim70/src/gui.c     2007-01-23 17:15:05.000000000 -0800
     5709+++ vim70/src/gui.c     2007-02-15 21:22:26.000000000 -0800
    57135710@@ -187,9 +187,10 @@
    57145711 #endif
     
    58115808 /*
    58125809  * Update the current window and the screen.
     5810diff -Naur vim70.orig/src/gui_at_fs.c vim70/src/gui_at_fs.c
     5811--- vim70.orig/src/gui_at_fs.c  2005-07-09 04:30:17.000000000 -0700
     5812+++ vim70/src/gui_at_fs.c       2007-02-15 21:22:24.000000000 -0800
     5813@@ -1861,27 +1861,27 @@
     5814     XtPointer  pnew;
     5815 {
     5816     SFDir      *dir;
     5817-    int                nw;
     5818+    int                nw = (int)(long)pnew;
     5819 
     5820     dir = &(SFdirs[SFdirPtr + (int)(long)n]);
     5821 
     5822 #ifdef FEAT_GUI_NEXTAW
     5823-    if ((int)(long)pnew < 0)
     5824+    if (nw < 0)
     5825     {
     5826-       if ((int)(long)pnew > -SFvScrollHeight)
     5827-           (int)(long)pnew = -1;
     5828+       if (nw > -SFvScrollHeight)
     5829+           nw = -1;
     5830        else
     5831-           (int)(long)pnew = -SFlistSize;
     5832+           nw = -SFlistSize;
     5833     }
     5834-    else if ((int)(long)pnew > 0)
     5835+    else if (nw > 0)
     5836     {
     5837-       if ((int)(long)pnew < SFvScrollHeight)
     5838-           (int)(long)pnew = 1;
     5839+       if (nw < SFvScrollHeight)
     5840+           nw = 1;
     5841        else
     5842-           (int)(long)pnew = SFlistSize;
     5843+           nw = SFlistSize;
     5844     }
     5845 #endif
     5846-    nw = dir->vOrigin + (int)(long)pnew;
     5847+    nw += dir->vOrigin;
     5848 
     5849     if (nw > dir->nEntries - SFlistSize)
     5850        nw = dir->nEntries - SFlistSize;
     5851@@ -1941,27 +1941,27 @@
     5852     XtPointer  pnew;
     5853 {
     5854     SFDir      *dir;
     5855-    int                nw;
     5856+    int                nw = (int)(long)pnew;
     5857 
     5858     dir = &(SFdirs[SFdirPtr + (int)(long)n]);
     5859 
     5860 #ifdef FEAT_GUI_NEXTAW
     5861-    if ((int)(long)pnew < 0)
     5862+    if (nw < 0)
     5863     {
     5864-       if ((int)(long)pnew > -SFhScrollWidth)
     5865-           (int)(long)pnew = -1;
     5866+       if (nw > -SFhScrollWidth)
     5867+           nw = -1;
     5868        else
     5869-           (int)(long)pnew = -SFcharsPerEntry;
     5870+           nw = -SFcharsPerEntry;
     5871     }
     5872-    else if ((int)(long)pnew > 0)
     5873+    else if (nw > 0)
     5874     {
     5875-       if ((int)(long)pnew < SFhScrollWidth)
     5876-           (int)(long)pnew = 1;
     5877+       if (nw < SFhScrollWidth)
     5878+           nw = 1;
     5879        else
     5880-           (int)(long)pnew = SFcharsPerEntry;
     5881+           nw = SFcharsPerEntry;
     5882     }
     5883 #endif
     5884-    nw = dir->hOrigin + (int)(long)pnew;
     5885+    nw += dir->hOrigin;
     5886 
     5887     if (nw > dir->nChars - SFcharsPerEntry)
     5888        nw = dir->nChars - SFcharsPerEntry;
     5889@@ -2038,26 +2038,26 @@
     5890     XtPointer  client_data;
     5891     XtPointer  pnew;
     5892 {
     5893-    int                nw;
     5894+    int                nw = (int)(long)pnew;
     5895     float      f;
     5896 
     5897 #ifdef FEAT_GUI_NEXTAW
     5898-    if ((int)(long)pnew < 0)
     5899+    if (nw < 0)
     5900     {
     5901-       if ((int)(long)pnew > -SFpathScrollWidth)
     5902-           (int)(long)pnew = -1;
     5903+       if (nw > -SFpathScrollWidth)
     5904+           nw = -1;
     5905        else
     5906-           (int)(long)pnew = -3;
     5907+           nw = -3;
     5908     }
     5909-    else if ((int)(long)pnew > 0)
     5910+    else if (nw > 0)
     5911     {
     5912-       if ((int)(long)pnew < SFpathScrollWidth)
     5913-           (int)(long)pnew = 1;
     5914+       if (nw < SFpathScrollWidth)
     5915+           nw = 1;
     5916        else
     5917-           (int)(long)pnew = 3;
     5918+           nw = 3;
     5919     }
     5920 #endif
     5921-    nw = SFdirPtr + (int)(long)pnew;
     5922+    nw += SFdirPtr;
     5923 
     5924     if (nw > SFdirEnd - 3)
     5925        nw = SFdirEnd - 3;
     5926diff -Naur vim70.orig/src/gui_beval.c vim70/src/gui_beval.c
     5927--- vim70.orig/src/gui_beval.c  2006-05-04 12:29:51.000000000 -0700
     5928+++ vim70/src/gui_beval.c       2007-02-15 21:22:25.000000000 -0800
     5929@@ -926,7 +926,7 @@
     5930 #  define IS_NONPRINTABLE(c) (((c) < 0x20 && (c) != TAB && (c) != NL) \
     5931                              || (c) == DEL)
     5932     static void
     5933-set_printable_label_text(GtkLabel *label, char_u *msg)
     5934+set_printable_label_text(GtkLabel *label, char_u *text)
     5935 {
     5936     char_u         *convbuf = NULL;
     5937     char_u         *buf;
     5938@@ -940,14 +940,14 @@
     5939     /* Convert to UTF-8 if it isn't already */
     5940     if (output_conv.vc_type != CONV_NONE)
     5941     {
     5942-       convbuf = string_convert(&output_conv, msg, NULL);
     5943+       convbuf = string_convert(&output_conv, text, NULL);
     5944        if (convbuf != NULL)
     5945-           msg = convbuf;
     5946+           text = convbuf;
     5947     }
     5948 
     5949     /* First let's see how much we need to allocate */
     5950     len = 0;
     5951-    for (p = msg; *p != NUL; p += charlen)
     5952+    for (p = text; *p != NUL; p += charlen)
     5953     {
     5954        if ((*p & 0x80) == 0)   /* be quick for ASCII */
     5955        {
     5956@@ -992,7 +992,7 @@
     5957                                     (unsigned long)pixel, &color);
     5958 
     5959        pdest = buf;
     5960-       p = msg;
     5961+       p = text;
     5962        while (*p != NUL)
     5963        {
     5964            /* Be quick for ASCII */
    58135965diff -Naur vim70.orig/src/gui_gtk.c vim70/src/gui_gtk.c
    58145966--- vim70.orig/src/gui_gtk.c    2006-05-05 04:52:52.000000000 -0700
    5815 +++ vim70/src/gui_gtk.c 2007-01-23 17:15:08.000000000 -0800
     5967+++ vim70/src/gui_gtk.c 2007-02-15 21:22:26.000000000 -0800
    58165968@@ -957,15 +957,15 @@
    58175969 get_menu_position(vimmenu_T *menu)
     
    59116063diff -Naur vim70.orig/src/gui_gtk_x11.c vim70/src/gui_gtk_x11.c
    59126064--- vim70.orig/src/gui_gtk_x11.c        2006-05-04 23:58:59.000000000 -0700
    5913 +++ vim70/src/gui_gtk_x11.c     2007-01-23 17:14:55.000000000 -0800
     6065+++ vim70/src/gui_gtk_x11.c     2007-02-15 21:22:25.000000000 -0800
    59146066@@ -3233,12 +3233,12 @@
    59156067 on_select_tab(
     
    59766128diff -Naur vim70.orig/src/gui_xmebw.c vim70/src/gui_xmebw.c
    59776129--- vim70.orig/src/gui_xmebw.c  2006-04-30 08:32:32.000000000 -0700
    5978 +++ vim70/src/gui_xmebw.c       2007-01-23 17:15:08.000000000 -0800
     6130+++ vim70/src/gui_xmebw.c       2007-02-15 21:22:26.000000000 -0800
    59796131@@ -47,13 +47,13 @@
    59806132 #include "gui_xmebwp.h"
     
    61056257diff -Naur vim70.orig/src/hardcopy.c vim70/src/hardcopy.c
    61066258--- vim70.orig/src/hardcopy.c   2006-05-04 03:09:58.000000000 -0700
    6107 +++ vim70/src/hardcopy.c        2007-01-23 17:14:55.000000000 -0800
     6259+++ vim70/src/hardcopy.c        2007-02-15 21:22:25.000000000 -0800
    61086260@@ -1794,29 +1794,27 @@
    61096261     static int
     
    62086360diff -Naur vim70.orig/src/if_cscope.c vim70/src/if_cscope.c
    62096361--- vim70.orig/src/if_cscope.c  2006-04-18 01:54:15.000000000 -0700
    6210 +++ vim70/src/if_cscope.c       2007-01-23 17:15:15.000000000 -0800
     6362+++ vim70/src/if_cscope.c       2007-02-15 21:22:27.000000000 -0800
    62116363@@ -627,10 +627,11 @@
    62126364         * If the database is out of date, or there's some other problem,
     
    63386490diff -Naur vim70.orig/src/if_perl.xs vim70/src/if_perl.xs
    63396491--- vim70.orig/src/if_perl.xs   2006-03-06 10:57:16.000000000 -0800
    6340 +++ vim70/src/if_perl.xs        2007-01-23 17:14:52.000000000 -0800
     6492+++ vim70/src/if_perl.xs        2007-02-15 21:22:24.000000000 -0800
    63416493@@ -155,8 +155,8 @@
    63426494 static int (*perl_run)(PerlInterpreter*);
     
    64536605diff -Naur vim70.orig/src/if_python.c vim70/src/if_python.c
    64546606--- vim70.orig/src/if_python.c  2006-04-30 08:31:36.000000000 -0700
    6455 +++ vim70/src/if_python.c       2007-01-23 17:15:02.000000000 -0800
     6607+++ vim70/src/if_python.c       2007-02-15 21:22:25.000000000 -0800
    64566608@@ -1463,7 +1463,7 @@
    64576609     if (this->buf && this->buf != INVALID_BUFFER_VALUE)
     
    64926644diff -Naur vim70.orig/src/if_ruby.c vim70/src/if_ruby.c
    64936645--- vim70.orig/src/if_ruby.c    2006-04-30 08:37:52.000000000 -0700
    6494 +++ vim70/src/if_ruby.c 2007-01-23 17:14:52.000000000 -0800
     6646+++ vim70/src/if_ruby.c 2007-02-15 21:22:24.000000000 -0800
    64956647@@ -643,11 +643,14 @@
    64966648 
     
    66076759diff -Naur vim70.orig/src/macros.h vim70/src/macros.h
    66086760--- vim70.orig/src/macros.h     2006-03-01 04:01:10.000000000 -0800
    6609 +++ vim70/src/macros.h  2007-01-23 17:14:57.000000000 -0800
     6761+++ vim70/src/macros.h  2007-02-15 21:22:25.000000000 -0800
    66106762@@ -276,3 +276,9 @@
    66116763 # define MB_CHARLEN(p)         STRLEN(p)
     
    66206772diff -Naur vim70.orig/src/main.c vim70/src/main.c
    66216773--- vim70.orig/src/main.c       2006-05-03 10:36:44.000000000 -0700
    6622 +++ vim70/src/main.c    2007-01-23 17:15:10.000000000 -0800
     6774+++ vim70/src/main.c    2007-02-15 21:22:26.000000000 -0800
    66236775@@ -564,7 +564,11 @@
    66246776      */
     
    68126964                parmp->serverName_arg != NULL))
    68136965     {
    6814 diff -Naur vim70.orig/src/Makefile vim70/src/Makefile
    6815 --- vim70.orig/src/Makefile     2006-05-07 06:25:27.000000000 -0700
    6816 +++ vim70/src/Makefile  2007-01-23 17:14:56.000000000 -0800
    6817 @@ -2177,6 +2177,7 @@
    6818         cd $(SHADOWDIR)/xxd; ln -s ../../xxd/*.[ch] ../../xxd/Make* .
    6819         if test -d $(RSRC_DIR); then \
    6820                 cd $(SHADOWDIR); \
    6821 +               ln -s ../infplist.xml .; \
    6822                 ln -s ../$(RSRC_DIR) ../os_mac.rsr.hqx ../dehqx.py .; \
    6823         fi
    6824         mkdir $(SHADOWDIR)/testdir
    6825 @@ -2260,7 +2261,7 @@
    6826  auto/osdef.h: auto/config.h osdef.sh osdef1.h.in osdef2.h.in
    6827         CC="$(CC) $(OSDEF_CFLAGS)" srcdir=$(srcdir) sh $(srcdir)/osdef.sh
    6828  
    6829 -QUOTESED = sed -e 's/"/\\"/g' -e 's/\\"/"/' -e 's/\\";$$/";/'
    6830 +QUOTESED = sed -e 's/[\\"]/\\&/g' -e 's/\\"/"/' -e 's/\\";$$/";/'
    6831  auto/pathdef.c: Makefile auto/config.mk
    6832         -@echo creating $@
    6833         -@echo '/* pathdef.c */' > $@
    68346966diff -Naur vim70.orig/src/mbyte.c vim70/src/mbyte.c
    68356967--- vim70.orig/src/mbyte.c      2006-04-30 04:51:01.000000000 -0700
    6836 +++ vim70/src/mbyte.c   2007-01-23 17:15:12.000000000 -0800
     6968+++ vim70/src/mbyte.c   2007-02-15 21:22:27.000000000 -0800
    68376969@@ -311,7 +311,11 @@
    68386970 
     
    69317063diff -Naur vim70.orig/src/memfile.c vim70/src/memfile.c
    69327064--- vim70.orig/src/memfile.c    2006-03-06 00:59:15.000000000 -0800
    6933 +++ vim70/src/memfile.c 2007-01-23 17:15:10.000000000 -0800
    6934 @@ -517,7 +517,7 @@
     7065+++ vim70/src/memfile.c 2007-02-15 21:22:27.000000000 -0800
     7066@@ -76,7 +76,6 @@
     7067 #define MEMFILE_PAGE_SIZE 4096         /* default page size */
     7068 
     7069 static long_u  total_mem_used = 0;     /* total memory used for memfiles */
     7070-static int     dont_release = FALSE;   /* don't release blocks */
     7071 
     7072 static void mf_ins_hash __ARGS((memfile_T *, bhdr_T *));
     7073 static void mf_rem_hash __ARGS((memfile_T *, bhdr_T *));
     7074@@ -279,10 +278,10 @@
     7075     if (getlines)
     7076     {
     7077        /* get all blocks in memory by accessing all lines (clumsy!) */
     7078-       dont_release = TRUE;
     7079+       mf_dont_release = TRUE;
     7080        for (lnum = 1; lnum <= buf->b_ml.ml_line_count; ++lnum)
     7081            (void)ml_get_buf(buf, lnum, FALSE);
     7082-       dont_release = FALSE;
     7083+       mf_dont_release = FALSE;
     7084        /* TODO: should check if all blocks are really in core */
     7085     }
     7086 
     7087@@ -517,7 +516,7 @@
    69357088        mf_ins_free(mfp, hp);   /* put *hp in the free list */
    69367089 }
     
    69417094 extern unsigned long *__stdfiledes;
    69427095 
    6943 @@ -677,15 +677,19 @@
     7096@@ -677,15 +676,19 @@
    69447097 #  else
    69457098 #   if defined(_DCC) || defined(__GNUC__) || defined(__MORPHOS__)
     
    69627115 #   else /* assume Manx */
    69637116            Flush(_devtab[mfp->mf_fd].fd);
    6964 @@ -1024,12 +1028,12 @@
     7117@@ -826,7 +829,7 @@
     7118     buf_T      *buf;
     7119 
     7120     /* don't release while in mf_close_file() */
     7121-    if (dont_release)
     7122+    if (mf_dont_release)
     7123        return NULL;
     7124 
     7125     /*
     7126@@ -1024,12 +1027,12 @@
    69657127     size = page_size * hp->bh_page_count;
    69667128     if (lseek(mfp->mf_fd, offset, SEEK_SET) != offset)
     
    69777139     }
    69787140     return OK;
    6979 @@ -1081,7 +1085,7 @@
     7141@@ -1081,7 +1084,7 @@
    69807142        offset = (off_t)page_size * nr;
    69817143        if (lseek(mfp->mf_fd, offset, SEEK_SET) != offset)
     
    69887150diff -Naur vim70.orig/src/memline.c vim70/src/memline.c
    69897151--- vim70.orig/src/memline.c    2006-04-20 14:00:21.000000000 -0700
    6990 +++ vim70/src/memline.c 2007-01-23 17:15:12.000000000 -0800
     7152+++ vim70/src/memline.c 2007-02-15 21:22:27.000000000 -0800
    69917153@@ -215,7 +215,7 @@
    69927154 #define ML_FLUSH       0x02        /* flush locked block */
     
    70547216 
    70557217     /*
    7056 @@ -3652,6 +3660,7 @@
     7218@@ -2040,13 +2048,21 @@
     7219     linenr_T   lnum;
     7220     int                will_change;            /* line will be changed */
     7221 {
     7222-    bhdr_T    *hp;
     7223-    DATA_BL *dp;
     7224-    char_u  *ptr;
     7225+    bhdr_T     *hp;
     7226+    DATA_BL    *dp;
     7227+    char_u     *ptr;
     7228+    static int recursive = 0;
     7229 
     7230     if (lnum > buf->b_ml.ml_line_count)        /* invalid line number */
     7231     {
     7232-       EMSGN(_("E315: ml_get: invalid lnum: %ld"), lnum);
     7233+       if (recursive == 0)
     7234+       {
     7235+           /* Avoid giving this message for a recursive call, may happen when
     7236+            * the GUI redraws part of the text. */
     7237+           ++recursive;
     7238+           EMSGN(_("E315: ml_get: invalid lnum: %ld"), lnum);
     7239+           --recursive;
     7240+       }
     7241 errorret:
     7242        STRCPY(IObuff, "???");
     7243        return IObuff;
     7244@@ -2060,8 +2076,10 @@
     7245 /*
     7246  * See if it is the same line as requested last time.
     7247  * Otherwise may need to flush last used line.
     7248+ * Don't use the last used line when 'swapfile' is reset, need to load all
     7249+ * blocks.
     7250  */
     7251-    if (buf->b_ml.ml_line_lnum != lnum)
     7252+    if (buf->b_ml.ml_line_lnum != lnum || mf_dont_release)
     7253     {
     7254        ml_flush_line(buf);
     7255 
     7256@@ -2072,7 +2090,14 @@
     7257         */
     7258        if ((hp = ml_find_line(buf, lnum, ML_FIND)) == NULL)
     7259        {
     7260-           EMSGN(_("E316: ml_get: cannot find line %ld"), lnum);
     7261+           if (recursive == 0)
     7262+           {
     7263+               /* Avoid giving this message for a recursive call, may happen
     7264+                * when the GUI redraws part of the text. */
     7265+               ++recursive;
     7266+               EMSGN(_("E316: ml_get: cannot find line %ld"), lnum);
     7267+               --recursive;
     7268+           }
     7269            goto errorret;
     7270        }
     7271 
     7272@@ -3186,13 +3211,16 @@
     7273      * If not, flush and release the locked block.
     7274      * Don't do this for ML_INSERT_SAME, because the stack need to be updated.
     7275      * Don't do this for ML_FLUSH, because we want to flush the locked block.
     7276+     * Don't do this when 'swapfile' is reset, we want to load all the blocks.
     7277      */
     7278     if (buf->b_ml.ml_locked)
     7279     {
     7280-       if (ML_SIMPLE(action) && buf->b_ml.ml_locked_low <= lnum
     7281-                                         && buf->b_ml.ml_locked_high >= lnum)
     7282+       if (ML_SIMPLE(action)
     7283+               && buf->b_ml.ml_locked_low <= lnum
     7284+               && buf->b_ml.ml_locked_high >= lnum
     7285+               && !mf_dont_release)
     7286        {
     7287-               /* remember to update pointer blocks and stack later */
     7288+           /* remember to update pointer blocks and stack later */
     7289            if (action == ML_INSERT)
     7290            {
     7291                ++(buf->b_ml.ml_locked_lineadd);
     7292@@ -3652,6 +3680,7 @@
    70577293 {
    70587294     struct stat st;
     
    70627298     ++no_wait_return;
    70637299     (void)EMSG(_("E325: ATTENTION"));
    7064 @@ -3666,7 +3675,11 @@
     7300@@ -3666,7 +3695,11 @@
    70657301     {
    70667302        MSG_PUTS(_("             dated: "));
     
    70777313diff -Naur vim70.orig/src/menu.c vim70/src/menu.c
    70787314--- vim70.orig/src/menu.c       2006-05-03 10:30:48.000000000 -0700
    7079 +++ vim70/src/menu.c    2007-01-23 17:15:12.000000000 -0800
     7315+++ vim70/src/menu.c    2007-02-15 21:22:27.000000000 -0800
    70807316@@ -511,6 +511,14 @@
    70817317         * name (without mnemonic and accelerator text). */
     
    71637399diff -Naur vim70.orig/src/message.c vim70/src/message.c
    71647400--- vim70.orig/src/message.c    2006-05-06 13:07:37.000000000 -0700
    7165 +++ vim70/src/message.c 2007-01-23 17:15:17.000000000 -0800
     7401+++ vim70/src/message.c 2007-02-15 21:22:27.000000000 -0800
    71667402@@ -53,7 +53,6 @@
    71677403 static struct msg_hist *first_msg_hist = NULL;
     
    72537489diff -Naur vim70.orig/src/misc1.c vim70/src/misc1.c
    72547490--- vim70.orig/src/misc1.c      2006-04-30 08:30:02.000000000 -0700
    7255 +++ vim70/src/misc1.c   2007-01-23 17:15:07.000000000 -0800
     7491+++ vim70/src/misc1.c   2007-02-15 21:22:26.000000000 -0800
    72567492@@ -1761,15 +1761,13 @@
    72577493      * Add column offset for 'number', 'foldcolumn', etc.
     
    73687604diff -Naur vim70.orig/src/misc2.c vim70/src/misc2.c
    73697605--- vim70.orig/src/misc2.c      2006-05-04 05:12:38.000000000 -0700
    7370 +++ vim70/src/misc2.c   2007-01-23 17:15:02.000000000 -0800
     7606+++ vim70/src/misc2.c   2007-02-15 21:22:25.000000000 -0800
    73717607@@ -1229,6 +1229,94 @@
    73727608     return escaped_string;
     
    74667702diff -Naur vim70.orig/src/netbeans.c vim70/src/netbeans.c
    74677703--- vim70.orig/src/netbeans.c   2006-04-22 11:00:05.000000000 -0700
    7468 +++ vim70/src/netbeans.c        2007-01-23 17:15:10.000000000 -0800
     7704+++ vim70/src/netbeans.c        2007-02-15 21:22:26.000000000 -0800
    74697705@@ -61,7 +61,7 @@
    74707706 
     
    76757911diff -Naur vim70.orig/src/normal.c vim70/src/normal.c
    76767912--- vim70.orig/src/normal.c     2006-04-29 06:11:18.000000000 -0700
    7677 +++ vim70/src/normal.c  2007-01-23 17:15:12.000000000 -0800
     7913+++ vim70/src/normal.c  2007-02-15 21:22:27.000000000 -0800
    76787914@@ -651,9 +651,8 @@
    76797915        /* Fake a "c"hange command.  When "restart_edit" is set (e.g., because
     
    77748010diff -Naur vim70.orig/src/ops.c vim70/src/ops.c
    77758011--- vim70.orig/src/ops.c        2006-04-30 08:13:44.000000000 -0700
    7776 +++ vim70/src/ops.c     2007-01-23 17:15:10.000000000 -0800
     8012+++ vim70/src/ops.c     2007-02-15 21:22:26.000000000 -0800
    77778013@@ -95,8 +95,8 @@
    77788014 static void block_insert __ARGS((oparg_T *oap, char_u *s, int b_insert, struct block_def*bdp));
     
    79748210diff -Naur vim70.orig/src/option.c vim70/src/option.c
    79758211--- vim70.orig/src/option.c     2006-05-03 10:32:28.000000000 -0700
    7976 +++ vim70/src/option.c  2007-01-23 17:15:07.000000000 -0800
     8212+++ vim70/src/option.c  2007-02-15 21:22:26.000000000 -0800
    79778213@@ -2294,7 +2294,7 @@
    79788214                            {(char_u *)0L, (char_u *)0L}
     
    80908326diff -Naur vim70.orig/src/os_unix.c vim70/src/os_unix.c
    80918327--- vim70.orig/src/os_unix.c    2006-05-01 01:13:15.000000000 -0700
    8092 +++ vim70/src/os_unix.c 2007-01-23 17:14:55.000000000 -0800
     8328+++ vim70/src/os_unix.c 2007-02-15 21:22:25.000000000 -0800
    80938329@@ -3934,7 +3934,7 @@
    80948330                    {
     
    81498385diff -Naur vim70.orig/src/popupmnu.c vim70/src/popupmnu.c
    81508386--- vim70.orig/src/popupmnu.c   2006-04-20 13:18:37.000000000 -0700
    8151 +++ vim70/src/popupmnu.c        2007-01-23 17:14:53.000000000 -0800
     8387+++ vim70/src/popupmnu.c        2007-02-15 21:22:24.000000000 -0800
    81528388@@ -552,6 +552,9 @@
    81538389 {
     
    81628398diff -Naur vim70.orig/src/proto/buffer.pro vim70/src/proto/buffer.pro
    81638399--- vim70.orig/src/proto/buffer.pro     2006-05-07 06:08:29.000000000 -0700
    8164 +++ vim70/src/proto/buffer.pro  2007-01-23 17:14:57.000000000 -0800
     8400+++ vim70/src/proto/buffer.pro  2007-02-15 21:22:25.000000000 -0800
    81658401@@ -10,6 +10,7 @@
    81668402 extern int do_buffer __ARGS((int action, int start, int dir, int count, int forceit));
     
    81738409diff -Naur vim70.orig/src/proto/eval.pro vim70/src/proto/eval.pro
    81748410--- vim70.orig/src/proto/eval.pro       2006-05-07 06:08:33.000000000 -0700
    8175 +++ vim70/src/proto/eval.pro    2007-01-23 17:15:06.000000000 -0800
     8411+++ vim70/src/proto/eval.pro    2007-02-15 21:22:26.000000000 -0800
    81768412@@ -44,7 +44,7 @@
    81778413 extern char_u *get_user_var_name __ARGS((expand_T *xp, int idx));
     
    81858421diff -Naur vim70.orig/src/proto/menu.pro vim70/src/proto/menu.pro
    81868422--- vim70.orig/src/proto/menu.pro       2006-05-07 06:08:51.000000000 -0700
    8187 +++ vim70/src/proto/menu.pro    2007-01-23 17:14:53.000000000 -0800
     8423+++ vim70/src/proto/menu.pro    2007-02-15 21:22:24.000000000 -0800
    81888424@@ -10,6 +10,7 @@
    81898425 extern int menu_is_child_of_popup __ARGS((vimmenu_T *menu));
     
    81968432diff -Naur vim70.orig/src/proto/misc2.pro vim70/src/proto/misc2.pro
    81978433--- vim70.orig/src/proto/misc2.pro      2006-05-07 06:08:54.000000000 -0700
    8198 +++ vim70/src/proto/misc2.pro   2007-01-23 17:15:02.000000000 -0800
     8434+++ vim70/src/proto/misc2.pro   2007-02-15 21:22:25.000000000 -0800
    81998435@@ -29,6 +29,7 @@
    82008436 extern char_u *vim_strnsave __ARGS((char_u *string, int len));
     
    82078443diff -Naur vim70.orig/src/proto/ops.pro vim70/src/proto/ops.pro
    82088444--- vim70.orig/src/proto/ops.pro        2006-05-07 06:08:58.000000000 -0700
    8209 +++ vim70/src/proto/ops.pro     2007-01-23 17:15:10.000000000 -0800
     8445+++ vim70/src/proto/ops.pro     2007-02-15 21:22:26.000000000 -0800
    82108446@@ -17,10 +17,10 @@
    82118447 extern void put_register __ARGS((int name, void *reg));
     
    82238459diff -Naur vim70.orig/src/proto/undo.pro vim70/src/proto/undo.pro
    82248460--- vim70.orig/src/proto/undo.pro       2006-05-07 06:09:11.000000000 -0700
    8225 +++ vim70/src/proto/undo.pro    2007-01-23 17:14:49.000000000 -0800
     8461+++ vim70/src/proto/undo.pro    2007-02-15 21:22:24.000000000 -0800
    82268462@@ -4,6 +4,7 @@
    82278463 extern int u_savesub __ARGS((linenr_T lnum));
     
    82348470diff -Naur vim70.orig/src/quickfix.c vim70/src/quickfix.c
    82358471--- vim70.orig/src/quickfix.c   2006-05-03 00:47:42.000000000 -0700
    8236 +++ vim70/src/quickfix.c        2007-01-23 17:15:07.000000000 -0800
     8472+++ vim70/src/quickfix.c        2007-02-15 21:22:27.000000000 -0800
     8473@@ -106,7 +106,7 @@
     8474 
     8475 static int     qf_init_ext __ARGS((qf_info_T *qi, char_u *efile, buf_T *buf, typval_T *tv, char_u *errorformat, int newlist, linenr_T lnumfirst, linenr_T lnumlast));
     8476 static void    qf_new_list __ARGS((qf_info_T *qi));
     8477-static int     qf_add_entry __ARGS((qf_info_T *qi, qfline_T **prevp, char_u *dir, char_u *fname, char_u *mesg, long lnum, int col, int vis_col, char_u *pattern, int nr, int type, int valid));
     8478+static int     qf_add_entry __ARGS((qf_info_T *qi, qfline_T **prevp, char_u *dir, char_u *fname, int bufnum, char_u *mesg, long lnum, int col, int vis_col, char_u *pattern, int nr, int type, int valid));
     8479 static void    qf_msg __ARGS((qf_info_T *qi));
     8480 static void    qf_free __ARGS((qf_info_T *qi, int idx));
     8481 static char_u  *qf_types __ARGS((int, int));
    82378482@@ -500,8 +500,6 @@
    82388483        {
     
    83308575                    if (len > CMDBUFFSIZE - 5)
    83318576                        len = CMDBUFFSIZE - 5;
    8332 @@ -1554,10 +1586,30 @@
     8577@@ -759,6 +791,7 @@
     8578                        (*namebuf || directory)
     8579                            ? namebuf
     8580                            : ((currfile && valid) ? currfile : (char_u *)NULL),
     8581+                       0,
     8582                        errmsg,
     8583                        lnum,
     8584                        col,
     8585@@ -904,12 +937,13 @@
     8586  * Returns OK or FAIL.
     8587  */
     8588     static int
     8589-qf_add_entry(qi, prevp, dir, fname, mesg, lnum, col, vis_col, pattern, nr, type,
     8590-            valid)
     8591+qf_add_entry(qi, prevp, dir, fname, bufnum, mesg, lnum, col, vis_col, pattern,
     8592+            nr, type, valid)
     8593     qf_info_T  *qi;            /* quickfix list */
     8594     qfline_T   **prevp;        /* pointer to previously added entry or NULL */
     8595     char_u     *dir;           /* optional directory name */
     8596     char_u     *fname;         /* file name or NULL */
     8597+    int                bufnum;         /* buffer number or zero */
     8598     char_u     *mesg;          /* message */
     8599     long       lnum;           /* line number */
     8600     int                col;            /* column */
     8601@@ -923,7 +957,10 @@
     8602 
     8603     if ((qfp = (qfline_T *)alloc((unsigned)sizeof(qfline_T))) == NULL)
     8604        return FAIL;
     8605-    qfp->qf_fnum = qf_get_fnum(dir, fname);
     8606+    if (bufnum != 0)
     8607+       qfp->qf_fnum = bufnum;
     8608+    else
     8609+       qfp->qf_fnum = qf_get_fnum(dir, fname);
     8610     if ((qfp->qf_text = vim_strsave(mesg)) == NULL)
     8611     {
     8612        vim_free(qfp);
     8613@@ -1074,6 +1111,7 @@
     8614                if (qf_add_entry(to->w_llist, &prevp,
     8615                                 NULL,
     8616                                 NULL,
     8617+                                0,
     8618                                 from_qfp->qf_text,
     8619                                 from_qfp->qf_lnum,
     8620                                 from_qfp->qf_col,
     8621@@ -1554,10 +1592,30 @@
    83338622            }
    83348623 
     
    83388627+        * If no usable window is found and 'switchbuf' is set to 'usetab'
    83398628+        * then search in other tabs.
    8340          */
    8341 -       if (firstwin == lastwin || !usable_win)
     8629+        */
    83428630+       if (!usable_win && vim_strchr(p_swb, 'a') != NULL)
    83438631+       {
     
    83598647+        * If there is only one window and is the quickfix window, create a new
    83608648+        * one above the quickfix window.
    8361 +        */
     8649         */
     8650-       if (firstwin == lastwin || !usable_win)
    83628651+       if (((firstwin == lastwin) && bt_quickfix(curbuf)) || !usable_win)
    83638652        {
    83648653            ll_ref = curwin->w_llist_ref;
    83658654 
    8366 @@ -2429,32 +2481,19 @@
     8655@@ -2429,32 +2487,19 @@
    83678656     qf_info_T  *qi;
    83688657 {
     
    83978686        (void)qf_win_pos_update(qi, 0);
    83988687     }
    8399 @@ -2943,10 +2982,8 @@
     8688@@ -2943,10 +2988,8 @@
    84008689 #if defined(FEAT_AUTOCMD) && defined(FEAT_SYN_HL)
    84018690     char_u     *save_ei = NULL;
     
    84098698     int                flags = 0;
    84108699     colnr_T    col;
    8411 @@ -3167,24 +3204,13 @@
     8700@@ -3097,6 +3140,7 @@
     8701                    if (qf_add_entry(qi, &prevp,
     8702                                NULL,       /* dir */
     8703                                fnames[fi],
     8704+                               0,
     8705                                ml_get_buf(buf,
     8706                                     regmatch.startpos[0].lnum + lnum, FALSE),
     8707                                regmatch.startpos[0].lnum + lnum,
     8708@@ -3167,24 +3211,13 @@
    84128709                     * need to be done now, in that buffer.  And the modelines
    84138710                     * need to be done (again).  But not the window-local
     
    84348731            }
    84358732        }
    8436 @@ -3285,11 +3311,7 @@
     8733@@ -3285,11 +3318,7 @@
    84378734 {
    84388735     buf_T      *newbuf;
     
    84468743     /* Allocate a buffer without putting it in the buffer list. */
    84478744     newbuf = buflist_new(NULL, NULL, (linenr_T)1, BLN_DUMMY);
    8448 @@ -3299,13 +3321,8 @@
     8745@@ -3299,13 +3328,8 @@
    84498746     /* Init the options. */
    84508747     buf_copy_options(newbuf, BCO_ENTER | BCO_NOHELP);
     
    84608757     /* Need to set the filename for autocommands. */
    84618758     (void)setfname(curbuf, fname, NULL, FALSE);
    8462 @@ -3336,13 +3353,8 @@
     8759@@ -3336,13 +3360,8 @@
    84638760        }
    84648761     }
     
    84748771     if (!buf_valid(newbuf))
    84758772        return NULL;
    8476 @@ -3434,8 +3446,10 @@
     8773@@ -3407,6 +3426,7 @@
     8774     char_u     buf[2];
     8775     qfline_T   *qfp;
     8776     int                i;
     8777+    int                bufnum;
     8778 
     8779     if (wp != NULL)
     8780     {
     8781@@ -3422,6 +3442,11 @@
     8782     qfp = qi->qf_lists[qi->qf_curlist].qf_start;
     8783     for (i = 1; !got_int && i <= qi->qf_lists[qi->qf_curlist].qf_count; ++i)
     8784     {
     8785+       /* Handle entries with a non-existing buffer number. */
     8786+       bufnum = qfp->qf_fnum;
     8787+       if (bufnum != 0 && (buflist_findnr(bufnum) == NULL))
     8788+           bufnum = 0;
     8789+
     8790        if ((dict = dict_alloc()) == NULL)
     8791            return FAIL;
     8792        if (list_append_dict(list, dict) == FAIL)
     8793@@ -3429,13 +3454,15 @@
     8794 
     8795        buf[0] = qfp->qf_type;
     8796        buf[1] = NUL;
     8797-       if ( dict_add_nr_str(dict, "bufnr", (long)qfp->qf_fnum, NULL) == FAIL
     8798+       if ( dict_add_nr_str(dict, "bufnr", (long)bufnum, NULL) == FAIL
     8799          || dict_add_nr_str(dict, "lnum",  (long)qfp->qf_lnum, NULL) == FAIL
    84778800          || dict_add_nr_str(dict, "col",   (long)qfp->qf_col, NULL) == FAIL
    84788801          || dict_add_nr_str(dict, "vcol",  (long)qfp->qf_viscol, NULL) == FAIL
     
    84878810          || dict_add_nr_str(dict, "valid", (long)qfp->qf_valid, NULL) == FAIL)
    84888811            return FAIL;
     8812@@ -3458,6 +3485,7 @@
     8813     listitem_T *li;
     8814     dict_T     *d;
     8815     char_u     *filename, *pattern, *text, *type;
     8816+    int                bufnum;
     8817     long       lnum;
     8818     int                col, nr;
     8819     int                vcol;
     8820@@ -3465,6 +3493,7 @@
     8821     int                valid, status;
     8822     int                retval = OK;
     8823     qf_info_T  *qi = &ql_info;
     8824+    int                did_bufnr_emsg = FALSE;
     8825 
     8826     if (wp != NULL)
     8827     {
     8828@@ -3494,6 +3523,7 @@
     8829            continue;
     8830 
     8831        filename = get_dict_string(d, (char_u *)"filename", TRUE);
     8832+       bufnum = get_dict_number(d, (char_u *)"bufnr");
     8833        lnum = get_dict_number(d, (char_u *)"lnum");
     8834        col = get_dict_number(d, (char_u *)"col");
     8835        vcol = get_dict_number(d, (char_u *)"vcol");
     8836@@ -3505,12 +3535,26 @@
     8837            text = vim_strsave((char_u *)"");
     8838 
     8839        valid = TRUE;
     8840-       if (filename == NULL || (lnum == 0 && pattern == NULL))
     8841+       if ((filename == NULL && bufnum == 0) || (lnum == 0 && pattern == NULL))
     8842+           valid = FALSE;
     8843+
     8844+       /* Mark entries with non-existing buffer number as not valid. Give the
     8845+        * error message only once. */
     8846+       if (bufnum != 0 && (buflist_findnr(bufnum) == NULL))
     8847+       {
     8848+           if (!did_bufnr_emsg)
     8849+           {
     8850+               did_bufnr_emsg = TRUE;
     8851+               EMSGN(_("E92: Buffer %ld not found"), bufnum);
     8852+           }
     8853            valid = FALSE;
     8854+           bufnum = 0;
     8855+       }
     8856 
     8857        status =  qf_add_entry(qi, &prevp,
     8858                               NULL,        /* dir */
     8859                               filename,
     8860+                              bufnum,
     8861                               text,
     8862                               lnum,
     8863                               col,
     8864@@ -3743,6 +3787,7 @@
     8865                                if (qf_add_entry(qi, &prevp,
     8866                                            NULL,       /* dir */
     8867                                            fnames[fi],
     8868+                                           0,
     8869                                            IObuff,
     8870                                            lnum,
     8871                                            (int)(regmatch.startp[0] - IObuff)
    84898872diff -Naur vim70.orig/src/regexp.c vim70/src/regexp.c
    84908873--- vim70.orig/src/regexp.c     2006-04-30 08:31:50.000000000 -0700
    8491 +++ vim70/src/regexp.c  2007-01-23 17:15:07.000000000 -0800
     8874+++ vim70/src/regexp.c  2007-02-15 21:22:26.000000000 -0800
    84928875@@ -3777,8 +3777,8 @@
    84938876 
     
    86269009diff -Naur vim70.orig/src/screen.c vim70/src/screen.c
    86279010--- vim70.orig/src/screen.c     2006-05-05 03:13:55.000000000 -0700
    8628 +++ vim70/src/screen.c  2007-01-23 17:15:11.000000000 -0800
     9011+++ vim70/src/screen.c  2007-02-15 21:22:26.000000000 -0800
    86299012@@ -455,6 +455,7 @@
    86309013                    && curwin->w_topline == curwin->w_lines[0].wl_lnum)
     
    88109193diff -Naur vim70.orig/src/search.c vim70/src/search.c
    88119194--- vim70.orig/src/search.c     2006-05-05 05:12:13.000000000 -0700
    8812 +++ vim70/src/search.c  2007-01-23 17:15:26.000000000 -0800
     9195+++ vim70/src/search.c  2007-02-15 21:22:27.000000000 -0800
    88139196@@ -812,7 +812,11 @@
    88149197 #ifdef FEAT_MBYTE
     
    88809263diff -Naur vim70.orig/src/spell.c vim70/src/spell.c
    88819264--- vim70.orig/src/spell.c      2006-05-05 00:49:58.000000000 -0700
    8882 +++ vim70/src/spell.c   2007-01-23 17:15:01.000000000 -0800
     9265+++ vim70/src/spell.c   2007-02-15 21:22:25.000000000 -0800
    88839266@@ -1483,7 +1483,7 @@
    88849267            else if ((mode == FIND_COMPOUND || mode == FIND_KEEPCOMPOUND
     
    92119594diff -Naur vim70.orig/src/structs.h vim70/src/structs.h
    92129595--- vim70.orig/src/structs.h    2006-04-09 10:57:46.000000000 -0700
    9213 +++ vim70/src/structs.h 2007-01-23 17:14:52.000000000 -0800
     9596+++ vim70/src/structs.h 2007-02-15 21:22:24.000000000 -0800
    92149597@@ -2213,18 +2213,20 @@
    92159598 
     
    92379620diff -Naur vim70.orig/src/syntax.c vim70/src/syntax.c
    92389621--- vim70.orig/src/syntax.c     2006-04-26 05:49:45.000000000 -0700
    9239 +++ vim70/src/syntax.c  2007-01-23 17:15:09.000000000 -0800
     9622+++ vim70/src/syntax.c  2007-02-15 21:22:27.000000000 -0800
    92409623@@ -977,6 +977,7 @@
    92419624 {
     
    93279710 }
    93289711 
     9712@@ -3188,7 +3206,7 @@
     9713        curbuf->b_syn_spell = SYNSPL_TOP;
     9714     else if (STRNICMP(arg, "notoplevel", 10) == 0 && next - arg == 10)
     9715        curbuf->b_syn_spell = SYNSPL_NOTOP;
     9716-    else if (STRNICMP(arg, "default", 4) == 0 && next - arg == 4)
     9717+    else if (STRNICMP(arg, "default", 7) == 0 && next - arg == 7)
     9718        curbuf->b_syn_spell = SYNSPL_DEFAULT;
     9719     else
     9720        EMSG2(_("E390: Illegal argument: %s"), arg);
    93299721@@ -6054,7 +6072,11 @@
    93309722                ++level;
     
    93419733diff -Naur vim70.orig/src/tag.c vim70/src/tag.c
    93429734--- vim70.orig/src/tag.c        2006-04-27 06:11:21.000000000 -0700
    9343 +++ vim70/src/tag.c     2007-01-23 17:15:06.000000000 -0800
     9735+++ vim70/src/tag.c     2007-02-15 21:22:26.000000000 -0800
    93449736@@ -911,7 +911,7 @@
    93459737 
     
    93839775diff -Naur vim70.orig/src/term.c vim70/src/term.c
    93849776--- vim70.orig/src/term.c       2006-05-03 10:34:57.000000000 -0700
    9385 +++ vim70/src/term.c    2007-01-23 17:15:08.000000000 -0800
     9777+++ vim70/src/term.c    2007-02-15 21:22:26.000000000 -0800
    93869778@@ -3137,25 +3137,32 @@
    93879779            screenalloc(FALSE);
     
    94479839diff -Naur vim70.orig/src/testdir/test56.in vim70/src/testdir/test56.in
    94489840--- vim70.orig/src/testdir/test56.in    2005-05-18 08:37:37.000000000 -0700
    9449 +++ vim70/src/testdir/test56.in 2007-01-23 17:14:57.000000000 -0800
     9841+++ vim70/src/testdir/test56.in 2007-02-15 21:22:25.000000000 -0800
    94509842@@ -3,7 +3,7 @@
    94519843 STARTTEST
     
    94599851diff -Naur vim70.orig/src/ui.c vim70/src/ui.c
    94609852--- vim70.orig/src/ui.c 2006-03-27 11:15:09.000000000 -0800
    9461 +++ vim70/src/ui.c      2007-01-23 17:14:55.000000000 -0800
     9853+++ vim70/src/ui.c      2007-02-15 21:22:25.000000000 -0800
    94629854@@ -1137,7 +1137,6 @@
    94639855     int                len;
     
    94799871diff -Naur vim70.orig/src/undo.c vim70/src/undo.c
    94809872--- vim70.orig/src/undo.c       2006-04-21 02:30:59.000000000 -0700
    9481 +++ vim70/src/undo.c    2007-01-23 17:15:12.000000000 -0800
     9873+++ vim70/src/undo.c    2007-02-15 21:22:27.000000000 -0800
    94829874@@ -84,7 +84,6 @@
    94839875 static void u_unch_branch __ARGS((u_header_T *uhp));
     
    95829974diff -Naur vim70.orig/src/version.c vim70/src/version.c
    95839975--- vim70.orig/src/version.c    2006-05-03 00:50:42.000000000 -0700
    9584 +++ vim70/src/version.c 2007-01-23 17:15:26.000000000 -0800
    9585 @@ -667,6 +667,346 @@
     9976+++ vim70/src/version.c 2007-02-15 21:22:27.000000000 -0800
     9977@@ -667,6 +667,360 @@
    95869978 static int included_patches[] =
    95879979 {   /* Add new patch number below this line */
    95889980 /**/
     9981+    195,
     9982+/**/
     9983+    194,
     9984+/**/
     9985+    193,
     9986+/**/
     9987+    192,
     9988+/**/
     9989+    191,
     9990+/**/
     9991+    190,
     9992+/**/
     9993+    189,
     9994+/**/
    95899995+    188,
    95909996+/**/
     
    993010336 };
    993110337 
    9932 @@ -731,7 +1071,11 @@
     10338@@ -731,7 +1085,11 @@
    993310339     /* Only MS VC 4.1 and earlier can do Win32s */
    993410340     MSG_PUTS(_("\nMS-Windows 16/32 bit GUI version"));
     
    994410350diff -Naur vim70.orig/src/vim.h vim70/src/vim.h
    994510351--- vim70.orig/src/vim.h        2006-04-30 08:32:38.000000000 -0700
    9946 +++ vim70/src/vim.h     2007-01-23 17:15:23.000000000 -0800
     10352+++ vim70/src/vim.h     2007-02-15 21:22:27.000000000 -0800
    994710353@@ -585,7 +585,6 @@
    994810354 #define INSERT         0x10    /* Insert mode */
     
    1000210408diff -Naur vim70.orig/src/window.c vim70/src/window.c
    1000310409--- vim70.orig/src/window.c     2006-05-06 03:54:51.000000000 -0700
    10004 +++ vim70/src/window.c  2007-01-23 17:15:11.000000000 -0800
     10410+++ vim70/src/window.c  2007-02-15 21:22:26.000000000 -0800
    1000510411@@ -340,10 +340,10 @@
    1000610412                {
Note: See TracChangeset for help on using the changeset viewer.