source:
patches/vim-7.0-fixes-3.patch@
d1bfa31
Last change on this file since d1bfa31 was fefaf43, checked in by , 19 years ago | |
---|---|
|
|
File size: 17.8 KB |
-
runtime/autoload/ccomplete.vim
Submitted By: Jeremy Huntwork (jhuntwork at linuxfromscratch dot org) Date: 2006-05-25 Initial Package Version: 7.0 Origin: Upstream Upstream Status: Applied Description: Contains Patch 001-004 and 006-017 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 1 1 " Vim completion script 2 2 " Language: C 3 3 " Maintainer: Bram Moolenaar <Bram@vim.org> 4 " Last Change: 2006 May 0 34 " Last Change: 2006 May 08 5 5 6 6 7 7 " This function is used for the 'omnifunc' option. … … 458 458 " member. 459 459 function! s:StructMembers(typename, items, all) 460 460 " Todo: What about local structures? 461 let fnames = join(map(tagfiles(), 'escape(v:val, " \\ ")'))461 let fnames = join(map(tagfiles(), 'escape(v:val, " \\#%")')) 462 462 if fnames == '' 463 463 return [] 464 464 endif -
runtime/autoload/spellfile.vim
diff -Naur vim70-orig/runtime/autoload/spellfile.vim vim70/runtime/autoload/spellfile.vim
old new 1 1 " Vim script to download a missing spell file 2 2 " Maintainer: Bram Moolenaar <Bram@vim.org> 3 " Last Change: 2006 Feb 013 " Last Change: 2006 May 10 4 4 5 5 if !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' 7 7 endif 8 8 let s:spellfile_URL = '' " Start with nothing so that s:donedict is reset. 9 9 … … 61 61 new 62 62 setlocal bin 63 63 echo 'Downloading ' . fname . '...' 64 exe 'Nread ' g:spellfile_URL . '/' . fname64 call spellfile#Nread(fname) 65 65 if getline(2) !~ 'VIMspell' 66 66 " Didn't work, perhaps there is an ASCII one. 67 67 g/^/d 68 68 let fname = a:lang . '.ascii.spl' 69 69 echo 'Could not find it, trying ' . fname . '...' 70 exe 'Nread ' g:spellfile_URL . '/' . fname70 call spellfile#Nread(fname) 71 71 if getline(2) !~ 'VIMspell' 72 72 echo 'Sorry, downloading failed' 73 73 bwipe! … … 95 95 g/^/d 96 96 let fname = substitute(fname, '\.spl$', '.sug', '') 97 97 echo 'Downloading ' . fname . '...' 98 exe 'Nread ' g:spellfile_URL . '/' . fname98 call spellfile#Nread(fname) 99 99 if getline(2) !~ 'VIMsug' 100 100 echo 'Sorry, downloading failed' 101 101 else … … 109 109 bwipe 110 110 endif 111 111 endfunc 112 113 " Read "fname" from the ftp server. 114 function! 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 . '"' 118 endfunc -
runtime/plugin/matchparen.vim
diff -Naur vim70-orig/runtime/plugin/matchparen.vim vim70/runtime/plugin/matchparen.vim
old new 1 1 " Vim plugin for showing matching parens 2 2 " Maintainer: Bram Moolenaar <Bram@vim.org> 3 " Last Change: 2006 Apr 273 " Last Change: 2006 May 11 4 4 5 5 " Exit quickly when: 6 6 " - this plugin was already loaded (or disabled) … … 90 90 " Find the match. When it was just before the cursor move it there for a 91 91 " moment. 92 92 if before > 0 93 let save_cursor = getpos('.')93 let save_cursor = winsaveview() 94 94 call cursor(c_lnum, c_col - before) 95 95 endif 96 96 … … 102 102 let [m_lnum, m_col] = searchpairpos(c, '', c2, s_flags, s_skip, stopline) 103 103 104 104 if before > 0 105 call setpos('.',save_cursor)105 call winrestview(save_cursor) 106 106 endif 107 107 108 108 " If a match is found setup match highlighting. -
src/edit.c
diff -Naur vim70-orig/src/edit.c vim70/src/edit.c
old new 751 751 continue; 752 752 } 753 753 754 /* Pressing CTRL-Y selects the current match. Shen754 /* Pressing CTRL-Y selects the current match. When 755 755 * compl_enter_selects is set the Enter key does the same. */ 756 756 if (c == Ctrl_Y || (compl_enter_selects 757 757 && (c == CAR || c == K_KENTER || c == NL))) … … 3046 3046 ins_compl_delete(); 3047 3047 ins_bytes(compl_leader + curwin->w_cursor.col - compl_col); 3048 3048 compl_used_match = FALSE; 3049 compl_enter_selects = FALSE;3050 3049 3051 3050 if (compl_started) 3052 3051 ins_compl_set_original_text(compl_leader); … … 3076 3075 compl_restarting = FALSE; 3077 3076 } 3078 3077 3078 #if 0 /* disabled, made CTRL-L, BS and typing char jump to original text. */ 3079 3079 if (!compl_used_match) 3080 3080 { 3081 3081 /* Go to the original text, since none of the matches is inserted. */ … … 3087 3087 compl_curr_match = compl_shown_match; 3088 3088 compl_shows_dir = compl_direction; 3089 3089 } 3090 #endif 3091 compl_enter_selects = !compl_used_match; 3090 3092 3091 3093 /* Show the popup menu with a different set of matches. */ 3092 3094 ins_compl_show_pum(); … … 3175 3177 char_u *p; 3176 3178 int len = curwin->w_cursor.col - compl_col; 3177 3179 int c; 3180 compl_T *cp; 3178 3181 3179 3182 p = compl_shown_match->cp_str; 3180 3183 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 } 3182 3206 p += len; 3183 3207 #ifdef FEAT_MBYTE 3184 3208 c = mb_ptr2char(p); … … 4100 4124 && compl_shown_match->cp_next != NULL 4101 4125 && compl_shown_match->cp_next != compl_first_match) 4102 4126 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 } 4103 4142 } 4104 4143 4105 4144 if (allow_get_expansion && insert_match -
src/eval.c
diff -Naur vim70-orig/src/eval.c vim70/src/eval.c
old new 11372 11372 if (argvars[2].v_type != VAR_UNKNOWN) 11373 11373 { 11374 11374 char_u *xp_name; 11375 int 11375 int xp_namelen; 11376 11376 long argt; 11377 11377 11378 11378 rettv->vval.v_string = NULL; … … 18963 18963 else if (lead > 0) 18964 18964 { 18965 18965 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)) 18967 18968 { 18968 18969 /* It's "s:" or "<SID>" */ 18969 18970 if (current_SID <= 0) -
src/ex_docmd.c
diff -Naur vim70-orig/src/ex_docmd.c vim70/src/ex_docmd.c
old new 833 833 * If requested, store and reset the global values controlling the 834 834 * exception handling (used when debugging). 835 835 */ 836 elseif (flags & DOCMD_EXCRESET)836 if (flags & DOCMD_EXCRESET) 837 837 save_dbg_stuff(&debug_saved); 838 838 839 839 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 1861 1861 XtPointer pnew; 1862 1862 { 1863 1863 SFDir *dir; 1864 int nw ;1864 int nw = (int)(long)pnew; 1865 1865 1866 1866 dir = &(SFdirs[SFdirPtr + (int)(long)n]); 1867 1867 1868 1868 #ifdef FEAT_GUI_NEXTAW 1869 if ( (int)(long)pnew < 0)1869 if (nw < 0) 1870 1870 { 1871 if ( (int)(long)pnew > -SFvScrollHeight)1872 (int)(long)pnew = -1;1871 if (nw > -SFvScrollHeight) 1872 nw = -1; 1873 1873 else 1874 (int)(long)pnew = -SFlistSize;1874 nw = -SFlistSize; 1875 1875 } 1876 else if ( (int)(long)pnew > 0)1876 else if (nw > 0) 1877 1877 { 1878 if ( (int)(long)pnew < SFvScrollHeight)1879 (int)(long)pnew = 1;1878 if (nw < SFvScrollHeight) 1879 nw = 1; 1880 1880 else 1881 (int)(long)pnew = SFlistSize;1881 nw = SFlistSize; 1882 1882 } 1883 1883 #endif 1884 nw = dir->vOrigin + (int)(long)pnew;1884 nw += dir->vOrigin; 1885 1885 1886 1886 if (nw > dir->nEntries - SFlistSize) 1887 1887 nw = dir->nEntries - SFlistSize; … … 1941 1941 XtPointer pnew; 1942 1942 { 1943 1943 SFDir *dir; 1944 int nw ;1944 int nw = (int)(long)pnew; 1945 1945 1946 1946 dir = &(SFdirs[SFdirPtr + (int)(long)n]); 1947 1947 1948 1948 #ifdef FEAT_GUI_NEXTAW 1949 if ( (int)(long)pnew < 0)1949 if (nw < 0) 1950 1950 { 1951 if ( (int)(long)pnew > -SFhScrollWidth)1952 (int)(long)pnew = -1;1951 if (nw > -SFhScrollWidth) 1952 nw = -1; 1953 1953 else 1954 (int)(long)pnew = -SFcharsPerEntry;1954 nw = -SFcharsPerEntry; 1955 1955 } 1956 else if ( (int)(long)pnew > 0)1956 else if (nw > 0) 1957 1957 { 1958 if ( (int)(long)pnew < SFhScrollWidth)1959 (int)(long)pnew = 1;1958 if (nw < SFhScrollWidth) 1959 nw = 1; 1960 1960 else 1961 (int)(long)pnew = SFcharsPerEntry;1961 nw = SFcharsPerEntry; 1962 1962 } 1963 1963 #endif 1964 nw = dir->hOrigin + (int)(long)pnew;1964 nw += dir->hOrigin; 1965 1965 1966 1966 if (nw > dir->nChars - SFcharsPerEntry) 1967 1967 nw = dir->nChars - SFcharsPerEntry; … … 2038 2038 XtPointer client_data; 2039 2039 XtPointer pnew; 2040 2040 { 2041 int nw ;2041 int nw = (int)(long)pnew; 2042 2042 float f; 2043 2043 2044 2044 #ifdef FEAT_GUI_NEXTAW 2045 if ( (int)(long)pnew < 0)2045 if (nw < 0) 2046 2046 { 2047 if ( (int)(long)pnew > -SFpathScrollWidth)2048 (int)(long)pnew = -1;2047 if (nw > -SFpathScrollWidth) 2048 nw = -1; 2049 2049 else 2050 (int)(long)pnew = -3;2050 nw = -3; 2051 2051 } 2052 else if ( (int)(long)pnew > 0)2052 else if (nw > 0) 2053 2053 { 2054 if ( (int)(long)pnew < SFpathScrollWidth)2055 (int)(long)pnew = 1;2054 if (nw < SFpathScrollWidth) 2055 nw = 1; 2056 2056 else 2057 (int)(long)pnew = 3;2057 nw = 3; 2058 2058 } 2059 2059 #endif 2060 nw = SFdirPtr + (int)(long)pnew;2060 nw += SFdirPtr; 2061 2061 2062 2062 if (nw > SFdirEnd - 3) 2063 2063 nw = SFdirEnd - 3; -
src/gui.c
diff -Naur vim70-orig/src/gui.c vim70/src/gui.c
old new 4603 4603 /* Don't move the mouse when it's left or right of the Vim window */ 4604 4604 if (x < 0 || x > Columns * gui.char_width) 4605 4605 return; 4606 if (y >= 0 4606 4607 # ifdef FEAT_WINDOWS 4607 if (Y_2_ROW(y) >= tabline_height()) 4608 # else 4609 if (y >= 0) 4608 && Y_2_ROW(y) >= tabline_height() 4610 4609 # endif 4610 ) 4611 4611 wp = xy2win(x, y); 4612 4612 if (wp != curwin && wp != NULL) /* If in other than current window */ 4613 4613 { -
src/gui_xmebw.c
diff -Naur vim70-orig/src/gui_xmebw.c vim70/src/gui_xmebw.c
old new 47 47 #include "gui_xmebwp.h" 48 48 49 49 /* Provide some missing wrappers, which are missed from the LessTif 50 * implementation. 50 * implementation. Also missing in Motif 1.2 and earlier. 51 51 * 52 52 * We neither use XmeGetPixmapData or _XmGetPixmapData, since with LessTif the 53 53 * pixmap will not appear in it's caches properly. We cache the interresting 54 54 * values in XmEnhancedButtonPart instead ourself. 55 55 */ 56 #if def LESSTIF_VERSION56 #if defined(LESSTIF_VERSION) || (XmVersion <= 1002) 57 57 # ifndef Lab_IsMenupane 58 58 # define Lab_IsMenupane(w) (Lab_MenuType(w) == (int)XmMENU_POPUP || \ 59 59 Lab_MenuType(w) == (int)XmMENU_PULLDOWN) … … 480 480 || (eb->core.height <= 2 * eb->primitive.highlight_thickness)) 481 481 return; 482 482 483 #if ndef LESSTIF_VERSION483 #if !defined(LESSTIF_VERSION) && (XmVersion > 1002) 484 484 { 485 485 XmDisplay dpy; 486 486 … … 641 641 GC tmp_gc = NULL; 642 642 Boolean replaceGC = False; 643 643 Boolean deadjusted = False; 644 #if ndef LESSTIF_VERSION644 #if !defined(LESSTIF_VERSION) && (XmVersion > 1002) 645 645 XmDisplay dpy = (XmDisplay)XmGetXmDisplay(XtDisplay(eb)); 646 646 Boolean etched_in = dpy->display.enable_etched_in_menu; 647 647 #else … … 726 726 if ((((ShellWidget) XtParent(XtParent(eb)))->shell.popped_up) 727 727 && _XmGetInDragMode((Widget) eb)) 728 728 { 729 #if ndef LESSTIF_VERSION729 #if !defined(LESSTIF_VERSION) && (XmVersion > 1002) 730 730 XmDisplay dpy = (XmDisplay) XmGetXmDisplay(XtDisplay(wid)); 731 731 Boolean etched_in = dpy->display.enable_etched_in_menu; 732 732 #else … … 810 810 811 811 if (Lab_IsMenupane(eb)) 812 812 { 813 #if ndef LESSTIF_VERSION813 #if !defined(LESSTIF_VERSION) && (XmVersion > 1002) 814 814 XmDisplay dpy = (XmDisplay) XmGetXmDisplay(XtDisplay(wid)); 815 815 Boolean etched_in = dpy->display.enable_etched_in_menu; 816 816 #else … … 1150 1150 Redisplay(Widget w, XEvent *event, Region region) 1151 1151 { 1152 1152 XmEnhancedButtonWidget eb = (XmEnhancedButtonWidget) w; 1153 #if ndef LESSTIF_VERSION1153 #if !defined(LESSTIF_VERSION) && (XmVersion > 1002) 1154 1154 XmDisplay dpy; 1155 1155 XtEnum default_button_emphasis; 1156 1156 #endif … … 1162 1162 if (!XtIsRealized((Widget)eb)) 1163 1163 return; 1164 1164 1165 #if ndef LESSTIF_VERSION1165 #if !defined(LESSTIF_VERSION) && (XmVersion > 1002) 1166 1166 dpy = (XmDisplay)XmGetXmDisplay(XtDisplay(eb)); 1167 1167 default_button_emphasis = dpy->display.default_button_emphasis; 1168 1168 #endif … … 1241 1241 { 1242 1242 int adjust = 0; 1243 1243 1244 #if ndef LESSTIF_VERSION1244 #if !defined(LESSTIF_VERSION) && (XmVersion > 1002) 1245 1245 /* 1246 1246 * NOTE: PushButton has two types of shadows: primitive-shadow and 1247 1247 * default-button-shadow. If pushbutton is in a menu only primitive … … 1289 1289 adjust, adjust, rectwidth, rectheight, borderwidth); 1290 1290 } 1291 1291 1292 #if ndef LESSTIF_VERSION1292 #if !defined(LESSTIF_VERSION) && (XmVersion > 1002) 1293 1293 switch (default_button_emphasis) 1294 1294 { 1295 1295 case XmINTERNAL_HIGHLIGHT: … … 1365 1365 default_button_shadow_thickness = 1366 1366 eb->pushbutton.default_button_shadow_thickness; 1367 1367 1368 #if ndef LESSTIF_VERSION1368 #if !defined(LESSTIF_VERSION) && (XmVersion > 1002) 1369 1369 /* 1370 1370 * Compute location of bounding box to contain the 1371 1371 * defaultButtonShadow. -
src/Makefile
diff -Naur vim70-orig/src/Makefile vim70/src/Makefile
old new 2177 2177 cd $(SHADOWDIR)/xxd; ln -s ../../xxd/*.[ch] ../../xxd/Make* . 2178 2178 if test -d $(RSRC_DIR); then \ 2179 2179 cd $(SHADOWDIR); \ 2180 ln -s ../infplist.xml .; \ 2180 2181 ln -s ../$(RSRC_DIR) ../os_mac.rsr.hqx ../dehqx.py .; \ 2181 2182 fi 2182 2183 mkdir $(SHADOWDIR)/testdir -
src/mbyte.c
diff -Naur vim70-orig/src/mbyte.c vim70/src/mbyte.c
old new 311 311 312 312 #define IDX_MACROMAN 57 313 313 {"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 315 319 }; 316 320 317 321 /* … … 386 390 {"950", IDX_BIG5}, 387 391 #endif 388 392 {"mac", IDX_MACROMAN}, 393 {"mac-roman", IDX_MACROMAN}, 389 394 {NULL, 0} 390 395 }; 391 396 -
src/message.c
diff -Naur vim70-orig/src/message.c vim70/src/message.c
old new 4175 4175 str_arg_l = 0; 4176 4176 else 4177 4177 { 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. */ 4180 4180 #if SIZEOF_INT <= 2 4181 precision4181 char *q = memchr(str_arg, '\0', precision); 4182 4182 #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); 4185 4187 #endif 4186 );4187 4188 str_arg_l = (q == NULL) ? precision : q - str_arg; 4188 4189 } 4189 4190 break; -
src/option.c
diff -Naur vim70-orig/src/option.c vim70/src/option.c
old new 2294 2294 {(char_u *)0L, (char_u *)0L} 2295 2295 #endif 2296 2296 }, 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, 2298 2298 #ifdef FEAT_SPELL 2299 2299 (char_u *)&p_sps, PV_NONE, 2300 2300 {(char_u *)"best", (char_u *)0L} … … 5227 5227 case PV_STL: return &curwin->w_p_stl_flags; 5228 5228 #endif 5229 5229 #ifdef FEAT_EVAL 5230 # ifdef FEAT_FOLDING 5230 5231 case PV_FDE: return &curwin->w_p_fde_flags; 5231 5232 case PV_FDT: return &curwin->w_p_fdt_flags; 5233 # endif 5232 5234 # ifdef FEAT_BEVAL 5233 5235 case PV_BEXPR: return &curbuf->b_p_bexpr_flags; 5234 5236 # endif 5235 #endif5236 #if defined(FEAT_EVAL)5237 5237 # if defined(FEAT_CINDENT) 5238 5238 case PV_INDE: return &curbuf->b_p_inde_flags; 5239 5239 # endif -
src/spell.c
diff -Naur vim70-orig/src/spell.c vim70/src/spell.c
old new 2108 2108 * possible. */ 2109 2109 STRCPY(buf, line); 2110 2110 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); 2112 2113 2113 2114 p = buf + skip; 2114 2115 endp = buf + len; -
src/version.c
diff -Naur vim70-orig/src/version.c vim70/src/version.c
old new 667 667 static int included_patches[] = 668 668 { /* Add new patch number below this line */ 669 669 /**/ 670 17, 671 /**/ 672 16, 673 /**/ 674 15, 675 /**/ 676 14, 677 /**/ 678 13, 679 /**/ 680 12, 681 /**/ 682 11, 683 /**/ 684 10, 685 /**/ 686 9, 687 /**/ 688 8, 689 /**/ 690 7, 691 /**/ 692 6, 693 /**/ 694 4, 695 /**/ 696 3, 697 /**/ 698 2, 699 /**/ 700 1, 701 /**/ 670 702 0 671 703 }; 672 704
Note:
See TracBrowser
for help on using the repository browser.