source: patches/vim-7.0-fixes-4.patch @ 4f46927

clfs-1.2clfs-2.1clfs-3.0.0-systemdclfs-3.0.0-sysvinitsystemdsysvinit
Last change on this file since 4f46927 was 4f46927, checked in by Jim Gifford <clfs@…>, 18 years ago

Updated Vim 7.0 patch

  • Property mode set to 100644
File size: 25.0 KB
  • runtime/autoload/ccomplete.vim

    Submitted By: Jim Gifford (jim at linuxfromscratch dot org)
    Date: 2006-06-21
    Initial Package Version: 7.0
    Origin: Upstream
    Upstream Status: Applied
    Description: Contains Patch 001-004 and 006-022 from Upstream
            005 is for the extras and Windows 32 only
    
    diff -Naur vim70.orig/runtime/autoload/ccomplete.vim vim70/runtime/autoload/ccomplete.vim
    old new  
    11" Vim completion script
    22" Language:     C
    33" Maintainer:   Bram Moolenaar <Bram@vim.org>
    4 " Last Change:  2006 May 03
     4" Last Change:  2006 May 08
    55
    66
    77" This function is used for the 'omnifunc' option.
     
    458458" member.
    459459function! s:StructMembers(typename, items, all)
    460460  " Todo: What about local structures?
    461   let fnames = join(map(tagfiles(), 'escape(v:val, " \\")'))
     461  let fnames = join(map(tagfiles(), 'escape(v:val, " \\#%")'))
    462462  if fnames == ''
    463463    return []
    464464  endif
  • runtime/autoload/spellfile.vim

    diff -Naur vim70.orig/runtime/autoload/spellfile.vim vim70/runtime/autoload/spellfile.vim
    old new  
    11" Vim script to download a missing spell file
    22" Maintainer:   Bram Moolenaar <Bram@vim.org>
    3 " Last Change:  2006 Feb 01
     3" Last Change:  2006 May 10
    44
    55if !exists('g:spellfile_URL')
    6   let g:spellfile_URL = 'ftp://ftp.vim.org/pub/vim/unstable/runtime/spell'
     6  let g:spellfile_URL = 'ftp://ftp.vim.org/pub/vim/runtime/spell'
    77endif
    88let s:spellfile_URL = ''    " Start with nothing so that s:donedict is reset.
    99
     
    6161    new
    6262    setlocal bin
    6363    echo 'Downloading ' . fname . '...'
    64     exe 'Nread ' g:spellfile_URL . '/' . fname
     64    call spellfile#Nread(fname)
    6565    if getline(2) !~ 'VIMspell'
    6666      " Didn't work, perhaps there is an ASCII one.
    6767      g/^/d
    6868      let fname = a:lang . '.ascii.spl'
    6969      echo 'Could not find it, trying ' . fname . '...'
    70       exe 'Nread ' g:spellfile_URL . '/' . fname
     70      call spellfile#Nread(fname)
    7171      if getline(2) !~ 'VIMspell'
    7272        echo 'Sorry, downloading failed'
    7373        bwipe!
     
    9595        g/^/d
    9696        let fname = substitute(fname, '\.spl$', '.sug', '')
    9797        echo 'Downloading ' . fname . '...'
    98         exe 'Nread ' g:spellfile_URL . '/' . fname
     98        call spellfile#Nread(fname)
    9999        if getline(2) !~ 'VIMsug'
    100100          echo 'Sorry, downloading failed'
    101101        else
     
    109109    bwipe
    110110  endif
    111111endfunc
     112
     113" Read "fname" from the ftp server.
     114function! spellfile#Nread(fname)
     115  let machine = substitute(g:spellfile_URL, 'ftp://\([^/]*\).*', '\1', '')
     116  let dir = substitute(g:spellfile_URL, 'ftp://[^/]*/\(.*\)', '\1', '')
     117  exe 'Nread "' . machine . ' anonymous vim7user ' . dir . '/' . a:fname . '"'
     118endfunc
  • runtime/plugin/matchparen.vim

    diff -Naur vim70.orig/runtime/plugin/matchparen.vim vim70/runtime/plugin/matchparen.vim
    old new  
    11" Vim plugin for showing matching parens
    22" Maintainer:  Bram Moolenaar <Bram@vim.org>
    3 " Last Change: 2006 Apr 27
     3" Last Change: 2006 May 11
    44
    55" Exit quickly when:
    66" - this plugin was already loaded (or disabled)
     
    9090  " Find the match.  When it was just before the cursor move it there for a
    9191  " moment.
    9292  if before > 0
    93     let save_cursor = getpos('.')
     93    let save_cursor = winsaveview()
    9494    call cursor(c_lnum, c_col - before)
    9595  endif
    9696
     
    102102  let [m_lnum, m_col] = searchpairpos(c, '', c2, s_flags, s_skip, stopline)
    103103
    104104  if before > 0
    105     call setpos('.', save_cursor)
     105    call winrestview(save_cursor)
    106106  endif
    107107
    108108  " If a match is found setup match highlighting.
  • src/edit.c

    diff -Naur vim70.orig/src/edit.c vim70/src/edit.c
    old new  
    751751                    continue;
    752752                }
    753753
    754                 /* Pressing CTRL-Y selects the current match.  Shen
     754                /* Pressing CTRL-Y selects the current match.  When
    755755                 * compl_enter_selects is set the Enter key does the same. */
    756756                if (c == Ctrl_Y || (compl_enter_selects
    757757                                   && (c == CAR || c == K_KENTER || c == NL)))
     
    30463046    ins_compl_delete();
    30473047    ins_bytes(compl_leader + curwin->w_cursor.col - compl_col);
    30483048    compl_used_match = FALSE;
    3049     compl_enter_selects = FALSE;
    30503049
    30513050    if (compl_started)
    30523051        ins_compl_set_original_text(compl_leader);
     
    30763075        compl_restarting = FALSE;
    30773076    }
    30783077
     3078#if 0   /* disabled, made CTRL-L, BS and typing char jump to original text. */
    30793079    if (!compl_used_match)
    30803080    {
    30813081        /* Go to the original text, since none of the matches is inserted. */
     
    30873087        compl_curr_match = compl_shown_match;
    30883088        compl_shows_dir = compl_direction;
    30893089    }
     3090#endif
     3091    compl_enter_selects = !compl_used_match;
    30903092
    30913093    /* Show the popup menu with a different set of matches. */
    30923094    ins_compl_show_pum();
     
    31753177    char_u      *p;
    31763178    int         len = curwin->w_cursor.col - compl_col;
    31773179    int         c;
     3180    compl_T     *cp;
    31783181
    31793182    p = compl_shown_match->cp_str;
    31803183    if ((int)STRLEN(p) <= len)   /* the match is too short */
    3181         return;
     3184    {
     3185        /* When still at the original match use the first entry that matches
     3186         * the leader. */
     3187        if (compl_shown_match->cp_flags & ORIGINAL_TEXT)
     3188        {
     3189            p = NULL;
     3190            for (cp = compl_shown_match->cp_next; cp != NULL
     3191                                 && cp != compl_first_match; cp = cp->cp_next)
     3192            {
     3193                if (ins_compl_equal(cp, compl_leader,
     3194                                                   (int)STRLEN(compl_leader)))
     3195                {
     3196                    p = cp->cp_str;
     3197                    break;
     3198                }
     3199            }
     3200            if (p == NULL || (int)STRLEN(p) <= len)
     3201                return;
     3202        }
     3203        else
     3204            return;
     3205    }
    31823206    p += len;
    31833207#ifdef FEAT_MBYTE
    31843208    c = mb_ptr2char(p);
     
    41004124                && compl_shown_match->cp_next != NULL
    41014125                && compl_shown_match->cp_next != compl_first_match)
    41024126            compl_shown_match = compl_shown_match->cp_next;
     4127
     4128        /* If we didn't find it searching forward, and compl_shows_dir is
     4129         * backward, find the last match. */
     4130        if (compl_shows_dir == BACKWARD
     4131                && !ins_compl_equal(compl_shown_match,
     4132                                      compl_leader, (int)STRLEN(compl_leader))
     4133                && (compl_shown_match->cp_next == NULL
     4134                    || compl_shown_match->cp_next == compl_first_match))
     4135        {
     4136            while (!ins_compl_equal(compl_shown_match,
     4137                                      compl_leader, (int)STRLEN(compl_leader))
     4138                    && compl_shown_match->cp_prev != NULL
     4139                    && compl_shown_match->cp_prev != compl_first_match)
     4140                compl_shown_match = compl_shown_match->cp_prev;
     4141        }
    41034142    }
    41044143
    41054144    if (allow_get_expansion && insert_match
  • src/eval.c

    diff -Naur vim70.orig/src/eval.c vim70/src/eval.c
    old new  
    1137211372            if (argvars[2].v_type != VAR_UNKNOWN)
    1137311373            {
    1137411374                char_u  *xp_name;
    11375                 int             xp_namelen;
     11375                int     xp_namelen;
    1137611376                long    argt;
    1137711377
    1137811378                rettv->vval.v_string = NULL;
     
    1896318963    else if (lead > 0)
    1896418964    {
    1896518965        lead = 3;
    18966         if (eval_fname_sid(lv.ll_exp_name != NULL ? lv.ll_exp_name : *pp))
     18966        if ((lv.ll_exp_name != NULL && eval_fname_sid(lv.ll_exp_name))
     18967                                                       || eval_fname_sid(*pp))
    1896718968        {
    1896818969            /* It's "s:" or "<SID>" */
    1896918970            if (current_SID <= 0)
  • src/ex_docmd.c

    diff -Naur vim70.orig/src/ex_docmd.c vim70/src/ex_docmd.c
    old new  
    833833     * If requested, store and reset the global values controlling the
    834834     * exception handling (used when debugging).
    835835     */
    836     else if (flags & DOCMD_EXCRESET)
     836    if (flags & DOCMD_EXCRESET)
    837837        save_dbg_stuff(&debug_saved);
    838838
    839839    initial_trylevel = trylevel;
  • src/gui_at_fs.c

    diff -Naur vim70.orig/src/gui_at_fs.c vim70/src/gui_at_fs.c
    old new  
    18611861    XtPointer   pnew;
    18621862{
    18631863    SFDir       *dir;
    1864     int         nw;
     1864    int         nw = (int)(long)pnew;
    18651865
    18661866    dir = &(SFdirs[SFdirPtr + (int)(long)n]);
    18671867
    18681868#ifdef FEAT_GUI_NEXTAW
    1869     if ((int)(long)pnew < 0)
     1869    if (nw < 0)
    18701870    {
    1871         if ((int)(long)pnew > -SFvScrollHeight)
    1872             (int)(long)pnew = -1;
     1871        if (nw > -SFvScrollHeight)
     1872            nw = -1;
    18731873        else
    1874             (int)(long)pnew = -SFlistSize;
     1874            nw = -SFlistSize;
    18751875    }
    1876     else if ((int)(long)pnew > 0)
     1876    else if (nw > 0)
    18771877    {
    1878         if ((int)(long)pnew < SFvScrollHeight)
    1879             (int)(long)pnew = 1;
     1878        if (nw < SFvScrollHeight)
     1879            nw = 1;
    18801880        else
    1881             (int)(long)pnew = SFlistSize;
     1881            nw = SFlistSize;
    18821882    }
    18831883#endif
    1884     nw = dir->vOrigin + (int)(long)pnew;
     1884    nw += dir->vOrigin;
    18851885
    18861886    if (nw > dir->nEntries - SFlistSize)
    18871887        nw = dir->nEntries - SFlistSize;
     
    19411941    XtPointer   pnew;
    19421942{
    19431943    SFDir       *dir;
    1944     int         nw;
     1944    int         nw = (int)(long)pnew;
    19451945
    19461946    dir = &(SFdirs[SFdirPtr + (int)(long)n]);
    19471947
    19481948#ifdef FEAT_GUI_NEXTAW
    1949     if ((int)(long)pnew < 0)
     1949    if (nw < 0)
    19501950    {
    1951         if ((int)(long)pnew > -SFhScrollWidth)
    1952             (int)(long)pnew = -1;
     1951        if (nw > -SFhScrollWidth)
     1952            nw = -1;
    19531953        else
    1954             (int)(long)pnew = -SFcharsPerEntry;
     1954            nw = -SFcharsPerEntry;
    19551955    }
    1956     else if ((int)(long)pnew > 0)
     1956    else if (nw > 0)
    19571957    {
    1958         if ((int)(long)pnew < SFhScrollWidth)
    1959             (int)(long)pnew = 1;
     1958        if (nw < SFhScrollWidth)
     1959            nw = 1;
    19601960        else
    1961             (int)(long)pnew = SFcharsPerEntry;
     1961            nw = SFcharsPerEntry;
    19621962    }
    19631963#endif
    1964     nw = dir->hOrigin + (int)(long)pnew;
     1964    nw += dir->hOrigin;
    19651965
    19661966    if (nw > dir->nChars - SFcharsPerEntry)
    19671967        nw = dir->nChars - SFcharsPerEntry;
     
    20382038    XtPointer   client_data;
    20392039    XtPointer   pnew;
    20402040{
    2041     int         nw;
     2041    int         nw = (int)(long)pnew;
    20422042    float       f;
    20432043
    20442044#ifdef FEAT_GUI_NEXTAW
    2045     if ((int)(long)pnew < 0)
     2045    if (nw < 0)
    20462046    {
    2047         if ((int)(long)pnew > -SFpathScrollWidth)
    2048             (int)(long)pnew = -1;
     2047        if (nw > -SFpathScrollWidth)
     2048            nw = -1;
    20492049        else
    2050             (int)(long)pnew = -3;
     2050            nw = -3;
    20512051    }
    2052     else if ((int)(long)pnew > 0)
     2052    else if (nw > 0)
    20532053    {
    2054         if ((int)(long)pnew < SFpathScrollWidth)
    2055             (int)(long)pnew = 1;
     2054        if (nw < SFpathScrollWidth)
     2055            nw = 1;
    20562056        else
    2057             (int)(long)pnew = 3;
     2057            nw = 3;
    20582058    }
    20592059#endif
    2060     nw = SFdirPtr + (int)(long)pnew;
     2060    nw += SFdirPtr;
    20612061
    20622062    if (nw > SFdirEnd - 3)
    20632063        nw = SFdirEnd - 3;
  • src/gui.c

    diff -Naur vim70.orig/src/gui.c vim70/src/gui.c
    old new  
    45154515    int         y;
    45164516{
    45174517    win_T       *wp;
    4518     char_u      st[6];
     4518    char_u      st[8];
    45194519
    45204520    /* Ignore this while still starting up. */
    45214521    if (!gui.in_use || gui.starting)
     
    46034603    /* Don't move the mouse when it's left or right of the Vim window */
    46044604    if (x < 0 || x > Columns * gui.char_width)
    46054605        return;
     4606    if (y >= 0
    46064607# ifdef FEAT_WINDOWS
    4607     if (Y_2_ROW(y) >= tabline_height())
    4608 # else
    4609     if (y >= 0)
     4608            && Y_2_ROW(y) >= tabline_height()
    46104609# endif
     4610       )
    46114611        wp = xy2win(x, y);
    46124612    if (wp != curwin && wp != NULL)     /* If in other than current window */
    46134613    {
  • src/gui_xmebw.c

    diff -Naur vim70.orig/src/gui_xmebw.c vim70/src/gui_xmebw.c
    old new  
    4747#include "gui_xmebwp.h"
    4848
    4949/* Provide some missing wrappers, which are missed from the LessTif
    50  * implementation.
     50 * implementation.  Also missing in Motif 1.2 and earlier.
    5151 *
    5252 * We neither use XmeGetPixmapData or _XmGetPixmapData, since with LessTif the
    5353 * pixmap will not appear in it's caches properly. We cache the interresting
    5454 * values in XmEnhancedButtonPart instead ourself.
    5555 */
    56 #ifdef LESSTIF_VERSION
     56#if defined(LESSTIF_VERSION) || (XmVersion <= 1002)
    5757# ifndef Lab_IsMenupane
    5858#  define Lab_IsMenupane(w) (Lab_MenuType(w) == (int)XmMENU_POPUP || \
    5959                    Lab_MenuType(w) == (int)XmMENU_PULLDOWN)
     
    480480            || (eb->core.height <= 2 * eb->primitive.highlight_thickness))
    481481        return;
    482482
    483 #ifndef LESSTIF_VERSION
     483#if !defined(LESSTIF_VERSION) && (XmVersion > 1002)
    484484    {
    485485        XmDisplay       dpy;
    486486
     
    641641    GC          tmp_gc = NULL;
    642642    Boolean     replaceGC = False;
    643643    Boolean     deadjusted = False;
    644 #ifndef LESSTIF_VERSION
     644#if !defined(LESSTIF_VERSION) && (XmVersion > 1002)
    645645    XmDisplay   dpy = (XmDisplay)XmGetXmDisplay(XtDisplay(eb));
    646646    Boolean     etched_in = dpy->display.enable_etched_in_menu;
    647647#else
     
    726726        if ((((ShellWidget) XtParent(XtParent(eb)))->shell.popped_up)
    727727                && _XmGetInDragMode((Widget) eb))
    728728        {
    729 #ifndef LESSTIF_VERSION
     729#if !defined(LESSTIF_VERSION) && (XmVersion > 1002)
    730730            XmDisplay dpy = (XmDisplay) XmGetXmDisplay(XtDisplay(wid));
    731731            Boolean etched_in = dpy->display.enable_etched_in_menu;
    732732#else
     
    810810
    811811    if (Lab_IsMenupane(eb))
    812812    {
    813 #ifndef LESSTIF_VERSION
     813#if !defined(LESSTIF_VERSION) && (XmVersion > 1002)
    814814        XmDisplay dpy = (XmDisplay) XmGetXmDisplay(XtDisplay(wid));
    815815        Boolean etched_in = dpy->display.enable_etched_in_menu;
    816816#else
     
    11501150Redisplay(Widget w, XEvent *event, Region region)
    11511151{
    11521152    XmEnhancedButtonWidget  eb = (XmEnhancedButtonWidget) w;
    1153 #ifndef LESSTIF_VERSION
     1153#if !defined(LESSTIF_VERSION) && (XmVersion > 1002)
    11541154    XmDisplay               dpy;
    11551155    XtEnum                  default_button_emphasis;
    11561156#endif
     
    11621162    if (!XtIsRealized((Widget)eb))
    11631163        return;
    11641164
    1165 #ifndef LESSTIF_VERSION
     1165#if !defined(LESSTIF_VERSION) && (XmVersion > 1002)
    11661166    dpy = (XmDisplay)XmGetXmDisplay(XtDisplay(eb));
    11671167    default_button_emphasis = dpy->display.default_button_emphasis;
    11681168#endif
     
    12411241    {
    12421242        int adjust = 0;
    12431243
    1244 #ifndef LESSTIF_VERSION
     1244#if !defined(LESSTIF_VERSION) && (XmVersion > 1002)
    12451245        /*
    12461246         *  NOTE: PushButton has two types of shadows: primitive-shadow and
    12471247         *  default-button-shadow.  If pushbutton is in a menu only primitive
     
    12891289                          adjust, adjust, rectwidth, rectheight, borderwidth);
    12901290            }
    12911291
    1292 #ifndef LESSTIF_VERSION
     1292#if !defined(LESSTIF_VERSION) && (XmVersion > 1002)
    12931293            switch (default_button_emphasis)
    12941294            {
    12951295                case XmINTERNAL_HIGHLIGHT:
     
    13651365                    default_button_shadow_thickness =
    13661366                               eb->pushbutton.default_button_shadow_thickness;
    13671367
    1368 #ifndef LESSTIF_VERSION
     1368#if !defined(LESSTIF_VERSION) && (XmVersion > 1002)
    13691369                /*
    13701370                 * Compute location of bounding box to contain the
    13711371                 * defaultButtonShadow.
  • src/if_ruby.c

    diff -Naur vim70.orig/src/if_ruby.c vim70/src/if_ruby.c
    old new  
    643643
    644644static VALUE set_buffer_line(buf_T *buf, linenr_T n, VALUE str)
    645645{
    646     buf_T *savebuf = curbuf;
    647     char *line = STR2CSTR(str);
     646    char        *line = STR2CSTR(str);
     647#ifdef FEAT_AUTOCMD
     648    aco_save_T  aco;
     649#else
     650    buf_T       *save_curbuf = curbuf;
     651#endif
    648652
    649     if (n > 0 && n <= buf->b_ml.ml_line_count && line != NULL) {
     653    if (n > 0 && n <= buf->b_ml.ml_line_count && line != NULL)
     654    {
     655#ifdef FEAT_AUTOCMD
     656        /* set curwin/curbuf for "buf" and save some things */
     657        aucmd_prepbuf(&aco, buf);
     658#else
    650659        curbuf = buf;
     660        curwin->w_buffer = buf;
     661#endif
     662
    651663        if (u_savesub(n) == OK) {
    652664            ml_replace(n, (char_u *)line, TRUE);
    653665            changed();
     
    655667            syn_changed(n); /* recompute syntax hl. for this line */
    656668#endif
    657669        }
    658         curbuf = savebuf;
     670
     671#ifdef FEAT_AUTOCMD
     672        /* restore curwin/curbuf and a few other things */
     673        aucmd_restbuf(&aco);
     674        /* Careful: autocommands may have made "buf" invalid! */
     675#else
     676        curwin->w_buffer = save_curbuf;
     677        curbuf = save_curbuf;
     678#endif
    659679        update_curbuf(NOT_VALID);
    660680    }
    661     else {
     681    else
     682    {
    662683        rb_raise(rb_eIndexError, "index %d out of buffer", n);
    663684        return Qnil; /* For stop warning */
    664685    }
     
    676697
    677698static VALUE buffer_delete(VALUE self, VALUE num)
    678699{
    679     buf_T *buf = get_buf(self);
    680     buf_T *savebuf = curbuf;
    681     long n = NUM2LONG(num);
     700    buf_T       *buf = get_buf(self);
     701    long        n = NUM2LONG(num);
     702#ifdef FEAT_AUTOCMD
     703    aco_save_T  aco;
     704#else
     705    buf_T       *save_curbuf = curbuf;
     706#endif
    682707
    683     if (n > 0 && n <= buf->b_ml.ml_line_count) {
     708    if (n > 0 && n <= buf->b_ml.ml_line_count)
     709    {
     710#ifdef FEAT_AUTOCMD
     711        /* set curwin/curbuf for "buf" and save some things */
     712        aucmd_prepbuf(&aco, buf);
     713#else
    684714        curbuf = buf;
     715        curwin->w_buffer = buf;
     716#endif
     717
    685718        if (u_savedel(n, 1) == OK) {
    686719            ml_delete(n, 0);
    687720
     
    691724
    692725            changed();
    693726        }
    694         curbuf = savebuf;
     727
     728#ifdef FEAT_AUTOCMD
     729        /* restore curwin/curbuf and a few other things */
     730        aucmd_restbuf(&aco);
     731        /* Careful: autocommands may have made "buf" invalid! */
     732#else
     733        curwin->w_buffer = save_curbuf;
     734        curbuf = save_curbuf;
     735#endif
    695736        update_curbuf(NOT_VALID);
    696737    }
    697     else {
     738    else
     739    {
    698740        rb_raise(rb_eIndexError, "index %d out of buffer", n);
    699741    }
    700742    return Qnil;
     
    702744
    703745static VALUE buffer_append(VALUE self, VALUE num, VALUE str)
    704746{
    705     buf_T *buf = get_buf(self);
    706     buf_T *savebuf = curbuf;
    707     char *line = STR2CSTR(str);
    708     long n = NUM2LONG(num);
     747    buf_T       *buf = get_buf(self);
     748    char        *line = STR2CSTR(str);
     749    long        n = NUM2LONG(num);
     750#ifdef FEAT_AUTOCMD
     751    aco_save_T  aco;
     752#else
     753    buf_T       *save_curbuf = curbuf;
     754#endif
    709755
    710     if (n >= 0 && n <= buf->b_ml.ml_line_count && line != NULL) {
     756    if (n >= 0 && n <= buf->b_ml.ml_line_count && line != NULL)
     757    {
     758#ifdef FEAT_AUTOCMD
     759        /* set curwin/curbuf for "buf" and save some things */
     760        aucmd_prepbuf(&aco, buf);
     761#else
    711762        curbuf = buf;
     763        curwin->w_buffer = buf;
     764#endif
     765
    712766        if (u_inssub(n + 1) == OK) {
    713767            ml_append(n, (char_u *) line, (colnr_T) 0, FALSE);
    714768
     
    718772
    719773            changed();
    720774        }
    721         curbuf = savebuf;
     775
     776#ifdef FEAT_AUTOCMD
     777        /* restore curwin/curbuf and a few other things */
     778        aucmd_restbuf(&aco);
     779        /* Careful: autocommands may have made "buf" invalid! */
     780#else
     781        curwin->w_buffer = save_curbuf;
     782        curbuf = save_curbuf;
     783#endif
    722784        update_curbuf(NOT_VALID);
    723785    }
    724786    else {
  • src/main.c

    diff -Naur vim70.orig/src/main.c vim70/src/main.c
    old new  
    564564     */
    565565    if (p_lpl)
    566566    {
     567# ifdef VMS     /* Somehow VMS doesn't handle the "**". */
     568        source_runtime((char_u *)"plugin/*.vim", TRUE);
     569# else
    567570        source_runtime((char_u *)"plugin/**/*.vim", TRUE);
     571# endif
    568572        TIME_MSG("loading plugins");
    569573    }
    570574#endif
  • src/Makefile

    diff -Naur vim70.orig/src/Makefile vim70/src/Makefile
    old new  
    21772177        cd $(SHADOWDIR)/xxd; ln -s ../../xxd/*.[ch] ../../xxd/Make* .
    21782178        if test -d $(RSRC_DIR); then \
    21792179                cd $(SHADOWDIR); \
     2180                ln -s ../infplist.xml .; \
    21802181                ln -s ../$(RSRC_DIR) ../os_mac.rsr.hqx ../dehqx.py .; \
    21812182        fi
    21822183        mkdir $(SHADOWDIR)/testdir
  • src/mbyte.c

    diff -Naur vim70.orig/src/mbyte.c vim70/src/mbyte.c
    old new  
    311311
    312312#define IDX_MACROMAN    57
    313313    {"macroman",        ENC_8BIT + ENC_MACROMAN, 0},    /* Mac OS */
    314 #define IDX_COUNT       58
     314#define IDX_DECMCS      58
     315    {"dec-mcs",         ENC_8BIT,               0},     /* DEC MCS */
     316#define IDX_HPROMAN8    59
     317    {"hp-roman8",       ENC_8BIT,               0},     /* HP Roman8 */
     318#define IDX_COUNT       60
    315319};
    316320
    317321/*
     
    386390    {"950",             IDX_BIG5},
    387391#endif
    388392    {"mac",             IDX_MACROMAN},
     393    {"mac-roman",       IDX_MACROMAN},
    389394    {NULL,              0}
    390395};
    391396
  • src/message.c

    diff -Naur vim70.orig/src/message.c vim70/src/message.c
    old new  
    41754175                        str_arg_l = 0;
    41764176                    else
    41774177                    {
    4178                         /* memchr on HP does not like n > 2^31  !!! */
    4179                         char *q = memchr(str_arg, '\0',
     4178                        /* Don't put the #if inside memchr(), it can be a
     4179                         * macro. */
    41804180#if SIZEOF_INT <= 2
    4181                                 precision
     4181                        char *q = memchr(str_arg, '\0', precision);
    41824182#else
    4183                                 precision <= (size_t)0x7fffffffL ? precision
    4184                                                        : (size_t)0x7fffffffL
     4183                        /* memchr on HP does not like n > 2^31  !!! */
     4184                        char *q = memchr(str_arg, '\0',
     4185                                  precision <= (size_t)0x7fffffffL ? precision
     4186                                                       : (size_t)0x7fffffffL);
    41854187#endif
    4186                                                        );
    41874188                        str_arg_l = (q == NULL) ? precision : q - str_arg;
    41884189                    }
    41894190                    break;
  • src/ops.c

    diff -Naur vim70.orig/src/ops.c vim70/src/ops.c
    old new  
    24132413        else
    24142414        {
    24152415            curwin->w_cursor = oap->end;
     2416            check_cursor_col();
    24162417
    24172418            /* Works just like an 'i'nsert on the next character. */
    24182419            if (!lineempty(curwin->w_cursor.lnum)
  • src/option.c

    diff -Naur vim70.orig/src/option.c vim70/src/option.c
    old new  
    22942294                            {(char_u *)0L, (char_u *)0L}
    22952295#endif
    22962296                            },
    2297     {"spellsuggest", "sps", P_STRING|P_VI_DEF|P_EXPAND|P_SECURE,
     2297    {"spellsuggest", "sps", P_STRING|P_VI_DEF|P_EXPAND|P_SECURE|P_COMMA,
    22982298#ifdef FEAT_SPELL
    22992299                            (char_u *)&p_sps, PV_NONE,
    23002300                            {(char_u *)"best", (char_u *)0L}
     
    52275227            case PV_STL:        return &curwin->w_p_stl_flags;
    52285228#endif
    52295229#ifdef FEAT_EVAL
     5230# ifdef FEAT_FOLDING
    52305231            case PV_FDE:        return &curwin->w_p_fde_flags;
    52315232            case PV_FDT:        return &curwin->w_p_fdt_flags;
     5233# endif
    52325234# ifdef FEAT_BEVAL
    52335235            case PV_BEXPR:      return &curbuf->b_p_bexpr_flags;
    52345236# endif
    5235 #endif
    5236 #if defined(FEAT_EVAL)
    52375237# if defined(FEAT_CINDENT)
    52385238            case PV_INDE:       return &curbuf->b_p_inde_flags;
    52395239# endif
  • src/quickfix.c

    diff -Naur vim70.orig/src/quickfix.c vim70/src/quickfix.c
    old new  
    602602                else
    603603                    type = 0;
    604604                /*
    605                  * Extract error message data from matched line
     605                 * Extract error message data from matched line.
     606                 * We check for an actual submatch, because "\[" and "\]" in
     607                 * the 'errorformat' may cause the wrong submatch to be used.
    606608                 */
    607609                if ((i = (int)fmt_ptr->addr[0]) > 0)            /* %f */
    608610                {
    609                     int c = *regmatch.endp[i];
     611                    int c;
     612
     613                    if (regmatch.startp[i] == NULL || regmatch.endp[i] == NULL)
     614                        continue;
    610615
    611616                    /* Expand ~/file and $HOME/file to full path. */
     617                    c = *regmatch.endp[i];
    612618                    *regmatch.endp[i] = NUL;
    613619                    expand_env(regmatch.startp[i], namebuf, CMDBUFFSIZE);
    614620                    *regmatch.endp[i] = c;
     
    618624                        continue;
    619625                }
    620626                if ((i = (int)fmt_ptr->addr[1]) > 0)            /* %n */
     627                {
     628                    if (regmatch.startp[i] == NULL)
     629                        continue;
    621630                    enr = (int)atol((char *)regmatch.startp[i]);
     631                }
    622632                if ((i = (int)fmt_ptr->addr[2]) > 0)            /* %l */
     633                {
     634                    if (regmatch.startp[i] == NULL)
     635                        continue;
    623636                    lnum = atol((char *)regmatch.startp[i]);
     637                }
    624638                if ((i = (int)fmt_ptr->addr[3]) > 0)            /* %c */
     639                {
     640                    if (regmatch.startp[i] == NULL)
     641                        continue;
    625642                    col = (int)atol((char *)regmatch.startp[i]);
     643                }
    626644                if ((i = (int)fmt_ptr->addr[4]) > 0)            /* %t */
     645                {
     646                    if (regmatch.startp[i] == NULL)
     647                        continue;
    627648                    type = *regmatch.startp[i];
     649                }
    628650                if (fmt_ptr->flags == '+' && !multiscan)        /* %+ */
    629651                    STRCPY(errmsg, IObuff);
    630652                else if ((i = (int)fmt_ptr->addr[5]) > 0)       /* %m */
    631653                {
     654                    if (regmatch.startp[i] == NULL || regmatch.endp[i] == NULL)
     655                        continue;
    632656                    len = (int)(regmatch.endp[i] - regmatch.startp[i]);
    633657                    vim_strncpy(errmsg, regmatch.startp[i], len);
    634658                }
    635659                if ((i = (int)fmt_ptr->addr[6]) > 0)            /* %r */
     660                {
     661                    if (regmatch.startp[i] == NULL)
     662                        continue;
    636663                    tail = regmatch.startp[i];
     664                }
    637665                if ((i = (int)fmt_ptr->addr[7]) > 0)            /* %p */
    638666                {
     667                    if (regmatch.startp[i] == NULL || regmatch.endp[i] == NULL)
     668                        continue;
    639669                    col = (int)(regmatch.endp[i] - regmatch.startp[i] + 1);
    640670                    if (*((char_u *)regmatch.startp[i]) != TAB)
    641671                        use_viscol = TRUE;
    642672                }
    643673                if ((i = (int)fmt_ptr->addr[8]) > 0)            /* %v */
    644674                {
     675                    if (regmatch.startp[i] == NULL)
     676                        continue;
    645677                    col = (int)atol((char *)regmatch.startp[i]);
    646678                    use_viscol = TRUE;
    647679                }
    648680                if ((i = (int)fmt_ptr->addr[9]) > 0)            /* %s */
    649681                {
     682                    if (regmatch.startp[i] == NULL || regmatch.endp[i] == NULL)
     683                        continue;
    650684                    len = (int)(regmatch.endp[i] - regmatch.startp[i]);
    651685                    if (len > CMDBUFFSIZE - 5)
    652686                        len = CMDBUFFSIZE - 5;
  • src/spell.c

    diff -Naur vim70.orig/src/spell.c vim70/src/spell.c
    old new  
    21082108         * possible. */
    21092109        STRCPY(buf, line);
    21102110        if (lnum < wp->w_buffer->b_ml.ml_line_count)
    2111             spell_cat_line(buf + STRLEN(buf), ml_get(lnum + 1), MAXWLEN);
     2111            spell_cat_line(buf + STRLEN(buf),
     2112                          ml_get_buf(wp->w_buffer, lnum + 1, FALSE), MAXWLEN);
    21122113
    21132114        p = buf + skip;
    21142115        endp = buf + len;
  • src/version.c

    diff -Naur vim70.orig/src/version.c vim70/src/version.c
    old new  
    667667static int included_patches[] =
    668668{   /* Add new patch number below this line */
    669669/**/
     670    22,
     671/**/
     672    21,
     673/**/
     674    20,
     675/**/
     676    19,
     677/**/
     678    18,
     679/**/
     680    17,
     681/**/
     682    16,
     683/**/
     684    15,
     685/**/
     686    14,
     687/**/
     688    13,
     689/**/
     690    12,
     691/**/
     692    11,
     693/**/
     694    10,
     695/**/
     696    9,
     697/**/
     698    8,
     699/**/
     700    7,
     701/**/
     702    6,
     703/**/
     704    4,
     705/**/
     706    3,
     707/**/
     708    2,
     709/**/
     710    1,
     711/**/
    670712    0
    671713};
    672714
Note: See TracBrowser for help on using the repository browser.