Ignore:
Timestamp:
Jun 22, 2006, 12:06:02 AM (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:
cf4bffa
Parents:
0a461e0
Message:

Updated Vim 7.0 patch

File:
1 moved

Legend:

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

    r0a461e0 r4f46927  
    1 Submitted By: Jeremy Huntwork (jhuntwork at linuxfromscratch dot org)
    2 Date: 2006-05-25
     1Submitted By: Jim Gifford (jim at linuxfromscratch dot org)
     2Date: 2006-06-21
    33Initial Package Version: 7.0
    44Origin: Upstream
    55Upstream Status: Applied
    6 Description: Contains Patch 001-004 and 006-017 from Upstream
     6Description: Contains Patch 001-004 and 006-022 from Upstream
    77        005 is for the extras and Windows 32 only
    88
    9 diff -Naur vim70-orig/runtime/autoload/ccomplete.vim vim70/runtime/autoload/ccomplete.vim
    10 --- vim70-orig/runtime/autoload/ccomplete.vim   2006-05-03 10:35:56.000000000 -0400
    11 +++ vim70/runtime/autoload/ccomplete.vim        2006-05-25 09:13:10.000000000 -0400
     9diff -Naur vim70.orig/runtime/autoload/ccomplete.vim vim70/runtime/autoload/ccomplete.vim
     10--- vim70.orig/runtime/autoload/ccomplete.vim   2006-05-03 07:35:56.000000000 -0700
     11+++ vim70/runtime/autoload/ccomplete.vim        2006-06-21 23:50:50.000000000 -0700
    1212@@ -1,7 +1,7 @@
    1313 " Vim completion script
     
    2828     return []
    2929   endif
    30 diff -Naur vim70-orig/runtime/autoload/spellfile.vim vim70/runtime/autoload/spellfile.vim
    31 --- vim70-orig/runtime/autoload/spellfile.vim   2006-02-01 07:12:24.000000000 -0500
    32 +++ vim70/runtime/autoload/spellfile.vim        2006-05-25 09:13:12.000000000 -0400
     30diff -Naur vim70.orig/runtime/autoload/spellfile.vim vim70/runtime/autoload/spellfile.vim
     31--- vim70.orig/runtime/autoload/spellfile.vim   2006-02-01 04:12:24.000000000 -0800
     32+++ vim70/runtime/autoload/spellfile.vim        2006-06-21 23:50:50.000000000 -0700
    3333@@ -1,9 +1,9 @@
    3434 " Vim script to download a missing spell file
     
    7979+  exe 'Nread "' . machine . ' anonymous vim7user ' . dir . '/' . a:fname . '"'
    8080+endfunc
    81 diff -Naur vim70-orig/runtime/plugin/matchparen.vim vim70/runtime/plugin/matchparen.vim
    82 --- vim70-orig/runtime/plugin/matchparen.vim    2006-04-27 09:31:26.000000000 -0400
    83 +++ vim70/runtime/plugin/matchparen.vim 2006-05-25 09:13:12.000000000 -0400
     81diff -Naur vim70.orig/runtime/plugin/matchparen.vim vim70/runtime/plugin/matchparen.vim
     82--- vim70.orig/runtime/plugin/matchparen.vim    2006-04-27 06:31:26.000000000 -0700
     83+++ vim70/runtime/plugin/matchparen.vim 2006-06-21 23:50:50.000000000 -0700
    8484@@ -1,6 +1,6 @@
    8585 " Vim plugin for showing matching parens
     
    108108 
    109109   " If a match is found setup match highlighting.
    110 diff -Naur vim70-orig/src/edit.c vim70/src/edit.c
    111 --- vim70-orig/src/edit.c       2006-05-07 07:48:51.000000000 -0400
    112 +++ vim70/src/edit.c    2006-05-25 09:13:12.000000000 -0400
     110diff -Naur vim70.orig/src/edit.c vim70/src/edit.c
     111--- vim70.orig/src/edit.c       2006-05-07 04:48:51.000000000 -0700
     112+++ vim70/src/edit.c    2006-06-21 23:50:50.000000000 -0700
    113113@@ -751,7 +751,7 @@
    114114                    continue;
     
    201201 
    202202     if (allow_get_expansion && insert_match
    203 diff -Naur vim70-orig/src/eval.c vim70/src/eval.c
    204 --- vim70-orig/src/eval.c       2006-05-05 13:15:26.000000000 -0400
    205 +++ vim70/src/eval.c    2006-05-25 09:13:11.000000000 -0400
     203diff -Naur vim70.orig/src/eval.c vim70/src/eval.c
     204--- vim70.orig/src/eval.c       2006-05-05 10:15:26.000000000 -0700
     205+++ vim70/src/eval.c    2006-06-21 23:50:50.000000000 -0700
    206206@@ -11372,7 +11372,7 @@
    207207            if (argvars[2].v_type != VAR_UNKNOWN)
     
    223223            /* It's "s:" or "<SID>" */
    224224            if (current_SID <= 0)
    225 diff -Naur vim70-orig/src/ex_docmd.c vim70/src/ex_docmd.c
    226 --- vim70-orig/src/ex_docmd.c   2006-05-05 12:33:19.000000000 -0400
    227 +++ vim70/src/ex_docmd.c        2006-05-25 09:13:10.000000000 -0400
     225diff -Naur vim70.orig/src/ex_docmd.c vim70/src/ex_docmd.c
     226--- vim70.orig/src/ex_docmd.c   2006-05-05 09:33:19.000000000 -0700
     227+++ vim70/src/ex_docmd.c        2006-06-21 23:50:50.000000000 -0700
    228228@@ -833,7 +833,7 @@
    229229      * If requested, store and reset the global values controlling the
     
    235235 
    236236     initial_trylevel = trylevel;
    237 diff -Naur vim70-orig/src/gui_at_fs.c vim70/src/gui_at_fs.c
    238 --- vim70-orig/src/gui_at_fs.c  2005-07-09 07:30:17.000000000 -0400
    239 +++ vim70/src/gui_at_fs.c       2006-05-25 09:13:13.000000000 -0400
     237diff -Naur vim70.orig/src/gui_at_fs.c vim70/src/gui_at_fs.c
     238--- vim70.orig/src/gui_at_fs.c  2005-07-09 04:30:17.000000000 -0700
     239+++ vim70/src/gui_at_fs.c       2006-06-21 23:50:50.000000000 -0700
    240240@@ -1861,27 +1861,27 @@
    241241     XtPointer  pnew;
     
    351351     if (nw > SFdirEnd - 3)
    352352        nw = SFdirEnd - 3;
    353 diff -Naur vim70-orig/src/gui.c vim70/src/gui.c
    354 --- vim70-orig/src/gui.c        2006-05-03 07:00:59.000000000 -0400
    355 +++ vim70/src/gui.c     2006-05-25 09:13:10.000000000 -0400
     353diff -Naur vim70.orig/src/gui.c vim70/src/gui.c
     354--- vim70.orig/src/gui.c        2006-05-03 04:00:59.000000000 -0700
     355+++ vim70/src/gui.c     2006-06-21 23:52:38.000000000 -0700
     356@@ -4515,7 +4515,7 @@
     357     int                y;
     358 {
     359     win_T      *wp;
     360-    char_u     st[6];
     361+    char_u     st[8];
     362 
     363     /* Ignore this while still starting up. */
     364     if (!gui.in_use || gui.starting)
    356365@@ -4603,11 +4603,11 @@
    357366     /* Don't move the mouse when it's left or right of the Vim window */
     
    369378     if (wp != curwin && wp != NULL)    /* If in other than current window */
    370379     {
    371 diff -Naur vim70-orig/src/gui_xmebw.c vim70/src/gui_xmebw.c
    372 --- vim70-orig/src/gui_xmebw.c  2006-04-30 11:32:32.000000000 -0400
    373 +++ vim70/src/gui_xmebw.c       2006-05-25 09:13:13.000000000 -0400
     380diff -Naur vim70.orig/src/gui_xmebw.c vim70/src/gui_xmebw.c
     381--- vim70.orig/src/gui_xmebw.c  2006-04-30 08:32:32.000000000 -0700
     382+++ vim70/src/gui_xmebw.c       2006-06-21 23:50:50.000000000 -0700
    374383@@ -47,13 +47,13 @@
    375384 #include "gui_xmebwp.h"
     
    469478                 * Compute location of bounding box to contain the
    470479                 * defaultButtonShadow.
    471 diff -Naur vim70-orig/src/Makefile vim70/src/Makefile
    472 --- vim70-orig/src/Makefile     2006-05-07 09:25:27.000000000 -0400
    473 +++ vim70/src/Makefile  2006-05-25 09:13:11.000000000 -0400
     480diff -Naur vim70.orig/src/if_ruby.c vim70/src/if_ruby.c
     481--- vim70.orig/src/if_ruby.c    2006-04-30 08:37:52.000000000 -0700
     482+++ vim70/src/if_ruby.c 2006-06-21 23:56:28.000000000 -0700
     483@@ -643,11 +643,23 @@
     484 
     485 static VALUE set_buffer_line(buf_T *buf, linenr_T n, VALUE str)
     486 {
     487-    buf_T *savebuf = curbuf;
     488-    char *line = STR2CSTR(str);
     489+    char       *line = STR2CSTR(str);
     490+#ifdef FEAT_AUTOCMD
     491+    aco_save_T aco;
     492+#else
     493+    buf_T      *save_curbuf = curbuf;
     494+#endif
     495 
     496-    if (n > 0 && n <= buf->b_ml.ml_line_count && line != NULL) {
     497+    if (n > 0 && n <= buf->b_ml.ml_line_count && line != NULL)
     498+    {
     499+#ifdef FEAT_AUTOCMD
     500+       /* set curwin/curbuf for "buf" and save some things */
     501+       aucmd_prepbuf(&aco, buf);
     502+#else
     503        curbuf = buf;
     504+       curwin->w_buffer = buf;
     505+#endif
     506+
     507        if (u_savesub(n) == OK) {
     508            ml_replace(n, (char_u *)line, TRUE);
     509            changed();
     510@@ -655,10 +667,19 @@
     511            syn_changed(n); /* recompute syntax hl. for this line */
     512 #endif
     513        }
     514-       curbuf = savebuf;
     515+
     516+#ifdef FEAT_AUTOCMD
     517+       /* restore curwin/curbuf and a few other things */
     518+       aucmd_restbuf(&aco);
     519+       /* Careful: autocommands may have made "buf" invalid! */
     520+#else
     521+       curwin->w_buffer = save_curbuf;
     522+       curbuf = save_curbuf;
     523+#endif
     524        update_curbuf(NOT_VALID);
     525     }
     526-    else {
     527+    else
     528+    {
     529        rb_raise(rb_eIndexError, "index %d out of buffer", n);
     530        return Qnil; /* For stop warning */
     531     }
     532@@ -676,12 +697,24 @@
     533 
     534 static VALUE buffer_delete(VALUE self, VALUE num)
     535 {
     536-    buf_T *buf = get_buf(self);
     537-    buf_T *savebuf = curbuf;
     538-    long n = NUM2LONG(num);
     539+    buf_T      *buf = get_buf(self);
     540+    long       n = NUM2LONG(num);
     541+#ifdef FEAT_AUTOCMD
     542+    aco_save_T aco;
     543+#else
     544+    buf_T      *save_curbuf = curbuf;
     545+#endif
     546 
     547-    if (n > 0 && n <= buf->b_ml.ml_line_count) {
     548+    if (n > 0 && n <= buf->b_ml.ml_line_count)
     549+    {
     550+#ifdef FEAT_AUTOCMD
     551+       /* set curwin/curbuf for "buf" and save some things */
     552+       aucmd_prepbuf(&aco, buf);
     553+#else
     554        curbuf = buf;
     555+       curwin->w_buffer = buf;
     556+#endif
     557+
     558        if (u_savedel(n, 1) == OK) {
     559            ml_delete(n, 0);
     560 
     561@@ -691,10 +724,19 @@
     562 
     563            changed();
     564        }
     565-       curbuf = savebuf;
     566+
     567+#ifdef FEAT_AUTOCMD
     568+       /* restore curwin/curbuf and a few other things */
     569+       aucmd_restbuf(&aco);
     570+       /* Careful: autocommands may have made "buf" invalid! */
     571+#else
     572+       curwin->w_buffer = save_curbuf;
     573+       curbuf = save_curbuf;
     574+#endif
     575        update_curbuf(NOT_VALID);
     576     }
     577-    else {
     578+    else
     579+    {
     580        rb_raise(rb_eIndexError, "index %d out of buffer", n);
     581     }
     582     return Qnil;
     583@@ -702,13 +744,25 @@
     584 
     585 static VALUE buffer_append(VALUE self, VALUE num, VALUE str)
     586 {
     587-    buf_T *buf = get_buf(self);
     588-    buf_T *savebuf = curbuf;
     589-    char *line = STR2CSTR(str);
     590-    long n = NUM2LONG(num);
     591+    buf_T      *buf = get_buf(self);
     592+    char       *line = STR2CSTR(str);
     593+    long       n = NUM2LONG(num);
     594+#ifdef FEAT_AUTOCMD
     595+    aco_save_T aco;
     596+#else
     597+    buf_T      *save_curbuf = curbuf;
     598+#endif
     599 
     600-    if (n >= 0 && n <= buf->b_ml.ml_line_count && line != NULL) {
     601+    if (n >= 0 && n <= buf->b_ml.ml_line_count && line != NULL)
     602+    {
     603+#ifdef FEAT_AUTOCMD
     604+       /* set curwin/curbuf for "buf" and save some things */
     605+       aucmd_prepbuf(&aco, buf);
     606+#else
     607        curbuf = buf;
     608+       curwin->w_buffer = buf;
     609+#endif
     610+
     611        if (u_inssub(n + 1) == OK) {
     612            ml_append(n, (char_u *) line, (colnr_T) 0, FALSE);
     613 
     614@@ -718,7 +772,15 @@
     615 
     616            changed();
     617        }
     618-       curbuf = savebuf;
     619+
     620+#ifdef FEAT_AUTOCMD
     621+       /* restore curwin/curbuf and a few other things */
     622+       aucmd_restbuf(&aco);
     623+       /* Careful: autocommands may have made "buf" invalid! */
     624+#else
     625+       curwin->w_buffer = save_curbuf;
     626+       curbuf = save_curbuf;
     627+#endif
     628        update_curbuf(NOT_VALID);
     629     }
     630     else {
     631diff -Naur vim70.orig/src/main.c vim70/src/main.c
     632--- vim70.orig/src/main.c       2006-05-03 10:36:44.000000000 -0700
     633+++ vim70/src/main.c    2006-06-21 23:51:37.000000000 -0700
     634@@ -564,7 +564,11 @@
     635      */
     636     if (p_lpl)
     637     {
     638+# ifdef VMS    /* Somehow VMS doesn't handle the "**". */
     639+       source_runtime((char_u *)"plugin/*.vim", TRUE);
     640+# else
     641        source_runtime((char_u *)"plugin/**/*.vim", TRUE);
     642+# endif
     643        TIME_MSG("loading plugins");
     644     }
     645 #endif
     646diff -Naur vim70.orig/src/Makefile vim70/src/Makefile
     647--- vim70.orig/src/Makefile     2006-05-07 06:25:27.000000000 -0700
     648+++ vim70/src/Makefile  2006-06-21 23:50:50.000000000 -0700
    474649@@ -2177,6 +2177,7 @@
    475650        cd $(SHADOWDIR)/xxd; ln -s ../../xxd/*.[ch] ../../xxd/Make* .
     
    480655        fi
    481656        mkdir $(SHADOWDIR)/testdir
    482 diff -Naur vim70-orig/src/mbyte.c vim70/src/mbyte.c
    483 --- vim70-orig/src/mbyte.c      2006-04-30 07:51:01.000000000 -0400
    484 +++ vim70/src/mbyte.c   2006-05-25 09:13:13.000000000 -0400
     657diff -Naur vim70.orig/src/mbyte.c vim70/src/mbyte.c
     658--- vim70.orig/src/mbyte.c      2006-04-30 04:51:01.000000000 -0700
     659+++ vim70/src/mbyte.c   2006-06-21 23:50:50.000000000 -0700
    485660@@ -311,7 +311,11 @@
    486661 
     
    504679 };
    505680 
    506 diff -Naur vim70-orig/src/message.c vim70/src/message.c
    507 --- vim70-orig/src/message.c    2006-05-06 16:07:37.000000000 -0400
    508 +++ vim70/src/message.c 2006-05-25 09:13:11.000000000 -0400
     681diff -Naur vim70.orig/src/message.c vim70/src/message.c
     682--- vim70.orig/src/message.c    2006-05-06 13:07:37.000000000 -0700
     683+++ vim70/src/message.c 2006-06-21 23:50:50.000000000 -0700
    509684@@ -4175,15 +4175,16 @@
    510685                        str_arg_l = 0;
     
    530705                    }
    531706                    break;
    532 diff -Naur vim70-orig/src/option.c vim70/src/option.c
    533 --- vim70-orig/src/option.c     2006-05-03 13:32:28.000000000 -0400
    534 +++ vim70/src/option.c  2006-05-25 09:13:12.000000000 -0400
     707diff -Naur vim70.orig/src/ops.c vim70/src/ops.c
     708--- vim70.orig/src/ops.c        2006-04-30 08:13:44.000000000 -0700
     709+++ vim70/src/ops.c     2006-06-21 23:52:03.000000000 -0700
     710@@ -2413,6 +2413,7 @@
     711        else
     712        {
     713            curwin->w_cursor = oap->end;
     714+           check_cursor_col();
     715 
     716            /* Works just like an 'i'nsert on the next character. */
     717            if (!lineempty(curwin->w_cursor.lnum)
     718diff -Naur vim70.orig/src/option.c vim70/src/option.c
     719--- vim70.orig/src/option.c     2006-05-03 10:32:28.000000000 -0700
     720+++ vim70/src/option.c  2006-06-21 23:50:50.000000000 -0700
    535721@@ -2294,7 +2294,7 @@
    536722                            {(char_u *)0L, (char_u *)0L}
     
    558744            case PV_INDE:       return &curbuf->b_p_inde_flags;
    559745 # endif
    560 diff -Naur vim70-orig/src/spell.c vim70/src/spell.c
    561 --- vim70-orig/src/spell.c      2006-05-05 03:49:58.000000000 -0400
    562 +++ vim70/src/spell.c   2006-05-25 09:13:11.000000000 -0400
     746diff -Naur vim70.orig/src/quickfix.c vim70/src/quickfix.c
     747--- vim70.orig/src/quickfix.c   2006-05-03 00:47:42.000000000 -0700
     748+++ vim70/src/quickfix.c        2006-06-21 23:54:05.000000000 -0700
     749@@ -602,13 +602,19 @@
     750                else
     751                    type = 0;
     752                /*
     753-                * Extract error message data from matched line
     754+                * Extract error message data from matched line.
     755+                * We check for an actual submatch, because "\[" and "\]" in
     756+                * the 'errorformat' may cause the wrong submatch to be used.
     757                 */
     758                if ((i = (int)fmt_ptr->addr[0]) > 0)            /* %f */
     759                {
     760-                   int c = *regmatch.endp[i];
     761+                   int c;
     762+
     763+                   if (regmatch.startp[i] == NULL || regmatch.endp[i] == NULL)
     764+                       continue;
     765 
     766                    /* Expand ~/file and $HOME/file to full path. */
     767+                   c = *regmatch.endp[i];
     768                    *regmatch.endp[i] = NUL;
     769                    expand_env(regmatch.startp[i], namebuf, CMDBUFFSIZE);
     770                    *regmatch.endp[i] = c;
     771@@ -618,35 +624,63 @@
     772                        continue;
     773                }
     774                if ((i = (int)fmt_ptr->addr[1]) > 0)            /* %n */
     775+               {
     776+                   if (regmatch.startp[i] == NULL)
     777+                       continue;
     778                    enr = (int)atol((char *)regmatch.startp[i]);
     779+               }
     780                if ((i = (int)fmt_ptr->addr[2]) > 0)            /* %l */
     781+               {
     782+                   if (regmatch.startp[i] == NULL)
     783+                       continue;
     784                    lnum = atol((char *)regmatch.startp[i]);
     785+               }
     786                if ((i = (int)fmt_ptr->addr[3]) > 0)            /* %c */
     787+               {
     788+                   if (regmatch.startp[i] == NULL)
     789+                       continue;
     790                    col = (int)atol((char *)regmatch.startp[i]);
     791+               }
     792                if ((i = (int)fmt_ptr->addr[4]) > 0)            /* %t */
     793+               {
     794+                   if (regmatch.startp[i] == NULL)
     795+                       continue;
     796                    type = *regmatch.startp[i];
     797+               }
     798                if (fmt_ptr->flags == '+' && !multiscan)        /* %+ */
     799                    STRCPY(errmsg, IObuff);
     800                else if ((i = (int)fmt_ptr->addr[5]) > 0)       /* %m */
     801                {
     802+                   if (regmatch.startp[i] == NULL || regmatch.endp[i] == NULL)
     803+                       continue;
     804                    len = (int)(regmatch.endp[i] - regmatch.startp[i]);
     805                    vim_strncpy(errmsg, regmatch.startp[i], len);
     806                }
     807                if ((i = (int)fmt_ptr->addr[6]) > 0)            /* %r */
     808+               {
     809+                   if (regmatch.startp[i] == NULL)
     810+                       continue;
     811                    tail = regmatch.startp[i];
     812+               }
     813                if ((i = (int)fmt_ptr->addr[7]) > 0)            /* %p */
     814                {
     815+                   if (regmatch.startp[i] == NULL || regmatch.endp[i] == NULL)
     816+                       continue;
     817                    col = (int)(regmatch.endp[i] - regmatch.startp[i] + 1);
     818                    if (*((char_u *)regmatch.startp[i]) != TAB)
     819                        use_viscol = TRUE;
     820                }
     821                if ((i = (int)fmt_ptr->addr[8]) > 0)            /* %v */
     822                {
     823+                   if (regmatch.startp[i] == NULL)
     824+                       continue;
     825                    col = (int)atol((char *)regmatch.startp[i]);
     826                    use_viscol = TRUE;
     827                }
     828                if ((i = (int)fmt_ptr->addr[9]) > 0)            /* %s */
     829                {
     830+                   if (regmatch.startp[i] == NULL || regmatch.endp[i] == NULL)
     831+                       continue;
     832                    len = (int)(regmatch.endp[i] - regmatch.startp[i]);
     833                    if (len > CMDBUFFSIZE - 5)
     834                        len = CMDBUFFSIZE - 5;
     835diff -Naur vim70.orig/src/spell.c vim70/src/spell.c
     836--- vim70.orig/src/spell.c      2006-05-05 00:49:58.000000000 -0700
     837+++ vim70/src/spell.c   2006-06-21 23:50:50.000000000 -0700
    563838@@ -2108,7 +2108,8 @@
    564839         * possible. */
     
    571846        p = buf + skip;
    572847        endp = buf + len;
    573 diff -Naur vim70-orig/src/version.c vim70/src/version.c
    574 --- vim70-orig/src/version.c    2006-05-03 03:50:42.000000000 -0400
    575 +++ vim70/src/version.c 2006-05-25 09:13:13.000000000 -0400
    576 @@ -667,6 +667,38 @@
     848diff -Naur vim70.orig/src/version.c vim70/src/version.c
     849--- vim70.orig/src/version.c    2006-05-03 00:50:42.000000000 -0700
     850+++ vim70/src/version.c 2006-06-21 23:56:28.000000000 -0700
     851@@ -667,6 +667,48 @@
    577852 static int included_patches[] =
    578853 {   /* Add new patch number below this line */
    579854 /**/
     855+    22,
     856+/**/
     857+    21,
     858+/**/
     859+    20,
     860+/**/
     861+    19,
     862+/**/
     863+    18,
     864+/**/
    580865+    17,
    581866+/**/
     
    613898 };
    614899 
     900 
Note: See TracChangeset for help on using the changeset viewer.