Ticket #1793: vim-7.0-nogui.patch

File vim-7.0-nogui.patch, 9.8 KB (added by zkom.xl@…, 19 years ago)
  • runtime/autoload/ccomplete.vim

    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/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/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/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    17,
     671/**/
     672    16,
     673/**/
     674    13,
     675/**/
     676    12,
     677/**/
     678    11,
     679/**/
     680    10,
     681/**/
     682    9,
     683/**/
     684    8,
     685/**/
     686    4,
     687/**/
     688    2,
     689/**/
     690    1,
     691/**/
    670692    0
    671693};
    672694