source:
clfs-sysroot/patches/vim-7.1-fixes-2.patch@
ea624f8
Last change on this file since ea624f8 was f0590dc, checked in by , 17 years ago | |
---|---|
|
|
File size: 34.5 KB |
-
runtime/doc/change.txt
Submitted By: Jim Gifford (jim at linuxfromscratch dot org) Date: 07-23-2007 Initial Package Version: 7.1 Origin: Upstream Upstream Status: Applied Description: Contains all upstream patches up to 7.1.033 The following patches were skipped 0 003 007 diff -Naur vim71.orig/runtime/doc/change.txt vim71/runtime/doc/change.txt
old new 1571 1571 in their original order, right before the sorted 1572 1572 lines. 1573 1573 1574 If {pattern} is empty (e.g. // is specified), the 1575 last search pattern is used. This allows trying out 1576 a pattern first. 1577 1574 1578 Note that using ":sort" with ":global" doesn't sort the matching lines, it's 1575 1579 quite useless. 1576 1580 -
runtime/doc/eval.txt
diff -Naur vim71.orig/runtime/doc/eval.txt vim71/runtime/doc/eval.txt
old new 1 *eval.txt* For Vim version 7.1. Last change: 2007 May111 *eval.txt* For Vim version 7.1. Last change: 2007 Jul 11 2 2 3 3 4 4 VIM REFERENCE MANUAL by Bram Moolenaar … … 2020 2020 number of characters in the cursor line plus one) 2021 2021 'x position of mark x (if the mark is not set, 0 is 2022 2022 returned) 2023 Additionally {expr} can be [lnum, col]: a |List| with the line 2024 and column number. Most useful when the column is "$", to get 2025 the las column of a specific line. When "lnum" or "col" is 2026 out of range then col() returns zero. 2023 2027 To get the line number use |line()|. To get both use 2024 2028 |getpos()|. 2025 2029 For the screen column position use |virtcol()|. … … 2824 2828 given file {fname}. 2825 2829 If {fname} is a directory, 0 is returned. 2826 2830 If the file {fname} can't be found, -1 is returned. 2831 If the size of {fname} is too big to fit in a Number then -2 2832 is returned. 2827 2833 2828 2834 getfontname([{name}]) *getfontname()* 2829 2835 Without an argument returns the name of the normal font being … … 5022 5028 position, the returned Number will be the column at the end of 5023 5029 the <Tab>. For example, for a <Tab> in column 1, with 'ts' 5024 5030 set to 8, it returns 8. 5025 For the use of {expr} see |col()|. Additionally you can use 5026 [lnum, col]: a |List| with the line and column number. When 5027 "lnum" or "col" is out of range then virtcol() returns zero. 5028 When 'virtualedit' is used it can be [lnum, col, off], where 5031 For the byte position use |col()|. 5032 For the use of {expr} see |col()|. 5033 When 'virtualedit' is used {expr} can be [lnum, col, off], where 5029 5034 "off" is the offset in screen columns from the start of the 5030 5035 character. E.g., a position within a <Tab> or after the last 5031 5036 character. 5032 For the byte position use |col()|.5033 5037 When Virtual editing is active in the current mode, a position 5034 5038 beyond the end of the line can be returned. |'virtualedit'| 5035 5039 The accepted positions are: -
runtime/filetype.vim
diff -Naur vim71.orig/runtime/filetype.vim vim71/runtime/filetype.vim
old new 1 1 " Vim support file to detect file types 2 2 " 3 3 " Maintainer: Bram Moolenaar <Bram@vim.org> 4 " Last Change: 2007 May 1 04 " Last Change: 2007 May 15 5 5 6 6 " Listen very carefully, I will say this only once 7 7 if exists("did_load_filetypes") … … 1286 1286 au BufNewFile,BufRead *.it,*.ih setf ppwiz 1287 1287 1288 1288 " Oracle Pro*C/C++ 1289 au BufNewFile,BufRead .pc setf proc1289 au BufNewFile,BufRead *.pc setf proc 1290 1290 1291 1291 " Privoxy actions file 1292 1292 au BufNewFile,BufRead *.action setf privoxy -
src/auto/configure
diff -Naur vim71.orig/src/auto/configure vim71/src/auto/configure
old new 3843 3843 fi 3844 3844 3845 3845 if test "X$vi_cv_path_mzscheme_pfx" != "X"; then 3846 if test -f "${vi_cv_path_mzscheme_pfx}/lib/libmzgc.a"; then 3846 if test "x$MACOSX" = "xyes"; then 3847 MZSCHEME_LIBS="-framework PLT_MzScheme" 3848 elif test -f "${vi_cv_path_mzscheme_pfx}/lib/libmzgc.a"; then 3847 3849 MZSCHEME_LIBS="${vi_cv_path_mzscheme_pfx}/lib/libmzscheme.a ${vi_cv_path_mzscheme_pfx}/lib/libmzgc.a" 3848 3850 else 3849 3851 MZSCHEME_LIBS="-L${vi_cv_path_mzscheme_pfx}/lib -lmzscheme -lmzgc" -
src/buffer.c
diff -Naur vim71.orig/src/buffer.c vim71/src/buffer.c
old new 171 171 /* Put the cursor on the first line. */ 172 172 curwin->w_cursor.lnum = 1; 173 173 curwin->w_cursor.col = 0; 174 175 /* Set or reset 'modified' before executing autocommands, so that 176 * it can be changed there. */ 177 if (!readonlymode && !bufempty()) 178 changed(); 179 else if (retval != FAIL) 180 unchanged(curbuf, FALSE); 174 181 #ifdef FEAT_AUTOCMD 175 182 # ifdef FEAT_EVAL 176 183 apply_autocmds_retval(EVENT_STDINREADPOST, NULL, NULL, FALSE, … … 194 201 /* When reading stdin, the buffer contents always needs writing, so set 195 202 * the changed flag. Unless in readonly mode: "ls | gview -". 196 203 * When interrupted and 'cpoptions' contains 'i' set changed flag. */ 197 if (( read_stdin && !readonlymode && !bufempty())204 if ((got_int && vim_strchr(p_cpo, CPO_INTMOD) != NULL) 198 205 #ifdef FEAT_AUTOCMD 199 206 || modified_was_set /* ":set modified" used in autocmd */ 200 207 # ifdef FEAT_EVAL 201 208 || (aborting() && vim_strchr(p_cpo, CPO_INTMOD) != NULL) 202 209 # endif 203 210 #endif 204 || (got_int && vim_strchr(p_cpo, CPO_INTMOD) != NULL))211 ) 205 212 changed(); 206 else if (retval != FAIL )213 else if (retval != FAIL && !read_stdin) 207 214 unchanged(curbuf, FALSE); 208 215 save_file_ff(curbuf); /* keep this fileformat */ 209 216 -
src/configure.in
diff -Naur vim71.orig/src/configure.in vim71/src/configure.in
old new 423 423 fi 424 424 425 425 if test "X$vi_cv_path_mzscheme_pfx" != "X"; then 426 if test -f "${vi_cv_path_mzscheme_pfx}/lib/libmzgc.a"; then 426 if test "x$MACOSX" = "xyes"; then 427 MZSCHEME_LIBS="-framework PLT_MzScheme" 428 elif test -f "${vi_cv_path_mzscheme_pfx}/lib/libmzgc.a"; then 427 429 MZSCHEME_LIBS="${vi_cv_path_mzscheme_pfx}/lib/libmzscheme.a ${vi_cv_path_mzscheme_pfx}/lib/libmzgc.a" 428 430 else 429 431 MZSCHEME_LIBS="-L${vi_cv_path_mzscheme_pfx}/lib -lmzscheme -lmzgc" -
src/digraph.c
diff -Naur vim71.orig/src/digraph.c vim71/src/digraph.c
old new 2349 2349 2350 2350 if (*curbuf->b_p_keymap == NUL) 2351 2351 { 2352 /* Stop any active keymap and clear the table. */ 2352 /* Stop any active keymap and clear the table. Also remove 2353 * b:keymap_unload, as no keymap is active now. */ 2353 2354 keymap_unload(); 2355 do_cmdline_cmd((char_u *)"unlet! b:keymap_name"); 2354 2356 } 2355 2357 else 2356 2358 { … … 2500 2502 2501 2503 ga_clear(&curbuf->b_kmap_ga); 2502 2504 curbuf->b_kmap_state &= ~KEYMAP_LOADED; 2503 do_cmdline_cmd((char_u *)"unlet! b:keymap_name");2504 2505 #ifdef FEAT_WINDOWS 2505 2506 status_redraw_curbuf(); 2506 2507 #endif -
src/edit.c
diff -Naur vim71.orig/src/edit.c vim71/src/edit.c
old new 7215 7215 p = ml_get_curline(); 7216 7216 if (cin_iscase(p) || cin_isscopedecl(p) || cin_islabel(30)) 7217 7217 return TRUE; 7218 /* Need to get the line again after cin_islabel(). */ 7219 p = ml_get_curline(); 7218 7220 if (curwin->w_cursor.col > 2 7219 7221 && p[curwin->w_cursor.col - 1] == ':' 7220 7222 && p[curwin->w_cursor.col - 2] == ':') -
src/eval.c
diff -Naur vim71.orig/src/eval.c vim71/src/eval.c
old new 672 672 static void f_writefile __ARGS((typval_T *argvars, typval_T *rettv)); 673 673 674 674 static int list2fpos __ARGS((typval_T *arg, pos_T *posp, int *fnump)); 675 static pos_T *var2fpos __ARGS((typval_T *varp, int lnum, int *fnum));675 static pos_T *var2fpos __ARGS((typval_T *varp, int dollar_lnum, int *fnum)); 676 676 static int get_env_len __ARGS((char_u **arg)); 677 677 static int get_id_len __ARGS((char_u **arg)); 678 678 static int get_name_len __ARGS((char_u **arg, char_u **alias, int evaluate, int verbose)); … … 10136 10136 if (mch_isdir(fname)) 10137 10137 rettv->vval.v_number = 0; 10138 10138 else 10139 { 10139 10140 rettv->vval.v_number = (varnumber_T)st.st_size; 10141 10142 /* non-perfect check for overflow */ 10143 if ((off_t)rettv->vval.v_number != (off_t)st.st_size) 10144 rettv->vval.v_number = -2; 10145 } 10140 10146 } 10141 10147 else 10142 10148 rettv->vval.v_number = -1; … … 13919 13925 /* If 'n' flag is used: restore cursor position. */ 13920 13926 if (flags & SP_NOMOVE) 13921 13927 curwin->w_cursor = save_cursor; 13928 else 13929 curwin->w_set_curswant = TRUE; 13922 13930 theend: 13923 13931 p_ws = save_p_ws; 13924 13932 … … 16497 16505 * Returns NULL when there is an error. 16498 16506 */ 16499 16507 static pos_T * 16500 var2fpos(varp, lnum, fnum)16508 var2fpos(varp, dollar_lnum, fnum) 16501 16509 typval_T *varp; 16502 int lnum;/* TRUE when $ is last line */16510 int dollar_lnum; /* TRUE when $ is last line */ 16503 16511 int *fnum; /* set to fnum for '0, 'A, etc. */ 16504 16512 { 16505 16513 char_u *name; … … 16512 16520 list_T *l; 16513 16521 int len; 16514 16522 int error = FALSE; 16523 listitem_T *li; 16515 16524 16516 16525 l = varp->vval.v_list; 16517 16526 if (l == NULL) … … 16527 16536 if (error) 16528 16537 return NULL; 16529 16538 len = (long)STRLEN(ml_get(pos.lnum)); 16539 16540 /* We accept "$" for the column number: last column. */ 16541 li = list_find(l, 1L); 16542 if (li != NULL && li->li_tv.v_type == VAR_STRING 16543 && li->li_tv.vval.v_string != NULL 16544 && STRCMP(li->li_tv.vval.v_string, "$") == 0) 16545 pos.col = len + 1; 16546 16530 16547 /* Accept a position up to the NUL after the line. */ 16531 16548 if (pos.col == 0 || (int)pos.col > len + 1) 16532 16549 return NULL; /* invalid column number */ … … 16559 16576 pos.coladd = 0; 16560 16577 #endif 16561 16578 16562 if (name[0] == 'w' && lnum)16579 if (name[0] == 'w' && dollar_lnum) 16563 16580 { 16564 16581 pos.col = 0; 16565 16582 if (name[1] == '0') /* "w0": first visible line */ … … 16577 16594 } 16578 16595 else if (name[0] == '$') /* last column or line */ 16579 16596 { 16580 if ( lnum)16597 if (dollar_lnum) 16581 16598 { 16582 16599 pos.lnum = curbuf->b_ml.ml_line_count; 16583 16600 pos.col = 0; -
src/ex_cmds.c
diff -Naur vim71.orig/src/ex_cmds.c vim71/src/ex_cmds.c
old new 408 408 goto sortend; 409 409 } 410 410 *s = NUL; 411 regmatch.regprog = vim_regcomp(p + 1, RE_MAGIC); 411 /* Use last search pattern if sort pattern is empty. */ 412 if (s == p + 1 && last_search_pat() != NULL) 413 regmatch.regprog = vim_regcomp(last_search_pat(), RE_MAGIC); 414 else 415 regmatch.regprog = vim_regcomp(p + 1, RE_MAGIC); 412 416 if (regmatch.regprog == NULL) 413 417 goto sortend; 414 418 p = s; /* continue after the regexp */ … … 2912 2916 } 2913 2917 2914 2918 /* 2915 * Check if a buffer is read-only. Ask for overruling in a dialog. 2916 * Return TRUE and give an error message when the buffer is readonly. 2919 * Check if a buffer is read-only (either 'readonly' option is set or file is 2920 * read-only). Ask for overruling in a dialog. Return TRUE and give an error 2921 * message when the buffer is readonly. 2917 2922 */ 2918 2923 static int 2919 2924 check_readonly(forceit, buf) 2920 2925 int *forceit; 2921 2926 buf_T *buf; 2922 2927 { 2923 if (!*forceit && buf->b_p_ro) 2928 struct stat st; 2929 2930 /* Handle a file being readonly when the 'readonly' option is set or when 2931 * the file exists and permissions are read-only. 2932 * We will send 0777 to check_file_readonly(), as the "perm" variable is 2933 * important for device checks but not here. */ 2934 if (!*forceit && (buf->b_p_ro 2935 || (mch_stat((char *)buf->b_ffname, &st) >= 0 2936 && check_file_readonly(buf->b_ffname, 0777)))) 2924 2937 { 2925 2938 #if defined(FEAT_GUI_DIALOG) || defined(FEAT_CON_DIALOG) 2926 2939 if ((p_confirm || cmdmod.confirm) && buf->b_fname != NULL) 2927 2940 { 2928 2941 char_u buff[IOSIZE]; 2929 2942 2930 dialog_msg(buff, _("'readonly' option is set for \"%s\".\nDo you wish to write anyway?"), 2943 if (buf->b_p_ro) 2944 dialog_msg(buff, _("'readonly' option is set for \"%s\".\nDo you wish to write anyway?"), 2945 buf->b_fname); 2946 else 2947 dialog_msg(buff, _("File permissions of \"%s\" are read-only.\nIt may still be possible to write it.\nDo you wish to try?"), 2931 2948 buf->b_fname); 2932 2949 2933 2950 if (vim_dialog_yesno(VIM_QUESTION, NULL, buff, 2) == VIM_YES) … … 2941 2958 } 2942 2959 else 2943 2960 #endif 2961 if (buf->b_p_ro) 2944 2962 EMSG(_(e_readonly)); 2963 else 2964 EMSG2(_("E505: \"%s\" is read-only (add ! to override)"), 2965 buf->b_fname); 2945 2966 return TRUE; 2946 2967 } 2968 2947 2969 return FALSE; 2948 2970 } 2949 2971 … … 3367 3389 * was in this window (or another window). If not used 3368 3390 * before, reset the local window options to the global 3369 3391 * values. Also restores old folding stuff. */ 3370 get_winopts( buf);3392 get_winopts(curbuf); 3371 3393 #ifdef FEAT_SPELL 3372 3394 did_get_winopts = TRUE; 3373 3395 #endif … … 3649 3671 #ifdef FEAT_SPELL 3650 3672 /* If the window options were changed may need to set the spell language. 3651 3673 * Can only do this after the buffer has been properly setup. */ 3652 if (did_get_winopts && curwin->w_p_spell && * buf->b_p_spl != NUL)3653 did_set_spelllang( buf);3674 if (did_get_winopts && curwin->w_p_spell && *curbuf->b_p_spl != NUL) 3675 did_set_spelllang(curbuf); 3654 3676 #endif 3655 3677 3656 3678 if (command == NULL) -
src/ex_docmd.c
diff -Naur vim71.orig/src/ex_docmd.c vim71/src/ex_docmd.c
old new 133 133 static void get_flags __ARGS((exarg_T *eap)); 134 134 #if !defined(FEAT_PERL) || !defined(FEAT_PYTHON) || !defined(FEAT_TCL) \ 135 135 || !defined(FEAT_RUBY) || !defined(FEAT_MZSCHEME) 136 # define HAVE_EX_SCRIPT_NI 136 137 static void ex_script_ni __ARGS((exarg_T *eap)); 137 138 #endif 138 139 static char_u *invalid_range __ARGS((exarg_T *eap)); … … 2118 2119 #ifdef FEAT_USR_CMDS 2119 2120 !USER_CMDIDX(ea.cmdidx) && 2120 2121 #endif 2121 cmdnames[ea.cmdidx].cmd_func == ex_ni); 2122 (cmdnames[ea.cmdidx].cmd_func == ex_ni 2123 #ifdef HAVE_EX_SCRIPT_NI 2124 || cmdnames[ea.cmdidx].cmd_func == ex_script_ni 2125 #endif 2126 )); 2122 2127 2123 2128 #ifndef FEAT_EVAL 2124 2129 /* … … 3997 4002 eap->errmsg = (char_u *)N_("E319: Sorry, the command is not available in this version"); 3998 4003 } 3999 4004 4000 #if !defined(FEAT_PERL) || !defined(FEAT_PYTHON) || !defined(FEAT_TCL) \ 4001 || !defined(FEAT_RUBY) || !defined(FEAT_MZSCHEME) 4005 #ifdef HAVE_EX_SCRIPT_NI 4002 4006 /* 4003 4007 * Function called for script command which is Not Implemented. NI! 4004 4008 * Skips over ":perl <<EOF" constructs. -
src/ex_getln.c
diff -Naur vim71.orig/src/ex_getln.c vim71/src/ex_getln.c
old new 484 484 if (xpc.xp_context == EXPAND_MENUNAMES && p_wmnu) 485 485 { 486 486 /* Hitting <Down> after "emenu Name.": complete submenu */ 487 if (ccline.cmdbuff[ccline.cmdpos - 1] == '.' && c == K_DOWN) 487 if (c == K_DOWN && ccline.cmdpos > 0 488 && ccline.cmdbuff[ccline.cmdpos - 1] == '.') 488 489 c = p_wc; 489 490 else if (c == K_UP) 490 491 { … … 533 534 upseg[3] = PATHSEP; 534 535 upseg[4] = NUL; 535 536 536 if (ccline.cmdbuff[ccline.cmdpos - 1] == PATHSEP 537 && c == K_DOWN 538 && (ccline.cmdbuff[ccline.cmdpos - 2] != '.' 537 if (c == K_DOWN 538 && ccline.cmdpos > 0 539 && ccline.cmdbuff[ccline.cmdpos - 1] == PATHSEP 540 && (ccline.cmdpos < 3 541 || ccline.cmdbuff[ccline.cmdpos - 2] != '.' 539 542 || ccline.cmdbuff[ccline.cmdpos - 3] != '.')) 540 543 { 541 544 /* go down a directory */ … … 730 733 /* In Ex mode a backslash escapes a newline. */ 731 734 if (exmode_active 732 735 && c != ESC 733 && ccline.cmdpos > 0734 736 && ccline.cmdpos == ccline.cmdlen 737 && ccline.cmdpos > 0 735 738 && ccline.cmdbuff[ccline.cmdpos - 1] == '\\') 736 739 { 737 740 if (c == K_KENTER) -
src/fileio.c
diff -Naur vim71.orig/src/fileio.c vim71/src/fileio.c
old new 44 44 /* Is there any system that doesn't have access()? */ 45 45 #define USE_MCH_ACCESS 46 46 47 #if defined(sun) && defined(S_ISCHR) 48 # define OPEN_CHR_FILES 49 static int is_dev_fd_file(char_u *fname); 50 #endif 47 51 #ifdef FEAT_MBYTE 48 52 static char_u *next_fenc __ARGS((char_u **pp)); 49 53 # ifdef FEAT_EVAL … … 406 410 # ifdef S_ISSOCK 407 411 && !S_ISSOCK(perm) /* ... or socket */ 408 412 # endif 413 # ifdef OPEN_CHR_FILES 414 && !(S_ISCHR(perm) && is_dev_fd_file(fname)) 415 /* ... or a character special file named /dev/fd/<n> */ 416 # endif 409 417 ) 410 418 { 411 419 if (S_ISDIR(perm)) … … 424 432 */ 425 433 if (!p_odev && mch_nodetype(fname) == NODE_WRITABLE) 426 434 { 427 filemess(curbuf, fname, (char_u *)_("is a device (disabled with 'opendevice' option "), 0);435 filemess(curbuf, fname, (char_u *)_("is a device (disabled with 'opendevice' option)"), 0); 428 436 msg_end(); 429 437 msg_scroll = msg_save; 430 438 return FAIL; … … 2265 2273 } 2266 2274 # endif 2267 2275 # endif 2276 # ifdef OPEN_CHR_FILES 2277 if (S_ISCHR(perm)) /* or character special */ 2278 { 2279 STRCAT(IObuff, _("[character special]")); 2280 c = TRUE; 2281 } 2282 # endif 2268 2283 #endif 2269 2284 if (curbuf->b_p_ro) 2270 2285 { … … 2464 2479 return OK; 2465 2480 } 2466 2481 2482 #ifdef OPEN_CHR_FILES 2483 /* 2484 * Returns TRUE if the file name argument is of the form "/dev/fd/\d\+", 2485 * which is the name of files used for process substitution output by 2486 * some shells on some operating systems, e.g., bash on SunOS. 2487 * Do not accept "/dev/fd/[012]", opening these may hang Vim. 2488 */ 2489 static int 2490 is_dev_fd_file(fname) 2491 char_u *fname; 2492 { 2493 return (STRNCMP(fname, "/dev/fd/", 8) == 0 2494 && VIM_ISDIGIT(fname[8]) 2495 && *skipdigits(fname + 9) == NUL 2496 && (fname[9] != NUL 2497 || (fname[8] != '0' && fname[8] != '1' && fname[8] != '2'))); 2498 } 2499 #endif 2500 2467 2501 #ifdef FEAT_MBYTE 2468 2502 2469 2503 /* … … 2734 2768 #endif 2735 2769 2736 2770 /* 2771 * Return TRUE if a file appears to be read-only from the file permissions. 2772 */ 2773 int 2774 check_file_readonly(fname, perm) 2775 char_u *fname; /* full path to file */ 2776 int perm; /* known permissions on file */ 2777 { 2778 #ifndef USE_MCH_ACCESS 2779 int fd = 0; 2780 #endif 2781 2782 return ( 2783 #ifdef USE_MCH_ACCESS 2784 # ifdef UNIX 2785 (perm & 0222) == 0 || 2786 # endif 2787 mch_access((char *)fname, W_OK) 2788 #else 2789 (fd = mch_open((char *)fname, O_RDWR | O_EXTRA, 0)) < 0 2790 ? TRUE : (close(fd), FALSE) 2791 #endif 2792 ); 2793 } 2794 2795 2796 /* 2737 2797 * buf_write() - write to file "fname" lines "start" through "end" 2738 2798 * 2739 2799 * We do our own buffering here because fwrite() is so slow. … … 3219 3279 * Check if the file is really writable (when renaming the file to 3220 3280 * make a backup we won't discover it later). 3221 3281 */ 3222 file_readonly = ( 3223 # ifdef USE_MCH_ACCESS 3224 # ifdef UNIX 3225 (perm & 0222) == 0 || 3226 # endif 3227 mch_access((char *)fname, W_OK) 3228 # else 3229 (fd = mch_open((char *)fname, O_RDWR | O_EXTRA, 0)) < 0 3230 ? TRUE : (close(fd), FALSE) 3231 # endif 3232 ); 3282 file_readonly = check_file_readonly(fname, (int)perm); 3283 3233 3284 if (!forceit && file_readonly) 3234 3285 { 3235 3286 if (vim_strchr(p_cpo, CPO_FWRITE) != NULL) -
src/gui_gtk.c
diff -Naur vim71.orig/src/gui_gtk.c vim71/src/gui_gtk.c
old new 53 53 # ifdef bindtextdomain 54 54 # undef bindtextdomain 55 55 # endif 56 # ifdef bind textdomain_codeset57 # undef bind textdomain_codeset56 # ifdef bind_textdomain_codeset 57 # undef bind_textdomain_codeset 58 58 # endif 59 59 # if defined(FEAT_GETTEXT) && !defined(ENABLE_NLS) 60 60 # define ENABLE_NLS /* so the texts in the dialog boxes are translated */ -
src/gui_gtk_x11.c
diff -Naur vim71.orig/src/gui_gtk_x11.c vim71/src/gui_gtk_x11.c
old new 36 36 # ifdef bindtextdomain 37 37 # undef bindtextdomain 38 38 # endif 39 # ifdef bind textdomain_codeset40 # undef bind textdomain_codeset39 # ifdef bind_textdomain_codeset 40 # undef bind_textdomain_codeset 41 41 # endif 42 42 # if defined(FEAT_GETTEXT) && !defined(ENABLE_NLS) 43 43 # define ENABLE_NLS /* so the texts in the dialog boxes are translated */ … … 2188 2188 escaped_filename = vim_strsave_escaped(filename, escape_chars); 2189 2189 if (escaped_filename == NULL) 2190 2190 return FALSE; 2191 mksession_cmdline = g_strconcat("mksession ", (char *)escaped_filename, NULL); 2191 mksession_cmdline = g_strconcat("mksession ", (char *)escaped_filename, 2192 NULL); 2192 2193 vim_free(escaped_filename); 2194 2193 2195 /* 2194 2196 * Use a reasonable hardcoded set of 'sessionoptions' flags to avoid 2195 2197 * unpredictable effects when the session is saved automatically. Also, … … 2199 2201 */ 2200 2202 save_ssop_flags = ssop_flags; 2201 2203 ssop_flags = (SSOP_BLANK|SSOP_CURDIR|SSOP_FOLDS|SSOP_GLOBALS 2202 |SSOP_HELP|SSOP_OPTIONS|SSOP_WINSIZE );2204 |SSOP_HELP|SSOP_OPTIONS|SSOP_WINSIZE|SSOP_TABPAGES); 2203 2205 2204 2206 do_cmdline_cmd((char_u *)"let Save_VV_this_session = v:this_session"); 2205 2207 failed = (do_cmdline_cmd((char_u *)mksession_cmdline) == FAIL); -
src/if_mzsch.c
diff -Naur vim71.orig/src/if_mzsch.c vim71/src/if_mzsch.c
old new 308 308 static Scheme_Config *(*dll_scheme_current_config)(void); 309 309 static Scheme_Object *(*dll_scheme_char_string_to_byte_string) 310 310 (Scheme_Object *s); 311 static Scheme_Object *(*dll_scheme_char_string_to_path) 312 (Scheme_Object *s); 311 313 # endif 312 314 313 315 /* arrays are imported directly */ … … 398 400 # define scheme_current_config dll_scheme_current_config 399 401 # define scheme_char_string_to_byte_string \ 400 402 dll_scheme_char_string_to_byte_string 403 # define scheme_char_string_to_path \ 404 dll_scheme_char_string_to_path 401 405 # endif 402 406 403 407 typedef struct … … 498 502 {"scheme_current_config", (void **)&dll_scheme_current_config}, 499 503 {"scheme_char_string_to_byte_string", 500 504 (void **)&dll_scheme_char_string_to_byte_string}, 505 {"scheme_char_string_to_path", 506 (void **)&dll_scheme_char_string_to_path}, 501 507 # endif 502 508 {NULL, NULL}}; 503 509 … … 773 779 #ifdef MZSCHEME_COLLECTS 774 780 /* setup 'current-library-collection-paths' parameter */ 775 781 scheme_set_param(scheme_config, MZCONFIG_COLLECTION_PATHS, 776 scheme_make_pair(scheme_make_string(MZSCHEME_COLLECTS), 782 scheme_make_pair( 783 # if MZSCHEME_VERSION_MAJOR >= 299 784 scheme_char_string_to_path( 785 scheme_byte_string_to_char_string( 786 scheme_make_byte_string(MZSCHEME_COLLECTS))), 787 # else 788 scheme_make_string(MZSCHEME_COLLECTS), 789 # endif 777 790 scheme_null)); 778 791 #endif 779 792 #ifdef HAVE_SANDBOX -
src/main.c
diff -Naur vim71.orig/src/main.c vim71/src/main.c
old new 1360 1360 p = vim_getenv((char_u *)"VIMRUNTIME", &mustfree); 1361 1361 if (p != NULL && *p != NUL) 1362 1362 { 1363 STRCPY(NameBuff, p); 1364 STRCAT(NameBuff, "/lang"); 1363 vim_snprintf((char *)NameBuff, MAXPATHL, "%s/lang", p); 1365 1364 bindtextdomain(VIMPACKAGE, (char *)NameBuff); 1366 1365 } 1367 1366 if (mustfree) -
src/message.c
diff -Naur vim71.orig/src/message.c vim71/src/message.c
old new 3456 3456 /* advance to next hotkey and set default hotkey */ 3457 3457 #ifdef FEAT_MBYTE 3458 3458 if (has_mbyte) 3459 hotkp += (*mb_ptr2len)(hotkp);3459 hotkp += STRLEN(hotkp); 3460 3460 else 3461 3461 #endif 3462 3462 ++hotkp; 3463 (void)copy_char(r + 1, hotkp, TRUE);3463 hotkp[copy_char(r + 1, hotkp, TRUE)] = NUL; 3464 3464 if (dfltbutton) 3465 3465 --dfltbutton; 3466 3466 … … 3493 3493 *msgp++ = (dfltbutton == 1) ? ']' : ')'; 3494 3494 3495 3495 /* redefine hotkey */ 3496 (void)copy_char(r, hotkp, TRUE);3496 hotkp[copy_char(r, hotkp, TRUE)] = NUL; 3497 3497 } 3498 3498 } 3499 3499 else … … 3519 3519 *msgp++ = ':'; 3520 3520 *msgp++ = ' '; 3521 3521 *msgp = NUL; 3522 mb_ptr_adv(hotkp);3523 *hotkp = NUL;3524 3522 } 3525 3523 else 3526 3524 { … … 3555 3553 msgp = confirm_msg + 1 + STRLEN(message); 3556 3554 hotkp = hotk; 3557 3555 3558 /* define first default hotkey */ 3559 (void)copy_char(buttons, hotkp, TRUE); 3556 /* Define first default hotkey. Keep the hotkey string NUL 3557 * terminated to avoid reading past the end. */ 3558 hotkp[copy_char(buttons, hotkp, TRUE)] = NUL; 3560 3559 3561 3560 /* Remember where the choices start, displaying starts here when 3562 3561 * "hotkp" typed at the more prompt. */ -
src/normal.c
diff -Naur vim71.orig/src/normal.c vim71/src/normal.c
old new 6379 6379 */ 6380 6380 else if (cap->nchar == 'p' || cap->nchar == 'P') 6381 6381 { 6382 if (!checkclearop q(cap->oap))6382 if (!checkclearop(cap->oap)) 6383 6383 { 6384 6384 prep_redo_cmd(cap); 6385 6385 do_put(cap->oap->regname, -
src/ops.c
diff -Naur vim71.orig/src/ops.c vim71/src/ops.c
old new 3404 3404 3405 3405 #ifdef FEAT_VIRTUALEDIT 3406 3406 col += curwin->w_cursor.coladd; 3407 if (ve_flags == VE_ALL && curwin->w_cursor.coladd > 0) 3407 if (ve_flags == VE_ALL 3408 && (curwin->w_cursor.coladd > 0 3409 || endcol2 == curwin->w_cursor.col)) 3408 3410 { 3409 3411 if (dir == FORWARD && c == NUL) 3410 3412 ++col; -
src/option.c
diff -Naur vim71.orig/src/option.c vim71/src/option.c
old new 8219 8219 varp = get_varp(&options[opt_idx]); 8220 8220 if (varp != NULL) /* hidden option is not changed */ 8221 8221 { 8222 if (number == 0 && string != NULL) 8223 { 8224 int index; 8225 8226 /* Either we are given a string or we are setting option 8227 * to zero. */ 8228 for (index = 0; string[index] == '0'; ++index) 8229 ; 8230 if (string[index] != NUL || index == 0) 8231 { 8232 /* There's another character after zeros or the string 8233 * is empty. In both cases, we are trying to set a 8234 * num option using a string. */ 8235 EMSG3(_("E521: Number required: &%s = '%s'"), 8236 name, string); 8237 return; /* do nothing as we hit an error */ 8238 8239 } 8240 } 8222 8241 if (flags & P_NUM) 8223 8242 (void)set_num_option(opt_idx, varp, number, 8224 8243 NULL, 0, opt_flags); … … 10605 10624 file_ff_differs(buf) 10606 10625 buf_T *buf; 10607 10626 { 10627 /* In a buffer that was never loaded the options are not valid. */ 10628 if (buf->b_flags & BF_NEVERLOADED) 10629 return FALSE; 10608 10630 if ((buf->b_flags & BF_NEW) 10609 10631 && buf->b_ml.ml_line_count == 1 10610 10632 && *ml_get_buf(buf, (linenr_T)1, FALSE) == NUL) -
src/os_unix.h
diff -Naur vim71.orig/src/os_unix.h vim71/src/os_unix.h
old new 508 508 #if !defined(S_ISFIFO) && defined(S_IFIFO) 509 509 # define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO) 510 510 #endif 511 #if !defined(S_ISCHR) && defined(S_IFCHR) 512 # define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR) 513 #endif 511 514 512 515 /* Note: Some systems need both string.h and strings.h (Savage). However, 513 516 * some systems can't handle both, only use string.h in that case. */ -
src/popupmnu.c
diff -Naur vim71.orig/src/popupmnu.c vim71/src/popupmnu.c
old new 466 466 set_option_value((char_u *)"bh", 0L, 467 467 (char_u *)"wipe", OPT_LOCAL); 468 468 set_option_value((char_u *)"diff", 0L, 469 (char_u *)"", OPT_LOCAL);469 NULL, OPT_LOCAL); 470 470 } 471 471 } 472 472 if (res == OK) -
src/proto/fileio.pro
diff -Naur vim71.orig/src/proto/fileio.pro vim71/src/proto/fileio.pro
old new 2 2 void filemess __ARGS((buf_T *buf, char_u *name, char_u *s, int attr)); 3 3 int readfile __ARGS((char_u *fname, char_u *sfname, linenr_T from, linenr_T lines_to_skip, linenr_T lines_to_read, exarg_T *eap, int flags)); 4 4 int prep_exarg __ARGS((exarg_T *eap, buf_T *buf)); 5 int check_file_readonly __ARGS((char_u *fname, int perm)); 5 6 int buf_write __ARGS((buf_T *buf, char_u *fname, char_u *sfname, linenr_T start, linenr_T end, exarg_T *eap, int append, int forceit, int reset_changed, int filtering)); 6 7 void msg_add_fname __ARGS((buf_T *buf, char_u *fname)); 7 8 void msg_add_lines __ARGS((int insert_space, long lnum, long nchars)); -
src/quickfix.c
diff -Naur vim71.orig/src/quickfix.c vim71/src/quickfix.c
old new 2331 2331 set_option_value((char_u *)"bt", 0L, (char_u *)"quickfix", 2332 2332 OPT_LOCAL); 2333 2333 set_option_value((char_u *)"bh", 0L, (char_u *)"wipe", OPT_LOCAL); 2334 set_option_value((char_u *)"diff", 0L, (char_u *)"", OPT_LOCAL);2334 set_option_value((char_u *)"diff", 0L, NULL, OPT_LOCAL); 2335 2335 } 2336 2336 2337 2337 /* Only set the height when still in the same tab page and there is no -
src/screen.c
diff -Naur vim71.orig/src/screen.c vim71/src/screen.c
old new 3459 3459 #ifdef FEAT_DIFF 3460 3460 if (diff_hlf != (hlf_T)0) 3461 3461 { 3462 if (diff_hlf == HLF_CHD && ptr - line >= change_start) 3462 if (diff_hlf == HLF_CHD && ptr - line >= change_start 3463 && n_extra == 0) 3463 3464 diff_hlf = HLF_TXD; /* changed text */ 3464 if (diff_hlf == HLF_TXD && ptr - line > change_end) 3465 if (diff_hlf == HLF_TXD && ptr - line > change_end 3466 && n_extra == 0) 3465 3467 diff_hlf = HLF_CHD; /* changed line */ 3466 3468 line_attr = hl_attr(diff_hlf); 3467 3469 } -
src/search.c
diff -Naur vim71.orig/src/search.c vim71/src/search.c
old new 573 573 /* 574 574 * Start searching in current line, unless searching backwards and 575 575 * we're in column 0. 576 * If we are searching backwards, in column 0, and not including the 577 * current position, gain some efficiency by skipping back a line. 578 * Otherwise begin the search in the current line. 576 579 */ 577 if (dir == BACKWARD && start_pos.col == 0) 580 if (dir == BACKWARD && start_pos.col == 0 581 && (options & SEARCH_START) == 0) 578 582 { 579 583 lnum = pos->lnum - 1; 580 584 at_first_line = FALSE; … … 2124 2128 else if (!backwards) 2125 2129 inquote = TRUE; 2126 2130 } 2131 2132 /* ml_get() only keeps one line, need to get linep again */ 2133 linep = ml_get(pos.lnum); 2127 2134 } 2128 2135 } 2129 2136 } … … 2795 2802 i = inc_cursor(); 2796 2803 if (i == -1 || (i >= 1 && last_line)) /* started at last char in file */ 2797 2804 return FAIL; 2798 if (i == 1 && eol && count == 0) /* started at last char in line */2805 if (i >= 1 && eol && count == 0) /* started at last char in line */ 2799 2806 return OK; 2800 2807 2801 2808 /* … … 3600 3607 { 3601 3608 oap->start = start_pos; 3602 3609 oap->motion_type = MCHAR; 3610 oap->inclusive = FALSE; 3603 3611 if (sol) 3604 {3605 3612 incl(&curwin->w_cursor); 3606 oap->inclusive = FALSE; 3607 } 3608 else 3613 else if (lt(start_pos, curwin->w_cursor)) 3614 /* Include the character under the cursor. */ 3609 3615 oap->inclusive = TRUE; 3616 else 3617 /* End is before the start (no text in between <>, [], etc.): don't 3618 * operate on any text. */ 3619 curwin->w_cursor = start_pos; 3610 3620 } 3611 3621 3612 3622 return OK; … … 3734 3744 3735 3745 if (in_html_tag(FALSE)) 3736 3746 { 3737 /* cursor on start tag, move to just after it*/3747 /* cursor on start tag, move to its '>' */ 3738 3748 while (*ml_get_cursor() != '>') 3739 3749 if (inc_cursor() < 0) 3740 3750 break; … … 3838 3848 /* Exclude the start tag. */ 3839 3849 curwin->w_cursor = start_pos; 3840 3850 while (inc_cursor() >= 0) 3841 if (*ml_get_cursor() == '>' && lt(curwin->w_cursor, end_pos))3851 if (*ml_get_cursor() == '>') 3842 3852 { 3843 3853 inc_cursor(); 3844 3854 start_pos = curwin->w_cursor; … … 3860 3870 #ifdef FEAT_VISUAL 3861 3871 if (VIsual_active) 3862 3872 { 3863 if (*p_sel == 'e') 3873 /* If the end is before the start there is no text between tags, select 3874 * the char under the cursor. */ 3875 if (lt(end_pos, start_pos)) 3876 curwin->w_cursor = start_pos; 3877 else if (*p_sel == 'e') 3864 3878 ++curwin->w_cursor.col; 3865 3879 VIsual = start_pos; 3866 3880 VIsual_mode = 'v'; … … 3872 3886 { 3873 3887 oap->start = start_pos; 3874 3888 oap->motion_type = MCHAR; 3875 oap->inclusive = TRUE; 3889 if (lt(end_pos, start_pos)) 3890 { 3891 /* End is before the start: there is no text between tags; operate 3892 * on an empty area. */ 3893 curwin->w_cursor = start_pos; 3894 oap->inclusive = FALSE; 3895 } 3896 else 3897 oap->inclusive = TRUE; 3876 3898 } 3877 3899 retval = OK; 3878 3900 -
src/syntax.c
diff -Naur vim71.orig/src/syntax.c vim71/src/syntax.c
old new 4460 4460 current_syn_inc_tag = ++running_syn_inc_tag; 4461 4461 prev_toplvl_grp = curbuf->b_syn_topgrp; 4462 4462 curbuf->b_syn_topgrp = sgl_id; 4463 if (source ? do_source(eap->arg, FALSE, FALSE) == FAIL4464 : source_runtime(eap->arg, DOSO_NONE) == FAIL)4463 if (source ? do_source(eap->arg, FALSE, DOSO_NONE) == FAIL 4464 : source_runtime(eap->arg, TRUE) == FAIL) 4465 4465 EMSG2(_(e_notopen), eap->arg); 4466 4466 curbuf->b_syn_topgrp = prev_toplvl_grp; 4467 4467 current_syn_inc_tag = prev_syn_inc_tag; -
src/version.c
diff -Naur vim71.orig/src/version.c vim71/src/version.c
old new 667 667 static int included_patches[] = 668 668 { /* Add new patch number below this line */ 669 669 /**/ 670 33, 671 /**/ 672 32, 673 /**/ 674 31, 675 /**/ 676 30, 677 /**/ 678 29, 679 /**/ 680 28, 681 /**/ 682 27, 683 /**/ 684 26, 685 /**/ 686 25, 687 /**/ 688 24, 689 /**/ 690 23, 691 /**/ 692 22, 693 /**/ 694 21, 695 /**/ 696 20, 697 /**/ 698 19, 699 /**/ 700 18, 701 /**/ 702 17, 703 /**/ 704 16, 705 /**/ 706 15, 707 /**/ 708 14, 709 /**/ 710 13, 711 /**/ 712 12, 713 /**/ 714 11, 715 /**/ 716 10, 717 /**/ 718 9, 719 /**/ 720 8, 721 /**/ 722 6, 723 /**/ 724 5, 725 /**/ 726 4, 727 /**/ 728 2, 729 /**/ 730 1, 731 /**/ 670 732 0 671 733 }; 672 734 -
src/vimtutor
diff -Naur vim71.orig/src/vimtutor vim71/src/vimtutor
old new 39 39 # remove the copy of the tutor on exit 40 40 trap "rm -rf $TODELETE" 0 1 2 3 9 11 13 15 41 41 42 # Vim could be called "vim" or "vi". Also check for "vim6", for people who 43 # have Vim 5.x installed as "vim" and Vim 6.0 as "vim6". 44 testvim=`which vim6 2>/dev/null` 45 if test -f "$testvim"; then 46 VIM=vim6 47 else 48 testvim=`which vim` 42 # Vim could be called "vim" or "vi". Also check for "vimN", for people who 43 # have Vim installed with its version number. 44 # We anticipate up to a future Vim 8 version :-). 45 seq="vim vim8 vim75 vim74 vim73 vim72 vim71 vim70 vim7 vim6 vi" 46 for i in $seq; do 47 testvim=`which $i 2>/dev/null` 49 48 if test -f "$testvim"; then 50 VIM=vim 51 else 52 VIM=vi 49 VIM=$i 50 break 53 51 fi 52 done 53 54 # When no Vim version was found fall back to "vim", you'll get an error message 55 # below. 56 if test -z "$VIM"; then 57 VIM=vim 54 58 fi 55 59 56 60 # Use Vim to copy the tutor, it knows the value of $VIMRUNTIME
Note:
See TracBrowser
for help on using the repository browser.