From 8b9a1cd6ac83089fc79f058bd2d531359765221a Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Apr 10 2018 05:10:45 +0000 Subject: import vim-7.4.160-4.el7 --- diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..64fb33a --- /dev/null +++ b/.gitignore @@ -0,0 +1,11 @@ +SOURCES/7.4.027 +SOURCES/7.4.034 +SOURCES/7.4.045 +SOURCES/7.4.050 +SOURCES/7.4.064 +SOURCES/7.4.085 +SOURCES/7.4.131 +SOURCES/7.4.147 +SOURCES/Changelog.rpm +SOURCES/gvim64.png +SOURCES/vim-7.4.tar.bz2 diff --git a/.vim.metadata b/.vim.metadata new file mode 100644 index 0000000..c3279d5 --- /dev/null +++ b/.vim.metadata @@ -0,0 +1,11 @@ +8f869b21bca89e13481d955ac48e2bd5f0f793b3 SOURCES/7.4.027 +9d9545c166d8f87ee01eb7b2b2d60715d62d0572 SOURCES/7.4.034 +d317d8d98c8d9e5b82311cdebbe641e49769acd3 SOURCES/7.4.045 +48d1a060a2206945e7cc4a88bb6c827b150d4a40 SOURCES/7.4.050 +9a142b83f757be64a2abd3ecf91d358527a3558a SOURCES/7.4.064 +06eec99738521488b4d08d6c9160ba3d2d3456f9 SOURCES/7.4.085 +e75488de78a1174eb10f993b76f62d91633b9181 SOURCES/7.4.131 +feebf1c35bd31622a16b6f91c70d9380ff1ef268 SOURCES/7.4.147 +5ea81545fc28b57c490d25bda67a63a2838dd25b SOURCES/Changelog.rpm +c32bd520a1498b71ee9bbcddc7ad05df1565d085 SOURCES/gvim64.png +601abf7cc2b5ab186f40d8790e542f86afca86b7 SOURCES/vim-7.4.tar.bz2 diff --git a/README.md b/README.md deleted file mode 100644 index 0e7897f..0000000 --- a/README.md +++ /dev/null @@ -1,5 +0,0 @@ -The master branch has no content - -Look at the c7 branch if you are working with CentOS-7, or the c4/c5/c6 branch for CentOS-4, 5 or 6 - -If you find this file in a distro specific branch, it means that no content has been checked in yet diff --git a/SOURCES/7.4.001 b/SOURCES/7.4.001 new file mode 100644 index 0000000..5788972 --- /dev/null +++ b/SOURCES/7.4.001 @@ -0,0 +1,489 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.001 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.001 +Problem: Character classes such as [a-z] to not react to 'ignorecase'. + Breaks man page highlighting. (Mario Grgic) +Solution: Add separate items for classes that react to 'ignorecase'. Clean + up logic handling character classes. Add more tests. +Files: src/regexp_nfa.c, src/testdir/test64.in, src/testdir/test64.ok + + +*** ../vim-7.4.000/src/regexp_nfa.c 2013-08-01 18:27:51.000000000 +0200 +--- src/regexp_nfa.c 2013-08-14 11:49:50.000000000 +0200 +*************** +*** 29,34 **** +--- 29,37 ---- + # define NFA_REGEXP_DEBUG_LOG "nfa_regexp_debug.log" + #endif + ++ /* Added to NFA_ANY - NFA_NUPPER_IC to include a NL. */ ++ #define NFA_ADD_NL 31 ++ + enum + { + NFA_SPLIT = -1024, +*************** +*** 183,188 **** +--- 186,198 ---- + NFA_NLOWER, /* Match non-lowercase char */ + NFA_UPPER, /* Match uppercase char */ + NFA_NUPPER, /* Match non-uppercase char */ ++ NFA_LOWER_IC, /* Match [a-z] */ ++ NFA_NLOWER_IC, /* Match [^a-z] */ ++ NFA_UPPER_IC, /* Match [A-Z] */ ++ NFA_NUPPER_IC, /* Match [^A-Z] */ ++ ++ NFA_FIRST_NL = NFA_ANY + NFA_ADD_NL, ++ NFA_LAST_NL = NFA_NUPPER_IC + NFA_ADD_NL, + + NFA_CURSOR, /* Match cursor pos */ + NFA_LNUM, /* Match line number */ +*************** +*** 199,207 **** + NFA_MARK_LT, /* Match < mark */ + NFA_VISUAL, /* Match Visual area */ + +- NFA_FIRST_NL = NFA_ANY + ADD_NL, +- NFA_LAST_NL = NFA_NUPPER + ADD_NL, +- + /* Character classes [:alnum:] etc */ + NFA_CLASS_ALNUM, + NFA_CLASS_ALPHA, +--- 209,214 ---- +*************** +*** 578,583 **** +--- 585,592 ---- + * On failure, return 0 (=FAIL) + * Start points to the first char of the range, while end should point + * to the closing brace. ++ * Keep in mind that 'ignorecase' applies at execution time, thus [a-z] may ++ * need to be interpreted as [a-zA-Z]. + */ + static int + nfa_recognize_char_class(start, end, extra_newl) +*************** +*** 681,687 **** + return FAIL; + + if (newl == TRUE) +! extra_newl = ADD_NL; + + switch (config) + { +--- 690,696 ---- + return FAIL; + + if (newl == TRUE) +! extra_newl = NFA_ADD_NL; + + switch (config) + { +*************** +*** 710,722 **** + case CLASS_not | CLASS_az | CLASS_AZ: + return extra_newl + NFA_NALPHA; + case CLASS_az: +! return extra_newl + NFA_LOWER; + case CLASS_not | CLASS_az: +! return extra_newl + NFA_NLOWER; + case CLASS_AZ: +! return extra_newl + NFA_UPPER; + case CLASS_not | CLASS_AZ: +! return extra_newl + NFA_NUPPER; + } + return FAIL; + } +--- 719,731 ---- + case CLASS_not | CLASS_az | CLASS_AZ: + return extra_newl + NFA_NALPHA; + case CLASS_az: +! return extra_newl + NFA_LOWER_IC; + case CLASS_not | CLASS_az: +! return extra_newl + NFA_NLOWER_IC; + case CLASS_AZ: +! return extra_newl + NFA_UPPER_IC; + case CLASS_not | CLASS_AZ: +! return extra_newl + NFA_NUPPER_IC; + } + return FAIL; + } +*************** +*** 914,920 **** + break; + } + +! extra = ADD_NL; + + /* "\_[" is collection plus newline */ + if (c == '[') +--- 923,929 ---- + break; + } + +! extra = NFA_ADD_NL; + + /* "\_[" is collection plus newline */ + if (c == '[') +*************** +*** 970,976 **** + } + #endif + EMIT(nfa_classcodes[p - classchars]); +! if (extra == ADD_NL) + { + EMIT(NFA_NEWL); + EMIT(NFA_OR); +--- 979,985 ---- + } + #endif + EMIT(nfa_classcodes[p - classchars]); +! if (extra == NFA_ADD_NL) + { + EMIT(NFA_NEWL); + EMIT(NFA_OR); +*************** +*** 1240,1260 **** + { + /* + * Try to reverse engineer character classes. For example, +! * recognize that [0-9] stands for \d and [A-Za-z_] with \h, + * and perform the necessary substitutions in the NFA. + */ + result = nfa_recognize_char_class(regparse, endp, +! extra == ADD_NL); + if (result != FAIL) + { +! if (result >= NFA_DIGIT && result <= NFA_NUPPER) +! EMIT(result); +! else /* must be char class + newline */ + { +! EMIT(result - ADD_NL); + EMIT(NFA_NEWL); + EMIT(NFA_OR); + } + regparse = endp; + mb_ptr_adv(regparse); + return OK; +--- 1249,1269 ---- + { + /* + * Try to reverse engineer character classes. For example, +! * recognize that [0-9] stands for \d and [A-Za-z_] for \h, + * and perform the necessary substitutions in the NFA. + */ + result = nfa_recognize_char_class(regparse, endp, +! extra == NFA_ADD_NL); + if (result != FAIL) + { +! if (result >= NFA_FIRST_NL && result <= NFA_LAST_NL) + { +! EMIT(result - NFA_ADD_NL); + EMIT(NFA_NEWL); + EMIT(NFA_OR); + } ++ else ++ EMIT(result); + regparse = endp; + mb_ptr_adv(regparse); + return OK; +*************** +*** 1504,1510 **** + * collection, add an OR below. But not for negated + * range. */ + if (!negated) +! extra = ADD_NL; + } + else + { +--- 1513,1519 ---- + * collection, add an OR below. But not for negated + * range. */ + if (!negated) +! extra = NFA_ADD_NL; + } + else + { +*************** +*** 1537,1543 **** + EMIT(NFA_END_COLL); + + /* \_[] also matches \n but it's not negated */ +! if (extra == ADD_NL) + { + EMIT(reg_string ? NL : NFA_NEWL); + EMIT(NFA_OR); +--- 1546,1552 ---- + EMIT(NFA_END_COLL); + + /* \_[] also matches \n but it's not negated */ +! if (extra == NFA_ADD_NL) + { + EMIT(reg_string ? NL : NFA_NEWL); + EMIT(NFA_OR); +*************** +*** 2011,2017 **** + if (c >= NFA_FIRST_NL && c <= NFA_LAST_NL) + { + addnl = TRUE; +! c -= ADD_NL; + } + + STRCPY(code, ""); +--- 2020,2026 ---- + if (c >= NFA_FIRST_NL && c <= NFA_LAST_NL) + { + addnl = TRUE; +! c -= NFA_ADD_NL; + } + + STRCPY(code, ""); +*************** +*** 2217,2222 **** +--- 2226,2235 ---- + case NFA_NLOWER:STRCPY(code, "NFA_NLOWER"); break; + case NFA_UPPER: STRCPY(code, "NFA_UPPER"); break; + case NFA_NUPPER:STRCPY(code, "NFA_NUPPER"); break; ++ case NFA_LOWER_IC: STRCPY(code, "NFA_LOWER_IC"); break; ++ case NFA_NLOWER_IC: STRCPY(code, "NFA_NLOWER_IC"); break; ++ case NFA_UPPER_IC: STRCPY(code, "NFA_UPPER_IC"); break; ++ case NFA_NUPPER_IC: STRCPY(code, "NFA_NUPPER_IC"); break; + + default: + STRCPY(code, "CHAR(x)"); +*************** +*** 2687,2692 **** +--- 2700,2709 ---- + case NFA_NLOWER: + case NFA_UPPER: + case NFA_NUPPER: ++ case NFA_LOWER_IC: ++ case NFA_NLOWER_IC: ++ case NFA_UPPER_IC: ++ case NFA_NUPPER_IC: + /* possibly non-ascii */ + #ifdef FEAT_MBYTE + if (has_mbyte) +*************** +*** 3841,3846 **** +--- 3858,3867 ---- + case NFA_NLOWER: + case NFA_UPPER: + case NFA_NUPPER: ++ case NFA_LOWER_IC: ++ case NFA_NLOWER_IC: ++ case NFA_UPPER_IC: ++ case NFA_NUPPER_IC: + case NFA_START_COLL: + case NFA_START_NEG_COLL: + case NFA_NEWL: +*************** +*** 5872,5877 **** +--- 5893,5920 ---- + ADD_STATE_IF_MATCH(t->state); + break; + ++ case NFA_LOWER_IC: /* [a-z] */ ++ result = ri_lower(curc) || (ireg_ic && ri_upper(curc)); ++ ADD_STATE_IF_MATCH(t->state); ++ break; ++ ++ case NFA_NLOWER_IC: /* [^a-z] */ ++ result = curc != NUL ++ && !(ri_lower(curc) || (ireg_ic && ri_upper(curc))); ++ ADD_STATE_IF_MATCH(t->state); ++ break; ++ ++ case NFA_UPPER_IC: /* [A-Z] */ ++ result = ri_upper(curc) || (ireg_ic && ri_lower(curc)); ++ ADD_STATE_IF_MATCH(t->state); ++ break; ++ ++ case NFA_NUPPER_IC: /* ^[A-Z] */ ++ result = curc != NUL ++ && !(ri_upper(curc) || (ireg_ic && ri_lower(curc))); ++ ADD_STATE_IF_MATCH(t->state); ++ break; ++ + case NFA_BACKREF1: + case NFA_BACKREF2: + case NFA_BACKREF3: +*** ../vim-7.4.000/src/testdir/test64.in 2013-08-01 17:45:33.000000000 +0200 +--- src/testdir/test64.in 2013-08-14 11:50:11.000000000 +0200 +*************** +*** 289,303 **** + :call add(tl, [2, '.a\%$', " a\n "]) + :call add(tl, [2, '.a\%$', " a\n_a", "_a"]) + :" +! :"""" Test recognition of some character classes +! :call add(tl, [2, '[0-9]', '8', '8']) +! :call add(tl, [2, '[^0-9]', '8']) +! :call add(tl, [2, '[0-9a-fA-F]*', '0a7', '0a7']) +! :call add(tl, [2, '[^0-9A-Fa-f]\+', '0a7']) +! :call add(tl, [2, '[a-z_A-Z0-9]\+', 'aso_sfoij', 'aso_sfoij']) +! :call add(tl, [2, '[a-z]', 'a', 'a']) +! :call add(tl, [2, '[a-zA-Z]', 'a', 'a']) +! :call add(tl, [2, '[A-Z]', 'a']) + :call add(tl, [2, '\C[^A-Z]\+', 'ABCOIJDEOIFNSD jsfoij sa', ' jsfoij sa']) + :" + :"""" Tests for \z features +--- 289,317 ---- + :call add(tl, [2, '.a\%$', " a\n "]) + :call add(tl, [2, '.a\%$', " a\n_a", "_a"]) + :" +! :"""" Test recognition of character classes +! :call add(tl, [2, '[0-7]\+', 'x0123456789x', '01234567']) +! :call add(tl, [2, '[^0-7]\+', '0a;X+% 897', 'a;X+% 89']) +! :call add(tl, [2, '[0-9]\+', 'x0123456789x', '0123456789']) +! :call add(tl, [2, '[^0-9]\+', '0a;X+% 9', 'a;X+% ']) +! :call add(tl, [2, '[0-9a-fA-F]\+', 'x0189abcdefg', '0189abcdef']) +! :call add(tl, [2, '[^0-9A-Fa-f]\+', '0189g;X+% ab', 'g;X+% ']) +! :call add(tl, [2, '[a-z_A-Z0-9]\+', ';+aso_SfOij ', 'aso_SfOij']) +! :call add(tl, [2, '[^a-z_A-Z0-9]\+', 'aSo_;+% sfOij', ';+% ']) +! :call add(tl, [2, '[a-z_A-Z]\+', '0abyz_ABYZ;', 'abyz_ABYZ']) +! :call add(tl, [2, '[^a-z_A-Z]\+', 'abAB_09;+% yzYZ', '09;+% ']) +! :call add(tl, [2, '[a-z]\+', '0abcxyz1', 'abcxyz']) +! :call add(tl, [2, '[a-z]\+', 'AabxyzZ', 'abxyz']) +! :call add(tl, [2, '[^a-z]\+', 'a;X09+% x', ';X09+% ']) +! :call add(tl, [2, '[^a-z]\+', 'abX0;%yz', 'X0;%']) +! :call add(tl, [2, '[a-zA-Z]\+', '0abABxzXZ9', 'abABxzXZ']) +! :call add(tl, [2, '[^a-zA-Z]\+', 'ab09_;+ XZ', '09_;+ ']) +! :call add(tl, [2, '[A-Z]\+', 'aABXYZz', 'ABXYZ']) +! :call add(tl, [2, '[^A-Z]\+', 'ABx0;%YZ', 'x0;%']) +! :call add(tl, [2, '[a-z]\+\c', '0abxyzABXYZ;', 'abxyzABXYZ']) +! :call add(tl, [2, '[A-Z]\+\c', '0abABxzXZ9', 'abABxzXZ']) +! :call add(tl, [2, '\c[^a-z]\+', 'ab09_;+ XZ', '09_;+ ']) +! :call add(tl, [2, '\c[^A-Z]\+', 'ab09_;+ XZ', '09_;+ ']) + :call add(tl, [2, '\C[^A-Z]\+', 'ABCOIJDEOIFNSD jsfoij sa', ' jsfoij sa']) + :" + :"""" Tests for \z features +*** ../vim-7.4.000/src/testdir/test64.ok 2013-08-01 18:28:56.000000000 +0200 +--- src/testdir/test64.ok 2013-08-14 11:50:37.000000000 +0200 +*************** +*** 650,679 **** + OK 0 - .a\%$ + OK 1 - .a\%$ + OK 2 - .a\%$ +! OK 0 - [0-9] +! OK 1 - [0-9] +! OK 2 - [0-9] +! OK 0 - [^0-9] +! OK 1 - [^0-9] +! OK 2 - [^0-9] +! OK 0 - [0-9a-fA-F]* +! OK 1 - [0-9a-fA-F]* +! OK 2 - [0-9a-fA-F]* + OK 0 - [^0-9A-Fa-f]\+ + OK 1 - [^0-9A-Fa-f]\+ + OK 2 - [^0-9A-Fa-f]\+ + OK 0 - [a-z_A-Z0-9]\+ + OK 1 - [a-z_A-Z0-9]\+ + OK 2 - [a-z_A-Z0-9]\+ +! OK 0 - [a-z] +! OK 1 - [a-z] +! OK 2 - [a-z] +! OK 0 - [a-zA-Z] +! OK 1 - [a-zA-Z] +! OK 2 - [a-zA-Z] +! OK 0 - [A-Z] +! OK 1 - [A-Z] +! OK 2 - [A-Z] + OK 0 - \C[^A-Z]\+ + OK 1 - \C[^A-Z]\+ + OK 2 - \C[^A-Z]\+ +--- 650,721 ---- + OK 0 - .a\%$ + OK 1 - .a\%$ + OK 2 - .a\%$ +! OK 0 - [0-7]\+ +! OK 1 - [0-7]\+ +! OK 2 - [0-7]\+ +! OK 0 - [^0-7]\+ +! OK 1 - [^0-7]\+ +! OK 2 - [^0-7]\+ +! OK 0 - [0-9]\+ +! OK 1 - [0-9]\+ +! OK 2 - [0-9]\+ +! OK 0 - [^0-9]\+ +! OK 1 - [^0-9]\+ +! OK 2 - [^0-9]\+ +! OK 0 - [0-9a-fA-F]\+ +! OK 1 - [0-9a-fA-F]\+ +! OK 2 - [0-9a-fA-F]\+ + OK 0 - [^0-9A-Fa-f]\+ + OK 1 - [^0-9A-Fa-f]\+ + OK 2 - [^0-9A-Fa-f]\+ + OK 0 - [a-z_A-Z0-9]\+ + OK 1 - [a-z_A-Z0-9]\+ + OK 2 - [a-z_A-Z0-9]\+ +! OK 0 - [^a-z_A-Z0-9]\+ +! OK 1 - [^a-z_A-Z0-9]\+ +! OK 2 - [^a-z_A-Z0-9]\+ +! OK 0 - [a-z_A-Z]\+ +! OK 1 - [a-z_A-Z]\+ +! OK 2 - [a-z_A-Z]\+ +! OK 0 - [^a-z_A-Z]\+ +! OK 1 - [^a-z_A-Z]\+ +! OK 2 - [^a-z_A-Z]\+ +! OK 0 - [a-z]\+ +! OK 1 - [a-z]\+ +! OK 2 - [a-z]\+ +! OK 0 - [a-z]\+ +! OK 1 - [a-z]\+ +! OK 2 - [a-z]\+ +! OK 0 - [^a-z]\+ +! OK 1 - [^a-z]\+ +! OK 2 - [^a-z]\+ +! OK 0 - [^a-z]\+ +! OK 1 - [^a-z]\+ +! OK 2 - [^a-z]\+ +! OK 0 - [a-zA-Z]\+ +! OK 1 - [a-zA-Z]\+ +! OK 2 - [a-zA-Z]\+ +! OK 0 - [^a-zA-Z]\+ +! OK 1 - [^a-zA-Z]\+ +! OK 2 - [^a-zA-Z]\+ +! OK 0 - [A-Z]\+ +! OK 1 - [A-Z]\+ +! OK 2 - [A-Z]\+ +! OK 0 - [^A-Z]\+ +! OK 1 - [^A-Z]\+ +! OK 2 - [^A-Z]\+ +! OK 0 - [a-z]\+\c +! OK 1 - [a-z]\+\c +! OK 2 - [a-z]\+\c +! OK 0 - [A-Z]\+\c +! OK 1 - [A-Z]\+\c +! OK 2 - [A-Z]\+\c +! OK 0 - \c[^a-z]\+ +! OK 1 - \c[^a-z]\+ +! OK 2 - \c[^a-z]\+ +! OK 0 - \c[^A-Z]\+ +! OK 1 - \c[^A-Z]\+ +! OK 2 - \c[^A-Z]\+ + OK 0 - \C[^A-Z]\+ + OK 1 - \C[^A-Z]\+ + OK 2 - \C[^A-Z]\+ +*** ../vim-7.4.000/src/version.c 2013-08-10 13:29:20.000000000 +0200 +--- src/version.c 2013-08-14 11:54:57.000000000 +0200 +*************** +*** 729,730 **** +--- 729,732 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 1, + /**/ + +-- +How many light bulbs does it take to change a person? + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.002 b/SOURCES/7.4.002 new file mode 100644 index 0000000..d92f4de --- /dev/null +++ b/SOURCES/7.4.002 @@ -0,0 +1,77 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.002 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4b.002 +Problem: Pattern with two alternative look-behind matches does not match. + (Amadeus Demarzi) +Solution: When comparing PIMs also compare their state ID to see if they are + different. +Files: src/regexp_nfa.c, src/testdir/test64.in, src/testdir/test64.ok + + +*** ../vim-7.4.001/src/regexp_nfa.c 2013-08-14 12:05:54.000000000 +0200 +--- src/regexp_nfa.c 2013-08-14 13:12:09.000000000 +0200 +*************** +*** 3782,3787 **** +--- 3782,3790 ---- + if (two_unused) + /* one is used and two is not: not equal */ + return FALSE; ++ /* compare the state id */ ++ if (one->state->id != two->state->id) ++ return FALSE; + /* compare the position */ + if (REG_MULTI) + return one->end.pos.lnum == two->end.pos.lnum +*** ../vim-7.4.001/src/testdir/test64.in 2013-08-14 12:05:54.000000000 +0200 +--- src/testdir/test64.in 2013-08-14 12:58:38.000000000 +0200 +*************** +*** 421,426 **** +--- 421,429 ---- + :call add(tl, [2, '\(foo\)\@<=\>', 'barfoo', '', 'foo']) + :call add(tl, [2, '\(foo\)\@<=.*', 'foobar', 'bar', 'foo']) + :" ++ :" complicated look-behind match ++ :call add(tl, [2, '\(r\@<=\|\w\@ + :call add(tl, [2, '\(a*\)\@>a', 'aaaa']) + :call add(tl, [2, '\(a*\)\@>b', 'aaab', 'aaab', 'aaa']) +*** ../vim-7.4.001/src/testdir/test64.ok 2013-08-14 12:05:54.000000000 +0200 +--- src/testdir/test64.ok 2013-08-14 13:14:09.000000000 +0200 +*************** +*** 974,979 **** +--- 974,982 ---- + OK 0 - \(foo\)\@<=.* + OK 1 - \(foo\)\@<=.* + OK 2 - \(foo\)\@<=.* ++ OK 0 - \(r\@<=\|\w\@a + OK 1 - \(a*\)\@>a + OK 2 - \(a*\)\@>a +*** ../vim-7.4.001/src/version.c 2013-08-14 12:05:54.000000000 +0200 +--- src/version.c 2013-08-14 13:13:45.000000000 +0200 +*************** +*** 729,730 **** +--- 729,732 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 2, + /**/ + +-- +From "know your smileys": + :-)-O Smiling doctor with stethoscope + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.003 b/SOURCES/7.4.003 new file mode 100644 index 0000000..9aad3c8 --- /dev/null +++ b/SOURCES/7.4.003 @@ -0,0 +1,100 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.003 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.003 +Problem: Memory access error in Ruby syntax highlighting. (Christopher Chow) +Solution: Refresh stale pointer. (James McCoy) +Files: src/regexp_nfa.c + + +*** ../vim-7.4.002/src/regexp_nfa.c 2013-08-14 13:31:03.000000000 +0200 +--- src/regexp_nfa.c 2013-08-14 14:02:06.000000000 +0200 +*************** +*** 4120,4126 **** + sub = &subs->norm; + } + #ifdef FEAT_SYN_HL +! else if (state->c >= NFA_ZOPEN) + { + subidx = state->c - NFA_ZOPEN; + sub = &subs->synt; +--- 4120,4126 ---- + sub = &subs->norm; + } + #ifdef FEAT_SYN_HL +! else if (state->c >= NFA_ZOPEN && state->c <= NFA_ZOPEN9) + { + subidx = state->c - NFA_ZOPEN; + sub = &subs->synt; +*************** +*** 4189,4194 **** +--- 4189,4201 ---- + } + + subs = addstate(l, state->out, subs, pim, off); ++ /* "subs" may have changed, need to set "sub" again */ ++ #ifdef FEAT_SYN_HL ++ if (state->c >= NFA_ZOPEN && state->c <= NFA_ZOPEN9) ++ sub = &subs->synt; ++ else ++ #endif ++ sub = &subs->norm; + + if (save_in_use == -1) + { +*************** +*** 4237,4243 **** + sub = &subs->norm; + } + #ifdef FEAT_SYN_HL +! else if (state->c >= NFA_ZCLOSE) + { + subidx = state->c - NFA_ZCLOSE; + sub = &subs->synt; +--- 4244,4250 ---- + sub = &subs->norm; + } + #ifdef FEAT_SYN_HL +! else if (state->c >= NFA_ZCLOSE && state->c <= NFA_ZCLOSE9) + { + subidx = state->c - NFA_ZCLOSE; + sub = &subs->synt; +*************** +*** 4281,4286 **** +--- 4288,4300 ---- + } + + subs = addstate(l, state->out, subs, pim, off); ++ /* "subs" may have changed, need to set "sub" again */ ++ #ifdef FEAT_SYN_HL ++ if (state->c >= NFA_ZCLOSE && state->c <= NFA_ZCLOSE9) ++ sub = &subs->synt; ++ else ++ #endif ++ sub = &subs->norm; + + if (REG_MULTI) + sub->list.multi[subidx].end = save_lpos; +*** ../vim-7.4.002/src/version.c 2013-08-14 13:31:03.000000000 +0200 +--- src/version.c 2013-08-14 14:03:51.000000000 +0200 +*************** +*** 729,730 **** +--- 729,732 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 3, + /**/ + +-- +Where do you want to crash today? + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.004 b/SOURCES/7.4.004 new file mode 100644 index 0000000..f629d67 --- /dev/null +++ b/SOURCES/7.4.004 @@ -0,0 +1,232 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.004 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.004 +Problem: When closing a window fails ":bwipe" may hang. +Solution: Let win_close() return FAIL and break out of the loop. +Files: src/window.c, src/proto/window.pro, src/buffer.c + + +*** ../vim-7.4.003/src/window.c 2013-07-24 17:38:29.000000000 +0200 +--- src/window.c 2013-08-14 16:52:44.000000000 +0200 +*************** +*** 2172,2179 **** + * If "free_buf" is TRUE related buffer may be unloaded. + * + * Called by :quit, :close, :xit, :wq and findtag(). + */ +! void + win_close(win, free_buf) + win_T *win; + int free_buf; +--- 2172,2180 ---- + * If "free_buf" is TRUE related buffer may be unloaded. + * + * Called by :quit, :close, :xit, :wq and findtag(). ++ * Returns FAIL when the window was not closed. + */ +! int + win_close(win, free_buf) + win_T *win; + int free_buf; +*************** +*** 2190,2210 **** + if (last_window()) + { + EMSG(_("E444: Cannot close last window")); +! return; + } + + #ifdef FEAT_AUTOCMD + if (win->w_closing || (win->w_buffer != NULL && win->w_buffer->b_closing)) +! return; /* window is already being closed */ + if (win == aucmd_win) + { + EMSG(_("E813: Cannot close autocmd window")); +! return; + } + if ((firstwin == aucmd_win || lastwin == aucmd_win) && one_window()) + { + EMSG(_("E814: Cannot close window, only autocmd window would remain")); +! return; + } + #endif + +--- 2191,2211 ---- + if (last_window()) + { + EMSG(_("E444: Cannot close last window")); +! return FAIL; + } + + #ifdef FEAT_AUTOCMD + if (win->w_closing || (win->w_buffer != NULL && win->w_buffer->b_closing)) +! return FAIL; /* window is already being closed */ + if (win == aucmd_win) + { + EMSG(_("E813: Cannot close autocmd window")); +! return FAIL; + } + if ((firstwin == aucmd_win || lastwin == aucmd_win) && one_window()) + { + EMSG(_("E814: Cannot close window, only autocmd window would remain")); +! return FAIL; + } + #endif + +*************** +*** 2212,2218 **** + * and then close the window and the tab page to avoid that curwin and + * curtab are invalid while we are freeing memory. */ + if (close_last_window_tabpage(win, free_buf, prev_curtab)) +! return; + + /* When closing the help window, try restoring a snapshot after closing + * the window. Otherwise clear the snapshot, it's now invalid. */ +--- 2213,2219 ---- + * and then close the window and the tab page to avoid that curwin and + * curtab are invalid while we are freeing memory. */ + if (close_last_window_tabpage(win, free_buf, prev_curtab)) +! return FAIL; + + /* When closing the help window, try restoring a snapshot after closing + * the window. Otherwise clear the snapshot, it's now invalid. */ +*************** +*** 2240,2261 **** + win->w_closing = TRUE; + apply_autocmds(EVENT_BUFLEAVE, NULL, NULL, FALSE, curbuf); + if (!win_valid(win)) +! return; + win->w_closing = FALSE; + if (last_window()) +! return; + } + win->w_closing = TRUE; + apply_autocmds(EVENT_WINLEAVE, NULL, NULL, FALSE, curbuf); + if (!win_valid(win)) +! return; + win->w_closing = FALSE; + if (last_window()) +! return; + # ifdef FEAT_EVAL + /* autocmds may abort script processing */ + if (aborting()) +! return; + # endif + } + #endif +--- 2241,2262 ---- + win->w_closing = TRUE; + apply_autocmds(EVENT_BUFLEAVE, NULL, NULL, FALSE, curbuf); + if (!win_valid(win)) +! return FAIL; + win->w_closing = FALSE; + if (last_window()) +! return FAIL; + } + win->w_closing = TRUE; + apply_autocmds(EVENT_WINLEAVE, NULL, NULL, FALSE, curbuf); + if (!win_valid(win)) +! return FAIL; + win->w_closing = FALSE; + if (last_window()) +! return FAIL; + # ifdef FEAT_EVAL + /* autocmds may abort script processing */ + if (aborting()) +! return FAIL; + # endif + } + #endif +*************** +*** 2303,2309 **** + * other window or moved to another tab page. */ + else if (!win_valid(win) || last_window() || curtab != prev_curtab + || close_last_window_tabpage(win, free_buf, prev_curtab)) +! return; + + /* Free the memory used for the window and get the window that received + * the screen space. */ +--- 2304,2310 ---- + * other window or moved to another tab page. */ + else if (!win_valid(win) || last_window() || curtab != prev_curtab + || close_last_window_tabpage(win, free_buf, prev_curtab)) +! return FAIL; + + /* Free the memory used for the window and get the window that received + * the screen space. */ +*************** +*** 2383,2388 **** +--- 2384,2390 ---- + #endif + + redraw_all_later(NOT_VALID); ++ return OK; + } + + /* +*** ../vim-7.4.003/src/proto/window.pro 2013-08-10 13:37:30.000000000 +0200 +--- src/proto/window.pro 2013-08-14 16:52:50.000000000 +0200 +*************** +*** 9,15 **** + void win_equal __ARGS((win_T *next_curwin, int current, int dir)); + void close_windows __ARGS((buf_T *buf, int keep_curwin)); + int one_window __ARGS((void)); +! void win_close __ARGS((win_T *win, int free_buf)); + void win_close_othertab __ARGS((win_T *win, int free_buf, tabpage_T *tp)); + void win_free_all __ARGS((void)); + win_T *winframe_remove __ARGS((win_T *win, int *dirp, tabpage_T *tp)); +--- 9,15 ---- + void win_equal __ARGS((win_T *next_curwin, int current, int dir)); + void close_windows __ARGS((buf_T *buf, int keep_curwin)); + int one_window __ARGS((void)); +! int win_close __ARGS((win_T *win, int free_buf)); + void win_close_othertab __ARGS((win_T *win, int free_buf, tabpage_T *tp)); + void win_free_all __ARGS((void)); + win_T *winframe_remove __ARGS((win_T *win, int *dirp, tabpage_T *tp)); +*** ../vim-7.4.003/src/buffer.c 2013-07-17 16:39:00.000000000 +0200 +--- src/buffer.c 2013-08-14 16:54:34.000000000 +0200 +*************** +*** 1186,1192 **** + && !(curwin->w_closing || curwin->w_buffer->b_closing) + # endif + && (firstwin != lastwin || first_tabpage->tp_next != NULL)) +! win_close(curwin, FALSE); + #endif + + /* +--- 1186,1195 ---- + && !(curwin->w_closing || curwin->w_buffer->b_closing) + # endif + && (firstwin != lastwin || first_tabpage->tp_next != NULL)) +! { +! if (win_close(curwin, FALSE) == FAIL) +! break; +! } + #endif + + /* +*** ../vim-7.4.003/src/version.c 2013-08-14 14:18:37.000000000 +0200 +--- src/version.c 2013-08-14 17:10:23.000000000 +0200 +*************** +*** 729,730 **** +--- 729,732 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 4, + /**/ + +-- +From "know your smileys": + *<|:-) Santa Claus (Ho Ho Ho) + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.005 b/SOURCES/7.4.005 new file mode 100644 index 0000000..f85d1f0 --- /dev/null +++ b/SOURCES/7.4.005 @@ -0,0 +1,48 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.005 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.005 +Problem: Using "vaB" while 'virtualedit' is set selects the wrong area. + (Dimitar Dimitrov) +Solution: Reset coladd when finding a match. +Files: src/search.c + + +*** ../vim-7.4.004/src/search.c 2013-07-17 19:20:47.000000000 +0200 +--- src/search.c 2013-08-14 17:32:38.000000000 +0200 +*************** +*** 1760,1765 **** +--- 1760,1768 ---- + #endif + + pos = curwin->w_cursor; ++ #ifdef FEAT_VIRTUALEDIT ++ pos.coladd = 0; ++ #endif + linep = ml_get(pos.lnum); + + cpo_match = (vim_strchr(p_cpo, CPO_MATCH) != NULL); +*** ../vim-7.4.004/src/version.c 2013-08-14 17:11:14.000000000 +0200 +--- src/version.c 2013-08-14 17:38:05.000000000 +0200 +*************** +*** 729,730 **** +--- 729,732 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 5, + /**/ + +-- +You can't have everything. Where would you put it? + -- Steven Wright + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.006 b/SOURCES/7.4.006 new file mode 100644 index 0000000..55d3802 --- /dev/null +++ b/SOURCES/7.4.006 @@ -0,0 +1,66 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.006 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.006 +Problem: mkdir("foo/bar/", "p") gives an error message. (David Barnett) +Solution: Remove the trailing slash. (lcd) +Files: src/eval.c + + +*** ../vim-7.4.005/src/eval.c 2013-07-05 18:23:42.000000000 +0200 +--- src/eval.c 2013-08-22 12:00:28.000000000 +0200 +*************** +*** 14292,14297 **** +--- 14292,14301 ---- + return; + + dir = get_tv_string_buf(&argvars[0], buf); ++ if (*gettail(dir) == NUL) ++ /* remove trailing slashes */ ++ *gettail_sep(dir) = NUL; ++ + if (argvars[1].v_type != VAR_UNKNOWN) + { + if (argvars[2].v_type != VAR_UNKNOWN) +*************** +*** 14299,14305 **** + if (prot != -1 && STRCMP(get_tv_string(&argvars[1]), "p") == 0) + mkdir_recurse(dir, prot); + } +! rettv->vval.v_number = prot != -1 ? vim_mkdir_emsg(dir, prot) : 0; + } + #endif + +--- 14303,14309 ---- + if (prot != -1 && STRCMP(get_tv_string(&argvars[1]), "p") == 0) + mkdir_recurse(dir, prot); + } +! rettv->vval.v_number = prot == -1 ? FAIL : vim_mkdir_emsg(dir, prot); + } + #endif + +*** ../vim-7.4.005/src/version.c 2013-08-14 17:45:25.000000000 +0200 +--- src/version.c 2013-08-22 12:02:46.000000000 +0200 +*************** +*** 729,730 **** +--- 729,732 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 6, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +97. Your mother tells you to remember something, and you look for + a File/Save command. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.007 b/SOURCES/7.4.007 new file mode 100644 index 0000000..5495ffb --- /dev/null +++ b/SOURCES/7.4.007 @@ -0,0 +1,95 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.007 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.007 +Problem: Creating a preview window on startup leaves the screen layout in a + messed up state. (Marius Gedminas) +Solution: Don't change firstwin. (Christian Brabandt) +Files: src/main.c + + +*** ../vim-7.4.006/src/main.c 2013-07-03 12:36:49.000000000 +0200 +--- src/main.c 2013-08-22 14:02:39.000000000 +0200 +*************** +*** 2727,2732 **** +--- 2727,2733 ---- + int arg_idx; /* index in argument list */ + int i; + int advance = TRUE; ++ win_T *win; + + # ifdef FEAT_AUTOCMD + /* +*************** +*** 2816,2839 **** + # ifdef FEAT_AUTOCMD + --autocmd_no_enter; + # endif + #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX) +! /* +! * Avoid making a preview window the current window. +! */ +! if (firstwin->w_p_pvw) + { +! win_T *win; +! +! for (win = firstwin; win != NULL; win = win->w_next) +! if (!win->w_p_pvw) +! { +! firstwin = win; +! break; +! } + } + #endif +! /* make the first window the current window */ +! win_enter(firstwin, FALSE); + + # ifdef FEAT_AUTOCMD + --autocmd_no_leave; +--- 2817,2838 ---- + # ifdef FEAT_AUTOCMD + --autocmd_no_enter; + # endif ++ ++ /* make the first window the current window */ ++ win = firstwin; + #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX) +! /* Avoid making a preview window the current window. */ +! while (win->w_p_pvw) + { +! win = win->w_next; +! if (win == NULL) +! { +! win = firstwin; +! break; +! } + } + #endif +! win_enter(win, FALSE); + + # ifdef FEAT_AUTOCMD + --autocmd_no_leave; +*** ../vim-7.4.006/src/version.c 2013-08-22 12:06:50.000000000 +0200 +--- src/version.c 2013-08-22 14:04:11.000000000 +0200 +*************** +*** 729,730 **** +--- 729,732 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 7, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +105. When someone asks you for your address, you tell them your URL. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.008 b/SOURCES/7.4.008 new file mode 100644 index 0000000..6abd493 --- /dev/null +++ b/SOURCES/7.4.008 @@ -0,0 +1,71 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.008 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.008 +Problem: New regexp engine can't be interrupted. +Solution: Check for CTRL-C pressed. (Yasuhiro Matsumoto) +Files: src/regexp_nfa.c, src/regexp.c + + +*** ../vim-7.4.007/src/regexp_nfa.c 2013-08-14 14:18:37.000000000 +0200 +--- src/regexp_nfa.c 2013-08-25 16:55:56.000000000 +0200 +*************** +*** 5089,5094 **** +--- 5089,5100 ---- + return FALSE; + } + #endif ++ /* Some patterns may take a long time to match, especially when using ++ * recursive_regmatch(). Allow interrupting them with CTRL-C. */ ++ fast_breakcheck(); ++ if (got_int) ++ return FALSE; ++ + nfa_match = FALSE; + + /* Allocate memory for the lists of nodes. */ +*** ../vim-7.4.007/src/regexp.c 2013-08-01 18:31:30.000000000 +0200 +--- src/regexp.c 2013-08-25 16:57:35.000000000 +0200 +*************** +*** 4311,4318 **** + */ + for (;;) + { +! /* Some patterns may cause a long time to match, even though they are not +! * illegal. E.g., "\([a-z]\+\)\+Q". Allow breaking them with CTRL-C. */ + fast_breakcheck(); + + #ifdef DEBUG +--- 4311,4318 ---- + */ + for (;;) + { +! /* Some patterns may take a long time to match, e.g., "\([a-z]\+\)\+Q". +! * Allow interrupting them with CTRL-C. */ + fast_breakcheck(); + + #ifdef DEBUG +*** ../vim-7.4.007/src/version.c 2013-08-22 14:14:23.000000000 +0200 +--- src/version.c 2013-08-25 16:57:51.000000000 +0200 +*************** +*** 729,730 **** +--- 729,732 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 8, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +124. You begin conversations with, "Who is your internet service provider?" + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.009 b/SOURCES/7.4.009 new file mode 100644 index 0000000..f5e5fa6 --- /dev/null +++ b/SOURCES/7.4.009 @@ -0,0 +1,64 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.009 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.009 +Problem: When a file was not decrypted (yet), writing it may destroy the + contents. +Solution: Mark the file as readonly until decryption was done. (Christian + Brabandt) +Files: src/fileio.c + + +*** ../vim-7.4.008/src/fileio.c 2013-08-05 21:58:03.000000000 +0200 +--- src/fileio.c 2013-08-25 17:45:27.000000000 +0200 +*************** +*** 2926,2934 **** +--- 2926,2939 ---- + int *did_ask; /* flag: whether already asked for key */ + { + int method = crypt_method_from_magic((char *)ptr, *sizep); ++ int b_p_ro = curbuf->b_p_ro; + + if (method >= 0) + { ++ /* Mark the buffer as read-only until the decryption has taken place. ++ * Avoids accidentally overwriting the file with garbage. */ ++ curbuf->b_p_ro = TRUE; ++ + set_crypt_method(curbuf, method); + if (method > 0) + (void)blowfish_self_test(); +*************** +*** 2977,2982 **** +--- 2982,2989 ---- + *sizep -= CRYPT_MAGIC_LEN + salt_len + seed_len; + mch_memmove(ptr, ptr + CRYPT_MAGIC_LEN + salt_len + seed_len, + (size_t)*sizep); ++ /* Restore the read-only flag. */ ++ curbuf->b_p_ro = b_p_ro; + } + } + /* When starting to edit a new file which does not have encryption, clear +*** ../vim-7.4.008/src/version.c 2013-08-25 17:01:36.000000000 +0200 +--- src/version.c 2013-08-25 17:44:30.000000000 +0200 +*************** +*** 729,730 **** +--- 729,732 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 9, + /**/ + +-- +I have a watch cat! Just break in and she'll watch. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.010 b/SOURCES/7.4.010 new file mode 100644 index 0000000..fee6ba5 --- /dev/null +++ b/SOURCES/7.4.010 @@ -0,0 +1,79 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.010 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.010 (after 7.4.006) +Problem: Crash with invalid argument to mkdir(). +Solution: Check for empty string. (lcd47) +Files: src/eval.c + + +*** ../vim-7.4.009/src/eval.c 2013-08-22 12:06:50.000000000 +0200 +--- src/eval.c 2013-08-30 15:47:47.000000000 +0200 +*************** +*** 14292,14309 **** + return; + + dir = get_tv_string_buf(&argvars[0], buf); +! if (*gettail(dir) == NUL) +! /* remove trailing slashes */ +! *gettail_sep(dir) = NUL; +! +! if (argvars[1].v_type != VAR_UNKNOWN) + { +! if (argvars[2].v_type != VAR_UNKNOWN) +! prot = get_tv_number_chk(&argvars[2], NULL); +! if (prot != -1 && STRCMP(get_tv_string(&argvars[1]), "p") == 0) +! mkdir_recurse(dir, prot); + } +- rettv->vval.v_number = prot == -1 ? FAIL : vim_mkdir_emsg(dir, prot); + } + #endif + +--- 14292,14314 ---- + return; + + dir = get_tv_string_buf(&argvars[0], buf); +! if (*dir == NUL) +! rettv->vval.v_number = FAIL; +! else + { +! if (*gettail(dir) == NUL) +! /* remove trailing slashes */ +! *gettail_sep(dir) = NUL; +! +! if (argvars[1].v_type != VAR_UNKNOWN) +! { +! if (argvars[2].v_type != VAR_UNKNOWN) +! prot = get_tv_number_chk(&argvars[2], NULL); +! if (prot != -1 && STRCMP(get_tv_string(&argvars[1]), "p") == 0) +! mkdir_recurse(dir, prot); +! } +! rettv->vval.v_number = prot == -1 ? FAIL : vim_mkdir_emsg(dir, prot); + } + } + #endif + +*** ../vim-7.4.009/src/version.c 2013-08-25 17:46:05.000000000 +0200 +--- src/version.c 2013-08-30 15:48:37.000000000 +0200 +*************** +*** 729,730 **** +--- 729,732 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 10, + /**/ + +-- +I wish there was a knob on the TV to turn up the intelligence. +There's a knob called "brightness", but it doesn't seem to work. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.011 b/SOURCES/7.4.011 new file mode 100644 index 0000000..efff82c --- /dev/null +++ b/SOURCES/7.4.011 @@ -0,0 +1,100 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.011 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.011 +Problem: Cannot find out if "acl" and "xpm" features are supported. +Solution: Add "acl" and "xpm" to the list of features. (Ken Takata) +Files: src/eval.c, src/version.c + + +*** ../vim-7.4.010/src/eval.c 2013-08-30 16:00:04.000000000 +0200 +--- src/eval.c 2013-08-30 16:34:12.000000000 +0200 +*************** +*** 12135,12140 **** +--- 12135,12143 ---- + #ifndef CASE_INSENSITIVE_FILENAME + "fname_case", + #endif ++ #ifdef HAVE_ACL ++ "acl", ++ #endif + #ifdef FEAT_ARABIC + "arabic", + #endif +*************** +*** 12538,12544 **** + "xfontset", + #endif + #ifdef FEAT_XPM_W32 +! "xpm_w32", + #endif + #ifdef USE_XSMP + "xsmp", +--- 12541,12552 ---- + "xfontset", + #endif + #ifdef FEAT_XPM_W32 +! "xpm", +! "xpm_w32", /* for backward compatibility */ +! #else +! # if defined(HAVE_XPM) +! "xpm", +! # endif + #endif + #ifdef USE_XSMP + "xsmp", +*** ../vim-7.4.010/src/version.c 2013-08-30 16:00:04.000000000 +0200 +--- src/version.c 2013-08-30 16:34:37.000000000 +0200 +*************** +*** 60,65 **** +--- 60,70 ---- + + static char *(features[]) = + { ++ #ifdef HAVE_ACL ++ "+acl", ++ #else ++ "-acl", ++ #endif + #ifdef AMIGA /* only for Amiga systems */ + # ifdef FEAT_ARP + "+ARP", +*************** +*** 721,726 **** +--- 726,737 ---- + # else + "-xpm_w32", + # endif ++ #else ++ # ifdef HAVE_XPM ++ "+xpm", ++ # else ++ "-xpm", ++ # endif + #endif + NULL + }; +*** ../vim-7.4.010/src/version.c 2013-08-30 16:00:04.000000000 +0200 +--- src/version.c 2013-08-30 16:34:37.000000000 +0200 +*************** +*** 729,730 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 11, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +141. You'd rather go to http://www.weather.com/ than look out your window. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.012 b/SOURCES/7.4.012 new file mode 100644 index 0000000..f831442 --- /dev/null +++ b/SOURCES/7.4.012 @@ -0,0 +1,202 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.012 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.012 +Problem: MS-Windows: resolving shortcut does not work properly with + multi-byte characters. +Solution: Use wide system functions. (Ken Takata) +Files: src/os_mswin.c + + +*** ../vim-7.4.011/src/os_mswin.c 2013-06-16 16:41:11.000000000 +0200 +--- src/os_mswin.c 2013-08-30 16:43:23.000000000 +0200 +*************** +*** 1761,1769 **** + IPersistFile *ppf = NULL; + OLECHAR wsz[MAX_PATH]; + WIN32_FIND_DATA ffd; // we get those free of charge +! TCHAR buf[MAX_PATH]; // could have simply reused 'wsz'... + char_u *rfname = NULL; + int len; + + /* Check if the file name ends in ".lnk". Avoid calling + * CoCreateInstance(), it's quite slow. */ +--- 1761,1773 ---- + IPersistFile *ppf = NULL; + OLECHAR wsz[MAX_PATH]; + WIN32_FIND_DATA ffd; // we get those free of charge +! CHAR buf[MAX_PATH]; // could have simply reused 'wsz'... + char_u *rfname = NULL; + int len; ++ # ifdef FEAT_MBYTE ++ IShellLinkW *pslw = NULL; ++ WIN32_FIND_DATAW ffdw; // we get those free of charge ++ # endif + + /* Check if the file name ends in ".lnk". Avoid calling + * CoCreateInstance(), it's quite slow. */ +*************** +*** 1775,1792 **** + + CoInitialize(NULL); + + // create a link manager object and request its interface + hr = CoCreateInstance( + &CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER, + &IID_IShellLink, (void**)&psl); + if (hr != S_OK) +! goto shortcut_error; + + // Get a pointer to the IPersistFile interface. + hr = psl->lpVtbl->QueryInterface( + psl, &IID_IPersistFile, (void**)&ppf); + if (hr != S_OK) +! goto shortcut_error; + + // full path string must be in Unicode. + MultiByteToWideChar(CP_ACP, 0, fname, -1, wsz, MAX_PATH); +--- 1779,1840 ---- + + CoInitialize(NULL); + ++ # ifdef FEAT_MBYTE ++ if (enc_codepage >= 0 && (int)GetACP() != enc_codepage) ++ { ++ // create a link manager object and request its interface ++ hr = CoCreateInstance( ++ &CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER, ++ &IID_IShellLinkW, (void**)&pslw); ++ if (hr == S_OK) ++ { ++ WCHAR *p = enc_to_utf16(fname, NULL); ++ ++ if (p != NULL) ++ { ++ // Get a pointer to the IPersistFile interface. ++ hr = pslw->lpVtbl->QueryInterface( ++ pslw, &IID_IPersistFile, (void**)&ppf); ++ if (hr != S_OK) ++ goto shortcut_errorw; ++ ++ // "load" the name and resolve the link ++ hr = ppf->lpVtbl->Load(ppf, p, STGM_READ); ++ if (hr != S_OK) ++ goto shortcut_errorw; ++ # if 0 // This makes Vim wait a long time if the target does not exist. ++ hr = pslw->lpVtbl->Resolve(pslw, NULL, SLR_NO_UI); ++ if (hr != S_OK) ++ goto shortcut_errorw; ++ # endif ++ ++ // Get the path to the link target. ++ ZeroMemory(wsz, MAX_PATH * sizeof(WCHAR)); ++ hr = pslw->lpVtbl->GetPath(pslw, wsz, MAX_PATH, &ffdw, 0); ++ if (hr == S_OK && wsz[0] != NUL) ++ rfname = utf16_to_enc(wsz, NULL); ++ ++ shortcut_errorw: ++ vim_free(p); ++ if (hr == S_OK) ++ goto shortcut_end; ++ } ++ } ++ /* Retry with non-wide function (for Windows 98). */ ++ } ++ # endif + // create a link manager object and request its interface + hr = CoCreateInstance( + &CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER, + &IID_IShellLink, (void**)&psl); + if (hr != S_OK) +! goto shortcut_end; + + // Get a pointer to the IPersistFile interface. + hr = psl->lpVtbl->QueryInterface( + psl, &IID_IPersistFile, (void**)&ppf); + if (hr != S_OK) +! goto shortcut_end; + + // full path string must be in Unicode. + MultiByteToWideChar(CP_ACP, 0, fname, -1, wsz, MAX_PATH); +*************** +*** 1794,1805 **** + // "load" the name and resolve the link + hr = ppf->lpVtbl->Load(ppf, wsz, STGM_READ); + if (hr != S_OK) +! goto shortcut_error; +! #if 0 // This makes Vim wait a long time if the target doesn't exist. + hr = psl->lpVtbl->Resolve(psl, NULL, SLR_NO_UI); + if (hr != S_OK) +! goto shortcut_error; +! #endif + + // Get the path to the link target. + ZeroMemory(buf, MAX_PATH); +--- 1842,1853 ---- + // "load" the name and resolve the link + hr = ppf->lpVtbl->Load(ppf, wsz, STGM_READ); + if (hr != S_OK) +! goto shortcut_end; +! # if 0 // This makes Vim wait a long time if the target doesn't exist. + hr = psl->lpVtbl->Resolve(psl, NULL, SLR_NO_UI); + if (hr != S_OK) +! goto shortcut_end; +! # endif + + // Get the path to the link target. + ZeroMemory(buf, MAX_PATH); +*************** +*** 1807,1818 **** + if (hr == S_OK && buf[0] != NUL) + rfname = vim_strsave(buf); + +! shortcut_error: + // Release all interface pointers (both belong to the same object) + if (ppf != NULL) + ppf->lpVtbl->Release(ppf); + if (psl != NULL) + psl->lpVtbl->Release(psl); + + CoUninitialize(); + return rfname; +--- 1855,1870 ---- + if (hr == S_OK && buf[0] != NUL) + rfname = vim_strsave(buf); + +! shortcut_end: + // Release all interface pointers (both belong to the same object) + if (ppf != NULL) + ppf->lpVtbl->Release(ppf); + if (psl != NULL) + psl->lpVtbl->Release(psl); ++ # ifdef FEAT_MBYTE ++ if (pslw != NULL) ++ pslw->lpVtbl->Release(pslw); ++ # endif + + CoUninitialize(); + return rfname; +*** ../vim-7.4.011/src/version.c 2013-08-30 16:35:41.000000000 +0200 +--- src/version.c 2013-08-30 16:39:40.000000000 +0200 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 12, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +142. You dream about creating the world's greatest web site. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.013 b/SOURCES/7.4.013 new file mode 100644 index 0000000..dcbe0fb --- /dev/null +++ b/SOURCES/7.4.013 @@ -0,0 +1,99 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.013 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.013 +Problem: File name buffer too small for utf-8. +Solution: Use character count instead of byte count. (Ken Takata) +Files: src/os_mswin.c + + +*** ../vim-7.4.012/src/os_mswin.c 2013-08-30 16:44:15.000000000 +0200 +--- src/os_mswin.c 2013-08-30 16:47:54.000000000 +0200 +*************** +*** 456,462 **** +--- 456,469 ---- + int + mch_isFullName(char_u *fname) + { ++ #ifdef FEAT_MBYTE ++ /* WinNT and later can use _MAX_PATH wide characters for a pathname, which ++ * means that the maximum pathname is _MAX_PATH * 3 bytes when 'enc' is ++ * UTF-8. */ ++ char szName[_MAX_PATH * 3 + 1]; ++ #else + char szName[_MAX_PATH + 1]; ++ #endif + + /* A name like "d:/foo" and "//server/share" is absolute */ + if ((fname[0] && fname[1] == ':' && (fname[2] == '/' || fname[2] == '\\')) +*************** +*** 464,470 **** + return TRUE; + + /* A name that can't be made absolute probably isn't absolute. */ +! if (mch_FullName(fname, szName, _MAX_PATH, FALSE) == FAIL) + return FALSE; + + return pathcmp(fname, szName, -1) == 0; +--- 471,477 ---- + return TRUE; + + /* A name that can't be made absolute probably isn't absolute. */ +! if (mch_FullName(fname, szName, sizeof(szName) - 1, FALSE) == FAIL) + return FALSE; + + return pathcmp(fname, szName, -1) == 0; +*************** +*** 498,507 **** + int + vim_stat(const char *name, struct stat *stp) + { + char buf[_MAX_PATH + 1]; + char *p; + +! vim_strncpy((char_u *)buf, (char_u *)name, _MAX_PATH); + p = buf + strlen(buf); + if (p > buf) + mb_ptr_back(buf, p); +--- 505,521 ---- + int + vim_stat(const char *name, struct stat *stp) + { ++ #ifdef FEAT_MBYTE ++ /* WinNT and later can use _MAX_PATH wide characters for a pathname, which ++ * means that the maximum pathname is _MAX_PATH * 3 bytes when 'enc' is ++ * UTF-8. */ ++ char buf[_MAX_PATH * 3 + 1]; ++ #else + char buf[_MAX_PATH + 1]; ++ #endif + char *p; + +! vim_strncpy((char_u *)buf, (char_u *)name, sizeof(buf) - 1); + p = buf + strlen(buf); + if (p > buf) + mb_ptr_back(buf, p); +*** ../vim-7.4.012/src/version.c 2013-08-30 16:44:15.000000000 +0200 +--- src/version.c 2013-08-30 16:47:36.000000000 +0200 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 13, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +143. You dream in pallettes of 216 websafe colors. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.014 b/SOURCES/7.4.014 new file mode 100644 index 0000000..f655433 --- /dev/null +++ b/SOURCES/7.4.014 @@ -0,0 +1,102 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.014 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.014 +Problem: MS-Windows: check for writing to device does not work. +Solution: Fix #ifdefs. (Ken Takata) +Files: src/fileio.c + + +*** ../vim-7.4.013/src/fileio.c 2013-08-25 17:46:05.000000000 +0200 +--- src/fileio.c 2013-08-30 16:56:46.000000000 +0200 +*************** +*** 428,440 **** + } + } + +- #ifdef UNIX +- /* +- * On Unix it is possible to read a directory, so we have to +- * check for it before the mch_open(). +- */ + if (!read_stdin && !read_buffer) + { + perm = mch_getperm(fname); + if (perm >= 0 && !S_ISREG(perm) /* not a regular file ... */ + # ifdef S_ISFIFO +--- 428,440 ---- + } + } + + if (!read_stdin && !read_buffer) + { ++ #ifdef UNIX ++ /* ++ * On Unix it is possible to read a directory, so we have to ++ * check for it before the mch_open(). ++ */ + perm = mch_getperm(fname); + if (perm >= 0 && !S_ISREG(perm) /* not a regular file ... */ + # ifdef S_ISFIFO +*************** +*** 457,464 **** + msg_scroll = msg_save; + return FAIL; + } +! +! # if defined(MSDOS) || defined(MSWIN) || defined(OS2) + /* + * MS-Windows allows opening a device, but we will probably get stuck + * trying to read it. +--- 457,464 ---- + msg_scroll = msg_save; + return FAIL; + } +! #endif +! #if defined(MSDOS) || defined(MSWIN) || defined(OS2) + /* + * MS-Windows allows opening a device, but we will probably get stuck + * trying to read it. +*************** +*** 470,478 **** + msg_scroll = msg_save; + return FAIL; + } +- # endif +- } + #endif + + /* Set default or forced 'fileformat' and 'binary'. */ + set_file_options(set_options, eap); +--- 470,477 ---- + msg_scroll = msg_save; + return FAIL; + } + #endif ++ } + + /* Set default or forced 'fileformat' and 'binary'. */ + set_file_options(set_options, eap); +*** ../vim-7.4.013/src/version.c 2013-08-30 16:51:15.000000000 +0200 +--- src/version.c 2013-08-30 16:54:33.000000000 +0200 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 14, + /**/ + +-- +Drink wet cement and get really stoned. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.015 b/SOURCES/7.4.015 new file mode 100644 index 0000000..e8b284d --- /dev/null +++ b/SOURCES/7.4.015 @@ -0,0 +1,106 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.015 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.015 +Problem: MS-Windows: Detecting node type does not work for multi-byte + characters. +Solution: Use wide character function when needed. (Ken Takata) +Files: src/os_win32.c + + +*** ../vim-7.4.014/src/os_win32.c 2013-08-10 12:39:12.000000000 +0200 +--- src/os_win32.c 2013-08-30 17:09:47.000000000 +0200 +*************** +*** 3107,3112 **** +--- 3107,3115 ---- + { + HANDLE hFile; + int type; ++ #ifdef FEAT_MBYTE ++ WCHAR *wn = NULL; ++ #endif + + /* We can't open a file with a name "\\.\con" or "\\.\prn" and trying to + * read from it later will cause Vim to hang. Thus return NODE_WRITABLE +*************** +*** 3114,3127 **** + if (STRNCMP(name, "\\\\.\\", 4) == 0) + return NODE_WRITABLE; + +! hFile = CreateFile(name, /* file name */ +! GENERIC_WRITE, /* access mode */ +! 0, /* share mode */ +! NULL, /* security descriptor */ +! OPEN_EXISTING, /* creation disposition */ +! 0, /* file attributes */ +! NULL); /* handle to template file */ + + if (hFile == INVALID_HANDLE_VALUE) + return NODE_NORMAL; + +--- 3117,3157 ---- + if (STRNCMP(name, "\\\\.\\", 4) == 0) + return NODE_WRITABLE; + +! #ifdef FEAT_MBYTE +! if (enc_codepage >= 0 && (int)GetACP() != enc_codepage) +! { +! wn = enc_to_utf16(name, NULL); +! if (wn != NULL) +! { +! hFile = CreateFileW(wn, /* file name */ +! GENERIC_WRITE, /* access mode */ +! 0, /* share mode */ +! NULL, /* security descriptor */ +! OPEN_EXISTING, /* creation disposition */ +! 0, /* file attributes */ +! NULL); /* handle to template file */ +! if (hFile == INVALID_HANDLE_VALUE +! && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) +! { +! /* Retry with non-wide function (for Windows 98). */ +! vim_free(wn); +! wn = NULL; +! } +! } +! } +! if (wn == NULL) +! #endif +! hFile = CreateFile(name, /* file name */ +! GENERIC_WRITE, /* access mode */ +! 0, /* share mode */ +! NULL, /* security descriptor */ +! OPEN_EXISTING, /* creation disposition */ +! 0, /* file attributes */ +! NULL); /* handle to template file */ + ++ #ifdef FEAT_MBYTE ++ vim_free(wn); ++ #endif + if (hFile == INVALID_HANDLE_VALUE) + return NODE_NORMAL; + +*** ../vim-7.4.014/src/version.c 2013-08-30 17:06:56.000000000 +0200 +--- src/version.c 2013-08-30 17:09:35.000000000 +0200 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 15, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +144. You eagerly await the update of the "Cool Site of the Day." + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.016 b/SOURCES/7.4.016 new file mode 100644 index 0000000..c58c605 --- /dev/null +++ b/SOURCES/7.4.016 @@ -0,0 +1,221 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.016 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.016 +Problem: MS-Windows: File name completion doesn't work properly with + Chinese characters. (Yue Wu) +Solution: Add fname_casew(). (Ken Takata) +Files: src/os_win32.c + + +*** ../vim-7.4.015/src/os_win32.c 2013-08-30 17:11:29.000000000 +0200 +--- src/os_win32.c 2013-08-30 17:28:30.000000000 +0200 +*************** +*** 2500,2508 **** +--- 2500,2624 ---- + } + + ++ #ifdef FEAT_MBYTE ++ /* ++ * fname_casew(): Wide version of fname_case(). Set the case of the file name, ++ * if it already exists. When "len" is > 0, also expand short to long ++ * filenames. ++ * Return FAIL if wide functions are not available, OK otherwise. ++ * NOTE: much of this is identical to fname_case(), keep in sync! ++ */ ++ static int ++ fname_casew( ++ WCHAR *name, ++ int len) ++ { ++ WCHAR szTrueName[_MAX_PATH + 2]; ++ WCHAR szTrueNameTemp[_MAX_PATH + 2]; ++ WCHAR *ptrue, *ptruePrev; ++ WCHAR *porig, *porigPrev; ++ int flen; ++ WIN32_FIND_DATAW fb; ++ HANDLE hFind; ++ int c; ++ int slen; ++ ++ flen = (int)wcslen(name); ++ if (flen > _MAX_PATH) ++ return OK; ++ ++ /* slash_adjust(name) not needed, already adjusted by fname_case(). */ ++ ++ /* Build the new name in szTrueName[] one component at a time. */ ++ porig = name; ++ ptrue = szTrueName; ++ ++ if (iswalpha(porig[0]) && porig[1] == L':') ++ { ++ /* copy leading drive letter */ ++ *ptrue++ = *porig++; ++ *ptrue++ = *porig++; ++ *ptrue = NUL; /* in case nothing follows */ ++ } ++ ++ while (*porig != NUL) ++ { ++ /* copy \ characters */ ++ while (*porig == psepc) ++ *ptrue++ = *porig++; ++ ++ ptruePrev = ptrue; ++ porigPrev = porig; ++ while (*porig != NUL && *porig != psepc) ++ { ++ *ptrue++ = *porig++; ++ } ++ *ptrue = NUL; ++ ++ /* To avoid a slow failure append "\*" when searching a directory, ++ * server or network share. */ ++ wcscpy(szTrueNameTemp, szTrueName); ++ slen = (int)wcslen(szTrueNameTemp); ++ if (*porig == psepc && slen + 2 < _MAX_PATH) ++ wcscpy(szTrueNameTemp + slen, L"\\*"); ++ ++ /* Skip "", "." and "..". */ ++ if (ptrue > ptruePrev ++ && (ptruePrev[0] != L'.' ++ || (ptruePrev[1] != NUL ++ && (ptruePrev[1] != L'.' || ptruePrev[2] != NUL))) ++ && (hFind = FindFirstFileW(szTrueNameTemp, &fb)) ++ != INVALID_HANDLE_VALUE) ++ { ++ c = *porig; ++ *porig = NUL; ++ ++ /* Only use the match when it's the same name (ignoring case) or ++ * expansion is allowed and there is a match with the short name ++ * and there is enough room. */ ++ if (_wcsicoll(porigPrev, fb.cFileName) == 0 ++ || (len > 0 ++ && (_wcsicoll(porigPrev, fb.cAlternateFileName) == 0 ++ && (int)(ptruePrev - szTrueName) ++ + (int)wcslen(fb.cFileName) < len))) ++ { ++ wcscpy(ptruePrev, fb.cFileName); ++ ++ /* Look for exact match and prefer it if found. Must be a ++ * long name, otherwise there would be only one match. */ ++ while (FindNextFileW(hFind, &fb)) ++ { ++ if (*fb.cAlternateFileName != NUL ++ && (wcscoll(porigPrev, fb.cFileName) == 0 ++ || (len > 0 ++ && (_wcsicoll(porigPrev, ++ fb.cAlternateFileName) == 0 ++ && (int)(ptruePrev - szTrueName) ++ + (int)wcslen(fb.cFileName) < len)))) ++ { ++ wcscpy(ptruePrev, fb.cFileName); ++ break; ++ } ++ } ++ } ++ FindClose(hFind); ++ *porig = c; ++ ptrue = ptruePrev + wcslen(ptruePrev); ++ } ++ else if (hFind == INVALID_HANDLE_VALUE ++ && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) ++ return FAIL; ++ } ++ ++ wcscpy(name, szTrueName); ++ return OK; ++ } ++ #endif ++ + /* + * fname_case(): Set the case of the file name, if it already exists. + * When "len" is > 0, also expand short to long filenames. ++ * NOTE: much of this is identical to fname_casew(), keep in sync! + */ + void + fname_case( +*************** +*** 2520,2530 **** + int slen; + + flen = (int)STRLEN(name); +! if (flen == 0 || flen > _MAX_PATH) + return; + + slash_adjust(name); + + /* Build the new name in szTrueName[] one component at a time. */ + porig = name; + ptrue = szTrueName; +--- 2636,2679 ---- + int slen; + + flen = (int)STRLEN(name); +! if (flen == 0) + return; + + slash_adjust(name); + ++ #ifdef FEAT_MBYTE ++ if (enc_codepage >= 0 && (int)GetACP() != enc_codepage) ++ { ++ WCHAR *p = enc_to_utf16(name, NULL); ++ ++ if (p != NULL) ++ { ++ char_u *q; ++ WCHAR buf[_MAX_PATH + 2]; ++ ++ wcscpy(buf, p); ++ vim_free(p); ++ ++ if (fname_casew(buf, (len > 0) ? _MAX_PATH : 0) == OK) ++ { ++ q = utf16_to_enc(buf, NULL); ++ if (q != NULL) ++ { ++ vim_strncpy(name, q, (len > 0) ? len - 1 : flen); ++ vim_free(q); ++ return; ++ } ++ } ++ } ++ /* Retry with non-wide function (for Windows 98). */ ++ } ++ #endif ++ ++ /* If 'enc' is utf-8, flen can be larger than _MAX_PATH. ++ * So we should check this after calling wide function. */ ++ if (flen > _MAX_PATH) ++ return; ++ + /* Build the new name in szTrueName[] one component at a time. */ + porig = name; + ptrue = szTrueName; +*** ../vim-7.4.015/src/version.c 2013-08-30 17:11:29.000000000 +0200 +--- src/version.c 2013-08-30 17:15:06.000000000 +0200 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 16, + /**/ + +-- +Fingers not found - Pound head on keyboard to continue. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.017 b/SOURCES/7.4.017 new file mode 100644 index 0000000..7d7fad8 --- /dev/null +++ b/SOURCES/7.4.017 @@ -0,0 +1,78 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.017 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.017 +Problem: ":help !!" does not find the "!!" tag in the help file. (Ben + Fritz) +Solution: When reading the start of the tags file do parse lines that are + not header lines. +Files: src/tag.c + + +*** ../vim-7.4.016/src/tag.c 2013-06-15 22:26:26.000000000 +0200 +--- src/tag.c 2013-09-05 12:03:38.000000000 +0200 +*************** +*** 1797,1809 **** + */ + if (state == TS_START) + { +! /* The header ends when the line sorts below "!_TAG_". +! * There may be non-header items before the header though, +! * e.g. "!" itself. When case is folded lower case letters +! * sort before "_". */ + if (STRNCMP(lbuf, "!_TAG_", 6) <= 0 + || (lbuf[0] == '!' && ASCII_ISLOWER(lbuf[1]))) + { + /* + * Read header line. + */ +--- 1797,1812 ---- + */ + if (state == TS_START) + { +! /* The header ends when the line sorts below "!_TAG_". When +! * case is folded lower case letters sort before "_". */ + if (STRNCMP(lbuf, "!_TAG_", 6) <= 0 + || (lbuf[0] == '!' && ASCII_ISLOWER(lbuf[1]))) + { ++ if (STRNCMP(lbuf, "!_TAG_", 6) != 0) ++ /* Non-header item before the header, e.g. "!" itself. ++ */ ++ goto parse_line; ++ + /* + * Read header line. + */ +*************** +*** 1898,1903 **** +--- 1901,1907 ---- + #endif + } + ++ parse_line: + /* + * Figure out where the different strings are in this line. + * For "normal" tags: Do a quick check if the tag matches. +*** ../vim-7.4.016/src/version.c 2013-08-30 17:29:10.000000000 +0200 +--- src/version.c 2013-09-05 12:02:01.000000000 +0200 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 17, + /**/ + +-- +An error has occurred. Hit any user to continue. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.018 b/SOURCES/7.4.018 new file mode 100644 index 0000000..2214c30 --- /dev/null +++ b/SOURCES/7.4.018 @@ -0,0 +1,45 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.018 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.018 +Problem: When completing item becomes unselected. (Shougo Matsu) +Solution: Revert patch 7.3.1269. +Files: src/edit.c + + +*** ../vim-7.4.017/src/edit.c 2013-07-04 20:22:25.000000000 +0200 +--- src/edit.c 2013-09-05 12:39:53.000000000 +0200 +*************** +*** 3467,3473 **** + } + + compl_enter_selects = !compl_used_match; +- compl_shown_match = compl_curr_match = compl_first_match; + + /* Show the popup menu with a different set of matches. */ + ins_compl_show_pum(); +--- 3467,3472 ---- +*** ../vim-7.4.017/src/version.c 2013-09-05 12:06:26.000000000 +0200 +--- src/version.c 2013-09-05 12:40:34.000000000 +0200 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 18, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +169. You hire a housekeeper for your home page. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.019 b/SOURCES/7.4.019 new file mode 100644 index 0000000..b1532c1 --- /dev/null +++ b/SOURCES/7.4.019 @@ -0,0 +1,61 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.019 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.019 +Problem: MS-Windows: File name completion doesn't work properly with + Chinese characters. (Yue Wu) +Solution: Take care of multi-byte characters when looking for the start of + the file name. (Ken Takata) +Files: src/edit.c + + +*** ../vim-7.4.018/src/edit.c 2013-09-05 12:49:48.000000000 +0200 +--- src/edit.c 2013-09-05 13:45:27.000000000 +0200 +*************** +*** 5183,5190 **** + } + else if (ctrl_x_mode == CTRL_X_FILES) + { +! while (--startcol >= 0 && vim_isfilec(line[startcol])) +! ; + compl_col += ++startcol; + compl_length = (int)curs_col - startcol; + compl_pattern = addstar(line + compl_col, compl_length, +--- 5183,5196 ---- + } + else if (ctrl_x_mode == CTRL_X_FILES) + { +! char_u *p = line + startcol; +! +! /* Go back to just before the first filename character. */ +! mb_ptr_back(line, p); +! while (vim_isfilec(PTR2CHAR(p)) && p >= line) +! mb_ptr_back(line, p); +! startcol = p - line; +! + compl_col += ++startcol; + compl_length = (int)curs_col - startcol; + compl_pattern = addstar(line + compl_col, compl_length, +*** ../vim-7.4.018/src/version.c 2013-09-05 12:49:48.000000000 +0200 +--- src/version.c 2013-09-05 13:41:47.000000000 +0200 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 19, + /**/ + +-- + Very funny, Scotty. Now beam down my clothes. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.020 b/SOURCES/7.4.020 new file mode 100644 index 0000000..942d82f --- /dev/null +++ b/SOURCES/7.4.020 @@ -0,0 +1,82 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.020 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.020 +Problem: NFA engine matches too much with \@>. (John McGowan) +Solution: When a whole pattern match is found stop searching. +Files: src/regexp_nfa.c, src/testdir/test64.in, src/testdir/test64.ok + + +*** ../vim-7.4.019/src/regexp_nfa.c 2013-08-25 17:01:36.000000000 +0200 +--- src/regexp_nfa.c 2013-09-05 15:59:44.000000000 +0200 +*************** +*** 5322,5328 **** + log_subsexpr(m); + #endif + nfa_match = TRUE; +! break; + + case NFA_START_INVISIBLE: + case NFA_START_INVISIBLE_FIRST: +--- 5322,5331 ---- + log_subsexpr(m); + #endif + nfa_match = TRUE; +! /* See comment above at "goto nextchar". */ +! if (nextlist->n == 0) +! clen = 0; +! goto nextchar; + + case NFA_START_INVISIBLE: + case NFA_START_INVISIBLE_FIRST: +*** ../vim-7.4.019/src/testdir/test64.in 2013-08-14 13:31:03.000000000 +0200 +--- src/testdir/test64.in 2013-09-05 15:35:44.000000000 +0200 +*************** +*** 427,432 **** +--- 427,433 ---- + :""""" \@> + :call add(tl, [2, '\(a*\)\@>a', 'aaaa']) + :call add(tl, [2, '\(a*\)\@>b', 'aaab', 'aaab', 'aaa']) ++ :call add(tl, [2, '^\(.\{-}b\)\@>.', ' abcbd', ' abc', ' ab']) + :" TODO: BT engine does not restore submatch after failure + :call add(tl, [1, '\(a*\)\@>a\|a\+', 'aaaa', 'aaaa']) + :" +*** ../vim-7.4.019/src/testdir/test64.ok 2013-08-14 13:31:03.000000000 +0200 +--- src/testdir/test64.ok 2013-09-05 16:03:34.000000000 +0200 +*************** +*** 983,988 **** +--- 983,991 ---- + OK 0 - \(a*\)\@>b + OK 1 - \(a*\)\@>b + OK 2 - \(a*\)\@>b ++ OK 0 - ^\(.\{-}b\)\@>. ++ OK 1 - ^\(.\{-}b\)\@>. ++ OK 2 - ^\(.\{-}b\)\@>. + OK 0 - \(a*\)\@>a\|a\+ + OK 2 - \(a*\)\@>a\|a\+ + OK 0 - \_[^8-9]\+ +*** ../vim-7.4.019/src/version.c 2013-09-05 13:50:49.000000000 +0200 +--- src/version.c 2013-09-05 16:04:32.000000000 +0200 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 20, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +173. You keep tracking down the email addresses of all your friends + (even childhood friends). + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.021 b/SOURCES/7.4.021 new file mode 100644 index 0000000..0936d9a --- /dev/null +++ b/SOURCES/7.4.021 @@ -0,0 +1,86 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.021 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.021 +Problem: NFA regexp: Using \ze in one branch which doesn't match may cause + end of another branch to be wrong. (William Fugh) +Solution: Set end position if it wasn't set yet. +Files: src/regexp_nfa.c, src/testdir/test64.in, src/testdir/test64.ok + + +*** ../vim-7.4.020/src/regexp_nfa.c 2013-09-05 16:05:32.000000000 +0200 +--- src/regexp_nfa.c 2013-09-05 20:56:25.000000000 +0200 +*************** +*** 4209,4218 **** + break; + + case NFA_MCLOSE: +! if (nfa_has_zend) + { +! /* Do not overwrite the position set by \ze. If no \ze +! * encountered end will be set in nfa_regtry(). */ + subs = addstate(l, state->out, subs, pim, off); + break; + } +--- 4209,4219 ---- + break; + + case NFA_MCLOSE: +! if (nfa_has_zend && (REG_MULTI +! ? subs->norm.list.multi[0].end.lnum >= 0 +! : subs->norm.list.line[0].end != NULL)) + { +! /* Do not overwrite the position set by \ze. */ + subs = addstate(l, state->out, subs, pim, off); + break; + } +*** ../vim-7.4.020/src/testdir/test64.in 2013-09-05 16:05:32.000000000 +0200 +--- src/testdir/test64.in 2013-09-05 20:55:18.000000000 +0200 +*************** +*** 328,333 **** +--- 328,334 ---- + :call add(tl, [2, 'abc \zsmatch\ze abc', 'abc abc abc match abc abc', 'match']) + :call add(tl, [2, '\v(a \zsif .*){2}', 'a if then a if last', 'if last', 'a if last']) + :call add(tl, [2, '\>\zs.', 'aword. ', '.']) ++ :call add(tl, [2, '\s\+\ze\[/\|\s\zs\s\+', 'is [a t', ' ']) + :" + :"""" Tests for \@= and \& features + :call add(tl, [2, 'abc\@=', 'abc', 'ab']) +*** ../vim-7.4.020/src/testdir/test64.ok 2013-09-05 16:05:32.000000000 +0200 +--- src/testdir/test64.ok 2013-09-05 21:09:56.000000000 +0200 +*************** +*** 752,757 **** +--- 752,760 ---- + OK 0 - \>\zs. + OK 1 - \>\zs. + OK 2 - \>\zs. ++ OK 0 - \s\+\ze\[/\|\s\zs\s\+ ++ OK 1 - \s\+\ze\[/\|\s\zs\s\+ ++ OK 2 - \s\+\ze\[/\|\s\zs\s\+ + OK 0 - abc\@= + OK 1 - abc\@= + OK 2 - abc\@= +*** ../vim-7.4.020/src/version.c 2013-09-05 16:05:32.000000000 +0200 +--- src/version.c 2013-09-05 21:11:38.000000000 +0200 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 21, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +174. You know what a listserv is. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.022 b/SOURCES/7.4.022 new file mode 100644 index 0000000..81a0901 --- /dev/null +++ b/SOURCES/7.4.022 @@ -0,0 +1,148 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.022 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.022 +Problem: Deadlock while exiting, because of allocating memory. +Solution: Do not use gettext() in deathtrap(). (James McCoy) +Files: src/os_unix.c, src/misc1.c + + +*** ../vim-7.4.021/src/os_unix.c 2013-07-03 16:32:32.000000000 +0200 +--- src/os_unix.c 2013-09-05 21:40:06.000000000 +0200 +*************** +*** 957,964 **** + + /* + * This function handles deadly signals. +! * It tries to preserve any swap file and exit properly. + * (partly from Elvis). + */ + static RETSIGTYPE + deathtrap SIGDEFARG(sigarg) +--- 957,966 ---- + + /* + * This function handles deadly signals. +! * It tries to preserve any swap files and exit properly. + * (partly from Elvis). ++ * NOTE: Avoid unsafe functions, such as allocating memory, they can result in ++ * a deadlock. + */ + static RETSIGTYPE + deathtrap SIGDEFARG(sigarg) +*************** +*** 1090,1107 **** + } + if (entered == 2) + { +! OUT_STR(_("Vim: Double signal, exiting\n")); + out_flush(); + getout(1); + } + + #ifdef SIGHASARG +! sprintf((char *)IObuff, _("Vim: Caught deadly signal %s\n"), + signal_info[i].name); + #else +! sprintf((char *)IObuff, _("Vim: Caught deadly signal\n")); + #endif +! preserve_exit(); /* preserve files and exit */ + + #ifdef NBDEBUG + reset_signals(); +--- 1092,1114 ---- + } + if (entered == 2) + { +! /* No translation, it may call malloc(). */ +! OUT_STR("Vim: Double signal, exiting\n"); + out_flush(); + getout(1); + } + ++ /* No translation, it may call malloc(). */ + #ifdef SIGHASARG +! sprintf((char *)IObuff, "Vim: Caught deadly signal %s\n", + signal_info[i].name); + #else +! sprintf((char *)IObuff, "Vim: Caught deadly signal\n"); + #endif +! +! /* Preserve files and exit. This sets the really_exiting flag to prevent +! * calling free(). */ +! preserve_exit(); + + #ifdef NBDEBUG + reset_signals(); +*** ../vim-7.4.021/src/misc1.c 2013-08-03 17:29:33.000000000 +0200 +--- src/misc1.c 2013-09-05 21:34:04.000000000 +0200 +*************** +*** 9174,9179 **** +--- 9174,9181 ---- + /* + * Preserve files and exit. + * When called IObuff must contain a message. ++ * NOTE: This may be called from deathtrap() in a signal handler, avoid unsafe ++ * functions, such as allocating memory. + */ + void + preserve_exit() +*************** +*** 9196,9202 **** + { + if (buf->b_ml.ml_mfp != NULL && buf->b_ml.ml_mfp->mf_fname != NULL) + { +! OUT_STR(_("Vim: preserving files...\n")); + screen_start(); /* don't know where cursor is now */ + out_flush(); + ml_sync_all(FALSE, FALSE); /* preserve all swap files */ +--- 9198,9204 ---- + { + if (buf->b_ml.ml_mfp != NULL && buf->b_ml.ml_mfp->mf_fname != NULL) + { +! OUT_STR("Vim: preserving files...\n"); + screen_start(); /* don't know where cursor is now */ + out_flush(); + ml_sync_all(FALSE, FALSE); /* preserve all swap files */ +*************** +*** 9206,9212 **** + + ml_close_all(FALSE); /* close all memfiles, without deleting */ + +! OUT_STR(_("Vim: Finished.\n")); + + getout(1); + } +--- 9208,9214 ---- + + ml_close_all(FALSE); /* close all memfiles, without deleting */ + +! OUT_STR("Vim: Finished.\n"); + + getout(1); + } +*** ../vim-7.4.021/src/version.c 2013-09-05 21:15:38.000000000 +0200 +--- src/version.c 2013-09-05 21:30:18.000000000 +0200 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 22, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +175. You send yourself e-mail before you go to bed to remind you + what to do when you wake up. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.023 b/SOURCES/7.4.023 new file mode 100644 index 0000000..0300521 --- /dev/null +++ b/SOURCES/7.4.023 @@ -0,0 +1,53 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.023 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.023 +Problem: Compiler warning on 64 bit windows. +Solution: Add type cast. (Mike Williams) +Files: src/edit.c + + +*** ../vim-7.4.022/src/edit.c 2013-09-05 13:50:49.000000000 +0200 +--- src/edit.c 2013-09-06 17:32:55.000000000 +0200 +*************** +*** 5189,5195 **** + mb_ptr_back(line, p); + while (vim_isfilec(PTR2CHAR(p)) && p >= line) + mb_ptr_back(line, p); +! startcol = p - line; + + compl_col += ++startcol; + compl_length = (int)curs_col - startcol; +--- 5189,5195 ---- + mb_ptr_back(line, p); + while (vim_isfilec(PTR2CHAR(p)) && p >= line) + mb_ptr_back(line, p); +! startcol = (int)(p - line); + + compl_col += ++startcol; + compl_length = (int)curs_col - startcol; +*** ../vim-7.4.022/src/version.c 2013-09-05 21:41:35.000000000 +0200 +--- src/version.c 2013-09-06 17:33:41.000000000 +0200 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 23, + /**/ + +-- +Wizards had always known that the act of observation changed the thing that +was observed, and sometimes forgot that it also changed the observer too. + Terry Pratchett - Interesting times + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.024 b/SOURCES/7.4.024 new file mode 100644 index 0000000..da0df9c --- /dev/null +++ b/SOURCES/7.4.024 @@ -0,0 +1,61 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.024 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.024 +Problem: When root edits a file the undo file is owned by root while the + edited file may be owned by another user, which is not allowed. + (cac2s) +Solution: Accept an undo file owned by the current user. +Files: src/undo.c + + +*** ../vim-7.4.023/src/undo.c 2013-06-10 20:13:37.000000000 +0200 +--- src/undo.c 2013-09-07 15:45:56.000000000 +0200 +*************** +*** 1604,1613 **** + + #ifdef UNIX + /* For safety we only read an undo file if the owner is equal to the +! * owner of the text file. */ + if (mch_stat((char *)orig_name, &st_orig) >= 0 + && mch_stat((char *)file_name, &st_undo) >= 0 +! && st_orig.st_uid != st_undo.st_uid) + { + if (p_verbose > 0) + { +--- 1604,1614 ---- + + #ifdef UNIX + /* For safety we only read an undo file if the owner is equal to the +! * owner of the text file or equal to the current user. */ + if (mch_stat((char *)orig_name, &st_orig) >= 0 + && mch_stat((char *)file_name, &st_undo) >= 0 +! && st_orig.st_uid != st_undo.st_uid +! && st_undo.st_uid != getuid()) + { + if (p_verbose > 0) + { +*** ../vim-7.4.023/src/version.c 2013-09-07 16:35:38.000000000 +0200 +--- src/version.c 2013-09-08 15:38:52.000000000 +0200 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 24, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +186. You overstay in the office so you can have more time surfing the net. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.025 b/SOURCES/7.4.025 new file mode 100644 index 0000000..9ead176 --- /dev/null +++ b/SOURCES/7.4.025 @@ -0,0 +1,62 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.025 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.025 (after 7.4.019 +Problem: Reading before start of a string. +Solution: Do not call mb_ptr_back() at start of a string. (Dominique Pelle) +Files: src/edit.c + + +*** ../vim-7.4.024/src/edit.c 2013-09-07 16:35:38.000000000 +0200 +--- src/edit.c 2013-09-08 15:57:20.000000000 +0200 +*************** +*** 5187,5197 **** + + /* Go back to just before the first filename character. */ + mb_ptr_back(line, p); +! while (vim_isfilec(PTR2CHAR(p)) && p >= line) + mb_ptr_back(line, p); +! startcol = (int)(p - line); + +! compl_col += ++startcol; + compl_length = (int)curs_col - startcol; + compl_pattern = addstar(line + compl_col, compl_length, + EXPAND_FILES); +--- 5187,5199 ---- + + /* Go back to just before the first filename character. */ + mb_ptr_back(line, p); +! while (p > line && vim_isfilec(PTR2CHAR(p))) + mb_ptr_back(line, p); +! startcol = (int)(p - line) + 1; +! if (p == line && vim_isfilec(PTR2CHAR(p))) +! startcol = 0; + +! compl_col += startcol; + compl_length = (int)curs_col - startcol; + compl_pattern = addstar(line + compl_col, compl_length, + EXPAND_FILES); +*** ../vim-7.4.024/src/version.c 2013-09-08 15:40:45.000000000 +0200 +--- src/version.c 2013-09-08 15:52:39.000000000 +0200 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 25, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +188. You purchase a laptop so you can surf while sitting on the can. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.026 b/SOURCES/7.4.026 new file mode 100644 index 0000000..8add91f --- /dev/null +++ b/SOURCES/7.4.026 @@ -0,0 +1,65 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.026 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.026 +Problem: Clang warning for int shift overflow. +Solution: Use unsigned and cast back to int. (Dominique Pelle) +Files: src/misc2.c + + +*** ../vim-7.4.025/src/misc2.c 2013-07-07 16:03:35.000000000 +0200 +--- src/misc2.c 2013-09-08 16:04:54.000000000 +0200 +*************** +*** 6496,6508 **** + get4c(fd) + FILE *fd; + { +! int n; + +! n = getc(fd); +! n = (n << 8) + getc(fd); +! n = (n << 8) + getc(fd); +! n = (n << 8) + getc(fd); +! return n; + } + + /* +--- 6496,6510 ---- + get4c(fd) + FILE *fd; + { +! /* Use unsigned rather than int otherwise result is undefined +! * when left-shift sets the MSB. */ +! unsigned n; + +! n = (unsigned)getc(fd); +! n = (n << 8) + (unsigned)getc(fd); +! n = (n << 8) + (unsigned)getc(fd); +! n = (n << 8) + (unsigned)getc(fd); +! return (int)n; + } + + /* +*** ../vim-7.4.025/src/version.c 2013-09-08 16:03:40.000000000 +0200 +--- src/version.c 2013-09-08 16:05:40.000000000 +0200 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 26, + /**/ + +-- +A computer program does what you tell it to do, not what you want it to do. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.028 b/SOURCES/7.4.028 new file mode 100644 index 0000000..4a0e3cf --- /dev/null +++ b/SOURCES/7.4.028 @@ -0,0 +1,753 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.028 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.028 +Problem: Equivalence classes are not working for multi-byte characters. +Solution: Copy the rules from the old to the new regexp engine. Add a test + to check both engines. +Files: src/regexp_nfa.c, src/testdir/test44.in, src/testdir/test99.in, + src/testdir/test99.ok, src/testdir/Make_amiga.mak, + src/testdir/Make_dos.mak, src/testdir/Make_ming.mak, + src/testdir/Make_os2.mak, src/testdir/Make_vms.mms, + src/testdir/Makefile + + +*** ../vim-7.4.027/src/regexp_nfa.c 2013-09-05 21:15:38.000000000 +0200 +--- src/regexp_nfa.c 2013-09-19 16:40:08.000000000 +0200 +*************** +*** 742,748 **** + nfa_emit_equi_class(c) + int c; + { +! #define EMIT2(c) EMIT(c); EMIT(NFA_CONCAT); + + #ifdef FEAT_MBYTE + if (enc_utf8 || STRCMP(p_enc, "latin1") == 0 +--- 742,753 ---- + nfa_emit_equi_class(c) + int c; + { +! #define EMIT2(c) EMIT(c); EMIT(NFA_CONCAT); +! #ifdef FEAT_MBYTE +! # define EMITMBC(c) EMIT(c); EMIT(NFA_CONCAT); +! #else +! # define EMITMBC(c) +! #endif + + #ifdef FEAT_MBYTE + if (enc_utf8 || STRCMP(p_enc, "latin1") == 0 +*************** +*** 753,844 **** + { + case 'A': case 0300: case 0301: case 0302: + case 0303: case 0304: case 0305: +! EMIT2('A'); EMIT2(0300); EMIT2(0301); +! EMIT2(0302); EMIT2(0303); EMIT2(0304); +! EMIT2(0305); + return OK; + + case 'C': case 0307: +! EMIT2('C'); EMIT2(0307); + return OK; + + case 'E': case 0310: case 0311: case 0312: case 0313: +! EMIT2('E'); EMIT2(0310); EMIT2(0311); +! EMIT2(0312); EMIT2(0313); + return OK; + + case 'I': case 0314: case 0315: case 0316: case 0317: +! EMIT2('I'); EMIT2(0314); EMIT2(0315); +! EMIT2(0316); EMIT2(0317); + return OK; + + case 'N': case 0321: +! EMIT2('N'); EMIT2(0321); + return OK; + + case 'O': case 0322: case 0323: case 0324: case 0325: +! case 0326: +! EMIT2('O'); EMIT2(0322); EMIT2(0323); +! EMIT2(0324); EMIT2(0325); EMIT2(0326); + return OK; + + case 'U': case 0331: case 0332: case 0333: case 0334: +! EMIT2('U'); EMIT2(0331); EMIT2(0332); +! EMIT2(0333); EMIT2(0334); + return OK; + + case 'Y': case 0335: +! EMIT2('Y'); EMIT2(0335); + return OK; + + case 'a': case 0340: case 0341: case 0342: + case 0343: case 0344: case 0345: +! EMIT2('a'); EMIT2(0340); EMIT2(0341); +! EMIT2(0342); EMIT2(0343); EMIT2(0344); +! EMIT2(0345); + return OK; + + case 'c': case 0347: +! EMIT2('c'); EMIT2(0347); + return OK; + + case 'e': case 0350: case 0351: case 0352: case 0353: +! EMIT2('e'); EMIT2(0350); EMIT2(0351); +! EMIT2(0352); EMIT2(0353); + return OK; + + case 'i': case 0354: case 0355: case 0356: case 0357: +! EMIT2('i'); EMIT2(0354); EMIT2(0355); +! EMIT2(0356); EMIT2(0357); + return OK; + + case 'n': case 0361: +! EMIT2('n'); EMIT2(0361); + return OK; + + case 'o': case 0362: case 0363: case 0364: case 0365: +! case 0366: +! EMIT2('o'); EMIT2(0362); EMIT2(0363); +! EMIT2(0364); EMIT2(0365); EMIT2(0366); + return OK; + + case 'u': case 0371: case 0372: case 0373: case 0374: +! EMIT2('u'); EMIT2(0371); EMIT2(0372); +! EMIT2(0373); EMIT2(0374); + return OK; + + case 'y': case 0375: case 0377: +! EMIT2('y'); EMIT2(0375); EMIT2(0377); + return OK; + +! default: +! return FAIL; + } + } + +! EMIT(c); + return OK; + #undef EMIT2 + } + + /* +--- 758,1095 ---- + { + case 'A': case 0300: case 0301: case 0302: + case 0303: case 0304: case 0305: +! CASEMBC(0x100) CASEMBC(0x102) CASEMBC(0x104) CASEMBC(0x1cd) +! CASEMBC(0x1de) CASEMBC(0x1e0) CASEMBC(0x1ea2) +! EMIT2('A'); EMIT2(0300); EMIT2(0301); EMIT2(0302); +! EMIT2(0303); EMIT2(0304); EMIT2(0305); +! EMITMBC(0x100) EMITMBC(0x102) EMITMBC(0x104) +! EMITMBC(0x1cd) EMITMBC(0x1de) EMITMBC(0x1e0) +! EMITMBC(0x1ea2) +! return OK; +! +! case 'B': CASEMBC(0x1e02) CASEMBC(0x1e06) +! EMIT2('B'); EMITMBC(0x1e02) EMITMBC(0x1e06) + return OK; + + case 'C': case 0307: +! CASEMBC(0x106) CASEMBC(0x108) CASEMBC(0x10a) CASEMBC(0x10c) +! EMIT2('C'); EMIT2(0307); EMITMBC(0x106) EMITMBC(0x108) +! EMITMBC(0x10a) EMITMBC(0x10c) +! return OK; +! +! case 'D': CASEMBC(0x10e) CASEMBC(0x110) CASEMBC(0x1e0a) +! CASEMBC(0x1e0e) CASEMBC(0x1e10) +! EMIT2('D'); EMITMBC(0x10e) EMITMBC(0x110) EMITMBC(0x1e0a) +! EMITMBC(0x1e0e) EMITMBC(0x1e10) + return OK; + + case 'E': case 0310: case 0311: case 0312: case 0313: +! CASEMBC(0x112) CASEMBC(0x114) CASEMBC(0x116) CASEMBC(0x118) +! CASEMBC(0x11a) CASEMBC(0x1eba) CASEMBC(0x1ebc) +! EMIT2('E'); EMIT2(0310); EMIT2(0311); EMIT2(0312); +! EMIT2(0313); +! EMITMBC(0x112) EMITMBC(0x114) EMITMBC(0x116) +! EMITMBC(0x118) EMITMBC(0x11a) EMITMBC(0x1eba) +! EMITMBC(0x1ebc) +! return OK; +! +! case 'F': CASEMBC(0x1e1e) +! EMIT2('F'); EMITMBC(0x1e1e) +! return OK; +! +! case 'G': CASEMBC(0x11c) CASEMBC(0x11e) CASEMBC(0x120) +! CASEMBC(0x122) CASEMBC(0x1e4) CASEMBC(0x1e6) CASEMBC(0x1f4) +! CASEMBC(0x1e20) +! EMIT2('G'); EMITMBC(0x11c) EMITMBC(0x11e) EMITMBC(0x120) +! EMITMBC(0x122) EMITMBC(0x1e4) EMITMBC(0x1e6) +! EMITMBC(0x1f4) EMITMBC(0x1e20) +! return OK; +! +! case 'H': CASEMBC(0x124) CASEMBC(0x126) CASEMBC(0x1e22) +! CASEMBC(0x1e26) CASEMBC(0x1e28) +! EMIT2('H'); EMITMBC(0x124) EMITMBC(0x126) EMITMBC(0x1e22) +! EMITMBC(0x1e26) EMITMBC(0x1e28) + return OK; + + case 'I': case 0314: case 0315: case 0316: case 0317: +! CASEMBC(0x128) CASEMBC(0x12a) CASEMBC(0x12c) CASEMBC(0x12e) +! CASEMBC(0x130) CASEMBC(0x1cf) CASEMBC(0x1ec8) +! EMIT2('I'); EMIT2(0314); EMIT2(0315); EMIT2(0316); +! EMIT2(0317); EMITMBC(0x128) EMITMBC(0x12a) +! EMITMBC(0x12c) EMITMBC(0x12e) EMITMBC(0x130) +! EMITMBC(0x1cf) EMITMBC(0x1ec8) +! return OK; +! +! case 'J': CASEMBC(0x134) +! EMIT2('J'); EMITMBC(0x134) +! return OK; +! +! case 'K': CASEMBC(0x136) CASEMBC(0x1e8) CASEMBC(0x1e30) +! CASEMBC(0x1e34) +! EMIT2('K'); EMITMBC(0x136) EMITMBC(0x1e8) EMITMBC(0x1e30) +! EMITMBC(0x1e34) +! return OK; +! +! case 'L': CASEMBC(0x139) CASEMBC(0x13b) CASEMBC(0x13d) +! CASEMBC(0x13f) CASEMBC(0x141) CASEMBC(0x1e3a) +! EMIT2('L'); EMITMBC(0x139) EMITMBC(0x13b) EMITMBC(0x13d) +! EMITMBC(0x13f) EMITMBC(0x141) EMITMBC(0x1e3a) +! return OK; +! +! case 'M': CASEMBC(0x1e3e) CASEMBC(0x1e40) +! EMIT2('M'); EMITMBC(0x1e3e) EMITMBC(0x1e40) + return OK; + + case 'N': case 0321: +! CASEMBC(0x143) CASEMBC(0x145) CASEMBC(0x147) CASEMBC(0x1e44) +! CASEMBC(0x1e48) +! EMIT2('N'); EMIT2(0321); EMITMBC(0x143) EMITMBC(0x145) +! EMITMBC(0x147) EMITMBC(0x1e44) EMITMBC(0x1e48) + return OK; + + case 'O': case 0322: case 0323: case 0324: case 0325: +! case 0326: case 0330: +! CASEMBC(0x14c) CASEMBC(0x14e) CASEMBC(0x150) CASEMBC(0x1a0) +! CASEMBC(0x1d1) CASEMBC(0x1ea) CASEMBC(0x1ec) CASEMBC(0x1ece) +! EMIT2('O'); EMIT2(0322); EMIT2(0323); EMIT2(0324); +! EMIT2(0325); EMIT2(0326); EMIT2(0330); +! EMITMBC(0x14c) EMITMBC(0x14e) EMITMBC(0x150) +! EMITMBC(0x1a0) EMITMBC(0x1d1) EMITMBC(0x1ea) +! EMITMBC(0x1ec) EMITMBC(0x1ece) +! return OK; +! +! case 'P': case 0x1e54: case 0x1e56: +! EMIT2('P'); EMITMBC(0x1e54) EMITMBC(0x1e56) +! return OK; +! +! case 'R': CASEMBC(0x154) CASEMBC(0x156) CASEMBC(0x158) +! CASEMBC(0x1e58) CASEMBC(0x1e5e) +! EMIT2('R'); EMITMBC(0x154) EMITMBC(0x156) EMITMBC(0x158) +! EMITMBC(0x1e58) EMITMBC(0x1e5e) +! return OK; +! +! case 'S': CASEMBC(0x15a) CASEMBC(0x15c) CASEMBC(0x15e) +! CASEMBC(0x160) CASEMBC(0x1e60) +! EMIT2('S'); EMITMBC(0x15a) EMITMBC(0x15c) EMITMBC(0x15e) +! EMITMBC(0x160) EMITMBC(0x1e60) +! return OK; +! +! case 'T': CASEMBC(0x162) CASEMBC(0x164) CASEMBC(0x166) +! CASEMBC(0x1e6a) CASEMBC(0x1e6e) +! EMIT2('T'); EMITMBC(0x162) EMITMBC(0x164) EMITMBC(0x166) +! EMITMBC(0x1e6a) EMITMBC(0x1e6e) + return OK; + + case 'U': case 0331: case 0332: case 0333: case 0334: +! CASEMBC(0x168) CASEMBC(0x16a) CASEMBC(0x16c) CASEMBC(0x16e) +! CASEMBC(0x170) CASEMBC(0x172) CASEMBC(0x1af) CASEMBC(0x1d3) +! CASEMBC(0x1ee6) +! EMIT2('U'); EMIT2(0331); EMIT2(0332); EMIT2(0333); +! EMIT2(0334); EMITMBC(0x168) EMITMBC(0x16a) +! EMITMBC(0x16c) EMITMBC(0x16e) EMITMBC(0x170) +! EMITMBC(0x172) EMITMBC(0x1af) EMITMBC(0x1d3) +! EMITMBC(0x1ee6) +! return OK; +! +! case 'V': CASEMBC(0x1e7c) +! EMIT2('V'); EMITMBC(0x1e7c) +! return OK; +! +! case 'W': CASEMBC(0x174) CASEMBC(0x1e80) CASEMBC(0x1e82) +! CASEMBC(0x1e84) CASEMBC(0x1e86) +! EMIT2('W'); EMITMBC(0x174) EMITMBC(0x1e80) EMITMBC(0x1e82) +! EMITMBC(0x1e84) EMITMBC(0x1e86) +! return OK; +! +! case 'X': CASEMBC(0x1e8a) CASEMBC(0x1e8c) +! EMIT2('X'); EMITMBC(0x1e8a) EMITMBC(0x1e8c) + return OK; + + case 'Y': case 0335: +! CASEMBC(0x176) CASEMBC(0x178) CASEMBC(0x1e8e) CASEMBC(0x1ef2) +! CASEMBC(0x1ef6) CASEMBC(0x1ef8) +! EMIT2('Y'); EMIT2(0335); EMITMBC(0x176) EMITMBC(0x178) +! EMITMBC(0x1e8e) EMITMBC(0x1ef2) EMITMBC(0x1ef6) +! EMITMBC(0x1ef8) +! return OK; +! +! case 'Z': CASEMBC(0x179) CASEMBC(0x17b) CASEMBC(0x17d) +! CASEMBC(0x1b5) CASEMBC(0x1e90) CASEMBC(0x1e94) +! EMIT2('Z'); EMITMBC(0x179) EMITMBC(0x17b) EMITMBC(0x17d) +! EMITMBC(0x1b5) EMITMBC(0x1e90) EMITMBC(0x1e94) + return OK; + + case 'a': case 0340: case 0341: case 0342: + case 0343: case 0344: case 0345: +! CASEMBC(0x101) CASEMBC(0x103) CASEMBC(0x105) CASEMBC(0x1ce) +! CASEMBC(0x1df) CASEMBC(0x1e1) CASEMBC(0x1ea3) +! EMIT2('a'); EMIT2(0340); EMIT2(0341); EMIT2(0342); +! EMIT2(0343); EMIT2(0344); EMIT2(0345); +! EMITMBC(0x101) EMITMBC(0x103) EMITMBC(0x105) +! EMITMBC(0x1ce) EMITMBC(0x1df) EMITMBC(0x1e1) +! EMITMBC(0x1ea3) +! return OK; +! +! case 'b': CASEMBC(0x1e03) CASEMBC(0x1e07) +! EMIT2('b'); EMITMBC(0x1e03) EMITMBC(0x1e07) + return OK; + + case 'c': case 0347: +! CASEMBC(0x107) CASEMBC(0x109) CASEMBC(0x10b) CASEMBC(0x10d) +! EMIT2('c'); EMIT2(0347); EMITMBC(0x107) EMITMBC(0x109) +! EMITMBC(0x10b) EMITMBC(0x10d) +! return OK; +! +! case 'd': CASEMBC(0x10f) CASEMBC(0x111) CASEMBC(0x1d0b) +! CASEMBC(0x1e11) +! EMIT2('d'); EMITMBC(0x10f) EMITMBC(0x111) EMITMBC(0x1e0b) +! EMITMBC(0x01e0f) EMITMBC(0x1e11) + return OK; + + case 'e': case 0350: case 0351: case 0352: case 0353: +! CASEMBC(0x113) CASEMBC(0x115) CASEMBC(0x117) CASEMBC(0x119) +! CASEMBC(0x11b) CASEMBC(0x1ebb) CASEMBC(0x1ebd) +! EMIT2('e'); EMIT2(0350); EMIT2(0351); EMIT2(0352); +! EMIT2(0353); EMITMBC(0x113) EMITMBC(0x115) +! EMITMBC(0x117) EMITMBC(0x119) EMITMBC(0x11b) +! EMITMBC(0x1ebb) EMITMBC(0x1ebd) +! return OK; +! +! case 'f': CASEMBC(0x1e1f) +! EMIT2('f'); EMITMBC(0x1e1f) +! return OK; +! +! case 'g': CASEMBC(0x11d) CASEMBC(0x11f) CASEMBC(0x121) +! CASEMBC(0x123) CASEMBC(0x1e5) CASEMBC(0x1e7) CASEMBC(0x1f5) +! CASEMBC(0x1e21) +! EMIT2('g'); EMITMBC(0x11d) EMITMBC(0x11f) EMITMBC(0x121) +! EMITMBC(0x123) EMITMBC(0x1e5) EMITMBC(0x1e7) +! EMITMBC(0x1f5) EMITMBC(0x1e21) +! return OK; +! +! case 'h': CASEMBC(0x125) CASEMBC(0x127) CASEMBC(0x1e23) +! CASEMBC(0x1e27) CASEMBC(0x1e29) CASEMBC(0x1e96) +! EMIT2('h'); EMITMBC(0x125) EMITMBC(0x127) EMITMBC(0x1e23) +! EMITMBC(0x1e27) EMITMBC(0x1e29) EMITMBC(0x1e96) + return OK; + + case 'i': case 0354: case 0355: case 0356: case 0357: +! CASEMBC(0x129) CASEMBC(0x12b) CASEMBC(0x12d) CASEMBC(0x12f) +! CASEMBC(0x1d0) CASEMBC(0x1ec9) +! EMIT2('i'); EMIT2(0354); EMIT2(0355); EMIT2(0356); +! EMIT2(0357); EMITMBC(0x129) EMITMBC(0x12b) +! EMITMBC(0x12d) EMITMBC(0x12f) EMITMBC(0x1d0) +! EMITMBC(0x1ec9) +! return OK; +! +! case 'j': CASEMBC(0x135) CASEMBC(0x1f0) +! EMIT2('j'); EMITMBC(0x135) EMITMBC(0x1f0) +! return OK; +! +! case 'k': CASEMBC(0x137) CASEMBC(0x1e9) CASEMBC(0x1e31) +! CASEMBC(0x1e35) +! EMIT2('k'); EMITMBC(0x137) EMITMBC(0x1e9) EMITMBC(0x1e31) +! EMITMBC(0x1e35) +! return OK; +! +! case 'l': CASEMBC(0x13a) CASEMBC(0x13c) CASEMBC(0x13e) +! CASEMBC(0x140) CASEMBC(0x142) CASEMBC(0x1e3b) +! EMIT2('l'); EMITMBC(0x13a) EMITMBC(0x13c) EMITMBC(0x13e) +! EMITMBC(0x140) EMITMBC(0x142) EMITMBC(0x1e3b) +! return OK; +! +! case 'm': CASEMBC(0x1e3f) CASEMBC(0x1e41) +! EMIT2('m'); EMITMBC(0x1e3f) EMITMBC(0x1e41) + return OK; + + case 'n': case 0361: +! CASEMBC(0x144) CASEMBC(0x146) CASEMBC(0x148) CASEMBC(0x149) +! CASEMBC(0x1e45) CASEMBC(0x1e49) +! EMIT2('n'); EMIT2(0361); EMITMBC(0x144) EMITMBC(0x146) +! EMITMBC(0x148) EMITMBC(0x149) EMITMBC(0x1e45) +! EMITMBC(0x1e49) + return OK; + + case 'o': case 0362: case 0363: case 0364: case 0365: +! case 0366: case 0370: +! CASEMBC(0x14d) CASEMBC(0x14f) CASEMBC(0x151) CASEMBC(0x1a1) +! CASEMBC(0x1d2) CASEMBC(0x1eb) CASEMBC(0x1ed) CASEMBC(0x1ecf) +! EMIT2('o'); EMIT2(0362); EMIT2(0363); EMIT2(0364); +! EMIT2(0365); EMIT2(0366); EMIT2(0370); +! EMITMBC(0x14d) EMITMBC(0x14f) EMITMBC(0x151) +! EMITMBC(0x1a1) EMITMBC(0x1d2) EMITMBC(0x1eb) +! EMITMBC(0x1ed) EMITMBC(0x1ecf) +! return OK; +! +! case 'p': CASEMBC(0x1e55) CASEMBC(0x1e57) +! EMIT2('p'); EMITMBC(0x1e55) EMITMBC(0x1e57) +! return OK; +! +! case 'r': CASEMBC(0x155) CASEMBC(0x157) CASEMBC(0x159) +! CASEMBC(0x1e59) CASEMBC(0x1e5f) +! EMIT2('r'); EMITMBC(0x155) EMITMBC(0x157) EMITMBC(0x159) +! EMITMBC(0x1e59) EMITMBC(0x1e5f) +! return OK; +! +! case 's': CASEMBC(0x15b) CASEMBC(0x15d) CASEMBC(0x15f) +! CASEMBC(0x161) CASEMBC(0x1e61) +! EMIT2('s'); EMITMBC(0x15b) EMITMBC(0x15d) EMITMBC(0x15f) +! EMITMBC(0x161) EMITMBC(0x1e61) +! return OK; +! +! case 't': CASEMBC(0x163) CASEMBC(0x165) CASEMBC(0x167) +! CASEMBC(0x1e6b) CASEMBC(0x1e6f) CASEMBC(0x1e97) +! EMIT2('t'); EMITMBC(0x163) EMITMBC(0x165) EMITMBC(0x167) +! EMITMBC(0x1e6b) EMITMBC(0x1e6f) EMITMBC(0x1e97) + return OK; + + case 'u': case 0371: case 0372: case 0373: case 0374: +! CASEMBC(0x169) CASEMBC(0x16b) CASEMBC(0x16d) CASEMBC(0x16f) +! CASEMBC(0x171) CASEMBC(0x173) CASEMBC(0x1b0) CASEMBC(0x1d4) +! CASEMBC(0x1ee7) +! EMIT2('u'); EMIT2(0371); EMIT2(0372); EMIT2(0373); +! EMIT2(0374); EMITMBC(0x169) EMITMBC(0x16b) +! EMITMBC(0x16d) EMITMBC(0x16f) EMITMBC(0x171) +! EMITMBC(0x173) EMITMBC(0x1b0) EMITMBC(0x1d4) +! EMITMBC(0x1ee7) +! return OK; +! +! case 'v': CASEMBC(0x1e7d) +! EMIT2('v'); EMITMBC(0x1e7d) +! return OK; +! +! case 'w': CASEMBC(0x175) CASEMBC(0x1e81) CASEMBC(0x1e83) +! CASEMBC(0x1e85) CASEMBC(0x1e87) CASEMBC(0x1e98) +! EMIT2('w'); EMITMBC(0x175) EMITMBC(0x1e81) EMITMBC(0x1e83) +! EMITMBC(0x1e85) EMITMBC(0x1e87) EMITMBC(0x1e98) +! return OK; +! +! case 'x': CASEMBC(0x1e8b) CASEMBC(0x1e8d) +! EMIT2('x'); EMITMBC(0x1e8b) EMITMBC(0x1e8d) + return OK; + + case 'y': case 0375: case 0377: +! CASEMBC(0x177) CASEMBC(0x1e8f) CASEMBC(0x1e99) +! CASEMBC(0x1ef3) CASEMBC(0x1ef7) CASEMBC(0x1ef9) +! EMIT2('y'); EMIT2(0375); EMIT2(0377); EMITMBC(0x177) +! EMITMBC(0x1e8f) EMITMBC(0x1e99) EMITMBC(0x1ef3) +! EMITMBC(0x1ef7) EMITMBC(0x1ef9) +! return OK; +! +! case 'z': CASEMBC(0x17a) CASEMBC(0x17c) CASEMBC(0x17e) +! CASEMBC(0x1b6) CASEMBC(0x1e91) CASEMBC(0x1e95) +! EMIT2('z'); EMITMBC(0x17a) EMITMBC(0x17c) EMITMBC(0x17e) +! EMITMBC(0x1b6) EMITMBC(0x1e91) EMITMBC(0x1e95) + return OK; + +! /* default: character itself */ + } + } + +! EMIT2(c); + return OK; + #undef EMIT2 ++ #undef EMITMBC + } + + /* +*** ../vim-7.4.027/src/testdir/test44.in 2013-05-26 14:16:31.000000000 +0200 +--- src/testdir/test44.in 2013-09-19 16:49:14.000000000 +0200 +*************** +*** 1,9 **** +--- 1,11 ---- + Tests for regexp with multi-byte encoding and various magic settings. + Test matchstr() with a count and multi-byte chars. ++ See test99 for exactly the same test with re=2. + + STARTTEST + :so mbyte.vim + :set nocompatible encoding=utf-8 termencoding=latin1 viminfo+=nviminfo ++ :set re=1 + /^1 + /a*b\{2}c\+/e + x/\Md\*e\{2}f\+/e +*** ../vim-7.4.027/src/testdir/test99.in 2013-09-19 16:59:30.000000000 +0200 +--- src/testdir/test99.in 2013-09-19 16:50:00.000000000 +0200 +*************** +*** 0 **** +--- 1,68 ---- ++ Tests for regexp with multi-byte encoding and various magic settings. ++ Test matchstr() with a count and multi-byte chars. ++ See test44 for exactly the same test with re=1. ++ ++ STARTTEST ++ :so mbyte.vim ++ :set nocompatible encoding=utf-8 termencoding=latin1 viminfo+=nviminfo ++ :set re=2 ++ /^1 ++ /a*b\{2}c\+/e ++ x/\Md\*e\{2}f\+/e ++ x:set nomagic ++ /g\*h\{2}i\+/e ++ x/\mj*k\{2}l\+/e ++ x/\vm*n{2}o+/e ++ x/\V^aa$ ++ x:set magic ++ /\v(a)(b)\2\1\1/e ++ x/\V[ab]\(\[xy]\)\1 ++ x:" Now search for multi-byte without composing char ++ /ม ++ x:" Now search for multi-byte with composing char ++ /ม่ ++ x:" find word by change of word class ++ /ち\<カヨ\>は ++ x:" Test \%u, [\u] and friends ++ /\%u20ac ++ x/[\u4f7f\u5929]\+ ++ x/\%U12345678 ++ x/[\U1234abcd\u1234\uabcd] ++ x/\%d21879b ++ x/ [[=A=]]* [[=B=]]* [[=C=]]* [[=D=]]* [[=E=]]* [[=F=]]* [[=G=]]* [[=H=]]* [[=I=]]* [[=J=]]* [[=K=]]* [[=L=]]* [[=M=]]* [[=N=]]* [[=O=]]* [[=P=]]* [[=Q=]]* [[=R=]]* [[=S=]]* [[=T=]]* [[=U=]]* [[=V=]]* [[=W=]]* [[=X=]]* [[=Y=]]* [[=Z=]]*/e ++ x/ [[=a=]]* [[=b=]]* [[=c=]]* [[=d=]]* [[=e=]]* [[=f=]]* [[=g=]]* [[=h=]]* [[=i=]]* [[=j=]]* [[=k=]]* [[=l=]]* [[=m=]]* [[=n=]]* [[=o=]]* [[=p=]]* [[=q=]]* [[=r=]]* [[=s=]]* [[=t=]]* [[=u=]]* [[=v=]]* [[=w=]]* [[=x=]]* [[=y=]]* [[=z=]]*/e ++ x:" Test backwards search from a multi-byte char ++ /x ++ x?. ++ x:let @w=':%s#comb[i]nations#œ̄ṣ́m̥̄ᾱ̆́#g' ++ :@w ++ :?^1?,$w! test.out ++ :e! test.out ++ G:put =matchstr(\"אבגד\", \".\", 0, 2) " ב ++ :put =matchstr(\"אבגד\", \"..\", 0, 2) " בג ++ :put =matchstr(\"אבגד\", \".\", 0, 0) " א ++ :put =matchstr(\"אבגד\", \".\", 4, -1) " ג ++ :w! ++ :qa! ++ ENDTEST ++ ++ 1 a aa abb abbccc ++ 2 d dd dee deefff ++ 3 g gg ghh ghhiii ++ 4 j jj jkk jkklll ++ 5 m mm mnn mnnooo ++ 6 x ^aa$ x ++ 7 (a)(b) abbaa ++ 8 axx [ab]xx ++ 9 หม่x อมx ++ a อมx หม่x ++ b ちカヨは ++ c x ¬€x ++ d 天使x ++ e ������y ++ f ������z ++ g a啷bb ++ h AÀÁÂÃÄÅĀĂĄǍǞǠẢ BḂḆ CÇĆĈĊČ DĎĐḊḎḐ EÈÉÊËĒĔĖĘĚẺẼ FḞ GĜĞĠĢǤǦǴḠ HĤĦḢḦḨ IÌÍÎÏĨĪĬĮİǏỈ JĴ KĶǨḰḴ LĹĻĽĿŁḺ MḾṀ NÑŃŅŇṄṈ OÒÓÔÕÖØŌŎŐƠǑǪǬỎ PṔṖ Q RŔŖŘṘṞ SŚŜŞŠṠ TŢŤŦṪṮ UÙÚÛÜŨŪŬŮŰŲƯǓỦ VṼ WŴẀẂẄẆ XẊẌ YÝŶŸẎỲỶỸ ZŹŻŽƵẐẔ ++ i aàáâãäåāăąǎǟǡả bḃḇ cçćĉċč dďđḋḏḑ eèéêëēĕėęěẻẽ fḟ gĝğġģǥǧǵḡ hĥħḣḧḩẖ iìíîïĩīĭįǐỉ jĵǰ kķǩḱḵ lĺļľŀłḻ mḿṁ nñńņňʼnṅṉ oòóôõöøōŏőơǒǫǭỏ pṕṗ q rŕŗřṙṟ sśŝşšṡ tţťŧṫṯẗ uùúûüũūŭůűųưǔủ vṽ wŵẁẃẅẇẘ xẋẍ yýÿŷẏẙỳỷỹ zźżžƶẑẕ ++ j 0123❤x ++ k combinations +*** ../vim-7.4.027/src/testdir/test99.ok 2013-09-19 16:59:30.000000000 +0200 +--- src/testdir/test99.ok 2013-09-19 16:50:16.000000000 +0200 +*************** +*** 0 **** +--- 1,24 ---- ++ 1 a aa abb abbcc ++ 2 d dd dee deeff ++ 3 g gg ghh ghhii ++ 4 j jj jkk jkkll ++ 5 m mm mnn mnnoo ++ 6 x aa$ x ++ 7 (a)(b) abba ++ 8 axx ab]xx ++ 9 หม่x อx ++ a อมx หx ++ b カヨは ++ c x ¬x ++ d 使x ++ e y ++ f z ++ g abb ++ h AÀÁÂÃÄÅĀĂĄǍǞǠẢ BḂḆ CÇĆĈĊČ DĎĐḊḎḐ EÈÉÊËĒĔĖĘĚẺẼ FḞ GĜĞĠĢǤǦǴḠ HĤĦḢḦḨ IÌÍÎÏĨĪĬĮİǏỈ JĴ KĶǨḰḴ LĹĻĽĿŁḺ MḾṀ NÑŃŅŇṄṈ OÒÓÔÕÖØŌŎŐƠǑǪǬỎ PṔṖ Q RŔŖŘṘṞ SŚŜŞŠṠ TŢŤŦṪṮ UÙÚÛÜŨŪŬŮŰŲƯǓỦ VṼ WŴẀẂẄẆ XẊẌ YÝŶŸẎỲỶỸ ZŹŻŽƵẐ ++ i aàáâãäåāăąǎǟǡả bḃḇ cçćĉċč dďđḋḏḑ eèéêëēĕėęěẻẽ fḟ gĝğġģǥǧǵḡ hĥħḣḧḩẖ iìíîïĩīĭįǐỉ jĵǰ kķǩḱḵ lĺļľŀłḻ mḿṁ nñńņňʼnṅṉ oòóôõöøōŏőơǒǫǭỏ pṕṗ q rŕŗřṙṟ sśŝşšṡ tţťŧṫṯẗ uùúûüũūŭůűųưǔủ vṽ wŵẁẃẅẇẘ xẋẍ yýÿŷẏẙỳỷỹ zźżžƶẑ ++ j 012❤ ++ k œ̄ṣ́m̥̄ᾱ̆́ ++ ב ++ בג ++ א ++ ג +*** ../vim-7.4.027/src/testdir/Make_amiga.mak 2013-07-09 13:40:02.000000000 +0200 +--- src/testdir/Make_amiga.mak 2013-09-19 16:51:48.000000000 +0200 +*************** +*** 33,39 **** + test76.out test77.out test78.out test79.out test80.out \ + test81.out test82.out test83.out test84.out test88.out \ + test89.out test90.out test91.out test92.out test93.out \ +! test94.out test95.out test96.out test97.out test98.out + + .SUFFIXES: .in .out + +--- 33,40 ---- + test76.out test77.out test78.out test79.out test80.out \ + test81.out test82.out test83.out test84.out test88.out \ + test89.out test90.out test91.out test92.out test93.out \ +! test94.out test95.out test96.out test97.out test98.out \ +! test99.out + + .SUFFIXES: .in .out + +*************** +*** 148,150 **** +--- 149,152 ---- + test96.out: test96.in + test97.out: test97.in + test98.out: test98.in ++ test99.out: test99.in +*** ../vim-7.4.027/src/testdir/Make_dos.mak 2013-07-09 13:40:30.000000000 +0200 +--- src/testdir/Make_dos.mak 2013-09-19 16:51:56.000000000 +0200 +*************** +*** 32,38 **** + test79.out test80.out test81.out test82.out test83.out \ + test84.out test85.out test86.out test87.out test88.out \ + test89.out test90.out test91.out test92.out test93.out \ +! test94.out test95.out test96.out test98.out + + SCRIPTS32 = test50.out test70.out + +--- 32,38 ---- + test79.out test80.out test81.out test82.out test83.out \ + test84.out test85.out test86.out test87.out test88.out \ + test89.out test90.out test91.out test92.out test93.out \ +! test94.out test95.out test96.out test98.out test99.out + + SCRIPTS32 = test50.out test70.out + +*** ../vim-7.4.027/src/testdir/Make_ming.mak 2013-07-09 13:40:38.000000000 +0200 +--- src/testdir/Make_ming.mak 2013-09-19 16:52:01.000000000 +0200 +*************** +*** 52,58 **** + test79.out test80.out test81.out test82.out test83.out \ + test84.out test85.out test86.out test87.out test88.out \ + test89.out test90.out test91.out test92.out test93.out \ +! test94.out test95.out test96.out test98.out + + SCRIPTS32 = test50.out test70.out + +--- 52,58 ---- + test79.out test80.out test81.out test82.out test83.out \ + test84.out test85.out test86.out test87.out test88.out \ + test89.out test90.out test91.out test92.out test93.out \ +! test94.out test95.out test96.out test98.out test99.out + + SCRIPTS32 = test50.out test70.out + +*** ../vim-7.4.027/src/testdir/Make_os2.mak 2013-07-09 13:40:43.000000000 +0200 +--- src/testdir/Make_os2.mak 2013-09-19 16:52:07.000000000 +0200 +*************** +*** 34,40 **** + test76.out test77.out test78.out test79.out test80.out \ + test81.out test82.out test83.out test84.out test88.out \ + test89.out test90.out test91.out test92.out test93.out \ +! test94.out test95.out test96.out test98.out + + .SUFFIXES: .in .out + +--- 34,40 ---- + test76.out test77.out test78.out test79.out test80.out \ + test81.out test82.out test83.out test84.out test88.out \ + test89.out test90.out test91.out test92.out test93.out \ +! test94.out test95.out test96.out test98.out test99.out + + .SUFFIXES: .in .out + +*** ../vim-7.4.027/src/testdir/Make_vms.mms 2013-07-09 13:40:47.000000000 +0200 +--- src/testdir/Make_vms.mms 2013-09-19 16:52:13.000000000 +0200 +*************** +*** 4,10 **** + # Authors: Zoltan Arpadffy, + # Sandor Kopanyi, + # +! # Last change: 2013 Jul 09 + # + # This has been tested on VMS 6.2 to 8.3 on DEC Alpha, VAX and IA64. + # Edit the lines in the Configuration section below to select. +--- 4,10 ---- + # Authors: Zoltan Arpadffy, + # Sandor Kopanyi, + # +! # Last change: 2013 Sep 19 + # + # This has been tested on VMS 6.2 to 8.3 on DEC Alpha, VAX and IA64. + # Edit the lines in the Configuration section below to select. +*************** +*** 78,84 **** + test77.out test78.out test79.out test80.out test81.out \ + test82.out test83.out test84.out test88.out test89.out \ + test90.out test91.out test92.out test93.out test94.out \ +! test95.out test96.out test97.out test98.out + + # Known problems: + # Test 30: a problem around mac format - unknown reason +--- 78,84 ---- + test77.out test78.out test79.out test80.out test81.out \ + test82.out test83.out test84.out test88.out test89.out \ + test90.out test91.out test92.out test93.out test94.out \ +! test95.out test96.out test97.out test98.out test99.out + + # Known problems: + # Test 30: a problem around mac format - unknown reason +*** ../vim-7.4.027/src/testdir/Makefile 2013-08-10 14:20:20.000000000 +0200 +--- src/testdir/Makefile 2013-09-19 16:52:22.000000000 +0200 +*************** +*** 29,35 **** + test79.out test80.out test81.out test82.out test83.out \ + test84.out test85.out test86.out test87.out test88.out \ + test89.out test90.out test91.out test92.out test93.out \ +! test94.out test95.out test96.out test97.out test98.out + + SCRIPTS_GUI = test16.out + +--- 29,36 ---- + test79.out test80.out test81.out test82.out test83.out \ + test84.out test85.out test86.out test87.out test88.out \ + test89.out test90.out test91.out test92.out test93.out \ +! test94.out test95.out test96.out test97.out test98.out \ +! test99.out + + SCRIPTS_GUI = test16.out + +*** ../vim-7.4.027/src/version.c 2013-09-08 20:00:45.000000000 +0200 +--- src/version.c 2013-09-19 13:54:35.000000000 +0200 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 28, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +232. You start conversations with, "Have you gotten an ISDN line?" + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.029 b/SOURCES/7.4.029 new file mode 100644 index 0000000..b87e3a3 --- /dev/null +++ b/SOURCES/7.4.029 @@ -0,0 +1,63 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.029 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.029 +Problem: An error in a pattern is reported twice. +Solution: Remove the retry with the backtracking engine, it won't work. +Files: src/regexp.c + + +*** ../vim-7.4.028/src/regexp.c 2013-08-25 17:01:36.000000000 +0200 +--- src/regexp.c 2013-09-19 17:03:31.000000000 +0200 +*************** +*** 8016,8027 **** + } + #endif + /* +! * If NFA engine failed, then revert to the backtracking engine. +! * Except when there was a syntax error, which was properly handled by +! * NFA engine. +! */ + if (regexp_engine == AUTOMATIC_ENGINE) + prog = bt_regengine.regcomp(expr, re_flags); + } + + return prog; +--- 8016,8026 ---- + } + #endif + /* +! * If the NFA engine failed, the backtracking engine won't work either. +! * + if (regexp_engine == AUTOMATIC_ENGINE) + prog = bt_regengine.regcomp(expr, re_flags); ++ */ + } + + return prog; +*** ../vim-7.4.028/src/version.c 2013-09-19 17:00:14.000000000 +0200 +--- src/version.c 2013-09-19 17:01:13.000000000 +0200 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 29, + /**/ + +-- +The term "free software" is defined by Richard M. Stallman as +being software that isn't necessarily for free. Confusing? +Let's call it "Stallman software" then! + -- Bram Moolenaar + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.030 b/SOURCES/7.4.030 new file mode 100644 index 0000000..d685df6 --- /dev/null +++ b/SOURCES/7.4.030 @@ -0,0 +1,109 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.030 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.030 +Problem: The -mno-cygwin argument is no longer supported by Cygwin. +Solution: Remove the arguments. (Steve Hall) +Files: src/GvimExt/Make_cyg.mak, src/Make_cyg.mak, src/xxd/Make_cyg.mak + + +*** ../vim-7.4.029/src/GvimExt/Make_cyg.mak 2011-09-30 16:45:49.000000000 +0200 +--- src/GvimExt/Make_cyg.mak 2013-09-19 20:46:46.000000000 +0200 +*************** +*** 31,42 **** + ifeq ($(CROSS),yes) + DEL = rm + ifeq ($(MINGWOLD),yes) +! CXXFLAGS := -O2 -mno-cygwin -fvtable-thunks + else +! CXXFLAGS := -O2 -mno-cygwin + endif + else +! CXXFLAGS := -O2 -mno-cygwin + ifneq (sh.exe, $(SHELL)) + DEL = rm + else +--- 31,42 ---- + ifeq ($(CROSS),yes) + DEL = rm + ifeq ($(MINGWOLD),yes) +! CXXFLAGS := -O2 -fvtable-thunks + else +! CXXFLAGS := -O2 + endif + else +! CXXFLAGS := -O2 + ifneq (sh.exe, $(SHELL)) + DEL = rm + else +*** ../vim-7.4.029/src/Make_cyg.mak 2013-07-06 13:32:11.000000000 +0200 +--- src/Make_cyg.mak 2013-09-19 20:46:55.000000000 +0200 +*************** +*** 1,6 **** + # + # Makefile for VIM on Win32, using Cygnus gcc +! # Last updated by Dan Sharp. Last Change: 2013 Apr 22 + # + # Also read INSTALLpc.txt! + # +--- 1,6 ---- + # + # Makefile for VIM on Win32, using Cygnus gcc +! # Last updated by Dan Sharp. Last Change: 2013 Sep 19 + # + # Also read INSTALLpc.txt! + # +*************** +*** 439,446 **** + ############################## + ifeq (yes, $(USEDLL)) + DEFINES += -D_MAX_PATH=256 -D__CYGWIN__ +- else +- INCLUDES += -mno-cygwin + endif + + ############################## +--- 439,444 ---- +*** ../vim-7.4.029/src/xxd/Make_cyg.mak 2010-05-15 13:04:06.000000000 +0200 +--- src/xxd/Make_cyg.mak 2013-09-19 20:47:05.000000000 +0200 +*************** +*** 8,14 **** + DEFINES = + LIBS = -lc + else +! DEFINES = -mno-cygwin + LIBS = + endif + +--- 8,14 ---- + DEFINES = + LIBS = -lc + else +! DEFINES = + LIBS = + endif + +*** ../vim-7.4.029/src/version.c 2013-09-19 17:03:57.000000000 +0200 +--- src/version.c 2013-09-19 20:46:32.000000000 +0200 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 30, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +237. You tattoo your email address on your forehead. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.031 b/SOURCES/7.4.031 new file mode 100644 index 0000000..f4e49d8 --- /dev/null +++ b/SOURCES/7.4.031 @@ -0,0 +1,54 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.031 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.031 +Problem: ":diffoff!" resets options even when 'diff' is not set. (Charles + Cooper) +Solution: Only resets related options in a window where 'diff' is set. +Files: src/diff.c + + +*** ../vim-7.4.030/src/diff.c 2013-07-17 13:43:15.000000000 +0200 +--- src/diff.c 2013-09-20 19:58:47.000000000 +0200 +*************** +*** 1203,1209 **** + + for (wp = firstwin; wp != NULL; wp = wp->w_next) + { +! if (wp == curwin || (eap->forceit && wp->w_p_diff)) + { + /* Set 'diff', 'scrollbind' off and 'wrap' on. If option values + * were saved in diff_win_options() restore them. */ +--- 1203,1209 ---- + + for (wp = firstwin; wp != NULL; wp = wp->w_next) + { +! if (eap->forceit ? wp->w_p_diff : wp == curwin) + { + /* Set 'diff', 'scrollbind' off and 'wrap' on. If option values + * were saved in diff_win_options() restore them. */ +*** ../vim-7.4.030/src/version.c 2013-09-19 20:48:59.000000000 +0200 +--- src/version.c 2013-09-20 19:59:45.000000000 +0200 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 31, + /**/ + +-- +"Marriage is a wonderful institution... +but who wants to live in an institution?" + - Groucho Marx + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.032 b/SOURCES/7.4.032 new file mode 100644 index 0000000..9e25dc4 --- /dev/null +++ b/SOURCES/7.4.032 @@ -0,0 +1,82 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.032 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.032 +Problem: NFA engine does not match the NUL character. (Jonathon Merz) +Solution: Ues 0x0a instead of NUL. (Christian Brabandt) +Files: src/regexp_nfa.c, src/testdir/test64.in, src/testdir/test64.ok + + +*** ../vim-7.4.031/src/regexp_nfa.c 2013-09-19 17:00:14.000000000 +0200 +--- src/regexp_nfa.c 2013-09-22 13:53:46.000000000 +0200 +*************** +*** 1383,1390 **** + EMSG2_RET_FAIL( + _("E678: Invalid character after %s%%[dxouU]"), + reg_magic == MAGIC_ALL); + /* TODO: what if a composing character follows? */ +! EMIT(nr); + } + break; + +--- 1383,1391 ---- + EMSG2_RET_FAIL( + _("E678: Invalid character after %s%%[dxouU]"), + reg_magic == MAGIC_ALL); ++ /* A NUL is stored in the text as NL */ + /* TODO: what if a composing character follows? */ +! EMIT(nr == 0 ? 0x0a : nr); + } + break; + +*** ../vim-7.4.031/src/testdir/test64.in 2013-09-05 21:15:38.000000000 +0200 +--- src/testdir/test64.in 2013-09-22 13:51:53.000000000 +0200 +*************** +*** 373,378 **** +--- 373,379 ---- + :call add(tl, [2, '\%x20', 'yes no', ' ']) + :call add(tl, [2, '\%u0020', 'yes no', ' ']) + :call add(tl, [2, '\%U00000020', 'yes no', ' ']) ++ :call add(tl, [2, '\%d0', "yes\x0ano", "\x0a"]) + :" + :""""" \%[abc] + :call add(tl, [2, 'foo\%[bar]', 'fobar']) +*** ../vim-7.4.031/src/testdir/test64.ok 2013-09-05 21:15:38.000000000 +0200 +--- src/testdir/test64.ok 2013-09-22 13:52:41.000000000 +0200 +*************** +*** 863,868 **** +--- 863,871 ---- + OK 0 - \%U00000020 + OK 1 - \%U00000020 + OK 2 - \%U00000020 ++ OK 0 - \%d0 ++ OK 1 - \%d0 ++ OK 2 - \%d0 + OK 0 - foo\%[bar] + OK 1 - foo\%[bar] + OK 2 - foo\%[bar] +*** ../vim-7.4.031/src/version.c 2013-09-20 20:13:48.000000000 +0200 +--- src/version.c 2013-09-22 13:56:45.000000000 +0200 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 32, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +247. You use www.switchboard.com instead of dialing 411 and 555-12-12 + for directory assistance. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.033 b/SOURCES/7.4.033 new file mode 100644 index 0000000..7eba8a0 --- /dev/null +++ b/SOURCES/7.4.033 @@ -0,0 +1,116 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.033 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.033 +Problem: When the terminal has only 20 lines test 92 and 93 overwrite the + input file. +Solution: Explicitly write test.out. Check that the terminal is large enough + to run the tests. (Hirohito Higashi) +Files: src/testdir/test92.in, src/testdir/test93.in, + src/testdir/test1.in, src/testdir/Makefile + + +*** ../vim-7.4.032/src/testdir/test92.in 2013-04-18 23:33:45.000000000 +0200 +--- src/testdir/test92.in 2013-09-22 14:45:06.000000000 +0200 +*************** +*** 33,39 **** + :mksession! test.out + :new test.out + :v/\(^ *normal! 0\|^ *exe 'normal!\)/d +! :w + :qa! + ENDTEST + +--- 33,39 ---- + :mksession! test.out + :new test.out + :v/\(^ *normal! 0\|^ *exe 'normal!\)/d +! :w! test.out + :qa! + ENDTEST + +*** ../vim-7.4.032/src/testdir/test93.in 2013-02-26 17:13:01.000000000 +0100 +--- src/testdir/test93.in 2013-09-22 14:45:17.000000000 +0200 +*************** +*** 33,39 **** + :mksession! test.out + :new test.out + :v/\(^ *normal! 0\|^ *exe 'normal!\)/d +! :w + :qa! + ENDTEST + +--- 33,39 ---- + :mksession! test.out + :new test.out + :v/\(^ *normal! 0\|^ *exe 'normal!\)/d +! :w! test.out + :qa! + ENDTEST + +*** ../vim-7.4.032/src/testdir/test1.in 2012-04-05 16:37:37.000000000 +0200 +--- src/testdir/test1.in 2013-09-22 14:52:43.000000000 +0200 +*************** +*** 18,23 **** +--- 18,27 ---- + Similar logic is applied to the +lua feature, using lua.vim. + + STARTTEST ++ :" If columns or lines are too small, create wrongtermsize. ++ :" (Some tests will fail. When columns and/or lines are small) ++ :if &lines < 24 || &columns < 80 | sp another | w! wrongtermsize | qa! | endif ++ :" + :" Write a single line to test.out to check if testing works at all. + :%d + athis is a test:w! test.out +*** ../vim-7.4.032/src/testdir/Makefile 2013-09-19 17:00:14.000000000 +0200 +--- src/testdir/Makefile 2013-09-22 14:54:39.000000000 +0200 +*************** +*** 58,66 **** + -rm -rf *.out *.failed *.rej *.orig test.log $(RM_ON_RUN) $(RM_ON_START) valgrind.* + + test1.out: test1.in +! -rm -rf $*.failed $(RM_ON_RUN) $(RM_ON_START) + $(RUN_VIM) $*.in +! @/bin/sh -c "if diff test.out $*.ok; \ + then mv -f test.out $*.out; \ + else echo; \ + echo test1 FAILED - Something basic is wrong; \ +--- 58,70 ---- + -rm -rf *.out *.failed *.rej *.orig test.log $(RM_ON_RUN) $(RM_ON_START) valgrind.* + + test1.out: test1.in +! -rm -rf $*.failed $(RM_ON_RUN) $(RM_ON_START) wrongtermsize + $(RUN_VIM) $*.in +! @/bin/sh -c "if test -e wrongtermsize; \ +! then echo; \ +! echo test1 FAILED - terminal size must be 80x24 or larger; \ +! echo; exit 1; \ +! elif diff test.out $*.ok; \ + then mv -f test.out $*.out; \ + else echo; \ + echo test1 FAILED - Something basic is wrong; \ +*** ../vim-7.4.032/src/version.c 2013-09-22 13:57:19.000000000 +0200 +--- src/version.c 2013-09-22 15:02:04.000000000 +0200 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 33, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +248. You sign your letters with your e-mail address instead of your name. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.035 b/SOURCES/7.4.035 new file mode 100644 index 0000000..9c4664a --- /dev/null +++ b/SOURCES/7.4.035 @@ -0,0 +1,53 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.035 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.035 +Problem: MS-Windows: The mouse pointer flickers when going from command + line mode to Normal mode. +Solution: Check for WM_NCMOUSEMOVE. (Ken Takata) +Files: src/gui_w48.c + + +*** ../vim-7.4.034/src/gui_w48.c 2013-08-10 13:36:45.000000000 +0200 +--- src/gui_w48.c 2013-09-22 15:41:56.000000000 +0200 +*************** +*** 1008,1014 **** + static LPARAM last_lParam = 0L; + + /* We sometimes get a mousemove when the mouse didn't move... */ +! if (uMsg == WM_MOUSEMOVE) + { + if (lParam == last_lParam) + return; +--- 1008,1014 ---- + static LPARAM last_lParam = 0L; + + /* We sometimes get a mousemove when the mouse didn't move... */ +! if (uMsg == WM_MOUSEMOVE || uMsg == WM_NCMOUSEMOVE) + { + if (lParam == last_lParam) + return; +*** ../vim-7.4.034/src/version.c 2013-09-22 15:23:38.000000000 +0200 +--- src/version.c 2013-09-22 15:41:29.000000000 +0200 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 35, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +251. You've never seen your closest friends who usually live WAY too far away. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.036 b/SOURCES/7.4.036 new file mode 100644 index 0000000..49afc26 --- /dev/null +++ b/SOURCES/7.4.036 @@ -0,0 +1,273 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.036 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.036 +Problem: NFA engine does not capture group correctly when using \@>. (ZyX) +Solution: Copy submatches before doing the recursive match. +Files: src/regexp_nfa.c, src/testdir/test64.in, src/testdir/test64.ok + + +*** ../vim-7.4.035/src/regexp_nfa.c 2013-09-22 13:57:19.000000000 +0200 +--- src/regexp_nfa.c 2013-09-25 16:35:54.000000000 +0200 +*************** +*** 36,42 **** + { + NFA_SPLIT = -1024, + NFA_MATCH, +! NFA_SKIP_CHAR, /* matches a 0-length char */ + + NFA_START_COLL, /* [abc] start */ + NFA_END_COLL, /* [abc] end */ +--- 36,42 ---- + { + NFA_SPLIT = -1024, + NFA_MATCH, +! NFA_EMPTY, /* matches 0-length */ + + NFA_START_COLL, /* [abc] start */ + NFA_END_COLL, /* [abc] end */ +*************** +*** 2005,2012 **** + { + /* Ignore result of previous call to nfa_regatom() */ + post_ptr = post_start + my_post_start; +! /* NFA_SKIP_CHAR has 0-length and works everywhere */ +! EMIT(NFA_SKIP_CHAR); + return OK; + } + +--- 2005,2012 ---- + { + /* Ignore result of previous call to nfa_regatom() */ + post_ptr = post_start + my_post_start; +! /* NFA_EMPTY is 0-length and works everywhere */ +! EMIT(NFA_EMPTY); + return OK; + } + +*************** +*** 2170,2185 **** + old_post_pos = (int)(post_ptr - post_start); + if (nfa_regconcat() == FAIL) + return FAIL; +! /* if concat is empty, skip a input char. But do emit a node */ + if (old_post_pos == (int)(post_ptr - post_start)) +! EMIT(NFA_SKIP_CHAR); + EMIT(NFA_CONCAT); + ch = peekchr(); + } + +! /* Even if a branch is empty, emit one node for it */ + if (old_post_pos == (int)(post_ptr - post_start)) +! EMIT(NFA_SKIP_CHAR); + + return OK; + } +--- 2170,2185 ---- + old_post_pos = (int)(post_ptr - post_start); + if (nfa_regconcat() == FAIL) + return FAIL; +! /* if concat is empty do emit a node */ + if (old_post_pos == (int)(post_ptr - post_start)) +! EMIT(NFA_EMPTY); + EMIT(NFA_CONCAT); + ch = peekchr(); + } + +! /* if a branch is empty, emit one node for it */ + if (old_post_pos == (int)(post_ptr - post_start)) +! EMIT(NFA_EMPTY); + + return OK; + } +*************** +*** 2423,2429 **** + case NFA_STAR_NONGREEDY: STRCPY(code, "NFA_STAR_NONGREEDY "); break; + case NFA_QUEST: STRCPY(code, "NFA_QUEST"); break; + case NFA_QUEST_NONGREEDY: STRCPY(code, "NFA_QUEST_NON_GREEDY"); break; +! case NFA_SKIP_CHAR: STRCPY(code, "NFA_SKIP_CHAR"); break; + case NFA_OR: STRCPY(code, "NFA_OR"); break; + + case NFA_START_COLL: STRCPY(code, "NFA_START_COLL"); break; +--- 2423,2429 ---- + case NFA_STAR_NONGREEDY: STRCPY(code, "NFA_STAR_NONGREEDY "); break; + case NFA_QUEST: STRCPY(code, "NFA_QUEST"); break; + case NFA_QUEST_NONGREEDY: STRCPY(code, "NFA_QUEST_NON_GREEDY"); break; +! case NFA_EMPTY: STRCPY(code, "NFA_EMPTY"); break; + case NFA_OR: STRCPY(code, "NFA_OR"); break; + + case NFA_START_COLL: STRCPY(code, "NFA_START_COLL"); break; +*************** +*** 3067,3073 **** + case NFA_ZSTART: + case NFA_ZEND: + case NFA_OPT_CHARS: +! case NFA_SKIP_CHAR: + case NFA_START_PATTERN: + case NFA_END_PATTERN: + case NFA_COMPOSING: +--- 3067,3073 ---- + case NFA_ZSTART: + case NFA_ZEND: + case NFA_OPT_CHARS: +! case NFA_EMPTY: + case NFA_START_PATTERN: + case NFA_END_PATTERN: + case NFA_COMPOSING: +*************** +*** 3265,3279 **** + PUSH(frag(e1.start, e2.out)); + break; + +! case NFA_SKIP_CHAR: +! /* Symbol of 0-length, Used in a repetition +! * with max/min count of 0 */ + if (nfa_calc_size == TRUE) + { + nstate++; + break; + } +! s = alloc_state(NFA_SKIP_CHAR, NULL, NULL); + if (s == NULL) + goto theend; + PUSH(frag(s, list1(&s->out))); +--- 3265,3278 ---- + PUSH(frag(e1.start, e2.out)); + break; + +! case NFA_EMPTY: +! /* 0-length, used in a repetition with max/min count of 0 */ + if (nfa_calc_size == TRUE) + { + nstate++; + break; + } +! s = alloc_state(NFA_EMPTY, NULL, NULL); + if (s == NULL) + goto theend; + PUSH(frag(s, list1(&s->out))); +*************** +*** 4209,4215 **** + case NFA_MOPEN: + case NFA_ZEND: + case NFA_SPLIT: +! case NFA_SKIP_CHAR: + /* These nodes are not added themselves but their "out" and/or + * "out1" may be added below. */ + break; +--- 4208,4214 ---- + case NFA_MOPEN: + case NFA_ZEND: + case NFA_SPLIT: +! case NFA_EMPTY: + /* These nodes are not added themselves but their "out" and/or + * "out1" may be added below. */ + break; +*************** +*** 4337,4343 **** + subs = addstate(l, state->out1, subs, pim, off); + break; + +! case NFA_SKIP_CHAR: + case NFA_NOPEN: + case NFA_NCLOSE: + subs = addstate(l, state->out, subs, pim, off); +--- 4336,4342 ---- + subs = addstate(l, state->out1, subs, pim, off); + break; + +! case NFA_EMPTY: + case NFA_NOPEN: + case NFA_NCLOSE: + subs = addstate(l, state->out, subs, pim, off); +*************** +*** 5604,5612 **** + { + int in_use = m->norm.in_use; + +! /* Copy submatch info for the recursive call, so that +! * \1 can be matched. */ + copy_sub_off(&m->norm, &t->subs.norm); + + /* + * First try matching the invisible match, then what +--- 5603,5615 ---- + { + int in_use = m->norm.in_use; + +! /* Copy submatch info for the recursive call, opposite +! * of what happens on success below. */ + copy_sub_off(&m->norm, &t->subs.norm); ++ #ifdef FEAT_SYN_HL ++ if (nfa_has_zsubexpr) ++ copy_sub_off(&m->synt, &t->subs.synt); ++ #endif + + /* + * First try matching the invisible match, then what +*************** +*** 5713,5718 **** +--- 5716,5728 ---- + #endif + break; + } ++ /* Copy submatch info to the recursive call, opposite of what ++ * happens afterwards. */ ++ copy_sub_off(&m->norm, &t->subs.norm); ++ #ifdef FEAT_SYN_HL ++ if (nfa_has_zsubexpr) ++ copy_sub_off(&m->synt, &t->subs.synt); ++ #endif + + /* First try matching the pattern. */ + result = recursive_regmatch(t->state, NULL, prog, +*** ../vim-7.4.035/src/testdir/test64.in 2013-09-22 13:57:19.000000000 +0200 +--- src/testdir/test64.in 2013-09-25 15:51:12.000000000 +0200 +*************** +*** 430,435 **** +--- 430,436 ---- + :call add(tl, [2, '\(a*\)\@>a', 'aaaa']) + :call add(tl, [2, '\(a*\)\@>b', 'aaab', 'aaab', 'aaa']) + :call add(tl, [2, '^\(.\{-}b\)\@>.', ' abcbd', ' abc', ' ab']) ++ :call add(tl, [2, '\(.\{-}\)\(\)\@>$', 'abc', 'abc', 'abc', '']) + :" TODO: BT engine does not restore submatch after failure + :call add(tl, [1, '\(a*\)\@>a\|a\+', 'aaaa', 'aaaa']) + :" +*** ../vim-7.4.035/src/testdir/test64.ok 2013-09-22 13:57:19.000000000 +0200 +--- src/testdir/test64.ok 2013-09-25 16:39:31.000000000 +0200 +*************** +*** 992,997 **** +--- 992,1000 ---- + OK 0 - ^\(.\{-}b\)\@>. + OK 1 - ^\(.\{-}b\)\@>. + OK 2 - ^\(.\{-}b\)\@>. ++ OK 0 - \(.\{-}\)\(\)\@>$ ++ OK 1 - \(.\{-}\)\(\)\@>$ ++ OK 2 - \(.\{-}\)\(\)\@>$ + OK 0 - \(a*\)\@>a\|a\+ + OK 2 - \(a*\)\@>a\|a\+ + OK 0 - \_[^8-9]\+ +*** ../vim-7.4.035/src/version.c 2013-09-22 15:43:34.000000000 +0200 +--- src/version.c 2013-09-25 16:40:01.000000000 +0200 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 36, + /**/ + +-- +There is a fine line between courage and foolishness. +Unfortunately, it's not a fence. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.037 b/SOURCES/7.4.037 new file mode 100644 index 0000000..3c6369b --- /dev/null +++ b/SOURCES/7.4.037 @@ -0,0 +1,130 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.037 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.037 +Problem: Using "\ze" in a sub-pattern does not result in the end of the + match to be set. (Axel Bender) +Solution: Copy the end of match position when a recursive match was + successful. +Files: src/regexp_nfa.c, src/testdir/test64.in, src/testdir/test64.ok + + +*** ../vim-7.4.036/src/regexp_nfa.c 2013-09-25 16:41:50.000000000 +0200 +--- src/regexp_nfa.c 2013-09-25 18:09:59.000000000 +0200 +*************** +*** 3822,3827 **** +--- 3822,3828 ---- + static void clear_sub __ARGS((regsub_T *sub)); + static void copy_sub __ARGS((regsub_T *to, regsub_T *from)); + static void copy_sub_off __ARGS((regsub_T *to, regsub_T *from)); ++ static void copy_ze_off __ARGS((regsub_T *to, regsub_T *from)); + static int sub_equal __ARGS((regsub_T *sub1, regsub_T *sub2)); + static int match_backref __ARGS((regsub_T *sub, int subidx, int *bytelen)); + static int has_state_with_pos __ARGS((nfa_list_T *l, nfa_state_T *state, regsubs_T *subs, nfa_pim_T *pim)); +*************** +*** 3909,3914 **** +--- 3910,3938 ---- + } + + /* ++ * Like copy_sub() but only do the end of the main match if \ze is present. ++ */ ++ static void ++ copy_ze_off(to, from) ++ regsub_T *to; ++ regsub_T *from; ++ { ++ if (nfa_has_zend) ++ { ++ if (REG_MULTI) ++ { ++ if (from->list.multi[0].end.lnum >= 0) ++ to->list.multi[0].end = from->list.multi[0].end; ++ } ++ else ++ { ++ if (from->list.line[0].end != NULL) ++ to->list.line[0].end = from->list.line[0].end; ++ } ++ } ++ } ++ ++ /* + * Return TRUE if "sub1" and "sub2" have the same start positions. + */ + static int +*************** +*** 5308,5313 **** +--- 5332,5338 ---- + * When "nfa_endp" is not NULL it is a required end-of-match position. + * + * Return TRUE if there is a match, FALSE otherwise. ++ * When there is a match "submatch" contains the positions. + * Note: Caller must ensure that: start != NULL. + */ + static int +*************** +*** 5633,5638 **** +--- 5658,5666 ---- + if (nfa_has_zsubexpr) + copy_sub_off(&t->subs.synt, &m->synt); + #endif ++ /* If the pattern has \ze and it matched in the ++ * sub pattern, use it. */ ++ copy_ze_off(&t->subs.norm, &m->norm); + + /* t->state->out1 is the corresponding + * END_INVISIBLE node; Add its out to the current +*** ../vim-7.4.036/src/testdir/test64.in 2013-09-25 16:41:50.000000000 +0200 +--- src/testdir/test64.in 2013-09-25 18:09:16.000000000 +0200 +*************** +*** 425,430 **** +--- 425,431 ---- + :" + :" complicated look-behind match + :call add(tl, [2, '\(r\@<=\|\w\@ + :call add(tl, [2, '\(a*\)\@>a', 'aaaa']) +*** ../vim-7.4.036/src/testdir/test64.ok 2013-09-25 16:41:50.000000000 +0200 +--- src/testdir/test64.ok 2013-09-25 18:10:05.000000000 +0200 +*************** +*** 983,988 **** +--- 983,991 ---- + OK 0 - \(r\@<=\|\w\@a + OK 1 - \(a*\)\@>a + OK 2 - \(a*\)\@>a +*** ../vim-7.4.036/src/version.c 2013-09-25 16:41:50.000000000 +0200 +--- src/version.c 2013-09-25 18:14:36.000000000 +0200 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 37, + /**/ + +-- +MAN: You don't frighten us, English pig-dog! Go and boil your bottoms, + son of a silly person. I blow my nose on you, so-called Arthur-king, + you and your silly English K...kaniggets. + He puts hands to his ears and blows a raspberry. + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.038 b/SOURCES/7.4.038 new file mode 100644 index 0000000..0aae370 --- /dev/null +++ b/SOURCES/7.4.038 @@ -0,0 +1,116 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.038 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.038 +Problem: Using "zw" and "zg" when 'spell' is off give a confusing error + message. (Gary Johnson) +Solution: Ignore the error when locating the word. Explicitly mention what + word was added. (Christian Brabandt) +Files: src/normal.c, src/spell.c + + +*** ../vim-7.4.037/src/normal.c 2013-09-22 15:23:38.000000000 +0200 +--- src/normal.c 2013-09-25 18:54:08.000000000 +0200 +*************** +*** 5246,5253 **** + { + pos_T pos = curwin->w_cursor; + +! /* Find bad word under the cursor. */ + len = spell_move_to(curwin, FORWARD, TRUE, TRUE, NULL); + if (len != 0 && curwin->w_cursor.col <= pos.col) + ptr = ml_get_pos(&curwin->w_cursor); + curwin->w_cursor = pos; +--- 5246,5257 ---- + { + pos_T pos = curwin->w_cursor; + +! /* Find bad word under the cursor. When 'spell' is +! * off this fails and find_ident_under_cursor() is +! * used below. */ +! emsg_off++; + len = spell_move_to(curwin, FORWARD, TRUE, TRUE, NULL); ++ emsg_off--; + if (len != 0 && curwin->w_cursor.col <= pos.col) + ptr = ml_get_pos(&curwin->w_cursor); + curwin->w_cursor = pos; +*** ../vim-7.4.037/src/spell.c 2013-07-17 17:28:28.000000000 +0200 +--- src/spell.c 2013-09-25 18:48:55.000000000 +0200 +*************** +*** 9479,9485 **** + if (undo) + { + home_replace(NULL, fname, NameBuff, MAXPATHL, TRUE); +! smsg((char_u *)_("Word removed from %s"), NameBuff); + } + } + fseek(fd, fpos_next, SEEK_SET); +--- 9479,9486 ---- + if (undo) + { + home_replace(NULL, fname, NameBuff, MAXPATHL, TRUE); +! smsg((char_u *)_("Word '%.*s' removed from %s"), +! len, word, NameBuff); + } + } + fseek(fd, fpos_next, SEEK_SET); +*************** +*** 9525,9531 **** + fclose(fd); + + home_replace(NULL, fname, NameBuff, MAXPATHL, TRUE); +! smsg((char_u *)_("Word added to %s"), NameBuff); + } + } + +--- 9526,9532 ---- + fclose(fd); + + home_replace(NULL, fname, NameBuff, MAXPATHL, TRUE); +! smsg((char_u *)_("Word '%.*s' added to %s"), len, word, NameBuff); + } + } + +*************** +*** 10135,10141 **** + } + + /* +! * "z?": Find badly spelled word under or after the cursor. + * Give suggestions for the properly spelled word. + * In Visual mode use the highlighted word as the bad word. + * When "count" is non-zero use that suggestion. +--- 10136,10142 ---- + } + + /* +! * "z=": Find badly spelled word under or after the cursor. + * Give suggestions for the properly spelled word. + * In Visual mode use the highlighted word as the bad word. + * When "count" is non-zero use that suggestion. +*** ../vim-7.4.037/src/version.c 2013-09-25 18:16:34.000000000 +0200 +--- src/version.c 2013-09-25 18:52:47.000000000 +0200 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 38, + /**/ + +-- +MAN: Fetchez la vache! +GUARD: Quoi? +MAN: Fetchez la vache! + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.039 b/SOURCES/7.4.039 new file mode 100644 index 0000000..5d653e3 --- /dev/null +++ b/SOURCES/7.4.039 @@ -0,0 +1,217 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.039 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.039 +Problem: MS-Windows: MSCV10 and earlier can't handle symlinks to a + directory properly. +Solution: Add stat_symlink_aware() and wstat_symlink_aware(). (Ken Takata) +Files: src/os_mswin.c, src/os_win32.c, src/os_win32.h + + +*** ../vim-7.4.038/src/os_mswin.c 2013-08-30 16:51:15.000000000 +0200 +--- src/os_mswin.c 2013-09-25 19:09:53.000000000 +0200 +*************** +*** 498,503 **** +--- 498,595 ---- + } + } + ++ static int ++ stat_symlink_aware(const char *name, struct stat *stp) ++ { ++ #if defined(_MSC_VER) && _MSC_VER < 1700 ++ /* Work around for VC10 or earlier. stat() can't handle symlinks properly. ++ * VC9 or earlier: stat() doesn't support a symlink at all. It retrieves ++ * status of a symlink itself. ++ * VC10: stat() supports a symlink to a normal file, but it doesn't support ++ * a symlink to a directory (always returns an error). */ ++ WIN32_FIND_DATA findData; ++ HANDLE hFind, h; ++ DWORD attr = 0; ++ BOOL is_symlink = FALSE; ++ ++ hFind = FindFirstFile(name, &findData); ++ if (hFind != INVALID_HANDLE_VALUE) ++ { ++ attr = findData.dwFileAttributes; ++ if ((attr & FILE_ATTRIBUTE_REPARSE_POINT) ++ && (findData.dwReserved0 == IO_REPARSE_TAG_SYMLINK)) ++ is_symlink = TRUE; ++ FindClose(hFind); ++ } ++ if (is_symlink) ++ { ++ h = CreateFile(name, FILE_READ_ATTRIBUTES, ++ FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, ++ OPEN_EXISTING, ++ (attr & FILE_ATTRIBUTE_DIRECTORY) ++ ? FILE_FLAG_BACKUP_SEMANTICS : 0, ++ NULL); ++ if (h != INVALID_HANDLE_VALUE) ++ { ++ int fd, n; ++ ++ fd = _open_osfhandle((intptr_t)h, _O_RDONLY); ++ n = _fstat(fd, (struct _stat*)stp); ++ _close(fd); ++ return n; ++ } ++ } ++ #endif ++ return stat(name, stp); ++ } ++ ++ #ifdef FEAT_MBYTE ++ static int ++ wstat_symlink_aware(const WCHAR *name, struct _stat *stp) ++ { ++ # if defined(_MSC_VER) && _MSC_VER < 1700 ++ /* Work around for VC10 or earlier. _wstat() can't handle symlinks properly. ++ * VC9 or earlier: _wstat() doesn't support a symlink at all. It retrieves ++ * status of a symlink itself. ++ * VC10: _wstat() supports a symlink to a normal file, but it doesn't ++ * support a symlink to a directory (always returns an error). */ ++ int n; ++ BOOL is_symlink = FALSE; ++ HANDLE hFind, h; ++ DWORD attr = 0; ++ WIN32_FIND_DATAW findDataW; ++ ++ hFind = FindFirstFileW(name, &findDataW); ++ if (hFind != INVALID_HANDLE_VALUE) ++ { ++ attr = findDataW.dwFileAttributes; ++ if ((attr & FILE_ATTRIBUTE_REPARSE_POINT) ++ && (findDataW.dwReserved0 == IO_REPARSE_TAG_SYMLINK)) ++ is_symlink = TRUE; ++ FindClose(hFind); ++ } ++ if (is_symlink) ++ { ++ h = CreateFileW(name, FILE_READ_ATTRIBUTES, ++ FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, ++ OPEN_EXISTING, ++ (attr & FILE_ATTRIBUTE_DIRECTORY) ++ ? FILE_FLAG_BACKUP_SEMANTICS : 0, ++ NULL); ++ if (h != INVALID_HANDLE_VALUE) ++ { ++ int fd; ++ ++ fd = _open_osfhandle((intptr_t)h, _O_RDONLY); ++ n = _fstat(fd, stp); ++ _close(fd); ++ return n; ++ } ++ } ++ # endif ++ return _wstat(name, stp); ++ } ++ #endif + + /* + * stat() can't handle a trailing '/' or '\', remove it first. +*************** +*** 534,540 **** + + if (wp != NULL) + { +! n = _wstat(wp, (struct _stat *)stp); + vim_free(wp); + if (n >= 0) + return n; +--- 626,632 ---- + + if (wp != NULL) + { +! n = wstat_symlink_aware(wp, (struct _stat *)stp); + vim_free(wp); + if (n >= 0) + return n; +*************** +*** 544,550 **** + } + } + #endif +! return stat(buf, stp); + } + + #if defined(FEAT_GUI_MSWIN) || defined(PROTO) +--- 636,642 ---- + } + } + #endif +! return stat_symlink_aware(buf, stp); + } + + #if defined(FEAT_GUI_MSWIN) || defined(PROTO) +*** ../vim-7.4.038/src/os_win32.c 2013-08-30 17:29:10.000000000 +0200 +--- src/os_win32.c 2013-09-25 19:09:53.000000000 +0200 +*************** +*** 78,93 **** + # endif + #endif + +- /* +- * Reparse Point +- */ +- #ifndef FILE_ATTRIBUTE_REPARSE_POINT +- # define FILE_ATTRIBUTE_REPARSE_POINT 0x00000400 +- #endif +- #ifndef IO_REPARSE_TAG_SYMLINK +- # define IO_REPARSE_TAG_SYMLINK 0xA000000C +- #endif +- + /* Record all output and all keyboard & mouse input */ + /* #define MCH_WRITE_DUMP */ + +--- 78,83 ---- +*** ../vim-7.4.038/src/os_win32.h 2013-07-21 17:53:13.000000000 +0200 +--- src/os_win32.h 2013-09-25 19:09:53.000000000 +0200 +*************** +*** 130,135 **** +--- 130,148 ---- + # define DFLT_MAXMEMTOT (5*1024) /* use up to 5 Mbyte for Vim */ + #endif + ++ /* ++ * Reparse Point ++ */ ++ #ifndef FILE_ATTRIBUTE_REPARSE_POINT ++ # define FILE_ATTRIBUTE_REPARSE_POINT 0x00000400 ++ #endif ++ #ifndef IO_REPARSE_TAG_MOUNT_POINT ++ # define IO_REPARSE_TAG_MOUNT_POINT 0xA0000003 ++ #endif ++ #ifndef IO_REPARSE_TAG_SYMLINK ++ # define IO_REPARSE_TAG_SYMLINK 0xA000000C ++ #endif ++ + #if defined(_MSC_VER) || defined(__BORLANDC__) + /* Support for __try / __except. All versions of MSVC and Borland C are + * expected to have this. Any other compilers that support it? */ +*** ../vim-7.4.038/src/version.c 2013-09-25 18:54:20.000000000 +0200 +--- src/version.c 2013-09-25 19:08:55.000000000 +0200 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 39, + /**/ + +-- + A cow comes flying over the battlements, lowing aggressively. The cow + lands on GALAHAD'S PAGE, squashing him completely. + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.040 b/SOURCES/7.4.040 new file mode 100644 index 0000000..a600223 --- /dev/null +++ b/SOURCES/7.4.040 @@ -0,0 +1,68 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.040 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.040 +Problem: Valgrind error on exit when a script-local variable holds a + reference to the scope of another script. +Solution: First clear all variables, then free the scopes. (ZyX) +Files: src/eval.c + + +*** ../vim-7.4.039/src/eval.c 2013-08-30 16:35:41.000000000 +0200 +--- src/eval.c 2013-09-25 20:28:15.000000000 +0200 +*************** +*** 915,926 **** + /* autoloaded script names */ + ga_clear_strings(&ga_loaded); + +! /* script-local variables */ + for (i = 1; i <= ga_scripts.ga_len; ++i) +- { + vars_clear(&SCRIPT_VARS(i)); + vim_free(SCRIPT_SV(i)); +- } + ga_clear(&ga_scripts); + + /* unreferenced lists and dicts */ +--- 915,927 ---- + /* autoloaded script names */ + ga_clear_strings(&ga_loaded); + +! /* Script-local variables. First clear all the variables and in a second +! * loop free the scriptvar_T, because a variable in one script might hold +! * a reference to the whole scope of another script. */ + for (i = 1; i <= ga_scripts.ga_len; ++i) + vars_clear(&SCRIPT_VARS(i)); ++ for (i = 1; i <= ga_scripts.ga_len; ++i) + vim_free(SCRIPT_SV(i)); + ga_clear(&ga_scripts); + + /* unreferenced lists and dicts */ +*** ../vim-7.4.039/src/version.c 2013-09-25 19:13:32.000000000 +0200 +--- src/version.c 2013-09-25 20:30:06.000000000 +0200 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 40, + /**/ + +-- + A KNIGHT rides into shot and hacks him to the ground. He rides off. + We stay for a moment on the glade. A MIDDLE-AGED LADY in a C. & A. + twin-set emerges from the trees and looks in horror at the body of her + HUSBAND. +MRS HISTORIAN: FRANK! + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.041 b/SOURCES/7.4.041 new file mode 100644 index 0000000..190604e --- /dev/null +++ b/SOURCES/7.4.041 @@ -0,0 +1,61 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.041 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.041 (after 7.4.034) +Problem: Visual selection does not remain after being copied over. (Axel + Bender) +Solution: Move when VIsual_active is reset. (Christian Brabandt) +Files: src/ops.c + + +*** ../vim-7.4.040/src/ops.c 2013-09-22 15:23:38.000000000 +0200 +--- src/ops.c 2013-09-25 23:20:37.000000000 +0200 +*************** +*** 3808,3816 **** + FALSE /* stop after 1 paste */ + #endif + ); +- #ifdef FEAT_VISUAL +- VIsual_active = FALSE; +- #endif + + curbuf->b_op_end = curwin->w_cursor; + /* For "CTRL-O p" in Insert mode, put cursor after last char */ +--- 3808,3813 ---- +*************** +*** 3972,3977 **** +--- 3969,3978 ---- + if (regname == '=') + vim_free(y_array); + ++ #ifdef FEAT_VISUAL ++ VIsual_active = FALSE; ++ #endif ++ + /* If the cursor is past the end of the line put it at the end. */ + adjust_cursor_eol(); + } +*** ../vim-7.4.040/src/version.c 2013-09-25 21:00:24.000000000 +0200 +--- src/version.c 2013-09-25 23:20:46.000000000 +0200 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 41, + /**/ + + +-- +press CTRL-ALT-DEL for more information + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.042 b/SOURCES/7.4.042 new file mode 100644 index 0000000..648a1bf --- /dev/null +++ b/SOURCES/7.4.042 @@ -0,0 +1,71 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.042 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.042 +Problem: When using ":setlocal" for 'spell' and 'spellang' then :spelldump + doesn't work. (Dimitar Dimitrov) +Solution: Copy the option variables to the new window used to show the dump. + (Christian Brabandt) +Files: src/spell.c + + +*** ../vim-7.4.041/src/spell.c 2013-09-25 18:54:20.000000000 +0200 +--- src/spell.c 2013-09-29 13:15:51.000000000 +0200 +*************** +*** 15569,15579 **** + ex_spelldump(eap) + exarg_T *eap; + { + if (no_spell_checking(curwin)) + return; + +! /* Create a new empty buffer by splitting the window. */ + do_cmdline_cmd((char_u *)"new"); + if (!bufempty() || !buf_valid(curbuf)) + return; + +--- 15569,15589 ---- + ex_spelldump(eap) + exarg_T *eap; + { ++ char_u *spl; ++ long dummy; ++ + if (no_spell_checking(curwin)) + return; ++ get_option_value((char_u*)"spl", &dummy, &spl, OPT_LOCAL); + +! /* Create a new empty buffer in a new window. */ + do_cmdline_cmd((char_u *)"new"); ++ ++ /* enable spelling locally in the new window */ ++ set_option_value((char_u*)"spell", TRUE, (char_u*)"", OPT_LOCAL); ++ set_option_value((char_u*)"spl", dummy, spl, OPT_LOCAL); ++ vim_free(spl); ++ + if (!bufempty() || !buf_valid(curbuf)) + return; + +*** ../vim-7.4.041/src/version.c 2013-09-25 23:24:54.000000000 +0200 +--- src/version.c 2013-09-29 13:15:17.000000000 +0200 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 42, + /**/ + +-- +Experience is what you get when you don't get what you want. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.043 b/SOURCES/7.4.043 new file mode 100644 index 0000000..0c3d852 --- /dev/null +++ b/SOURCES/7.4.043 @@ -0,0 +1,89 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.043 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.043 +Problem: VMS can't handle long function names. +Solution: Shorten may_req_ambiguous_character_width. (Samuel Ferencik) +Files: src/main.c, src/term.c, src/proto/term.pro + + +*** ../vim-7.4.042/src/main.c 2013-08-22 14:14:23.000000000 +0200 +--- src/main.c 2013-09-29 16:23:49.000000000 +0200 +*************** +*** 812,818 **** + starttermcap(); /* start termcap if not done by wait_return() */ + TIME_MSG("start termcap"); + #if defined(FEAT_TERMRESPONSE) && defined(FEAT_MBYTE) +! may_req_ambiguous_character_width(); + #endif + + #ifdef FEAT_MOUSE +--- 812,818 ---- + starttermcap(); /* start termcap if not done by wait_return() */ + TIME_MSG("start termcap"); + #if defined(FEAT_TERMRESPONSE) && defined(FEAT_MBYTE) +! may_req_ambiguous_char_width(); + #endif + + #ifdef FEAT_MOUSE +*** ../vim-7.4.042/src/term.c 2013-07-04 22:29:28.000000000 +0200 +--- src/term.c 2013-09-29 16:27:12.000000000 +0200 +*************** +*** 3356,3362 **** + * it must be called immediately after entering termcap mode. + */ + void +! may_req_ambiguous_character_width() + { + if (u7_status == U7_GET + && cur_tmode == TMODE_RAW +--- 3356,3362 ---- + * it must be called immediately after entering termcap mode. + */ + void +! may_req_ambiguous_char_width() + { + if (u7_status == U7_GET + && cur_tmode == TMODE_RAW +*** ../vim-7.4.042/src/proto/term.pro 2013-08-10 13:37:28.000000000 +0200 +--- src/proto/term.pro 2013-09-29 16:25:02.000000000 +0200 +*************** +*** 35,41 **** + void starttermcap __ARGS((void)); + void stoptermcap __ARGS((void)); + void may_req_termresponse __ARGS((void)); +! void may_req_ambiguous_character_width __ARGS((void)); + int swapping_screen __ARGS((void)); + void setmouse __ARGS((void)); + int mouse_has __ARGS((int c)); +--- 35,41 ---- + void starttermcap __ARGS((void)); + void stoptermcap __ARGS((void)); + void may_req_termresponse __ARGS((void)); +! void may_req_ambiguous_char_width __ARGS((void)); + int swapping_screen __ARGS((void)); + void setmouse __ARGS((void)); + int mouse_has __ARGS((int c)); +*** ../vim-7.4.042/src/version.c 2013-09-29 13:38:25.000000000 +0200 +--- src/version.c 2013-09-29 16:25:16.000000000 +0200 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 43, + /**/ + +-- +Back up my hard drive? I can't find the reverse switch! + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.044 b/SOURCES/7.4.044 new file mode 100644 index 0000000..3d8832d --- /dev/null +++ b/SOURCES/7.4.044 @@ -0,0 +1,83 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.044 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.044 (after 7.4.039) +Problem: Can't build with old MSVC. (Wang Shoulin) +Solution: Define OPEN_OH_ARGTYPE instead of using intptr_t directly. +Files: src/os_mswin.c + + +*** ../vim-7.4.043/src/os_mswin.c 2013-09-25 19:13:32.000000000 +0200 +--- src/os_mswin.c 2013-09-26 20:37:38.000000000 +0200 +*************** +*** 498,503 **** +--- 498,509 ---- + } + } + ++ #if (_MSC_VER >= 1300) ++ # define OPEN_OH_ARGTYPE intptr_t ++ #else ++ # define OPEN_OH_ARGTYPE long ++ #endif ++ + static int + stat_symlink_aware(const char *name, struct stat *stp) + { +*************** +*** 533,539 **** + { + int fd, n; + +! fd = _open_osfhandle((intptr_t)h, _O_RDONLY); + n = _fstat(fd, (struct _stat*)stp); + _close(fd); + return n; +--- 539,545 ---- + { + int fd, n; + +! fd = _open_osfhandle((OPEN_OH_ARGTYPE)h, _O_RDONLY); + n = _fstat(fd, (struct _stat*)stp); + _close(fd); + return n; +*************** +*** 580,586 **** + { + int fd; + +! fd = _open_osfhandle((intptr_t)h, _O_RDONLY); + n = _fstat(fd, stp); + _close(fd); + return n; +--- 586,592 ---- + { + int fd; + +! fd = _open_osfhandle((OPEN_OH_ARGTYPE)h, _O_RDONLY); + n = _fstat(fd, stp); + _close(fd); + return n; +*** ../vim-7.4.043/src/version.c 2013-09-29 16:27:42.000000000 +0200 +--- src/version.c 2013-09-29 18:27:58.000000000 +0200 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 44, + /**/ + +-- +I'd like to meet the man who invented sex and see what he's working on now. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.046 b/SOURCES/7.4.046 new file mode 100644 index 0000000..5bb4265 --- /dev/null +++ b/SOURCES/7.4.046 @@ -0,0 +1,80 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.046 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.046 +Problem: Can't use Tcl 8.6. +Solution: Change how Tcl_FindExecutable is called. (Jan Nijtmans) +Files: src/if_tcl.c + + +*** ../vim-7.4.045/src/if_tcl.c 2013-08-02 19:31:15.000000000 +0200 +--- src/if_tcl.c 2013-10-02 13:44:48.000000000 +0200 +*************** +*** 165,170 **** +--- 165,171 ---- + */ + static HANDLE hTclLib = NULL; + Tcl_Interp* (*dll_Tcl_CreateInterp)(); ++ void (*dll_Tcl_FindExecutable)(const void *); + + /* + * Table of name to function pointer of tcl. +*************** +*** 175,180 **** +--- 176,182 ---- + TCL_PROC* ptr; + } tcl_funcname_table[] = { + {"Tcl_CreateInterp", (TCL_PROC*)&dll_Tcl_CreateInterp}, ++ {"Tcl_FindExecutable", (TCL_PROC*)&dll_Tcl_FindExecutable}, + {NULL, NULL}, + }; + +*************** +*** 248,258 **** + { + Tcl_Interp *interp; + + if (interp = dll_Tcl_CreateInterp()) + { + if (Tcl_InitStubs(interp, DYNAMIC_TCL_VER, 0)) + { +- Tcl_FindExecutable(find_executable_arg); + Tcl_DeleteInterp(interp); + stubs_initialized = TRUE; + } +--- 250,261 ---- + { + Tcl_Interp *interp; + ++ dll_Tcl_FindExecutable(find_executable_arg); ++ + if (interp = dll_Tcl_CreateInterp()) + { + if (Tcl_InitStubs(interp, DYNAMIC_TCL_VER, 0)) + { + Tcl_DeleteInterp(interp); + stubs_initialized = TRUE; + } +*** ../vim-7.4.045/src/version.c 2013-09-29 21:11:00.000000000 +0200 +--- src/version.c 2013-10-02 13:46:47.000000000 +0200 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 46, + /**/ + +-- +Not too long ago, a program was something you watched on TV... + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.047 b/SOURCES/7.4.047 new file mode 100644 index 0000000..2871340 --- /dev/null +++ b/SOURCES/7.4.047 @@ -0,0 +1,56 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.047 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.047 +Problem: When using input() in a function invoked by a mapping it doesn't + work. +Solution: Temporarily reset ex_normal_busy. (Yasuhiro Matsumoto) +Files: src/eval.c + + +*** ../vim-7.4.046/src/eval.c 2013-09-29 21:11:00.000000000 +0200 +--- src/eval.c 2013-10-02 16:40:52.000000000 +0200 +*************** +*** 13054,13062 **** +--- 13054,13071 ---- + } + + if (defstr != NULL) ++ { ++ # ifdef FEAT_EX_EXTRA ++ int save_ex_normal_busy = ex_normal_busy; ++ ex_normal_busy = 0; ++ # endif + rettv->vval.v_string = + getcmdline_prompt(inputsecret_flag ? NUL : '@', p, echo_attr, + xp_type, xp_arg); ++ # ifdef FEAT_EX_EXTRA ++ ex_normal_busy = save_ex_normal_busy; ++ # endif ++ } + if (inputdialog && rettv->vval.v_string == NULL + && argvars[1].v_type != VAR_UNKNOWN + && argvars[2].v_type != VAR_UNKNOWN) +*** ../vim-7.4.046/src/version.c 2013-10-02 14:25:39.000000000 +0200 +--- src/version.c 2013-10-02 16:45:45.000000000 +0200 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 47, + /**/ + +-- +Not too long ago, a keyboard was something to make music with... + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.048 b/SOURCES/7.4.048 new file mode 100644 index 0000000..6e911a0 --- /dev/null +++ b/SOURCES/7.4.048 @@ -0,0 +1,96 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.048 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.048 +Problem: Recent clang version complains about -fno-strength-reduce. +Solution: Add a configure check for the clang version. (Kazunobu Kuriyama) +Files: src/configure.in, src/auto/configure + + +*** ../vim-7.4.047/src/configure.in 2013-08-04 20:00:50.000000000 +0200 +--- src/configure.in 2013-10-02 17:56:25.000000000 +0200 +*************** +*** 62,67 **** +--- 62,90 ---- + fi + fi + ++ dnl clang-500.2.75 or around has abandoned -f[no-]strength-reduce and issues a ++ dnl warning when that flag is passed to. Accordingly, adjust CFLAGS based on ++ dnl the version number of the clang in use. ++ dnl Note that this does not work to get the version of clang 3.1 or 3.2. ++ AC_MSG_CHECKING(for recent clang version) ++ CLANG_VERSION_STRING=`"$CC" --version 2>/dev/null | sed -n -e 's/^.*clang.*\([[0-9]][[0-9]]*\.[[0-9]][[0-9]]*\.[[0-9]][[0-9]]*\).*$/\1/p'` ++ if test x"$CLANG_VERSION_STRING" != x"" ; then ++ CLANG_MAJOR=`echo "$CLANG_VERSION_STRING" | sed -n -e 's/\([[0-9]][[0-9]]*\)\.[[0-9]][[0-9]]*\.[[0-9]][[0-9]]*/\1/p'` ++ CLANG_MINOR=`echo "$CLANG_VERSION_STRING" | sed -n -e 's/[[0-9]][[0-9]]*\.\([[0-9]][[0-9]]*\)\.[[0-9]][[0-9]]*/\1/p'` ++ CLANG_REVISION=`echo "$CLANG_VERSION_STRING" | sed -n -e 's/[[0-9]][[0-9]]*\.[[0-9]][[0-9]]*\.\([[0-9]][[0-9]]*\)/\1/p'` ++ CLANG_VERSION=`expr $CLANG_MAJOR '*' 1000000 '+' $CLANG_MINOR '*' 1000 '+' $CLANG_REVISION` ++ AC_MSG_RESULT($CLANG_VERSION) ++ dnl If you find the same issue with versions earlier than 500.2.75, ++ dnl change the constant 500002075 below appropriately. To get the ++ dnl integer corresponding to a version number, refer to the ++ dnl definition of CLANG_VERSION above. ++ if test "$CLANG_VERSION" -ge 500002075 ; then ++ CFLAGS=`echo "$CFLAGS" | sed -n -e 's/-fno-strength-reduce/ /p'` ++ fi ++ else ++ AC_MSG_RESULT(no) ++ fi ++ + dnl If configure thinks we are cross compiling, there might be something + dnl wrong with the CC or CFLAGS settings, give a useful warning message + if test "$cross_compiling" = yes; then +*** ../vim-7.4.047/src/auto/configure 2013-08-04 20:01:06.000000000 +0200 +--- src/auto/configure 2013-10-02 17:56:52.000000000 +0200 +*************** +*** 3989,3994 **** +--- 3989,4012 ---- + fi + fi + ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for recent clang version" >&5 ++ $as_echo_n "checking for recent clang version... " >&6; } ++ CLANG_VERSION_STRING=`"$CC" --version 2>/dev/null | sed -n -e 's/^.*clang.*\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*$/\1/p'` ++ if test x"$CLANG_VERSION_STRING" != x"" ; then ++ CLANG_MAJOR=`echo "$CLANG_VERSION_STRING" | sed -n -e 's/\([0-9][0-9]*\)\.[0-9][0-9]*\.[0-9][0-9]*/\1/p'` ++ CLANG_MINOR=`echo "$CLANG_VERSION_STRING" | sed -n -e 's/[0-9][0-9]*\.\([0-9][0-9]*\)\.[0-9][0-9]*/\1/p'` ++ CLANG_REVISION=`echo "$CLANG_VERSION_STRING" | sed -n -e 's/[0-9][0-9]*\.[0-9][0-9]*\.\([0-9][0-9]*\)/\1/p'` ++ CLANG_VERSION=`expr $CLANG_MAJOR '*' 1000000 '+' $CLANG_MINOR '*' 1000 '+' $CLANG_REVISION` ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLANG_VERSION" >&5 ++ $as_echo "$CLANG_VERSION" >&6; } ++ if test "$CLANG_VERSION" -ge 500002075 ; then ++ CFLAGS=`echo "$CFLAGS" | sed -n -e 's/-fno-strength-reduce/ /p'` ++ fi ++ else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++ $as_echo "no" >&6; } ++ fi ++ + if test "$cross_compiling" = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: cannot compile a simple program; if not cross compiling check CC and CFLAGS" >&5 + $as_echo "cannot compile a simple program; if not cross compiling check CC and CFLAGS" >&6; } +*** ../vim-7.4.047/src/version.c 2013-10-02 16:46:23.000000000 +0200 +--- src/version.c 2013-10-02 17:19:31.000000000 +0200 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 48, + /**/ + +-- +I have to exercise early in the morning before my brain +figures out what I'm doing. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.049 b/SOURCES/7.4.049 new file mode 100644 index 0000000..c1a23b9 --- /dev/null +++ b/SOURCES/7.4.049 @@ -0,0 +1,67 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.049 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.049 +Problem: In Ex mode, when line numbers are enabled the substitute prompt is + wrong. +Solution: Adjust for the line number size. (Benoit Pierre) +Files: src/ex_cmds.c + + +*** ../vim-7.4.048/src/ex_cmds.c 2013-08-07 15:15:51.000000000 +0200 +--- src/ex_cmds.c 2013-10-02 18:31:24.000000000 +0200 +*************** +*** 4740,4750 **** + char_u *resp; + colnr_T sc, ec; + +! print_line_no_prefix(lnum, FALSE, FALSE); + + getvcol(curwin, &curwin->w_cursor, &sc, NULL, NULL); + curwin->w_cursor.col = regmatch.endpos[0].col - 1; + getvcol(curwin, &curwin->w_cursor, NULL, NULL, &ec); + msg_start(); + for (i = 0; i < (long)sc; ++i) + msg_putchar(' '); +--- 4740,4756 ---- + char_u *resp; + colnr_T sc, ec; + +! print_line_no_prefix(lnum, do_number, do_list); + + getvcol(curwin, &curwin->w_cursor, &sc, NULL, NULL); + curwin->w_cursor.col = regmatch.endpos[0].col - 1; + getvcol(curwin, &curwin->w_cursor, NULL, NULL, &ec); ++ if (do_number || curwin->w_p_nu) ++ { ++ int numw = number_width(curwin) + 1; ++ sc += numw; ++ ec += numw; ++ } + msg_start(); + for (i = 0; i < (long)sc; ++i) + msg_putchar(' '); +*** ../vim-7.4.048/src/version.c 2013-10-02 18:22:58.000000000 +0200 +--- src/version.c 2013-10-02 18:33:22.000000000 +0200 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 49, + /**/ + +-- +What the word 'politics' means: 'Poli' in Latin meaning 'many' and 'tics' +meaning 'bloodsucking creatures'. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.051 b/SOURCES/7.4.051 new file mode 100644 index 0000000..ca5c3a0 --- /dev/null +++ b/SOURCES/7.4.051 @@ -0,0 +1,67 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.051 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.051 +Problem: Syntax highlighting a Yaml file causes a crash. (Blake Preston) +Solution: Copy the pim structure before calling addstate() to avoid it + becoming invalide when the state list is reallocated. +Files: src/regexp_nfa.c + + +*** ../vim-7.4.050/src/regexp_nfa.c 2013-09-25 18:16:34.000000000 +0200 +--- src/regexp_nfa.c 2013-10-06 15:44:31.000000000 +0200 +*************** +*** 6458,6463 **** +--- 6458,6464 ---- + if (add_state != NULL) + { + nfa_pim_T *pim; ++ nfa_pim_T pim_copy; + + if (t->pim.result == NFA_PIM_UNUSED) + pim = NULL; +*************** +*** 6531,6536 **** +--- 6532,6546 ---- + pim = NULL; + } + ++ /* If "pim" points into l->t it will become invalid when ++ * adding the state causes the list to be reallocated. Make a ++ * local copy to avoid that. */ ++ if (pim == &t->pim) ++ { ++ copy_pim(&pim_copy, pim); ++ pim = &pim_copy; ++ } ++ + if (add_here) + addstate_here(thislist, add_state, &t->subs, pim, &listidx); + else +*** ../vim-7.4.050/src/version.c 2013-10-02 21:54:57.000000000 +0200 +--- src/version.c 2013-10-06 15:21:16.000000000 +0200 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 51, + /**/ + +-- +GUARD #2: It could be carried by an African swallow! +GUARD #1: Oh, yeah, an African swallow maybe, but not a European swallow, + that's my point. +GUARD #2: Oh, yeah, I agree with that... + The Quest for the Holy Grail (Monty Python) + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.052 b/SOURCES/7.4.052 new file mode 100644 index 0000000..502d07b --- /dev/null +++ b/SOURCES/7.4.052 @@ -0,0 +1,197 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.052 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.052 +Problem: With 'fo' set to "a2" inserting a space in the first column may + cause the cursor to jump to the previous line. +Solution: Handle the case when there is no comment leader properly. (Tor + Perkins) Also fix that cursor is in the wrong place when spaces + get replaced with a Tab. +Files: src/misc1.c, src/ops.c, src/testdir/test68.in, + src/testdir/test68.ok + + +*** ../vim-7.4.051/src/misc1.c 2013-09-05 21:41:35.000000000 +0200 +--- src/misc1.c 2013-10-06 17:46:18.000000000 +0200 +*************** +*** 303,312 **** + ml_replace(curwin->w_cursor.lnum, newline, FALSE); + if (flags & SIN_CHANGED) + changed_bytes(curwin->w_cursor.lnum, 0); +! /* Correct saved cursor position if it's after the indent. */ +! if (saved_cursor.lnum == curwin->w_cursor.lnum +! && saved_cursor.col >= (colnr_T)(p - oldline)) +! saved_cursor.col += ind_len - (colnr_T)(p - oldline); + retval = TRUE; + } + else +--- 303,320 ---- + ml_replace(curwin->w_cursor.lnum, newline, FALSE); + if (flags & SIN_CHANGED) + changed_bytes(curwin->w_cursor.lnum, 0); +! /* Correct saved cursor position if it is in this line. */ +! if (saved_cursor.lnum == curwin->w_cursor.lnum) +! { +! if (saved_cursor.col >= (colnr_T)(p - oldline)) +! /* cursor was after the indent, adjust for the number of +! * bytes added/removed */ +! saved_cursor.col += ind_len - (colnr_T)(p - oldline); +! else if (saved_cursor.col >= (colnr_T)(s - newline)) +! /* cursor was in the indent, and is now after it, put it back +! * at the start of the indent (replacing spaces with TAB) */ +! saved_cursor.col = (colnr_T)(s - newline); +! } + retval = TRUE; + } + else +*************** +*** 1581,1589 **** + + #if defined(FEAT_COMMENTS) || defined(PROTO) + /* +! * get_leader_len() returns the length of the prefix of the given string +! * which introduces a comment. If this string is not a comment then 0 is +! * returned. + * When "flags" is not NULL, it is set to point to the flags of the recognized + * comment leader. + * "backward" must be true for the "O" command. +--- 1589,1597 ---- + + #if defined(FEAT_COMMENTS) || defined(PROTO) + /* +! * get_leader_len() returns the length in bytes of the prefix of the given +! * string which introduces a comment. If this string is not a comment then +! * 0 is returned. + * When "flags" is not NULL, it is set to point to the flags of the recognized + * comment leader. + * "backward" must be true for the "O" command. +*** ../vim-7.4.051/src/ops.c 2013-09-25 23:24:54.000000000 +0200 +--- src/ops.c 2013-10-06 17:11:51.000000000 +0200 +*************** +*** 4989,4995 **** + + /* + * When still in same paragraph, join the lines together. But +! * first delete the comment leader from the second line. + */ + if (!is_end_par) + { +--- 4989,4995 ---- + + /* + * When still in same paragraph, join the lines together. But +! * first delete the leader from the second line. + */ + if (!is_end_par) + { +*************** +*** 4999,5009 **** + if (line_count < 0 && u_save_cursor() == FAIL) + break; + #ifdef FEAT_COMMENTS +- (void)del_bytes((long)next_leader_len, FALSE, FALSE); + if (next_leader_len > 0) + mark_col_adjust(curwin->w_cursor.lnum, (colnr_T)0, 0L, + (long)-next_leader_len); + #endif + curwin->w_cursor.lnum--; + if (do_join(2, TRUE, FALSE, FALSE) == FAIL) + { +--- 4999,5023 ---- + if (line_count < 0 && u_save_cursor() == FAIL) + break; + #ifdef FEAT_COMMENTS + if (next_leader_len > 0) ++ { ++ (void)del_bytes((long)next_leader_len, FALSE, FALSE); + mark_col_adjust(curwin->w_cursor.lnum, (colnr_T)0, 0L, + (long)-next_leader_len); ++ } else + #endif ++ if (second_indent > 0) /* the "leader" for FO_Q_SECOND */ ++ { ++ char_u *p = ml_get_curline(); ++ int indent = skipwhite(p) - p; ++ ++ if (indent > 0) ++ { ++ (void)del_bytes(indent, FALSE, FALSE); ++ mark_col_adjust(curwin->w_cursor.lnum, ++ (colnr_T)0, 0L, (long)-indent); ++ } ++ } + curwin->w_cursor.lnum--; + if (do_join(2, TRUE, FALSE, FALSE) == FAIL) + { +*** ../vim-7.4.051/src/testdir/test68.in 2012-07-25 15:57:06.000000000 +0200 +--- src/testdir/test68.in 2013-10-06 16:20:33.000000000 +0200 +*************** +*** 62,67 **** +--- 62,81 ---- + } + + STARTTEST ++ /^{/+3 ++ :set tw=5 fo=t2a si ++ i A_ ++ ENDTEST ++ ++ { ++ ++ x a ++ b ++ c ++ ++ } ++ ++ STARTTEST + /^{/+1 + :set tw=5 fo=qn comments=:# + gwap +*** ../vim-7.4.051/src/testdir/test68.ok 2012-07-25 16:03:05.000000000 +0200 +--- src/testdir/test68.ok 2013-10-06 16:20:33.000000000 +0200 +*************** +*** 43,48 **** +--- 43,57 ---- + + + { ++ ++ x a ++ b_ ++ c ++ ++ } ++ ++ ++ { + # 1 a + # b + } +*** ../vim-7.4.051/src/version.c 2013-10-06 15:46:06.000000000 +0200 +--- src/version.c 2013-10-06 17:25:27.000000000 +0200 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 52, + /**/ + +-- +ARTHUR: Will you ask your master if he wants to join my court at Camelot?! +GUARD #1: But then of course African swallows are not migratory. +GUARD #2: Oh, yeah... +GUARD #1: So they couldn't bring a coconut back anyway... + The Quest for the Holy Grail (Monty Python) + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.053 b/SOURCES/7.4.053 new file mode 100644 index 0000000..22724fc --- /dev/null +++ b/SOURCES/7.4.053 @@ -0,0 +1,45 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.053 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.053 +Problem: Test75 has a wrong header. (ZyX) +Solution: Fix the text and remove leading ". +Files: src/testdir/test75.in + + +*** ../vim-7.4.052/src/testdir/test75.in 2013-06-29 13:48:42.000000000 +0200 +--- src/testdir/test75.in 2013-10-19 20:28:53.000000000 +0200 +*************** +*** 1,4 **** +! " Tests for functions. + + STARTTEST + :so small.vim +--- 1,4 ---- +! Tests for maparg(). + + STARTTEST + :so small.vim +*** ../vim-7.4.052/src/version.c 2013-10-06 17:46:48.000000000 +0200 +--- src/version.c 2013-11-02 04:18:07.000000000 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 53, + /**/ + +-- +Every exit is an entrance into something else. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.054 b/SOURCES/7.4.054 new file mode 100644 index 0000000..0fcffac --- /dev/null +++ b/SOURCES/7.4.054 @@ -0,0 +1,53 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.054 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.054 +Problem: Reading past end of the 'stl' string. +Solution: Don't increment pointer when already at the NUL. (Christian + Brabandt) +Files: src/buffer.c + + +*** ../vim-7.4.053/src/buffer.c 2013-08-14 17:11:14.000000000 +0200 +--- src/buffer.c 2013-11-02 04:34:26.000000000 +0100 +*************** +*** 4062,4068 **** + item[curitem].minwid = -syn_namen2id(t, (int)(s - t)); + curitem++; + } +! ++s; + continue; + } + +--- 4062,4069 ---- + item[curitem].minwid = -syn_namen2id(t, (int)(s - t)); + curitem++; + } +! if (*s != NUL) +! ++s; + continue; + } + +*** ../vim-7.4.053/src/version.c 2013-11-02 04:19:10.000000000 +0100 +--- src/version.c 2013-11-02 04:31:50.000000000 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 54, + /**/ + +-- +Every person is responsible for the choices he makes. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.055 b/SOURCES/7.4.055 new file mode 100644 index 0000000..b6adc04 --- /dev/null +++ b/SOURCES/7.4.055 @@ -0,0 +1,138 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.055 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.055 +Problem: Mac: Where availability macros are defined depends on the system. +Solution: Add a configure check. (Felix Bünemann) +Files: src/config.h.in, src/configure.in, src/auto/configure, + src/os_mac.h + +*** ../vim-7.4.054/src/config.h.in 2013-02-26 14:18:19.000000000 +0100 +--- src/config.h.in 2013-11-02 20:52:08.000000000 +0100 +*************** +*** 442,444 **** +--- 442,447 ---- + + /* Define if you want Cygwin to use the WIN32 clipboard, not compatible with X11*/ + #undef FEAT_CYGWIN_WIN32_CLIPBOARD ++ ++ /* Define if we have AvailabilityMacros.h on Mac OS X */ ++ #undef HAVE_AVAILABILITYMACROS_H +*** ../vim-7.4.054/src/configure.in 2013-10-02 18:22:58.000000000 +0200 +--- src/configure.in 2013-11-02 20:58:58.000000000 +0100 +*************** +*** 206,211 **** +--- 206,215 ---- + dnl TODO: use -arch i386 on Intel machines + CPPFLAGS="$CPPFLAGS -DMACOS_X_UNIX -no-cpp-precomp" + ++ dnl Mac OS X 10.9+ no longer include AvailabilityMacros.h in Carbon ++ dnl so we need to include it to have access to version macros. ++ AC_CHECK_HEADER(AvailabilityMacros.h, [AC_DEFINE(HAVE_AVAILABILITYMACROS_H, 1, [ Define if we have AvailabilityMacros.h on Mac OS X ])]) ++ + dnl If Carbon is found, assume we don't want X11 + dnl unless it was specifically asked for (--with-x) + dnl or Motif, Athena or GTK GUI is used. +*** ../vim-7.4.054/src/auto/configure 2013-10-02 18:22:58.000000000 +0200 +--- src/auto/configure 2013-11-02 21:00:40.000000000 +0100 +*************** +*** 4223,4229 **** + OS_EXTRA_OBJ="objects/os_macosx.o objects/os_mac_conv.o" + CPPFLAGS="$CPPFLAGS -DMACOS_X_UNIX -no-cpp-precomp" + +! # On IRIX 5.3, sys/types and inttypes.h are conflicting. + for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ + inttypes.h stdint.h unistd.h + do : +--- 4223,4229 ---- + OS_EXTRA_OBJ="objects/os_macosx.o objects/os_mac_conv.o" + CPPFLAGS="$CPPFLAGS -DMACOS_X_UNIX -no-cpp-precomp" + +! # On IRIX 5.3, sys/types and inttypes.h are conflicting. + for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ + inttypes.h stdint.h unistd.h + do : +*************** +*** 4241,4247 **** + done + + +! ac_fn_c_check_header_mongrel "$LINENO" "Carbon/Carbon.h" "ac_cv_header_Carbon_Carbon_h" "$ac_includes_default" + if test "x$ac_cv_header_Carbon_Carbon_h" = x""yes; then : + CARBON=yes + fi +--- 4241,4256 ---- + done + + +! ac_fn_c_check_header_mongrel "$LINENO" "AvailabilityMacros.h" "ac_cv_header_AvailabilityMacros_h" "$ac_includes_default" +! if test "x$ac_cv_header_AvailabilityMacros_h" = x""yes; then : +! +! $as_echo "#define HAVE_AVAILABILITYMACROS_H 1" >>confdefs.h +! +! fi +! +! +! +! ac_fn_c_check_header_mongrel "$LINENO" "Carbon/Carbon.h" "ac_cv_header_Carbon_Carbon_h" "$ac_includes_default" + if test "x$ac_cv_header_Carbon_Carbon_h" = x""yes; then : + CARBON=yes + fi +*** ../vim-7.4.054/src/os_mac.h 2013-05-06 04:06:04.000000000 +0200 +--- src/os_mac.h 2013-11-02 20:59:46.000000000 +0100 +*************** +*** 16,21 **** +--- 16,26 ---- + # define OPAQUE_TOOLBOX_STRUCTS 0 + #endif + ++ /* Include MAC_OS_X_VERSION_* macros */ ++ #ifdef HAVE_AVAILABILITYMACROS_H ++ # include ++ #endif ++ + /* + * Macintosh machine-dependent things. + * +*************** +*** 263,269 **** + #endif + + /* Some "prep work" definition to be able to compile the MacOS X +! * version with os_unix.x instead of os_mac.c. Based on the result + * of ./configure for console MacOS X. + */ + +--- 268,274 ---- + #endif + + /* Some "prep work" definition to be able to compile the MacOS X +! * version with os_unix.c instead of os_mac.c. Based on the result + * of ./configure for console MacOS X. + */ + +*** ../vim-7.4.054/src/version.c 2013-11-02 04:39:34.000000000 +0100 +--- src/version.c 2013-11-02 21:01:10.000000000 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 55, + /**/ + +-- +You can be stopped by the police for biking over 65 miles per hour. +You are not allowed to walk across a street on your hands. + [real standing laws in Connecticut, United States of America] + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.056 b/SOURCES/7.4.056 new file mode 100644 index 0000000..e8c1a34 --- /dev/null +++ b/SOURCES/7.4.056 @@ -0,0 +1,51 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.056 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.056 +Problem: Mac: Compilation problem with OS X 10.9 Mavericks. +Solution: Include AvailabilityMacros.h when available. (Kazunobu Kuriyama) +Files: src/os_unix.c + + +*** ../vim-7.4.055/src/os_unix.c 2013-09-05 21:41:35.000000000 +0200 +--- src/os_unix.c 2013-11-02 21:46:05.000000000 +0100 +*************** +*** 804,809 **** +--- 804,815 ---- + * completely full. + */ + ++ #if defined(HAVE_AVAILABILITYMACROS_H) \ ++ && defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) \ ++ && (__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 1090) ++ # include ++ #endif ++ + #ifndef SIGSTKSZ + # define SIGSTKSZ 8000 /* just a guess of how much stack is needed... */ + #endif +*** ../vim-7.4.055/src/version.c 2013-11-02 21:04:32.000000000 +0100 +--- src/version.c 2013-11-02 21:44:10.000000000 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 56, + /**/ + +-- +If an elephant is left tied to a parking meter, the parking fee has to be paid +just as it would for a vehicle. + [real standing law in Florida, United States of America] + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.057 b/SOURCES/7.4.057 new file mode 100644 index 0000000..aee16b6 --- /dev/null +++ b/SOURCES/7.4.057 @@ -0,0 +1,252 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.057 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.057 +Problem: byteidx() does not work for composing characters. +Solution: Add byteidxcomp(). +Files: src/eval.c, src/testdir/test69.in, src/testdir/test69.ok, + runtime/doc/eval.txt + + +*** ../vim-7.4.056/src/eval.c 2013-10-02 16:46:23.000000000 +0200 +--- src/eval.c 2013-11-02 22:30:08.000000000 +0100 +*************** +*** 474,480 **** +--- 474,482 ---- + static void f_bufnr __ARGS((typval_T *argvars, typval_T *rettv)); + static void f_bufwinnr __ARGS((typval_T *argvars, typval_T *rettv)); + static void f_byte2line __ARGS((typval_T *argvars, typval_T *rettv)); ++ static void byteidx __ARGS((typval_T *argvars, typval_T *rettv, int comp)); + static void f_byteidx __ARGS((typval_T *argvars, typval_T *rettv)); ++ static void f_byteidxcomp __ARGS((typval_T *argvars, typval_T *rettv)); + static void f_call __ARGS((typval_T *argvars, typval_T *rettv)); + #ifdef FEAT_FLOAT + static void f_ceil __ARGS((typval_T *argvars, typval_T *rettv)); +*************** +*** 7861,7866 **** +--- 7863,7869 ---- + {"bufwinnr", 1, 1, f_bufwinnr}, + {"byte2line", 1, 1, f_byte2line}, + {"byteidx", 2, 2, f_byteidx}, ++ {"byteidxcomp", 2, 2, f_byteidxcomp}, + {"call", 2, 3, f_call}, + #ifdef FEAT_FLOAT + {"ceil", 1, 1, f_ceil}, +*************** +*** 9177,9189 **** + #endif + } + +- /* +- * "byteidx()" function +- */ + static void +! f_byteidx(argvars, rettv) + typval_T *argvars; + typval_T *rettv; + { + #ifdef FEAT_MBYTE + char_u *t; +--- 9180,9190 ---- + #endif + } + + static void +! byteidx(argvars, rettv, comp) + typval_T *argvars; + typval_T *rettv; ++ int comp; + { + #ifdef FEAT_MBYTE + char_u *t; +*************** +*** 9203,9209 **** + { + if (*t == NUL) /* EOL reached */ + return; +! t += (*mb_ptr2len)(t); + } + rettv->vval.v_number = (varnumber_T)(t - str); + #else +--- 9204,9213 ---- + { + if (*t == NUL) /* EOL reached */ + return; +! if (enc_utf8 && comp) +! t += utf_ptr2len(t); +! else +! t += (*mb_ptr2len)(t); + } + rettv->vval.v_number = (varnumber_T)(t - str); + #else +*************** +*** 9212,9217 **** +--- 9216,9243 ---- + #endif + } + ++ /* ++ * "byteidx()" function ++ */ ++ static void ++ f_byteidx(argvars, rettv) ++ typval_T *argvars; ++ typval_T *rettv; ++ { ++ byteidx(argvars, rettv, FALSE); ++ } ++ ++ /* ++ * "byteidxcomp()" function ++ */ ++ static void ++ f_byteidxcomp(argvars, rettv) ++ typval_T *argvars; ++ typval_T *rettv; ++ { ++ byteidx(argvars, rettv, TRUE); ++ } ++ + int + func_call(name, args, selfdict, rettv) + char_u *name; +*** ../vim-7.4.056/src/testdir/test69.in 2013-03-07 18:30:50.000000000 +0100 +--- src/testdir/test69.in 2013-11-02 22:46:02.000000000 +0100 +*************** +*** 1,6 **** +--- 1,7 ---- + Test for multi-byte text formatting. + Also test, that 'mps' with multibyte chars works. + And test "ra" on multi-byte characters. ++ Also test byteidx() and byteidxcomp() + + STARTTEST + :so mbyte.vim +*************** +*** 154,159 **** +--- 155,175 ---- + aab + + STARTTEST ++ :let a = '.é.' " one char of two bytes ++ :let b = '.é.' " normal e with composing char ++ /^byteidx ++ :put =string([byteidx(a, 0), byteidx(a, 1), byteidx(a, 2), byteidx(a, 3), byteidx(a, 4)]) ++ :put =string([byteidx(b, 0), byteidx(b, 1), byteidx(b, 2), byteidx(b, 3), byteidx(b, 4)]) ++ /^byteidxcomp ++ :put =string([byteidxcomp(a, 0), byteidxcomp(a, 1), byteidxcomp(a, 2), byteidxcomp(a, 3), byteidxcomp(a, 4)]) ++ :let b = '.é.' ++ :put =string([byteidxcomp(b, 0), byteidxcomp(b, 1), byteidxcomp(b, 2), byteidxcomp(b, 3), byteidxcomp(b, 4), byteidxcomp(b, 5)]) ++ ENDTEST ++ ++ byteidx ++ byteidxcomp ++ ++ STARTTEST + :g/^STARTTEST/.,/^ENDTEST/d + :1;/^Results/,$wq! test.out + ENDTEST +*** ../vim-7.4.056/src/testdir/test69.ok 2013-03-07 18:31:32.000000000 +0100 +--- src/testdir/test69.ok 2013-11-02 22:43:25.000000000 +0100 +*************** +*** 149,151 **** +--- 149,159 ---- + aaaa + aaa + ++ ++ byteidx ++ [0, 1, 3, 4, -1] ++ [0, 1, 4, 5, -1] ++ byteidxcomp ++ [0, 1, 3, 4, -1] ++ [0, 1, 2, 4, 5, -1] ++ +*** ../vim-7.4.056/runtime/doc/eval.txt 2013-08-10 13:24:53.000000000 +0200 +--- runtime/doc/eval.txt 2013-11-02 23:27:24.000000000 +0100 +*************** +*** 1712,1717 **** +--- 1713,1719 ---- + bufwinnr( {expr}) Number window number of buffer {expr} + byte2line( {byte}) Number line number at byte count {byte} + byteidx( {expr}, {nr}) Number byte index of {nr}'th char in {expr} ++ byteidxcomp( {expr}, {nr}) Number byte index of {nr}'th char in {expr} + call( {func}, {arglist} [, {dict}]) + any call {func} with arguments {arglist} + ceil( {expr}) Float round {expr} up +*************** +*** 2260,2266 **** + {expr}. Use zero for the first character, it returns zero. + This function is only useful when there are multibyte + characters, otherwise the returned value is equal to {nr}. +! Composing characters are counted as a separate character. + Example : > + echo matchstr(str, ".", byteidx(str, 3)) + < will display the fourth character. Another way to do the +--- 2262,2271 ---- + {expr}. Use zero for the first character, it returns zero. + This function is only useful when there are multibyte + characters, otherwise the returned value is equal to {nr}. +! Composing characters are not counted separately, their byte +! length is added to the preceding base character. See +! |byteidxcomp()| below for counting composing characters +! separately. + Example : > + echo matchstr(str, ".", byteidx(str, 3)) + < will display the fourth character. Another way to do the +*************** +*** 2269,2275 **** + echo strpart(s, 0, byteidx(s, 1)) + < If there are less than {nr} characters -1 is returned. + If there are exactly {nr} characters the length of the string +! is returned. + + call({func}, {arglist} [, {dict}]) *call()* *E699* + Call function {func} with the items in |List| {arglist} as +--- 2274,2293 ---- + echo strpart(s, 0, byteidx(s, 1)) + < If there are less than {nr} characters -1 is returned. + If there are exactly {nr} characters the length of the string +! in bytes is returned. +! +! byteidxcomp({expr}, {nr}) *byteidxcomp()* +! Like byteidx(), except that a composing character is counted +! as a separate character. Example: > +! let s = 'e' . nr2char(0x301) +! echo byteidx(s, 1) +! echo byteidxcomp(s, 1) +! echo byteidxcomp(s, 2) +! < The first and third echo result in 3 ('e' plus composing +! character is 3 bytes), the second echo results in 1 ('e' is +! one byte). +! Only works different from byteidx() when 'encoding' is set to +! a Unicode encoding. + + call({func}, {arglist} [, {dict}]) *call()* *E699* + Call function {func} with the items in |List| {arglist} as +*** ../vim-7.4.056/src/version.c 2013-11-02 21:49:28.000000000 +0100 +--- src/version.c 2013-11-02 22:45:13.000000000 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 57, + /**/ + +-- +Any sufficiently advanced technology is indistinguishable from magic. + Arthur C. Clarke +Any sufficiently advanced bug is indistinguishable from a feature. + Rich Kulawiec + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.058 b/SOURCES/7.4.058 new file mode 100644 index 0000000..0715c84 --- /dev/null +++ b/SOURCES/7.4.058 @@ -0,0 +1,67 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.058 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.058 +Problem: Warnings on 64 bit Windows. +Solution: Add type casts. (Mike Williams) +Files: src/ops.c + + +*** ../vim-7.4.057/src/ops.c 2013-10-06 17:46:48.000000000 +0200 +--- src/ops.c 2013-11-02 23:56:15.000000000 +0100 +*************** +*** 5009,5022 **** + if (second_indent > 0) /* the "leader" for FO_Q_SECOND */ + { + char_u *p = ml_get_curline(); +! int indent = skipwhite(p) - p; + + if (indent > 0) + { + (void)del_bytes(indent, FALSE, FALSE); + mark_col_adjust(curwin->w_cursor.lnum, + (colnr_T)0, 0L, (long)-indent); +! } + } + curwin->w_cursor.lnum--; + if (do_join(2, TRUE, FALSE, FALSE) == FAIL) +--- 5009,5022 ---- + if (second_indent > 0) /* the "leader" for FO_Q_SECOND */ + { + char_u *p = ml_get_curline(); +! int indent = (int)(skipwhite(p) - p); + + if (indent > 0) + { + (void)del_bytes(indent, FALSE, FALSE); + mark_col_adjust(curwin->w_cursor.lnum, + (colnr_T)0, 0L, (long)-indent); +! } + } + curwin->w_cursor.lnum--; + if (do_join(2, TRUE, FALSE, FALSE) == FAIL) +*** ../vim-7.4.057/src/version.c 2013-11-02 23:29:17.000000000 +0100 +--- src/version.c 2013-11-02 23:55:01.000000000 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 58, + /**/ + +-- +Citizens are not allowed to attend a movie house or theater nor ride in a +public streetcar within at least four hours after eating garlic. + [real standing law in Indiana, United States of America] + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.059 b/SOURCES/7.4.059 new file mode 100644 index 0000000..b00cbfe --- /dev/null +++ b/SOURCES/7.4.059 @@ -0,0 +1,53 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.059 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.059 +Problem: set_last_cursor() may encounter w_buffer being NULL. (Matt + Mkaniaris) +Solution: Check for NULL. +Files: src/mark.c + + +*** ../vim-7.4.058/src/mark.c 2013-08-02 17:22:10.000000000 +0200 +--- src/mark.c 2013-11-03 00:18:35.000000000 +0100 +*************** +*** 1374,1380 **** + set_last_cursor(win) + win_T *win; + { +! win->w_buffer->b_last_cursor = win->w_cursor; + } + + #if defined(EXITFREE) || defined(PROTO) +--- 1374,1381 ---- + set_last_cursor(win) + win_T *win; + { +! if (win->w_buffer != NULL) +! win->w_buffer->b_last_cursor = win->w_cursor; + } + + #if defined(EXITFREE) || defined(PROTO) +*** ../vim-7.4.058/src/version.c 2013-11-02 23:59:30.000000000 +0100 +--- src/version.c 2013-11-03 00:17:55.000000000 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 59, + /**/ + +-- +How do you know when you have run out of invisible ink? + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.060 b/SOURCES/7.4.060 new file mode 100644 index 0000000..d6a7672 --- /dev/null +++ b/SOURCES/7.4.060 @@ -0,0 +1,71 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.060 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.060 +Problem: Declaration has wrong return type for PyObject_SetAttrString(). +Solution: Use int instead of PyObject. (Andreas Schwab) +Files: src/if_python.c, src/if_python3.c + + +*** ../vim-7.4.059/src/if_python.c 2013-07-09 21:40:11.000000000 +0200 +--- src/if_python.c 2013-11-03 00:24:57.000000000 +0100 +*************** +*** 359,365 **** + static PyObject *(*dll_PyRun_String)(char *, int, PyObject *, PyObject *); + static PyObject* (*dll_PyObject_GetAttrString)(PyObject *, const char *); + static int (*dll_PyObject_HasAttrString)(PyObject *, const char *); +! static PyObject* (*dll_PyObject_SetAttrString)(PyObject *, const char *, PyObject *); + static PyObject* (*dll_PyObject_CallFunctionObjArgs)(PyObject *, ...); + static PyObject* (*dll_PyObject_CallFunction)(PyObject *, char *, ...); + static PyObject* (*dll_PyObject_Call)(PyObject *, PyObject *, PyObject *); +--- 359,365 ---- + static PyObject *(*dll_PyRun_String)(char *, int, PyObject *, PyObject *); + static PyObject* (*dll_PyObject_GetAttrString)(PyObject *, const char *); + static int (*dll_PyObject_HasAttrString)(PyObject *, const char *); +! static int (*dll_PyObject_SetAttrString)(PyObject *, const char *, PyObject *); + static PyObject* (*dll_PyObject_CallFunctionObjArgs)(PyObject *, ...); + static PyObject* (*dll_PyObject_CallFunction)(PyObject *, char *, ...); + static PyObject* (*dll_PyObject_Call)(PyObject *, PyObject *, PyObject *); +*** ../vim-7.4.059/src/if_python3.c 2013-07-09 21:53:21.000000000 +0200 +--- src/if_python3.c 2013-11-03 00:24:57.000000000 +0100 +*************** +*** 302,308 **** + static PyObject* (*py3_PyRun_String)(char *, int, PyObject *, PyObject *); + static PyObject* (*py3_PyObject_GetAttrString)(PyObject *, const char *); + static int (*py3_PyObject_HasAttrString)(PyObject *, const char *); +! static PyObject* (*py3_PyObject_SetAttrString)(PyObject *, const char *, PyObject *); + static PyObject* (*py3_PyObject_CallFunctionObjArgs)(PyObject *, ...); + static PyObject* (*py3__PyObject_CallFunction_SizeT)(PyObject *, char *, ...); + static PyObject* (*py3_PyObject_Call)(PyObject *, PyObject *, PyObject *); +--- 302,308 ---- + static PyObject* (*py3_PyRun_String)(char *, int, PyObject *, PyObject *); + static PyObject* (*py3_PyObject_GetAttrString)(PyObject *, const char *); + static int (*py3_PyObject_HasAttrString)(PyObject *, const char *); +! static int (*py3_PyObject_SetAttrString)(PyObject *, const char *, PyObject *); + static PyObject* (*py3_PyObject_CallFunctionObjArgs)(PyObject *, ...); + static PyObject* (*py3__PyObject_CallFunction_SizeT)(PyObject *, char *, ...); + static PyObject* (*py3_PyObject_Call)(PyObject *, PyObject *, PyObject *); +*** ../vim-7.4.059/src/version.c 2013-11-03 00:20:46.000000000 +0100 +--- src/version.c 2013-11-03 00:26:19.000000000 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 60, + /**/ + +-- +Kisses may last for as much as, but no more than, five minutes. + [real standing law in Iowa, United States of America] + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.061 b/SOURCES/7.4.061 new file mode 100644 index 0000000..ebd5b2d --- /dev/null +++ b/SOURCES/7.4.061 @@ -0,0 +1,144 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.061 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.061 (after 7.4.055 and 7.4.056) +Problem: Availability macros configure check in wrong place. +Solution: Also check when not using Darwin. Remove version check. +Files: src/configure.in, src/auto/configure, src/os_unix.c + + +*** ../vim-7.4.060/src/configure.in 2013-11-02 21:04:32.000000000 +0100 +--- src/configure.in 2013-11-03 00:34:07.000000000 +0100 +*************** +*** 206,215 **** + dnl TODO: use -arch i386 on Intel machines + CPPFLAGS="$CPPFLAGS -DMACOS_X_UNIX -no-cpp-precomp" + +- dnl Mac OS X 10.9+ no longer include AvailabilityMacros.h in Carbon +- dnl so we need to include it to have access to version macros. +- AC_CHECK_HEADER(AvailabilityMacros.h, [AC_DEFINE(HAVE_AVAILABILITYMACROS_H, 1, [ Define if we have AvailabilityMacros.h on Mac OS X ])]) +- + dnl If Carbon is found, assume we don't want X11 + dnl unless it was specifically asked for (--with-x) + dnl or Motif, Athena or GTK GUI is used. +--- 206,211 ---- +*************** +*** 232,237 **** +--- 228,237 ---- + AC_MSG_RESULT(no) + fi + ++ dnl Mac OS X 10.9+ no longer include AvailabilityMacros.h in Carbon ++ dnl so we need to include it to have access to version macros. ++ AC_CHECK_HEADER(AvailabilityMacros.h, HAVE_AVAILABILITYMACROS_H=1) ++ + AC_SUBST(OS_EXTRA_SRC) + AC_SUBST(OS_EXTRA_OBJ) + +*** ../vim-7.4.060/src/auto/configure 2013-11-02 21:04:32.000000000 +0100 +--- src/auto/configure 2013-11-03 00:36:20.000000000 +0100 +*************** +*** 4223,4229 **** + OS_EXTRA_OBJ="objects/os_macosx.o objects/os_mac_conv.o" + CPPFLAGS="$CPPFLAGS -DMACOS_X_UNIX -no-cpp-precomp" + +! # On IRIX 5.3, sys/types and inttypes.h are conflicting. + for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ + inttypes.h stdint.h unistd.h + do : +--- 4223,4229 ---- + OS_EXTRA_OBJ="objects/os_macosx.o objects/os_mac_conv.o" + CPPFLAGS="$CPPFLAGS -DMACOS_X_UNIX -no-cpp-precomp" + +! # On IRIX 5.3, sys/types and inttypes.h are conflicting. + for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ + inttypes.h stdint.h unistd.h + do : +*************** +*** 4241,4256 **** + done + + +! ac_fn_c_check_header_mongrel "$LINENO" "AvailabilityMacros.h" "ac_cv_header_AvailabilityMacros_h" "$ac_includes_default" +! if test "x$ac_cv_header_AvailabilityMacros_h" = x""yes; then : +! +! $as_echo "#define HAVE_AVAILABILITYMACROS_H 1" >>confdefs.h +! +! fi +! +! +! +! ac_fn_c_check_header_mongrel "$LINENO" "Carbon/Carbon.h" "ac_cv_header_Carbon_Carbon_h" "$ac_includes_default" + if test "x$ac_cv_header_Carbon_Carbon_h" = x""yes; then : + CARBON=yes + fi +--- 4241,4247 ---- + done + + +! ac_fn_c_check_header_mongrel "$LINENO" "Carbon/Carbon.h" "ac_cv_header_Carbon_Carbon_h" "$ac_includes_default" + if test "x$ac_cv_header_Carbon_Carbon_h" = x""yes; then : + CARBON=yes + fi +*************** +*** 4272,4277 **** +--- 4263,4275 ---- + $as_echo "no" >&6; } + fi + ++ ac_fn_c_check_header_mongrel "$LINENO" "AvailabilityMacros.h" "ac_cv_header_AvailabilityMacros_h" "$ac_includes_default" ++ if test "x$ac_cv_header_AvailabilityMacros_h" = x""yes; then : ++ HAVE_AVAILABILITYMACROS_H=1 ++ fi ++ ++ ++ + + + +*** ../vim-7.4.060/src/os_unix.c 2013-11-02 21:49:28.000000000 +0100 +--- src/os_unix.c 2013-11-03 00:34:29.000000000 +0100 +*************** +*** 804,812 **** + * completely full. + */ + +! #if defined(HAVE_AVAILABILITYMACROS_H) \ +! && defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) \ +! && (__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 1090) + # include + #endif + +--- 804,810 ---- + * completely full. + */ + +! #if defined(HAVE_AVAILABILITYMACROS_H) + # include + #endif + +*** ../vim-7.4.060/src/version.c 2013-11-03 00:28:20.000000000 +0100 +--- src/version.c 2013-11-03 00:37:02.000000000 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 61, + /**/ + +-- +It is illegal to rob a bank and then shoot at the bank teller with a water +pistol. + [real standing law in Louisana, United States of America] + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.062 b/SOURCES/7.4.062 new file mode 100644 index 0000000..dad0a42 --- /dev/null +++ b/SOURCES/7.4.062 @@ -0,0 +1,87 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.062 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.062 (after 7.4.061) +Problem: Configure check for AvailabilityMacros.h is wrong. +Solution: Use AC_CHECK_HEADERS(). +Files: src/configure.in, src/auto/configure + + +*** ../vim-7.4.061/src/configure.in 2013-11-03 00:40:54.000000000 +0100 +--- src/configure.in 2013-11-03 20:19:42.000000000 +0100 +*************** +*** 230,236 **** + + dnl Mac OS X 10.9+ no longer include AvailabilityMacros.h in Carbon + dnl so we need to include it to have access to version macros. +! AC_CHECK_HEADER(AvailabilityMacros.h, HAVE_AVAILABILITYMACROS_H=1) + + AC_SUBST(OS_EXTRA_SRC) + AC_SUBST(OS_EXTRA_OBJ) +--- 230,236 ---- + + dnl Mac OS X 10.9+ no longer include AvailabilityMacros.h in Carbon + dnl so we need to include it to have access to version macros. +! AC_CHECK_HEADERS(AvailabilityMacros.h) + + AC_SUBST(OS_EXTRA_SRC) + AC_SUBST(OS_EXTRA_OBJ) +*** ../vim-7.4.061/src/auto/configure 2013-11-03 00:40:54.000000000 +0100 +--- src/auto/configure 2013-11-03 20:22:56.000000000 +0100 +*************** +*** 4263,4273 **** + $as_echo "no" >&6; } + fi + +! ac_fn_c_check_header_mongrel "$LINENO" "AvailabilityMacros.h" "ac_cv_header_AvailabilityMacros_h" "$ac_includes_default" + if test "x$ac_cv_header_AvailabilityMacros_h" = x""yes; then : +! HAVE_AVAILABILITYMACROS_H=1 + fi + + + + +--- 4263,4279 ---- + $as_echo "no" >&6; } + fi + +! for ac_header in AvailabilityMacros.h +! do : +! ac_fn_c_check_header_mongrel "$LINENO" "AvailabilityMacros.h" "ac_cv_header_AvailabilityMacros_h" "$ac_includes_default" + if test "x$ac_cv_header_AvailabilityMacros_h" = x""yes; then : +! cat >>confdefs.h <<_ACEOF +! #define HAVE_AVAILABILITYMACROS_H 1 +! _ACEOF +! + fi + ++ done + + + +*** ../vim-7.4.061/src/version.c 2013-11-03 00:40:54.000000000 +0100 +--- src/version.c 2013-11-03 20:25:31.000000000 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 62, + /**/ + +-- +Yesterday, all my deadlines seemed so far away +now it looks as though it's freeze in four days +oh I believe in cvs.. + [ CVS log "Beatles style" for FreeBSD ports/INDEX, Satoshi Asami ] + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.063 b/SOURCES/7.4.063 new file mode 100644 index 0000000..b72b0b7 --- /dev/null +++ b/SOURCES/7.4.063 @@ -0,0 +1,105 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.063 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.063 +Problem: Crash when using invalid key in Python dictionary. +Solution: Check for object to be NULL. Add tests. (ZyX) +Files: src/if_py_both.h, src/testdir/test86.in, src/testdir/test86.ok, + src/testdir/test87.in, src/testdir/test87.ok + + +*** ../vim-7.4.062/src/if_py_both.h 2013-07-24 17:09:19.000000000 +0200 +--- src/if_py_both.h 2013-11-04 00:27:40.000000000 +0100 +*************** +*** 1624,1629 **** +--- 1624,1632 ---- + PyObject *rObj = _DictionaryItem(self, keyObject, DICT_FLAG_RETURN_BOOL); + int ret; + ++ if (rObj == NULL) ++ return -1; ++ + ret = (rObj == Py_True); + + Py_DECREF(rObj); +*** ../vim-7.4.062/src/testdir/test86.in 2013-07-13 14:00:31.000000000 +0200 +--- src/testdir/test86.in 2013-11-04 00:27:11.000000000 +0100 +*************** +*** 1088,1093 **** +--- 1088,1096 ---- + stringtochars_test('d.get(%s)') + ee('d.pop("a")') + ee('dl.pop("a")') ++ cb.append(">> DictionaryContains") ++ ee('"" in d') ++ ee('0 in d') + cb.append(">> DictionaryIterNext") + ee('for i in ned: ned["a"] = 1') + del i +*** ../vim-7.4.062/src/testdir/test86.ok 2013-06-23 16:38:39.000000000 +0200 +--- src/testdir/test86.ok 2013-11-04 00:27:11.000000000 +0100 +*************** +*** 516,521 **** +--- 516,524 ---- + <<< Finished + d.pop("a"):KeyError:('a',) + dl.pop("a"):error:('dictionary is locked',) ++ >> DictionaryContains ++ "" in d:ValueError:('empty keys are not allowed',) ++ 0 in d:TypeError:('expected str() or unicode() instance, but got int',) + >> DictionaryIterNext + for i in ned: ned["a"] = 1:RuntimeError:('hashtab changed during iteration',) + >> DictionaryAssItem +*** ../vim-7.4.062/src/testdir/test87.in 2013-07-06 13:41:30.000000000 +0200 +--- src/testdir/test87.in 2013-11-04 00:27:11.000000000 +0100 +*************** +*** 1039,1044 **** +--- 1039,1047 ---- + stringtochars_test('d.get(%s)') + ee('d.pop("a")') + ee('dl.pop("a")') ++ cb.append(">> DictionaryContains") ++ ee('"" in d') ++ ee('0 in d') + cb.append(">> DictionaryIterNext") + ee('for i in ned: ned["a"] = 1') + del i +*** ../vim-7.4.062/src/testdir/test87.ok 2013-06-23 16:38:39.000000000 +0200 +--- src/testdir/test87.ok 2013-11-04 00:27:11.000000000 +0100 +*************** +*** 505,510 **** +--- 505,513 ---- + <<< Finished + d.pop("a"):(, KeyError('a',)) + dl.pop("a"):(, error('dictionary is locked',)) ++ >> DictionaryContains ++ "" in d:(, ValueError('empty keys are not allowed',)) ++ 0 in d:(, TypeError('expected bytes() or str() instance, but got int',)) + >> DictionaryIterNext + for i in ned: ned["a"] = 1:(, RuntimeError('hashtab changed during iteration',)) + >> DictionaryAssItem +*** ../vim-7.4.062/src/version.c 2013-11-03 20:26:27.000000000 +0100 +--- src/version.c 2013-11-04 00:26:39.000000000 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 63, + /**/ + +-- +A parent can be arrested if his child cannot hold back a burp during a church +service. + [real standing law in Nebraska, United States of America] + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.065 b/SOURCES/7.4.065 new file mode 100644 index 0000000..fd17fa0 --- /dev/null +++ b/SOURCES/7.4.065 @@ -0,0 +1,70 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.065 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.065 +Problem: When recording, the character typed at the hit-enter prompt is + recorded twice. (Urtica Dioica) +Solution: Avoid recording the character twice. (Christian Brabandt) +Files: src/message.c + + +*** ../vim-7.4.064/src/message.c 2013-08-09 20:30:45.000000000 +0200 +--- src/message.c 2013-11-04 01:56:09.000000000 +0100 +*************** +*** 887,892 **** +--- 887,894 ---- + int oldState; + int tmpState; + int had_got_int; ++ int save_Recording; ++ FILE *save_scriptout; + + if (redraw == TRUE) + must_redraw = CLEAR; +*************** +*** 957,967 **** +--- 959,979 ---- + * typeahead buffer. */ + ++no_mapping; + ++allow_keys; ++ ++ /* Temporarily disable Recording. If Recording is active, the ++ * character will be recorded later, since it will be added to the ++ * typebuf after the loop */ ++ save_Recording = Recording; ++ save_scriptout = scriptout; ++ Recording = FALSE; ++ scriptout = NULL; + c = safe_vgetc(); + if (had_got_int && !global_busy) + got_int = FALSE; + --no_mapping; + --allow_keys; ++ Recording = save_Recording; ++ scriptout = save_scriptout; + + #ifdef FEAT_CLIPBOARD + /* Strange way to allow copying (yanking) a modeless selection at +*** ../vim-7.4.064/src/version.c 2013-11-04 01:41:11.000000000 +0100 +--- src/version.c 2013-11-04 01:53:19.000000000 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 65, + /**/ + +-- +Zen Microsystems: we're the om in .commmmmmmmm + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.066 b/SOURCES/7.4.066 new file mode 100644 index 0000000..edab092 --- /dev/null +++ b/SOURCES/7.4.066 @@ -0,0 +1,354 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.066 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.066 +Problem: MS-Windows: When there is a colon in the file name (sub-stream + feature) the swap file name is wrong. +Solution: Change the colon to "%". (Yasuhiro Matsumoto) +Files: src/fileio.c, src/memline.c, src/misc1.c, src/proto/misc1.pro + + +*** ../vim-7.4.065/src/memline.c 2013-05-06 04:01:02.000000000 +0200 +--- src/memline.c 2013-11-04 02:52:44.000000000 +0100 +*************** +*** 4014,4019 **** +--- 4014,4026 ---- + else + retval = concat_fnames(dname, tail, TRUE); + ++ #ifdef WIN3264 ++ if (retval != NULL) ++ for (t = gettail(retval); *t != NUL; mb_ptr_adv(t)) ++ if (*t == ':') ++ *t = '%'; ++ #endif ++ + return retval; + } + +*************** +*** 4137,4148 **** + #ifndef SHORT_FNAME + int r; + #endif + + #if !defined(SHORT_FNAME) \ +! && ((!defined(UNIX) && !defined(OS2)) || defined(ARCHIE)) + # define CREATE_DUMMY_FILE + FILE *dummyfd = NULL; + + /* + * If we start editing a new file, e.g. "test.doc", which resides on an + * MSDOS compatible filesystem, it is possible that the file +--- 4144,4172 ---- + #ifndef SHORT_FNAME + int r; + #endif ++ char_u *buf_fname = buf->b_fname; + + #if !defined(SHORT_FNAME) \ +! && ((!defined(UNIX) && !defined(OS2)) || defined(ARCHIE)) + # define CREATE_DUMMY_FILE + FILE *dummyfd = NULL; + ++ # ifdef WIN3264 ++ if (buf_fname != NULL && !mch_isFullName(buf_fname) ++ && vim_strchr(gettail(buf_fname), ':')) ++ { ++ char_u *t; ++ ++ buf_fname = vim_strsave(buf_fname); ++ if (buf_fname == NULL) ++ buf_fname = buf->b_fname; ++ else ++ for (t = gettail(buf_fname); *t != NUL; mb_ptr_adv(t)) ++ if (*t == ':') ++ *t = '%'; ++ } ++ # endif ++ + /* + * If we start editing a new file, e.g. "test.doc", which resides on an + * MSDOS compatible filesystem, it is possible that the file +*************** +*** 4150,4158 **** + * this problem we temporarily create "test.doc". Don't do this when the + * check below for a 8.3 file name is used. + */ +! if (!(buf->b_p_sn || buf->b_shortname) && buf->b_fname != NULL +! && mch_getperm(buf->b_fname) < 0) +! dummyfd = mch_fopen((char *)buf->b_fname, "w"); + #endif + + /* +--- 4174,4182 ---- + * this problem we temporarily create "test.doc". Don't do this when the + * check below for a 8.3 file name is used. + */ +! if (!(buf->b_p_sn || buf->b_shortname) && buf_fname != NULL +! && mch_getperm(buf_fname) < 0) +! dummyfd = mch_fopen((char *)buf_fname, "w"); + #endif + + /* +*************** +*** 4171,4177 **** + if (dir_name == NULL) /* out of memory */ + fname = NULL; + else +! fname = makeswapname(buf->b_fname, buf->b_ffname, buf, dir_name); + + for (;;) + { +--- 4195,4201 ---- + if (dir_name == NULL) /* out of memory */ + fname = NULL; + else +! fname = makeswapname(buf_fname, buf->b_ffname, buf, dir_name); + + for (;;) + { +*************** +*** 4204,4210 **** + * It either contains two dots, is longer than 8 chars, or starts + * with a dot. + */ +! tail = gettail(buf->b_fname); + if ( vim_strchr(tail, '.') != NULL + || STRLEN(tail) > (size_t)8 + || *gettail(fname) == '.') +--- 4228,4234 ---- + * It either contains two dots, is longer than 8 chars, or starts + * with a dot. + */ +! tail = gettail(buf_fname); + if ( vim_strchr(tail, '.') != NULL + || STRLEN(tail) > (size_t)8 + || *gettail(fname) == '.') +*************** +*** 4273,4279 **** + { + buf->b_shortname = TRUE; + vim_free(fname); +! fname = makeswapname(buf->b_fname, buf->b_ffname, + buf, dir_name); + continue; /* try again with b_shortname set */ + } +--- 4297,4303 ---- + { + buf->b_shortname = TRUE; + vim_free(fname); +! fname = makeswapname(buf_fname, buf->b_ffname, + buf, dir_name); + continue; /* try again with b_shortname set */ + } +*************** +*** 4344,4350 **** + { + buf->b_shortname = TRUE; + vim_free(fname); +! fname = makeswapname(buf->b_fname, buf->b_ffname, + buf, dir_name); + continue; /* try again with '.' replaced with '_' */ + } +--- 4368,4374 ---- + { + buf->b_shortname = TRUE; + vim_free(fname); +! fname = makeswapname(buf_fname, buf->b_ffname, + buf, dir_name); + continue; /* try again with '.' replaced with '_' */ + } +*************** +*** 4356,4362 **** + * viewing a help file or when the path of the file is different + * (happens when all .swp files are in one directory). + */ +! if (!recoverymode && buf->b_fname != NULL + && !buf->b_help && !(buf->b_flags & BF_DUMMY)) + { + int fd; +--- 4380,4386 ---- + * viewing a help file or when the path of the file is different + * (happens when all .swp files are in one directory). + */ +! if (!recoverymode && buf_fname != NULL + && !buf->b_help && !(buf->b_flags & BF_DUMMY)) + { + int fd; +*************** +*** 4433,4439 **** + { + fclose(dummyfd); + dummyfd = NULL; +! mch_remove(buf->b_fname); + did_use_dummy = TRUE; + } + #endif +--- 4457,4463 ---- + { + fclose(dummyfd); + dummyfd = NULL; +! mch_remove(buf_fname); + did_use_dummy = TRUE; + } + #endif +*************** +*** 4448,4454 **** + * user anyway. + */ + if (swap_exists_action != SEA_NONE +! && has_autocmd(EVENT_SWAPEXISTS, buf->b_fname, buf)) + choice = do_swapexists(buf, fname); + + if (choice == 0) +--- 4472,4478 ---- + * user anyway. + */ + if (swap_exists_action != SEA_NONE +! && has_autocmd(EVENT_SWAPEXISTS, buf_fname, buf)) + choice = do_swapexists(buf, fname); + + if (choice == 0) +*************** +*** 4549,4555 **** + #ifdef CREATE_DUMMY_FILE + /* Going to try another name, need the dummy file again. */ + if (did_use_dummy) +! dummyfd = mch_fopen((char *)buf->b_fname, "w"); + #endif + } + } +--- 4573,4579 ---- + #ifdef CREATE_DUMMY_FILE + /* Going to try another name, need the dummy file again. */ + if (did_use_dummy) +! dummyfd = mch_fopen((char *)buf_fname, "w"); + #endif + } + } +*************** +*** 4581,4589 **** + if (dummyfd != NULL) /* file has been created temporarily */ + { + fclose(dummyfd); +! mch_remove(buf->b_fname); + } + #endif + return fname; + } + +--- 4605,4617 ---- + if (dummyfd != NULL) /* file has been created temporarily */ + { + fclose(dummyfd); +! mch_remove(buf_fname); + } + #endif ++ #ifdef WIN3264 ++ if (buf_fname != buf->b_fname) ++ vim_free(buf_fname); ++ #endif + return fname; + } + +*** ../vim-7.4.065/src/misc1.c 2013-10-06 17:46:48.000000000 +0200 +--- src/misc1.c 2013-11-04 02:44:28.000000000 +0100 +*************** +*** 4808,4816 **** + + if (fname == NULL) + return (char_u *)""; +! for (p1 = p2 = fname; *p2; ) /* find last part of path */ + { +! if (vim_ispathsep(*p2)) + p1 = p2 + 1; + mb_ptr_adv(p2); + } +--- 4808,4816 ---- + + if (fname == NULL) + return (char_u *)""; +! for (p1 = p2 = get_past_head(fname); *p2; ) /* find last part of path */ + { +! if (vim_ispathsep_nocolon(*p2)) + p1 = p2 + 1; + mb_ptr_adv(p2); + } +*************** +*** 4929,4935 **** + } + + /* +! * return TRUE if 'c' is a path separator. + */ + int + vim_ispathsep(c) +--- 4929,4936 ---- + } + + /* +! * Return TRUE if 'c' is a path separator. +! * Note that for MS-Windows this includes the colon. + */ + int + vim_ispathsep(c) +*************** +*** 4952,4957 **** +--- 4953,4972 ---- + #endif + } + ++ /* ++ * Like vim_ispathsep(c), but exclude the colon for MS-Windows. ++ */ ++ int ++ vim_ispathsep_nocolon(c) ++ int c; ++ { ++ return vim_ispathsep(c) ++ #ifdef BACKSLASH_IN_FILENAME ++ && c != ':' ++ #endif ++ ; ++ } ++ + #if defined(FEAT_SEARCHPATH) || defined(PROTO) + /* + * return TRUE if 'c' is a path list separator. +*** ../vim-7.4.065/src/proto/misc1.pro 2013-08-10 13:37:20.000000000 +0200 +--- src/proto/misc1.pro 2013-11-04 02:44:30.000000000 +0100 +*************** +*** 69,74 **** +--- 69,75 ---- + char_u *getnextcomp __ARGS((char_u *fname)); + char_u *get_past_head __ARGS((char_u *path)); + int vim_ispathsep __ARGS((int c)); ++ int vim_ispathsep_nocolon __ARGS((int c)); + int vim_ispathlistsep __ARGS((int c)); + void shorten_dir __ARGS((char_u *str)); + int dir_of_file_exists __ARGS((char_u *fname)); +*** ../vim-7.4.065/src/version.c 2013-11-04 02:00:55.000000000 +0100 +--- src/version.c 2013-11-04 02:50:35.000000000 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 66, + /**/ + +-- +Females are strictly forbidden to appear unshaven in public. + [real standing law in New Mexico, United States of America] + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.067 b/SOURCES/7.4.067 new file mode 100644 index 0000000..75a89c2 --- /dev/null +++ b/SOURCES/7.4.067 @@ -0,0 +1,126 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.067 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.067 +Problem: After inserting comment leader, CTRL-\ CTRL-O does move the + cursor. (Wiktor Ruben) +Solution: Avoid moving the cursor. (Christian Brabandt) +Files: src/edit.c + + +*** ../vim-7.4.066/src/edit.c 2013-09-08 20:00:45.000000000 +0200 +--- src/edit.c 2013-11-04 03:57:43.000000000 +0100 +*************** +*** 199,205 **** + static void spell_back_to_badword __ARGS((void)); + static int spell_bad_len = 0; /* length of located bad word */ + #endif +! static void stop_insert __ARGS((pos_T *end_insert_pos, int esc)); + static int echeck_abbr __ARGS((int)); + static int replace_pop __ARGS((void)); + static void replace_join __ARGS((int off)); +--- 199,205 ---- + static void spell_back_to_badword __ARGS((void)); + static int spell_bad_len = 0; /* length of located bad word */ + #endif +! static void stop_insert __ARGS((pos_T *end_insert_pos, int esc, int nomove)); + static int echeck_abbr __ARGS((int)); + static int replace_pop __ARGS((void)); + static void replace_join __ARGS((int off)); +*************** +*** 6698,6704 **** + if (!arrow_used) /* something has been inserted */ + { + AppendToRedobuff(ESC_STR); +! stop_insert(end_insert_pos, FALSE); + arrow_used = TRUE; /* this means we stopped the current insert */ + } + #ifdef FEAT_SPELL +--- 6698,6704 ---- + if (!arrow_used) /* something has been inserted */ + { + AppendToRedobuff(ESC_STR); +! stop_insert(end_insert_pos, FALSE, FALSE); + arrow_used = TRUE; /* this means we stopped the current insert */ + } + #ifdef FEAT_SPELL +*************** +*** 6787,6795 **** + * to another window/buffer. + */ + static void +! stop_insert(end_insert_pos, esc) + pos_T *end_insert_pos; + int esc; /* called by ins_esc() */ + { + int cc; + char_u *ptr; +--- 6787,6796 ---- + * to another window/buffer. + */ + static void +! stop_insert(end_insert_pos, esc, nomove) + pos_T *end_insert_pos; + int esc; /* called by ins_esc() */ ++ int nomove; /* , don't move cursor */ + { + int cc; + char_u *ptr; +*************** +*** 6860,6866 **** + * Do this when ESC was used or moving the cursor up/down. + * Check for the old position still being valid, just in case the text + * got changed unexpectedly. */ +! if (did_ai && (esc || (vim_strchr(p_cpo, CPO_INDENT) == NULL + && curwin->w_cursor.lnum != end_insert_pos->lnum)) + && end_insert_pos->lnum <= curbuf->b_ml.ml_line_count) + { +--- 6861,6867 ---- + * Do this when ESC was used or moving the cursor up/down. + * Check for the old position still being valid, just in case the text + * got changed unexpectedly. */ +! if (!nomove && did_ai && (esc || (vim_strchr(p_cpo, CPO_INDENT) == NULL + && curwin->w_cursor.lnum != end_insert_pos->lnum)) + && end_insert_pos->lnum <= curbuf->b_ml.ml_line_count) + { +*************** +*** 8377,8383 **** + disabled_redraw = TRUE; + return FALSE; /* repeat the insert */ + } +! stop_insert(&curwin->w_cursor, TRUE); + undisplay_dollar(); + } + +--- 8378,8384 ---- + disabled_redraw = TRUE; + return FALSE; /* repeat the insert */ + } +! stop_insert(&curwin->w_cursor, TRUE, nomove); + undisplay_dollar(); + } + +*** ../vim-7.4.066/src/version.c 2013-11-04 02:53:46.000000000 +0100 +--- src/version.c 2013-11-04 03:57:29.000000000 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 67, + /**/ + +-- +Beer & pretzels can't be served at the same time in any bar or restaurant. + [real standing law in North Dakota, United States of America] + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.068 b/SOURCES/7.4.068 new file mode 100644 index 0000000..a909338 --- /dev/null +++ b/SOURCES/7.4.068 @@ -0,0 +1,131 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.068 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.068 +Problem: Cannot build Vim on Mac with non-Apple compilers. +Solution: Remove the -no-cpp-precomp flag. (Misty De Meo) +Files: src/configure.in, src/auto/configure, src/osdef.sh + + +*** ../vim-7.4.067/src/configure.in 2013-11-03 20:26:26.000000000 +0100 +--- src/configure.in 2013-11-04 04:53:51.000000000 +0100 +*************** +*** 204,210 **** + OS_EXTRA_SRC="os_macosx.m os_mac_conv.c"; + OS_EXTRA_OBJ="objects/os_macosx.o objects/os_mac_conv.o" + dnl TODO: use -arch i386 on Intel machines +! CPPFLAGS="$CPPFLAGS -DMACOS_X_UNIX -no-cpp-precomp" + + dnl If Carbon is found, assume we don't want X11 + dnl unless it was specifically asked for (--with-x) +--- 204,211 ---- + OS_EXTRA_SRC="os_macosx.m os_mac_conv.c"; + OS_EXTRA_OBJ="objects/os_macosx.o objects/os_mac_conv.o" + dnl TODO: use -arch i386 on Intel machines +! dnl Removed -no-cpp-precomp, only for very old compilers. +! CPPFLAGS="$CPPFLAGS -DMACOS_X_UNIX" + + dnl If Carbon is found, assume we don't want X11 + dnl unless it was specifically asked for (--with-x) +*************** +*** 262,269 **** + ]) + if test "$GCC" = yes -a "$local_dir" != no; then + echo 'void f(){}' > conftest.c +! dnl -no-cpp-precomp is needed for OS X 10.2 (Ben Fowler) +! have_local_include=`${CC-cc} -no-cpp-precomp -c -v conftest.c 2>&1 | grep "${local_dir}/include"` + have_local_lib=`${CC-cc} -c -v conftest.c 2>&1 | grep "${local_dir}/lib"` + rm -f conftest.c conftest.o + fi +--- 263,270 ---- + ]) + if test "$GCC" = yes -a "$local_dir" != no; then + echo 'void f(){}' > conftest.c +! dnl Removed -no-cpp-precomp, only needed for OS X 10.2 (Ben Fowler) +! have_local_include=`${CC-cc} -c -v conftest.c 2>&1 | grep "${local_dir}/include"` + have_local_lib=`${CC-cc} -c -v conftest.c 2>&1 | grep "${local_dir}/lib"` + rm -f conftest.c conftest.o + fi +*** ../vim-7.4.067/src/auto/configure 2013-11-03 20:26:27.000000000 +0100 +--- src/auto/configure 2013-11-04 04:54:16.000000000 +0100 +*************** +*** 4221,4227 **** + MACOSX=yes + OS_EXTRA_SRC="os_macosx.m os_mac_conv.c"; + OS_EXTRA_OBJ="objects/os_macosx.o objects/os_mac_conv.o" +! CPPFLAGS="$CPPFLAGS -DMACOS_X_UNIX -no-cpp-precomp" + + # On IRIX 5.3, sys/types and inttypes.h are conflicting. + for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ +--- 4221,4227 ---- + MACOSX=yes + OS_EXTRA_SRC="os_macosx.m os_mac_conv.c"; + OS_EXTRA_OBJ="objects/os_macosx.o objects/os_mac_conv.o" +! CPPFLAGS="$CPPFLAGS -DMACOS_X_UNIX" + + # On IRIX 5.3, sys/types and inttypes.h are conflicting. + for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ +*************** +*** 4311,4317 **** + + if test "$GCC" = yes -a "$local_dir" != no; then + echo 'void f(){}' > conftest.c +! have_local_include=`${CC-cc} -no-cpp-precomp -c -v conftest.c 2>&1 | grep "${local_dir}/include"` + have_local_lib=`${CC-cc} -c -v conftest.c 2>&1 | grep "${local_dir}/lib"` + rm -f conftest.c conftest.o + fi +--- 4311,4317 ---- + + if test "$GCC" = yes -a "$local_dir" != no; then + echo 'void f(){}' > conftest.c +! have_local_include=`${CC-cc} -c -v conftest.c 2>&1 | grep "${local_dir}/include"` + have_local_lib=`${CC-cc} -c -v conftest.c 2>&1 | grep "${local_dir}/lib"` + rm -f conftest.c conftest.o + fi +*** ../vim-7.4.067/src/osdef.sh 2010-05-15 13:04:08.000000000 +0200 +--- src/osdef.sh 2013-11-04 04:51:36.000000000 +0100 +*************** +*** 47,57 **** + #endif + EOF + +! # Mac uses precompiled headers, but we need real headers here. +! case `uname` in +! Darwin) $CC -I. -I$srcdir -E -no-cpp-precomp osdef0.c >osdef0.cc;; +! *) $CC -I. -I$srcdir -E osdef0.c >osdef0.cc;; +! esac + + # insert a space in front of each line, so that a function name at the + # start of the line is matched with "[)*, ]\1[ (]" +--- 47,53 ---- + #endif + EOF + +! $CC -I. -I$srcdir -E osdef0.c >osdef0.cc + + # insert a space in front of each line, so that a function name at the + # start of the line is matched with "[)*, ]\1[ (]" +*** ../vim-7.4.067/src/version.c 2013-11-04 04:20:28.000000000 +0100 +--- src/version.c 2013-11-04 04:51:51.000000000 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 68, + /**/ + +-- +Violators can be fined, arrested or jailed for making ugly faces at a dog. + [real standing law in Oklahoma, United States of America] + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.069 b/SOURCES/7.4.069 new file mode 100644 index 0000000..ac52aff --- /dev/null +++ b/SOURCES/7.4.069 @@ -0,0 +1,2559 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.069 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.069 +Problem: Cannot right shift lines starting with #. +Solution: Allow the right shift when 'cino' contains #N with N > 0. + (Christian Brabandt) + Refactor parsing 'cino', store the values in the buffer. +Files: runtime/doc/indent.txt, src/buffer.c, src/edit.c, src/eval.c, + src/ex_getln.c, src/fold.c, src/misc1.c, src/ops.c, + src/proto/misc1.pro, src/proto/option.pro, src/structs.h, + src/option.c + + +*** ../vim-7.4.068/runtime/doc/indent.txt 2013-08-10 13:24:56.000000000 +0200 +--- runtime/doc/indent.txt 2013-11-05 07:10:56.000000000 +0100 +*************** +*** 545,554 **** + (default 70 lines). + + *cino-#* +! #N When N is non-zero recognize shell/Perl comments, starting with +! '#'. Default N is zero: don't recognize '#' comments. Note +! that lines starting with # will still be seen as preprocessor +! lines. + + + The defaults, spelled out in full, are: +--- 545,556 ---- + (default 70 lines). + + *cino-#* +! #N When N is non-zero recognize shell/Perl comments starting with +! '#', do not recognize preprocessor lines; allow right-shifting +! lines that start with "#". +! When N is zero (default): don't recognize '#' comments, do +! recognize preprocessor lines; right-shifting lines that start +! with "#" does not work. + + + The defaults, spelled out in full, are: +*************** +*** 556,562 **** + c3,C0,/0,(2s,us,U0,w0,W0,k0,m0,j0,J0,)20,*70,#0 + + Vim puts a line in column 1 if: +! - It starts with '#' (preprocessor directives), if 'cinkeys' contains '#'. + - It starts with a label (a keyword followed by ':', other than "case" and + "default") and 'cinoptions' does not contain an 'L' entry with a positive + value. +--- 558,564 ---- + c3,C0,/0,(2s,us,U0,w0,W0,k0,m0,j0,J0,)20,*70,#0 + + Vim puts a line in column 1 if: +! - It starts with '#' (preprocessor directives), if 'cinkeys' contains '#0'. + - It starts with a label (a keyword followed by ':', other than "case" and + "default") and 'cinoptions' does not contain an 'L' entry with a positive + value. +*************** +*** 581,588 **** + + Clojure indentation differs somewhat from traditional Lisps, due in part to + the use of square and curly brackets, and otherwise by community convention. +! These conventions are not always universally followed, so the Clojure indent +! script offers a few configurable options, listed below. + + If the current vim does not include searchpairpos(), the indent script falls + back to normal 'lisp' indenting, and the following options are ignored. +--- 583,590 ---- + + Clojure indentation differs somewhat from traditional Lisps, due in part to + the use of square and curly brackets, and otherwise by community convention. +! These conventions are not universally followed, so the Clojure indent script +! offers a few configurable options, listed below. + + If the current vim does not include searchpairpos(), the indent script falls + back to normal 'lisp' indenting, and the following options are ignored. +*** ../vim-7.4.068/src/buffer.c 2013-11-02 04:39:34.000000000 +0100 +--- src/buffer.c 2013-11-05 06:18:54.000000000 +0100 +*************** +*** 211,217 **** +--- 211,220 ---- + + /* if first time loading this buffer, init b_chartab[] */ + if (curbuf->b_flags & BF_NEVERLOADED) ++ { + (void)buf_init_chartab(curbuf, FALSE); ++ parse_cino(curbuf); ++ } + + /* + * Set/reset the Changed flag first, autocmds may change the buffer. +*** ../vim-7.4.068/src/edit.c 2013-11-04 04:20:28.000000000 +0100 +--- src/edit.c 2013-11-05 06:12:45.000000000 +0100 +*************** +*** 8958,8964 **** + + *inserted_space_p = FALSE; + if (p_sta && in_indent) +! ts = (int)get_sw_value(); + else + ts = (int)get_sts_value(); + /* Compute the virtual column where we want to be. Since +--- 8958,8964 ---- + + *inserted_space_p = FALSE; + if (p_sta && in_indent) +! ts = (int)get_sw_value(curbuf); + else + ts = (int)get_sts_value(); + /* Compute the virtual column where we want to be. Since +*************** +*** 9647,9653 **** + * When nothing special, insert TAB like a normal character + */ + if (!curbuf->b_p_et +! && !(p_sta && ind && curbuf->b_p_ts != get_sw_value()) + && get_sts_value() == 0) + return TRUE; + +--- 9647,9653 ---- + * When nothing special, insert TAB like a normal character + */ + if (!curbuf->b_p_et +! && !(p_sta && ind && curbuf->b_p_ts != get_sw_value(curbuf)) + && get_sts_value() == 0) + return TRUE; + +*************** +*** 9663,9669 **** + AppendToRedobuff((char_u *)"\t"); + + if (p_sta && ind) /* insert tab in indent, use 'shiftwidth' */ +! temp = (int)get_sw_value(); + else if (curbuf->b_p_sts != 0) /* use 'softtabstop' when set */ + temp = (int)get_sts_value(); + else /* otherwise use 'tabstop' */ +--- 9663,9669 ---- + AppendToRedobuff((char_u *)"\t"); + + if (p_sta && ind) /* insert tab in indent, use 'shiftwidth' */ +! temp = (int)get_sw_value(curbuf); + else if (curbuf->b_p_sts != 0) /* use 'softtabstop' when set */ + temp = (int)get_sts_value(); + else /* otherwise use 'tabstop' */ +*** ../vim-7.4.068/src/eval.c 2013-11-02 23:29:17.000000000 +0100 +--- src/eval.c 2013-11-05 06:12:49.000000000 +0100 +*************** +*** 16934,16940 **** + typval_T *argvars UNUSED; + typval_T *rettv; + { +! rettv->vval.v_number = get_sw_value(); + } + + /* +--- 16934,16940 ---- + typval_T *argvars UNUSED; + typval_T *rettv; + { +! rettv->vval.v_number = get_sw_value(curbuf); + } + + /* +*** ../vim-7.4.068/src/ex_getln.c 2013-07-05 19:44:21.000000000 +0200 +--- src/ex_getln.c 2013-11-05 06:12:57.000000000 +0100 +*************** +*** 2280,2286 **** + + if (c1 == Ctrl_T) + { +! long sw = get_sw_value(); + + p = (char_u *)line_ga.ga_data; + p[line_ga.ga_len] = NUL; +--- 2280,2286 ---- + + if (c1 == Ctrl_T) + { +! long sw = get_sw_value(curbuf); + + p = (char_u *)line_ga.ga_data; + p[line_ga.ga_len] = NUL; +*************** +*** 2337,2343 **** + p[line_ga.ga_len] = NUL; + indent = get_indent_str(p, 8); + --indent; +! indent -= indent % get_sw_value(); + } + while (get_indent_str(p, 8) > indent) + { +--- 2337,2343 ---- + p[line_ga.ga_len] = NUL; + indent = get_indent_str(p, 8); + --indent; +! indent -= indent % get_sw_value(curbuf); + } + while (get_indent_str(p, 8) > indent) + { +*************** +*** 4178,4184 **** + /* + * Prepare a string for expansion. + * When expanding file names: The string will be used with expand_wildcards(). +! * Copy the file name into allocated memory and add a '*' at the end. + * When expanding other names: The string will be used with regcomp(). Copy + * the name into allocated memory and prepend "^". + */ +--- 4178,4184 ---- + /* + * Prepare a string for expansion. + * When expanding file names: The string will be used with expand_wildcards(). +! * Copy "fname[len]" into allocated memory and add a '*' at the end. + * When expanding other names: The string will be used with regcomp(). Copy + * the name into allocated memory and prepend "^". + */ +*** ../vim-7.4.068/src/fold.c 2013-06-15 16:57:24.000000000 +0200 +--- src/fold.c 2013-11-05 06:13:03.000000000 +0100 +*************** +*** 3052,3058 **** + flp->lvl = -1; + } + else +! flp->lvl = get_indent_buf(buf, lnum) / get_sw_value(); + if (flp->lvl > flp->wp->w_p_fdn) + { + flp->lvl = flp->wp->w_p_fdn; +--- 3052,3058 ---- + flp->lvl = -1; + } + else +! flp->lvl = get_indent_buf(buf, lnum) / get_sw_value(curbuf); + if (flp->lvl > flp->wp->w_p_fdn) + { + flp->lvl = flp->wp->w_p_fdn; +*** ../vim-7.4.068/src/misc1.c 2013-11-04 02:53:46.000000000 +0100 +--- src/misc1.c 2013-11-05 06:45:15.000000000 +0100 +*************** +*** 1405,1411 **** + #ifdef FEAT_SMARTINDENT + if (did_si) + { +! int sw = (int)get_sw_value(); + + if (p_sr) + newindent -= newindent % sw; +--- 1405,1411 ---- + #ifdef FEAT_SMARTINDENT + if (did_si) + { +! int sw = (int)get_sw_value(curbuf); + + if (p_sr) + newindent -= newindent % sw; +*************** +*** 5342,5349 **** + static int find_match __ARGS((int lookfor, linenr_T ourscope, int ind_maxparen, int ind_maxcomment)); + static int cin_is_cpp_namespace __ARGS((char_u *)); + +- static int ind_hash_comment = 0; /* # starts a comment */ +- + /* + * Skip over white space and C comments within the line. + * Also skip over Perl/shell comments if desired. +--- 5342,5347 ---- +*************** +*** 5360,5366 **** + + /* Perl/shell # comment comment continues until eol. Require a space + * before # to avoid recognizing $#array. */ +! if (ind_hash_comment != 0 && s != prev_s && *s == '#') + { + s += STRLEN(s); + break; +--- 5358,5364 ---- + + /* Perl/shell # comment comment continues until eol. Require a space + * before # to avoid recognizing $#array. */ +! if (curbuf->b_ind_hash_comment != 0 && s != prev_s && *s == '#') + { + s += STRLEN(s); + break; +*************** +*** 6639,6839 **** + return retval; + } + +! int +! get_c_indent() + { +! int sw = (int)get_sw_value(); + + /* +! * spaces from a block's opening brace the prevailing indent for that +! * block should be + */ + +! int ind_level = sw; + +! /* +! * spaces from the edge of the line an open brace that's at the end of a +! * line is imagined to be. +! */ +! int ind_open_imag = 0; + +! /* +! * spaces from the prevailing indent for a line that is not preceded by +! * an opening brace. +! */ +! int ind_no_brace = 0; +! +! /* +! * column where the first { of a function should be located } +! */ +! int ind_first_open = 0; + +! /* +! * spaces from the prevailing indent a leftmost open brace should be +! * located +! */ +! int ind_open_extra = 0; + +! /* +! * spaces from the matching open brace (real location for one at the left + * edge; imaginary location from one that ends a line) the matching close +! * brace should be located +! */ +! int ind_close_extra = 0; + +! /* +! * spaces from the edge of the line an open brace sitting in the leftmost +! * column is imagined to be +! */ +! int ind_open_left_imag = 0; + +! /* +! * Spaces jump labels should be shifted to the left if N is non-negative, +! * otherwise the jump label will be put to column 1. +! */ +! int ind_jump_label = -1; + +! /* +! * spaces from the switch() indent a "case xx" label should be located +! */ +! int ind_case = sw; + +! /* +! * spaces from the "case xx:" code after a switch() should be located +! */ +! int ind_case_code = sw; + +! /* +! * lineup break at end of case in switch() with case label +! */ +! int ind_case_break = 0; + +! /* +! * spaces from the class declaration indent a scope declaration label +! * should be located +! */ +! int ind_scopedecl = sw; + +! /* +! * spaces from the scope declaration label code should be located +! */ +! int ind_scopedecl_code = sw; + +! /* +! * amount K&R-style parameters should be indented +! */ +! int ind_param = sw; + +! /* +! * amount a function type spec should be indented +! */ +! int ind_func_type = sw; + +! /* +! * amount a cpp base class declaration or constructor initialization +! * should be indented +! */ +! int ind_cpp_baseclass = sw; + +! /* +! * additional spaces beyond the prevailing indent a continuation line +! * should be located +! */ +! int ind_continuation = sw; + +! /* +! * spaces from the indent of the line with an unclosed parentheses +! */ +! int ind_unclosed = sw * 2; + +! /* +! * spaces from the indent of the line with an unclosed parentheses, which +! * itself is also unclosed +! */ +! int ind_unclosed2 = sw; + +! /* +! * suppress ignoring spaces from the indent of a line starting with an +! * unclosed parentheses. +! */ +! int ind_unclosed_noignore = 0; + +! /* +! * If the opening paren is the last nonwhite character on the line, and +! * ind_unclosed_wrapped is nonzero, use this indent relative to the outer +! * context (for very long lines). +! */ +! int ind_unclosed_wrapped = 0; + +! /* +! * suppress ignoring white space when lining up with the character after +! * an unclosed parentheses. +! */ +! int ind_unclosed_whiteok = 0; + +! /* +! * indent a closing parentheses under the line start of the matching +! * opening parentheses. +! */ +! int ind_matching_paren = 0; + +! /* +! * indent a closing parentheses under the previous line. +! */ +! int ind_paren_prev = 0; + +! /* +! * Extra indent for comments. +! */ +! int ind_comment = 0; + +! /* +! * spaces from the comment opener when there is nothing after it. +! */ +! int ind_in_comment = 3; + +! /* +! * boolean: if non-zero, use ind_in_comment even if there is something +! * after the comment opener. +! */ +! int ind_in_comment2 = 0; + +! /* +! * max lines to search for an open paren +! */ +! int ind_maxparen = 20; + +! /* +! * max lines to search for an open comment +! */ +! int ind_maxcomment = 70; + +! /* +! * handle braces for java code +! */ +! int ind_java = 0; + +! /* +! * not to confuse JS object properties with labels +! */ +! int ind_js = 0; + +! /* +! * handle blocked cases correctly +! */ +! int ind_keep_case_label = 0; + +! /* +! * handle C++ namespace +! */ +! int ind_cpp_namespace = 0; + +! /* +! * handle continuation lines containing conditions of if(), for() and +! * while() +! */ +! int ind_if_for_while = 0; + + pos_T cur_curpos; + int amount; + int scope_amount; +--- 6637,6865 ---- + return retval; + } + +! /* +! * Parse 'cinoptions' and set the values in "curbuf". +! * Must be called when 'cinoptions', 'shiftwidth' and/or 'tabstop' changes. +! */ +! void +! parse_cino(buf) +! buf_T *buf; + { +! char_u *p; +! char_u *l; +! char_u *digits; +! int n; +! int divider; +! int fraction = 0; +! int sw = (int)get_sw_value(buf); + + /* +! * Set the default values. + */ ++ /* Spaces from a block's opening brace the prevailing indent for that ++ * block should be. */ ++ buf->b_ind_level = sw; + +! /* Spaces from the edge of the line an open brace that's at the end of a +! * line is imagined to be. */ +! buf->b_ind_open_imag = 0; + +! /* Spaces from the prevailing indent for a line that is not preceded by +! * an opening brace. */ +! buf->b_ind_no_brace = 0; + +! /* Column where the first { of a function should be located }. */ +! buf->b_ind_first_open = 0; + +! /* Spaces from the prevailing indent a leftmost open brace should be +! * located. */ +! buf->b_ind_open_extra = 0; + +! /* Spaces from the matching open brace (real location for one at the left + * edge; imaginary location from one that ends a line) the matching close +! * brace should be located. */ +! buf->b_ind_close_extra = 0; + +! /* Spaces from the edge of the line an open brace sitting in the leftmost +! * column is imagined to be. */ +! buf->b_ind_open_left_imag = 0; + +! /* Spaces jump labels should be shifted to the left if N is non-negative, +! * otherwise the jump label will be put to column 1. */ +! buf->b_ind_jump_label = -1; + +! /* Spaces from the switch() indent a "case xx" label should be located. */ +! buf->b_ind_case = sw; + +! /* Spaces from the "case xx:" code after a switch() should be located. */ +! buf->b_ind_case_code = sw; + +! /* Lineup break at end of case in switch() with case label. */ +! buf->b_ind_case_break = 0; + +! /* Spaces from the class declaration indent a scope declaration label +! * should be located. */ +! buf->b_ind_scopedecl = sw; + +! /* Spaces from the scope declaration label code should be located. */ +! buf->b_ind_scopedecl_code = sw; + +! /* Amount K&R-style parameters should be indented. */ +! buf->b_ind_param = sw; + +! /* Amount a function type spec should be indented. */ +! buf->b_ind_func_type = sw; + +! /* Amount a cpp base class declaration or constructor initialization +! * should be indented. */ +! buf->b_ind_cpp_baseclass = sw; + +! /* additional spaces beyond the prevailing indent a continuation line +! * should be located. */ +! buf->b_ind_continuation = sw; + +! /* Spaces from the indent of the line with an unclosed parentheses. */ +! buf->b_ind_unclosed = sw * 2; + +! /* Spaces from the indent of the line with an unclosed parentheses, which +! * itself is also unclosed. */ +! buf->b_ind_unclosed2 = sw; + +! /* Suppress ignoring spaces from the indent of a line starting with an +! * unclosed parentheses. */ +! buf->b_ind_unclosed_noignore = 0; + +! /* If the opening paren is the last nonwhite character on the line, and +! * b_ind_unclosed_wrapped is nonzero, use this indent relative to the outer +! * context (for very long lines). */ +! buf->b_ind_unclosed_wrapped = 0; + +! /* Suppress ignoring white space when lining up with the character after +! * an unclosed parentheses. */ +! buf->b_ind_unclosed_whiteok = 0; + +! /* Indent a closing parentheses under the line start of the matching +! * opening parentheses. */ +! buf->b_ind_matching_paren = 0; + +! /* Indent a closing parentheses under the previous line. */ +! buf->b_ind_paren_prev = 0; + +! /* Extra indent for comments. */ +! buf->b_ind_comment = 0; + +! /* Spaces from the comment opener when there is nothing after it. */ +! buf->b_ind_in_comment = 3; + +! /* Boolean: if non-zero, use b_ind_in_comment even if there is something +! * after the comment opener. */ +! buf->b_ind_in_comment2 = 0; + +! /* Max lines to search for an open paren. */ +! buf->b_ind_maxparen = 20; + +! /* Max lines to search for an open comment. */ +! buf->b_ind_maxcomment = 70; + +! /* Handle braces for java code. */ +! buf->b_ind_java = 0; + +! /* Not to confuse JS object properties with labels. */ +! buf->b_ind_js = 0; + +! /* Handle blocked cases correctly. */ +! buf->b_ind_keep_case_label = 0; + +! /* Handle C++ namespace. */ +! buf->b_ind_cpp_namespace = 0; + +! /* Handle continuation lines containing conditions of if(), for() and +! * while(). */ +! buf->b_ind_if_for_while = 0; +! +! for (p = buf->b_p_cino; *p; ) +! { +! l = p++; +! if (*p == '-') +! ++p; +! digits = p; /* remember where the digits start */ +! n = getdigits(&p); +! divider = 0; +! if (*p == '.') /* ".5s" means a fraction */ +! { +! fraction = atol((char *)++p); +! while (VIM_ISDIGIT(*p)) +! { +! ++p; +! if (divider) +! divider *= 10; +! else +! divider = 10; +! } +! } +! if (*p == 's') /* "2s" means two times 'shiftwidth' */ +! { +! if (p == digits) +! n = sw; /* just "s" is one 'shiftwidth' */ +! else +! { +! n *= sw; +! if (divider) +! n += (sw * fraction + divider / 2) / divider; +! } +! ++p; +! } +! if (l[1] == '-') +! n = -n; + ++ /* When adding an entry here, also update the default 'cinoptions' in ++ * doc/indent.txt, and add explanation for it! */ ++ switch (*l) ++ { ++ case '>': buf->b_ind_level = n; break; ++ case 'e': buf->b_ind_open_imag = n; break; ++ case 'n': buf->b_ind_no_brace = n; break; ++ case 'f': buf->b_ind_first_open = n; break; ++ case '{': buf->b_ind_open_extra = n; break; ++ case '}': buf->b_ind_close_extra = n; break; ++ case '^': buf->b_ind_open_left_imag = n; break; ++ case 'L': buf->b_ind_jump_label = n; break; ++ case ':': buf->b_ind_case = n; break; ++ case '=': buf->b_ind_case_code = n; break; ++ case 'b': buf->b_ind_case_break = n; break; ++ case 'p': buf->b_ind_param = n; break; ++ case 't': buf->b_ind_func_type = n; break; ++ case '/': buf->b_ind_comment = n; break; ++ case 'c': buf->b_ind_in_comment = n; break; ++ case 'C': buf->b_ind_in_comment2 = n; break; ++ case 'i': buf->b_ind_cpp_baseclass = n; break; ++ case '+': buf->b_ind_continuation = n; break; ++ case '(': buf->b_ind_unclosed = n; break; ++ case 'u': buf->b_ind_unclosed2 = n; break; ++ case 'U': buf->b_ind_unclosed_noignore = n; break; ++ case 'W': buf->b_ind_unclosed_wrapped = n; break; ++ case 'w': buf->b_ind_unclosed_whiteok = n; break; ++ case 'm': buf->b_ind_matching_paren = n; break; ++ case 'M': buf->b_ind_paren_prev = n; break; ++ case ')': buf->b_ind_maxparen = n; break; ++ case '*': buf->b_ind_maxcomment = n; break; ++ case 'g': buf->b_ind_scopedecl = n; break; ++ case 'h': buf->b_ind_scopedecl_code = n; break; ++ case 'j': buf->b_ind_java = n; break; ++ case 'J': buf->b_ind_js = n; break; ++ case 'l': buf->b_ind_keep_case_label = n; break; ++ case '#': buf->b_ind_hash_comment = n; break; ++ case 'N': buf->b_ind_cpp_namespace = n; break; ++ case 'k': buf->b_ind_if_for_while = n; break; ++ } ++ if (*p == ',') ++ ++p; ++ } ++ } ++ ++ int ++ get_c_indent() ++ { + pos_T cur_curpos; + int amount; + int scope_amount; +*************** +*** 6868,6877 **** + + int whilelevel; + linenr_T lnum; +- char_u *options; +- char_u *digits; +- int fraction = 0; /* init for GCC */ +- int divider; + int n; + int iscase; + int lookfor_break; +--- 6894,6899 ---- +*************** +*** 6880,6962 **** + int original_line_islabel; + int added_to_amount = 0; + +! for (options = curbuf->b_p_cino; *options; ) +! { +! l = options++; +! if (*options == '-') +! ++options; +! digits = options; /* remember where the digits start */ +! n = getdigits(&options); +! divider = 0; +! if (*options == '.') /* ".5s" means a fraction */ +! { +! fraction = atol((char *)++options); +! while (VIM_ISDIGIT(*options)) +! { +! ++options; +! if (divider) +! divider *= 10; +! else +! divider = 10; +! } +! } +! if (*options == 's') /* "2s" means two times 'shiftwidth' */ +! { +! if (options == digits) +! n = sw; /* just "s" is one 'shiftwidth' */ +! else +! { +! n *= sw; +! if (divider) +! n += (sw * fraction + divider / 2) / divider; +! } +! ++options; +! } +! if (l[1] == '-') +! n = -n; +! /* When adding an entry here, also update the default 'cinoptions' in +! * doc/indent.txt, and add explanation for it! */ +! switch (*l) +! { +! case '>': ind_level = n; break; +! case 'e': ind_open_imag = n; break; +! case 'n': ind_no_brace = n; break; +! case 'f': ind_first_open = n; break; +! case '{': ind_open_extra = n; break; +! case '}': ind_close_extra = n; break; +! case '^': ind_open_left_imag = n; break; +! case 'L': ind_jump_label = n; break; +! case ':': ind_case = n; break; +! case '=': ind_case_code = n; break; +! case 'b': ind_case_break = n; break; +! case 'p': ind_param = n; break; +! case 't': ind_func_type = n; break; +! case '/': ind_comment = n; break; +! case 'c': ind_in_comment = n; break; +! case 'C': ind_in_comment2 = n; break; +! case 'i': ind_cpp_baseclass = n; break; +! case '+': ind_continuation = n; break; +! case '(': ind_unclosed = n; break; +! case 'u': ind_unclosed2 = n; break; +! case 'U': ind_unclosed_noignore = n; break; +! case 'W': ind_unclosed_wrapped = n; break; +! case 'w': ind_unclosed_whiteok = n; break; +! case 'm': ind_matching_paren = n; break; +! case 'M': ind_paren_prev = n; break; +! case ')': ind_maxparen = n; break; +! case '*': ind_maxcomment = n; break; +! case 'g': ind_scopedecl = n; break; +! case 'h': ind_scopedecl_code = n; break; +! case 'j': ind_java = n; break; +! case 'J': ind_js = n; break; +! case 'l': ind_keep_case_label = n; break; +! case '#': ind_hash_comment = n; break; +! case 'N': ind_cpp_namespace = n; break; +! case 'k': ind_if_for_while = n; break; +! } +! if (*options == ',') +! ++options; +! } + + /* remember where the cursor was when we started */ + cur_curpos = curwin->w_cursor; +--- 6902,6909 ---- + int original_line_islabel; + int added_to_amount = 0; + +! /* make a copy, value is changed below */ +! int ind_continuation = curbuf->b_ind_continuation; + + /* remember where the cursor was when we started */ + cur_curpos = curwin->w_cursor; +*************** +*** 6990,7011 **** + + curwin->w_cursor.col = 0; + +! original_line_islabel = cin_islabel(ind_maxcomment); /* XXX */ + + /* + * #defines and so on always go at the left when included in 'cinkeys'. + */ + if (*theline == '#' && (*linecopy == '#' || in_cinkeys('#', ' ', TRUE))) +! { +! amount = 0; +! } + + /* + * Is it a non-case label? Then that goes at the left margin too unless: + * - JS flag is set. + * - 'L' item has a positive value. + */ +! else if (original_line_islabel && !ind_js && ind_jump_label < 0) + { + amount = 0; + } +--- 6937,6957 ---- + + curwin->w_cursor.col = 0; + +! original_line_islabel = cin_islabel(curbuf->b_ind_maxcomment); /* XXX */ + + /* + * #defines and so on always go at the left when included in 'cinkeys'. + */ + if (*theline == '#' && (*linecopy == '#' || in_cinkeys('#', ' ', TRUE))) +! amount = curbuf->b_ind_hash_comment; + + /* + * Is it a non-case label? Then that goes at the left margin too unless: + * - JS flag is set. + * - 'L' item has a positive value. + */ +! else if (original_line_islabel && !curbuf->b_ind_js +! && curbuf->b_ind_jump_label < 0) + { + amount = 0; + } +*************** +*** 7027,7033 **** + * comment, try using the 'comments' option. + */ + else if (!cin_iscomment(theline) +! && (trypos = find_start_comment(ind_maxcomment)) != NULL) /* XXX */ + { + int lead_start_len = 2; + int lead_middle_len = 1; +--- 6973,6980 ---- + * comment, try using the 'comments' option. + */ + else if (!cin_iscomment(theline) +! && (trypos = find_start_comment(curbuf->b_ind_maxcomment)) != NULL) +! /* XXX */ + { + int lead_start_len = 2; + int lead_middle_len = 1; +*************** +*** 7161,7167 **** + } + if (amount == -1) /* use the comment opener */ + { +! if (!ind_in_comment2) + { + start = ml_get(trypos->lnum); + look = start + trypos->col + 2; /* skip / and * */ +--- 7108,7114 ---- + } + if (amount == -1) /* use the comment opener */ + { +! if (!curbuf->b_ind_in_comment2) + { + start = ml_get(trypos->lnum); + look = start + trypos->col + 2; /* skip / and * */ +*************** +*** 7170,7177 **** + } + getvcol(curwin, trypos, &col, NULL, NULL); + amount = col; +! if (ind_in_comment2 || *look == NUL) +! amount += ind_in_comment; + } + } + } +--- 7117,7124 ---- + } + getvcol(curwin, trypos, &col, NULL, NULL); + amount = col; +! if (curbuf->b_ind_in_comment2 || *look == NUL) +! amount += curbuf->b_ind_in_comment; + } + } + } +*************** +*** 7179,7187 **** + /* + * Are we inside parentheses or braces? + */ /* XXX */ +! else if (((trypos = find_match_paren(ind_maxparen, ind_maxcomment)) != NULL +! && ind_java == 0) +! || (tryposBrace = find_start_brace(ind_maxcomment)) != NULL + || trypos != NULL) + { + if (trypos != NULL && tryposBrace != NULL) +--- 7126,7136 ---- + /* + * Are we inside parentheses or braces? + */ /* XXX */ +! else if (((trypos = find_match_paren(curbuf->b_ind_maxparen, +! curbuf->b_ind_maxcomment)) != NULL +! && curbuf->b_ind_java == 0) +! || (tryposBrace = +! find_start_brace(curbuf->b_ind_maxcomment)) != NULL + || trypos != NULL) + { + if (trypos != NULL && tryposBrace != NULL) +*************** +*** 7202,7208 **** + * If the matching paren is more than one line away, use the indent of + * a previous non-empty line that matches the same paren. + */ +! if (theline[0] == ')' && ind_paren_prev) + { + /* Line up with the start of the matching paren line. */ + amount = get_indent_lnum(curwin->w_cursor.lnum - 1); /* XXX */ +--- 7151,7157 ---- + * If the matching paren is more than one line away, use the indent of + * a previous non-empty line that matches the same paren. + */ +! if (theline[0] == ')' && curbuf->b_ind_paren_prev) + { + /* Line up with the start of the matching paren line. */ + amount = get_indent_lnum(curwin->w_cursor.lnum - 1); /* XXX */ +*************** +*** 7221,7227 **** + curwin->w_cursor.lnum = lnum; + + /* Skip a comment. XXX */ +! if ((trypos = find_start_comment(ind_maxcomment)) != NULL) + { + lnum = trypos->lnum + 1; + continue; +--- 7170,7177 ---- + curwin->w_cursor.lnum = lnum; + + /* Skip a comment. XXX */ +! if ((trypos = find_start_comment(curbuf->b_ind_maxcomment)) +! != NULL) + { + lnum = trypos->lnum + 1; + continue; +*************** +*** 7229,7236 **** + + /* XXX */ + if ((trypos = find_match_paren( +! corr_ind_maxparen(ind_maxparen, &cur_curpos), +! ind_maxcomment)) != NULL + && trypos->lnum == our_paren_pos.lnum + && trypos->col == our_paren_pos.col) + { +--- 7179,7186 ---- + + /* XXX */ + if ((trypos = find_match_paren( +! corr_ind_maxparen(curbuf->b_ind_maxparen, &cur_curpos), +! curbuf->b_ind_maxcomment)) != NULL + && trypos->lnum == our_paren_pos.lnum + && trypos->col == our_paren_pos.col) + { +*************** +*** 7258,7264 **** + int ignore_paren_col = 0; + int is_if_for_while = 0; + +! if (ind_if_for_while) + { + /* Look for the outermost opening parenthesis on this line + * and check whether it belongs to an "if", "for" or "while". */ +--- 7208,7214 ---- + int ignore_paren_col = 0; + int is_if_for_while = 0; + +! if (curbuf->b_ind_if_for_while) + { + /* Look for the outermost opening parenthesis on this line + * and check whether it belongs to an "if", "for" or "while". */ +*************** +*** 7273,7279 **** + curwin->w_cursor.lnum = outermost.lnum; + curwin->w_cursor.col = outermost.col; + +! trypos = find_match_paren(ind_maxparen, ind_maxcomment); + } while (trypos && trypos->lnum == outermost.lnum); + + curwin->w_cursor = cursor_save; +--- 7223,7230 ---- + curwin->w_cursor.lnum = outermost.lnum; + curwin->w_cursor.col = outermost.col; + +! trypos = find_match_paren(curbuf->b_ind_maxparen, +! curbuf->b_ind_maxcomment); + } while (trypos && trypos->lnum == outermost.lnum); + + curwin->w_cursor = cursor_save; +*************** +*** 7284,7290 **** + cin_is_if_for_while_before_offset(line, &outermost.col); + } + +! amount = skip_label(our_paren_pos.lnum, &look, ind_maxcomment); + look = skipwhite(look); + if (*look == '(') + { +--- 7235,7242 ---- + cin_is_if_for_while_before_offset(line, &outermost.col); + } + +! amount = skip_label(our_paren_pos.lnum, &look, +! curbuf->b_ind_maxcomment); + look = skipwhite(look); + if (*look == '(') + { +*************** +*** 7298,7304 **** + line = ml_get_curline(); + look_col = (int)(look - line); + curwin->w_cursor.col = look_col + 1; +! if ((trypos = findmatchlimit(NULL, ')', 0, ind_maxparen)) + != NULL + && trypos->lnum == our_paren_pos.lnum + && trypos->col < our_paren_pos.col) +--- 7250,7257 ---- + line = ml_get_curline(); + look_col = (int)(look - line); + curwin->w_cursor.col = look_col + 1; +! if ((trypos = findmatchlimit(NULL, ')', 0, +! curbuf->b_ind_maxparen)) + != NULL + && trypos->lnum == our_paren_pos.lnum + && trypos->col < our_paren_pos.col) +*************** +*** 7307,7330 **** + curwin->w_cursor.lnum = save_lnum; + look = ml_get(our_paren_pos.lnum) + look_col; + } +! if (theline[0] == ')' || (ind_unclosed == 0 && is_if_for_while == 0) +! || (!ind_unclosed_noignore && *look == '(' + && ignore_paren_col == 0)) + { + /* + * If we're looking at a close paren, line up right there; + * otherwise, line up with the next (non-white) character. +! * When ind_unclosed_wrapped is set and the matching paren is + * the last nonwhite character of the line, use either the + * indent of the current line or the indentation of the next +! * outer paren and add ind_unclosed_wrapped (for very long + * lines). + */ + if (theline[0] != ')') + { + cur_amount = MAXCOL; + l = ml_get(our_paren_pos.lnum); +! if (ind_unclosed_wrapped + && cin_ends_in(l, (char_u *)"(", NULL)) + { + /* look for opening unmatched paren, indent one level +--- 7260,7284 ---- + curwin->w_cursor.lnum = save_lnum; + look = ml_get(our_paren_pos.lnum) + look_col; + } +! if (theline[0] == ')' || (curbuf->b_ind_unclosed == 0 +! && is_if_for_while == 0) +! || (!curbuf->b_ind_unclosed_noignore && *look == '(' + && ignore_paren_col == 0)) + { + /* + * If we're looking at a close paren, line up right there; + * otherwise, line up with the next (non-white) character. +! * When b_ind_unclosed_wrapped is set and the matching paren is + * the last nonwhite character of the line, use either the + * indent of the current line or the indentation of the next +! * outer paren and add b_ind_unclosed_wrapped (for very long + * lines). + */ + if (theline[0] != ')') + { + cur_amount = MAXCOL; + l = ml_get(our_paren_pos.lnum); +! if (curbuf->b_ind_unclosed_wrapped + && cin_ends_in(l, (char_u *)"(", NULL)) + { + /* look for opening unmatched paren, indent one level +*************** +*** 7346,7354 **** + } + + our_paren_pos.col = 0; +! amount += n * ind_unclosed_wrapped; + } +! else if (ind_unclosed_whiteok) + our_paren_pos.col++; + else + { +--- 7300,7308 ---- + } + + our_paren_pos.col = 0; +! amount += n * curbuf->b_ind_unclosed_wrapped; + } +! else if (curbuf->b_ind_unclosed_whiteok) + our_paren_pos.col++; + else + { +*************** +*** 7374,7385 **** + } + } + +! if (theline[0] == ')' && ind_matching_paren) + { + /* Line up with the start of the matching paren line. */ + } +! else if ((ind_unclosed == 0 && is_if_for_while == 0) +! || (!ind_unclosed_noignore + && *look == '(' && ignore_paren_col == 0)) + { + if (cur_amount != MAXCOL) +--- 7328,7339 ---- + } + } + +! if (theline[0] == ')' && curbuf->b_ind_matching_paren) + { + /* Line up with the start of the matching paren line. */ + } +! else if ((curbuf->b_ind_unclosed == 0 && is_if_for_while == 0) +! || (!curbuf->b_ind_unclosed_noignore + && *look == '(' && ignore_paren_col == 0)) + { + if (cur_amount != MAXCOL) +*************** +*** 7387,7425 **** + } + else + { +! /* Add ind_unclosed2 for each '(' before our matching one, but +! * ignore (void) before the line (ignore_paren_col). */ + col = our_paren_pos.col; + while ((int)our_paren_pos.col > ignore_paren_col) + { + --our_paren_pos.col; + switch (*ml_get_pos(&our_paren_pos)) + { +! case '(': amount += ind_unclosed2; + col = our_paren_pos.col; + break; +! case ')': amount -= ind_unclosed2; + col = MAXCOL; + break; + } + } + +! /* Use ind_unclosed once, when the first '(' is not inside + * braces */ + if (col == MAXCOL) +! amount += ind_unclosed; + else + { + curwin->w_cursor.lnum = our_paren_pos.lnum; + curwin->w_cursor.col = col; +! if (find_match_paren(ind_maxparen, ind_maxcomment) != NULL) +! amount += ind_unclosed2; + else + { + if (is_if_for_while) +! amount += ind_if_for_while; + else +! amount += ind_unclosed; + } + } + /* +--- 7341,7380 ---- + } + else + { +! /* Add b_ind_unclosed2 for each '(' before our matching one, +! * but ignore (void) before the line (ignore_paren_col). */ + col = our_paren_pos.col; + while ((int)our_paren_pos.col > ignore_paren_col) + { + --our_paren_pos.col; + switch (*ml_get_pos(&our_paren_pos)) + { +! case '(': amount += curbuf->b_ind_unclosed2; + col = our_paren_pos.col; + break; +! case ')': amount -= curbuf->b_ind_unclosed2; + col = MAXCOL; + break; + } + } + +! /* Use b_ind_unclosed once, when the first '(' is not inside + * braces */ + if (col == MAXCOL) +! amount += curbuf->b_ind_unclosed; + else + { + curwin->w_cursor.lnum = our_paren_pos.lnum; + curwin->w_cursor.col = col; +! if (find_match_paren(curbuf->b_ind_maxparen, +! curbuf->b_ind_maxcomment) != NULL) +! amount += curbuf->b_ind_unclosed2; + else + { + if (is_if_for_while) +! amount += curbuf->b_ind_if_for_while; + else +! amount += curbuf->b_ind_unclosed; + } + } + /* +*************** +*** 7437,7443 **** + + /* add extra indent for a comment */ + if (cin_iscomment(theline)) +! amount += ind_comment; + } + + /* +--- 7392,7398 ---- + + /* add extra indent for a comment */ + if (cin_iscomment(theline)) +! amount += curbuf->b_ind_comment; + } + + /* +*************** +*** 7480,7487 **** + */ + lnum = ourscope; + if (find_last_paren(start, '(', ')') +! && (trypos = find_match_paren(ind_maxparen, +! ind_maxcomment)) != NULL) + lnum = trypos->lnum; + + /* +--- 7435,7442 ---- + */ + lnum = ourscope; + if (find_last_paren(start, '(', ')') +! && (trypos = find_match_paren(curbuf->b_ind_maxparen, +! curbuf->b_ind_maxcomment)) != NULL) + lnum = trypos->lnum; + + /* +*************** +*** 7490,7500 **** + * ldfd) { + * } + */ +! if (ind_js || (ind_keep_case_label + && cin_iscase(skipwhite(ml_get_curline()), FALSE))) + amount = get_indent(); + else +! amount = skip_label(lnum, &l, ind_maxcomment); + + start_brace = BRACE_AT_END; + } +--- 7445,7455 ---- + * ldfd) { + * } + */ +! if (curbuf->b_ind_js || (curbuf->b_ind_keep_case_label + && cin_iscase(skipwhite(ml_get_curline()), FALSE))) + amount = get_indent(); + else +! amount = skip_label(lnum, &l, curbuf->b_ind_maxcomment); + + start_brace = BRACE_AT_END; + } +*************** +*** 7510,7516 **** + * they may want closing braces to line up with something + * other than the open brace. indulge them, if so. + */ +! amount += ind_close_extra; + } + else + { +--- 7465,7471 ---- + * they may want closing braces to line up with something + * other than the open brace. indulge them, if so. + */ +! amount += curbuf->b_ind_close_extra; + } + else + { +*************** +*** 7523,7536 **** + lookfor = LOOKFOR_INITIAL; + if (cin_iselse(theline)) + lookfor = LOOKFOR_IF; +! else if (cin_iswhileofdo(theline, cur_curpos.lnum, ind_maxparen)) +! /* XXX */ + lookfor = LOOKFOR_DO; + if (lookfor != LOOKFOR_INITIAL) + { + curwin->w_cursor.lnum = cur_curpos.lnum; +! if (find_match(lookfor, ourscope, ind_maxparen, +! ind_maxcomment) == OK) + { + amount = get_indent(); /* XXX */ + goto theend; +--- 7478,7491 ---- + lookfor = LOOKFOR_INITIAL; + if (cin_iselse(theline)) + lookfor = LOOKFOR_IF; +! else if (cin_iswhileofdo(theline, cur_curpos.lnum, +! curbuf->b_ind_maxparen)) /* XXX */ + lookfor = LOOKFOR_DO; + if (lookfor != LOOKFOR_INITIAL) + { + curwin->w_cursor.lnum = cur_curpos.lnum; +! if (find_match(lookfor, ourscope, curbuf->b_ind_maxparen, +! curbuf->b_ind_maxcomment) == OK) + { + amount = get_indent(); /* XXX */ + goto theend; +*************** +*** 7547,7558 **** + /* + * if the '{' is _really_ at the left margin, use the imaginary + * location of a left-margin brace. Otherwise, correct the +! * location for ind_open_extra. + */ + + if (start_brace == BRACE_IN_COL0) /* '{' is in column 0 */ + { +! amount = ind_open_left_imag; + lookfor_cpp_namespace = TRUE; + } + else if (start_brace == BRACE_AT_START && +--- 7502,7513 ---- + /* + * if the '{' is _really_ at the left margin, use the imaginary + * location of a left-margin brace. Otherwise, correct the +! * location for b_ind_open_extra. + */ + + if (start_brace == BRACE_IN_COL0) /* '{' is in column 0 */ + { +! amount = curbuf->b_ind_open_left_imag; + lookfor_cpp_namespace = TRUE; + } + else if (start_brace == BRACE_AT_START && +*************** +*** 7565,7580 **** + { + if (start_brace == BRACE_AT_END) /* '{' is at end of line */ + { +! amount += ind_open_imag; + + l = skipwhite(ml_get_curline()); + if (cin_is_cpp_namespace(l)) +! amount += ind_cpp_namespace; + } + else + { +! /* Compensate for adding ind_open_extra later. */ +! amount -= ind_open_extra; + if (amount < 0) + amount = 0; + } +--- 7520,7535 ---- + { + if (start_brace == BRACE_AT_END) /* '{' is at end of line */ + { +! amount += curbuf->b_ind_open_imag; + + l = skipwhite(ml_get_curline()); + if (cin_is_cpp_namespace(l)) +! amount += curbuf->b_ind_cpp_namespace; + } + else + { +! /* Compensate for adding b_ind_open_extra later. */ +! amount -= curbuf->b_ind_open_extra; + if (amount < 0) + amount = 0; + } +*************** +*** 7585,7604 **** + if (cin_iscase(theline, FALSE)) /* it's a switch() label */ + { + lookfor = LOOKFOR_CASE; /* find a previous switch() label */ +! amount += ind_case; + } + else if (cin_isscopedecl(theline)) /* private:, ... */ + { + lookfor = LOOKFOR_SCOPEDECL; /* class decl is this block */ +! amount += ind_scopedecl; + } + else + { +! if (ind_case_break && cin_isbreak(theline)) /* break; ... */ + lookfor_break = TRUE; + + lookfor = LOOKFOR_INITIAL; +! amount += ind_level; /* ind_level from start of block */ + } + scope_amount = amount; + whilelevel = 0; +--- 7540,7561 ---- + if (cin_iscase(theline, FALSE)) /* it's a switch() label */ + { + lookfor = LOOKFOR_CASE; /* find a previous switch() label */ +! amount += curbuf->b_ind_case; + } + else if (cin_isscopedecl(theline)) /* private:, ... */ + { + lookfor = LOOKFOR_SCOPEDECL; /* class decl is this block */ +! amount += curbuf->b_ind_scopedecl; + } + else + { +! if (curbuf->b_ind_case_break && cin_isbreak(theline)) +! /* break; ... */ + lookfor_break = TRUE; + + lookfor = LOOKFOR_INITIAL; +! /* b_ind_level from start of block */ +! amount += curbuf->b_ind_level; + } + scope_amount = amount; + whilelevel = 0; +*************** +*** 7636,7649 **** + { + if (curwin->w_cursor.lnum == 0 + || curwin->w_cursor.lnum +! < ourscope - ind_maxparen) + { +! /* nothing found (abuse ind_maxparen as limit) +! * assume terminated line (i.e. a variable + * initialization) */ + if (cont_amount > 0) + amount = cont_amount; +! else if (!ind_js) + amount += ind_continuation; + break; + } +--- 7593,7606 ---- + { + if (curwin->w_cursor.lnum == 0 + || curwin->w_cursor.lnum +! < ourscope - curbuf->b_ind_maxparen) + { +! /* nothing found (abuse curbuf->b_ind_maxparen as +! * limit) assume terminated line (i.e. a variable + * initialization) */ + if (cont_amount > 0) + amount = cont_amount; +! else if (!curbuf->b_ind_js) + amount += ind_continuation; + break; + } +*************** +*** 7654,7660 **** + * If we're in a comment now, skip to the start of the + * comment. + */ +! trypos = find_start_comment(ind_maxcomment); + if (trypos != NULL) + { + curwin->w_cursor.lnum = trypos->lnum + 1; +--- 7611,7617 ---- + * If we're in a comment now, skip to the start of the + * comment. + */ +! trypos = find_start_comment(curbuf->b_ind_maxcomment); + if (trypos != NULL) + { + curwin->w_cursor.lnum = trypos->lnum + 1; +*************** +*** 7680,7686 **** + */ + if (start_brace != BRACE_IN_COL0 + || !cin_isfuncdecl(&l, curwin->w_cursor.lnum, +! 0, ind_maxparen, ind_maxcomment)) + { + /* if the line is terminated with another ',' + * it is a continued variable initialization. +--- 7637,7644 ---- + */ + if (start_brace != BRACE_IN_COL0 + || !cin_isfuncdecl(&l, curwin->w_cursor.lnum, +! 0, curbuf->b_ind_maxparen, +! curbuf->b_ind_maxcomment)) + { + /* if the line is terminated with another ',' + * it is a continued variable initialization. +*************** +*** 7711,7721 **** + */ /* XXX */ + trypos = NULL; + if (find_last_paren(l, '(', ')')) +! trypos = find_match_paren(ind_maxparen, +! ind_maxcomment); + + if (trypos == NULL && find_last_paren(l, '{', '}')) +! trypos = find_start_brace(ind_maxcomment); + + if (trypos != NULL) + { +--- 7669,7681 ---- + */ /* XXX */ + trypos = NULL; + if (find_last_paren(l, '(', ')')) +! trypos = find_match_paren( +! curbuf->b_ind_maxparen, +! curbuf->b_ind_maxcomment); + + if (trypos == NULL && find_last_paren(l, '{', '}')) +! trypos = find_start_brace( +! curbuf->b_ind_maxcomment); + + if (trypos != NULL) + { +*************** +*** 7750,7757 **** + amount = scope_amount; + if (theline[0] == '{') + { +! amount += ind_open_extra; +! added_to_amount = ind_open_extra; + } + } + +--- 7710,7717 ---- + amount = scope_amount; + if (theline[0] == '{') + { +! amount += curbuf->b_ind_open_extra; +! added_to_amount = curbuf->b_ind_open_extra; + } + } + +*************** +*** 7773,7779 **** + + /* If we're in a comment now, skip to the start of + * the comment. */ +! trypos = find_start_comment(ind_maxcomment); + if (trypos != NULL) + { + curwin->w_cursor.lnum = trypos->lnum + 1; +--- 7733,7740 ---- + + /* If we're in a comment now, skip to the start of + * the comment. */ +! trypos = find_start_comment( +! curbuf->b_ind_maxcomment); + if (trypos != NULL) + { + curwin->w_cursor.lnum = trypos->lnum + 1; +*************** +*** 7788,7794 **** + /* Finally the actual check for "namespace". */ + if (cin_is_cpp_namespace(l)) + { +! amount += ind_cpp_namespace - added_to_amount; + break; + } + +--- 7749,7756 ---- + /* Finally the actual check for "namespace". */ + if (cin_is_cpp_namespace(l)) + { +! amount += curbuf->b_ind_cpp_namespace +! - added_to_amount; + break; + } + +*************** +*** 7802,7808 **** + /* + * If we're in a comment now, skip to the start of the comment. + */ /* XXX */ +! if ((trypos = find_start_comment(ind_maxcomment)) != NULL) + { + curwin->w_cursor.lnum = trypos->lnum + 1; + curwin->w_cursor.col = 0; +--- 7764,7771 ---- + /* + * If we're in a comment now, skip to the start of the comment. + */ /* XXX */ +! if ((trypos = find_start_comment(curbuf->b_ind_maxcomment)) +! != NULL) + { + curwin->w_cursor.lnum = trypos->lnum + 1; + curwin->w_cursor.col = 0; +*************** +*** 7856,7863 **** + * Check that this case label is not for another + * switch() + */ /* XXX */ +! if ((trypos = find_start_brace(ind_maxcomment)) == +! NULL || trypos->lnum == ourscope) + { + amount = get_indent(); /* XXX */ + break; +--- 7819,7827 ---- + * Check that this case label is not for another + * switch() + */ /* XXX */ +! if ((trypos = find_start_brace( +! curbuf->b_ind_maxcomment)) == NULL +! || trypos->lnum == ourscope) + { + amount = get_indent(); /* XXX */ + break; +*************** +*** 7900,7908 **** + if (l != NULL && cin_is_cinword(l)) + { + if (theline[0] == '{') +! amount += ind_open_extra; + else +! amount += ind_level + ind_no_brace; + } + break; + } +--- 7864,7873 ---- + if (l != NULL && cin_is_cinword(l)) + { + if (theline[0] == '{') +! amount += curbuf->b_ind_open_extra; + else +! amount += curbuf->b_ind_level +! + curbuf->b_ind_no_brace; + } + break; + } +*************** +*** 7916,7923 **** + * -> y = 1; + */ + scope_amount = get_indent() + (iscase /* XXX */ +! ? ind_case_code : ind_scopedecl_code); +! lookfor = ind_case_break ? LOOKFOR_NOBREAK : LOOKFOR_ANY; + continue; + } + +--- 7881,7890 ---- + * -> y = 1; + */ + scope_amount = get_indent() + (iscase /* XXX */ +! ? curbuf->b_ind_case_code +! : curbuf->b_ind_scopedecl_code); +! lookfor = curbuf->b_ind_case_break +! ? LOOKFOR_NOBREAK : LOOKFOR_ANY; + continue; + } + +*************** +*** 7928,7934 **** + if (lookfor == LOOKFOR_CASE || lookfor == LOOKFOR_SCOPEDECL) + { + if (find_last_paren(l, '{', '}') && (trypos = +! find_start_brace(ind_maxcomment)) != NULL) + { + curwin->w_cursor.lnum = trypos->lnum + 1; + curwin->w_cursor.col = 0; +--- 7895,7901 ---- + if (lookfor == LOOKFOR_CASE || lookfor == LOOKFOR_SCOPEDECL) + { + if (find_last_paren(l, '{', '}') && (trypos = +! find_start_brace(curbuf->b_ind_maxcomment)) != NULL) + { + curwin->w_cursor.lnum = trypos->lnum + 1; + curwin->w_cursor.col = 0; +*************** +*** 7939,7945 **** + /* + * Ignore jump labels with nothing after them. + */ +! if (!ind_js && cin_islabel(ind_maxcomment)) + { + l = after_label(ml_get_curline()); + if (l == NULL || cin_nocode(l)) +--- 7906,7912 ---- + /* + * Ignore jump labels with nothing after them. + */ +! if (!curbuf->b_ind_js && cin_islabel(curbuf->b_ind_maxcomment)) + { + l = after_label(ml_get_curline()); + if (l == NULL || cin_nocode(l)) +*************** +*** 7962,7968 **** + * constructor initialization? + */ /* XXX */ + n = FALSE; +! if (lookfor != LOOKFOR_TERM && ind_cpp_baseclass > 0) + { + n = cin_is_cpp_baseclass(&col); + l = ml_get_curline(); +--- 7929,7935 ---- + * constructor initialization? + */ /* XXX */ + n = FALSE; +! if (lookfor != LOOKFOR_TERM && curbuf->b_ind_cpp_baseclass > 0) + { + n = cin_is_cpp_baseclass(&col); + l = ml_get_curline(); +*************** +*** 7985,7992 **** + } + else + /* XXX */ +! amount = get_baseclass_amount(col, ind_maxparen, +! ind_maxcomment, ind_cpp_baseclass); + break; + } + else if (lookfor == LOOKFOR_CPP_BASECLASS) +--- 7952,7961 ---- + } + else + /* XXX */ +! amount = get_baseclass_amount(col, +! curbuf->b_ind_maxparen, +! curbuf->b_ind_maxcomment, +! curbuf->b_ind_cpp_baseclass); + break; + } + else if (lookfor == LOOKFOR_CPP_BASECLASS) +*************** +*** 8029,8036 **** + */ + (void)find_last_paren(l, '(', ')'); + trypos = find_match_paren( +! corr_ind_maxparen(ind_maxparen, &cur_curpos), +! ind_maxcomment); + + /* + * If we are looking for ',', we also look for matching +--- 7998,8005 ---- + */ + (void)find_last_paren(l, '(', ')'); + trypos = find_match_paren( +! corr_ind_maxparen(curbuf->b_ind_maxparen, +! &cur_curpos), curbuf->b_ind_maxcomment); + + /* + * If we are looking for ',', we also look for matching +*************** +*** 8038,8044 **** + */ + if (trypos == NULL && terminated == ',' + && find_last_paren(l, '{', '}')) +! trypos = find_start_brace(ind_maxcomment); + + if (trypos != NULL) + { +--- 8007,8013 ---- + */ + if (trypos == NULL && terminated == ',' + && find_last_paren(l, '{', '}')) +! trypos = find_start_brace(curbuf->b_ind_maxcomment); + + if (trypos != NULL) + { +*************** +*** 8081,8089 **** + * Get indent and pointer to text for current line, + * ignoring any jump label. XXX + */ +! if (!ind_js) + cur_amount = skip_label(curwin->w_cursor.lnum, +! &l, ind_maxcomment); + else + cur_amount = get_indent(); + /* +--- 8050,8058 ---- + * Get indent and pointer to text for current line, + * ignoring any jump label. XXX + */ +! if (!curbuf->b_ind_js) + cur_amount = skip_label(curwin->w_cursor.lnum, +! &l, curbuf->b_ind_maxcomment); + else + cur_amount = get_indent(); + /* +*************** +*** 8098,8113 **** + { + amount = cur_amount; + /* +! * Only add ind_open_extra when the current line + * doesn't start with a '{', which must have a match + * in the same line (scope is the same). Probably: + * { 1, 2 }, + * -> { 3, 4 } + */ + if (*skipwhite(l) != '{') +! amount += ind_open_extra; + +! if (ind_cpp_baseclass) + { + /* have to look back, whether it is a cpp base + * class declaration or initialization */ +--- 8067,8082 ---- + { + amount = cur_amount; + /* +! * Only add b_ind_open_extra when the current line + * doesn't start with a '{', which must have a match + * in the same line (scope is the same). Probably: + * { 1, 2 }, + * -> { 3, 4 } + */ + if (*skipwhite(l) != '{') +! amount += curbuf->b_ind_open_extra; + +! if (curbuf->b_ind_cpp_baseclass) + { + /* have to look back, whether it is a cpp base + * class declaration or initialization */ +*************** +*** 8155,8164 **** + */ + amount = cur_amount; + if (theline[0] == '{') +! amount += ind_open_extra; + if (lookfor != LOOKFOR_TERM) + { +! amount += ind_level + ind_no_brace; + break; + } + +--- 8124,8134 ---- + */ + amount = cur_amount; + if (theline[0] == '{') +! amount += curbuf->b_ind_open_extra; + if (lookfor != LOOKFOR_TERM) + { +! amount += curbuf->b_ind_level +! + curbuf->b_ind_no_brace; + break; + } + +*************** +*** 8192,8201 **** + curwin->w_cursor.col = + (colnr_T)(l - ml_get_curline()) + 1; + +! if ((trypos = find_start_brace(ind_maxcomment)) +! == NULL + || find_match(LOOKFOR_IF, trypos->lnum, +! ind_maxparen, ind_maxcomment) == FAIL) + break; + } + } +--- 8162,8172 ---- + curwin->w_cursor.col = + (colnr_T)(l - ml_get_curline()) + 1; + +! if ((trypos = find_start_brace( +! curbuf->b_ind_maxcomment)) == NULL + || find_match(LOOKFOR_IF, trypos->lnum, +! curbuf->b_ind_maxparen, +! curbuf->b_ind_maxcomment) == FAIL) + break; + } + } +*************** +*** 8232,8238 **** + * enumerations/initializations. */ + if (terminated == ',') + { +! if (ind_cpp_baseclass == 0) + break; + + lookfor = LOOKFOR_CPP_BASECLASS; +--- 8203,8209 ---- + * enumerations/initializations. */ + if (terminated == ',') + { +! if (curbuf->b_ind_cpp_baseclass == 0) + break; + + lookfor = LOOKFOR_CPP_BASECLASS; +*************** +*** 8290,8297 **** + * If so: Ignore until the matching "do". + */ + /* XXX */ +! else if (cin_iswhileofdo_end(terminated, ind_maxparen, +! ind_maxcomment)) + { + /* + * Found an unterminated line after a while ();, line up +--- 8261,8268 ---- + * If so: Ignore until the matching "do". + */ + /* XXX */ +! else if (cin_iswhileofdo_end(terminated, curbuf->b_ind_maxparen, +! curbuf->b_ind_maxcomment)) + { + /* + * Found an unterminated line after a while ();, line up +*************** +*** 8315,8321 **** + lookfor = LOOKFOR_TERM; + amount = get_indent(); /* XXX */ + if (theline[0] == '{') +! amount += ind_open_extra; + } + ++whilelevel; + } +--- 8286,8292 ---- + lookfor = LOOKFOR_TERM; + amount = get_indent(); /* XXX */ + if (theline[0] == '{') +! amount += curbuf->b_ind_open_extra; + } + ++whilelevel; + } +*************** +*** 8408,8415 **** + term_again: + l = ml_get_curline(); + if (find_last_paren(l, '(', ')') +! && (trypos = find_match_paren(ind_maxparen, +! ind_maxcomment)) != NULL) + { + /* + * Check if we are on a case label now. This is +--- 8379,8387 ---- + term_again: + l = ml_get_curline(); + if (find_last_paren(l, '(', ')') +! && (trypos = find_match_paren( +! curbuf->b_ind_maxparen, +! curbuf->b_ind_maxcomment)) != NULL) + { + /* + * Check if we are on a case label now. This is +*************** +*** 8436,8456 **** + * stat; + * } + */ +! iscase = (ind_keep_case_label && cin_iscase(l, FALSE)); + + /* + * Get indent and pointer to text for current line, + * ignoring any jump label. + */ + amount = skip_label(curwin->w_cursor.lnum, +! &l, ind_maxcomment); + + if (theline[0] == '{') +! amount += ind_open_extra; +! /* See remark above: "Only add ind_open_extra.." */ + l = skipwhite(l); + if (*l == '{') +! amount -= ind_open_extra; + lookfor = iscase ? LOOKFOR_ANY : LOOKFOR_TERM; + + /* +--- 8408,8429 ---- + * stat; + * } + */ +! iscase = (curbuf->b_ind_keep_case_label +! && cin_iscase(l, FALSE)); + + /* + * Get indent and pointer to text for current line, + * ignoring any jump label. + */ + amount = skip_label(curwin->w_cursor.lnum, +! &l, curbuf->b_ind_maxcomment); + + if (theline[0] == '{') +! amount += curbuf->b_ind_open_extra; +! /* See remark above: "Only add b_ind_open_extra.." */ + l = skipwhite(l); + if (*l == '{') +! amount -= curbuf->b_ind_open_extra; + lookfor = iscase ? LOOKFOR_ANY : LOOKFOR_TERM; + + /* +*************** +*** 8466,8475 **** + && cin_iselse(l) + && whilelevel == 0) + { +! if ((trypos = find_start_brace(ind_maxcomment)) +! == NULL + || find_match(LOOKFOR_IF, trypos->lnum, +! ind_maxparen, ind_maxcomment) == FAIL) + break; + continue; + } +--- 8439,8449 ---- + && cin_iselse(l) + && whilelevel == 0) + { +! if ((trypos = find_start_brace( +! curbuf->b_ind_maxcomment)) == NULL + || find_match(LOOKFOR_IF, trypos->lnum, +! curbuf->b_ind_maxparen, +! curbuf->b_ind_maxcomment) == FAIL) + break; + continue; + } +*************** +*** 8480,8487 **** + */ + l = ml_get_curline(); + if (find_last_paren(l, '{', '}') +! && (trypos = find_start_brace(ind_maxcomment)) +! != NULL) /* XXX */ + { + curwin->w_cursor = *trypos; + /* if not "else {" check for terminated again */ +--- 8454,8461 ---- + */ + l = ml_get_curline(); + if (find_last_paren(l, '{', '}') +! && (trypos = find_start_brace( +! curbuf->b_ind_maxcomment)) != NULL) /* XXX */ + { + curwin->w_cursor = *trypos; + /* if not "else {" check for terminated again */ +*************** +*** 8500,8510 **** + + /* add extra indent for a comment */ + if (cin_iscomment(theline)) +! amount += ind_comment; + + /* subtract extra left-shift for jump labels */ +! if (ind_jump_label > 0 && original_line_islabel) +! amount -= ind_jump_label; + } + + /* +--- 8474,8484 ---- + + /* add extra indent for a comment */ + if (cin_iscomment(theline)) +! amount += curbuf->b_ind_comment; + + /* subtract extra left-shift for jump labels */ +! if (curbuf->b_ind_jump_label > 0 && original_line_islabel) +! amount -= curbuf->b_ind_jump_label; + } + + /* +*************** +*** 8525,8531 **** + + if (theline[0] == '{') + { +! amount = ind_first_open; + } + + /* +--- 8499,8505 ---- + + if (theline[0] == '{') + { +! amount = curbuf->b_ind_first_open; + } + + /* +*************** +*** 8543,8552 **** + && !cin_ends_in(theline, (char_u *)",", NULL) + && cin_isfuncdecl(NULL, cur_curpos.lnum + 1, + cur_curpos.lnum + 1, +! ind_maxparen, ind_maxcomment) + && !cin_isterminated(theline, FALSE, TRUE)) + { +! amount = ind_func_type; + } + else + { +--- 8517,8527 ---- + && !cin_ends_in(theline, (char_u *)",", NULL) + && cin_isfuncdecl(NULL, cur_curpos.lnum + 1, + cur_curpos.lnum + 1, +! curbuf->b_ind_maxparen, +! curbuf->b_ind_maxcomment) + && !cin_isterminated(theline, FALSE, TRUE)) + { +! amount = curbuf->b_ind_func_type; + } + else + { +*************** +*** 8565,8571 **** + /* + * If we're in a comment now, skip to the start of the comment. + */ /* XXX */ +! if ((trypos = find_start_comment(ind_maxcomment)) != NULL) + { + curwin->w_cursor.lnum = trypos->lnum + 1; + curwin->w_cursor.col = 0; +--- 8540,8547 ---- + /* + * If we're in a comment now, skip to the start of the comment. + */ /* XXX */ +! if ((trypos = find_start_comment( +! curbuf->b_ind_maxcomment)) != NULL) + { + curwin->w_cursor.lnum = trypos->lnum + 1; + curwin->w_cursor.col = 0; +*************** +*** 8577,8583 **** + * constructor initialization? + */ /* XXX */ + n = FALSE; +! if (ind_cpp_baseclass != 0 && theline[0] != '{') + { + n = cin_is_cpp_baseclass(&col); + l = ml_get_curline(); +--- 8553,8559 ---- + * constructor initialization? + */ /* XXX */ + n = FALSE; +! if (curbuf->b_ind_cpp_baseclass != 0 && theline[0] != '{') + { + n = cin_is_cpp_baseclass(&col); + l = ml_get_curline(); +*************** +*** 8585,8592 **** + if (n) + { + /* XXX */ +! amount = get_baseclass_amount(col, ind_maxparen, +! ind_maxcomment, ind_cpp_baseclass); + break; + } + +--- 8561,8569 ---- + if (n) + { + /* XXX */ +! amount = get_baseclass_amount(col, curbuf->b_ind_maxparen, +! curbuf->b_ind_maxcomment, +! curbuf->b_ind_cpp_baseclass); + break; + } + +*************** +*** 8617,8624 **** + { + /* take us back to opening paren */ + if (find_last_paren(l, '(', ')') +! && (trypos = find_match_paren(ind_maxparen, +! ind_maxcomment)) != NULL) + curwin->w_cursor = *trypos; + + /* For a line ending in ',' that is a continuation line go +--- 8594,8602 ---- + { + /* take us back to opening paren */ + if (find_last_paren(l, '(', ')') +! && (trypos = find_match_paren( +! curbuf->b_ind_maxparen, +! curbuf->b_ind_maxcomment)) != NULL) + curwin->w_cursor = *trypos; + + /* For a line ending in ',' that is a continuation line go +*************** +*** 8650,8656 **** + * not in a comment, put it the left margin. + */ + if (cin_isfuncdecl(NULL, cur_curpos.lnum, 0, +! ind_maxparen, ind_maxcomment)) /* XXX */ + break; + l = ml_get_curline(); + +--- 8628,8635 ---- + * not in a comment, put it the left margin. + */ + if (cin_isfuncdecl(NULL, cur_curpos.lnum, 0, +! curbuf->b_ind_maxparen, +! curbuf->b_ind_maxcomment)) /* XXX */ + break; + l = ml_get_curline(); + +*************** +*** 8699,8707 **** + * parameters. + */ + if (cin_isfuncdecl(&l, curwin->w_cursor.lnum, 0, +! ind_maxparen, ind_maxcomment)) + { +! amount = ind_param; + break; + } + +--- 8678,8687 ---- + * parameters. + */ + if (cin_isfuncdecl(&l, curwin->w_cursor.lnum, 0, +! curbuf->b_ind_maxparen, +! curbuf->b_ind_maxcomment)) + { +! amount = curbuf->b_ind_param; + break; + } + +*************** +*** 8730,8737 **** + */ + find_last_paren(l, '(', ')'); + +! if ((trypos = find_match_paren(ind_maxparen, +! ind_maxcomment)) != NULL) + curwin->w_cursor = *trypos; + amount = get_indent(); /* XXX */ + break; +--- 8710,8717 ---- + */ + find_last_paren(l, '(', ')'); + +! if ((trypos = find_match_paren(curbuf->b_ind_maxparen, +! curbuf->b_ind_maxcomment)) != NULL) + curwin->w_cursor = *trypos; + amount = get_indent(); /* XXX */ + break; +*************** +*** 8739,8745 **** + + /* add extra indent for a comment */ + if (cin_iscomment(theline)) +! amount += ind_comment; + + /* add extra indent if the previous line ended in a backslash: + * "asdfasdf\ +--- 8719,8725 ---- + + /* add extra indent for a comment */ + if (cin_iscomment(theline)) +! amount += curbuf->b_ind_comment; + + /* add extra indent if the previous line ended in a backslash: + * "asdfasdf\ +*** ../vim-7.4.068/src/ops.c 2013-11-04 01:41:11.000000000 +0100 +--- src/ops.c 2013-11-05 06:13:27.000000000 +0100 +*************** +*** 336,342 **** + { + int count; + int i, j; +! int p_sw = (int)get_sw_value(); + + count = get_indent(); /* get current indent */ + +--- 336,342 ---- + { + int count; + int i, j; +! int p_sw = (int)get_sw_value(curbuf); + + count = get_indent(); /* get current indent */ + +*************** +*** 392,398 **** + int total; + char_u *newp, *oldp; + int oldcol = curwin->w_cursor.col; +! int p_sw = (int)get_sw_value(); + int p_ts = (int)curbuf->b_p_ts; + struct block_def bd; + int incr; +--- 392,398 ---- + int total; + char_u *newp, *oldp; + int oldcol = curwin->w_cursor.col; +! int p_sw = (int)get_sw_value(curbuf); + int p_ts = (int)curbuf->b_p_ts; + struct block_def bd; + int incr; +*************** +*** 4046,4052 **** + # endif + # endif + # ifdef FEAT_CINDENT +! (curbuf->b_p_cin && in_cinkeys('#', ' ', TRUE)) + # endif + ; + } +--- 4046,4053 ---- + # endif + # endif + # ifdef FEAT_CINDENT +! (curbuf->b_p_cin && in_cinkeys('#', ' ', TRUE) +! && curbuf->b_ind_hash_comment == 0) + # endif + ; + } +*** ../vim-7.4.068/src/proto/misc1.pro 2013-11-04 02:53:46.000000000 +0100 +--- src/proto/misc1.pro 2013-11-05 06:08:46.000000000 +0100 +*************** +*** 84,89 **** +--- 84,90 ---- + int cin_islabel __ARGS((int ind_maxcomment)); + int cin_iscase __ARGS((char_u *s, int strict)); + int cin_isscopedecl __ARGS((char_u *s)); ++ void parse_cino __ARGS((buf_T *buf)); + int get_c_indent __ARGS((void)); + int get_expr_indent __ARGS((void)); + int get_lisp_indent __ARGS((void)); +*** ../vim-7.4.068/src/proto/option.pro 2013-08-10 13:37:22.000000000 +0200 +--- src/proto/option.pro 2013-11-05 06:14:46.000000000 +0100 +*************** +*** 59,65 **** + void save_file_ff __ARGS((buf_T *buf)); + int file_ff_differs __ARGS((buf_T *buf, int ignore_empty)); + int check_ff_value __ARGS((char_u *p)); +! long get_sw_value __ARGS((void)); + long get_sts_value __ARGS((void)); + void find_mps_values __ARGS((int *initc, int *findc, int *backwards, int switchit)); + /* vim: set ft=c : */ +--- 59,65 ---- + void save_file_ff __ARGS((buf_T *buf)); + int file_ff_differs __ARGS((buf_T *buf, int ignore_empty)); + int check_ff_value __ARGS((char_u *p)); +! long get_sw_value __ARGS((buf_T *buf)); + long get_sts_value __ARGS((void)); + void find_mps_values __ARGS((int *initc, int *findc, int *backwards, int switchit)); + /* vim: set ft=c : */ +*** ../vim-7.4.068/src/structs.h 2013-07-03 15:35:59.000000000 +0200 +--- src/structs.h 2013-11-05 05:08:26.000000000 +0100 +*************** +*** 1633,1638 **** +--- 1633,1677 ---- + + /* end of buffer options */ + ++ #ifdef FEAT_CINDENT ++ /* values set from b_p_cino */ ++ int b_ind_level; ++ int b_ind_open_imag; ++ int b_ind_no_brace; ++ int b_ind_first_open; ++ int b_ind_open_extra; ++ int b_ind_close_extra; ++ int b_ind_open_left_imag; ++ int b_ind_jump_label; ++ int b_ind_case; ++ int b_ind_case_code; ++ int b_ind_case_break; ++ int b_ind_param; ++ int b_ind_func_type; ++ int b_ind_comment; ++ int b_ind_in_comment; ++ int b_ind_in_comment2; ++ int b_ind_cpp_baseclass; ++ int b_ind_continuation; ++ int b_ind_unclosed; ++ int b_ind_unclosed2; ++ int b_ind_unclosed_noignore; ++ int b_ind_unclosed_wrapped; ++ int b_ind_unclosed_whiteok; ++ int b_ind_matching_paren; ++ int b_ind_paren_prev; ++ int b_ind_maxparen; ++ int b_ind_maxcomment; ++ int b_ind_scopedecl; ++ int b_ind_scopedecl_code; ++ int b_ind_java; ++ int b_ind_js; ++ int b_ind_keep_case_label; ++ int b_ind_hash_comment; ++ int b_ind_cpp_namespace; ++ int b_ind_if_for_while; ++ #endif ++ + linenr_T b_no_eol_lnum; /* non-zero lnum when last line of next binary + * write should not have an end-of-line */ + +*** ../vim-7.4.068/src/option.c 2013-07-17 21:39:13.000000000 +0200 +--- src/option.c 2013-11-05 06:58:04.000000000 +0100 +*************** +*** 5372,5377 **** +--- 5372,5378 ---- + #ifdef FEAT_CINDENT + check_string_option(&buf->b_p_cink); + check_string_option(&buf->b_p_cino); ++ parse_cino(buf); + #endif + #ifdef FEAT_AUTOCMD + check_string_option(&buf->b_p_ft); +*************** +*** 6990,6995 **** +--- 6991,7005 ---- + } + #endif + ++ #ifdef FEAT_CINDENT ++ /* 'cinoptions' */ ++ else if (gvarp == &p_cino) ++ { ++ /* TODO: recognize errors */ ++ parse_cino(curbuf); ++ } ++ #endif ++ + /* Options that are a list of flags. */ + else + { +*************** +*** 8338,8351 **** + curwin->w_p_fdc = 12; + } + } + + /* 'shiftwidth' or 'tabstop' */ + else if (pp == &curbuf->b_p_sw || pp == &curbuf->b_p_ts) + { + if (foldmethodIsIndent(curwin)) + foldUpdateAll(curwin); + } +! #endif /* FEAT_FOLDING */ + + #ifdef FEAT_MBYTE + /* 'maxcombine' */ +--- 8348,8371 ---- + curwin->w_p_fdc = 12; + } + } ++ #endif /* FEAT_FOLDING */ + ++ #if defined(FEAT_FOLDING) || defined(FEAT_CINDENT) + /* 'shiftwidth' or 'tabstop' */ + else if (pp == &curbuf->b_p_sw || pp == &curbuf->b_p_ts) + { ++ # ifdef FEAT_FOLDING + if (foldmethodIsIndent(curwin)) + foldUpdateAll(curwin); ++ # endif ++ # ifdef FEAT_CINDENT ++ /* When 'shiftwidth' changes, or it's zero and 'tabstop' changes: ++ * parse 'cinoptions'. */ ++ if (pp == &curbuf->b_p_sw || curbuf->b_p_sw == 0) ++ parse_cino(curbuf); ++ # endif + } +! #endif + + #ifdef FEAT_MBYTE + /* 'maxcombine' */ +*************** +*** 11729,11737 **** + * 'tabstop' value when 'shiftwidth' is zero. + */ + long +! get_sw_value() + { +! return curbuf->b_p_sw ? curbuf->b_p_sw : curbuf->b_p_ts; + } + + /* +--- 11749,11758 ---- + * 'tabstop' value when 'shiftwidth' is zero. + */ + long +! get_sw_value(buf) +! buf_T *buf; + { +! return buf->b_p_sw ? buf->b_p_sw : buf->b_p_ts; + } + + /* +*************** +*** 11741,11747 **** + long + get_sts_value() + { +! return curbuf->b_p_sts < 0 ? get_sw_value() : curbuf->b_p_sts; + } + + /* +--- 11762,11768 ---- + long + get_sts_value() + { +! return curbuf->b_p_sts < 0 ? get_sw_value(curbuf) : curbuf->b_p_sts; + } + + /* +*** ../vim-7.4.068/src/version.c 2013-11-04 04:57:46.000000000 +0100 +--- src/version.c 2013-11-05 04:55:36.000000000 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 69, + /**/ + +-- +A special cleaning ordinance bans housewives from hiding dirt and dust under a +rug in a dwelling. + [real standing law in Pennsylvania, United States of America] + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.070 b/SOURCES/7.4.070 new file mode 100644 index 0000000..749b744 --- /dev/null +++ b/SOURCES/7.4.070 @@ -0,0 +1,47 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.070 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.070 (after 7.4.069) +Problem: Can't compile with tiny features. (Tony Mechelynck) +Solution: Add #ifdef. +Files: src/buffer.c + + +*** ../vim-7.4.069/src/buffer.c 2013-11-05 07:12:59.000000000 +0100 +--- src/buffer.c 2013-11-05 17:37:27.000000000 +0100 +*************** +*** 213,219 **** +--- 213,221 ---- + if (curbuf->b_flags & BF_NEVERLOADED) + { + (void)buf_init_chartab(curbuf, FALSE); ++ #ifdef FEAT_CINDENT + parse_cino(curbuf); ++ #endif + } + + /* +*** ../vim-7.4.069/src/version.c 2013-11-05 07:12:59.000000000 +0100 +--- src/version.c 2013-11-05 17:38:56.000000000 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 70, + /**/ + +-- +No man may purchase alcohol without written consent from his wife. + [real standing law in Pennsylvania, United States of America] + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.071 b/SOURCES/7.4.071 new file mode 100644 index 0000000..71b2984 --- /dev/null +++ b/SOURCES/7.4.071 @@ -0,0 +1,1302 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.071 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.071 (after 7.4.069) +Problem: Passing limits around too often. +Solution: Use limits from buffer. +Files: src/edit.c, src/misc1.c, src/proto/misc1.pro + + +*** ../vim-7.4.070/src/edit.c 2013-11-05 07:12:59.000000000 +0100 +--- src/edit.c 2013-11-06 03:19:10.000000000 +0100 +*************** +*** 7857,7864 **** + if (try_match && keytyped == ':') + { + p = ml_get_curline(); +! if (cin_iscase(p, FALSE) || cin_isscopedecl(p) +! || cin_islabel(30)) + return TRUE; + /* Need to get the line again after cin_islabel(). */ + p = ml_get_curline(); +--- 7857,7863 ---- + if (try_match && keytyped == ':') + { + p = ml_get_curline(); +! if (cin_iscase(p, FALSE) || cin_isscopedecl(p) || cin_islabel()) + return TRUE; + /* Need to get the line again after cin_islabel(). */ + p = ml_get_curline(); +*************** +*** 7868,7874 **** + { + p[curwin->w_cursor.col - 1] = ' '; + i = (cin_iscase(p, FALSE) || cin_isscopedecl(p) +! || cin_islabel(30)); + p = ml_get_curline(); + p[curwin->w_cursor.col - 1] = ':'; + if (i) +--- 7867,7873 ---- + { + p[curwin->w_cursor.col - 1] = ' '; + i = (cin_iscase(p, FALSE) || cin_isscopedecl(p) +! || cin_islabel()); + p = ml_get_curline(); + p[curwin->w_cursor.col - 1] = ':'; + if (i) +*** ../vim-7.4.070/src/misc1.c 2013-11-05 07:12:59.000000000 +0100 +--- src/misc1.c 2013-11-06 03:46:59.000000000 +0100 +*************** +*** 5191,5201 **** +--- 5191,5208 ---- + #if defined(FEAT_CINDENT) || defined(FEAT_SYN_HL) + + static char_u *skip_string __ARGS((char_u *p)); ++ static pos_T *ind_find_start_comment __ARGS((void)); + + /* + * Find the start of a comment, not knowing if we are in a comment right now. + * Search starts at w_cursor.lnum and goes backwards. + */ ++ static pos_T * ++ ind_find_start_comment() /* XXX */ ++ { ++ return find_start_comment(curbuf->b_ind_maxcomment); ++ } ++ + pos_T * + find_start_comment(ind_maxcomment) /* XXX */ + int ind_maxcomment; +*************** +*** 5313,5319 **** + static int cin_isdefault __ARGS((char_u *)); + static char_u *after_label __ARGS((char_u *l)); + static int get_indent_nolabel __ARGS((linenr_T lnum)); +! static int skip_label __ARGS((linenr_T, char_u **pp, int ind_maxcomment)); + static int cin_first_id_amount __ARGS((void)); + static int cin_get_equal_amount __ARGS((linenr_T lnum)); + static int cin_ispreproc __ARGS((char_u *)); +--- 5320,5326 ---- + static int cin_isdefault __ARGS((char_u *)); + static char_u *after_label __ARGS((char_u *l)); + static int get_indent_nolabel __ARGS((linenr_T lnum)); +! static int skip_label __ARGS((linenr_T, char_u **pp)); + static int cin_first_id_amount __ARGS((void)); + static int cin_get_equal_amount __ARGS((linenr_T lnum)); + static int cin_ispreproc __ARGS((char_u *)); +*************** +*** 5322,5345 **** + static int cin_islinecomment __ARGS((char_u *)); + static int cin_isterminated __ARGS((char_u *, int, int)); + static int cin_isinit __ARGS((void)); +! static int cin_isfuncdecl __ARGS((char_u **, linenr_T, linenr_T, int, int)); + static int cin_isif __ARGS((char_u *)); + static int cin_iselse __ARGS((char_u *)); + static int cin_isdo __ARGS((char_u *)); +! static int cin_iswhileofdo __ARGS((char_u *, linenr_T, int)); + static int cin_is_if_for_while_before_offset __ARGS((char_u *line, int *poffset)); +! static int cin_iswhileofdo_end __ARGS((int terminated, int ind_maxparen, int ind_maxcomment)); + static int cin_isbreak __ARGS((char_u *)); + static int cin_is_cpp_baseclass __ARGS((colnr_T *col)); +! static int get_baseclass_amount __ARGS((int col, int ind_maxparen, int ind_maxcomment, int ind_cpp_baseclass)); + static int cin_ends_in __ARGS((char_u *, char_u *, char_u *)); + static int cin_starts_with __ARGS((char_u *s, char *word)); + static int cin_skip2pos __ARGS((pos_T *trypos)); +! static pos_T *find_start_brace __ARGS((int)); +! static pos_T *find_match_paren __ARGS((int, int)); +! static int corr_ind_maxparen __ARGS((int ind_maxparen, pos_T *startpos)); + static int find_last_paren __ARGS((char_u *l, int start, int end)); +! static int find_match __ARGS((int lookfor, linenr_T ourscope, int ind_maxparen, int ind_maxcomment)); + static int cin_is_cpp_namespace __ARGS((char_u *)); + + /* +--- 5329,5352 ---- + static int cin_islinecomment __ARGS((char_u *)); + static int cin_isterminated __ARGS((char_u *, int, int)); + static int cin_isinit __ARGS((void)); +! static int cin_isfuncdecl __ARGS((char_u **, linenr_T, linenr_T)); + static int cin_isif __ARGS((char_u *)); + static int cin_iselse __ARGS((char_u *)); + static int cin_isdo __ARGS((char_u *)); +! static int cin_iswhileofdo __ARGS((char_u *, linenr_T)); + static int cin_is_if_for_while_before_offset __ARGS((char_u *line, int *poffset)); +! static int cin_iswhileofdo_end __ARGS((int terminated)); + static int cin_isbreak __ARGS((char_u *)); + static int cin_is_cpp_baseclass __ARGS((colnr_T *col)); +! static int get_baseclass_amount __ARGS((int col)); + static int cin_ends_in __ARGS((char_u *, char_u *, char_u *)); + static int cin_starts_with __ARGS((char_u *s, char *word)); + static int cin_skip2pos __ARGS((pos_T *trypos)); +! static pos_T *find_start_brace __ARGS((void)); +! static pos_T *find_match_paren __ARGS((int)); +! static int corr_ind_maxparen __ARGS((pos_T *startpos)); + static int find_last_paren __ARGS((char_u *l, int start, int end)); +! static int find_match __ARGS((int lookfor, linenr_T ourscope)); + static int cin_is_cpp_namespace __ARGS((char_u *)); + + /* +*************** +*** 5444,5451 **** + * Note: curwin->w_cursor must be where we are looking for the label. + */ + int +! cin_islabel(ind_maxcomment) /* XXX */ +! int ind_maxcomment; + { + char_u *s; + +--- 5451,5457 ---- + * Note: curwin->w_cursor must be where we are looking for the label. + */ + int +! cin_islabel() /* XXX */ + { + char_u *s; + +*************** +*** 5479,5485 **** + * If we're in a comment now, skip to the start of the comment. + */ + curwin->w_cursor.col = 0; +! if ((trypos = find_start_comment(ind_maxcomment)) != NULL) /* XXX */ + curwin->w_cursor = *trypos; + + line = ml_get_curline(); +--- 5485,5491 ---- + * If we're in a comment now, skip to the start of the comment. + */ + curwin->w_cursor.col = 0; +! if ((trypos = ind_find_start_comment()) != NULL) /* XXX */ + curwin->w_cursor = *trypos; + + line = ml_get_curline(); +*************** +*** 5725,5734 **** + * ^ + */ + static int +! skip_label(lnum, pp, ind_maxcomment) + linenr_T lnum; + char_u **pp; +- int ind_maxcomment; + { + char_u *l; + int amount; +--- 5731,5739 ---- + * ^ + */ + static int +! skip_label(lnum, pp) + linenr_T lnum; + char_u **pp; + { + char_u *l; + int amount; +*************** +*** 5738,5745 **** + curwin->w_cursor.lnum = lnum; + l = ml_get_curline(); + /* XXX */ +! if (cin_iscase(l, FALSE) || cin_isscopedecl(l) +! || cin_islabel(ind_maxcomment)) + { + amount = get_indent_nolabel(lnum); + l = after_label(ml_get_curline()); +--- 5743,5749 ---- + curwin->w_cursor.lnum = lnum; + l = ml_get_curline(); + /* XXX */ +! if (cin_iscase(l, FALSE) || cin_isscopedecl(l) || cin_islabel()) + { + amount = get_indent_nolabel(lnum); + l = after_label(ml_get_curline()); +*************** +*** 5983,5994 **** + * "min_lnum" is the line before which we will not be looking. + */ + static int +! cin_isfuncdecl(sp, first_lnum, min_lnum, ind_maxparen, ind_maxcomment) + char_u **sp; + linenr_T first_lnum; + linenr_T min_lnum; +- int ind_maxparen; +- int ind_maxcomment; + { + char_u *s; + linenr_T lnum = first_lnum; +--- 5987,5996 ---- + * "min_lnum" is the line before which we will not be looking. + */ + static int +! cin_isfuncdecl(sp, first_lnum, min_lnum) + char_u **sp; + linenr_T first_lnum; + linenr_T min_lnum; + { + char_u *s; + linenr_T lnum = first_lnum; +*************** +*** 6002,6008 **** + s = *sp; + + if (find_last_paren(s, '(', ')') +! && (trypos = find_match_paren(ind_maxparen, ind_maxcomment)) != NULL) + { + lnum = trypos->lnum; + if (lnum < min_lnum) +--- 6004,6010 ---- + s = *sp; + + if (find_last_paren(s, '(', ')') +! && (trypos = find_match_paren(curbuf->b_ind_maxparen)) != NULL) + { + lnum = trypos->lnum; + if (lnum < min_lnum) +*************** +*** 6110,6119 **** + * ')' and ';'. The condition may be spread over several lines. + */ + static int +! cin_iswhileofdo(p, lnum, ind_maxparen) /* XXX */ + char_u *p; + linenr_T lnum; +- int ind_maxparen; + { + pos_T cursor_save; + pos_T *trypos; +--- 6112,6120 ---- + * ')' and ';'. The condition may be spread over several lines. + */ + static int +! cin_iswhileofdo(p, lnum) /* XXX */ + char_u *p; + linenr_T lnum; + { + pos_T cursor_save; + pos_T *trypos; +*************** +*** 6133,6139 **** + ++p; + ++curwin->w_cursor.col; + } +! if ((trypos = findmatchlimit(NULL, 0, 0, ind_maxparen)) != NULL + && *cin_skipcomment(ml_get_pos(trypos) + 1) == ';') + retval = TRUE; + curwin->w_cursor = cursor_save; +--- 6134,6141 ---- + ++p; + ++curwin->w_cursor.col; + } +! if ((trypos = findmatchlimit(NULL, 0, 0, +! curbuf->b_ind_maxparen)) != NULL + && *cin_skipcomment(ml_get_pos(trypos) + 1) == ';') + retval = TRUE; + curwin->w_cursor = cursor_save; +*************** +*** 6196,6205 **** + * Adjust the cursor to the line with "while". + */ + static int +! cin_iswhileofdo_end(terminated, ind_maxparen, ind_maxcomment) + int terminated; +- int ind_maxparen; +- int ind_maxcomment; + { + char_u *line; + char_u *p; +--- 6198,6205 ---- + * Adjust the cursor to the line with "while". + */ + static int +! cin_iswhileofdo_end(terminated) + int terminated; + { + char_u *line; + char_u *p; +*************** +*** 6223,6229 **** + * before the matching '('. XXX */ + i = (int)(p - line); + curwin->w_cursor.col = i; +! trypos = find_match_paren(ind_maxparen, ind_maxcomment); + if (trypos != NULL) + { + s = cin_skipcomment(ml_get(trypos->lnum)); +--- 6223,6229 ---- + * before the matching '('. XXX */ + i = (int)(p - line); + curwin->w_cursor.col = i; +! trypos = find_match_paren(curbuf->b_ind_maxparen); + if (trypos != NULL) + { + s = cin_skipcomment(ml_get(trypos->lnum)); +*************** +*** 6415,6425 **** + } + + static int +! get_baseclass_amount(col, ind_maxparen, ind_maxcomment, ind_cpp_baseclass) + int col; +- int ind_maxparen; +- int ind_maxcomment; +- int ind_cpp_baseclass; + { + int amount; + colnr_T vcol; +--- 6415,6422 ---- + } + + static int +! get_baseclass_amount(col) + int col; + { + int amount; + colnr_T vcol; +*************** +*** 6429,6439 **** + { + amount = get_indent(); + if (find_last_paren(ml_get_curline(), '(', ')') +! && (trypos = find_match_paren(ind_maxparen, +! ind_maxcomment)) != NULL) + amount = get_indent_lnum(trypos->lnum); /* XXX */ + if (!cin_ends_in(ml_get_curline(), (char_u *)",", NULL)) +! amount += ind_cpp_baseclass; + } + else + { +--- 6426,6435 ---- + { + amount = get_indent(); + if (find_last_paren(ml_get_curline(), '(', ')') +! && (trypos = find_match_paren(curbuf->b_ind_maxparen)) != NULL) + amount = get_indent_lnum(trypos->lnum); /* XXX */ + if (!cin_ends_in(ml_get_curline(), (char_u *)",", NULL)) +! amount += curbuf->b_ind_cpp_baseclass; + } + else + { +*************** +*** 6441,6448 **** + getvcol(curwin, &curwin->w_cursor, &vcol, NULL, NULL); + amount = (int)vcol; + } +! if (amount < ind_cpp_baseclass) +! amount = ind_cpp_baseclass; + return amount; + } + +--- 6437,6444 ---- + getvcol(curwin, &curwin->w_cursor, &vcol, NULL, NULL); + amount = (int)vcol; + } +! if (amount < curbuf->b_ind_cpp_baseclass) +! amount = curbuf->b_ind_cpp_baseclass; + return amount; + } + +*************** +*** 6526,6533 **** + /* } */ + + static pos_T * +! find_start_brace(ind_maxcomment) /* XXX */ +! int ind_maxcomment; + { + pos_T cursor_save; + pos_T *trypos; +--- 6522,6528 ---- + /* } */ + + static pos_T * +! find_start_brace() /* XXX */ + { + pos_T cursor_save; + pos_T *trypos; +*************** +*** 6543,6549 **** + pos = NULL; + /* ignore the { if it's in a // or / * * / comment */ + if ((colnr_T)cin_skip2pos(trypos) == trypos->col +! && (pos = find_start_comment(ind_maxcomment)) == NULL) /* XXX */ + break; + if (pos != NULL) + curwin->w_cursor.lnum = pos->lnum; +--- 6538,6544 ---- + pos = NULL; + /* ignore the { if it's in a // or / * * / comment */ + if ((colnr_T)cin_skip2pos(trypos) == trypos->col +! && (pos = ind_find_start_comment()) == NULL) /* XXX */ + break; + if (pos != NULL) + curwin->w_cursor.lnum = pos->lnum; +*************** +*** 6557,6565 **** + * Return NULL if no match found. + */ + static pos_T * +! find_match_paren(ind_maxparen, ind_maxcomment) /* XXX */ + int ind_maxparen; +- int ind_maxcomment; + { + pos_T cursor_save; + pos_T *trypos; +--- 6552,6559 ---- + * Return NULL if no match found. + */ + static pos_T * +! find_match_paren(ind_maxparen) /* XXX */ + int ind_maxparen; + { + pos_T cursor_save; + pos_T *trypos; +*************** +*** 6576,6582 **** + pos_copy = *trypos; /* copy trypos, findmatch will change it */ + trypos = &pos_copy; + curwin->w_cursor = *trypos; +! if (find_start_comment(ind_maxcomment) != NULL) /* XXX */ + trypos = NULL; + } + } +--- 6570,6576 ---- + pos_copy = *trypos; /* copy trypos, findmatch will change it */ + trypos = &pos_copy; + curwin->w_cursor = *trypos; +! if (ind_find_start_comment() != NULL) /* XXX */ + trypos = NULL; + } + } +*************** +*** 6591,6605 **** + * looking a few lines further. + */ + static int +! corr_ind_maxparen(ind_maxparen, startpos) +! int ind_maxparen; + pos_T *startpos; + { + long n = (long)startpos->lnum - (long)curwin->w_cursor.lnum; + +! if (n > 0 && n < ind_maxparen / 2) +! return ind_maxparen - (int)n; +! return ind_maxparen; + } + + /* +--- 6585,6598 ---- + * looking a few lines further. + */ + static int +! corr_ind_maxparen(startpos) + pos_T *startpos; + { + long n = (long)startpos->lnum - (long)curwin->w_cursor.lnum; + +! if (n > 0 && n < curbuf->b_ind_maxparen / 2) +! return curbuf->b_ind_maxparen - (int)n; +! return curbuf->b_ind_maxparen; + } + + /* +*************** +*** 6937,6943 **** + + curwin->w_cursor.col = 0; + +! original_line_islabel = cin_islabel(curbuf->b_ind_maxcomment); /* XXX */ + + /* + * #defines and so on always go at the left when included in 'cinkeys'. +--- 6930,6936 ---- + + curwin->w_cursor.col = 0; + +! original_line_islabel = cin_islabel(); /* XXX */ + + /* + * #defines and so on always go at the left when included in 'cinkeys'. +*************** +*** 6973,6979 **** + * comment, try using the 'comments' option. + */ + else if (!cin_iscomment(theline) +! && (trypos = find_start_comment(curbuf->b_ind_maxcomment)) != NULL) + /* XXX */ + { + int lead_start_len = 2; +--- 6966,6972 ---- + * comment, try using the 'comments' option. + */ + else if (!cin_iscomment(theline) +! && (trypos = ind_find_start_comment()) != NULL) + /* XXX */ + { + int lead_start_len = 2; +*************** +*** 7126,7136 **** + /* + * Are we inside parentheses or braces? + */ /* XXX */ +! else if (((trypos = find_match_paren(curbuf->b_ind_maxparen, +! curbuf->b_ind_maxcomment)) != NULL + && curbuf->b_ind_java == 0) +! || (tryposBrace = +! find_start_brace(curbuf->b_ind_maxcomment)) != NULL + || trypos != NULL) + { + if (trypos != NULL && tryposBrace != NULL) +--- 7119,7127 ---- + /* + * Are we inside parentheses or braces? + */ /* XXX */ +! else if (((trypos = find_match_paren(curbuf->b_ind_maxparen)) != NULL + && curbuf->b_ind_java == 0) +! || (tryposBrace = find_start_brace()) != NULL + || trypos != NULL) + { + if (trypos != NULL && tryposBrace != NULL) +*************** +*** 7170,7177 **** + curwin->w_cursor.lnum = lnum; + + /* Skip a comment. XXX */ +! if ((trypos = find_start_comment(curbuf->b_ind_maxcomment)) +! != NULL) + { + lnum = trypos->lnum + 1; + continue; +--- 7161,7167 ---- + curwin->w_cursor.lnum = lnum; + + /* Skip a comment. XXX */ +! if ((trypos = ind_find_start_comment()) != NULL) + { + lnum = trypos->lnum + 1; + continue; +*************** +*** 7179,7186 **** + + /* XXX */ + if ((trypos = find_match_paren( +! corr_ind_maxparen(curbuf->b_ind_maxparen, &cur_curpos), +! curbuf->b_ind_maxcomment)) != NULL + && trypos->lnum == our_paren_pos.lnum + && trypos->col == our_paren_pos.col) + { +--- 7169,7175 ---- + + /* XXX */ + if ((trypos = find_match_paren( +! corr_ind_maxparen(&cur_curpos))) != NULL + && trypos->lnum == our_paren_pos.lnum + && trypos->col == our_paren_pos.col) + { +*************** +*** 7223,7230 **** + curwin->w_cursor.lnum = outermost.lnum; + curwin->w_cursor.col = outermost.col; + +! trypos = find_match_paren(curbuf->b_ind_maxparen, +! curbuf->b_ind_maxcomment); + } while (trypos && trypos->lnum == outermost.lnum); + + curwin->w_cursor = cursor_save; +--- 7212,7218 ---- + curwin->w_cursor.lnum = outermost.lnum; + curwin->w_cursor.col = outermost.col; + +! trypos = find_match_paren(curbuf->b_ind_maxparen); + } while (trypos && trypos->lnum == outermost.lnum); + + curwin->w_cursor = cursor_save; +*************** +*** 7235,7242 **** + cin_is_if_for_while_before_offset(line, &outermost.col); + } + +! amount = skip_label(our_paren_pos.lnum, &look, +! curbuf->b_ind_maxcomment); + look = skipwhite(look); + if (*look == '(') + { +--- 7223,7229 ---- + cin_is_if_for_while_before_offset(line, &outermost.col); + } + +! amount = skip_label(our_paren_pos.lnum, &look); + look = skipwhite(look); + if (*look == '(') + { +*************** +*** 7366,7373 **** + { + curwin->w_cursor.lnum = our_paren_pos.lnum; + curwin->w_cursor.col = col; +! if (find_match_paren(curbuf->b_ind_maxparen, +! curbuf->b_ind_maxcomment) != NULL) + amount += curbuf->b_ind_unclosed2; + else + { +--- 7353,7359 ---- + { + curwin->w_cursor.lnum = our_paren_pos.lnum; + curwin->w_cursor.col = col; +! if (find_match_paren(curbuf->b_ind_maxparen) != NULL) + amount += curbuf->b_ind_unclosed2; + else + { +*************** +*** 7435,7442 **** + */ + lnum = ourscope; + if (find_last_paren(start, '(', ')') +! && (trypos = find_match_paren(curbuf->b_ind_maxparen, +! curbuf->b_ind_maxcomment)) != NULL) + lnum = trypos->lnum; + + /* +--- 7421,7428 ---- + */ + lnum = ourscope; + if (find_last_paren(start, '(', ')') +! && (trypos = find_match_paren(curbuf->b_ind_maxparen)) +! != NULL) + lnum = trypos->lnum; + + /* +*************** +*** 7449,7455 **** + && cin_iscase(skipwhite(ml_get_curline()), FALSE))) + amount = get_indent(); + else +! amount = skip_label(lnum, &l, curbuf->b_ind_maxcomment); + + start_brace = BRACE_AT_END; + } +--- 7435,7441 ---- + && cin_iscase(skipwhite(ml_get_curline()), FALSE))) + amount = get_indent(); + else +! amount = skip_label(lnum, &l); + + start_brace = BRACE_AT_END; + } +*************** +*** 7478,7491 **** + lookfor = LOOKFOR_INITIAL; + if (cin_iselse(theline)) + lookfor = LOOKFOR_IF; +! else if (cin_iswhileofdo(theline, cur_curpos.lnum, +! curbuf->b_ind_maxparen)) /* XXX */ + lookfor = LOOKFOR_DO; + if (lookfor != LOOKFOR_INITIAL) + { + curwin->w_cursor.lnum = cur_curpos.lnum; +! if (find_match(lookfor, ourscope, curbuf->b_ind_maxparen, +! curbuf->b_ind_maxcomment) == OK) + { + amount = get_indent(); /* XXX */ + goto theend; +--- 7464,7475 ---- + lookfor = LOOKFOR_INITIAL; + if (cin_iselse(theline)) + lookfor = LOOKFOR_IF; +! else if (cin_iswhileofdo(theline, cur_curpos.lnum)) /* XXX */ + lookfor = LOOKFOR_DO; + if (lookfor != LOOKFOR_INITIAL) + { + curwin->w_cursor.lnum = cur_curpos.lnum; +! if (find_match(lookfor, ourscope) == OK) + { + amount = get_indent(); /* XXX */ + goto theend; +*************** +*** 7611,7617 **** + * If we're in a comment now, skip to the start of the + * comment. + */ +! trypos = find_start_comment(curbuf->b_ind_maxcomment); + if (trypos != NULL) + { + curwin->w_cursor.lnum = trypos->lnum + 1; +--- 7595,7601 ---- + * If we're in a comment now, skip to the start of the + * comment. + */ +! trypos = ind_find_start_comment(); + if (trypos != NULL) + { + curwin->w_cursor.lnum = trypos->lnum + 1; +*************** +*** 7636,7644 **** + * (it's a variable declaration). + */ + if (start_brace != BRACE_IN_COL0 +! || !cin_isfuncdecl(&l, curwin->w_cursor.lnum, +! 0, curbuf->b_ind_maxparen, +! curbuf->b_ind_maxcomment)) + { + /* if the line is terminated with another ',' + * it is a continued variable initialization. +--- 7620,7626 ---- + * (it's a variable declaration). + */ + if (start_brace != BRACE_IN_COL0 +! || !cin_isfuncdecl(&l, curwin->w_cursor.lnum, 0)) + { + /* if the line is terminated with another ',' + * it is a continued variable initialization. +*************** +*** 7670,7681 **** + trypos = NULL; + if (find_last_paren(l, '(', ')')) + trypos = find_match_paren( +! curbuf->b_ind_maxparen, +! curbuf->b_ind_maxcomment); + + if (trypos == NULL && find_last_paren(l, '{', '}')) +! trypos = find_start_brace( +! curbuf->b_ind_maxcomment); + + if (trypos != NULL) + { +--- 7652,7661 ---- + trypos = NULL; + if (find_last_paren(l, '(', ')')) + trypos = find_match_paren( +! curbuf->b_ind_maxparen); + + if (trypos == NULL && find_last_paren(l, '{', '}')) +! trypos = find_start_brace(); + + if (trypos != NULL) + { +*************** +*** 7733,7740 **** + + /* If we're in a comment now, skip to the start of + * the comment. */ +! trypos = find_start_comment( +! curbuf->b_ind_maxcomment); + if (trypos != NULL) + { + curwin->w_cursor.lnum = trypos->lnum + 1; +--- 7713,7719 ---- + + /* If we're in a comment now, skip to the start of + * the comment. */ +! trypos = ind_find_start_comment(); + if (trypos != NULL) + { + curwin->w_cursor.lnum = trypos->lnum + 1; +*************** +*** 7764,7771 **** + /* + * If we're in a comment now, skip to the start of the comment. + */ /* XXX */ +! if ((trypos = find_start_comment(curbuf->b_ind_maxcomment)) +! != NULL) + { + curwin->w_cursor.lnum = trypos->lnum + 1; + curwin->w_cursor.col = 0; +--- 7743,7749 ---- + /* + * If we're in a comment now, skip to the start of the comment. + */ /* XXX */ +! if ((trypos = ind_find_start_comment()) != NULL) + { + curwin->w_cursor.lnum = trypos->lnum + 1; + curwin->w_cursor.col = 0; +*************** +*** 7819,7826 **** + * Check that this case label is not for another + * switch() + */ /* XXX */ +! if ((trypos = find_start_brace( +! curbuf->b_ind_maxcomment)) == NULL + || trypos->lnum == ourscope) + { + amount = get_indent(); /* XXX */ +--- 7797,7803 ---- + * Check that this case label is not for another + * switch() + */ /* XXX */ +! if ((trypos = find_start_brace()) == NULL + || trypos->lnum == ourscope) + { + amount = get_indent(); /* XXX */ +*************** +*** 7894,7901 **** + */ + if (lookfor == LOOKFOR_CASE || lookfor == LOOKFOR_SCOPEDECL) + { +! if (find_last_paren(l, '{', '}') && (trypos = +! find_start_brace(curbuf->b_ind_maxcomment)) != NULL) + { + curwin->w_cursor.lnum = trypos->lnum + 1; + curwin->w_cursor.col = 0; +--- 7871,7878 ---- + */ + if (lookfor == LOOKFOR_CASE || lookfor == LOOKFOR_SCOPEDECL) + { +! if (find_last_paren(l, '{', '}') +! && (trypos = find_start_brace()) != NULL) + { + curwin->w_cursor.lnum = trypos->lnum + 1; + curwin->w_cursor.col = 0; +*************** +*** 7906,7912 **** + /* + * Ignore jump labels with nothing after them. + */ +! if (!curbuf->b_ind_js && cin_islabel(curbuf->b_ind_maxcomment)) + { + l = after_label(ml_get_curline()); + if (l == NULL || cin_nocode(l)) +--- 7883,7889 ---- + /* + * Ignore jump labels with nothing after them. + */ +! if (!curbuf->b_ind_js && cin_islabel()) + { + l = after_label(ml_get_curline()); + if (l == NULL || cin_nocode(l)) +*************** +*** 7952,7961 **** + } + else + /* XXX */ +! amount = get_baseclass_amount(col, +! curbuf->b_ind_maxparen, +! curbuf->b_ind_maxcomment, +! curbuf->b_ind_cpp_baseclass); + break; + } + else if (lookfor == LOOKFOR_CPP_BASECLASS) +--- 7929,7935 ---- + } + else + /* XXX */ +! amount = get_baseclass_amount(col); + break; + } + else if (lookfor == LOOKFOR_CPP_BASECLASS) +*************** +*** 7997,8005 **** + * matching it will take us back to the start of the line. + */ + (void)find_last_paren(l, '(', ')'); +! trypos = find_match_paren( +! corr_ind_maxparen(curbuf->b_ind_maxparen, +! &cur_curpos), curbuf->b_ind_maxcomment); + + /* + * If we are looking for ',', we also look for matching +--- 7971,7977 ---- + * matching it will take us back to the start of the line. + */ + (void)find_last_paren(l, '(', ')'); +! trypos = find_match_paren(corr_ind_maxparen(&cur_curpos)); + + /* + * If we are looking for ',', we also look for matching +*************** +*** 8007,8013 **** + */ + if (trypos == NULL && terminated == ',' + && find_last_paren(l, '{', '}')) +! trypos = find_start_brace(curbuf->b_ind_maxcomment); + + if (trypos != NULL) + { +--- 7979,7985 ---- + */ + if (trypos == NULL && terminated == ',' + && find_last_paren(l, '{', '}')) +! trypos = find_start_brace(); + + if (trypos != NULL) + { +*************** +*** 8051,8058 **** + * ignoring any jump label. XXX + */ + if (!curbuf->b_ind_js) +! cur_amount = skip_label(curwin->w_cursor.lnum, +! &l, curbuf->b_ind_maxcomment); + else + cur_amount = get_indent(); + /* +--- 8023,8029 ---- + * ignoring any jump label. XXX + */ + if (!curbuf->b_ind_js) +! cur_amount = skip_label(curwin->w_cursor.lnum, &l); + else + cur_amount = get_indent(); + /* +*************** +*** 8162,8172 **** + curwin->w_cursor.col = + (colnr_T)(l - ml_get_curline()) + 1; + +! if ((trypos = find_start_brace( +! curbuf->b_ind_maxcomment)) == NULL +! || find_match(LOOKFOR_IF, trypos->lnum, +! curbuf->b_ind_maxparen, +! curbuf->b_ind_maxcomment) == FAIL) + break; + } + } +--- 8133,8141 ---- + curwin->w_cursor.col = + (colnr_T)(l - ml_get_curline()) + 1; + +! if ((trypos = find_start_brace()) == NULL +! || find_match(LOOKFOR_IF, trypos->lnum) +! == FAIL) + break; + } + } +*************** +*** 8261,8268 **** + * If so: Ignore until the matching "do". + */ + /* XXX */ +! else if (cin_iswhileofdo_end(terminated, curbuf->b_ind_maxparen, +! curbuf->b_ind_maxcomment)) + { + /* + * Found an unterminated line after a while ();, line up +--- 8230,8236 ---- + * If so: Ignore until the matching "do". + */ + /* XXX */ +! else if (cin_iswhileofdo_end(terminated)) + { + /* + * Found an unterminated line after a while ();, line up +*************** +*** 8380,8387 **** + l = ml_get_curline(); + if (find_last_paren(l, '(', ')') + && (trypos = find_match_paren( +! curbuf->b_ind_maxparen, +! curbuf->b_ind_maxcomment)) != NULL) + { + /* + * Check if we are on a case label now. This is +--- 8348,8354 ---- + l = ml_get_curline(); + if (find_last_paren(l, '(', ')') + && (trypos = find_match_paren( +! curbuf->b_ind_maxparen)) != NULL) + { + /* + * Check if we are on a case label now. This is +*************** +*** 8415,8422 **** + * Get indent and pointer to text for current line, + * ignoring any jump label. + */ +! amount = skip_label(curwin->w_cursor.lnum, +! &l, curbuf->b_ind_maxcomment); + + if (theline[0] == '{') + amount += curbuf->b_ind_open_extra; +--- 8382,8388 ---- + * Get indent and pointer to text for current line, + * ignoring any jump label. + */ +! amount = skip_label(curwin->w_cursor.lnum, &l); + + if (theline[0] == '{') + amount += curbuf->b_ind_open_extra; +*************** +*** 8439,8449 **** + && cin_iselse(l) + && whilelevel == 0) + { +! if ((trypos = find_start_brace( +! curbuf->b_ind_maxcomment)) == NULL +! || find_match(LOOKFOR_IF, trypos->lnum, +! curbuf->b_ind_maxparen, +! curbuf->b_ind_maxcomment) == FAIL) + break; + continue; + } +--- 8405,8413 ---- + && cin_iselse(l) + && whilelevel == 0) + { +! if ((trypos = find_start_brace()) == NULL +! || find_match(LOOKFOR_IF, trypos->lnum) +! == FAIL) + break; + continue; + } +*************** +*** 8453,8461 **** + * that block. + */ + l = ml_get_curline(); +! if (find_last_paren(l, '{', '}') +! && (trypos = find_start_brace( +! curbuf->b_ind_maxcomment)) != NULL) /* XXX */ + { + curwin->w_cursor = *trypos; + /* if not "else {" check for terminated again */ +--- 8417,8424 ---- + * that block. + */ + l = ml_get_curline(); +! if (find_last_paren(l, '{', '}') /* XXX */ +! && (trypos = find_start_brace()) != NULL) + { + curwin->w_cursor = *trypos; + /* if not "else {" check for terminated again */ +*************** +*** 8516,8524 **** + && !cin_ends_in(theline, (char_u *)":", NULL) + && !cin_ends_in(theline, (char_u *)",", NULL) + && cin_isfuncdecl(NULL, cur_curpos.lnum + 1, +! cur_curpos.lnum + 1, +! curbuf->b_ind_maxparen, +! curbuf->b_ind_maxcomment) + && !cin_isterminated(theline, FALSE, TRUE)) + { + amount = curbuf->b_ind_func_type; +--- 8479,8485 ---- + && !cin_ends_in(theline, (char_u *)":", NULL) + && !cin_ends_in(theline, (char_u *)",", NULL) + && cin_isfuncdecl(NULL, cur_curpos.lnum + 1, +! cur_curpos.lnum + 1) + && !cin_isterminated(theline, FALSE, TRUE)) + { + amount = curbuf->b_ind_func_type; +*************** +*** 8540,8547 **** + /* + * If we're in a comment now, skip to the start of the comment. + */ /* XXX */ +! if ((trypos = find_start_comment( +! curbuf->b_ind_maxcomment)) != NULL) + { + curwin->w_cursor.lnum = trypos->lnum + 1; + curwin->w_cursor.col = 0; +--- 8501,8507 ---- + /* + * If we're in a comment now, skip to the start of the comment. + */ /* XXX */ +! if ((trypos = ind_find_start_comment()) != NULL) + { + curwin->w_cursor.lnum = trypos->lnum + 1; + curwin->w_cursor.col = 0; +*************** +*** 8561,8569 **** + if (n) + { + /* XXX */ +! amount = get_baseclass_amount(col, curbuf->b_ind_maxparen, +! curbuf->b_ind_maxcomment, +! curbuf->b_ind_cpp_baseclass); + break; + } + +--- 8521,8527 ---- + if (n) + { + /* XXX */ +! amount = get_baseclass_amount(col); + break; + } + +*************** +*** 8595,8602 **** + /* take us back to opening paren */ + if (find_last_paren(l, '(', ')') + && (trypos = find_match_paren( +! curbuf->b_ind_maxparen, +! curbuf->b_ind_maxcomment)) != NULL) + curwin->w_cursor = *trypos; + + /* For a line ending in ',' that is a continuation line go +--- 8553,8559 ---- + /* take us back to opening paren */ + if (find_last_paren(l, '(', ')') + && (trypos = find_match_paren( +! curbuf->b_ind_maxparen)) != NULL) + curwin->w_cursor = *trypos; + + /* For a line ending in ',' that is a continuation line go +*************** +*** 8627,8635 **** + * If the line looks like a function declaration, and we're + * not in a comment, put it the left margin. + */ +! if (cin_isfuncdecl(NULL, cur_curpos.lnum, 0, +! curbuf->b_ind_maxparen, +! curbuf->b_ind_maxcomment)) /* XXX */ + break; + l = ml_get_curline(); + +--- 8584,8590 ---- + * If the line looks like a function declaration, and we're + * not in a comment, put it the left margin. + */ +! if (cin_isfuncdecl(NULL, cur_curpos.lnum, 0)) /* XXX */ + break; + l = ml_get_curline(); + +*************** +*** 8677,8685 **** + * line (and the ones that follow) needs to be indented as + * parameters. + */ +! if (cin_isfuncdecl(&l, curwin->w_cursor.lnum, 0, +! curbuf->b_ind_maxparen, +! curbuf->b_ind_maxcomment)) + { + amount = curbuf->b_ind_param; + break; +--- 8632,8638 ---- + * line (and the ones that follow) needs to be indented as + * parameters. + */ +! if (cin_isfuncdecl(&l, curwin->w_cursor.lnum, 0)) + { + amount = curbuf->b_ind_param; + break; +*************** +*** 8710,8717 **** + */ + find_last_paren(l, '(', ')'); + +! if ((trypos = find_match_paren(curbuf->b_ind_maxparen, +! curbuf->b_ind_maxcomment)) != NULL) + curwin->w_cursor = *trypos; + amount = get_indent(); /* XXX */ + break; +--- 8663,8669 ---- + */ + find_last_paren(l, '(', ')'); + +! if ((trypos = find_match_paren(curbuf->b_ind_maxparen)) != NULL) + curwin->w_cursor = *trypos; + amount = get_indent(); /* XXX */ + break; +*************** +*** 8754,8764 **** + } + + static int +! find_match(lookfor, ourscope, ind_maxparen, ind_maxcomment) + int lookfor; + linenr_T ourscope; +- int ind_maxparen; +- int ind_maxcomment; + { + char_u *look; + pos_T *theirscope; +--- 8706,8714 ---- + } + + static int +! find_match(lookfor, ourscope) + int lookfor; + linenr_T ourscope; + { + char_u *look; + pos_T *theirscope; +*************** +*** 8788,8800 **** + if (cin_iselse(look) + || cin_isif(look) + || cin_isdo(look) /* XXX */ +! || cin_iswhileofdo(look, curwin->w_cursor.lnum, ind_maxparen)) + { + /* + * if we've gone outside the braces entirely, + * we must be out of scope... + */ +! theirscope = find_start_brace(ind_maxcomment); /* XXX */ + if (theirscope == NULL) + break; + +--- 8738,8750 ---- + if (cin_iselse(look) + || cin_isif(look) + || cin_isdo(look) /* XXX */ +! || cin_iswhileofdo(look, curwin->w_cursor.lnum)) + { + /* + * if we've gone outside the braces entirely, + * we must be out of scope... + */ +! theirscope = find_start_brace(); /* XXX */ + if (theirscope == NULL) + break; + +*************** +*** 8832,8838 **** + * if it was a "while" then we need to go back to + * another "do", so increment whilelevel. XXX + */ +! if (cin_iswhileofdo(look, curwin->w_cursor.lnum, ind_maxparen)) + { + ++whilelevel; + continue; +--- 8782,8788 ---- + * if it was a "while" then we need to go back to + * another "do", so increment whilelevel. XXX + */ +! if (cin_iswhileofdo(look, curwin->w_cursor.lnum)) + { + ++whilelevel; + continue; +*** ../vim-7.4.070/src/proto/misc1.pro 2013-11-05 07:12:59.000000000 +0100 +--- src/proto/misc1.pro 2013-11-06 03:19:45.000000000 +0100 +*************** +*** 81,87 **** + char_u *FullName_save __ARGS((char_u *fname, int force)); + pos_T *find_start_comment __ARGS((int ind_maxcomment)); + void do_c_expr_indent __ARGS((void)); +! int cin_islabel __ARGS((int ind_maxcomment)); + int cin_iscase __ARGS((char_u *s, int strict)); + int cin_isscopedecl __ARGS((char_u *s)); + void parse_cino __ARGS((buf_T *buf)); +--- 81,87 ---- + char_u *FullName_save __ARGS((char_u *fname, int force)); + pos_T *find_start_comment __ARGS((int ind_maxcomment)); + void do_c_expr_indent __ARGS((void)); +! int cin_islabel __ARGS((void)); + int cin_iscase __ARGS((char_u *s, int strict)); + int cin_isscopedecl __ARGS((char_u *s)); + void parse_cino __ARGS((buf_T *buf)); +*** ../vim-7.4.070/src/version.c 2013-11-05 17:40:47.000000000 +0100 +--- src/version.c 2013-11-06 03:43:44.000000000 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 71, + /**/ + +-- +A law to reduce crime states: "It is mandatory for a motorist with criminal +intentions to stop at the city limits and telephone the chief of police as he +is entering the town. + [real standing law in Washington, United States of America] + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.072 b/SOURCES/7.4.072 new file mode 100644 index 0000000..e96888e --- /dev/null +++ b/SOURCES/7.4.072 @@ -0,0 +1,61 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.072 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.072 +Problem: Crash when using Insert mode completion. +Solution: Avoid going past the end of pum_array. (idea by Fransisco Lopes) +Files: src/popupmnu.c + + +*** ../vim-7.4.071/src/popupmnu.c 2011-08-17 18:04:28.000000000 +0200 +--- src/popupmnu.c 2013-11-02 04:01:06.000000000 +0100 +*************** +*** 282,287 **** +--- 282,291 ---- + int round; + int n; + ++ /* Never display more than we have */ ++ if (pum_first > pum_size - pum_height) ++ pum_first = pum_size - pum_height; ++ + if (pum_scrollbar) + { + thumb_heigth = pum_height * pum_height / pum_size; +*************** +*** 672,681 **** + #endif + } + +- /* Never display more than we have */ +- if (pum_first > pum_size - pum_height) +- pum_first = pum_size - pum_height; +- + if (!resized) + pum_redraw(); + +--- 676,681 ---- +*** ../vim-7.4.071/src/version.c 2013-11-06 04:01:31.000000000 +0100 +--- src/version.c 2013-11-06 04:03:18.000000000 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 72, + /**/ + +-- +No children may attend school with their breath smelling of "wild onions." + [real standing law in West Virginia, United States of America] + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.073 b/SOURCES/7.4.073 new file mode 100644 index 0000000..7d9cedc --- /dev/null +++ b/SOURCES/7.4.073 @@ -0,0 +1,404 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.073 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.073 +Problem: Setting undolevels for one buffer changes undo in another. +Solution: Make 'undolevels' a global-local option. (Christian Brabandt) +Files: runtime/doc/options.txt, src/buffer.c, src/option.c, src/option.h + src/structs.h, src/undo.c + + +*** ../vim-7.4.072/runtime/doc/options.txt 2013-08-10 13:24:57.000000000 +0200 +--- runtime/doc/options.txt 2013-11-06 04:18:43.000000000 +0100 +*************** +*** 7594,7600 **** + *'undolevels'* *'ul'* + 'undolevels' 'ul' number (default 100, 1000 for Unix, VMS, + Win32 and OS/2) +! global + {not in Vi} + Maximum number of changes that can be undone. Since undo information + is kept in memory, higher numbers will cause more memory to be used +--- 7594,7600 ---- + *'undolevels'* *'ul'* + 'undolevels' 'ul' number (default 100, 1000 for Unix, VMS, + Win32 and OS/2) +! global or local to buffer |global-local| + {not in Vi} + Maximum number of changes that can be undone. Since undo information + is kept in memory, higher numbers will cause more memory to be used +*************** +*** 7605,7612 **** + < But you can also get Vi compatibility by including the 'u' flag in + 'cpoptions', and still be able to use CTRL-R to repeat undo. + Also see |undo-two-ways|. +! Set to a negative number for no undo at all: > +! set ul=-1 + < This helps when you run out of memory for a single change. + Also see |clear-undo|. + +--- 7605,7613 ---- + < But you can also get Vi compatibility by including the 'u' flag in + 'cpoptions', and still be able to use CTRL-R to repeat undo. + Also see |undo-two-ways|. +! Set to -1 for no undo at all. You might want to do this only for the +! current buffer: > +! setlocal ul=-1 + < This helps when you run out of memory for a single change. + Also see |clear-undo|. + +*** ../vim-7.4.072/src/buffer.c 2013-11-05 17:40:47.000000000 +0100 +--- src/buffer.c 2013-11-06 04:25:27.000000000 +0100 +*************** +*** 1949,1954 **** +--- 1949,1955 ---- + clear_string_option(&buf->b_p_qe); + #endif + buf->b_p_ar = -1; ++ buf->b_p_ul = NO_LOCAL_UNDOLEVEL; + } + + /* +*** ../vim-7.4.072/src/option.c 2013-11-05 07:12:59.000000000 +0100 +--- src/option.c 2013-11-06 04:34:23.000000000 +0100 +*************** +*** 234,239 **** +--- 234,240 ---- + #ifdef FEAT_STL_OPT + # define PV_STL OPT_BOTH(OPT_WIN(WV_STL)) + #endif ++ #define PV_UL OPT_BOTH(OPT_BUF(BV_UL)) + #ifdef FEAT_WINDOWS + # define PV_WFH OPT_WIN(WV_WFH) + #endif +*************** +*** 2683,2689 **** + #endif + {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, + {"undolevels", "ul", P_NUM|P_VI_DEF, +! (char_u *)&p_ul, PV_NONE, + { + #if defined(UNIX) || defined(WIN3264) || defined(OS2) || defined(VMS) + (char_u *)1000L, +--- 2684,2690 ---- + #endif + {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, + {"undolevels", "ul", P_NUM|P_VI_DEF, +! (char_u *)&p_ul, PV_UL, + { + #if defined(UNIX) || defined(WIN3264) || defined(OS2) || defined(VMS) + (char_u *)1000L, +*************** +*** 3313,3318 **** +--- 3314,3320 ---- + + curbuf->b_p_initialized = TRUE; + curbuf->b_p_ar = -1; /* no local 'autoread' value */ ++ curbuf->b_p_ul = NO_LOCAL_UNDOLEVEL; + check_buf_options(curbuf); + check_win_options(curwin); + check_options(); +*************** +*** 4512,4519 **** + ((flags & P_VI_DEF) || cp_val) + ? VI_DEFAULT : VIM_DEFAULT]; + else if (nextchar == '<') +! value = *(long *)get_varp_scope(&(options[opt_idx]), +! OPT_GLOBAL); + else if (((long *)varp == &p_wc + || (long *)varp == &p_wcm) + && (*arg == '<' +--- 4514,4529 ---- + ((flags & P_VI_DEF) || cp_val) + ? VI_DEFAULT : VIM_DEFAULT]; + else if (nextchar == '<') +! { +! /* For 'undolevels' NO_LOCAL_UNDOLEVEL means to +! * use the global value. */ +! if ((long *)varp == &curbuf->b_p_ul +! && opt_flags == OPT_LOCAL) +! value = NO_LOCAL_UNDOLEVEL; +! else +! value = *(long *)get_varp_scope( +! &(options[opt_idx]), OPT_GLOBAL); +! } + else if (((long *)varp == &p_wc + || (long *)varp == &p_wcm) + && (*arg == '<' +*************** +*** 8487,8492 **** +--- 8497,8509 ---- + u_sync(TRUE); + p_ul = value; + } ++ else if (pp == &curbuf->b_p_ul) ++ { ++ /* use the old value, otherwise u_sync() may not work properly */ ++ curbuf->b_p_ul = old_value; ++ u_sync(TRUE); ++ curbuf->b_p_ul = value; ++ } + + #ifdef FEAT_LINEBREAK + /* 'numberwidth' must be positive */ +*************** +*** 9720,9726 **** + /* + * Unset local option value, similar to ":set opt<". + */ +- + void + unset_global_local_option(name, from) + char_u *name; +--- 9737,9742 ---- +*************** +*** 9793,9798 **** +--- 9809,9817 ---- + clear_string_option(&((win_T *)from)->w_p_stl); + break; + #endif ++ case PV_UL: ++ buf->b_p_ul = NO_LOCAL_UNDOLEVEL; ++ break; + } + } + +*************** +*** 9841,9846 **** +--- 9860,9866 ---- + #ifdef FEAT_STL_OPT + case PV_STL: return (char_u *)&(curwin->w_p_stl); + #endif ++ case PV_UL: return (char_u *)&(curbuf->b_p_ul); + } + return NULL; /* "cannot happen" */ + } +*************** +*** 9905,9910 **** +--- 9925,9932 ---- + case PV_STL: return *curwin->w_p_stl != NUL + ? (char_u *)&(curwin->w_p_stl) : p->var; + #endif ++ case PV_UL: return curbuf->b_p_ul != NO_LOCAL_UNDOLEVEL ++ ? (char_u *)&(curbuf->b_p_ul) : p->var; + + #ifdef FEAT_ARABIC + case PV_ARAB: return (char_u *)&(curwin->w_p_arab); +*************** +*** 10445,10450 **** +--- 10467,10473 ---- + /* options that are normally global but also have a local value + * are not copied, start using the global value */ + buf->b_p_ar = -1; ++ buf->b_p_ul = NO_LOCAL_UNDOLEVEL; + #ifdef FEAT_QUICKFIX + buf->b_p_gp = empty_option; + buf->b_p_mp = empty_option; +*** ../vim-7.4.072/src/option.h 2013-06-26 18:41:39.000000000 +0200 +--- src/option.h 2013-11-06 04:17:40.000000000 +0100 +*************** +*** 1031,1036 **** +--- 1031,1037 ---- + , BV_TW + , BV_TX + , BV_UDF ++ , BV_UL + , BV_WM + , BV_COUNT /* must be the last one */ + }; +*************** +*** 1109,1111 **** +--- 1110,1115 ---- + , WV_WRAP + , WV_COUNT /* must be the last one */ + }; ++ ++ /* Value for b_p_ul indicating the global value must be used. */ ++ #define NO_LOCAL_UNDOLEVEL -123456 +*** ../vim-7.4.072/src/structs.h 2013-11-05 07:12:59.000000000 +0100 +--- src/structs.h 2013-11-06 04:26:17.000000000 +0100 +*************** +*** 1627,1632 **** +--- 1627,1633 ---- + char_u *b_p_dict; /* 'dictionary' local value */ + char_u *b_p_tsr; /* 'thesaurus' local value */ + #endif ++ long b_p_ul; /* 'undolevels' local value */ + #ifdef FEAT_PERSISTENT_UNDO + int b_p_udf; /* 'undofile' */ + #endif +*** ../vim-7.4.072/src/undo.c 2013-09-08 15:40:45.000000000 +0200 +--- src/undo.c 2013-11-06 04:33:12.000000000 +0100 +*************** +*** 83,88 **** +--- 83,89 ---- + + #include "vim.h" + ++ static long get_undolevel __ARGS((void)); + static void u_unch_branch __ARGS((u_header_T *uhp)); + static u_entry_T *u_get_headentry __ARGS((void)); + static void u_getbot __ARGS((void)); +*************** +*** 336,341 **** +--- 337,353 ---- + } + + /* ++ * Get the undolevle value for the current buffer. ++ */ ++ static long ++ get_undolevel() ++ { ++ if (curbuf->b_p_ul == NO_LOCAL_UNDOLEVEL) ++ return p_ul; ++ return curbuf->b_p_ul; ++ } ++ ++ /* + * Common code for various ways to save text before a change. + * "top" is the line above the first changed line. + * "bot" is the line below the last changed line. +*************** +*** 419,425 **** + curbuf->b_new_change = TRUE; + #endif + +! if (p_ul >= 0) + { + /* + * Make a new header entry. Do this first so that we don't mess +--- 431,437 ---- + curbuf->b_new_change = TRUE; + #endif + +! if (get_undolevel() >= 0) + { + /* + * Make a new header entry. Do this first so that we don't mess +*************** +*** 449,455 **** + /* + * free headers to keep the size right + */ +! while (curbuf->b_u_numhead > p_ul && curbuf->b_u_oldhead != NULL) + { + u_header_T *uhfree = curbuf->b_u_oldhead; + +--- 461,468 ---- + /* + * free headers to keep the size right + */ +! while (curbuf->b_u_numhead > get_undolevel() +! && curbuf->b_u_oldhead != NULL) + { + u_header_T *uhfree = curbuf->b_u_oldhead; + +*************** +*** 530,536 **** + } + else + { +! if (p_ul < 0) /* no undo at all */ + return OK; + + /* +--- 543,549 ---- + } + else + { +! if (get_undolevel() < 0) /* no undo at all */ + return OK; + + /* +*************** +*** 1972,1978 **** + { + if (curbuf->b_u_curhead == NULL) /* first undo */ + curbuf->b_u_curhead = curbuf->b_u_newhead; +! else if (p_ul > 0) /* multi level undo */ + /* get next undo */ + curbuf->b_u_curhead = curbuf->b_u_curhead->uh_next.ptr; + /* nothing to undo */ +--- 1985,1991 ---- + { + if (curbuf->b_u_curhead == NULL) /* first undo */ + curbuf->b_u_curhead = curbuf->b_u_newhead; +! else if (get_undolevel() > 0) /* multi level undo */ + /* get next undo */ + curbuf->b_u_curhead = curbuf->b_u_curhead->uh_next.ptr; + /* nothing to undo */ +*************** +*** 1993,1999 **** + } + else + { +! if (curbuf->b_u_curhead == NULL || p_ul <= 0) + { + beep_flush(); /* nothing to redo */ + if (count == startcount - 1) +--- 2006,2012 ---- + } + else + { +! if (curbuf->b_u_curhead == NULL || get_undolevel() <= 0) + { + beep_flush(); /* nothing to redo */ + if (count == startcount - 1) +*************** +*** 2751,2757 **** + if (im_is_preediting()) + return; /* XIM is busy, don't break an undo sequence */ + #endif +! if (p_ul < 0) + curbuf->b_u_synced = TRUE; /* no entries, nothing to do */ + else + { +--- 2764,2770 ---- + if (im_is_preediting()) + return; /* XIM is busy, don't break an undo sequence */ + #endif +! if (get_undolevel() < 0) + curbuf->b_u_synced = TRUE; /* no entries, nothing to do */ + else + { +*************** +*** 2911,2917 **** + } + if (!curbuf->b_u_synced) + return; /* already unsynced */ +! if (p_ul < 0) + return; /* no entries, nothing to do */ + else + { +--- 2924,2930 ---- + } + if (!curbuf->b_u_synced) + return; /* already unsynced */ +! if (get_undolevel() < 0) + return; /* no entries, nothing to do */ + else + { +*** ../vim-7.4.072/src/version.c 2013-11-06 04:04:29.000000000 +0100 +--- src/version.c 2013-11-06 05:21:43.000000000 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 73, + /**/ + +-- +Living on Earth includes an annual free trip around the Sun. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.074 b/SOURCES/7.4.074 new file mode 100644 index 0000000..70045c0 --- /dev/null +++ b/SOURCES/7.4.074 @@ -0,0 +1,67 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.074 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.074 +Problem: When undo'ing all changes and creating a new change the undo + structure is incorrect. (Christian Brabandt) +Solution: When deleting the branch starting at the old header, delete the + whole branch, not just the first entry. +Files: src/undo.c + + +*** ../vim-7.4.073/src/undo.c 2013-11-06 05:26:08.000000000 +0100 +--- src/undo.c 2013-11-07 03:01:42.000000000 +0100 +*************** +*** 3121,3127 **** + * all the pointers. */ + if (uhp == buf->b_u_oldhead) + { +! u_freeheader(buf, uhp, uhpp); + return; + } + +--- 3121,3128 ---- + * all the pointers. */ + if (uhp == buf->b_u_oldhead) + { +! while (buf->b_u_oldhead != NULL) +! u_freeheader(buf, buf->b_u_oldhead, uhpp); + return; + } + +*** ../vim-7.4.073/src/version.c 2013-11-06 05:26:08.000000000 +0100 +--- src/version.c 2013-11-07 03:03:02.000000000 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 74, + /**/ + +-- +LETTERS TO THE EDITOR (The Times of London) + +Dear Sir, + +I am firmly opposed to the spread of microchips either to the home or +to the office.  We have more than enough of them foisted upon us in +public places.  They are a disgusting Americanism, and can only result +in the farmers being forced to grow smaller potatoes, which in turn +will cause massive unemployment in the already severely depressed +agricultural industry. + +Yours faithfully, +        Capt. Quinton D'Arcy, J. P. +        Sevenoaks + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.075 b/SOURCES/7.4.075 new file mode 100644 index 0000000..f7ba21e --- /dev/null +++ b/SOURCES/7.4.075 @@ -0,0 +1,290 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.075 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.075 +Problem: Locally setting 'undolevels' is not tested. +Solution: Add a test. (Christian Brabandt) +Files: src/testdir/test100.in, src/testdir/test100.ok, + src/testdir/Make_amiga.mak, src/testdir/Make_dos.mak, + src/testdir/Make_ming.mak, src/testdir/Make_os2.mak, + src/testdir/Make_vms.mms, src/testdir/Makefile, src/Makefile + + +*** ../vim-7.4.074/src/testdir/test100.in 2013-11-07 03:24:56.000000000 +0100 +--- src/testdir/test100.in 2013-11-07 03:20:32.000000000 +0100 +*************** +*** 0 **** +--- 1,42 ---- ++ Tests for 'undolevel' setting being global-local ++ ++ STARTTEST ++ :so small.vim ++ :set nocompatible viminfo+=nviminfo ul=5 ++ :fu! FillBuffer() ++ :for i in range(1,13) ++ :put=i ++ :exe "setg ul=" . &g:ul ++ :endfor ++ :endfu ++ :fu! UndoLevel() ++ :redir @a | setglobal undolevels? | echon ' global' | setlocal undolevels? | echon ' local' |redir end ++ :$put a ++ :endfu ++ :new one ++ :0put ='ONE: expecting global undolevels: 5, local undolevels: -123456 (default)' ++ :call FillBuffer() ++ :call feedkeys(":earlier 10\n", 't') ++ :call UndoLevel() ++ :%w! test.out ++ :new two ++ :0put ='TWO: expecting global undolevels: 5, local undolevels: 2 (first) then 10 (afterwards)' ++ :setlocal ul=2 ++ :call FillBuffer() ++ :call feedkeys(":earlier 10\n", 't') ++ :call UndoLevel() ++ :setlocal ul=10 ++ :call UndoLevel() ++ :%w >> test.out ++ :wincmd p ++ :redir >>test.out | echo "global value shouldn't be changed and still be 5!" | echo 'ONE: expecting global undolevels: 5, local undolevels: -123456 (default)'|:setglobal undolevels? | echon ' global' | setlocal undolevels? | echon ' local' |echo "" |redir end ++ :new three ++ :setglobal ul=50 ++ :1put ='global value should be changed to 50' ++ :2put ='THREE: expecting global undolevels: 50, local undolevels: -123456 (default)' ++ :call UndoLevel() ++ :%w >> test.out ++ :"sleep 10 ++ :qa! ++ ENDTEST ++ +*** ../vim-7.4.074/src/testdir/test100.ok 2013-11-07 03:24:56.000000000 +0100 +--- src/testdir/test100.ok 2013-11-07 03:11:51.000000000 +0100 +*************** +*** 0 **** +--- 1,41 ---- ++ ONE: expecting global undolevels: 5, local undolevels: -123456 (default) ++ 1 ++ 2 ++ 3 ++ 4 ++ 5 ++ 6 ++ 7 ++ ++ ++ undolevels=5 global ++ undolevels=-123456 local ++ TWO: expecting global undolevels: 5, local undolevels: 2 (first) then 10 (afterwards) ++ 1 ++ 2 ++ 3 ++ 4 ++ 5 ++ 6 ++ 7 ++ 8 ++ 9 ++ 10 ++ ++ ++ undolevels=5 global ++ undolevels=2 local ++ ++ undolevels=5 global ++ undolevels=10 local ++ ++ global value shouldn't be changed and still be 5! ++ ONE: expecting global undolevels: 5, local undolevels: -123456 (default) ++ undolevels=5 global ++ undolevels=-123456 local ++ ++ global value should be changed to 50 ++ THREE: expecting global undolevels: 50, local undolevels: -123456 (default) ++ ++ undolevels=50 global ++ undolevels=-123456 local +*** ../vim-7.4.074/src/testdir/Make_amiga.mak 2013-09-19 17:00:14.000000000 +0200 +--- src/testdir/Make_amiga.mak 2013-11-07 03:07:57.000000000 +0100 +*************** +*** 34,40 **** + test81.out test82.out test83.out test84.out test88.out \ + test89.out test90.out test91.out test92.out test93.out \ + test94.out test95.out test96.out test97.out test98.out \ +! test99.out + + .SUFFIXES: .in .out + +--- 34,40 ---- + test81.out test82.out test83.out test84.out test88.out \ + test89.out test90.out test91.out test92.out test93.out \ + test94.out test95.out test96.out test97.out test98.out \ +! test99.out test100.out + + .SUFFIXES: .in .out + +*************** +*** 150,152 **** +--- 150,153 ---- + test97.out: test97.in + test98.out: test98.in + test99.out: test99.in ++ test100.out: test100.in +*** ../vim-7.4.074/src/testdir/Make_dos.mak 2013-09-19 17:00:14.000000000 +0200 +--- src/testdir/Make_dos.mak 2013-11-07 03:08:05.000000000 +0100 +*************** +*** 32,38 **** + test79.out test80.out test81.out test82.out test83.out \ + test84.out test85.out test86.out test87.out test88.out \ + test89.out test90.out test91.out test92.out test93.out \ +! test94.out test95.out test96.out test98.out test99.out + + SCRIPTS32 = test50.out test70.out + +--- 32,39 ---- + test79.out test80.out test81.out test82.out test83.out \ + test84.out test85.out test86.out test87.out test88.out \ + test89.out test90.out test91.out test92.out test93.out \ +! test94.out test95.out test96.out test98.out test99.out \ +! test100.out + + SCRIPTS32 = test50.out test70.out + +*** ../vim-7.4.074/src/testdir/Make_ming.mak 2013-09-19 17:00:14.000000000 +0200 +--- src/testdir/Make_ming.mak 2013-11-07 03:08:12.000000000 +0100 +*************** +*** 52,58 **** + test79.out test80.out test81.out test82.out test83.out \ + test84.out test85.out test86.out test87.out test88.out \ + test89.out test90.out test91.out test92.out test93.out \ +! test94.out test95.out test96.out test98.out test99.out + + SCRIPTS32 = test50.out test70.out + +--- 52,59 ---- + test79.out test80.out test81.out test82.out test83.out \ + test84.out test85.out test86.out test87.out test88.out \ + test89.out test90.out test91.out test92.out test93.out \ +! test94.out test95.out test96.out test98.out test99.out \ +! test100out + + SCRIPTS32 = test50.out test70.out + +*** ../vim-7.4.074/src/testdir/Make_os2.mak 2013-09-19 17:00:14.000000000 +0200 +--- src/testdir/Make_os2.mak 2013-11-07 03:08:18.000000000 +0100 +*************** +*** 34,40 **** + test76.out test77.out test78.out test79.out test80.out \ + test81.out test82.out test83.out test84.out test88.out \ + test89.out test90.out test91.out test92.out test93.out \ +! test94.out test95.out test96.out test98.out test99.out + + .SUFFIXES: .in .out + +--- 34,41 ---- + test76.out test77.out test78.out test79.out test80.out \ + test81.out test82.out test83.out test84.out test88.out \ + test89.out test90.out test91.out test92.out test93.out \ +! test94.out test95.out test96.out test98.out test99.out \ +! test100.out + + .SUFFIXES: .in .out + +*** ../vim-7.4.074/src/testdir/Make_vms.mms 2013-09-19 17:00:14.000000000 +0200 +--- src/testdir/Make_vms.mms 2013-11-07 03:08:24.000000000 +0100 +*************** +*** 4,10 **** + # Authors: Zoltan Arpadffy, + # Sandor Kopanyi, + # +! # Last change: 2013 Sep 19 + # + # This has been tested on VMS 6.2 to 8.3 on DEC Alpha, VAX and IA64. + # Edit the lines in the Configuration section below to select. +--- 4,10 ---- + # Authors: Zoltan Arpadffy, + # Sandor Kopanyi, + # +! # Last change: 2013 Nov 07 + # + # This has been tested on VMS 6.2 to 8.3 on DEC Alpha, VAX and IA64. + # Edit the lines in the Configuration section below to select. +*************** +*** 78,84 **** + test77.out test78.out test79.out test80.out test81.out \ + test82.out test83.out test84.out test88.out test89.out \ + test90.out test91.out test92.out test93.out test94.out \ +! test95.out test96.out test97.out test98.out test99.out + + # Known problems: + # Test 30: a problem around mac format - unknown reason +--- 78,85 ---- + test77.out test78.out test79.out test80.out test81.out \ + test82.out test83.out test84.out test88.out test89.out \ + test90.out test91.out test92.out test93.out test94.out \ +! test95.out test96.out test97.out test98.out test99.out \ +! test100.out + + # Known problems: + # Test 30: a problem around mac format - unknown reason +*** ../vim-7.4.074/src/testdir/Makefile 2013-09-22 15:03:34.000000000 +0200 +--- src/testdir/Makefile 2013-11-07 03:08:31.000000000 +0100 +*************** +*** 30,36 **** + test84.out test85.out test86.out test87.out test88.out \ + test89.out test90.out test91.out test92.out test93.out \ + test94.out test95.out test96.out test97.out test98.out \ +! test99.out + + SCRIPTS_GUI = test16.out + +--- 30,36 ---- + test84.out test85.out test86.out test87.out test88.out \ + test89.out test90.out test91.out test92.out test93.out \ + test94.out test95.out test96.out test97.out test98.out \ +! test99.out test100.out + + SCRIPTS_GUI = test16.out + +*** ../vim-7.4.074/src/Makefile 2013-08-10 14:21:15.000000000 +0200 +--- src/Makefile 2013-11-07 03:10:40.000000000 +0100 +*************** +*** 1882,1888 **** + test60 test61 test62 test63 test64 test65 test66 test67 test68 test69 \ + test70 test71 test72 test73 test74 test75 test76 test77 test78 test79 \ + test80 test81 test82 test83 test84 test85 test86 test87 test88 test89 \ +! test90 test91 test92 test93 test94 test95 test96 test97 test98 test99: + cd testdir; rm $@.out; $(MAKE) -f Makefile $@.out VIMPROG=../$(VIMTARGET) + + testclean: +--- 1883,1890 ---- + test60 test61 test62 test63 test64 test65 test66 test67 test68 test69 \ + test70 test71 test72 test73 test74 test75 test76 test77 test78 test79 \ + test80 test81 test82 test83 test84 test85 test86 test87 test88 test89 \ +! test90 test91 test92 test93 test94 test95 test96 test97 test98 test99 \ +! test100 test101 test102 test103 test104 test105 test106 test107: + cd testdir; rm $@.out; $(MAKE) -f Makefile $@.out VIMPROG=../$(VIMTARGET) + + testclean: +*** ../vim-7.4.074/src/version.c 2013-11-07 03:04:06.000000000 +0100 +--- src/version.c 2013-11-07 03:10:10.000000000 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 75, + /**/ + +-- +Why is "abbreviation" such a long word? + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.076 b/SOURCES/7.4.076 new file mode 100644 index 0000000..fa9abbc --- /dev/null +++ b/SOURCES/7.4.076 @@ -0,0 +1,66 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.076 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.076 +Problem: "cgn" does not wrap around the end of the file. (Dimitrov + Dimitrov) +Solution: Restore 'wrapscan' earlier. (Christian Brabandt) +Files: src/search.c + + +*** ../vim-7.4.075/src/search.c 2013-10-02 21:54:57.000000000 +0200 +--- src/search.c 2013-11-07 04:38:46.000000000 +0100 +*************** +*** 4592,4598 **** + ml_get(curwin->w_buffer->b_ml.ml_line_count)); + } + } +! + } + + start_pos = pos; +--- 4592,4598 ---- + ml_get(curwin->w_buffer->b_ml.ml_line_count)); + } + } +! p_ws = old_p_ws; + } + + start_pos = pos; +*************** +*** 4607,4613 **** + if (!VIsual_active) + VIsual = start_pos; + +- p_ws = old_p_ws; + curwin->w_cursor = pos; + VIsual_active = TRUE; + VIsual_mode = 'v'; +--- 4607,4612 ---- +*** ../vim-7.4.075/src/version.c 2013-11-07 03:25:51.000000000 +0100 +--- src/version.c 2013-11-07 04:44:44.000000000 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 76, + /**/ + +-- +INSPECTOR END OF FILM: Move along. There's nothing to see! Keep moving! + [Suddenly he notices the cameras.] +INSPECTOR END OF FILM: (to Camera) All right, put that away sonny. + [He walks over to it and puts his hand over the lens.] + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.077 b/SOURCES/7.4.077 new file mode 100644 index 0000000..fd2d3d7 --- /dev/null +++ b/SOURCES/7.4.077 @@ -0,0 +1,63 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.077 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.077 +Problem: DOS installer creates shortcut without a path, resulting in the + current directory to be C:\Windows\system32. +Solution: Use environment variables. +Files: src/dosinst.c + + +*** ../vim-7.4.076/src/dosinst.c 2013-05-06 04:06:04.000000000 +0200 +--- src/dosinst.c 2013-11-06 18:18:47.000000000 +0100 +*************** +*** 1773,1781 **** + + /* + * We used to use "homedir" as the working directory, but that is a bad choice +! * on multi-user systems. Not specifying a directory appears to work best. + */ +! #define WORKDIR "" + + /* + * Create shortcut(s) in the Start Menu\Programs\Vim folder. +--- 1773,1783 ---- + + /* + * We used to use "homedir" as the working directory, but that is a bad choice +! * on multi-user systems. However, not specifying a directory results in the +! * current directory to be c:\Windows\system32 on Windows 7. Use environment +! * variables instead. + */ +! #define WORKDIR "%HOMEDRIVE%%HOMEPATH%" + + /* + * Create shortcut(s) in the Start Menu\Programs\Vim folder. +*** ../vim-7.4.076/src/version.c 2013-11-07 04:46:43.000000000 +0100 +--- src/version.c 2013-11-07 04:47:42.000000000 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 77, + /**/ + +-- +JOHN CLEESE PLAYED: SECOND SOLDIER WITH A KEEN INTEREST IN BIRDS, LARGE MAN + WITH DEAD BODY, BLACK KNIGHT, MR NEWT (A VILLAGE + BLACKSMITH INTERESTED IN BURNING WITCHES), A QUITE + EXTRAORDINARILY RUDE FRENCHMAN, TIM THE WIZARD, SIR + LAUNCELOT + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.078 b/SOURCES/7.4.078 new file mode 100644 index 0000000..56b5076 --- /dev/null +++ b/SOURCES/7.4.078 @@ -0,0 +1,114 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.078 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.078 +Problem: MSVC 2013 is not supported. +Solution: Recognize and support MSVC 2013. (Ed Brown) +Files: src/Make_mvc.mak + + +*** ../vim-7.4.077/src/Make_mvc.mak 2013-07-09 13:13:12.000000000 +0200 +--- src/Make_mvc.mak 2013-11-08 03:12:48.000000000 +0100 +*************** +*** 424,429 **** +--- 424,432 ---- + !if "$(_NMAKE_VER)" == "11.00.60610.1" + MSVCVER = 11.0 + !endif ++ !if "$(_NMAKE_VER)" == "12.00.21005.1" ++ MSVCVER = 12.0 ++ !endif + !endif + + # Abort building VIM if version of VC is unrecognised. +*************** +*** 438,444 **** + !endif + + # Convert processor ID to MVC-compatible number +! !if ("$(MSVCVER)" != "8.0") && ("$(MSVCVER)" != "9.0") && ("$(MSVCVER)" != "10.0") && ("$(MSVCVER)" != "11.0") + !if "$(CPUNR)" == "i386" + CPUARG = /G3 + !elseif "$(CPUNR)" == "i486" +--- 441,447 ---- + !endif + + # Convert processor ID to MVC-compatible number +! !if ("$(MSVCVER)" != "8.0") && ("$(MSVCVER)" != "9.0") && ("$(MSVCVER)" != "10.0") && ("$(MSVCVER)" != "11.0") && ("$(MSVCVER)" != "12.0") + !if "$(CPUNR)" == "i386" + CPUARG = /G3 + !elseif "$(CPUNR)" == "i486" +*************** +*** 472,478 **** + OPTFLAG = /Ox + !endif + +! !if ("$(MSVCVER)" == "8.0") || ("$(MSVCVER)" == "9.0") || ("$(MSVCVER)" == "10.0") || ("$(MSVCVER)" == "11.0") + # Use link time code generation if not worried about size + !if "$(OPTIMIZE)" != "SPACE" + OPTFLAG = $(OPTFLAG) /GL +--- 475,481 ---- + OPTFLAG = /Ox + !endif + +! !if ("$(MSVCVER)" == "8.0") || ("$(MSVCVER)" == "9.0") || ("$(MSVCVER)" == "10.0") || ("$(MSVCVER)" == "11.0") || ("$(MSVCVER)" == "12.0") + # Use link time code generation if not worried about size + !if "$(OPTIMIZE)" != "SPACE" + OPTFLAG = $(OPTFLAG) /GL +*************** +*** 485,491 **** + !endif + + # Static code analysis generally available starting with VS2012 +! !if ("$(ANALYZE)" == "yes") && ("$(MSVCVER)" == "11.0") + CFLAGS=$(CFLAGS) /analyze + !endif + +--- 488,494 ---- + !endif + + # Static code analysis generally available starting with VS2012 +! !if ("$(ANALYZE)" == "yes") && ("$(MSVCVER)" == "11.0") && ("$(MSVCVER)" == "12.0") + CFLAGS=$(CFLAGS) /analyze + !endif + +*************** +*** 943,949 **** + + # Report link time code generation progress if used. + !ifdef NODEBUG +! !if ("$(MSVCVER)" == "8.0") || ("$(MSVCVER)" == "9.0") || ("$(MSVCVER)" == "10.0") || ("$(MSVCVER)" == "11.0") + !if "$(OPTIMIZE)" != "SPACE" + LINKARGS1 = $(LINKARGS1) /LTCG:STATUS + !endif +--- 946,952 ---- + + # Report link time code generation progress if used. + !ifdef NODEBUG +! !if ("$(MSVCVER)" == "8.0") || ("$(MSVCVER)" == "9.0") || ("$(MSVCVER)" == "10.0") || ("$(MSVCVER)" == "11.0") || ("$(MSVCVER)" == "12.0") + !if "$(OPTIMIZE)" != "SPACE" + LINKARGS1 = $(LINKARGS1) /LTCG:STATUS + !endif +*** ../vim-7.4.077/src/version.c 2013-11-07 04:49:23.000000000 +0100 +--- src/version.c 2013-11-08 03:13:56.000000000 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 78, + /**/ + +-- +Every time I lose weight, it finds me again! + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.079 b/SOURCES/7.4.079 new file mode 100644 index 0000000..fbda97d --- /dev/null +++ b/SOURCES/7.4.079 @@ -0,0 +1,470 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.079 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.079 +Problem: A script cannot detect whether 'hlsearch' highlighting is actually + displayed. +Solution: Add the "v:hlsearch" variable. (ZyX) +Files: src/runtime/doc/eval.txt, src/eval.c, src/ex_docmd.c, + src/option.c, src/screen.c, src/search.c, src/tag.c, src/vim.h, + src/testdir/test101.in, src/testdir/test101.ok, + src/testdir/Make_amiga.mak, src/testdir/Make_dos.mak, + src/testdir/Make_ming.mak, src/testdir/Make_os2.mak, + src/testdir/Make_vms.mms, src/testdir/Makefile + + +diff: ../vim-7.4.078/src/runtime/doc/eval.txt: No such file or directory +diff: src/runtime/doc/eval.txt: No such file or directory +*** ../vim-7.4.078/src/eval.c 2013-11-05 07:12:59.000000000 +0100 +--- src/eval.c 2013-11-08 04:11:46.000000000 +0100 +*************** +*** 356,361 **** +--- 356,362 ---- + {VV_NAME("mouse_col", VAR_NUMBER), 0}, + {VV_NAME("operator", VAR_STRING), VV_RO}, + {VV_NAME("searchforward", VAR_NUMBER), 0}, ++ {VV_NAME("hlsearch", VAR_NUMBER), 0}, + {VV_NAME("oldfiles", VAR_LIST), 0}, + {VV_NAME("windowid", VAR_NUMBER), VV_RO}, + }; +*************** +*** 871,876 **** +--- 872,878 ---- + hash_add(&compat_hashtab, p->vv_di.di_key); + } + set_vim_var_nr(VV_SEARCHFORWARD, 1L); ++ set_vim_var_nr(VV_HLSEARCH, 1L); + set_reg_var(0); /* default for v:register is not 0 but '"' */ + + #ifdef EBCDIC +*************** +*** 20613,20618 **** +--- 20615,20627 ---- + v->di_tv.vval.v_number = get_tv_number(tv); + if (STRCMP(varname, "searchforward") == 0) + set_search_direction(v->di_tv.vval.v_number ? '/' : '?'); ++ #ifdef FEAT_SEARCH_EXTRA ++ else if (STRCMP(varname, "hlsearch") == 0) ++ { ++ no_hlsearch = !v->di_tv.vval.v_number; ++ redraw_all_later(SOME_VALID); ++ } ++ #endif + } + return; + } +*** ../vim-7.4.078/src/ex_docmd.c 2013-07-24 15:09:37.000000000 +0200 +--- src/ex_docmd.c 2013-11-08 04:17:01.000000000 +0100 +*************** +*** 11389,11395 **** + ex_nohlsearch(eap) + exarg_T *eap UNUSED; + { +! no_hlsearch = TRUE; + redraw_all_later(SOME_VALID); + } + +--- 11389,11395 ---- + ex_nohlsearch(eap) + exarg_T *eap UNUSED; + { +! SET_NO_HLSEARCH(TRUE); + redraw_all_later(SOME_VALID); + } + +*** ../vim-7.4.078/src/option.c 2013-11-06 05:26:08.000000000 +0100 +--- src/option.c 2013-11-08 04:17:32.000000000 +0100 +*************** +*** 7811,7817 **** + /* when 'hlsearch' is set or reset: reset no_hlsearch */ + else if ((int *)varp == &p_hls) + { +! no_hlsearch = FALSE; + } + #endif + +--- 7811,7817 ---- + /* when 'hlsearch' is set or reset: reset no_hlsearch */ + else if ((int *)varp == &p_hls) + { +! SET_NO_HLSEARCH(FALSE); + } + #endif + +*** ../vim-7.4.078/src/screen.c 2013-07-13 12:23:00.000000000 +0200 +--- src/screen.c 2013-11-08 04:17:48.000000000 +0100 +*************** +*** 7447,7453 **** + { + /* don't free regprog in the match list, it's a copy */ + vim_regfree(shl->rm.regprog); +! no_hlsearch = TRUE; + } + shl->rm.regprog = NULL; + shl->lnum = 0; +--- 7447,7453 ---- + { + /* don't free regprog in the match list, it's a copy */ + vim_regfree(shl->rm.regprog); +! SET_NO_HLSEARCH(TRUE); + } + shl->rm.regprog = NULL; + shl->lnum = 0; +*** ../vim-7.4.078/src/search.c 2013-11-07 04:46:43.000000000 +0100 +--- src/search.c 2013-11-08 04:18:57.000000000 +0100 +*************** +*** 289,295 **** + /* If 'hlsearch' set and search pat changed: need redraw. */ + if (p_hls) + redraw_all_later(SOME_VALID); +! no_hlsearch = FALSE; + #endif + } + } +--- 289,295 ---- + /* If 'hlsearch' set and search pat changed: need redraw. */ + if (p_hls) + redraw_all_later(SOME_VALID); +! SET_NO_HLSEARCH(FALSE); + #endif + } + } +*************** +*** 333,339 **** + spats[1] = saved_spats[1]; + last_idx = saved_last_idx; + # ifdef FEAT_SEARCH_EXTRA +! no_hlsearch = saved_no_hlsearch; + # endif + } + } +--- 333,339 ---- + spats[1] = saved_spats[1]; + last_idx = saved_last_idx; + # ifdef FEAT_SEARCH_EXTRA +! SET_NO_HLSEARCH(saved_no_hlsearch); + # endif + } + } +*************** +*** 1148,1154 **** + if (no_hlsearch && !(options & SEARCH_KEEP)) + { + redraw_all_later(SOME_VALID); +! no_hlsearch = FALSE; + } + #endif + +--- 1148,1154 ---- + if (no_hlsearch && !(options & SEARCH_KEEP)) + { + redraw_all_later(SOME_VALID); +! SET_NO_HLSEARCH(FALSE); + } + #endif + +*************** +*** 5561,5567 **** + spats[idx].off.off = off; + #ifdef FEAT_SEARCH_EXTRA + if (setlast) +! no_hlsearch = !hlsearch_on; + #endif + } + } +--- 5561,5569 ---- + spats[idx].off.off = off; + #ifdef FEAT_SEARCH_EXTRA + if (setlast) +! { +! SET_NO_HLSEARCH(!hlsearch_on); +! } + #endif + } + } +*** ../vim-7.4.078/src/tag.c 2013-09-05 12:06:26.000000000 +0200 +--- src/tag.c 2013-11-08 04:19:14.000000000 +0100 +*************** +*** 3330,3336 **** + #ifdef FEAT_SEARCH_EXTRA + /* restore no_hlsearch when keeping the old search pattern */ + if (search_options) +! no_hlsearch = save_no_hlsearch; + #endif + + /* Return OK if jumped to another file (at least we found the file!). */ +--- 3330,3338 ---- + #ifdef FEAT_SEARCH_EXTRA + /* restore no_hlsearch when keeping the old search pattern */ + if (search_options) +! { +! SET_NO_HLSEARCH(save_no_hlsearch); +! } + #endif + + /* Return OK if jumped to another file (at least we found the file!). */ +*** ../vim-7.4.078/src/vim.h 2013-08-02 16:02:27.000000000 +0200 +--- src/vim.h 2013-11-08 04:16:57.000000000 +0100 +*************** +*** 1864,1872 **** + #define VV_MOUSE_COL 51 + #define VV_OP 52 + #define VV_SEARCHFORWARD 53 +! #define VV_OLDFILES 54 +! #define VV_WINDOWID 55 +! #define VV_LEN 56 /* number of v: vars */ + + #ifdef FEAT_CLIPBOARD + +--- 1864,1873 ---- + #define VV_MOUSE_COL 51 + #define VV_OP 52 + #define VV_SEARCHFORWARD 53 +! #define VV_HLSEARCH 54 +! #define VV_OLDFILES 55 +! #define VV_WINDOWID 56 +! #define VV_LEN 57 /* number of v: vars */ + + #ifdef FEAT_CLIPBOARD + +*************** +*** 2246,2249 **** +--- 2247,2256 ---- + /* Character used as separated in autoload function/variable names. */ + #define AUTOLOAD_CHAR '#' + ++ #ifdef FEAT_EVAL ++ # define SET_NO_HLSEARCH(flag) no_hlsearch = (flag); set_vim_var_nr(VV_HLSEARCH, !no_hlsearch) ++ #else ++ # define SET_NO_HLSEARCH(flag) no_hlsearch = (flag) ++ #endif ++ + #endif /* VIM__H */ +*** ../vim-7.4.078/src/testdir/test101.in 2013-11-08 04:28:49.000000000 +0100 +--- src/testdir/test101.in 2013-11-08 04:11:46.000000000 +0100 +*************** +*** 0 **** +--- 1,45 ---- ++ Test for v:hlsearch vim: set ft=vim : ++ ++ STARTTEST ++ :" Last abc: Q ++ :so small.vim ++ :new ++ :call setline(1, repeat(['aaa'], 10)) ++ :set hlsearch nolazyredraw ++ :let r=[] ++ :command -nargs=0 -bar AddR :call add(r, [screenattr(1, 1), v:hlsearch]) ++ /aaa ++ :AddR ++ :nohlsearch ++ :AddR ++ :let v:hlsearch=1 ++ :AddR ++ :let v:hlsearch=0 ++ :AddR ++ :set hlsearch ++ :AddR ++ :let v:hlsearch=0 ++ :AddR ++ n:AddR ++ :let v:hlsearch=0 ++ :AddR ++ / ++ :AddR ++ :let r1=r[0][0] ++ :" I guess it is not guaranteed that screenattr outputs always the same character ++ :call map(r, 'v:val[1].":".(v:val[0]==r1?"highlighted":"not highlighted")') ++ :try ++ : let v:hlsearch=[] ++ :catch ++ : call add(r, matchstr(v:exception,'^Vim(let):E\d\+:')) ++ :endtry ++ :bwipeout! ++ :$put=r ++ :call garbagecollect(1) ++ :" ++ :/^start:/,$wq! test.out ++ :" vim: et ts=4 isk-=\: ++ :call getchar() ++ ENDTEST ++ ++ start: +*** ../vim-7.4.078/src/testdir/test101.ok 2013-11-08 04:28:49.000000000 +0100 +--- src/testdir/test101.ok 2013-11-08 04:11:46.000000000 +0100 +*************** +*** 0 **** +--- 1,11 ---- ++ start: ++ 1:highlighted ++ 0:not highlighted ++ 1:highlighted ++ 0:not highlighted ++ 1:highlighted ++ 0:not highlighted ++ 1:highlighted ++ 0:not highlighted ++ 1:highlighted ++ Vim(let):E706: +*** ../vim-7.4.078/src/testdir/Make_amiga.mak 2013-11-07 03:25:51.000000000 +0100 +--- src/testdir/Make_amiga.mak 2013-11-08 04:22:13.000000000 +0100 +*************** +*** 34,40 **** + test81.out test82.out test83.out test84.out test88.out \ + test89.out test90.out test91.out test92.out test93.out \ + test94.out test95.out test96.out test97.out test98.out \ +! test99.out test100.out + + .SUFFIXES: .in .out + +--- 34,40 ---- + test81.out test82.out test83.out test84.out test88.out \ + test89.out test90.out test91.out test92.out test93.out \ + test94.out test95.out test96.out test97.out test98.out \ +! test99.out test100.out test101.out + + .SUFFIXES: .in .out + +*************** +*** 151,153 **** +--- 151,154 ---- + test98.out: test98.in + test99.out: test99.in + test100.out: test100.in ++ test101.out: test101.in +*** ../vim-7.4.078/src/testdir/Make_dos.mak 2013-11-07 03:25:51.000000000 +0100 +--- src/testdir/Make_dos.mak 2013-11-08 04:22:17.000000000 +0100 +*************** +*** 33,39 **** + test84.out test85.out test86.out test87.out test88.out \ + test89.out test90.out test91.out test92.out test93.out \ + test94.out test95.out test96.out test98.out test99.out \ +! test100.out + + SCRIPTS32 = test50.out test70.out + +--- 33,39 ---- + test84.out test85.out test86.out test87.out test88.out \ + test89.out test90.out test91.out test92.out test93.out \ + test94.out test95.out test96.out test98.out test99.out \ +! test100.out test101.out + + SCRIPTS32 = test50.out test70.out + +*** ../vim-7.4.078/src/testdir/Make_ming.mak 2013-11-07 03:25:51.000000000 +0100 +--- src/testdir/Make_ming.mak 2013-11-08 04:22:19.000000000 +0100 +*************** +*** 53,59 **** + test84.out test85.out test86.out test87.out test88.out \ + test89.out test90.out test91.out test92.out test93.out \ + test94.out test95.out test96.out test98.out test99.out \ +! test100out + + SCRIPTS32 = test50.out test70.out + +--- 53,59 ---- + test84.out test85.out test86.out test87.out test88.out \ + test89.out test90.out test91.out test92.out test93.out \ + test94.out test95.out test96.out test98.out test99.out \ +! test100out test101.out + + SCRIPTS32 = test50.out test70.out + +*** ../vim-7.4.078/src/testdir/Make_os2.mak 2013-11-07 03:25:51.000000000 +0100 +--- src/testdir/Make_os2.mak 2013-11-08 04:22:21.000000000 +0100 +*************** +*** 35,41 **** + test81.out test82.out test83.out test84.out test88.out \ + test89.out test90.out test91.out test92.out test93.out \ + test94.out test95.out test96.out test98.out test99.out \ +! test100.out + + .SUFFIXES: .in .out + +--- 35,41 ---- + test81.out test82.out test83.out test84.out test88.out \ + test89.out test90.out test91.out test92.out test93.out \ + test94.out test95.out test96.out test98.out test99.out \ +! test100.out test101.out + + .SUFFIXES: .in .out + +*** ../vim-7.4.078/src/testdir/Make_vms.mms 2013-11-07 03:25:51.000000000 +0100 +--- src/testdir/Make_vms.mms 2013-11-08 04:22:23.000000000 +0100 +*************** +*** 4,10 **** + # Authors: Zoltan Arpadffy, + # Sandor Kopanyi, + # +! # Last change: 2013 Nov 07 + # + # This has been tested on VMS 6.2 to 8.3 on DEC Alpha, VAX and IA64. + # Edit the lines in the Configuration section below to select. +--- 4,10 ---- + # Authors: Zoltan Arpadffy, + # Sandor Kopanyi, + # +! # Last change: 2013 Nov 08 + # + # This has been tested on VMS 6.2 to 8.3 on DEC Alpha, VAX and IA64. + # Edit the lines in the Configuration section below to select. +*************** +*** 79,85 **** + test82.out test83.out test84.out test88.out test89.out \ + test90.out test91.out test92.out test93.out test94.out \ + test95.out test96.out test97.out test98.out test99.out \ +! test100.out + + # Known problems: + # Test 30: a problem around mac format - unknown reason +--- 79,85 ---- + test82.out test83.out test84.out test88.out test89.out \ + test90.out test91.out test92.out test93.out test94.out \ + test95.out test96.out test97.out test98.out test99.out \ +! test100.out test101.out + + # Known problems: + # Test 30: a problem around mac format - unknown reason +*** ../vim-7.4.078/src/testdir/Makefile 2013-11-07 03:25:51.000000000 +0100 +--- src/testdir/Makefile 2013-11-08 04:22:26.000000000 +0100 +*************** +*** 30,36 **** + test84.out test85.out test86.out test87.out test88.out \ + test89.out test90.out test91.out test92.out test93.out \ + test94.out test95.out test96.out test97.out test98.out \ +! test99.out test100.out + + SCRIPTS_GUI = test16.out + +--- 30,36 ---- + test84.out test85.out test86.out test87.out test88.out \ + test89.out test90.out test91.out test92.out test93.out \ + test94.out test95.out test96.out test97.out test98.out \ +! test99.out test100.out test101.out + + SCRIPTS_GUI = test16.out + +*** ../vim-7.4.078/src/version.c 2013-11-08 03:15:39.000000000 +0100 +--- src/version.c 2013-11-08 04:11:08.000000000 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 79, + /**/ + +-- +Corn oil comes from corn and olive oil comes from olives, so where +does baby oil come from? + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.080 b/SOURCES/7.4.080 new file mode 100644 index 0000000..eeec1de --- /dev/null +++ b/SOURCES/7.4.080 @@ -0,0 +1,52 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.080 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.080 (after 7.4.079) +Problem: Missing documentation for v:hlsearch. +Solution: Include the right file in the patch. +Files: runtime/doc/eval.txt + + +*** ../vim-7.4.079/runtime/doc/eval.txt 2013-11-02 23:29:17.000000000 +0100 +--- runtime/doc/eval.txt 2013-11-08 04:20:27.000000000 +0100 +*************** +*** 1454,1459 **** +--- 1455,1467 ---- + v:foldstart Used for 'foldtext': first line of closed fold. + Read-only in the |sandbox|. |fold-foldtext| + ++ *v:hlsearch* *hlsearch-variable* ++ v:hlsearch Variable that determines whether search highlighting is on. ++ Makes sense only if 'hlsearch' is enabled which requires ++ |+extra_search|. Setting this variable to zero acts the like ++ |:nohlsearch| command, setting it to one acts like > ++ let &hlsearch = &hlsearch ++ < + *v:insertmode* *insertmode-variable* + v:insertmode Used for the |InsertEnter| and |InsertChange| autocommand + events. Values: +*** ../vim-7.4.079/src/version.c 2013-11-08 04:30:06.000000000 +0100 +--- src/version.c 2013-11-09 01:42:56.000000000 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 80, + /**/ + +-- +The chat program is in public domain. This is not the GNU public license. +If it breaks then you get to keep both pieces. + -- Copyright notice for the chat program + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.081 b/SOURCES/7.4.081 new file mode 100644 index 0000000..b2c61d9 --- /dev/null +++ b/SOURCES/7.4.081 @@ -0,0 +1,52 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.081 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.081 (after 7.4.078) +Problem: Wrong logic when ANALYZE is "yes". +Solution: Use or instead of and. (KF Leong) +Files: src/Make_mvc.mak + + +*** ../vim-7.4.080/src/Make_mvc.mak 2013-11-08 03:15:39.000000000 +0100 +--- src/Make_mvc.mak 2013-11-08 18:02:54.000000000 +0100 +*************** +*** 488,494 **** + !endif + + # Static code analysis generally available starting with VS2012 +! !if ("$(ANALYZE)" == "yes") && ("$(MSVCVER)" == "11.0") && ("$(MSVCVER)" == "12.0") + CFLAGS=$(CFLAGS) /analyze + !endif + +--- 488,494 ---- + !endif + + # Static code analysis generally available starting with VS2012 +! !if ("$(ANALYZE)" == "yes") && (("$(MSVCVER)" == "10.0") || ("$(MSVCVER)" == "11.0") || ("$(MSVCVER)" == "12.0")) + CFLAGS=$(CFLAGS) /analyze + !endif + +*** ../vim-7.4.080/src/version.c 2013-11-09 01:44:38.000000000 +0100 +--- src/version.c 2013-11-09 02:31:34.000000000 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 81, + /**/ + +-- +Wi n0t trei a h0liday in Sweden thi yer? + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.082 b/SOURCES/7.4.082 new file mode 100644 index 0000000..03089d6 --- /dev/null +++ b/SOURCES/7.4.082 @@ -0,0 +1,344 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.082 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.082 +Problem: Using "gf" in a changed buffer suggests adding "!", which is not + possible. (Tim Chase) +Solution: Pass a flag to check_changed() wether adding ! make sense. +Files: src/vim.h, src/ex_cmds2.c, src/proto/ex_cmds2.pro, src/globals.h, + src/ex_cmds.c, src/ex_docmd.c + + +*** ../vim-7.4.081/src/vim.h 2013-11-08 04:30:06.000000000 +0100 +--- src/vim.h 2013-11-09 03:00:00.000000000 +0100 +*************** +*** 1176,1181 **** +--- 1176,1190 ---- + #define RESIZE_BOTH 15 /* resize in both directions */ + + /* ++ * flags for check_changed() ++ */ ++ #define CCGD_AW 1 /* do autowrite if buffer was changed */ ++ #define CCGD_MULTWIN 2 /* check also when several wins for the buf */ ++ #define CCGD_FORCEIT 4 /* ! used */ ++ #define CCGD_ALLBUF 8 /* may write all buffers */ ++ #define CCGD_EXCMD 16 /* may suggest using ! */ ++ ++ /* + * "flags" values for option-setting functions. + * When OPT_GLOBAL and OPT_LOCAL are both missing, set both local and global + * values, get local value. +*** ../vim-7.4.081/src/ex_cmds2.c 2013-06-28 20:14:53.000000000 +0200 +--- src/ex_cmds2.c 2013-11-09 03:14:44.000000000 +0100 +*************** +*** 1436,1455 **** + } + + /* +! * return TRUE if buffer was changed and cannot be abandoned. + */ + int +! check_changed(buf, checkaw, mult_win, forceit, allbuf) + buf_T *buf; +! int checkaw; /* do autowrite if buffer was changed */ +! int mult_win; /* check also when several wins for the buf */ +! int forceit; +! int allbuf UNUSED; /* may write all buffers */ + { + if ( !forceit + && bufIsChanged(buf) +! && (mult_win || buf->b_nwindows <= 1) +! && (!checkaw || autowrite(buf, forceit) == FAIL)) + { + #if defined(FEAT_GUI_DIALOG) || defined(FEAT_CON_DIALOG) + if ((p_confirm || cmdmod.confirm) && p_write) +--- 1436,1455 ---- + } + + /* +! * Return TRUE if buffer was changed and cannot be abandoned. +! * For flags use the CCGD_ values. + */ + int +! check_changed(buf, flags) + buf_T *buf; +! int flags; + { ++ int forceit = (flags & CCGD_FORCEIT); ++ + if ( !forceit + && bufIsChanged(buf) +! && ((flags & CCGD_MULTWIN) || buf->b_nwindows <= 1) +! && (!(flags & CCGD_AW) || autowrite(buf, forceit) == FAIL)) + { + #if defined(FEAT_GUI_DIALOG) || defined(FEAT_CON_DIALOG) + if ((p_confirm || cmdmod.confirm) && p_write) +*************** +*** 1457,1463 **** + buf_T *buf2; + int count = 0; + +! if (allbuf) + for (buf2 = firstbuf; buf2 != NULL; buf2 = buf2->b_next) + if (bufIsChanged(buf2) + && (buf2->b_ffname != NULL +--- 1457,1463 ---- + buf_T *buf2; + int count = 0; + +! if (flags & CCGD_ALLBUF) + for (buf2 = firstbuf; buf2 != NULL; buf2 = buf2->b_next) + if (bufIsChanged(buf2) + && (buf2->b_ffname != NULL +*************** +*** 1480,1486 **** + return bufIsChanged(buf); + } + #endif +! EMSG(_(e_nowrtmsg)); + return TRUE; + } + return FALSE; +--- 1480,1489 ---- + return bufIsChanged(buf); + } + #endif +! if (flags & CCGD_EXCMD) +! EMSG(_(e_nowrtmsg)); +! else +! EMSG(_(e_nowrtmsg_nobang)); + return TRUE; + } + return FALSE; +*************** +*** 1690,1696 **** + { + /* Try auto-writing the buffer. If this fails but the buffer no + * longer exists it's not changed, that's OK. */ +! if (check_changed(buf, p_awa, TRUE, FALSE, TRUE) && buf_valid(buf)) + break; /* didn't save - still changes */ + } + } +--- 1693,1701 ---- + { + /* Try auto-writing the buffer. If this fails but the buffer no + * longer exists it's not changed, that's OK. */ +! if (check_changed(buf, (p_awa ? CCGD_AW : 0) +! | CCGD_MULTWIN +! | CCGD_ALLBUF) && buf_valid(buf)) + break; /* didn't save - still changes */ + } + } +*************** +*** 2274,2280 **** + vim_free(p); + } + if ((!P_HID(curbuf) || !other) +! && check_changed(curbuf, TRUE, !other, eap->forceit, FALSE)) + return; + } + +--- 2279,2288 ---- + vim_free(p); + } + if ((!P_HID(curbuf) || !other) +! && check_changed(curbuf, CCGD_AW +! | (other ? 0 : CCGD_MULTWIN) +! | (eap->forceit ? CCGD_FORCEIT : 0) +! | CCGD_EXCMD)) + return; + } + +*************** +*** 2315,2321 **** + */ + if ( P_HID(curbuf) + || eap->cmdidx == CMD_snext +! || !check_changed(curbuf, TRUE, FALSE, eap->forceit, FALSE)) + { + if (*eap->arg != NUL) /* redefine file list */ + { +--- 2323,2331 ---- + */ + if ( P_HID(curbuf) + || eap->cmdidx == CMD_snext +! || !check_changed(curbuf, CCGD_AW +! | (eap->forceit ? CCGD_FORCEIT : 0) +! | CCGD_EXCMD)) + { + if (*eap->arg != NUL) /* redefine file list */ + { +*************** +*** 2458,2464 **** + if (eap->cmdidx == CMD_windo + || eap->cmdidx == CMD_tabdo + || P_HID(curbuf) +! || !check_changed(curbuf, TRUE, FALSE, eap->forceit, FALSE)) + { + /* start at the first argument/window/buffer */ + i = 0; +--- 2468,2476 ---- + if (eap->cmdidx == CMD_windo + || eap->cmdidx == CMD_tabdo + || P_HID(curbuf) +! || !check_changed(curbuf, CCGD_AW +! | (eap->forceit ? CCGD_FORCEIT : 0) +! | CCGD_EXCMD)) + { + /* start at the first argument/window/buffer */ + i = 0; +*** ../vim-7.4.081/src/proto/ex_cmds2.pro 2013-08-10 13:37:10.000000000 +0200 +--- src/proto/ex_cmds2.pro 2013-11-09 03:18:02.000000000 +0100 +*************** +*** 35,41 **** + int prof_def_func __ARGS((void)); + int autowrite __ARGS((buf_T *buf, int forceit)); + void autowrite_all __ARGS((void)); +! int check_changed __ARGS((buf_T *buf, int checkaw, int mult_win, int forceit, int allbuf)); + void browse_save_fname __ARGS((buf_T *buf)); + void dialog_changed __ARGS((buf_T *buf, int checkall)); + int can_abandon __ARGS((buf_T *buf, int forceit)); +--- 35,41 ---- + int prof_def_func __ARGS((void)); + int autowrite __ARGS((buf_T *buf, int forceit)); + void autowrite_all __ARGS((void)); +! int check_changed __ARGS((buf_T *buf, int flags)); + void browse_save_fname __ARGS((buf_T *buf)); + void dialog_changed __ARGS((buf_T *buf, int checkall)); + int can_abandon __ARGS((buf_T *buf, int forceit)); +*** ../vim-7.4.081/src/globals.h 2013-07-04 19:53:44.000000000 +0200 +--- src/globals.h 2013-11-09 03:05:54.000000000 +0100 +*************** +*** 1490,1495 **** +--- 1490,1496 ---- + EXTERN char_u e_notopen[] INIT(= N_("E484: Can't open file %s")); + EXTERN char_u e_notread[] INIT(= N_("E485: Can't read file %s")); + EXTERN char_u e_nowrtmsg[] INIT(= N_("E37: No write since last change (add ! to override)")); ++ EXTERN char_u e_nowrtmsg_nobang[] INIT(= N_("E37: No write since last change")); + EXTERN char_u e_null[] INIT(= N_("E38: Null argument")); + #ifdef FEAT_DIGRAPHS + EXTERN char_u e_number_exp[] INIT(= N_("E39: Number expected")); +*** ../vim-7.4.081/src/ex_cmds.c 2013-10-02 18:43:00.000000000 +0200 +--- src/ex_cmds.c 2013-11-09 03:19:25.000000000 +0100 +*************** +*** 3253,3260 **** + if ( ((!other_file && !(flags & ECMD_OLDBUF)) + || (curbuf->b_nwindows == 1 + && !(flags & (ECMD_HIDE | ECMD_ADDBUF)))) +! && check_changed(curbuf, p_awa, !other_file, +! (flags & ECMD_FORCEIT), FALSE)) + { + if (fnum == 0 && other_file && ffname != NULL) + (void)setaltfname(ffname, sfname, newlnum < 0 ? 0 : newlnum); +--- 3253,3262 ---- + if ( ((!other_file && !(flags & ECMD_OLDBUF)) + || (curbuf->b_nwindows == 1 + && !(flags & (ECMD_HIDE | ECMD_ADDBUF)))) +! && check_changed(curbuf, (p_awa ? CCGD_AW : 0) +! | (other_file ? 0 : CCGD_MULTWIN) +! | ((flags & ECMD_FORCEIT) ? CCGD_FORCEIT : 0) +! | (eap == NULL ? 0 : CCGD_EXCMD))) + { + if (fnum == 0 && other_file && ffname != NULL) + (void)setaltfname(ffname, sfname, newlnum < 0 ? 0 : newlnum); +*************** +*** 7664,7670 **** + # ifdef FEAT_WINDOWS + ++emsg_off; + # endif +! split = check_changed(curbuf, TRUE, FALSE, FALSE, FALSE); + # ifdef FEAT_WINDOWS + --emsg_off; + # else +--- 7666,7672 ---- + # ifdef FEAT_WINDOWS + ++emsg_off; + # endif +! split = check_changed(curbuf, CCGD_AW | CCGD_EXCMD); + # ifdef FEAT_WINDOWS + --emsg_off; + # else +*** ../vim-7.4.081/src/ex_docmd.c 2013-11-08 04:30:06.000000000 +0100 +--- src/ex_docmd.c 2013-11-09 03:30:10.000000000 +0100 +*************** +*** 6565,6571 **** + if (check_more(FALSE, eap->forceit) == OK && only_one_window()) + exiting = TRUE; + if ((!P_HID(curbuf) +! && check_changed(curbuf, p_awa, FALSE, eap->forceit, FALSE)) + || check_more(TRUE, eap->forceit) == FAIL + || (only_one_window() && check_changed_any(eap->forceit))) + { +--- 6565,6573 ---- + if (check_more(FALSE, eap->forceit) == OK && only_one_window()) + exiting = TRUE; + if ((!P_HID(curbuf) +! && check_changed(curbuf, (p_awa ? CCGD_AW : 0) +! | (eap->forceit ? CCGD_FORCEIT : 0) +! | CCGD_EXCMD)) + || check_more(TRUE, eap->forceit) == FAIL + || (only_one_window() && check_changed_any(eap->forceit))) + { +*************** +*** 7099,7105 **** + if (!P_HID(curbuf) && !split) + { + ++emsg_off; +! split = check_changed(curbuf, TRUE, FALSE, FALSE, FALSE); + --emsg_off; + } + if (split) +--- 7101,7107 ---- + if (!P_HID(curbuf) && !split) + { + ++emsg_off; +! split = check_changed(curbuf, CCGD_AW); + --emsg_off; + } + if (split) +*************** +*** 7361,7367 **** + { + /* Set recoverymode right away to avoid the ATTENTION prompt. */ + recoverymode = TRUE; +! if (!check_changed(curbuf, p_awa, TRUE, eap->forceit, FALSE) + && (*eap->arg == NUL + || setfname(curbuf, eap->arg, NULL, TRUE) == OK)) + ml_recover(); +--- 7363,7373 ---- + { + /* Set recoverymode right away to avoid the ATTENTION prompt. */ + recoverymode = TRUE; +! if (!check_changed(curbuf, (p_awa ? CCGD_AW : 0) +! | CCGD_MULTWIN +! | (eap->forceit ? CCGD_FORCEIT : 0) +! | CCGD_EXCMD) +! + && (*eap->arg == NUL + || setfname(curbuf, eap->arg, NULL, TRUE) == OK)) + ml_recover(); +*** ../vim-7.4.081/src/version.c 2013-11-09 02:32:15.000000000 +0100 +--- src/version.c 2013-11-09 03:26:06.000000000 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 82, + /**/ + +-- +People who want to share their religious views with you +almost never want you to share yours with them. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.083 b/SOURCES/7.4.083 new file mode 100644 index 0000000..c71450e --- /dev/null +++ b/SOURCES/7.4.083 @@ -0,0 +1,136 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.083 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.083 +Problem: It's hard to avoid adding a used pattern to the search history. +Solution: Add the ":keeppatterns" modifier. (Christian Brabandt) +Files: runtime/doc/cmdline.txt, src/ex_cmds.h, src/ex_docmd.c, + src/ex_getln.c, src/structs.h + + +*** ../vim-7.4.082/runtime/doc/cmdline.txt 2013-08-10 13:24:52.000000000 +0200 +--- runtime/doc/cmdline.txt 2013-11-09 04:26:30.000000000 +0100 +*************** +*** 356,361 **** +--- 356,365 ---- + List the recent five entries from all histories: > + :history all -5, + ++ :keepp[atterns] {command} *:keepp* *:keeppatterns* ++ Execute {command}, without adding anything to the search ++ history ++ + ============================================================================== + 2. Command-line completion *cmdline-completion* + +*** ../vim-7.4.082/src/ex_cmds.h 2013-06-08 15:08:20.000000000 +0200 +--- src/ex_cmds.h 2013-11-09 04:26:30.000000000 +0100 +*************** +*** 477,482 **** +--- 477,484 ---- + NEEDARG|EXTRA|NOTRLCOM), + EX(CMD_keepjumps, "keepjumps", ex_wrongmodifier, + NEEDARG|EXTRA|NOTRLCOM), ++ EX(CMD_keeppatterns, "keeppatterns", ex_wrongmodifier, ++ NEEDARG|EXTRA|NOTRLCOM), + EX(CMD_keepalt, "keepalt", ex_wrongmodifier, + NEEDARG|EXTRA|NOTRLCOM), + EX(CMD_list, "list", ex_print, +*** ../vim-7.4.082/src/ex_docmd.c 2013-11-09 03:31:45.000000000 +0100 +--- src/ex_docmd.c 2013-11-09 04:31:36.000000000 +0100 +*************** +*** 1843,1848 **** +--- 1843,1853 ---- + cmdmod.keepalt = TRUE; + continue; + } ++ if (checkforcmd(&ea.cmd, "keeppatterns", 5)) ++ { ++ cmdmod.keeppatterns = TRUE; ++ continue; ++ } + if (!checkforcmd(&ea.cmd, "keepjumps", 5)) + break; + cmdmod.keepjumps = TRUE; +*************** +*** 2584,2589 **** +--- 2589,2595 ---- + case CMD_keepalt: + case CMD_keepjumps: + case CMD_keepmarks: ++ case CMD_keeppatterns: + case CMD_leftabove: + case CMD_let: + case CMD_lockmarks: +*************** +*** 3089,3094 **** +--- 3095,3101 ---- + {"keepalt", 5, FALSE}, + {"keepjumps", 5, FALSE}, + {"keepmarks", 3, FALSE}, ++ {"keeppatterns", 5, FALSE}, + {"leftabove", 5, FALSE}, + {"lockmarks", 3, FALSE}, + {"noautocmd", 3, FALSE}, +*************** +*** 3597,3602 **** +--- 3604,3610 ---- + case CMD_keepalt: + case CMD_keepjumps: + case CMD_keepmarks: ++ case CMD_keeppatterns: + case CMD_leftabove: + case CMD_lockmarks: + case CMD_rightbelow: +*** ../vim-7.4.082/src/ex_getln.c 2013-11-05 07:12:59.000000000 +0100 +--- src/ex_getln.c 2013-11-09 04:26:30.000000000 +0100 +*************** +*** 5498,5503 **** +--- 5498,5506 ---- + if (hislen == 0) /* no history */ + return; + ++ if (cmdmod.keeppatterns && histype == HIST_SEARCH) ++ return; ++ + /* + * Searches inside the same mapping overwrite each other, so that only + * the last line is kept. Be careful not to remove a line that was moved +*** ../vim-7.4.082/src/structs.h 2013-11-06 05:26:08.000000000 +0100 +--- src/structs.h 2013-11-09 04:26:30.000000000 +0100 +*************** +*** 542,547 **** +--- 542,548 ---- + int keepmarks; /* TRUE when ":keepmarks" was used */ + int keepjumps; /* TRUE when ":keepjumps" was used */ + int lockmarks; /* TRUE when ":lockmarks" was used */ ++ int keeppatterns; /* TRUE when ":keeppatterns" was used */ + # ifdef FEAT_AUTOCMD + char_u *save_ei; /* saved value of 'eventignore' */ + # endif +*** ../vim-7.4.082/src/version.c 2013-11-09 03:31:45.000000000 +0100 +--- src/version.c 2013-11-09 04:29:07.000000000 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 83, + /**/ + +-- +I am always surprised in the Linux world how quickly solutions can be +obtained. (Imagine sending an email to Bill Gates, asking why Windows +crashed, and how to fix it... and then getting an answer that fixed the +problem... <0>_<0> !) -- Mark Langdon + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.084 b/SOURCES/7.4.084 new file mode 100644 index 0000000..142e251 --- /dev/null +++ b/SOURCES/7.4.084 @@ -0,0 +1,184 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.084 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.084 +Problem: Python: interrupt not being properly discarded. (Yggdroot Chen) +Solution: Discard interrupt in VimTryEnd. (ZyX) +Files: src/if_py_both.h, src/testdir/test86.in, src/testdir/test86.ok, + src/testdir/test87.in, src/testdir/test87.ok + + +*** ../vim-7.4.083/src/if_py_both.h 2013-11-04 00:34:47.000000000 +0100 +--- src/if_py_both.h 2013-11-11 00:56:41.000000000 +0100 +*************** +*** 558,564 **** + /* Keyboard interrupt should be preferred over anything else */ + if (got_int) + { +! did_throw = got_int = FALSE; + PyErr_SetNone(PyExc_KeyboardInterrupt); + return -1; + } +--- 558,568 ---- + /* Keyboard interrupt should be preferred over anything else */ + if (got_int) + { +! if (current_exception != NULL) +! discard_current_exception(); +! else +! need_rethrow = did_throw = FALSE; +! got_int = FALSE; + PyErr_SetNone(PyExc_KeyboardInterrupt); + return -1; + } +*************** +*** 567,573 **** + /* Python exception is preferred over vim one; unlikely to occur though */ + else if (PyErr_Occurred()) + { +! did_throw = FALSE; + return -1; + } + /* Finally transform VimL exception to python one */ +--- 571,580 ---- + /* Python exception is preferred over vim one; unlikely to occur though */ + else if (PyErr_Occurred()) + { +! if (current_exception != NULL) +! discard_current_exception(); +! else +! need_rethrow = did_throw = FALSE; + return -1; + } + /* Finally transform VimL exception to python one */ +*** ../vim-7.4.083/src/testdir/test86.in 2013-11-04 00:34:47.000000000 +0100 +--- src/testdir/test86.in 2013-11-11 00:56:11.000000000 +0100 +*************** +*** 1281,1286 **** +--- 1281,1317 ---- + EOF + :delfunction Exe + :" ++ :" Regression: interrupting vim.command propagates to next vim.command ++ py << EOF ++ def test_keyboard_interrupt(): ++ try: ++ vim.command('while 1 | endwhile') ++ except KeyboardInterrupt: ++ cb.append('Caught KeyboardInterrupt') ++ except Exception: ++ cb.append('!!!!!!!! Caught exception: ' + repr(sys.exc_info)) ++ else: ++ cb.append('!!!!!!!! No exception') ++ try: ++ vim.command('$ put =\'Running :put\'') ++ except KeyboardInterrupt: ++ cb.append('!!!!!!!! Caught KeyboardInterrupt') ++ except Exception: ++ cb.append('!!!!!!!! Caught exception: ' + repr(sys.exc_info)) ++ else: ++ cb.append('No exception') ++ EOF ++ :debuggreedy ++ :call inputsave() ++ :call feedkeys("s\ns\ns\ns\nq\n") ++ :redir => output ++ :debug silent! py test_keyboard_interrupt() ++ :redir END ++ :0 debuggreedy ++ :silent $put =output ++ :unlet output ++ :py del test_keyboard_interrupt ++ :" + :" Cleanup + py << EOF + del cb +*** ../vim-7.4.083/src/testdir/test86.ok 2013-11-04 00:34:47.000000000 +0100 +--- src/testdir/test86.ok 2013-11-11 00:56:11.000000000 +0100 +*************** +*** 1198,1200 **** +--- 1198,1204 ---- + vim.eval("Exe('echoerr ''jkl''')"):error:('Vim(echoerr):jkl',) + vim.eval("Exe('xxx_non_existent_command_xxx')"):error:('Vim:E492: Not an editor command: xxx_non_existent_command_xxx',) + vim.bindeval("Exe('xxx_non_existent_command_xxx')"):error:('Vim:E492: Not an editor command: xxx_non_existent_command_xxx',) ++ Caught KeyboardInterrupt ++ Running :put ++ No exception ++ +*** ../vim-7.4.083/src/testdir/test87.in 2013-11-04 00:34:47.000000000 +0100 +--- src/testdir/test87.in 2013-11-11 00:56:11.000000000 +0100 +*************** +*** 1232,1237 **** +--- 1232,1268 ---- + EOF + :delfunction Exe + :" ++ :" Regression: interrupting vim.command propagates to next vim.command ++ py3 << EOF ++ def test_keyboard_interrupt(): ++ try: ++ vim.command('while 1 | endwhile') ++ except KeyboardInterrupt: ++ cb.append('Caught KeyboardInterrupt') ++ except Exception as e: ++ cb.append('!!!!!!!! Caught exception: ' + repr(e)) ++ else: ++ cb.append('!!!!!!!! No exception') ++ try: ++ vim.command('$ put =\'Running :put\'') ++ except KeyboardInterrupt: ++ cb.append('!!!!!!!! Caught KeyboardInterrupt') ++ except Exception as e: ++ cb.append('!!!!!!!! Caught exception: ' + repr(e)) ++ else: ++ cb.append('No exception') ++ EOF ++ :debuggreedy ++ :call inputsave() ++ :call feedkeys("s\ns\ns\ns\nq\n") ++ :redir => output ++ :debug silent! py3 test_keyboard_interrupt() ++ :redir END ++ :0 debuggreedy ++ :silent $put =output ++ :unlet output ++ :py3 del test_keyboard_interrupt ++ :" + :" Cleanup + py3 << EOF + del cb +*** ../vim-7.4.083/src/testdir/test87.ok 2013-11-04 00:34:47.000000000 +0100 +--- src/testdir/test87.ok 2013-11-11 00:56:11.000000000 +0100 +*************** +*** 1187,1189 **** +--- 1187,1193 ---- + vim.eval("Exe('echoerr ''jkl''')"):(, error('Vim(echoerr):jkl',)) + vim.eval("Exe('xxx_non_existent_command_xxx')"):(, error('Vim:E492: Not an editor command: xxx_non_existent_command_xxx',)) + vim.bindeval("Exe('xxx_non_existent_command_xxx')"):(, error('Vim:E492: Not an editor command: xxx_non_existent_command_xxx',)) ++ Caught KeyboardInterrupt ++ Running :put ++ No exception ++ +*** ../vim-7.4.083/src/version.c 2013-11-09 05:30:18.000000000 +0100 +--- src/version.c 2013-11-11 00:55:23.000000000 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 84, + /**/ + +-- +Computers make very fast, very accurate, mistakes. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.086 b/SOURCES/7.4.086 new file mode 100644 index 0000000..46f9eb9 --- /dev/null +++ b/SOURCES/7.4.086 @@ -0,0 +1,145 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.086 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.086 +Problem: Skipping over an expression when not evaluating it does not work + properly for dict members. +Solution: Skip over unrecognized expression. (ZyX) +Files: src/eval.c, src/testdir/test34.in, src/testdir/test34.ok + + +*** ../vim-7.4.085/src/eval.c 2013-11-08 04:30:06.000000000 +0100 +--- src/eval.c 2013-11-11 04:11:38.000000000 +0100 +*************** +*** 19845,19868 **** + while (ret == OK + && (**arg == '[' + || (**arg == '.' && rettv->v_type == VAR_DICT) +! || (**arg == '(' && rettv->v_type == VAR_FUNC)) + && !vim_iswhite(*(*arg - 1))) + { + if (**arg == '(') + { + /* need to copy the funcref so that we can clear rettv */ +! functv = *rettv; +! rettv->v_type = VAR_UNKNOWN; + +! /* Invoke the function. Recursive! */ +! s = functv.vval.v_string; + ret = get_func_tv(s, (int)STRLEN(s), rettv, arg, + curwin->w_cursor.lnum, curwin->w_cursor.lnum, + &len, evaluate, selfdict); + + /* Clear the funcref afterwards, so that deleting it while + * evaluating the arguments is possible (see test55). */ +! clear_tv(&functv); + + /* Stop the expression evaluation when immediately aborting on + * error, or when an interrupt occurred or an exception was thrown +--- 19845,19874 ---- + while (ret == OK + && (**arg == '[' + || (**arg == '.' && rettv->v_type == VAR_DICT) +! || (**arg == '(' && (!evaluate || rettv->v_type == VAR_FUNC))) + && !vim_iswhite(*(*arg - 1))) + { + if (**arg == '(') + { + /* need to copy the funcref so that we can clear rettv */ +! if (evaluate) +! { +! functv = *rettv; +! rettv->v_type = VAR_UNKNOWN; + +! /* Invoke the function. Recursive! */ +! s = functv.vval.v_string; +! } +! else +! s = (char_u *)""; + ret = get_func_tv(s, (int)STRLEN(s), rettv, arg, + curwin->w_cursor.lnum, curwin->w_cursor.lnum, + &len, evaluate, selfdict); + + /* Clear the funcref afterwards, so that deleting it while + * evaluating the arguments is possible (see test55). */ +! if (evaluate) +! clear_tv(&functv); + + /* Stop the expression evaluation when immediately aborting on + * error, or when an interrupt occurred or an exception was thrown +*** ../vim-7.4.085/src/testdir/test34.in 2012-07-16 16:51:29.000000000 +0200 +--- src/testdir/test34.in 2013-11-11 04:10:13.000000000 +0100 +*************** +*** 1,6 **** +--- 1,7 ---- + Test for user functions. + Also test an mapping calling a function. + Also test that a builtin function cannot be replaced. ++ Also test for regression when calling arbitrary expression. + + STARTTEST + :so small.vim +*************** +*** 62,68 **** + [(one again:call append(line('$'), max([1, 2, 3])) + :call extend(g:, {'max': function('min')}) + :call append(line('$'), max([1, 2, 3])) +! :$-7,$w! test.out + :delfunc Table + :delfunc Compute + :delfunc Expr1 +--- 63,79 ---- + [(one again:call append(line('$'), max([1, 2, 3])) + :call extend(g:, {'max': function('min')}) + :call append(line('$'), max([1, 2, 3])) +! :try +! : " Regression: the first line below used to throw ?E110: Missing ')'? +! : " Second is here just to prove that this line is correct when not skipping +! : " rhs of &&. +! : $put =(0&&(function('tr'))(1, 2, 3)) +! : $put =(1&&(function('tr'))(1, 2, 3)) +! :catch +! : $put ='!!! Unexpected exception:' +! : $put =v:exception +! :endtry +! :$-9,$w! test.out + :delfunc Table + :delfunc Compute + :delfunc Expr1 +*** ../vim-7.4.085/src/testdir/test34.ok 2012-07-16 16:43:15.000000000 +0200 +--- src/testdir/test34.ok 2013-11-11 04:10:13.000000000 +0100 +*************** +*** 6,8 **** +--- 6,10 ---- + 1. one again + 3 + 3 ++ 0 ++ 1 +*** ../vim-7.4.085/src/version.c 2013-11-11 01:29:16.000000000 +0100 +--- src/version.c 2013-11-11 04:15:59.000000000 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 86, + /**/ + +-- +ARTHUR: The swallow may fly south with the sun, or the house martin or the + plover seek warmer hot lands in winter, yet these are not strangers to + our land. +SOLDIER: Are you suggesting coconuts migrate? + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.087 b/SOURCES/7.4.087 new file mode 100644 index 0000000..b8c1a48 --- /dev/null +++ b/SOURCES/7.4.087 @@ -0,0 +1,56 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.087 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.087 +Problem: Compiler warning on 64 bit Windows systems. +Solution: Fix type cast. (Mike Williams) +Files: src/ops.c + + +*** ../vim-7.4.086/src/ops.c 2013-11-11 01:29:16.000000000 +0100 +--- src/ops.c 2013-11-11 23:16:06.000000000 +0100 +*************** +*** 2193,2199 **** + else + { + /* Replacing with \r or \n means splitting the line. */ +! after_p = alloc_check((unsigned)oldlen + 1 + n - STRLEN(newp)); + if (after_p != NULL) + STRMOVE(after_p, oldp); + } +--- 2193,2200 ---- + else + { + /* Replacing with \r or \n means splitting the line. */ +! after_p = alloc_check( +! (unsigned)(oldlen + 1 + n - STRLEN(newp))); + if (after_p != NULL) + STRMOVE(after_p, oldp); + } +*** ../vim-7.4.086/src/version.c 2013-11-11 04:25:48.000000000 +0100 +--- src/version.c 2013-11-11 23:16:23.000000000 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 87, + /**/ + + +-- +SECOND SOLDIER: It could be carried by an African swallow! +FIRST SOLDIER: Oh yes! An African swallow maybe ... but not a European + swallow. that's my point. + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.088 b/SOURCES/7.4.088 new file mode 100644 index 0000000..62dc91c --- /dev/null +++ b/SOURCES/7.4.088 @@ -0,0 +1,564 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.088 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.088 +Problem: When spell checking is enabled Asian characters are always marked + as error. +Solution: When 'spelllang' contains "cjk" do not mark Asian characters as + error. (Ken Takata) +Files: runtime/doc/options.txt, runtime/doc/spell.txt, src/mbyte.c, + src/option.c, src/spell.c, src/structs.h + + +*** ../vim-7.4.087/runtime/doc/options.txt 2013-11-06 05:26:08.000000000 +0100 +--- runtime/doc/options.txt 2013-11-12 04:00:51.000000000 +0100 +*************** +*** 6555,6560 **** +--- 6555,6563 ---- + region by listing them: "en_us,en_ca" supports both US and Canadian + English, but not words specific for Australia, New Zealand or Great + Britain. ++ If the name "cjk" is included East Asian characters are excluded from ++ spell checking. This is useful when editing text that also has Asian ++ words. + *E757* + As a special case the name of a .spl file can be given as-is. The + first "_xx" in the name is removed and used as the region name +*** ../vim-7.4.087/runtime/doc/spell.txt 2013-08-10 13:25:01.000000000 +0200 +--- runtime/doc/spell.txt 2013-11-12 04:02:27.000000000 +0100 +*************** +*** 269,274 **** +--- 269,281 ---- + latin1 yi transliterated Yiddish + utf-8 yi-tr transliterated Yiddish + ++ *spell-cjk* ++ Chinese, Japanese and other East Asian characters are normally marked as ++ errors, because spell checking of these characters is not supported. If ++ 'spelllang' includes "cjk", these characters are not marked as errors. This ++ is useful when editing text with spell checking while some Asian words are ++ present. ++ + + SPELL FILES *spell-load* + +*** ../vim-7.4.087/src/mbyte.c 2013-07-05 20:07:21.000000000 +0200 +--- src/mbyte.c 2013-11-12 03:55:50.000000000 +0100 +*************** +*** 947,954 **** + { + case 0x2121: /* ZENKAKU space */ + return 0; +! case 0x2122: /* KU-TEN (Japanese comma) */ +! case 0x2123: /* TOU-TEN (Japanese period) */ + case 0x2124: /* ZENKAKU comma */ + case 0x2125: /* ZENKAKU period */ + return 1; +--- 947,954 ---- + { + case 0x2121: /* ZENKAKU space */ + return 0; +! case 0x2122: /* TOU-TEN (Japanese comma) */ +! case 0x2123: /* KU-TEN (Japanese period) */ + case 0x2124: /* ZENKAKU comma */ + case 0x2125: /* ZENKAKU period */ + return 1; +*************** +*** 2477,2485 **** + /* sorted list of non-overlapping intervals */ + static struct clinterval + { +! unsigned short first; +! unsigned short last; +! unsigned short class; + } classes[] = + { + {0x037e, 0x037e, 1}, /* Greek question mark */ +--- 2477,2485 ---- + /* sorted list of non-overlapping intervals */ + static struct clinterval + { +! unsigned int first; +! unsigned int last; +! unsigned int class; + } classes[] = + { + {0x037e, 0x037e, 1}, /* Greek question mark */ +*************** +*** 2544,2549 **** +--- 2544,2553 ---- + {0xff1a, 0xff20, 1}, /* half/fullwidth ASCII */ + {0xff3b, 0xff40, 1}, /* half/fullwidth ASCII */ + {0xff5b, 0xff65, 1}, /* half/fullwidth ASCII */ ++ {0x20000, 0x2a6df, 0x4e00}, /* CJK Ideographs */ ++ {0x2a700, 0x2b73f, 0x4e00}, /* CJK Ideographs */ ++ {0x2b740, 0x2b81f, 0x4e00}, /* CJK Ideographs */ ++ {0x2f800, 0x2fa1f, 0x4e00}, /* CJK Ideographs */ + }; + int bot = 0; + int top = sizeof(classes) / sizeof(struct clinterval) - 1; +*************** +*** 2563,2571 **** + while (top >= bot) + { + mid = (bot + top) / 2; +! if (classes[mid].last < c) + bot = mid + 1; +! else if (classes[mid].first > c) + top = mid - 1; + else + return (int)classes[mid].class; +--- 2567,2575 ---- + while (top >= bot) + { + mid = (bot + top) / 2; +! if (classes[mid].last < (unsigned int)c) + bot = mid + 1; +! else if (classes[mid].first > (unsigned int)c) + top = mid - 1; + else + return (int)classes[mid].class; +*** ../vim-7.4.087/src/option.c 2013-11-08 04:30:06.000000000 +0100 +--- src/option.c 2013-11-12 04:34:46.000000000 +0100 +*************** +*** 7122,7127 **** +--- 7122,7132 ---- + if (varp == &(curwin->w_s->b_p_spl)) + { + char_u fname[200]; ++ char_u *q = curwin->w_s->b_p_spl; ++ ++ /* Skip the first name if it is "cjk". */ ++ if (STRNCMP(q, "cjk,", 4) == 0) ++ q += 4; + + /* + * Source the spell/LANG.vim in 'runtimepath'. +*************** +*** 7129,7139 **** + * Use the first name in 'spelllang' up to '_region' or + * '.encoding'. + */ +! for (p = curwin->w_s->b_p_spl; *p != NUL; ++p) + if (vim_strchr((char_u *)"_.,", *p) != NULL) + break; +! vim_snprintf((char *)fname, 200, "spell/%.*s.vim", +! (int)(p - curwin->w_s->b_p_spl), curwin->w_s->b_p_spl); + source_runtime(fname, TRUE); + } + #endif +--- 7134,7143 ---- + * Use the first name in 'spelllang' up to '_region' or + * '.encoding'. + */ +! for (p = q; *p != NUL; ++p) + if (vim_strchr((char_u *)"_.,", *p) != NULL) + break; +! vim_snprintf((char *)fname, 200, "spell/%.*s.vim", (int)(p - q), q); + source_runtime(fname, TRUE); + } + #endif +*** ../vim-7.4.087/src/spell.c 2013-09-29 13:38:25.000000000 +0200 +--- src/spell.c 2013-11-12 04:37:33.000000000 +0100 +*************** +*** 754,762 **** + static void clear_spell_chartab __ARGS((spelltab_T *sp)); + static int set_spell_finish __ARGS((spelltab_T *new_st)); + static int spell_iswordp __ARGS((char_u *p, win_T *wp)); +! static int spell_iswordp_nmw __ARGS((char_u *p)); + #ifdef FEAT_MBYTE +! static int spell_mb_isword_class __ARGS((int cl)); + static int spell_iswordp_w __ARGS((int *p, win_T *wp)); + #endif + static int write_spell_prefcond __ARGS((FILE *fd, garray_T *gap)); +--- 754,762 ---- + static void clear_spell_chartab __ARGS((spelltab_T *sp)); + static int set_spell_finish __ARGS((spelltab_T *new_st)); + static int spell_iswordp __ARGS((char_u *p, win_T *wp)); +! static int spell_iswordp_nmw __ARGS((char_u *p, win_T *wp)); + #ifdef FEAT_MBYTE +! static int spell_mb_isword_class __ARGS((int cl, win_T *wp)); + static int spell_iswordp_w __ARGS((int *p, win_T *wp)); + #endif + static int write_spell_prefcond __ARGS((FILE *fd, garray_T *gap)); +*************** +*** 1149,1155 **** + + /* When we are at a non-word character there is no error, just + * skip over the character (try looking for a word after it). */ +! else if (!spell_iswordp_nmw(ptr)) + { + if (capcol != NULL && wp->w_s->b_cap_prog != NULL) + { +--- 1149,1155 ---- + + /* When we are at a non-word character there is no error, just + * skip over the character (try looking for a word after it). */ +! else if (!spell_iswordp_nmw(ptr, wp)) + { + if (capcol != NULL && wp->w_s->b_cap_prog != NULL) + { +*************** +*** 1561,1567 **** + * accept a no-caps word, even when the dictionary + * word specifies ONECAP. */ + mb_ptr_back(mip->mi_word, p); +! if (spell_iswordp_nmw(p) + ? capflags == WF_ONECAP + : (flags & WF_ONECAP) != 0 + && capflags != WF_ONECAP) +--- 1561,1567 ---- + * accept a no-caps word, even when the dictionary + * word specifies ONECAP. */ + mb_ptr_back(mip->mi_word, p); +! if (spell_iswordp_nmw(p, mip->mi_win) + ? capflags == WF_ONECAP + : (flags & WF_ONECAP) != 0 + && capflags != WF_ONECAP) +*************** +*** 4234,4240 **** + if (spl_copy == NULL) + goto theend; + +! /* loop over comma separated language names. */ + for (splp = spl_copy; *splp != NUL; ) + { + /* Get one language name. */ +--- 4234,4242 ---- + if (spl_copy == NULL) + goto theend; + +! wp->w_s->b_cjk = 0; +! +! /* Loop over comma separated language names. */ + for (splp = spl_copy; *splp != NUL; ) + { + /* Get one language name. */ +*************** +*** 4242,4247 **** +--- 4244,4255 ---- + region = NULL; + len = (int)STRLEN(lang); + ++ if (STRCMP(lang, "cjk") == 0) ++ { ++ wp->w_s->b_cjk = 1; ++ continue; ++ } ++ + /* If the name ends in ".spl" use it as the name of the spell file. + * If there is a region name let "region" point to it and remove it + * from the name. */ +*************** +*** 4601,4607 **** + int past_second = FALSE; /* past second word char */ + + /* find first letter */ +! for (p = word; !spell_iswordp_nmw(p); mb_ptr_adv(p)) + if (end == NULL ? *p == NUL : p >= end) + return 0; /* only non-word characters, illegal word */ + #ifdef FEAT_MBYTE +--- 4609,4615 ---- + int past_second = FALSE; /* past second word char */ + + /* find first letter */ +! for (p = word; !spell_iswordp_nmw(p, curwin); mb_ptr_adv(p)) + if (end == NULL ? *p == NUL : p >= end) + return 0; /* only non-word characters, illegal word */ + #ifdef FEAT_MBYTE +*************** +*** 4617,4623 **** + * But a word with an upper char only at start is a ONECAP. + */ + for ( ; end == NULL ? *p != NUL : p < end; mb_ptr_adv(p)) +! if (spell_iswordp_nmw(p)) + { + c = PTR2CHAR(p); + if (!SPELL_ISUPPER(c)) +--- 4625,4631 ---- + * But a word with an upper char only at start is a ONECAP. + */ + for ( ; end == NULL ? *p != NUL : p < end; mb_ptr_adv(p)) +! if (spell_iswordp_nmw(p, curwin)) + { + c = PTR2CHAR(p); + if (!SPELL_ISUPPER(c)) +*************** +*** 9907,9913 **** + + c = mb_ptr2char(s); + if (c > 255) +! return spell_mb_isword_class(mb_get_class(s)); + return spelltab.st_isw[c]; + } + #endif +--- 9915,9921 ---- + + c = mb_ptr2char(s); + if (c > 255) +! return spell_mb_isword_class(mb_get_class(s), wp); + return spelltab.st_isw[c]; + } + #endif +*************** +*** 9920,9927 **** + * Unlike spell_iswordp() this doesn't check for "midword" characters. + */ + static int +! spell_iswordp_nmw(p) + char_u *p; + { + #ifdef FEAT_MBYTE + int c; +--- 9928,9936 ---- + * Unlike spell_iswordp() this doesn't check for "midword" characters. + */ + static int +! spell_iswordp_nmw(p, wp) + char_u *p; ++ win_T *wp; + { + #ifdef FEAT_MBYTE + int c; +*************** +*** 9930,9936 **** + { + c = mb_ptr2char(p); + if (c > 255) +! return spell_mb_isword_class(mb_get_class(p)); + return spelltab.st_isw[c]; + } + #endif +--- 9939,9945 ---- + { + c = mb_ptr2char(p); + if (c > 255) +! return spell_mb_isword_class(mb_get_class(p), wp); + return spelltab.st_isw[c]; + } + #endif +*************** +*** 9942,9952 **** + * Return TRUE if word class indicates a word character. + * Only for characters above 255. + * Unicode subscript and superscript are not considered word characters. + */ + static int +! spell_mb_isword_class(cl) +! int cl; + { + return cl >= 2 && cl != 0x2070 && cl != 0x2080; + } + +--- 9951,9966 ---- + * Return TRUE if word class indicates a word character. + * Only for characters above 255. + * Unicode subscript and superscript are not considered word characters. ++ * See also dbcs_class() and utf_class() in mbyte.c. + */ + static int +! spell_mb_isword_class(cl, wp) +! int cl; +! win_T *wp; + { ++ if (wp->w_s->b_cjk) ++ /* East Asian characters are not considered word characters. */ ++ return cl == 2 || cl == 0x2800; + return cl >= 2 && cl != 0x2070 && cl != 0x2080; + } + +*************** +*** 9971,9979 **** + if (*s > 255) + { + if (enc_utf8) +! return spell_mb_isword_class(utf_class(*s)); + if (enc_dbcs) +! return dbcs_class((unsigned)*s >> 8, *s & 0xff) >= 2; + return 0; + } + return spelltab.st_isw[*s]; +--- 9985,9994 ---- + if (*s > 255) + { + if (enc_utf8) +! return spell_mb_isword_class(utf_class(*s), wp); + if (enc_dbcs) +! return spell_mb_isword_class( +! dbcs_class((unsigned)*s >> 8, *s & 0xff), wp); + return 0; + } + return spelltab.st_isw[*s]; +*************** +*** 10193,10205 **** + line = ml_get_curline(); + p = line + curwin->w_cursor.col; + /* Backup to before start of word. */ +! while (p > line && spell_iswordp_nmw(p)) + mb_ptr_back(line, p); + /* Forward to start of word. */ +! while (*p != NUL && !spell_iswordp_nmw(p)) + mb_ptr_adv(p); + +! if (!spell_iswordp_nmw(p)) /* No word found. */ + { + beep_flush(); + return; +--- 10208,10220 ---- + line = ml_get_curline(); + p = line + curwin->w_cursor.col; + /* Backup to before start of word. */ +! while (p > line && spell_iswordp_nmw(p, curwin)) + mb_ptr_back(line, p); + /* Forward to start of word. */ +! while (*p != NUL && !spell_iswordp_nmw(p, curwin)) + mb_ptr_adv(p); + +! if (!spell_iswordp_nmw(p, curwin)) /* No word found. */ + { + beep_flush(); + return; +*************** +*** 10436,10442 **** + for (;;) + { + mb_ptr_back(line, p); +! if (p == line || spell_iswordp_nmw(p)) + break; + if (vim_regexec(®match, p, 0) + && regmatch.endp[0] == line + endcol) +--- 10451,10457 ---- + for (;;) + { + mb_ptr_back(line, p); +! if (p == line || spell_iswordp_nmw(p, curwin)) + break; + if (vim_regexec(®match, p, 0) + && regmatch.endp[0] == line + endcol) +*************** +*** 11645,11651 **** + + /* When appending a compound word after a word character don't + * use Onecap. */ +! if (p != NULL && spell_iswordp_nmw(p)) + c &= ~WF_ONECAP; + make_case_word(tword + sp->ts_splitoff, + preword + sp->ts_prewordlen, c); +--- 11660,11666 ---- + + /* When appending a compound word after a word character don't + * use Onecap. */ +! if (p != NULL && spell_iswordp_nmw(p, curwin)) + c &= ~WF_ONECAP; + make_case_word(tword + sp->ts_splitoff, + preword + sp->ts_prewordlen, c); +*************** +*** 11895,11901 **** + * character when the word ends. But only when the + * good word can end. */ + if (((!try_compound && !spell_iswordp_nmw(fword +! + sp->ts_fidx)) + || fword_ends) + && fword[sp->ts_fidx] != NUL + && goodword_ends) +--- 11910,11917 ---- + * character when the word ends. But only when the + * good word can end. */ + if (((!try_compound && !spell_iswordp_nmw(fword +! + sp->ts_fidx, +! curwin)) + || fword_ends) + && fword[sp->ts_fidx] != NUL + && goodword_ends) +*************** +*** 14226,14232 **** + } + else + { +! if (spell_iswordp_nmw(s)) + *t++ = *s; + ++s; + } +--- 14242,14248 ---- + } + else + { +! if (spell_iswordp_nmw(s, curwin)) + *t++ = *s; + ++s; + } +*************** +*** 14521,14527 **** + else + { + did_white = FALSE; +! if (!spell_iswordp_nmw(t)) + continue; + } + } +--- 14537,14543 ---- + else + { + did_white = FALSE; +! if (!spell_iswordp_nmw(t, curwin)) + continue; + } + } +*************** +*** 16045,16051 **** + for (p = line + startcol; p > line; ) + { + mb_ptr_back(line, p); +! if (spell_iswordp_nmw(p)) + break; + } + +--- 16061,16067 ---- + for (p = line + startcol; p > line; ) + { + mb_ptr_back(line, p); +! if (spell_iswordp_nmw(p, curwin)) + break; + } + +*** ../vim-7.4.087/src/structs.h 2013-11-09 05:30:18.000000000 +0100 +--- src/structs.h 2013-11-12 03:55:50.000000000 +0100 +*************** +*** 1310,1315 **** +--- 1310,1318 ---- + regprog_T *b_cap_prog; /* program for 'spellcapcheck' */ + char_u *b_p_spf; /* 'spellfile' */ + char_u *b_p_spl; /* 'spelllang' */ ++ # ifdef FEAT_MBYTE ++ int b_cjk; /* all CJK letters as OK */ ++ # endif + #endif + #if !defined(FEAT_SYN_HL) && !defined(FEAT_SPELL) + int dummy; +*** ../vim-7.4.087/src/version.c 2013-11-11 23:17:31.000000000 +0100 +--- src/version.c 2013-11-12 03:59:03.000000000 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 88, + /**/ + +-- +THEOREM: VI is perfect. +PROOF: VI in roman numerals is 6. The natural numbers < 6 which divide 6 are +1, 2, and 3. 1+2+3 = 6. So 6 is a perfect number. Therefore, VI is perfect. +QED + -- Arthur Tateishi + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.089 b/SOURCES/7.4.089 new file mode 100644 index 0000000..80697ce --- /dev/null +++ b/SOURCES/7.4.089 @@ -0,0 +1,47 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.089 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.089 +Problem: When editing a file in a directory mounted through sshfs Vim + doesn't set the security context on a renamed file. +Solution: Add mch_copy_sec() to vim_rename(). (Peter Backes) +Files: src/fileio.c + + +*** ../vim-7.4.088/src/fileio.c 2013-08-30 17:06:56.000000000 +0200 +--- src/fileio.c 2013-11-12 05:07:22.000000000 +0100 +*************** +*** 6707,6712 **** +--- 6707,6715 ---- + mch_set_acl(to, acl); + mch_free_acl(acl); + #endif ++ #ifdef HAVE_SELINUX ++ mch_copy_sec(from, to) ++ #endif + if (errmsg != NULL) + { + EMSG2(errmsg, to); +*** ../vim-7.4.088/src/version.c 2013-11-12 04:43:57.000000000 +0100 +--- src/version.c 2013-11-12 05:11:02.000000000 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 89, + /**/ + +-- +Kiss me twice. I'm schizophrenic. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.090 b/SOURCES/7.4.090 new file mode 100644 index 0000000..a7ee927 --- /dev/null +++ b/SOURCES/7.4.090 @@ -0,0 +1,223 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.090 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.090 +Problem: Win32: When a directory name contains an exclamation mark, + completion doesn't complete the contents of the directory. +Solution: Escape the exclamation mark. (Jan Stocker) +Files: src/ex_getln.c, src/testdir/test102.in, src/testdir/test102.ok + src/testdir/Make_amiga.mak, src/testdir/Make_dos.mak, + src/testdir/Make_ming.mak, src/testdir/Make_os2.mak, + src/testdir/Make_vms.mms, src/testdir/Makefile + + +*** ../vim-7.4.089/src/ex_getln.c 2013-11-09 05:30:18.000000000 +0100 +--- src/ex_getln.c 2013-11-12 05:23:15.000000000 +0100 +*************** +*** 3852,3860 **** + char_u buf[20]; + int j = 0; + +! /* Don't escape '[' and '{' if they are in 'isfname'. */ + for (p = PATH_ESC_CHARS; *p != NUL; ++p) +! if ((*p != '[' && *p != '{') || !vim_isfilec(*p)) + buf[j++] = *p; + buf[j] = NUL; + p = vim_strsave_escaped(fname, buf); +--- 3852,3860 ---- + char_u buf[20]; + int j = 0; + +! /* Don't escape '[', '{' and '!' if they are in 'isfname'. */ + for (p = PATH_ESC_CHARS; *p != NUL; ++p) +! if ((*p != '[' && *p != '{' && *p != '!') || !vim_isfilec(*p)) + buf[j++] = *p; + buf[j] = NUL; + p = vim_strsave_escaped(fname, buf); +*** ../vim-7.4.089/src/testdir/test102.in 2013-11-12 05:27:48.000000000 +0100 +--- src/testdir/test102.in 2013-11-12 05:21:26.000000000 +0100 +*************** +*** 0 **** +--- 1,12 ---- ++ Test if fnameescape is correct for special chars like ! ++ ++ STARTTEST ++ :%d ++ :let fname = 'Xspa ce' ++ :try | exe "w! " . fnameescape(fname) | put='Space' | endtry ++ :let fname = 'Xemark!' ++ :try | exe "w! " . fnameescape(fname) | put='ExclamationMark' | endtry ++ :w! test.out ++ :qa! ++ ENDTEST ++ +*** ../vim-7.4.089/src/testdir/test102.ok 2013-11-12 05:27:48.000000000 +0100 +--- src/testdir/test102.ok 2013-11-12 05:21:19.000000000 +0100 +*************** +*** 0 **** +--- 1,3 ---- ++ ++ Space ++ ExclamationMark +*** ../vim-7.4.089/src/testdir/Make_amiga.mak 2013-11-08 04:30:06.000000000 +0100 +--- src/testdir/Make_amiga.mak 2013-11-12 05:20:03.000000000 +0100 +*************** +*** 34,40 **** + test81.out test82.out test83.out test84.out test88.out \ + test89.out test90.out test91.out test92.out test93.out \ + test94.out test95.out test96.out test97.out test98.out \ +! test99.out test100.out test101.out + + .SUFFIXES: .in .out + +--- 34,40 ---- + test81.out test82.out test83.out test84.out test88.out \ + test89.out test90.out test91.out test92.out test93.out \ + test94.out test95.out test96.out test97.out test98.out \ +! test99.out test100.out test101.out test102.out + + .SUFFIXES: .in .out + +*************** +*** 152,154 **** +--- 152,155 ---- + test99.out: test99.in + test100.out: test100.in + test101.out: test101.in ++ test102.out: test102.in +*** ../vim-7.4.089/src/testdir/Make_dos.mak 2013-11-08 04:30:06.000000000 +0100 +--- src/testdir/Make_dos.mak 2013-11-12 05:20:10.000000000 +0100 +*************** +*** 33,39 **** + test84.out test85.out test86.out test87.out test88.out \ + test89.out test90.out test91.out test92.out test93.out \ + test94.out test95.out test96.out test98.out test99.out \ +! test100.out test101.out + + SCRIPTS32 = test50.out test70.out + +--- 33,39 ---- + test84.out test85.out test86.out test87.out test88.out \ + test89.out test90.out test91.out test92.out test93.out \ + test94.out test95.out test96.out test98.out test99.out \ +! test100.out test101.out test102.out + + SCRIPTS32 = test50.out test70.out + +*** ../vim-7.4.089/src/testdir/Make_ming.mak 2013-11-08 04:30:06.000000000 +0100 +--- src/testdir/Make_ming.mak 2013-11-12 05:20:14.000000000 +0100 +*************** +*** 53,59 **** + test84.out test85.out test86.out test87.out test88.out \ + test89.out test90.out test91.out test92.out test93.out \ + test94.out test95.out test96.out test98.out test99.out \ +! test100out test101.out + + SCRIPTS32 = test50.out test70.out + +--- 53,59 ---- + test84.out test85.out test86.out test87.out test88.out \ + test89.out test90.out test91.out test92.out test93.out \ + test94.out test95.out test96.out test98.out test99.out \ +! test100out test101.out test102.out + + SCRIPTS32 = test50.out test70.out + +*** ../vim-7.4.089/src/testdir/Make_os2.mak 2013-11-08 04:30:06.000000000 +0100 +--- src/testdir/Make_os2.mak 2013-11-12 05:20:18.000000000 +0100 +*************** +*** 35,41 **** + test81.out test82.out test83.out test84.out test88.out \ + test89.out test90.out test91.out test92.out test93.out \ + test94.out test95.out test96.out test98.out test99.out \ +! test100.out test101.out + + .SUFFIXES: .in .out + +--- 35,41 ---- + test81.out test82.out test83.out test84.out test88.out \ + test89.out test90.out test91.out test92.out test93.out \ + test94.out test95.out test96.out test98.out test99.out \ +! test100.out test101.out test102.out + + .SUFFIXES: .in .out + +*** ../vim-7.4.089/src/testdir/Make_vms.mms 2013-11-08 04:30:06.000000000 +0100 +--- src/testdir/Make_vms.mms 2013-11-12 05:20:21.000000000 +0100 +*************** +*** 4,10 **** + # Authors: Zoltan Arpadffy, + # Sandor Kopanyi, + # +! # Last change: 2013 Nov 08 + # + # This has been tested on VMS 6.2 to 8.3 on DEC Alpha, VAX and IA64. + # Edit the lines in the Configuration section below to select. +--- 4,10 ---- + # Authors: Zoltan Arpadffy, + # Sandor Kopanyi, + # +! # Last change: 2013 Nov 12 + # + # This has been tested on VMS 6.2 to 8.3 on DEC Alpha, VAX and IA64. + # Edit the lines in the Configuration section below to select. +*************** +*** 79,85 **** + test82.out test83.out test84.out test88.out test89.out \ + test90.out test91.out test92.out test93.out test94.out \ + test95.out test96.out test97.out test98.out test99.out \ +! test100.out test101.out + + # Known problems: + # Test 30: a problem around mac format - unknown reason +--- 79,85 ---- + test82.out test83.out test84.out test88.out test89.out \ + test90.out test91.out test92.out test93.out test94.out \ + test95.out test96.out test97.out test98.out test99.out \ +! test100.out test101.out test102.out + + # Known problems: + # Test 30: a problem around mac format - unknown reason +*** ../vim-7.4.089/src/testdir/Makefile 2013-11-08 04:30:06.000000000 +0100 +--- src/testdir/Makefile 2013-11-12 05:20:32.000000000 +0100 +*************** +*** 30,36 **** + test84.out test85.out test86.out test87.out test88.out \ + test89.out test90.out test91.out test92.out test93.out \ + test94.out test95.out test96.out test97.out test98.out \ +! test99.out test100.out test101.out + + SCRIPTS_GUI = test16.out + +--- 30,36 ---- + test84.out test85.out test86.out test87.out test88.out \ + test89.out test90.out test91.out test92.out test93.out \ + test94.out test95.out test96.out test97.out test98.out \ +! test99.out test100.out test101.out test102.out + + SCRIPTS_GUI = test16.out + +*** ../vim-7.4.089/src/version.c 2013-11-12 05:11:58.000000000 +0100 +--- src/version.c 2013-11-12 05:24:24.000000000 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 90, + /**/ + +-- +If you don't get everything you want, think of +everything you didn't get and don't want. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.091 b/SOURCES/7.4.091 new file mode 100644 index 0000000..230601d --- /dev/null +++ b/SOURCES/7.4.091 @@ -0,0 +1,59 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.091 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.091 (after 7.4.089) +Problem: Missing semicolon. +Solution: Add the semicolon. +Files: src/fileio.c + + +*** ../vim-7.4.090/src/fileio.c 2013-11-12 05:11:58.000000000 +0100 +--- src/fileio.c 2013-11-12 18:07:47.000000000 +0100 +*************** +*** 6708,6714 **** + mch_free_acl(acl); + #endif + #ifdef HAVE_SELINUX +! mch_copy_sec(from, to) + #endif + if (errmsg != NULL) + { +--- 6708,6714 ---- + mch_free_acl(acl); + #endif + #ifdef HAVE_SELINUX +! mch_copy_sec(from, to); + #endif + if (errmsg != NULL) + { +*** ../vim-7.4.090/src/version.c 2013-11-12 05:28:08.000000000 +0100 +--- src/version.c 2013-11-12 18:08:33.000000000 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 91, + /**/ + +-- +CART DRIVER: Bring out your dead! + We follow the cart through a wretched, impoverished plague-ridden village. + A few starved mongrels run about in the mud scavenging. In the open + doorway of one house perhaps we jug glimpse a pair of legs dangling from + the ceiling. In another doorway an OLD WOMAN is beating a cat against a + wall rather like one does with a mat. The cart passes round a dead donkey + or cow in the mud. And a MAN tied to a cart is being hammered to death by + four NUNS with huge mallets. + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.092 b/SOURCES/7.4.092 new file mode 100644 index 0000000..e74888e --- /dev/null +++ b/SOURCES/7.4.092 @@ -0,0 +1,62 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.092 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.092 (after 7.4.088) +Problem: Can't build small version. +Solution: Add #ifdef where the b_cjk flag is used. (Ken Takata) +Files: src/spell.c + + +*** ../vim-7.4.091/src/spell.c 2013-11-12 04:43:57.000000000 +0100 +--- src/spell.c 2013-11-14 03:51:24.000000000 +0100 +*************** +*** 4234,4240 **** +--- 4234,4242 ---- + if (spl_copy == NULL) + goto theend; + ++ #ifdef FEAT_MBYTE + wp->w_s->b_cjk = 0; ++ #endif + + /* Loop over comma separated language names. */ + for (splp = spl_copy; *splp != NUL; ) +*************** +*** 4246,4252 **** +--- 4248,4256 ---- + + if (STRCMP(lang, "cjk") == 0) + { ++ #ifdef FEAT_MBYTE + wp->w_s->b_cjk = 1; ++ #endif + continue; + } + +*** ../vim-7.4.091/src/version.c 2013-11-12 18:09:20.000000000 +0100 +--- src/version.c 2013-11-14 03:52:18.000000000 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 92, + /**/ + +-- +ARTHUR: Old woman! +DENNIS: Man! +ARTHUR: Man. I'm sorry. Old man, What knight live in that castle over there? +DENNIS: I'm thirty-seven. + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.093 b/SOURCES/7.4.093 new file mode 100644 index 0000000..24da0a8 --- /dev/null +++ b/SOURCES/7.4.093 @@ -0,0 +1,72 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.093 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.093 +Problem: Configure can't use LuaJIT on ubuntu 12.04. +Solution: Adjust the configure regexp that locates the version number. + (Charles Strahan) +Files: src/configure.in, src/auto/configure + + +*** ../vim-7.4.092/src/configure.in 2013-11-04 04:57:46.000000000 +0100 +--- src/configure.in 2013-11-17 20:12:04.000000000 +0100 +*************** +*** 496,502 **** + if test "X$vi_cv_path_luajit" != "X"; then + dnl -- find LuaJIT version + AC_CACHE_CHECK(LuaJIT version, vi_cv_version_luajit, +! [ vi_cv_version_luajit=`${vi_cv_path_luajit} -v | sed 's/LuaJIT \([[0-9.]]*\)\.[[0-9]] .*/\1/'` ]) + AC_CACHE_CHECK(Lua version of LuaJIT, vi_cv_version_lua_luajit, + [ vi_cv_version_lua_luajit=`${vi_cv_path_luajit} -e "print(_VERSION)" | sed 's/.* //'` ]) + vi_cv_path_lua="$vi_cv_path_luajit" +--- 496,502 ---- + if test "X$vi_cv_path_luajit" != "X"; then + dnl -- find LuaJIT version + AC_CACHE_CHECK(LuaJIT version, vi_cv_version_luajit, +! [ vi_cv_version_luajit=`${vi_cv_path_luajit} -v 2>&1 | sed 's/LuaJIT \([[0-9.]]*\)\.[[0-9]]\(-[[a-z0-9]]\+\)\? .*/\1/'` ]) + AC_CACHE_CHECK(Lua version of LuaJIT, vi_cv_version_lua_luajit, + [ vi_cv_version_lua_luajit=`${vi_cv_path_luajit} -e "print(_VERSION)" | sed 's/.* //'` ]) + vi_cv_path_lua="$vi_cv_path_luajit" +*** ../vim-7.4.092/src/auto/configure 2013-11-04 04:57:46.000000000 +0100 +--- src/auto/configure 2013-11-17 20:13:30.000000000 +0100 +*************** +*** 4743,4749 **** + if test "${vi_cv_version_luajit+set}" = set; then : + $as_echo_n "(cached) " >&6 + else +! vi_cv_version_luajit=`${vi_cv_path_luajit} -v | sed 's/LuaJIT \([0-9.]*\)\.[0-9] .*/\1/'` + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_version_luajit" >&5 + $as_echo "$vi_cv_version_luajit" >&6; } +--- 4743,4749 ---- + if test "${vi_cv_version_luajit+set}" = set; then : + $as_echo_n "(cached) " >&6 + else +! vi_cv_version_luajit=`${vi_cv_path_luajit} -v 2>&1 | sed 's/LuaJIT \([0-9.]*\)\.[0-9]\(-[a-z0-9]\+\)\? .*/\1/'` + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_version_luajit" >&5 + $as_echo "$vi_cv_version_luajit" >&6; } +*** ../vim-7.4.092/src/version.c 2013-11-14 03:54:02.000000000 +0100 +--- src/version.c 2013-11-17 20:13:43.000000000 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 93, + /**/ + +-- +"Beware of bugs in the above code; I have only proved +it correct, not tried it." -- Donald Knuth + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.094 b/SOURCES/7.4.094 new file mode 100644 index 0000000..96ebc4d --- /dev/null +++ b/SOURCES/7.4.094 @@ -0,0 +1,139 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.094 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.094 +Problem: Configure may not find that -lint is needed for gettext(). +Solution: Check for gettext() with empty $LIBS. (Thomas De Schampheleire) +Files: src/configure.in, src/auto/configure + + +*** ../vim-7.4.093/src/configure.in 2013-11-17 20:17:05.000000000 +0100 +--- src/configure.in 2013-11-17 20:23:49.000000000 +0100 +*************** +*** 3725,3730 **** +--- 3725,3733 ---- + fi + + dnl Check if gettext() is working and if it needs -lintl ++ dnl We take care to base this on an empty LIBS: on some systems libelf would be ++ dnl in LIBS and implicitly take along libintl. The final LIBS would then not ++ dnl contain libintl, and the link step would fail due to -Wl,--as-needed. + AC_MSG_CHECKING(--disable-nls argument) + AC_ARG_ENABLE(nls, + [ --disable-nls Don't support NLS (gettext()).], , +*************** +*** 3743,3758 **** + if test -f po/Makefile; then + have_gettext="no" + if test -n "$MSGFMT"; then + AC_TRY_LINK( + [#include ], + [gettext("Test");], +! AC_MSG_RESULT([gettext() works]); have_gettext="yes", +! olibs=$LIBS +! LIBS="$LIBS -lintl" + AC_TRY_LINK( + [#include ], + [gettext("Test");], +! AC_MSG_RESULT([gettext() works with -lintl]); have_gettext="yes", + AC_MSG_RESULT([gettext() doesn't work]); + LIBS=$olibs)) + else +--- 3746,3763 ---- + if test -f po/Makefile; then + have_gettext="no" + if test -n "$MSGFMT"; then ++ olibs=$LIBS ++ LIBS="" + AC_TRY_LINK( + [#include ], + [gettext("Test");], +! AC_MSG_RESULT([gettext() works]); have_gettext="yes"; LIBS=$olibs, +! LIBS="-lintl" + AC_TRY_LINK( + [#include ], + [gettext("Test");], +! AC_MSG_RESULT([gettext() works with -lintl]); have_gettext="yes"; +! LIBS="$olibs -lintl", + AC_MSG_RESULT([gettext() doesn't work]); + LIBS=$olibs)) + else +*** ../vim-7.4.093/src/auto/configure 2013-11-17 20:17:05.000000000 +0100 +--- src/auto/configure 2013-11-17 20:25:13.000000000 +0100 +*************** +*** 12690,12695 **** +--- 12690,12697 ---- + if test -f po/Makefile; then + have_gettext="no" + if test -n "$MSGFMT"; then ++ olibs=$LIBS ++ LIBS="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + #include +*************** +*** 12703,12712 **** + _ACEOF + if ac_fn_c_try_link "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: gettext() works" >&5 +! $as_echo "gettext() works" >&6; }; have_gettext="yes" + else +! olibs=$LIBS +! LIBS="$LIBS -lintl" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + #include +--- 12705,12713 ---- + _ACEOF + if ac_fn_c_try_link "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: gettext() works" >&5 +! $as_echo "gettext() works" >&6; }; have_gettext="yes"; LIBS=$olibs + else +! LIBS="-lintl" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + #include +*************** +*** 12720,12726 **** + _ACEOF + if ac_fn_c_try_link "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: gettext() works with -lintl" >&5 +! $as_echo "gettext() works with -lintl" >&6; }; have_gettext="yes" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: gettext() doesn't work" >&5 + $as_echo "gettext() doesn't work" >&6; }; +--- 12721,12728 ---- + _ACEOF + if ac_fn_c_try_link "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: gettext() works with -lintl" >&5 +! $as_echo "gettext() works with -lintl" >&6; }; have_gettext="yes"; +! LIBS="$olibs -lintl" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: gettext() doesn't work" >&5 + $as_echo "gettext() doesn't work" >&6; }; +*** ../vim-7.4.093/src/version.c 2013-11-17 20:17:05.000000000 +0100 +--- src/version.c 2013-11-17 20:27:43.000000000 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 94, + /**/ + +-- +BLACK KNIGHT: The Black Knight always triumphs. Have at you! + ARTHUR takes his last leg off. The BLACK KNIGHT's body lands upright. +BLACK KNIGHT: All right, we'll call it a draw. + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.095 b/SOURCES/7.4.095 new file mode 100644 index 0000000..f7abfca --- /dev/null +++ b/SOURCES/7.4.095 @@ -0,0 +1,73 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.095 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.095 (after 7.4.093) +Problem: Regexp for LuaJIT version doesn't work on BSD. +Solution: Use "*" instead of "\+" and "\?". (Ozaki) +Files: src/configure.in, src/auto/configure + + +*** ../vim-7.4.094/src/configure.in 2013-11-17 20:32:49.000000000 +0100 +--- src/configure.in 2013-11-21 12:04:46.000000000 +0100 +*************** +*** 496,502 **** + if test "X$vi_cv_path_luajit" != "X"; then + dnl -- find LuaJIT version + AC_CACHE_CHECK(LuaJIT version, vi_cv_version_luajit, +! [ vi_cv_version_luajit=`${vi_cv_path_luajit} -v 2>&1 | sed 's/LuaJIT \([[0-9.]]*\)\.[[0-9]]\(-[[a-z0-9]]\+\)\? .*/\1/'` ]) + AC_CACHE_CHECK(Lua version of LuaJIT, vi_cv_version_lua_luajit, + [ vi_cv_version_lua_luajit=`${vi_cv_path_luajit} -e "print(_VERSION)" | sed 's/.* //'` ]) + vi_cv_path_lua="$vi_cv_path_luajit" +--- 496,502 ---- + if test "X$vi_cv_path_luajit" != "X"; then + dnl -- find LuaJIT version + AC_CACHE_CHECK(LuaJIT version, vi_cv_version_luajit, +! [ vi_cv_version_luajit=`${vi_cv_path_luajit} -v 2>&1 | sed 's/LuaJIT \([[0-9.]]*\)\.[[0-9]]\(-[[a-z0-9]]*\)* .*/\1/'` ]) + AC_CACHE_CHECK(Lua version of LuaJIT, vi_cv_version_lua_luajit, + [ vi_cv_version_lua_luajit=`${vi_cv_path_luajit} -e "print(_VERSION)" | sed 's/.* //'` ]) + vi_cv_path_lua="$vi_cv_path_luajit" +*** ../vim-7.4.094/src/auto/configure 2013-11-17 20:32:49.000000000 +0100 +--- src/auto/configure 2013-11-21 12:07:39.000000000 +0100 +*************** +*** 4743,4749 **** + if test "${vi_cv_version_luajit+set}" = set; then : + $as_echo_n "(cached) " >&6 + else +! vi_cv_version_luajit=`${vi_cv_path_luajit} -v 2>&1 | sed 's/LuaJIT \([0-9.]*\)\.[0-9]\(-[a-z0-9]\+\)\? .*/\1/'` + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_version_luajit" >&5 + $as_echo "$vi_cv_version_luajit" >&6; } +--- 4743,4749 ---- + if test "${vi_cv_version_luajit+set}" = set; then : + $as_echo_n "(cached) " >&6 + else +! vi_cv_version_luajit=`${vi_cv_path_luajit} -v 2>&1 | sed 's/LuaJIT \([0-9.]*\)\.[0-9]\(-[a-z0-9]*\)* .*/\1/'` + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_version_luajit" >&5 + $as_echo "$vi_cv_version_luajit" >&6; } +*** ../vim-7.4.094/src/version.c 2013-11-17 20:32:49.000000000 +0100 +--- src/version.c 2013-11-21 12:06:26.000000000 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 95, + /**/ + +-- +Our job was to build a computer information system for the branch banks. We +were the perfect people for the job: Dean had seen a computer once, and I had +heard Dean talk about it. + (Scott Adams - The Dilbert principle) + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.096 b/SOURCES/7.4.096 new file mode 100644 index 0000000..be20959 --- /dev/null +++ b/SOURCES/7.4.096 @@ -0,0 +1,96 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.096 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.096 +Problem: Can't change directory to an UNC path. +Solution: Use win32_getattrs() in mch_getperm(). (Christian Brabandt) +Files: src/os_win32.c + + +*** ../vim-7.4.095/src/os_win32.c 2013-09-25 19:13:32.000000000 +0200 +--- src/os_win32.c 2013-11-21 12:31:52.000000000 +0100 +*************** +*** 2841,2858 **** + } + + /* +! * get file permissions for `name' +! * -1 : error +! * else mode_t + */ + long + mch_getperm(char_u *name) + { + struct stat st; +! int n; + + n = mch_stat(name, &st); +! return n == 0 ? (int)st.st_mode : -1; + } + + +--- 2841,2860 ---- + } + + /* +! * Get file permissions for "name". +! * Return mode_t or -1 for error. + */ + long + mch_getperm(char_u *name) + { + struct stat st; +! int n; + ++ if (name[0] == '\\' && name[1] == '\\') ++ /* UNC path */ ++ return (long)win32_getattrs(name); + n = mch_stat(name, &st); +! return n == 0 ? (long)st.st_mode : -1L; + } + + +*************** +*** 3094,3101 **** + * -1 : error + * else FILE_ATTRIBUTE_* defined in winnt.h + */ +! static +! int + win32_getattrs(char_u *name) + { + int attr; +--- 3096,3102 ---- + * -1 : error + * else FILE_ATTRIBUTE_* defined in winnt.h + */ +! static int + win32_getattrs(char_u *name) + { + int attr; +*** ../vim-7.4.095/src/version.c 2013-11-21 12:17:46.000000000 +0100 +--- src/version.c 2013-11-21 12:32:46.000000000 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 96, + /**/ + +-- +If your company is not involved in something called "ISO 9000" you probably +have no idea what it is. If your company _is_ involved in ISO 9000 then you +definitely have no idea what it is. + (Scott Adams - The Dilbert principle) + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.097 b/SOURCES/7.4.097 new file mode 100644 index 0000000..cfb6183 --- /dev/null +++ b/SOURCES/7.4.097 @@ -0,0 +1,50 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.097 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.097 (after 7.4.034) +Problem: Unexpected behavior change related to 'virtualedit'. (Ingo Karkat) +Solution: Update the valid cursor position. (Christian Brabandt) +Files: src/ops.c + + +*** ../vim-7.4.096/src/ops.c 2013-11-11 23:17:31.000000000 +0100 +--- src/ops.c 2013-11-21 13:21:24.000000000 +0100 +*************** +*** 3844,3850 **** +--- 3844,3854 ---- + ml_replace(lnum, newp, FALSE); + /* Place cursor on last putted char. */ + if (lnum == curwin->w_cursor.lnum) ++ { ++ /* make sure curwin->w_virtcol is updated */ ++ changed_cline_bef_curs(); + curwin->w_cursor.col += (colnr_T)(totlen - 1); ++ } + } + #ifdef FEAT_VISUAL + if (VIsual_active) +*** ../vim-7.4.096/src/version.c 2013-11-21 12:34:07.000000000 +0100 +--- src/version.c 2013-11-21 13:08:27.000000000 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 97, + /**/ + +-- +The only way the average employee can speak to an executive is by taking a +second job as a golf caddie. + (Scott Adams - The Dilbert principle) + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.098 b/SOURCES/7.4.098 new file mode 100644 index 0000000..78af90e --- /dev/null +++ b/SOURCES/7.4.098 @@ -0,0 +1,243 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.098 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.098 +Problem: When using ":'<,'>del" errors may be given for the visual line + numbers being out of range. +Solution: Reset Visual mode in ":del". (Lech Lorens) +Files: src/ex_docmd.c, src/testdir/test103.in, src/testdir/test103.ok, + src/testdir/Make_amiga.mak, src/testdir/Make_dos.mak, + src/testdir/Make_ming.mak, src/testdir/Make_os2.mak, + src/testdir/Make_vms.mms, src/testdir/Makefile + + +*** ../vim-7.4.097/src/ex_docmd.c 2013-11-09 05:30:18.000000000 +0100 +--- src/ex_docmd.c 2013-11-21 14:04:55.000000000 +0100 +*************** +*** 8570,8575 **** +--- 8570,8580 ---- + beginline(BL_SOL | BL_FIX); + } + ++ #if defined(FEAT_VISUAL) ++ if (VIsual_active) ++ end_visual_mode(); ++ #endif ++ + switch (eap->cmdidx) + { + case CMD_delete: +*** ../vim-7.4.097/src/testdir/test103.in 2013-11-21 14:21:12.000000000 +0100 +--- src/testdir/test103.in 2013-11-21 14:02:09.000000000 +0100 +*************** +*** 0 **** +--- 1,37 ---- ++ Test for visual mode not being reset causing E315 error. ++ STARTTEST ++ :so small.vim ++ :enew ++ :let g:msg="Everything's fine." ++ :function! TriggerTheProblem() ++ : " At this point there is no visual selection because :call reset it. ++ : " Let's restore the selection: ++ : normal gv ++ : '<,'>del _ ++ : try ++ : exe "normal \" ++ : catch /^Vim\%((\a\+)\)\=:E315/ ++ : echom 'Snap! E315 error!' ++ : let g:msg='Snap! E315 error!' ++ : endtry ++ :endfunction ++ :enew ++ :setl buftype=nofile ++ :call append(line('$'), 'Delete this line.') ++ :" ++ :" ++ :" NOTE: this has to be done by a call to a function because executing :del the ++ :" ex-way will require the colon operator which resets the visual mode thus ++ :" preventing the problem: ++ :" ++ GV:call TriggerTheProblem() ++ :%del _ ++ :call append(line('$'), g:msg) ++ :w! test.out ++ :brewind ++ ENDTEST ++ ++ STARTTEST ++ :qa! ++ ENDTEST ++ +*** ../vim-7.4.097/src/testdir/test103.ok 2013-11-21 14:21:12.000000000 +0100 +--- src/testdir/test103.ok 2013-11-21 14:02:28.000000000 +0100 +*************** +*** 0 **** +--- 1,2 ---- ++ ++ Everything's fine. +*** ../vim-7.4.097/src/testdir/Make_amiga.mak 2013-11-12 05:28:08.000000000 +0100 +--- src/testdir/Make_amiga.mak 2013-11-21 14:02:51.000000000 +0100 +*************** +*** 34,40 **** + test81.out test82.out test83.out test84.out test88.out \ + test89.out test90.out test91.out test92.out test93.out \ + test94.out test95.out test96.out test97.out test98.out \ +! test99.out test100.out test101.out test102.out + + .SUFFIXES: .in .out + +--- 34,40 ---- + test81.out test82.out test83.out test84.out test88.out \ + test89.out test90.out test91.out test92.out test93.out \ + test94.out test95.out test96.out test97.out test98.out \ +! test99.out test100.out test101.out test102.out test103.out + + .SUFFIXES: .in .out + +*************** +*** 153,155 **** +--- 153,156 ---- + test100.out: test100.in + test101.out: test101.in + test102.out: test102.in ++ test103.out: test103.in +*** ../vim-7.4.097/src/testdir/Make_dos.mak 2013-11-12 05:28:08.000000000 +0100 +--- src/testdir/Make_dos.mak 2013-11-21 14:02:58.000000000 +0100 +*************** +*** 33,39 **** + test84.out test85.out test86.out test87.out test88.out \ + test89.out test90.out test91.out test92.out test93.out \ + test94.out test95.out test96.out test98.out test99.out \ +! test100.out test101.out test102.out + + SCRIPTS32 = test50.out test70.out + +--- 33,39 ---- + test84.out test85.out test86.out test87.out test88.out \ + test89.out test90.out test91.out test92.out test93.out \ + test94.out test95.out test96.out test98.out test99.out \ +! test100.out test101.out test102.out test103.out + + SCRIPTS32 = test50.out test70.out + +*** ../vim-7.4.097/src/testdir/Make_ming.mak 2013-11-12 05:28:08.000000000 +0100 +--- src/testdir/Make_ming.mak 2013-11-21 14:03:01.000000000 +0100 +*************** +*** 53,59 **** + test84.out test85.out test86.out test87.out test88.out \ + test89.out test90.out test91.out test92.out test93.out \ + test94.out test95.out test96.out test98.out test99.out \ +! test100out test101.out test102.out + + SCRIPTS32 = test50.out test70.out + +--- 53,59 ---- + test84.out test85.out test86.out test87.out test88.out \ + test89.out test90.out test91.out test92.out test93.out \ + test94.out test95.out test96.out test98.out test99.out \ +! test100out test101.out test102.out test103.out + + SCRIPTS32 = test50.out test70.out + +*** ../vim-7.4.097/src/testdir/Make_os2.mak 2013-11-12 05:28:08.000000000 +0100 +--- src/testdir/Make_os2.mak 2013-11-21 14:03:03.000000000 +0100 +*************** +*** 35,41 **** + test81.out test82.out test83.out test84.out test88.out \ + test89.out test90.out test91.out test92.out test93.out \ + test94.out test95.out test96.out test98.out test99.out \ +! test100.out test101.out test102.out + + .SUFFIXES: .in .out + +--- 35,41 ---- + test81.out test82.out test83.out test84.out test88.out \ + test89.out test90.out test91.out test92.out test93.out \ + test94.out test95.out test96.out test98.out test99.out \ +! test100.out test101.out test102.out test103.out + + .SUFFIXES: .in .out + +*** ../vim-7.4.097/src/testdir/Make_vms.mms 2013-11-12 05:28:08.000000000 +0100 +--- src/testdir/Make_vms.mms 2013-11-21 14:03:13.000000000 +0100 +*************** +*** 4,10 **** + # Authors: Zoltan Arpadffy, + # Sandor Kopanyi, + # +! # Last change: 2013 Nov 12 + # + # This has been tested on VMS 6.2 to 8.3 on DEC Alpha, VAX and IA64. + # Edit the lines in the Configuration section below to select. +--- 4,10 ---- + # Authors: Zoltan Arpadffy, + # Sandor Kopanyi, + # +! # Last change: 2013 Nov 21 + # + # This has been tested on VMS 6.2 to 8.3 on DEC Alpha, VAX and IA64. + # Edit the lines in the Configuration section below to select. +*************** +*** 79,85 **** + test82.out test83.out test84.out test88.out test89.out \ + test90.out test91.out test92.out test93.out test94.out \ + test95.out test96.out test97.out test98.out test99.out \ +! test100.out test101.out test102.out + + # Known problems: + # Test 30: a problem around mac format - unknown reason +--- 79,85 ---- + test82.out test83.out test84.out test88.out test89.out \ + test90.out test91.out test92.out test93.out test94.out \ + test95.out test96.out test97.out test98.out test99.out \ +! test100.out test101.out test102.out test103.out + + # Known problems: + # Test 30: a problem around mac format - unknown reason +*** ../vim-7.4.097/src/testdir/Makefile 2013-11-12 05:28:08.000000000 +0100 +--- src/testdir/Makefile 2013-11-21 14:03:23.000000000 +0100 +*************** +*** 30,36 **** + test84.out test85.out test86.out test87.out test88.out \ + test89.out test90.out test91.out test92.out test93.out \ + test94.out test95.out test96.out test97.out test98.out \ +! test99.out test100.out test101.out test102.out + + SCRIPTS_GUI = test16.out + +--- 30,36 ---- + test84.out test85.out test86.out test87.out test88.out \ + test89.out test90.out test91.out test92.out test93.out \ + test94.out test95.out test96.out test97.out test98.out \ +! test99.out test100.out test101.out test102.out test103.out + + SCRIPTS_GUI = test16.out + +*** ../vim-7.4.097/src/version.c 2013-11-21 13:24:36.000000000 +0100 +--- src/version.c 2013-11-21 14:20:34.000000000 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 98, + /**/ + +-- +I recommend ordering large cargo containers of paper towels to make up +whatever budget underruns you have. Paper products are always useful and they +have the advantage of being completely flushable if you need to make room in +the storage area later. + (Scott Adams - The Dilbert principle) + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.099 b/SOURCES/7.4.099 new file mode 100644 index 0000000..a9cf636 --- /dev/null +++ b/SOURCES/7.4.099 @@ -0,0 +1,113 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.099 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.099 +Problem: Append in blockwise Visual mode with "$" is wrong. +Solution: After "$" don't use the code that checks if the cursor was moved. + (Hirohito Higashi, Ken Takata) +Files: src/ops.c, src/testdir/test39.in, src/testdir/test39.ok + + +*** ../vim-7.4.098/src/ops.c 2013-11-21 13:24:36.000000000 +0100 +--- src/ops.c 2013-11-21 14:33:57.000000000 +0100 +*************** +*** 2643,2649 **** + + /* The user may have moved the cursor before inserting something, try + * to adjust the block for that. */ +! if (oap->start.lnum == curbuf->b_op_start.lnum) + { + if (oap->op_type == OP_INSERT + && oap->start.col != curbuf->b_op_start.col) +--- 2643,2649 ---- + + /* The user may have moved the cursor before inserting something, try + * to adjust the block for that. */ +! if (oap->start.lnum == curbuf->b_op_start.lnum && !bd.is_MAX) + { + if (oap->op_type == OP_INSERT + && oap->start.col != curbuf->b_op_start.col) +*** ../vim-7.4.098/src/testdir/test39.in 2013-11-11 01:29:16.000000000 +0100 +--- src/testdir/test39.in 2013-11-21 14:25:55.000000000 +0100 +*************** +*** 23,28 **** +--- 23,40 ---- + /^aaaa/ + :exe ":norm! l\jjjlllI\\ \" + :/^aa/,/^$/w >> test.out ++ :" Test for Visual block was created with the last $ ++ /^A23$/ ++ :exe ":norm! l\j$Aab\" ++ :.,/^$/w >> test.out ++ :" Test for Visual block was created with the middle $ (1) ++ /^B23$/ ++ :exe ":norm! l\j$hAab\" ++ :.,/^$/w >> test.out ++ :" Test for Visual block was created with the middle $ (2) ++ /^C23$/ ++ :exe ":norm! l\j$hhAab\" ++ :.,/^$/w >> test.out + :" gUe must uppercase a whole word, also when � changes to SS + Gothe youtu�euu endYpk0wgUe + :" gUfx must uppercase until x, inclusive. +*************** +*** 49,54 **** +--- 61,75 ---- + cccccc + dddddd + ++ A23 ++ 4567 ++ ++ B23 ++ 4567 ++ ++ C23 ++ 4567 ++ + abcdefghijklm + abcdefghijklm + abcdefghijklm +*** ../vim-7.4.098/src/testdir/test39.ok 2013-11-11 01:29:16.000000000 +0100 +--- src/testdir/test39.ok 2013-11-21 14:25:10.000000000 +0100 +*************** +*** 8,13 **** +--- 8,22 ---- + ccc ccc + ddd ddd + ++ A23ab ++ 4567ab ++ ++ B23 ab ++ 4567ab ++ ++ C23ab ++ 456ab7 ++ + the YOUTUSSEUU end + - yOUSSTUSSEXu - + THE YOUTUSSEUU END +*** ../vim-7.4.098/src/version.c 2013-11-21 14:21:25.000000000 +0100 +--- src/version.c 2013-11-21 14:34:28.000000000 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 99, + /**/ + +-- +If the Universe is constantly expanding, why can't I ever find a parking space? + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.100 b/SOURCES/7.4.100 new file mode 100644 index 0000000..c3c0cb6 --- /dev/null +++ b/SOURCES/7.4.100 @@ -0,0 +1,82 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.100 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.100 +Problem: NFA regexp doesn't handle backreference correctly. (Ryuichi + Hayashida, Urtica Dioica) +Solution: Always add NFA_SKIP, also when it already exists at the start + position. +Files: src/regexp_nfa.c, src/testdir/test64.in, src/testdir/test64.ok + + +*** ../vim-7.4.099/src/regexp_nfa.c 2013-10-06 15:46:06.000000000 +0200 +--- src/regexp_nfa.c 2013-11-21 15:58:58.000000000 +0100 +*************** +*** 4278,4284 **** + * endless loop for "\(\)*" */ + + default: +! if (state->lastlist[nfa_ll_index] == l->id) + { + /* This state is already in the list, don't add it again, + * unless it is an MOPEN that is used for a backreference or +--- 4278,4284 ---- + * endless loop for "\(\)*" */ + + default: +! if (state->lastlist[nfa_ll_index] == l->id && state->c != NFA_SKIP) + { + /* This state is already in the list, don't add it again, + * unless it is an MOPEN that is used for a backreference or +*** ../vim-7.4.099/src/testdir/test64.in 2013-09-25 18:16:34.000000000 +0200 +--- src/testdir/test64.in 2013-11-21 15:58:19.000000000 +0100 +*************** +*** 406,411 **** +--- 406,412 ---- + :call add(tl, [2, '^.*\.\(.*\)/.\+\(\1\)\@ +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.101 +Problem: Using \1 in pattern goes one line too far. (Bohr Shaw, John Little) +Solution: Only advance the match end for the matched characters in the last + line. +Files: src/regexp.c, src/testdir/test64.in, src/testdir/test64.ok + + +*** ../vim-7.4.100/src/regexp.c 2013-09-19 17:03:57.000000000 +0200 +--- src/regexp.c 2013-11-21 16:58:38.000000000 +0100 +*************** +*** 6455,6461 **** + /* + * Check whether a backreference matches. + * Returns RA_FAIL, RA_NOMATCH or RA_MATCH. +! * If "bytelen" is not NULL, it is set to the bytelength of the whole match. + */ + static int + match_with_backref(start_lnum, start_col, end_lnum, end_col, bytelen) +--- 6455,6462 ---- + /* + * Check whether a backreference matches. + * Returns RA_FAIL, RA_NOMATCH or RA_MATCH. +! * If "bytelen" is not NULL, it is set to the byte length of the match in the +! * last line. + */ + static int + match_with_backref(start_lnum, start_col, end_lnum, end_col, bytelen) +*************** +*** 6511,6516 **** +--- 6512,6519 ---- + + /* Advance to next line. */ + reg_nextline(); ++ if (bytelen != NULL) ++ *bytelen = 0; + ++clnum; + ccol = 0; + if (got_int) +*** ../vim-7.4.100/src/testdir/test64.in 2013-11-21 16:03:35.000000000 +0100 +--- src/testdir/test64.in 2013-11-21 16:56:20.000000000 +0100 +*************** +*** 507,512 **** +--- 507,514 ---- + :" Check a pattern with a line break and ^ and $ + :call add(tl, [2, 'a\n^b$\n^c', ['a', 'b', 'c'], ['XX']]) + :" ++ :call add(tl, [2, '\(^.\+\n\)\1', [' dog', ' dog', 'asdf'], ['XXasdf']]) ++ :" + :"""" Run the multi-line tests + :" + :$put ='multi-line tests' +*** ../vim-7.4.100/src/testdir/test64.ok 2013-11-21 16:03:35.000000000 +0100 +--- src/testdir/test64.ok 2013-11-21 16:57:41.000000000 +0100 +*************** +*** 1031,1036 **** +--- 1031,1039 ---- + OK 0 - a\n^b$\n^c + OK 1 - a\n^b$\n^c + OK 2 - a\n^b$\n^c ++ OK 0 - \(^.\+\n\)\1 ++ OK 1 - \(^.\+\n\)\1 ++ OK 2 - \(^.\+\n\)\1 + + Ta 5 + Ac 7 +*** ../vim-7.4.100/src/version.c 2013-11-21 16:03:35.000000000 +0100 +--- src/version.c 2013-11-21 16:44:00.000000000 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 101, + /**/ + +-- +The budget process was invented by an alien race of sadistic beings who +resemble large cats. + (Scott Adams - The Dilbert principle) + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.102 b/SOURCES/7.4.102 new file mode 100644 index 0000000..b413413 --- /dev/null +++ b/SOURCES/7.4.102 @@ -0,0 +1,84 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.102 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.102 +Problem: Crash when interrupting "z=". +Solution: Add safety check for word length. (Christian Brabandt, Dominique + Pelle) +Files: src/spell.c + + +*** ../vim-7.4.101/src/spell.c 2013-11-14 03:54:02.000000000 +0100 +--- src/spell.c 2013-11-21 17:37:04.000000000 +0100 +*************** +*** 13398,13406 **** + + /* Lookup the word "orgnr" one of the two tries. */ + n = 0; +- wlen = 0; + wordcount = 0; +! for (;;) + { + i = 1; + if (wordcount == orgnr && byts[n + 1] == NUL) +--- 13398,13405 ---- + + /* Lookup the word "orgnr" one of the two tries. */ + n = 0; + wordcount = 0; +! for (wlen = 0; wlen < MAXWLEN - 3; ++wlen) + { + i = 1; + if (wordcount == orgnr && byts[n + 1] == NUL) +*************** +*** 13414,13419 **** +--- 13413,13419 ---- + if (i > byts[n]) /* safety check */ + { + STRCPY(theword + wlen, "BAD"); ++ wlen += 3; + goto badword; + } + +*************** +*** 13426,13432 **** + wordcount += wc; + } + +! theword[wlen++] = byts[n + i]; + n = idxs[n + i]; + } + badword: +--- 13426,13432 ---- + wordcount += wc; + } + +! theword[wlen] = byts[n + i]; + n = idxs[n + i]; + } + badword: +*** ../vim-7.4.101/src/version.c 2013-11-21 17:12:55.000000000 +0100 +--- src/version.c 2013-11-21 17:38:21.000000000 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 102, + /**/ + +-- +Engineers will go without food and hygiene for days to solve a problem. +(Other times just because they forgot.) + (Scott Adams - The Dilbert principle) + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.103 b/SOURCES/7.4.103 new file mode 100644 index 0000000..4dbce99 --- /dev/null +++ b/SOURCES/7.4.103 @@ -0,0 +1,93 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.103 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.103 +Problem: Dos installer uses an old way to escape spaces in the diff + command. +Solution: Adjust the quoting to the new default shellxquote. (Ben Fritz) +Files: src/dosinst.c + + +*** ../vim-7.4.102/src/dosinst.c 2013-11-07 04:49:23.000000000 +0100 +--- src/dosinst.c 2013-11-21 18:12:13.000000000 +0100 +*************** +*** 1192,1214 **** + fprintf(fd, " if arg3 =~ ' ' | let arg3 = '\"' . arg3 . '\"' | endif\n"); + + /* If the path has a space: When using cmd.exe (Win NT/2000/XP) put +! * quotes around the whole command and around the diff command. + * Otherwise put a double quote just before the space and at the + * end of the command. Putting quotes around the whole thing + * doesn't work on Win 95/98/ME. This is mostly guessed! */ +- fprintf(fd, " let eq = ''\n"); + fprintf(fd, " if $VIMRUNTIME =~ ' '\n"); + fprintf(fd, " if &sh =~ '\\ ' . arg3 . eq\n"); +! + fprintf(fd, "endfunction\n"); + fprintf(fd, "\n"); + } +--- 1192,1220 ---- + fprintf(fd, " if arg3 =~ ' ' | let arg3 = '\"' . arg3 . '\"' | endif\n"); + + /* If the path has a space: When using cmd.exe (Win NT/2000/XP) put +! * quotes around the diff command and rely on the default value of +! * shellxquote to solve the quoting problem for the whole command. +! * + * Otherwise put a double quote just before the space and at the + * end of the command. Putting quotes around the whole thing + * doesn't work on Win 95/98/ME. This is mostly guessed! */ + fprintf(fd, " if $VIMRUNTIME =~ ' '\n"); + fprintf(fd, " if &sh =~ '\\ ' . arg3\n"); +! fprintf(fd, " if exists('l:shxq_sav')\n"); +! fprintf(fd, " let &shellxquote=l:shxq_sav\n"); +! fprintf(fd, " endif\n"); + fprintf(fd, "endfunction\n"); + fprintf(fd, "\n"); + } +*** ../vim-7.4.102/src/version.c 2013-11-21 17:42:26.000000000 +0100 +--- src/version.c 2013-11-21 18:11:08.000000000 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 103, + /**/ + +-- +The fastest way to get an engineer to solve a problem is to declare that the +problem is unsolvable. No engineer can walk away from an unsolvable problem +until it's solved. + (Scott Adams - The Dilbert principle) + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.104 b/SOURCES/7.4.104 new file mode 100644 index 0000000..6e51568 --- /dev/null +++ b/SOURCES/7.4.104 @@ -0,0 +1,107 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.104 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.104 +Problem: ":help s/\_" reports an internal error. (John Beckett) +Solution: Check for NUL and invalid character classes. +Files: src/regexp_nfa.c + + +*** ../vim-7.4.103/src/regexp_nfa.c 2013-11-21 16:03:35.000000000 +0100 +--- src/regexp_nfa.c 2013-11-28 14:05:34.000000000 +0100 +*************** +*** 239,245 **** +--- 239,247 ---- + NFA_UPPER, NFA_NUPPER + }; + ++ static char_u e_nul_found[] = N_("E865: (NFA) Regexp end encountered prematurely"); + static char_u e_misplaced[] = N_("E866: (NFA regexp) Misplaced %c"); ++ static char_u e_ill_char_class[] = N_("E877: (NFA regexp) Invalid character class: %ld"); + + /* NFA regexp \ze operator encountered. */ + static int nfa_has_zend; +*************** +*** 1137,1143 **** + switch (c) + { + case NUL: +! EMSG_RET_FAIL(_("E865: (NFA) Regexp end encountered prematurely")); + + case Magic('^'): + EMIT(NFA_BOL); +--- 1139,1145 ---- + switch (c) + { + case NUL: +! EMSG_RET_FAIL(_(e_nul_found)); + + case Magic('^'): + EMIT(NFA_BOL); +*************** +*** 1160,1165 **** +--- 1162,1170 ---- + + case Magic('_'): + c = no_Magic(getchr()); ++ if (c == NUL) ++ EMSG_RET_FAIL(_(e_nul_found)); ++ + if (c == '^') /* "\_^" is start-of-line */ + { + EMIT(NFA_BOL); +*************** +*** 1216,1221 **** +--- 1221,1232 ---- + p = vim_strchr(classchars, no_Magic(c)); + if (p == NULL) + { ++ if (extra == NFA_ADD_NL) ++ { ++ EMSGN(_(e_ill_char_class), c); ++ rc_did_emsg = TRUE; ++ return FAIL; ++ } + EMSGN("INTERNAL: Unknown character class char: %ld", c); + return FAIL; + } +*************** +*** 4733,4739 **** + + default: + /* should not be here :P */ +! EMSGN("E877: (NFA regexp) Invalid character class: %ld", class); + return FAIL; + } + return FAIL; +--- 4744,4750 ---- + + default: + /* should not be here :P */ +! EMSGN(_(e_ill_char_class), class); + return FAIL; + } + return FAIL; +*** ../vim-7.4.103/src/version.c 2013-11-21 18:13:26.000000000 +0100 +--- src/version.c 2013-11-28 14:06:59.000000000 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 104, + /**/ + +-- +Everybody wants to go to heaven, but nobody wants to die. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.105 b/SOURCES/7.4.105 new file mode 100644 index 0000000..f219ac6 --- /dev/null +++ b/SOURCES/7.4.105 @@ -0,0 +1,58 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.105 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.105 +Problem: Completing a tag pattern may give an error for invalid pattern. +Solution: Suppress the error, just return no matches. +Files: src/tag.c + + +*** ../vim-7.4.104/src/tag.c 2013-11-08 04:30:06.000000000 +0100 +--- src/tag.c 2013-11-28 14:27:38.000000000 +0100 +*************** +*** 1326,1331 **** +--- 1326,1332 ---- + int match_no_ic = 0;/* matches with rm_ic == FALSE */ + int match_re; /* match with regexp */ + int matchoff = 0; ++ int save_emsg_off; + + #ifdef FEAT_EMACS_TAGS + /* +*************** +*** 1442,1448 **** +--- 1443,1452 ---- + if (p_tl != 0 && orgpat.len > p_tl) /* adjust for 'taglength' */ + orgpat.len = p_tl; + ++ save_emsg_off = emsg_off; ++ emsg_off = TRUE; /* don't want error for invalid RE here */ + prepare_pats(&orgpat, has_re); ++ emsg_off = save_emsg_off; + if (has_re && orgpat.regmatch.regprog == NULL) + goto findtag_end; + +*** ../vim-7.4.104/src/version.c 2013-11-28 14:20:11.000000000 +0100 +--- src/version.c 2013-11-28 14:30:35.000000000 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 105, + /**/ + +-- +The goal of science is to build better mousetraps. +The goal of nature is to build better mice. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.106 b/SOURCES/7.4.106 new file mode 100644 index 0000000..13ab0b1 --- /dev/null +++ b/SOURCES/7.4.106 @@ -0,0 +1,68 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.106 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.106 +Problem: Can't build with Ruby using Cygwin. +Solution: Fix library name in makefile. (Steve Hall) +Files: src/Make_cyg.mak + + +*** ../vim-7.4.105/src/Make_cyg.mak 2013-09-19 20:48:59.000000000 +0200 +--- src/Make_cyg.mak 2013-11-28 16:29:52.000000000 +0100 +*************** +*** 1,6 **** + # + # Makefile for VIM on Win32, using Cygnus gcc +! # Last updated by Dan Sharp. Last Change: 2013 Sep 19 + # + # Also read INSTALLpc.txt! + # +--- 1,6 ---- + # + # Makefile for VIM on Win32, using Cygnus gcc +! # Last updated by Dan Sharp. Last Change: 2013 Nov 28 + # + # Also read INSTALLpc.txt! + # +*************** +*** 272,278 **** + DEFINES += -DDYNAMIC_RUBY -DDYNAMIC_RUBY_DLL=\"$(RUBY_INSTALL_NAME).dll\" + DEFINES += -DDYNAMIC_RUBY_VER=$(RUBY_VER) + else +! EXTRA_LIBS += $(RUBY)/lib/$(RUBY_INSTALL_NAME).lib + endif + endif + +--- 272,278 ---- + DEFINES += -DDYNAMIC_RUBY -DDYNAMIC_RUBY_DLL=\"$(RUBY_INSTALL_NAME).dll\" + DEFINES += -DDYNAMIC_RUBY_VER=$(RUBY_VER) + else +! EXTRA_LIBS += $(RUBY)/lib/$(RUBY_INSTALL_NAME) + endif + endif + +*** ../vim-7.4.105/src/version.c 2013-11-28 14:36:24.000000000 +0100 +--- src/version.c 2013-11-28 16:29:25.000000000 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 106, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +7. You finally do take that vacation, but only after buying a cellular modem + and a laptop. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.107 b/SOURCES/7.4.107 new file mode 100644 index 0000000..5ac7189 --- /dev/null +++ b/SOURCES/7.4.107 @@ -0,0 +1,639 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.107 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.107 +Problem: Python: When vim.eval() encounters a Vim error, a try/catch in the + Python code doesn't catch it. (Yggdroot Chen) +Solution: Throw exceptions on errors in vim.eval(). (ZyX) +Files: src/ex_eval.c, src/if_py_both.h, src/proto/ex_eval.pro, + src/testdir/test86.in, src/testdir/test86.ok, + src/testdir/test87.in, src/testdir/test87.ok + + +*** ../vim-7.4.106/src/ex_eval.c 2013-06-08 15:50:28.000000000 +0200 +--- src/ex_eval.c 2013-11-28 16:59:09.000000000 +0100 +*************** +*** 321,326 **** +--- 321,337 ---- + } + + /* ++ * Free global "*msg_list" and the messages it contains, then set "*msg_list" ++ * to NULL. ++ */ ++ void ++ free_global_msglist() ++ { ++ free_msglist(*msg_list); ++ *msg_list = NULL; ++ } ++ ++ /* + * Throw the message specified in the call to cause_errthrow() above as an + * error exception. If cstack is NULL, postpone the throw until do_cmdline() + * has returned (see do_one_cmd()). +*************** +*** 410,475 **** + return TRUE; + } + +- + /* +! * Throw a new exception. Return FAIL when out of memory or it was tried to +! * throw an illegal user exception. "value" is the exception string for a user +! * or interrupt exception, or points to a message list in case of an error +! * exception. + */ +! static int +! throw_exception(value, type, cmdname) + void *value; + int type; + char_u *cmdname; + { +! except_T *excp; +! char_u *p, *mesg, *val; + int cmdlen; +! +! /* +! * Disallow faking Interrupt or error exceptions as user exceptions. They +! * would be treated differently from real interrupt or error exceptions when +! * no active try block is found, see do_cmdline(). +! */ +! if (type == ET_USER) +! { +! if (STRNCMP((char_u *)value, "Vim", 3) == 0 && +! (((char_u *)value)[3] == NUL || ((char_u *)value)[3] == ':' || +! ((char_u *)value)[3] == '(')) +! { +! EMSG(_("E608: Cannot :throw exceptions with 'Vim' prefix")); +! goto fail; +! } +! } +! +! excp = (except_T *)alloc((unsigned)sizeof(except_T)); +! if (excp == NULL) +! goto nomem; + + if (type == ET_ERROR) + { +! /* Store the original message and prefix the exception value with +! * "Vim:" or, if a command name is given, "Vim(cmdname):". */ +! excp->messages = (struct msglist *)value; +! mesg = excp->messages->throw_msg; + if (cmdname != NULL && *cmdname != NUL) + { + cmdlen = (int)STRLEN(cmdname); +! excp->value = vim_strnsave((char_u *)"Vim(", + 4 + cmdlen + 2 + (int)STRLEN(mesg)); +! if (excp->value == NULL) +! goto nomem; +! STRCPY(&excp->value[4], cmdname); +! STRCPY(&excp->value[4 + cmdlen], "):"); +! val = excp->value + 4 + cmdlen + 2; + } + else + { +! excp->value = vim_strnsave((char_u *)"Vim:", 4 + (int)STRLEN(mesg)); +! if (excp->value == NULL) +! goto nomem; +! val = excp->value + 4; + } + + /* msg_add_fname may have been used to prefix the message with a file +--- 421,461 ---- + return TRUE; + } + + /* +! * Get an exception message that is to be stored in current_exception->value. + */ +! char_u * +! get_exception_string(value, type, cmdname, should_free) + void *value; + int type; + char_u *cmdname; ++ int *should_free; + { +! char_u *ret, *mesg; + int cmdlen; +! char_u *p, *val; + + if (type == ET_ERROR) + { +! *should_free = FALSE; +! mesg = ((struct msglist *)value)->throw_msg; + if (cmdname != NULL && *cmdname != NUL) + { + cmdlen = (int)STRLEN(cmdname); +! ret = vim_strnsave((char_u *)"Vim(", + 4 + cmdlen + 2 + (int)STRLEN(mesg)); +! if (ret == NULL) +! return ret; +! STRCPY(&ret[4], cmdname); +! STRCPY(&ret[4 + cmdlen], "):"); +! val = ret + 4 + cmdlen + 2; + } + else + { +! ret = vim_strnsave((char_u *)"Vim:", 4 + (int)STRLEN(mesg)); +! if (ret == NULL) +! return ret; +! val = ret + 4; + } + + /* msg_add_fname may have been used to prefix the message with a file +*************** +*** 506,519 **** + } + } + else +! excp->value = value; + + excp->type = type; + excp->throw_name = vim_strsave(sourcing_name == NULL + ? (char_u *)"" : sourcing_name); + if (excp->throw_name == NULL) + { +! if (type == ET_ERROR) + vim_free(excp->value); + goto nomem; + } +--- 492,556 ---- + } + } + else +! { +! *should_free = FALSE; +! ret = (char_u *) value; +! } +! +! return ret; +! } +! +! +! /* +! * Throw a new exception. Return FAIL when out of memory or it was tried to +! * throw an illegal user exception. "value" is the exception string for a +! * user or interrupt exception, or points to a message list in case of an +! * error exception. +! */ +! static int +! throw_exception(value, type, cmdname) +! void *value; +! int type; +! char_u *cmdname; +! { +! except_T *excp; +! int should_free; +! +! /* +! * Disallow faking Interrupt or error exceptions as user exceptions. They +! * would be treated differently from real interrupt or error exceptions +! * when no active try block is found, see do_cmdline(). +! */ +! if (type == ET_USER) +! { +! if (STRNCMP((char_u *)value, "Vim", 3) == 0 +! && (((char_u *)value)[3] == NUL || ((char_u *)value)[3] == ':' +! || ((char_u *)value)[3] == '(')) +! { +! EMSG(_("E608: Cannot :throw exceptions with 'Vim' prefix")); +! goto fail; +! } +! } +! +! excp = (except_T *)alloc((unsigned)sizeof(except_T)); +! if (excp == NULL) +! goto nomem; +! +! if (type == ET_ERROR) +! /* Store the original message and prefix the exception value with +! * "Vim:" or, if a command name is given, "Vim(cmdname):". */ +! excp->messages = (struct msglist *)value; +! +! excp->value = get_exception_string(value, type, cmdname, &should_free); +! if (excp->value == NULL && should_free) +! goto nomem; + + excp->type = type; + excp->throw_name = vim_strsave(sourcing_name == NULL + ? (char_u *)"" : sourcing_name); + if (excp->throw_name == NULL) + { +! if (should_free) + vim_free(excp->value); + goto nomem; + } +*************** +*** 2033,2042 **** + /* If an error was about to be converted to an exception when + * enter_cleanup() was called, free the message list. */ + if (msg_list != NULL) +! { +! free_msglist(*msg_list); +! *msg_list = NULL; +! } + } + + /* +--- 2070,2076 ---- + /* If an error was about to be converted to an exception when + * enter_cleanup() was called, free the message list. */ + if (msg_list != NULL) +! free_global_msglist(); + } + + /* +*** ../vim-7.4.106/src/if_py_both.h 2013-11-11 01:05:43.000000000 +0100 +--- src/if_py_both.h 2013-11-28 17:00:22.000000000 +0100 +*************** +*** 566,571 **** +--- 566,593 ---- + PyErr_SetNone(PyExc_KeyboardInterrupt); + return -1; + } ++ else if (msg_list != NULL && *msg_list != NULL) ++ { ++ int should_free; ++ char_u *msg; ++ ++ msg = get_exception_string(*msg_list, ET_ERROR, NULL, &should_free); ++ ++ if (msg == NULL) ++ { ++ PyErr_NoMemory(); ++ return -1; ++ } ++ ++ PyErr_SetVim((char *) msg); ++ ++ free_global_msglist(); ++ ++ if (should_free) ++ vim_free(msg); ++ ++ return -1; ++ } + else if (!did_throw) + return (PyErr_Occurred() ? -1 : 0); + /* Python exception is preferred over vim one; unlikely to occur though */ +*** ../vim-7.4.106/src/proto/ex_eval.pro 2013-08-10 13:37:10.000000000 +0200 +--- src/proto/ex_eval.pro 2013-11-28 16:56:33.000000000 +0100 +*************** +*** 4,11 **** +--- 4,13 ---- + int should_abort __ARGS((int retcode)); + int aborted_in_try __ARGS((void)); + int cause_errthrow __ARGS((char_u *mesg, int severe, int *ignore)); ++ void free_global_msglist __ARGS((void)); + void do_errthrow __ARGS((struct condstack *cstack, char_u *cmdname)); + int do_intthrow __ARGS((struct condstack *cstack)); ++ char_u *get_exception_string __ARGS((void *value, int type, char_u *cmdname, int *should_free)); + void discard_current_exception __ARGS((void)); + void report_make_pending __ARGS((int pending, void *value)); + void report_resume_pending __ARGS((int pending, void *value)); +*** ../vim-7.4.106/src/testdir/test86.in 2013-11-11 01:05:43.000000000 +0100 +--- src/testdir/test86.in 2013-11-28 16:41:01.000000000 +0100 +*************** +*** 179,184 **** +--- 179,210 ---- + :unlockvar! l + :" + :" Function calls ++ py << EOF ++ import sys ++ def ee(expr, g=globals(), l=locals()): ++ try: ++ exec(expr, g, l) ++ except: ++ ei = sys.exc_info() ++ msg = sys.exc_info()[0].__name__ + ':' + repr(sys.exc_info()[1].args) ++ msg = msg.replace('TypeError:(\'argument 1 ', 'TypeError:(\'') ++ if expr.find('None') > -1: ++ msg = msg.replace('TypeError:(\'iteration over non-sequence\',)', ++ 'TypeError:("\'NoneType\' object is not iterable",)') ++ if expr.find('FailingNumber') > -1: ++ msg = msg.replace(', not \'FailingNumber\'', '').replace('"', '\'') ++ msg = msg.replace('TypeError:(\'iteration over non-sequence\',)', ++ 'TypeError:("\'FailingNumber\' object is not iterable",)') ++ if msg.find('(\'\'') > -1 or msg.find('(\'can\'t') > -1: ++ msg = msg.replace('(\'', '("').replace('\',)', '",)') ++ if expr == 'fd(self=[])': ++ # HACK: PyMapping_Check changed meaning ++ msg = msg.replace('AttributeError:(\'keys\',)', ++ 'TypeError:(\'unable to convert list to vim dictionary\',)') ++ vim.current.buffer.append(expr + ':' + msg) ++ else: ++ vim.current.buffer.append(expr + ':NOT FAILED') ++ EOF + :fun New(...) + : return ['NewStart']+a:000+['NewEnd'] + :endfun +*************** +*** 193,210 **** + :$put =string(l) + :py l.extend([l[0].name]) + :$put =string(l) +! :try +! : py l[1](1, 2, 3) +! :catch +! : $put =v:exception[:16] +! :endtry + :py f=l[0] + :delfunction New +! :try +! : py f(1, 2, 3) +! :catch +! : $put =v:exception[:16] +! :endtry + :if has('float') + : let l=[0.0] + : py l=vim.bindeval('l') +--- 219,228 ---- + :$put =string(l) + :py l.extend([l[0].name]) + :$put =string(l) +! :py ee('l[1](1, 2, 3)') + :py f=l[0] + :delfunction New +! :py ee('f(1, 2, 3)') + :if has('float') + : let l=[0.0] + : py l=vim.bindeval('l') +*************** +*** 216,222 **** + :let messages=[] + :delfunction DictNew + py < 8 # check if the background thread is working + :py del time + :py del threading ++ :py del t + :$put =string(l) + :" + :" settrace +*************** +*** 882,910 **** + :fun D() + :endfun + py << EOF +- def ee(expr, g=globals(), l=locals()): +- try: +- exec(expr, g, l) +- except: +- ei = sys.exc_info() +- msg = sys.exc_info()[0].__name__ + ':' + repr(sys.exc_info()[1].args) +- msg = msg.replace('TypeError:(\'argument 1 ', 'TypeError:(\'') +- if expr.find('None') > -1: +- msg = msg.replace('TypeError:(\'iteration over non-sequence\',)', +- 'TypeError:("\'NoneType\' object is not iterable",)') +- if expr.find('FailingNumber') > -1: +- msg = msg.replace(', not \'FailingNumber\'', '').replace('"', '\'') +- msg = msg.replace('TypeError:(\'iteration over non-sequence\',)', +- 'TypeError:("\'FailingNumber\' object is not iterable",)') +- if msg.find('(\'\'') > -1 or msg.find('(\'can\'t') > -1: +- msg = msg.replace('(\'', '("').replace('\',)', '",)') +- if expr == 'fd(self=[])': +- # HACK: PyMapping_Check changed meaning +- msg = msg.replace('AttributeError:(\'keys\',)', +- 'TypeError:(\'unable to convert list to vim dictionary\',)') +- cb.append(expr + ':' + msg) +- else: +- cb.append(expr + ':NOT FAILED') + d = vim.Dictionary() + ned = vim.Dictionary(foo='bar', baz='abcD') + dl = vim.Dictionary(a=1) +--- 900,905 ---- +*************** +*** 1276,1281 **** +--- 1271,1277 ---- + ee('vim.eval("Exe(\'throw \'\'ghi\'\'\')")') + ee('vim.eval("Exe(\'echoerr \'\'jkl\'\'\')")') + ee('vim.eval("Exe(\'xxx_non_existent_command_xxx\')")') ++ ee('vim.eval("xxx_unknown_function_xxx()")') + ee('vim.bindeval("Exe(\'xxx_non_existent_command_xxx\')")') + del Exe + EOF +*** ../vim-7.4.106/src/testdir/test86.ok 2013-11-11 01:05:43.000000000 +0100 +--- src/testdir/test86.ok 2013-11-28 16:41:01.000000000 +0100 +*************** +*** 53,60 **** + [function('New'), function('DictNew'), 'NewStart', 1, 2, 3, 'NewEnd'] + [function('New'), function('DictNew'), 'NewStart', 1, 2, 3, 'NewEnd', 'DictNewStart', 1, 2, 3, 'DictNewEnd', {'a': 'b'}] + [function('New'), function('DictNew'), 'NewStart', 1, 2, 3, 'NewEnd', 'DictNewStart', 1, 2, 3, 'DictNewEnd', {'a': 'b'}, 'New'] +! Vim(python):E725: +! Vim(python):E117: + [0.0, 0.0] + KeyError + TypeError +--- 53,60 ---- + [function('New'), function('DictNew'), 'NewStart', 1, 2, 3, 'NewEnd'] + [function('New'), function('DictNew'), 'NewStart', 1, 2, 3, 'NewEnd', 'DictNewStart', 1, 2, 3, 'DictNewEnd', {'a': 'b'}] + [function('New'), function('DictNew'), 'NewStart', 1, 2, 3, 'NewEnd', 'DictNewStart', 1, 2, 3, 'DictNewEnd', {'a': 'b'}, 'New'] +! l[1](1, 2, 3):error:('Vim:E725: Calling dict function without Dictionary: DictNew',) +! f(1, 2, 3):error:('Vim:E117: Unknown function: New',) + [0.0, 0.0] + KeyError + TypeError +*************** +*** 1197,1202 **** +--- 1197,1203 ---- + vim.eval("Exe('throw ''ghi''')"):error:('ghi',) + vim.eval("Exe('echoerr ''jkl''')"):error:('Vim(echoerr):jkl',) + vim.eval("Exe('xxx_non_existent_command_xxx')"):error:('Vim:E492: Not an editor command: xxx_non_existent_command_xxx',) ++ vim.eval("xxx_unknown_function_xxx()"):error:('Vim:E117: Unknown function: xxx_unknown_function_xxx',) + vim.bindeval("Exe('xxx_non_existent_command_xxx')"):error:('Vim:E492: Not an editor command: xxx_non_existent_command_xxx',) + Caught KeyboardInterrupt + Running :put +*** ../vim-7.4.106/src/testdir/test87.in 2013-11-11 01:05:43.000000000 +0100 +--- src/testdir/test87.in 2013-11-28 16:41:01.000000000 +0100 +*************** +*** 172,177 **** +--- 172,207 ---- + :unlockvar! l + :" + :" Function calls ++ py3 << EOF ++ import sys ++ import re ++ ++ py33_type_error_pattern = re.compile('^__call__\(\) takes (\d+) positional argument but (\d+) were given$') ++ ++ def ee(expr, g=globals(), l=locals()): ++ cb = vim.current.buffer ++ try: ++ try: ++ exec(expr, g, l) ++ except Exception as e: ++ if sys.version_info >= (3, 3) and e.__class__ is AttributeError and str(e).find('has no attribute')>=0 and not str(e).startswith("'vim."): ++ cb.append(expr + ':' + repr((e.__class__, AttributeError(str(e)[str(e).rfind(" '") + 2:-1])))) ++ elif sys.version_info >= (3, 3) and e.__class__ is ImportError and str(e).find('No module named \'') >= 0: ++ cb.append(expr + ':' + repr((e.__class__, ImportError(str(e).replace("'", ''))))) ++ elif sys.version_info >= (3, 3) and e.__class__ is TypeError: ++ m = py33_type_error_pattern.search(str(e)) ++ if m: ++ msg = '__call__() takes exactly {0} positional argument ({1} given)'.format(m.group(1), m.group(2)) ++ cb.append(expr + ':' + repr((e.__class__, TypeError(msg)))) ++ else: ++ cb.append(expr + ':' + repr((e.__class__, e))) ++ else: ++ cb.append(expr + ':' + repr((e.__class__, e))) ++ else: ++ cb.append(expr + ':NOT FAILED') ++ except Exception as e: ++ cb.append(expr + '::' + repr((e.__class__, e))) ++ EOF + :fun New(...) + : return ['NewStart']+a:000+['NewEnd'] + :endfun +*************** +*** 186,203 **** + :$put =string(l) + :py3 l+=[l[0].name] + :$put =string(l) +! :try +! : py3 l[1](1, 2, 3) +! :catch +! : $put =v:exception[:13] +! :endtry + :py3 f=l[0] + :delfunction New +! :try +! : py3 f(1, 2, 3) +! :catch +! : $put =v:exception[:13] +! :endtry + :if has('float') + : let l=[0.0] + : py3 l=vim.bindeval('l') +--- 216,225 ---- + :$put =string(l) + :py3 l+=[l[0].name] + :$put =string(l) +! :py3 ee('l[1](1, 2, 3)') + :py3 f=l[0] + :delfunction New +! :py3 ee('f(1, 2, 3)') + :if has('float') + : let l=[0.0] + : py3 l=vim.bindeval('l') +*************** +*** 315,320 **** +--- 337,343 ---- + :py3 l[0] = t.t > 8 # check if the background thread is working + :py3 del time + :py3 del threading ++ :py3 del t + :$put =string(l) + :" + :" settrace +*************** +*** 829,861 **** + :fun D() + :endfun + py3 << EOF +- import re +- +- py33_type_error_pattern = re.compile('^__call__\(\) takes (\d+) positional argument but (\d+) were given$') +- +- def ee(expr, g=globals(), l=locals()): +- try: +- try: +- exec(expr, g, l) +- except Exception as e: +- if sys.version_info >= (3, 3) and e.__class__ is AttributeError and str(e).find('has no attribute')>=0 and not str(e).startswith("'vim."): +- cb.append(expr + ':' + repr((e.__class__, AttributeError(str(e)[str(e).rfind(" '") + 2:-1])))) +- elif sys.version_info >= (3, 3) and e.__class__ is ImportError and str(e).find('No module named \'') >= 0: +- cb.append(expr + ':' + repr((e.__class__, ImportError(str(e).replace("'", ''))))) +- elif sys.version_info >= (3, 3) and e.__class__ is TypeError: +- m = py33_type_error_pattern.search(str(e)) +- if m: +- msg = '__call__() takes exactly {0} positional argument ({1} given)'.format(m.group(1), m.group(2)) +- cb.append(expr + ':' + repr((e.__class__, TypeError(msg)))) +- else: +- cb.append(expr + ':' + repr((e.__class__, e))) +- else: +- cb.append(expr + ':' + repr((e.__class__, e))) +- else: +- cb.append(expr + ':NOT FAILED') +- except Exception as e: +- cb.append(expr + '::' + repr((e.__class__, e))) +- + d = vim.Dictionary() + ned = vim.Dictionary(foo='bar', baz='abcD') + dl = vim.Dictionary(a=1) +--- 852,857 ---- +*************** +*** 1227,1232 **** +--- 1223,1229 ---- + ee('vim.eval("Exe(\'throw \'\'ghi\'\'\')")') + ee('vim.eval("Exe(\'echoerr \'\'jkl\'\'\')")') + ee('vim.eval("Exe(\'xxx_non_existent_command_xxx\')")') ++ ee('vim.eval("xxx_unknown_function_xxx()")') + ee('vim.bindeval("Exe(\'xxx_non_existent_command_xxx\')")') + del Exe + EOF +*** ../vim-7.4.106/src/testdir/test87.ok 2013-11-11 01:05:43.000000000 +0100 +--- src/testdir/test87.ok 2013-11-28 16:41:01.000000000 +0100 +*************** +*** 53,60 **** + [function('New'), function('DictNew'), 'NewStart', 1, 2, 3, 'NewEnd'] + [function('New'), function('DictNew'), 'NewStart', 1, 2, 3, 'NewEnd', 'DictNewStart', 1, 2, 3, 'DictNewEnd', {'a': 'b'}] + [function('New'), function('DictNew'), 'NewStart', 1, 2, 3, 'NewEnd', 'DictNewStart', 1, 2, 3, 'DictNewEnd', {'a': 'b'}, 'New'] +! Vim(py3):E725: +! Vim(py3):E117: + [0.0, 0.0] + KeyError + TypeError +--- 53,60 ---- + [function('New'), function('DictNew'), 'NewStart', 1, 2, 3, 'NewEnd'] + [function('New'), function('DictNew'), 'NewStart', 1, 2, 3, 'NewEnd', 'DictNewStart', 1, 2, 3, 'DictNewEnd', {'a': 'b'}] + [function('New'), function('DictNew'), 'NewStart', 1, 2, 3, 'NewEnd', 'DictNewStart', 1, 2, 3, 'DictNewEnd', {'a': 'b'}, 'New'] +! l[1](1, 2, 3):(, error('Vim:E725: Calling dict function without Dictionary: DictNew',)) +! f(1, 2, 3):(, error('Vim:E117: Unknown function: New',)) + [0.0, 0.0] + KeyError + TypeError +*************** +*** 1186,1191 **** +--- 1186,1192 ---- + vim.eval("Exe('throw ''ghi''')"):(, error('ghi',)) + vim.eval("Exe('echoerr ''jkl''')"):(, error('Vim(echoerr):jkl',)) + vim.eval("Exe('xxx_non_existent_command_xxx')"):(, error('Vim:E492: Not an editor command: xxx_non_existent_command_xxx',)) ++ vim.eval("xxx_unknown_function_xxx()"):(, error('Vim:E117: Unknown function: xxx_unknown_function_xxx',)) + vim.bindeval("Exe('xxx_non_existent_command_xxx')"):(, error('Vim:E492: Not an editor command: xxx_non_existent_command_xxx',)) + Caught KeyboardInterrupt + Running :put +*** ../vim-7.4.106/src/version.c 2013-11-28 16:32:34.000000000 +0100 +--- src/version.c 2013-11-28 16:41:43.000000000 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 107, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +8. You spend half of the plane trip with your laptop on your lap...and your + child in the overhead compartment. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.108 b/SOURCES/7.4.108 new file mode 100644 index 0000000..0542347 --- /dev/null +++ b/SOURCES/7.4.108 @@ -0,0 +1,215 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.108 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.108 +Problem: "zG" and "zW" leave temp files around on MS-Windows. +Solution: Delete the temp files when exiting. (Ken Takata) +Files: src/memline.c, src/proto/spell.pro, src/spell.c + + +*** ../vim-7.4.107/src/memline.c 2013-11-04 02:53:46.000000000 +0100 +--- src/memline.c 2013-11-28 17:27:06.000000000 +0100 +*************** +*** 841,848 **** + for (buf = firstbuf; buf != NULL; buf = buf->b_next) + ml_close(buf, del_file && ((buf->b_flags & BF_PRESERVED) == 0 + || vim_strchr(p_cpo, CPO_PRESERVE) == NULL)); + #ifdef TEMPDIRNAMES +! vim_deltempdir(); /* delete created temp directory */ + #endif + } + +--- 841,851 ---- + for (buf = firstbuf; buf != NULL; buf = buf->b_next) + ml_close(buf, del_file && ((buf->b_flags & BF_PRESERVED) == 0 + || vim_strchr(p_cpo, CPO_PRESERVE) == NULL)); ++ #ifdef FEAT_SPELL ++ spell_delete_wordlist(); /* delete the internal wordlist */ ++ #endif + #ifdef TEMPDIRNAMES +! vim_deltempdir(); /* delete created temp directory */ + #endif + } + +*** ../vim-7.4.107/src/proto/spell.pro 2013-08-10 13:37:26.000000000 +0200 +--- src/proto/spell.pro 2013-11-28 17:25:59.000000000 +0100 +*************** +*** 3,8 **** +--- 3,9 ---- + int spell_move_to __ARGS((win_T *wp, int dir, int allwords, int curline, hlf_T *attrp)); + void spell_cat_line __ARGS((char_u *buf, char_u *line, int maxlen)); + char_u *did_set_spelllang __ARGS((win_T *wp)); ++ void spell_delete_wordlist __ARGS((void)); + void spell_free_all __ARGS((void)); + void spell_reload __ARGS((void)); + int spell_check_msm __ARGS((void)); +*** ../vim-7.4.107/src/spell.c 2013-11-21 17:42:26.000000000 +0100 +--- src/spell.c 2013-11-28 17:25:59.000000000 +0100 +*************** +*** 2180,2188 **** + char_u *endp; + hlf_T attr; + int len; +! # ifdef FEAT_SYN_HL + int has_syntax = syntax_present(wp); +! # endif + int col; + int can_spell; + char_u *buf = NULL; +--- 2180,2188 ---- + char_u *endp; + hlf_T attr; + int len; +! #ifdef FEAT_SYN_HL + int has_syntax = syntax_present(wp); +! #endif + int col; + int can_spell; + char_u *buf = NULL; +*************** +*** 2280,2286 **** + : p - buf) + > wp->w_cursor.col))) + { +! # ifdef FEAT_SYN_HL + if (has_syntax) + { + col = (int)(p - buf); +--- 2280,2286 ---- + : p - buf) + > wp->w_cursor.col))) + { +! #ifdef FEAT_SYN_HL + if (has_syntax) + { + col = (int)(p - buf); +*************** +*** 4701,4707 **** + return flags; + } + +! # if defined(FEAT_MBYTE) || defined(EXITFREE) || defined(PROTO) + /* + * Free all languages. + */ +--- 4701,4725 ---- + return flags; + } + +! /* +! * Delete the internal wordlist and its .spl file. +! */ +! void +! spell_delete_wordlist() +! { +! char_u fname[MAXPATHL]; +! +! if (int_wordlist != NULL) +! { +! mch_remove(int_wordlist); +! int_wordlist_spl(fname); +! mch_remove(fname); +! vim_free(int_wordlist); +! int_wordlist = NULL; +! } +! } +! +! #if defined(FEAT_MBYTE) || defined(EXITFREE) || defined(PROTO) + /* + * Free all languages. + */ +*************** +*** 4710,4716 **** + { + slang_T *slang; + buf_T *buf; +- char_u fname[MAXPATHL]; + + /* Go through all buffers and handle 'spelllang'. */ + for (buf = firstbuf; buf != NULL; buf = buf->b_next) +--- 4728,4733 ---- +*************** +*** 4723,4746 **** + slang_free(slang); + } + +! if (int_wordlist != NULL) +! { +! /* Delete the internal wordlist and its .spl file */ +! mch_remove(int_wordlist); +! int_wordlist_spl(fname); +! mch_remove(fname); +! vim_free(int_wordlist); +! int_wordlist = NULL; +! } + + vim_free(repl_to); + repl_to = NULL; + vim_free(repl_from); + repl_from = NULL; + } +! # endif + +! # if defined(FEAT_MBYTE) || defined(PROTO) + /* + * Clear all spelling tables and reload them. + * Used after 'encoding' is set and when ":mkspell" was used. +--- 4740,4755 ---- + slang_free(slang); + } + +! spell_delete_wordlist(); + + vim_free(repl_to); + repl_to = NULL; + vim_free(repl_from); + repl_from = NULL; + } +! #endif + +! #if defined(FEAT_MBYTE) || defined(PROTO) + /* + * Clear all spelling tables and reload them. + * Used after 'encoding' is set and when ":mkspell" was used. +*************** +*** 4773,4779 **** + } + } + } +! # endif + + /* + * Reload the spell file "fname" if it's loaded. +--- 4782,4788 ---- + } + } + } +! #endif + + /* + * Reload the spell file "fname" if it's loaded. +*** ../vim-7.4.107/src/version.c 2013-11-28 17:04:38.000000000 +0100 +--- src/version.c 2013-11-28 17:26:31.000000000 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 108, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +9. All your daydreaming is preoccupied with getting a faster connection to the + net: 28.8...ISDN...cable modem...T1...T3. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.109 b/SOURCES/7.4.109 new file mode 100644 index 0000000..70ed86d --- /dev/null +++ b/SOURCES/7.4.109 @@ -0,0 +1,123 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.109 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.109 +Problem: ColorScheme autocommand matches with the current buffer name. +Solution: Match with the colorscheme name. (Christian Brabandt) +Files: runtime/doc/autocmd.txt, src/fileio.c, src/syntax.c + + +*** ../vim-7.4.108/runtime/doc/autocmd.txt 2013-08-10 13:24:52.000000000 +0200 +--- runtime/doc/autocmd.txt 2013-11-28 18:44:20.000000000 +0100 +*************** +*** 480,485 **** +--- 480,491 ---- + |cmdwin-char| + *ColorScheme* + ColorScheme After loading a color scheme. |:colorscheme| ++ The pattern is matched against the ++ colorscheme name. can be used for the ++ name of the actual file where this option was ++ set, and for the new colorscheme ++ name. ++ + + *CompleteDone* + CompleteDone After Insert mode completion is done. Either +*** ../vim-7.4.108/src/fileio.c 2013-11-12 18:09:20.000000000 +0100 +--- src/fileio.c 2013-11-28 18:44:20.000000000 +0100 +*************** +*** 9330,9336 **** + */ + if (fname_io == NULL) + { +! if (fname != NULL && *fname != NUL) + autocmd_fname = fname; + else if (buf != NULL) + autocmd_fname = buf->b_ffname; +--- 9330,9338 ---- + */ + if (fname_io == NULL) + { +! if (event == EVENT_COLORSCHEME) +! autocmd_fname = NULL; +! else if (fname != NULL && *fname != NUL) + autocmd_fname = fname; + else if (buf != NULL) + autocmd_fname = buf->b_ffname; +*************** +*** 9383,9396 **** + else + { + sfname = vim_strsave(fname); +! /* Don't try expanding FileType, Syntax, FuncUndefined, WindowID or +! * QuickFixCmd* */ + if (event == EVENT_FILETYPE + || event == EVENT_SYNTAX + || event == EVENT_FUNCUNDEFINED + || event == EVENT_REMOTEREPLY + || event == EVENT_SPELLFILEMISSING + || event == EVENT_QUICKFIXCMDPRE + || event == EVENT_QUICKFIXCMDPOST) + fname = vim_strsave(fname); + else +--- 9385,9399 ---- + else + { + sfname = vim_strsave(fname); +! /* Don't try expanding FileType, Syntax, FuncUndefined, WindowID, +! * ColorScheme or QuickFixCmd* */ + if (event == EVENT_FILETYPE + || event == EVENT_SYNTAX + || event == EVENT_FUNCUNDEFINED + || event == EVENT_REMOTEREPLY + || event == EVENT_SPELLFILEMISSING + || event == EVENT_QUICKFIXCMDPRE ++ || event == EVENT_COLORSCHEME + || event == EVENT_QUICKFIXCMDPOST) + fname = vim_strsave(fname); + else +*** ../vim-7.4.108/src/syntax.c 2013-06-08 16:10:08.000000000 +0200 +--- src/syntax.c 2013-11-28 18:44:20.000000000 +0100 +*************** +*** 7071,7077 **** + retval = source_runtime(buf, FALSE); + vim_free(buf); + #ifdef FEAT_AUTOCMD +! apply_autocmds(EVENT_COLORSCHEME, NULL, NULL, FALSE, curbuf); + #endif + } + recursive = FALSE; +--- 7071,7077 ---- + retval = source_runtime(buf, FALSE); + vim_free(buf); + #ifdef FEAT_AUTOCMD +! apply_autocmds(EVENT_COLORSCHEME, name, curbuf->b_fname, FALSE, curbuf); + #endif + } + recursive = FALSE; +*** ../vim-7.4.108/src/version.c 2013-11-28 17:41:41.000000000 +0100 +--- src/version.c 2013-11-28 18:48:42.000000000 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 109, + /**/ + +-- +"How is your new girlfriend?" +"90-60-90 man!" +"What, pale purple?" + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.110 b/SOURCES/7.4.110 new file mode 100644 index 0000000..0a40ee9 --- /dev/null +++ b/SOURCES/7.4.110 @@ -0,0 +1,102 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.110 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.110 +Problem: "gUgn" cannot be repeeated. (Dimitar Dimitrov) +Solution: Don't put "gn" in a different order in the redo buffer. Restore + 'wrapscan' when the pattern isn't found. (Christian Wellenbrock) +Files: src/normal.c, src/search.c, src/test53.in, src/test53.ok + + +*** ../vim-7.4.109/src/normal.c 2013-11-04 01:41:11.000000000 +0100 +--- src/normal.c 2013-11-28 19:02:45.000000000 +0100 +*************** +*** 962,972 **** + #ifdef FEAT_CMDL_INFO + need_flushbuf |= add_to_showcmd(ca.nchar); + #endif +- /* For "gn" from redo, need to get one more char to determine the +- * operator */ + if (ca.nchar == 'r' || ca.nchar == '\'' || ca.nchar == '`' +! || ca.nchar == Ctrl_BSL +! || ((ca.nchar == 'n' || ca.nchar == 'N') && !stuff_empty())) + { + cp = &ca.extra_char; /* need to get a third character */ + if (ca.nchar != 'r') +--- 962,969 ---- + #ifdef FEAT_CMDL_INFO + need_flushbuf |= add_to_showcmd(ca.nchar); + #endif + if (ca.nchar == 'r' || ca.nchar == '\'' || ca.nchar == '`' +! || ca.nchar == Ctrl_BSL) + { + cp = &ca.extra_char; /* need to get a third character */ + if (ca.nchar != 'r') +*************** +*** 1797,1806 **** + * otherwise it might be the second char of the operator. */ + if (cap->cmdchar == 'g' && (cap->nchar == 'n' + || cap->nchar == 'N')) +! /* "gn" and "gN" are a bit different */ +! prep_redo(oap->regname, 0L, NUL, cap->cmdchar, cap->nchar, +! get_op_char(oap->op_type), +! get_extra_op_char(oap->op_type)); + else if (cap->cmdchar != ':') + prep_redo(oap->regname, 0L, NUL, 'v', + get_op_char(oap->op_type), +--- 1794,1802 ---- + * otherwise it might be the second char of the operator. */ + if (cap->cmdchar == 'g' && (cap->nchar == 'n' + || cap->nchar == 'N')) +! prep_redo(oap->regname, cap->count0, +! get_op_char(oap->op_type), get_extra_op_char(oap->op_type), +! oap->motion_force, cap->cmdchar, cap->nchar); + else if (cap->cmdchar != ':') + prep_redo(oap->regname, 0L, NUL, 'v', + get_op_char(oap->op_type), +*** ../vim-7.4.109/src/search.c 2013-11-08 04:30:06.000000000 +0100 +--- src/search.c 2013-11-28 19:05:16.000000000 +0100 +*************** +*** 4544,4550 **** + /* Is the pattern is zero-width? */ + one_char = is_one_char(spats[last_idx].pat); + if (one_char == -1) +! return FAIL; /* invalid pattern */ + + /* + * The trick is to first search backwards and then search forward again, +--- 4544,4553 ---- + /* Is the pattern is zero-width? */ + one_char = is_one_char(spats[last_idx].pat); + if (one_char == -1) +! { +! p_ws = old_p_ws; +! return FAIL; /* pattern not found */ +! } + + /* + * The trick is to first search backwards and then search forward again, +*** ../vim-7.4.109/src/version.c 2013-11-28 18:53:47.000000000 +0100 +--- src/version.c 2013-11-28 19:20:29.000000000 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 110, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +10. And even your night dreams are in HTML. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.111 b/SOURCES/7.4.111 new file mode 100644 index 0000000..e8c7a48 --- /dev/null +++ b/SOURCES/7.4.111 @@ -0,0 +1,63 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.111 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.111 +Problem: Memory leak in Python OptionsAssItem. (Ken Takata) +Solution: Call Py_XDECREF() where needed. (ZyX) +Files: src/if_py_both.h + + +*** ../vim-7.4.110/src/if_py_both.h 2013-11-28 17:04:38.000000000 +0100 +--- src/if_py_both.h 2013-12-07 14:23:00.000000000 +0100 +*************** +*** 3005,3015 **** + else + { + char_u *val; +! PyObject *todecref; + +! if ((val = StringToChars(valObject, &todecref))) + ret = set_option_value_for(key, 0, val, opt_flags, + self->opt_type, self->from); + else + ret = -1; + } +--- 3005,3018 ---- + else + { + char_u *val; +! PyObject *todecref2; + +! if ((val = StringToChars(valObject, &todecref2))) +! { + ret = set_option_value_for(key, 0, val, opt_flags, + self->opt_type, self->from); ++ Py_XDECREF(todecref2); ++ } + else + ret = -1; + } +*** ../vim-7.4.110/src/version.c 2013-11-28 19:27:18.000000000 +0100 +--- src/version.c 2013-12-07 14:24:16.000000000 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 111, + /**/ + +-- +How To Keep A Healthy Level Of Insanity: +12. Sing along at the opera. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.112 b/SOURCES/7.4.112 new file mode 100644 index 0000000..ab64e13 --- /dev/null +++ b/SOURCES/7.4.112 @@ -0,0 +1,70 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.112 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.112 +Problem: The defaults for 'directory' and 'backupdir' on MS-Windows do not + include a directory that exists. +Solution: Use $TEMP. +Files: src/os_dos.h + + +*** ../vim-7.4.111/src/os_dos.h 2013-06-12 20:09:44.000000000 +0200 +--- src/os_dos.h 2013-12-04 15:23:22.000000000 +0100 +*************** +*** 109,115 **** + #endif + + #ifndef DFLT_BDIR +! # define DFLT_BDIR ".,c:\\tmp,c:\\temp" /* default for 'backupdir' */ + #endif + + #ifndef DFLT_VDIR +--- 109,115 ---- + #endif + + #ifndef DFLT_BDIR +! # define DFLT_BDIR ".,$TEMP,c:\\tmp,c:\\temp" /* default for 'backupdir' */ + #endif + + #ifndef DFLT_VDIR +*************** +*** 117,123 **** + #endif + + #ifndef DFLT_DIR +! # define DFLT_DIR ".,c:\\tmp,c:\\temp" /* default for 'directory' */ + #endif + + #define DFLT_ERRORFILE "errors.err" +--- 117,123 ---- + #endif + + #ifndef DFLT_DIR +! # define DFLT_DIR ".,$TEMP,c:\\tmp,c:\\temp" /* default for 'directory' */ + #endif + + #define DFLT_ERRORFILE "errors.err" +*** ../vim-7.4.111/src/version.c 2013-12-07 14:28:37.000000000 +0100 +--- src/version.c 2013-12-07 14:31:03.000000000 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 112, + /**/ + +-- +How To Keep A Healthy Level Of Insanity: +13. Go to a poetry recital and ask why the poems don't rhyme. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.113 b/SOURCES/7.4.113 new file mode 100644 index 0000000..97059e5 --- /dev/null +++ b/SOURCES/7.4.113 @@ -0,0 +1,101 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.113 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.113 +Problem: MSVC static analysis gives warnings. +Solution: Avoid the warnings and avoid possible bugs. (Ken Takata) +Files: src/os_win32.c + + +*** ../vim-7.4.112/src/os_win32.c 2013-11-21 12:34:07.000000000 +0100 +--- src/os_win32.c 2013-12-07 14:41:35.000000000 +0100 +*************** +*** 2509,2515 **** + WCHAR *porig, *porigPrev; + int flen; + WIN32_FIND_DATAW fb; +! HANDLE hFind; + int c; + int slen; + +--- 2509,2515 ---- + WCHAR *porig, *porigPrev; + int flen; + WIN32_FIND_DATAW fb; +! HANDLE hFind = INVALID_HANDLE_VALUE; + int c; + int slen; + +*************** +*** 2528,2535 **** + /* copy leading drive letter */ + *ptrue++ = *porig++; + *ptrue++ = *porig++; +- *ptrue = NUL; /* in case nothing follows */ + } + + while (*porig != NUL) + { +--- 2528,2535 ---- + /* copy leading drive letter */ + *ptrue++ = *porig++; + *ptrue++ = *porig++; + } ++ *ptrue = NUL; /* in case nothing follows */ + + while (*porig != NUL) + { +*************** +*** 2673,2680 **** + /* copy leading drive letter */ + *ptrue++ = *porig++; + *ptrue++ = *porig++; +- *ptrue = NUL; /* in case nothing follows */ + } + + while (*porig != NUL) + { +--- 2673,2680 ---- + /* copy leading drive letter */ + *ptrue++ = *porig++; + *ptrue++ = *porig++; + } ++ *ptrue = NUL; /* in case nothing follows */ + + while (*porig != NUL) + { +*************** +*** 6272,6277 **** +--- 6272,6278 ---- + while (i > 0) + free(argv[--i]); + free(argv); ++ argv = NULL; + argc = 0; + } + } +*** ../vim-7.4.112/src/version.c 2013-12-07 14:32:04.000000000 +0100 +--- src/version.c 2013-12-07 14:37:48.000000000 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 113, + /**/ + +-- +How To Keep A Healthy Level Of Insanity: +15. Five days in advance, tell your friends you can't attend their + party because you're not in the mood. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.114 b/SOURCES/7.4.114 new file mode 100644 index 0000000..9b982f6 --- /dev/null +++ b/SOURCES/7.4.114 @@ -0,0 +1,56 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.114 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.114 +Problem: New GNU make outputs messages about changing directory in another + format. +Solution: Recognize the new format. +Files: src/option.h + + +*** ../vim-7.4.113/src/option.h 2013-11-06 05:26:08.000000000 +0100 +--- src/option.h 2013-12-04 12:43:03.000000000 +0100 +*************** +*** 31,39 **** + # define DFLT_EFM "%A%p^,%C%%CC-%t-%m,%Cat line number %l in file %f,%f|%l| %m" + # else /* Unix, probably */ + # ifdef EBCDIC +! #define DFLT_EFM "%*[^ ] %*[^ ] %f:%l%*[ ]%m,%*[^\"]\"%f\"%*\\D%l: %m,\"%f\"%*\\D%l: %m,%f:%l:%c:%m,%f(%l):%m,%f:%l:%m,\"%f\"\\, line %l%*\\D%c%*[^ ] %m,%D%*\\a[%*\\d]: Entering directory `%f',%X%*\\a[%*\\d]: Leaving directory `%f',%DMaking %*\\a in %f,%f|%l| %m" + # else +! #define DFLT_EFM "%*[^\"]\"%f\"%*\\D%l: %m,\"%f\"%*\\D%l: %m,%-G%f:%l: (Each undeclared identifier is reported only once,%-G%f:%l: for each function it appears in.),%-GIn file included from %f:%l:%c:,%-GIn file included from %f:%l:%c\\,,%-GIn file included from %f:%l:%c,%-GIn file included from %f:%l,%-G%*[ ]from %f:%l:%c,%-G%*[ ]from %f:%l:,%-G%*[ ]from %f:%l\\,,%-G%*[ ]from %f:%l,%f:%l:%c:%m,%f(%l):%m,%f:%l:%m,\"%f\"\\, line %l%*\\D%c%*[^ ] %m,%D%*\\a[%*\\d]: Entering directory `%f',%X%*\\a[%*\\d]: Leaving directory `%f',%D%*\\a: Entering directory `%f',%X%*\\a: Leaving directory `%f',%DMaking %*\\a in %f,%f|%l| %m" + # endif + # endif + # endif +--- 31,39 ---- + # define DFLT_EFM "%A%p^,%C%%CC-%t-%m,%Cat line number %l in file %f,%f|%l| %m" + # else /* Unix, probably */ + # ifdef EBCDIC +! #define DFLT_EFM "%*[^ ] %*[^ ] %f:%l%*[ ]%m,%*[^\"]\"%f\"%*\\D%l: %m,\"%f\"%*\\D%l: %m,%f:%l:%c:%m,%f(%l):%m,%f:%l:%m,\"%f\"\\, line %l%*\\D%c%*[^ ] %m,%D%*\\a[%*\\d]: Entering directory [`']%f',%X%*\\a[%*\\d]: Leaving directory [`']%f',%DMaking %*\\a in %f,%f|%l| %m" + # else +! #define DFLT_EFM "%*[^\"]\"%f\"%*\\D%l: %m,\"%f\"%*\\D%l: %m,%-G%f:%l: (Each undeclared identifier is reported only once,%-G%f:%l: for each function it appears in.),%-GIn file included from %f:%l:%c:,%-GIn file included from %f:%l:%c\\,,%-GIn file included from %f:%l:%c,%-GIn file included from %f:%l,%-G%*[ ]from %f:%l:%c,%-G%*[ ]from %f:%l:,%-G%*[ ]from %f:%l\\,,%-G%*[ ]from %f:%l,%f:%l:%c:%m,%f(%l):%m,%f:%l:%m,\"%f\"\\, line %l%*\\D%c%*[^ ] %m,%D%*\\a[%*\\d]: Entering directory [`']%f',%X%*\\a[%*\\d]: Leaving directory [`']%f',%D%*\\a: Entering directory [`']%f',%X%*\\a: Leaving directory [`']%f',%DMaking %*\\a in %f,%f|%l| %m" + # endif + # endif + # endif +*** ../vim-7.4.113/src/version.c 2013-12-07 14:48:06.000000000 +0100 +--- src/version.c 2013-12-11 12:22:19.000000000 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 114, + /**/ + +-- +Everyone has a photographic memory. Some don't have film. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.115 b/SOURCES/7.4.115 new file mode 100644 index 0000000..1d1a561 --- /dev/null +++ b/SOURCES/7.4.115 @@ -0,0 +1,52 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.115 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.115 +Problem: When using Zsh expanding ~abc doesn't work when the result + contains a space. +Solution: Off-by-one error in detecting the NUL. (Pavol Juhas) +Files: src/os_unix.c + + +*** ../vim-7.4.114/src/os_unix.c 2013-11-03 00:40:54.000000000 +0100 +--- src/os_unix.c 2013-12-11 13:19:26.000000000 +0100 +*************** +*** 5990,5996 **** + { + /* If there is a NUL, set did_find_nul, else set check_spaces */ + buffer[len] = NUL; +! if (len && (int)STRLEN(buffer) < (int)len - 1) + did_find_nul = TRUE; + else + check_spaces = TRUE; +--- 5990,5996 ---- + { + /* If there is a NUL, set did_find_nul, else set check_spaces */ + buffer[len] = NUL; +! if (len && (int)STRLEN(buffer) < (int)len) + did_find_nul = TRUE; + else + check_spaces = TRUE; +*** ../vim-7.4.114/src/version.c 2013-12-11 12:22:54.000000000 +0100 +--- src/version.c 2013-12-11 13:20:29.000000000 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 115, + /**/ + +-- +Change is inevitable, except from a vending machine. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.116 b/SOURCES/7.4.116 new file mode 100644 index 0000000..f242f05 --- /dev/null +++ b/SOURCES/7.4.116 @@ -0,0 +1,46 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.116 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.116 +Problem: When a mapping starts with a space, the typed space does not show + up for 'showcmd'. +Solution: Show "<20>". (Brook Hong) +Files: src/normal.c + + +*** ../vim-7.4.115/src/normal.c 2013-11-28 19:27:18.000000000 +0100 +--- src/normal.c 2013-12-07 14:30:29.000000000 +0100 +*************** +*** 4021,4026 **** +--- 4021,4028 ---- + #endif + + p = transchar(c); ++ if (*p == ' ') ++ STRCPY(p, "<20>"); + old_len = (int)STRLEN(showcmd_buf); + extra_len = (int)STRLEN(p); + overflow = old_len + extra_len - SHOWCMD_COLS; +*** ../vim-7.4.115/src/version.c 2013-12-11 13:21:44.000000000 +0100 +--- src/version.c 2013-12-11 14:16:58.000000000 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 116, + /**/ + +-- +Bumper sticker: Honk if you love peace and quiet. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.117 b/SOURCES/7.4.117 new file mode 100644 index 0000000..5fb0268 --- /dev/null +++ b/SOURCES/7.4.117 @@ -0,0 +1,263 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.117 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.117 +Problem: Can't build with Cygwin/MingW and Perl 5.18. +Solution: Add a linker argument for the Perl library. (Cesar Romani) + Adjust CFLAGS and LIB. (Cesar Romani) + Move including inline.h further down. (Ken Takata) +Files: src/Make_cyg.mak, src/Make_ming.mak, src/if_perl.xs + + +*** ../vim-7.4.116/src/Make_cyg.mak 2013-11-28 16:32:34.000000000 +0100 +--- src/Make_cyg.mak 2013-12-11 14:59:12.000000000 +0100 +*************** +*** 1,6 **** + # + # Makefile for VIM on Win32, using Cygnus gcc +! # Last updated by Dan Sharp. Last Change: 2013 Nov 28 + # + # Also read INSTALLpc.txt! + # +--- 1,6 ---- + # + # Makefile for VIM on Win32, using Cygnus gcc +! # Last updated by Dan Sharp. Last Change: 2013 Dec 11 + # + # Also read INSTALLpc.txt! + # +*************** +*** 155,161 **** + ifeq (yes, $(DYNAMIC_PERL)) + DEFINES += -DDYNAMIC_PERL -DDYNAMIC_PERL_DLL=\"perl$(PERL_VER).dll\" + else +! EXTRA_LIBS += $(PERL)/lib/CORE/perl$(PERL_VER).lib + endif + endif + +--- 155,161 ---- + ifeq (yes, $(DYNAMIC_PERL)) + DEFINES += -DDYNAMIC_PERL -DDYNAMIC_PERL_DLL=\"perl$(PERL_VER).dll\" + else +! EXTRA_LIBS += -L$(PERL)/lib/CORE -lperl$(PERL_VER) + endif + endif + +*** ../vim-7.4.116/src/Make_ming.mak 2013-07-06 13:32:11.000000000 +0200 +--- src/Make_ming.mak 2013-12-07 20:02:52.000000000 +0100 +*************** +*** 359,364 **** +--- 359,365 ---- + + CFLAGS = -Iproto $(DEFINES) -pipe -w -march=$(ARCH) -Wall + WINDRES_FLAGS = --preprocessor="$(WINDRES_CC) -E -xc" -DRC_INVOKED ++ EXTRA_LIBS = + + ifdef GETTEXT + DEFINES += -DHAVE_GETTEXT -DHAVE_LOCALE_H +*************** +*** 377,385 **** + endif + + ifdef PERL +! CFLAGS += -I$(PERLLIBS) -DFEAT_PERL -L$(PERLLIBS) + ifeq (yes, $(DYNAMIC_PERL)) + CFLAGS += -DDYNAMIC_PERL -DDYNAMIC_PERL_DLL=\"perl$(PERL_VER).dll\" + endif + endif + +--- 378,387 ---- + endif + + ifdef PERL +! CFLAGS += -I$(PERLLIBS) -DFEAT_PERL + ifeq (yes, $(DYNAMIC_PERL)) + CFLAGS += -DDYNAMIC_PERL -DDYNAMIC_PERL_DLL=\"perl$(PERL_VER).dll\" ++ EXTRA_LIBS += -L$(PERLLIBS) -lperl$(PERL_VER) + endif + endif + +*************** +*** 632,638 **** + + ifdef PERL + ifeq (no, $(DYNAMIC_PERL)) +! LIB += -lperl$(PERL_VER) + endif + endif + +--- 634,640 ---- + + ifdef PERL + ifeq (no, $(DYNAMIC_PERL)) +! LIB += -L$(PERLLIBS) -lperl$(PERL_VER) + endif + endif + +*** ../vim-7.4.116/src/if_perl.xs 2013-08-02 19:28:50.000000000 +0200 +--- src/if_perl.xs 2013-12-11 15:02:58.000000000 +0100 +*************** +*** 14,20 **** + #define IN_PERL_FILE /* don't include if_perl.pro from proto.h */ + + /* +! * Currently 32-bit version of ActivePerl is built with VC6. + * (http://community.activestate.com/faq/windows-compilers-perl-modules) + * It means that time_t should be 32-bit. However the default size of + * time_t is 64-bit since VC8. So we have to define _USE_32BIT_TIME_T. +--- 14,21 ---- + #define IN_PERL_FILE /* don't include if_perl.pro from proto.h */ + + /* +! * Currently 32-bit version of ActivePerl is built with VC6 (or MinGW since +! * ActivePerl 5.18). + * (http://community.activestate.com/faq/windows-compilers-perl-modules) + * It means that time_t should be 32-bit. However the default size of + * time_t is 64-bit since VC8. So we have to define _USE_32BIT_TIME_T. +*************** +*** 23,28 **** +--- 24,45 ---- + # define _USE_32BIT_TIME_T + #endif + ++ /* Work around for perl-5.18. ++ * Don't include "perl\lib\CORE\inline.h" for now, ++ * include it after Perl_sv_free2 is defined. */ ++ #define PERL_NO_INLINE_FUNCTIONS ++ ++ /* ++ * Prevent including winsock.h. perl.h tries to detect whether winsock.h is ++ * already included before including winsock2.h, because winsock2.h isn't ++ * compatible with winsock.h. However the detection doesn't work with some ++ * versions of MinGW. If WIN32_LEAN_AND_MEAN is defined, windows.h will not ++ * include winsock.h. ++ */ ++ #ifdef WIN32 ++ # define WIN32_LEAN_AND_MEAN ++ #endif ++ + #include "vim.h" + + #include +*************** +*** 81,90 **** + # define PERL5101_OR_LATER + #endif + +- #if (PERL_REVISION == 5) && (PERL_VERSION >= 18) +- # define PERL5180_OR_LATER +- #endif +- + #ifndef pTHX + # define pTHX void + # define pTHX_ +--- 98,103 ---- +*************** +*** 145,155 **** + # define perl_free dll_perl_free + # define Perl_get_context dll_Perl_get_context + # define Perl_croak dll_Perl_croak +- # ifndef PERL5180_OR_LATER + # ifdef PERL5101_OR_LATER + # define Perl_croak_xs_usage dll_Perl_croak_xs_usage + # endif +- # endif + # ifndef PROTO + # define Perl_croak_nocontext dll_Perl_croak_nocontext + # define Perl_call_argv dll_Perl_call_argv +--- 158,166 ---- +*************** +*** 262,271 **** + static int (*perl_parse)(PerlInterpreter*, XSINIT_t, int, char**, char**); + static void* (*Perl_get_context)(void); + static void (*Perl_croak)(pTHX_ const char*, ...); +- #ifndef PERL5180_OR_LATER + #ifdef PERL5101_OR_LATER + static void (*Perl_croak_xs_usage)(pTHX_ const CV *const, const char *const params); +! #endif + #endif + static void (*Perl_croak_nocontext)(const char*, ...); + static I32 (*Perl_dowantarray)(pTHX); +--- 273,285 ---- + static int (*perl_parse)(PerlInterpreter*, XSINIT_t, int, char**, char**); + static void* (*Perl_get_context)(void); + static void (*Perl_croak)(pTHX_ const char*, ...); + #ifdef PERL5101_OR_LATER ++ /* Perl-5.18 has a different Perl_croak_xs_usage signature. */ ++ # if (PERL_REVISION == 5) && (PERL_VERSION >= 18) ++ static void (*Perl_croak_xs_usage)(const CV *const, const char *const params); ++ # else + static void (*Perl_croak_xs_usage)(pTHX_ const CV *const, const char *const params); +! # endif + #endif + static void (*Perl_croak_nocontext)(const char*, ...); + static I32 (*Perl_dowantarray)(pTHX); +*************** +*** 337,343 **** +--- 351,362 ---- + static XPV** (*Perl_TXpv_ptr)(register PerlInterpreter*); + static STRLEN* (*Perl_Tna_ptr)(register PerlInterpreter*); + #else ++ /* Perl-5.18 has a different Perl_sv_free2 signature. */ ++ # if (PERL_REVISION == 5) && (PERL_VERSION >= 18) ++ static void (*Perl_sv_free2)(pTHX_ SV*, const U32); ++ # else + static void (*Perl_sv_free2)(pTHX_ SV*); ++ # endif + static void (*Perl_sys_init)(int* argc, char*** argv); + static void (*Perl_sys_term)(void); + static void (*Perl_call_list)(pTHX_ I32, AV*); +*************** +*** 384,394 **** + {"perl_parse", (PERL_PROC*)&perl_parse}, + {"Perl_get_context", (PERL_PROC*)&Perl_get_context}, + {"Perl_croak", (PERL_PROC*)&Perl_croak}, +- #ifndef PERL5180_OR_LATER + #ifdef PERL5101_OR_LATER + {"Perl_croak_xs_usage", (PERL_PROC*)&Perl_croak_xs_usage}, + #endif +- #endif + {"Perl_croak_nocontext", (PERL_PROC*)&Perl_croak_nocontext}, + {"Perl_dowantarray", (PERL_PROC*)&Perl_dowantarray}, + {"Perl_free_tmps", (PERL_PROC*)&Perl_free_tmps}, +--- 403,411 ---- +*************** +*** 492,497 **** +--- 509,522 ---- + {"", NULL}, + }; + ++ /* Work around for perl-5.18. ++ * The definitions of S_SvREFCNT_inc and S_SvREFCNT_dec are needed, so include ++ * "perl\lib\CORE\inline.h", after Perl_sv_free2 is defined. ++ * The linker won't complain about undefined __impl_Perl_sv_free2. */ ++ #if (PERL_REVISION == 5) && (PERL_VERSION >= 18) ++ # include ++ #endif ++ + /* + * Make all runtime-links of perl. + * +*** ../vim-7.4.116/src/version.c 2013-12-11 14:54:58.000000000 +0100 +--- src/version.c 2013-12-11 15:00:12.000000000 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 117, + /**/ + +-- +Despite the cost of living, have you noticed how it remains so popular? + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.118 b/SOURCES/7.4.118 new file mode 100644 index 0000000..04701cc --- /dev/null +++ b/SOURCES/7.4.118 @@ -0,0 +1,90 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.118 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.118 +Problem: It's possible that redrawing the status lines causes + win_redr_custom() to be called recursively. +Solution: Protect against recursiveness. (Yasuhiro Matsumoto) +Files: src/screen.c + + +*** ../vim-7.4.117/src/screen.c 2013-11-08 04:30:06.000000000 +0100 +--- src/screen.c 2013-12-11 15:32:21.000000000 +0100 +*************** +*** 6653,6658 **** +--- 6653,6659 ---- + win_T *wp; + int draw_ruler; /* TRUE or FALSE */ + { ++ static int entered = FALSE; + int attr; + int curattr; + int row; +*************** +*** 6671,6676 **** +--- 6672,6684 ---- + win_T *ewp; + int p_crb_save; + ++ /* There is a tiny chance that this gets called recursively: When ++ * redrawing a status line triggers redrawing the ruler or tabline. ++ * Avoid trouble by not allowing recursion. */ ++ if (entered) ++ return; ++ entered = TRUE; ++ + /* setup environment for the task at hand */ + if (wp == NULL) + { +*************** +*** 6746,6752 **** + } + + if (maxwidth <= 0) +! return; + + /* Temporarily reset 'cursorbind', we don't want a side effect from moving + * the cursor away and back. */ +--- 6754,6760 ---- + } + + if (maxwidth <= 0) +! goto theend; + + /* Temporarily reset 'cursorbind', we don't want a side effect from moving + * the cursor away and back. */ +*************** +*** 6827,6832 **** +--- 6835,6843 ---- + while (col < Columns) + TabPageIdxs[col++] = fillchar; + } ++ ++ theend: ++ entered = FALSE; + } + + #endif /* FEAT_STL_OPT */ +*** ../vim-7.4.117/src/version.c 2013-12-11 15:06:36.000000000 +0100 +--- src/version.c 2013-12-11 15:32:16.000000000 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 118, + /**/ + +-- +Nothing is fool-proof to a sufficiently talented fool. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.119 b/SOURCES/7.4.119 new file mode 100644 index 0000000..061b81a --- /dev/null +++ b/SOURCES/7.4.119 @@ -0,0 +1,245 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.119 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.119 +Problem: Vim doesn't work well on OpenVMS. +Solution: Fix various problems. (Samuel Ferencik) +Files: src/os_unix.c, src/os_unix.h, src/os_vms.c + + +*** ../vim-7.4.118/src/os_unix.c 2013-12-11 13:21:44.000000000 +0100 +--- src/os_unix.c 2013-12-11 16:16:03.000000000 +0100 +*************** +*** 168,174 **** + static pid_t wait4pid __ARGS((pid_t, waitstatus *)); + + static int WaitForChar __ARGS((long)); +! #if defined(__BEOS__) + int RealWaitForChar __ARGS((int, long, int *)); + #else + static int RealWaitForChar __ARGS((int, long, int *)); +--- 168,174 ---- + static pid_t wait4pid __ARGS((pid_t, waitstatus *)); + + static int WaitForChar __ARGS((long)); +! #if defined(__BEOS__) || defined(VMS) + int RealWaitForChar __ARGS((int, long, int *)); + #else + static int RealWaitForChar __ARGS((int, long, int *)); +*************** +*** 435,441 **** + /* Process the queued netbeans messages. */ + netbeans_parse_messages(); + #endif +- #ifndef VMS /* VMS: must try reading, WaitForChar() does nothing. */ + /* + * We want to be interrupted by the winch signal + * or by an event on the monitored file descriptors. +--- 435,440 ---- +*************** +*** 446,452 **** + handle_resize(); + return 0; + } +- #endif + + /* If input was put directly in typeahead buffer bail out here. */ + if (typebuf_changed(tb_change_cnt)) +--- 445,450 ---- +*************** +*** 5039,5044 **** +--- 5037,5043 ---- + return avail; + } + ++ #ifndef VMS + /* + * Wait "msec" msec until a character is available from file descriptor "fd". + * "msec" == 0 will check for characters once. +*************** +*** 5338,5350 **** + } + # endif + +- # ifdef OLD_VMS +- /* Old VMS as v6.2 and older have broken select(). It waits more than +- * required. Should not be used */ +- ret = 0; +- # else + ret = select(maxfd + 1, &rfds, NULL, &efds, tvp); +- # endif + # ifdef EINTR + if (ret == -1 && errno == EINTR) + { +--- 5337,5343 ---- +*************** +*** 5466,5473 **** + return (ret > 0); + } + +- #ifndef VMS +- + #ifndef NO_EXPANDPATH + /* + * Expand a path into all matching files and/or directories. Handles "*", +--- 5459,5464 ---- +*** ../vim-7.4.118/src/os_unix.h 2013-06-12 20:09:44.000000000 +0200 +--- src/os_unix.h 2013-12-11 16:16:03.000000000 +0100 +*************** +*** 225,230 **** +--- 225,232 ---- + # include + # include + # include ++ # include ++ # include + + # ifdef FEAT_GUI_GTK + # include "gui_gtk_vms.h" +*** ../vim-7.4.118/src/os_vms.c 2010-06-26 06:03:31.000000000 +0200 +--- src/os_vms.c 2013-12-11 17:10:24.000000000 +0100 +*************** +*** 11,16 **** +--- 11,33 ---- + + #include "vim.h" + ++ /* define _generic_64 for use in time functions */ ++ #ifndef VAX ++ # include ++ #else ++ /* based on Alpha's gen64def.h; the file is absent on VAX */ ++ typedef struct _generic_64 { ++ # pragma __nomember_alignment ++ __union { /* You can treat me as... */ ++ /* long long is not available on VAXen */ ++ /* unsigned __int64 gen64$q_quadword; ...a single 64-bit value, or */ ++ ++ unsigned int gen64$l_longword [2]; /* ...two 32-bit values, or */ ++ unsigned short int gen64$w_word [4]; /* ...four 16-bit values */ ++ } gen64$r_quad_overlay; ++ } GENERIC_64; ++ #endif ++ + typedef struct + { + char class; +*************** +*** 669,671 **** +--- 686,777 ---- + } + return ; + } ++ ++ struct typeahead_st { ++ unsigned short numchars; ++ unsigned char firstchar; ++ unsigned char reserved0; ++ unsigned long reserved1; ++ } typeahead; ++ ++ /* ++ * Wait "msec" msec until a character is available from file descriptor "fd". ++ * "msec" == 0 will check for characters once. ++ * "msec" == -1 will block until a character is available. ++ */ ++ int ++ RealWaitForChar(fd, msec, check_for_gpm) ++ int fd UNUSED; /* always read from iochan */ ++ long msec; ++ int *check_for_gpm UNUSED; ++ { ++ int status; ++ struct _generic_64 time_curr; ++ struct _generic_64 time_diff; ++ struct _generic_64 time_out; ++ unsigned int convert_operation = LIB$K_DELTA_SECONDS_F; ++ float sec = (float) msec / 1000; ++ ++ /* make sure the iochan is set */ ++ if (!iochan) ++ get_tty(); ++ ++ if (msec > 0) { ++ /* time-out specified; convert it to absolute time */ ++ ++ /* get current time (number of 100ns ticks since the VMS Epoch) */ ++ status = sys$gettim(&time_curr); ++ if (status != SS$_NORMAL) ++ return 0; /* error */ ++ ++ /* construct the delta time */ ++ status = lib$cvtf_to_internal_time( ++ &convert_operation, &sec, &time_diff); ++ if (status != LIB$_NORMAL) ++ return 0; /* error */ ++ ++ /* add them up */ ++ status = lib$add_times( ++ &time_curr, ++ &time_diff, ++ &time_out); ++ if (status != LIB$_NORMAL) ++ return 0; /* error */ ++ } ++ ++ while (TRUE) { ++ /* select() */ ++ status = sys$qiow(0, iochan, IO$_SENSEMODE | IO$M_TYPEAHDCNT, iosb, ++ 0, 0, &typeahead, 8, 0, 0, 0, 0); ++ if (status != SS$_NORMAL || (iosb[0] & 0xFFFF) != SS$_NORMAL) ++ return 0; /* error */ ++ ++ if (typeahead.numchars) ++ return 1; /* ready to read */ ++ ++ /* there's nothing to read; what now? */ ++ if (msec == 0) { ++ /* immediate time-out; return impatiently */ ++ return 0; ++ } ++ else if (msec < 0) { ++ /* no time-out; wait on indefinitely */ ++ continue; ++ } ++ else { ++ /* time-out needs to be checked */ ++ status = sys$gettim(&time_curr); ++ if (status != SS$_NORMAL) ++ return 0; /* error */ ++ ++ status = lib$sub_times( ++ &time_out, ++ &time_curr, ++ &time_diff); ++ if (status != LIB$_NORMAL) ++ return 0; /* error, incl. time_diff < 0 (i.e. time-out) */ ++ ++ /* otherwise wait some more */ ++ } ++ } ++ } +*** ../vim-7.4.118/src/version.c 2013-12-11 15:51:54.000000000 +0100 +--- src/version.c 2013-12-11 16:09:16.000000000 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 119, + /**/ + +-- +It is hard to understand how a cemetery raised its burial +cost and blamed it on the cost of living. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.120 b/SOURCES/7.4.120 new file mode 100644 index 0000000..4f7a17a --- /dev/null +++ b/SOURCES/7.4.120 @@ -0,0 +1,53 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.120 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.120 (after 7.4.117) +Problem: Can't build with Perl 5.18 on Linux. (Lcd 47) +Solution: Add #ifdef. (Ken Takata) +Files: src/if_perl.xs + + +*** ../vim-7.4.119/src/if_perl.xs 2013-12-11 15:06:36.000000000 +0100 +--- src/if_perl.xs 2013-12-11 17:17:43.000000000 +0100 +*************** +*** 27,33 **** + /* Work around for perl-5.18. + * Don't include "perl\lib\CORE\inline.h" for now, + * include it after Perl_sv_free2 is defined. */ +! #define PERL_NO_INLINE_FUNCTIONS + + /* + * Prevent including winsock.h. perl.h tries to detect whether winsock.h is +--- 27,35 ---- + /* Work around for perl-5.18. + * Don't include "perl\lib\CORE\inline.h" for now, + * include it after Perl_sv_free2 is defined. */ +! #ifdef DYNAMIC_PERL +! # define PERL_NO_INLINE_FUNCTIONS +! #endif + + /* + * Prevent including winsock.h. perl.h tries to detect whether winsock.h is +*** ../vim-7.4.119/src/version.c 2013-12-11 17:12:32.000000000 +0100 +--- src/version.c 2013-12-11 17:19:34.000000000 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 120, + /**/ + +-- +Just remember...if the world didn't suck, we'd all fall off. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.121 b/SOURCES/7.4.121 new file mode 100644 index 0000000..2e04890 --- /dev/null +++ b/SOURCES/7.4.121 @@ -0,0 +1,48 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.121 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.121 +Problem: Completion doesn't work for ":py3d" and ":py3f". (Bohr Shaw) +Solution: Skip over letters after ":py3". +Files: src/ex_docmd.c + + +*** ../vim-7.4.120/src/ex_docmd.c 2013-11-21 14:21:25.000000000 +0100 +--- src/ex_docmd.c 2013-12-11 17:41:50.000000000 +0100 +*************** +*** 3261,3267 **** +--- 3261,3271 ---- + ++p; + /* for python 3.x: ":py3*" commands completion */ + if (cmd[0] == 'p' && cmd[1] == 'y' && p == cmd + 2 && *p == '3') ++ { + ++p; ++ while (ASCII_ISALPHA(*p) || *p == '*') ++ ++p; ++ } + len = (int)(p - cmd); + + if (len == 0) +*** ../vim-7.4.120/src/version.c 2013-12-11 17:20:14.000000000 +0100 +--- src/version.c 2013-12-11 17:43:44.000000000 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 121, + /**/ + +-- +It was recently discovered that research causes cancer in rats. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.122 b/SOURCES/7.4.122 new file mode 100644 index 0000000..2e6e581 --- /dev/null +++ b/SOURCES/7.4.122 @@ -0,0 +1,215 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.122 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.122 +Problem: Win32: When 'encoding' is set to "utf-8" and the active codepage + is cp932 then ":grep" and other commands don't work for multi-byte + characters. +Solution: (Yasuhiro Matsumoto) +Files: src/os_win32.c + + +*** ../vim-7.4.121/src/os_win32.c 2013-12-07 14:48:06.000000000 +0100 +--- src/os_win32.c 2013-12-11 17:57:48.000000000 +0100 +*************** +*** 3788,3793 **** +--- 3788,3837 ---- + } + #endif /* FEAT_GUI_W32 */ + ++ static BOOL ++ vim_create_process( ++ const char *cmd, ++ DWORD flags, ++ BOOL inherit_handles, ++ STARTUPINFO *si, ++ PROCESS_INFORMATION *pi) ++ { ++ # ifdef FEAT_MBYTE ++ if (enc_codepage >= 0 && (int)GetACP() != enc_codepage) ++ { ++ WCHAR *wcmd = enc_to_utf16(cmd, NULL); ++ ++ if (wcmd != NULL) ++ { ++ BOOL ret; ++ ret = CreateProcessW( ++ NULL, /* Executable name */ ++ wcmd, /* Command to execute */ ++ NULL, /* Process security attributes */ ++ NULL, /* Thread security attributes */ ++ inherit_handles, /* Inherit handles */ ++ flags, /* Creation flags */ ++ NULL, /* Environment */ ++ NULL, /* Current directory */ ++ si, /* Startup information */ ++ pi); /* Process information */ ++ vim_free(wcmd); ++ return ret; ++ } ++ } ++ #endif ++ return CreateProcess( ++ NULL, /* Executable name */ ++ cmd, /* Command to execute */ ++ NULL, /* Process security attributes */ ++ NULL, /* Thread security attributes */ ++ inherit_handles, /* Inherit handles */ ++ flags, /* Creation flags */ ++ NULL, /* Environment */ ++ NULL, /* Current directory */ ++ si, /* Startup information */ ++ pi); /* Process information */ ++ } + + + #if defined(FEAT_GUI_W32) || defined(PROTO) +*************** +*** 3834,3851 **** + cmd += 3; + + /* Now, run the command */ +! CreateProcess(NULL, /* Executable name */ +! cmd, /* Command to execute */ +! NULL, /* Process security attributes */ +! NULL, /* Thread security attributes */ +! FALSE, /* Inherit handles */ +! CREATE_DEFAULT_ERROR_MODE | /* Creation flags */ +! CREATE_NEW_CONSOLE, +! NULL, /* Environment */ +! NULL, /* Current directory */ +! &si, /* Startup information */ +! &pi); /* Process information */ +! + + /* Wait for the command to terminate before continuing */ + if (g_PlatformId != VER_PLATFORM_WIN32s) +--- 3878,3885 ---- + cmd += 3; + + /* Now, run the command */ +! vim_create_process(cmd, FALSE, +! CREATE_DEFAULT_ERROR_MODE | CREATE_NEW_CONSOLE, &si, &pi); + + /* Wait for the command to terminate before continuing */ + if (g_PlatformId != VER_PLATFORM_WIN32s) +*************** +*** 4177,4198 **** + p = cmd; + } + +! /* Now, run the command */ +! CreateProcess(NULL, /* Executable name */ +! p, /* Command to execute */ +! NULL, /* Process security attributes */ +! NULL, /* Thread security attributes */ +! +! // this command can be litigious, handle inheritance was +! // deactivated for pending temp file, but, if we deactivate +! // it, the pipes don't work for some reason. +! TRUE, /* Inherit handles, first deactivated, +! * but needed */ +! CREATE_DEFAULT_ERROR_MODE, /* Creation flags */ +! NULL, /* Environment */ +! NULL, /* Current directory */ +! &si, /* Startup information */ +! &pi); /* Process information */ + + if (p != cmd) + vim_free(p); +--- 4211,4221 ---- + p = cmd; + } + +! /* Now, run the command. +! * About "Inherit handles" being TRUE: this command can be litigious, +! * handle inheritance was deactivated for pending temp file, but, if we +! * deactivate it, the pipes don't work for some reason. */ +! vim_create_process(p, TRUE, CREATE_DEFAULT_ERROR_MODE, &si, &pi); + + if (p != cmd) + vim_free(p); +*************** +*** 4410,4416 **** + } + #else + +! # define mch_system(c, o) system(c) + + #endif + +--- 4433,4457 ---- + } + #else + +! # ifdef FEAT_MBYTE +! static int +! mch_system(char *cmd, int options) +! { +! if (enc_codepage >= 0 && (int)GetACP() != enc_codepage) +! { +! WCHAR *wcmd = enc_to_utf16(cmd, NULL); +! if (wcmd != NULL) +! { +! int ret = _wsystem(wcmd); +! vim_free(wcmd); +! return ret; +! } +! } +! return system(cmd); +! } +! # else +! # define mch_system(c, o) system(c) +! # endif + + #endif + +*************** +*** 4578,4593 **** + * inherit our handles which causes unpleasant dangling swap + * files if we exit before the spawned process + */ +! if (CreateProcess(NULL, // Executable name +! newcmd, // Command to execute +! NULL, // Process security attributes +! NULL, // Thread security attributes +! FALSE, // Inherit handles +! flags, // Creation flags +! NULL, // Environment +! NULL, // Current directory +! &si, // Startup information +! &pi)) // Process information + x = 0; + else + { +--- 4619,4625 ---- + * inherit our handles which causes unpleasant dangling swap + * files if we exit before the spawned process + */ +! if (vim_create_process(newcmd, FALSE, flags, &si, &pi)) + x = 0; + else + { +*** ../vim-7.4.121/src/version.c 2013-12-11 17:44:33.000000000 +0100 +--- src/version.c 2013-12-11 17:48:09.000000000 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 122, + /**/ + +-- +Never overestimate a man's ability to underestimate a woman. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.123 b/SOURCES/7.4.123 new file mode 100644 index 0000000..b564fe4 --- /dev/null +++ b/SOURCES/7.4.123 @@ -0,0 +1,64 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.123 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.123 +Problem: Win32: Getting user name does not use wide function. +Solution: Use GetUserNameW() if possible. (Ken Takata) +Files: src/os_win32.c + + +*** ../vim-7.4.122/src/os_win32.c 2013-12-11 17:58:29.000000000 +0100 +--- src/os_win32.c 2013-12-11 18:14:29.000000000 +0100 +*************** +*** 2768,2773 **** +--- 2768,2793 ---- + char szUserName[256 + 1]; /* UNLEN is 256 */ + DWORD cch = sizeof szUserName; + ++ #ifdef FEAT_MBYTE ++ if (enc_codepage >= 0 && (int)GetACP() != enc_codepage) ++ { ++ WCHAR wszUserName[256 + 1]; /* UNLEN is 256 */ ++ DWORD wcch = sizeof(wszUserName) / sizeof(WCHAR); ++ ++ if (GetUserNameW(wszUserName, &wcch)) ++ { ++ char_u *p = utf16_to_enc(wszUserName, NULL); ++ ++ if (p != NULL) ++ { ++ vim_strncpy(s, p, len - 1); ++ vim_free(p); ++ return OK; ++ } ++ } ++ /* Retry with non-wide function (for Windows 98). */ ++ } ++ #endif + if (GetUserName(szUserName, &cch)) + { + vim_strncpy(s, szUserName, len - 1); +*** ../vim-7.4.122/src/version.c 2013-12-11 17:58:29.000000000 +0100 +--- src/version.c 2013-12-11 18:15:48.000000000 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 123, + /**/ + +-- +Everybody lies, but it doesn't matter since nobody listens. + -- Lieberman's Law + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.124 b/SOURCES/7.4.124 new file mode 100644 index 0000000..7815bf5 --- /dev/null +++ b/SOURCES/7.4.124 @@ -0,0 +1,63 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.124 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.124 +Problem: Win32: Getting host name does not use wide function. +Solution: Use GetComputerNameW() if possible. (Ken Takata) +Files: src/os_win32.c + + +*** ../vim-7.4.123/src/os_win32.c 2013-12-11 18:18:01.000000000 +0100 +--- src/os_win32.c 2013-12-11 18:19:11.000000000 +0100 +*************** +*** 2808,2813 **** +--- 2808,2833 ---- + { + DWORD cch = len; + ++ #ifdef FEAT_MBYTE ++ if (enc_codepage >= 0 && (int)GetACP() != enc_codepage) ++ { ++ WCHAR wszHostName[256 + 1]; ++ DWORD wcch = sizeof(wszHostName) / sizeof(WCHAR); ++ ++ if (GetComputerNameW(wszHostName, &wcch)) ++ { ++ char_u *p = utf16_to_enc(wszHostName, NULL); ++ ++ if (p != NULL) ++ { ++ vim_strncpy(s, p, len - 1); ++ vim_free(p); ++ return; ++ } ++ } ++ /* Retry with non-wide function (for Windows 98). */ ++ } ++ #endif + if (!GetComputerName(s, &cch)) + vim_strncpy(s, "PC (Win32 Vim)", len - 1); + } +*** ../vim-7.4.123/src/version.c 2013-12-11 18:18:01.000000000 +0100 +--- src/version.c 2013-12-11 18:20:03.000000000 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 124, + /**/ + +-- +Don't read everything you believe. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.125 b/SOURCES/7.4.125 new file mode 100644 index 0000000..04a0fe9 --- /dev/null +++ b/SOURCES/7.4.125 @@ -0,0 +1,57 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.125 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.125 +Problem: Win32: Dealing with messages may not work for multi-byte chars. +Solution: Use pDispatchMessage(). (Ken Takata) +Files: src/os_win32.c + + +*** ../vim-7.4.124/src/os_win32.c 2013-12-11 18:21:41.000000000 +0100 +--- src/os_win32.c 2013-12-11 18:23:47.000000000 +0100 +*************** +*** 4282,4291 **** + { + MSG msg; + +! if (PeekMessage(&msg, (HWND)NULL, 0, 0, PM_REMOVE)) + { + TranslateMessage(&msg); +! DispatchMessage(&msg); + } + + /* write pipe information in the window */ +--- 4282,4291 ---- + { + MSG msg; + +! if (pPeekMessage(&msg, (HWND)NULL, 0, 0, PM_REMOVE)) + { + TranslateMessage(&msg); +! pDispatchMessage(&msg); + } + + /* write pipe information in the window */ +*** ../vim-7.4.124/src/version.c 2013-12-11 18:21:41.000000000 +0100 +--- src/version.c 2013-12-11 18:35:44.000000000 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 125, + /**/ + +-- +Don't believe everything you hear or anything you say. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.126 b/SOURCES/7.4.126 new file mode 100644 index 0000000..c7acae7 --- /dev/null +++ b/SOURCES/7.4.126 @@ -0,0 +1,68 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.126 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.126 +Problem: Compiler warnings for "const" and incompatible types. +Solution: Remove "const", add type cast. (Ken Takata) +Files: src/os_win32.c + + +*** ../vim-7.4.125/src/os_win32.c 2013-12-11 18:36:28.000000000 +0100 +--- src/os_win32.c 2013-12-12 20:19:39.000000000 +0100 +*************** +*** 3830,3836 **** + + static BOOL + vim_create_process( +! const char *cmd, + DWORD flags, + BOOL inherit_handles, + STARTUPINFO *si, +--- 3830,3836 ---- + + static BOOL + vim_create_process( +! char *cmd, + DWORD flags, + BOOL inherit_handles, + STARTUPINFO *si, +*************** +*** 3853,3859 **** + flags, /* Creation flags */ + NULL, /* Environment */ + NULL, /* Current directory */ +! si, /* Startup information */ + pi); /* Process information */ + vim_free(wcmd); + return ret; +--- 3853,3859 ---- + flags, /* Creation flags */ + NULL, /* Environment */ + NULL, /* Current directory */ +! (LPSTARTUPINFOW)si, /* Startup information */ + pi); /* Process information */ + vim_free(wcmd); + return ret; +*** ../vim-7.4.125/src/version.c 2013-12-11 18:36:28.000000000 +0100 +--- src/version.c 2013-12-12 20:21:27.000000000 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 126, + /**/ + +-- +Microsoft is to software what McDonalds is to gourmet cooking + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.127 b/SOURCES/7.4.127 new file mode 100644 index 0000000..71ce694 --- /dev/null +++ b/SOURCES/7.4.127 @@ -0,0 +1,67 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.127 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.127 +Problem: Perl 5.18 on Unix doesn't work. +Solution: Move workaround to after including vim.h. (Ken Takata) +Files: src/if_perl.xs + + +*** ../vim-7.4.126/src/if_perl.xs 2013-12-11 17:20:14.000000000 +0100 +--- src/if_perl.xs 2013-12-14 11:41:56.000000000 +0100 +*************** +*** 24,36 **** + # define _USE_32BIT_TIME_T + #endif + +- /* Work around for perl-5.18. +- * Don't include "perl\lib\CORE\inline.h" for now, +- * include it after Perl_sv_free2 is defined. */ +- #ifdef DYNAMIC_PERL +- # define PERL_NO_INLINE_FUNCTIONS +- #endif +- + /* + * Prevent including winsock.h. perl.h tries to detect whether winsock.h is + * already included before including winsock2.h, because winsock2.h isn't +--- 24,29 ---- +*************** +*** 44,49 **** +--- 37,49 ---- + + #include "vim.h" + ++ /* Work around for perl-5.18. ++ * Don't include "perl\lib\CORE\inline.h" for now, ++ * include it after Perl_sv_free2 is defined. */ ++ #ifdef DYNAMIC_PERL ++ # define PERL_NO_INLINE_FUNCTIONS ++ #endif ++ + #include + #include + #include +*** ../vim-7.4.126/src/version.c 2013-12-12 20:25:39.000000000 +0100 +--- src/version.c 2013-12-14 11:43:54.000000000 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 127, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +54. You start tilting your head sideways to smile. :-) + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.128 b/SOURCES/7.4.128 new file mode 100644 index 0000000..ead1b67 --- /dev/null +++ b/SOURCES/7.4.128 @@ -0,0 +1,66 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.128 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.128 +Problem: Perl 5.18 for MSVC doesn't work. +Solution: Add check in makefile and define __inline. (Ken Takata) +Files: src/Make_mvc.mak, src/if_perl.xs + + +*** ../vim-7.4.127/src/Make_mvc.mak 2013-11-09 02:32:15.000000000 +0100 +--- src/Make_mvc.mak 2013-12-14 11:47:37.000000000 +0100 +*************** +*** 825,831 **** +--- 825,836 ---- + PERL_LIB = $(PERL_INCDIR)\perl.lib + !else + PERL_DLL = perl$(PERL_VER).dll ++ !if exist($(PERL_INCDIR)\perl$(PERL_VER).lib) + PERL_LIB = $(PERL_INCDIR)\perl$(PERL_VER).lib ++ !else ++ # For ActivePerl 5.18 and later ++ PERL_LIB = $(PERL_INCDIR)\libperl$(PERL_VER).a ++ !endif + !endif + + CFLAGS = $(CFLAGS) -DFEAT_PERL +*** ../vim-7.4.127/src/if_perl.xs 2013-12-14 11:46:04.000000000 +0100 +--- src/if_perl.xs 2013-12-14 11:47:37.000000000 +0100 +*************** +*** 44,49 **** +--- 44,54 ---- + # define PERL_NO_INLINE_FUNCTIONS + #endif + ++ /* Work around for using MSVC and ActivePerl 5.18. */ ++ #ifdef _MSC_VER ++ # define __inline__ __inline ++ #endif ++ + #include + #include + #include +*** ../vim-7.4.127/src/version.c 2013-12-14 11:46:04.000000000 +0100 +--- src/version.c 2013-12-14 11:48:51.000000000 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 128, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +55. You ask your doctor to implant a gig in your brain. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.129 b/SOURCES/7.4.129 new file mode 100644 index 0000000..efe9a1c --- /dev/null +++ b/SOURCES/7.4.129 @@ -0,0 +1,56 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.129 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.129 +Problem: getline(-1) returns zero. (mvxxc) +Solution: Return an empty string. +Files: src/eval.c + + +*** ../vim-7.4.128/src/eval.c 2013-11-11 04:25:48.000000000 +0100 +--- src/eval.c 2013-12-14 12:11:27.000000000 +0100 +*************** +*** 11119,11124 **** +--- 11119,11126 ---- + { + char_u *p; + ++ rettv->v_type = VAR_STRING; ++ rettv->vval.v_string = NULL; + if (retlist && rettv_list_alloc(rettv) == FAIL) + return; + +*************** +*** 11131,11138 **** + p = ml_get_buf(buf, start, FALSE); + else + p = (char_u *)""; +- +- rettv->v_type = VAR_STRING; + rettv->vval.v_string = vim_strsave(p); + } + else +--- 11133,11138 ---- +*** ../vim-7.4.128/src/version.c 2013-12-14 11:50:28.000000000 +0100 +--- src/version.c 2013-12-14 12:13:32.000000000 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 129, + /**/ + +-- +Keyboard not found. Think ENTER to continue. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.130 b/SOURCES/7.4.130 new file mode 100644 index 0000000..864d82c --- /dev/null +++ b/SOURCES/7.4.130 @@ -0,0 +1,69 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.130 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.130 +Problem: Relative line numbers mix up windows when using folds. +Solution: Use hasFoldingWin() instead of hasFolding(). (Lech Lorens) +Files: src/misc2.c + + +*** ../vim-7.4.129/src/misc2.c 2013-09-08 16:07:03.000000000 +0200 +--- src/misc2.c 2013-12-14 12:43:35.000000000 +0100 +*************** +*** 487,493 **** + { + while (lnum > cursor) + { +! (void)hasFolding(lnum, &lnum, NULL); + /* if lnum and cursor are in the same fold, + * now lnum <= cursor */ + if (lnum > cursor) +--- 487,493 ---- + { + while (lnum > cursor) + { +! (void)hasFoldingWin(wp, lnum, &lnum, NULL, TRUE, NULL); + /* if lnum and cursor are in the same fold, + * now lnum <= cursor */ + if (lnum > cursor) +*************** +*** 499,505 **** + { + while (lnum < cursor) + { +! (void)hasFolding(lnum, NULL, &lnum); + /* if lnum and cursor are in the same fold, + * now lnum >= cursor */ + if (lnum < cursor) +--- 499,505 ---- + { + while (lnum < cursor) + { +! (void)hasFoldingWin(wp, lnum, NULL, &lnum, TRUE, NULL); + /* if lnum and cursor are in the same fold, + * now lnum >= cursor */ + if (lnum < cursor) +*** ../vim-7.4.129/src/version.c 2013-12-14 12:17:34.000000000 +0100 +--- src/version.c 2013-12-14 12:44:27.000000000 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 130, + /**/ + +-- +Over the years, I've developed my sense of deja vu so acutely that now +I can remember things that *have* happened before ... + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.132 b/SOURCES/7.4.132 new file mode 100644 index 0000000..73d7281 --- /dev/null +++ b/SOURCES/7.4.132 @@ -0,0 +1,54 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.132 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.132 (after 7.4.122) +Problem: Win32: flags and inherit_handles arguments mixed up. +Solution: Swap the argument. (cs86661) +Files: src/os_win32.c + + +*** ../vim-7.4.131/src/os_win32.c 2013-12-12 20:25:39.000000000 +0100 +--- src/os_win32.c 2014-01-05 13:24:15.000000000 +0100 +*************** +*** 3831,3838 **** + static BOOL + vim_create_process( + char *cmd, +- DWORD flags, + BOOL inherit_handles, + STARTUPINFO *si, + PROCESS_INFORMATION *pi) + { +--- 3831,3838 ---- + static BOOL + vim_create_process( + char *cmd, + BOOL inherit_handles, ++ DWORD flags, + STARTUPINFO *si, + PROCESS_INFORMATION *pi) + { +*** ../vim-7.4.131/src/version.c 2013-12-14 13:06:13.000000000 +0100 +--- src/version.c 2014-01-05 13:27:25.000000000 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 132, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +93. New mail alarm on your palmtop annoys other churchgoers. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.133 b/SOURCES/7.4.133 new file mode 100644 index 0000000..7c4bdfa --- /dev/null +++ b/SOURCES/7.4.133 @@ -0,0 +1,74 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.133 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.133 +Problem: Clang warns for using NUL. +Solution: Change NUL to NULL. (Dominique Pelle) +Files: src/eval.c, src/misc2.c + + +*** ../vim-7.4.132/src/eval.c 2013-12-14 12:17:34.000000000 +0100 +--- src/eval.c 2014-01-06 06:11:50.000000000 +0100 +*************** +*** 14141,14148 **** + } + else + { +! list_append_string(rettv->vval.v_list, NUL, -1); +! list_append_string(rettv->vval.v_list, NUL, -1); + } + } + #endif +--- 14141,14148 ---- + } + else + { +! list_append_string(rettv->vval.v_list, NULL, -1); +! list_append_string(rettv->vval.v_list, NULL, -1); + } + } + #endif +*** ../vim-7.4.132/src/misc2.c 2013-12-14 12:48:55.000000000 +0100 +--- src/misc2.c 2014-01-06 06:11:50.000000000 +0100 +*************** +*** 4695,4702 **** + else + { + char_u *p = gettail(search_ctx->ffsc_fix_path); +! char_u *wc_path = NUL; +! char_u *temp = NUL; + int len = 0; + + if (p > search_ctx->ffsc_fix_path) +--- 4695,4702 ---- + else + { + char_u *p = gettail(search_ctx->ffsc_fix_path); +! char_u *wc_path = NULL; +! char_u *temp = NULL; + int len = 0; + + if (p > search_ctx->ffsc_fix_path) +*** ../vim-7.4.132/src/version.c 2014-01-06 06:16:55.000000000 +0100 +--- src/version.c 2014-01-06 06:13:26.000000000 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 133, + /**/ + +-- +A meeting is an event at which the minutes are kept and the hours are lost. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.134 b/SOURCES/7.4.134 new file mode 100644 index 0000000..d8f47c5 --- /dev/null +++ b/SOURCES/7.4.134 @@ -0,0 +1,53 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.134 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.134 +Problem: Spurious space in MingW Makefile. +Solution: Remove the space. (Michael Soyka) +Files: src/Make_ming.mak + + +*** ../vim-7.4.133/src/Make_ming.mak 2013-12-11 15:06:36.000000000 +0100 +--- src/Make_ming.mak 2014-01-06 15:37:57.000000000 +0100 +*************** +*** 598,604 **** + ifeq (yes, $(GUI)) + OBJ += $(OUTDIR)/xpm_w32.o + # You'll need libXpm.a from http://gnuwin32.sf.net +! LIB += -L $(XPM)/lib -lXpm + endif + endif + +--- 598,604 ---- + ifeq (yes, $(GUI)) + OBJ += $(OUTDIR)/xpm_w32.o + # You'll need libXpm.a from http://gnuwin32.sf.net +! LIB += -L$(XPM)/lib -lXpm + endif + endif + +*** ../vim-7.4.133/src/version.c 2014-01-06 06:18:44.000000000 +0100 +--- src/version.c 2014-01-06 15:39:32.000000000 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 134, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +115. You are late picking up your kid from school and try to explain + to the teacher you were stuck in Web traffic. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.135 b/SOURCES/7.4.135 new file mode 100644 index 0000000..4f11071 --- /dev/null +++ b/SOURCES/7.4.135 @@ -0,0 +1,51 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.135 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.135 +Problem: Missing dot in MingW test Makefile. +Solution: Add the dot. (Michael Soyka) +Files: src/testdir/Make_ming.mak + + +*** ../vim-7.4.134/src/testdir/Make_ming.mak 2013-11-21 14:21:25.000000000 +0100 +--- src/testdir/Make_ming.mak 2014-01-06 15:41:27.000000000 +0100 +*************** +*** 53,59 **** + test84.out test85.out test86.out test87.out test88.out \ + test89.out test90.out test91.out test92.out test93.out \ + test94.out test95.out test96.out test98.out test99.out \ +! test100out test101.out test102.out test103.out + + SCRIPTS32 = test50.out test70.out + +--- 53,59 ---- + test84.out test85.out test86.out test87.out test88.out \ + test89.out test90.out test91.out test92.out test93.out \ + test94.out test95.out test96.out test98.out test99.out \ +! test100.out test101.out test102.out test103.out + + SCRIPTS32 = test50.out test70.out + +*** ../vim-7.4.134/src/version.c 2014-01-06 15:44:59.000000000 +0100 +--- src/version.c 2014-01-06 15:47:14.000000000 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 135, + /**/ + +-- +Two percent of zero is almost nothing. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.136 b/SOURCES/7.4.136 new file mode 100644 index 0000000..2097680 --- /dev/null +++ b/SOURCES/7.4.136 @@ -0,0 +1,75 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.136 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.136 (after 7.4.096) +Problem: MS-Windows: When saving a file with a UNC path the file becomes + read-only. +Solution: Don't mix up Win32 attributes and Unix attributes. (Ken Takata) +Files: src/os_mswin.c, src/os_win32.c + + +*** ../vim-7.4.135/src/os_mswin.c 2013-09-29 19:05:17.000000000 +0200 +--- src/os_mswin.c 2014-01-10 13:03:19.000000000 +0100 +*************** +*** 617,624 **** +--- 617,638 ---- + p = buf + strlen(buf); + if (p > buf) + mb_ptr_back(buf, p); ++ ++ /* Remove trailing '\\' except root path. */ + if (p > buf && (*p == '\\' || *p == '/') && p[-1] != ':') + *p = NUL; ++ ++ if ((buf[0] == '\\' && buf[1] == '\\') || (buf[0] == '/' && buf[1] == '/')) ++ { ++ /* UNC root path must be followed by '\\'. */ ++ p = vim_strpbrk(buf + 2, "\\/"); ++ if (p != NULL) ++ { ++ p = vim_strpbrk(p + 1, "\\/"); ++ if (p == NULL) ++ STRCAT(buf, "\\"); ++ } ++ } + #ifdef FEAT_MBYTE + if (enc_codepage >= 0 && (int)GetACP() != enc_codepage + # ifdef __BORLANDC__ +*** ../vim-7.4.135/src/os_win32.c 2014-01-05 13:29:16.000000000 +0100 +--- src/os_win32.c 2014-01-10 12:59:32.000000000 +0100 +*************** +*** 2890,2898 **** + struct stat st; + int n; + +- if (name[0] == '\\' && name[1] == '\\') +- /* UNC path */ +- return (long)win32_getattrs(name); + n = mch_stat(name, &st); + return n == 0 ? (long)st.st_mode : -1L; + } +--- 2890,2895 ---- +*** ../vim-7.4.135/src/version.c 2014-01-06 15:51:46.000000000 +0100 +--- src/version.c 2014-01-10 13:04:43.000000000 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 136, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +128. You can access the Net -- via your portable and cellular phone. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.137 b/SOURCES/7.4.137 new file mode 100644 index 0000000..4e685c1 --- /dev/null +++ b/SOURCES/7.4.137 @@ -0,0 +1,239 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.137 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.137 +Problem: Cannot use IME with Windows 8 console. +Solution: Change the user of ReadConsoleInput() and PeekConsoleInput(). + (Nobuhiro Takasaki) +Files: src/os_win32.c + + +*** ../vim-7.4.136/src/os_win32.c 2014-01-10 13:05:12.000000000 +0100 +--- src/os_win32.c 2014-01-10 13:42:19.000000000 +0100 +*************** +*** 232,237 **** +--- 232,306 ---- + + static char_u *exe_path = NULL; + ++ /* ++ * Version of ReadConsoleInput() that works with IME. ++ */ ++ static BOOL ++ read_console_input( ++ HANDLE hConsoleInput, ++ PINPUT_RECORD lpBuffer, ++ DWORD nLength, ++ LPDWORD lpNumberOfEventsRead) ++ { ++ enum ++ { ++ IRSIZE = 10, /* rough value */ ++ }; ++ static INPUT_RECORD irCache[IRSIZE]; ++ static DWORD s_dwIndex = 0; ++ static DWORD s_dwMax = 0; ++ ++ if (hConsoleInput == NULL || lpBuffer == NULL) ++ return ReadConsoleInput(hConsoleInput, lpBuffer, nLength, ++ lpNumberOfEventsRead); ++ ++ if (nLength == -1) ++ { ++ if (s_dwMax == 0) ++ { ++ PeekConsoleInput(hConsoleInput, lpBuffer, 1, lpNumberOfEventsRead); ++ if (*lpNumberOfEventsRead == 0) ++ return FALSE; ++ ReadConsoleInput(hConsoleInput, irCache, IRSIZE, &s_dwMax); ++ s_dwIndex = 0; ++ } ++ ((PINPUT_RECORD)lpBuffer)[0] = irCache[s_dwIndex]; ++ *lpNumberOfEventsRead = 1; ++ return TRUE; ++ } ++ ++ if (s_dwMax == 0) ++ { ++ ReadConsoleInput(hConsoleInput, irCache, IRSIZE, &s_dwMax); ++ s_dwIndex = 0; ++ if (s_dwMax == 0) ++ { ++ *lpNumberOfEventsRead = 0; ++ return FALSE; ++ } ++ } ++ ++ ((PINPUT_RECORD)lpBuffer)[0] = irCache[s_dwIndex]; ++ if (++s_dwIndex == s_dwMax) ++ s_dwMax = 0; ++ *lpNumberOfEventsRead = 1; ++ return TRUE; ++ } ++ ++ /* ++ * Version of PeekConsoleInput() that works with IME. ++ */ ++ static BOOL ++ peek_console_input( ++ HANDLE hConsoleInput, ++ PINPUT_RECORD lpBuffer, ++ DWORD nLength, ++ LPDWORD lpNumberOfEventsRead) ++ { ++ return read_console_input(hConsoleInput, lpBuffer, -1, ++ lpNumberOfEventsRead); ++ } ++ + static void + get_exe_name(void) + { +*************** +*** 1117,1123 **** + INPUT_RECORD ir; + MOUSE_EVENT_RECORD* pmer2 = &ir.Event.MouseEvent; + +! PeekConsoleInput(g_hConIn, &ir, 1, &cRecords); + + if (cRecords == 0 || ir.EventType != MOUSE_EVENT + || !(pmer2->dwButtonState & LEFT_RIGHT)) +--- 1186,1192 ---- + INPUT_RECORD ir; + MOUSE_EVENT_RECORD* pmer2 = &ir.Event.MouseEvent; + +! peek_console_input(g_hConIn, &ir, 1, &cRecords); + + if (cRecords == 0 || ir.EventType != MOUSE_EVENT + || !(pmer2->dwButtonState & LEFT_RIGHT)) +*************** +*** 1126,1132 **** + { + if (pmer2->dwEventFlags != MOUSE_MOVED) + { +! ReadConsoleInput(g_hConIn, &ir, 1, &cRecords); + + return decode_mouse_event(pmer2); + } +--- 1195,1201 ---- + { + if (pmer2->dwEventFlags != MOUSE_MOVED) + { +! read_console_input(g_hConIn, &ir, 1, &cRecords); + + return decode_mouse_event(pmer2); + } +*************** +*** 1134,1143 **** + s_yOldMouse == pmer2->dwMousePosition.Y) + { + /* throw away spurious mouse move */ +! ReadConsoleInput(g_hConIn, &ir, 1, &cRecords); + + /* are there any more mouse events in queue? */ +! PeekConsoleInput(g_hConIn, &ir, 1, &cRecords); + + if (cRecords==0 || ir.EventType != MOUSE_EVENT) + break; +--- 1203,1212 ---- + s_yOldMouse == pmer2->dwMousePosition.Y) + { + /* throw away spurious mouse move */ +! read_console_input(g_hConIn, &ir, 1, &cRecords); + + /* are there any more mouse events in queue? */ +! peek_console_input(g_hConIn, &ir, 1, &cRecords); + + if (cRecords==0 || ir.EventType != MOUSE_EVENT) + break; +*************** +*** 1374,1380 **** + } + + cRecords = 0; +! PeekConsoleInput(g_hConIn, &ir, 1, &cRecords); + + #ifdef FEAT_MBYTE_IME + if (State & CMDLINE && msg_row == Rows - 1) +--- 1443,1449 ---- + } + + cRecords = 0; +! peek_console_input(g_hConIn, &ir, 1, &cRecords); + + #ifdef FEAT_MBYTE_IME + if (State & CMDLINE && msg_row == Rows - 1) +*************** +*** 1405,1411 **** + if (ir.Event.KeyEvent.uChar.UnicodeChar == 0 + && ir.Event.KeyEvent.wVirtualKeyCode == 13) + { +! ReadConsoleInput(g_hConIn, &ir, 1, &cRecords); + continue; + } + #endif +--- 1474,1480 ---- + if (ir.Event.KeyEvent.uChar.UnicodeChar == 0 + && ir.Event.KeyEvent.wVirtualKeyCode == 13) + { +! read_console_input(g_hConIn, &ir, 1, &cRecords); + continue; + } + #endif +*************** +*** 1414,1420 **** + return TRUE; + } + +! ReadConsoleInput(g_hConIn, &ir, 1, &cRecords); + + if (ir.EventType == FOCUS_EVENT) + handle_focus_event(ir); +--- 1483,1489 ---- + return TRUE; + } + +! read_console_input(g_hConIn, &ir, 1, &cRecords); + + if (ir.EventType == FOCUS_EVENT) + handle_focus_event(ir); +*************** +*** 1484,1490 **** + return 0; + # endif + #endif +! if (ReadConsoleInput(g_hConIn, &ir, 1, &cRecords) == 0) + { + if (did_create_conin) + read_error_exit(); +--- 1553,1559 ---- + return 0; + # endif + #endif +! if (read_console_input(g_hConIn, &ir, 1, &cRecords) == 0) + { + if (did_create_conin) + read_error_exit(); +*** ../vim-7.4.136/src/version.c 2014-01-10 13:05:12.000000000 +0100 +--- src/version.c 2014-01-10 13:42:34.000000000 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 137, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +131. You challenge authority and society by portnuking people + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.138 b/SOURCES/7.4.138 new file mode 100644 index 0000000..413383c --- /dev/null +++ b/SOURCES/7.4.138 @@ -0,0 +1,55 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.138 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.138 (after 7.4.114) +Problem: Directory change messages are not recognized. +Solution: Fix using a character range literally. (Lech Lorens) +Files: src/option.h + + +*** ../vim-7.4.137/src/option.h 2013-12-11 12:22:54.000000000 +0100 +--- src/option.h 2014-01-10 15:17:09.000000000 +0100 +*************** +*** 31,39 **** + # define DFLT_EFM "%A%p^,%C%%CC-%t-%m,%Cat line number %l in file %f,%f|%l| %m" + # else /* Unix, probably */ + # ifdef EBCDIC +! #define DFLT_EFM "%*[^ ] %*[^ ] %f:%l%*[ ]%m,%*[^\"]\"%f\"%*\\D%l: %m,\"%f\"%*\\D%l: %m,%f:%l:%c:%m,%f(%l):%m,%f:%l:%m,\"%f\"\\, line %l%*\\D%c%*[^ ] %m,%D%*\\a[%*\\d]: Entering directory [`']%f',%X%*\\a[%*\\d]: Leaving directory [`']%f',%DMaking %*\\a in %f,%f|%l| %m" + # else +! #define DFLT_EFM "%*[^\"]\"%f\"%*\\D%l: %m,\"%f\"%*\\D%l: %m,%-G%f:%l: (Each undeclared identifier is reported only once,%-G%f:%l: for each function it appears in.),%-GIn file included from %f:%l:%c:,%-GIn file included from %f:%l:%c\\,,%-GIn file included from %f:%l:%c,%-GIn file included from %f:%l,%-G%*[ ]from %f:%l:%c,%-G%*[ ]from %f:%l:,%-G%*[ ]from %f:%l\\,,%-G%*[ ]from %f:%l,%f:%l:%c:%m,%f(%l):%m,%f:%l:%m,\"%f\"\\, line %l%*\\D%c%*[^ ] %m,%D%*\\a[%*\\d]: Entering directory [`']%f',%X%*\\a[%*\\d]: Leaving directory [`']%f',%D%*\\a: Entering directory [`']%f',%X%*\\a: Leaving directory [`']%f',%DMaking %*\\a in %f,%f|%l| %m" + # endif + # endif + # endif +--- 31,39 ---- + # define DFLT_EFM "%A%p^,%C%%CC-%t-%m,%Cat line number %l in file %f,%f|%l| %m" + # else /* Unix, probably */ + # ifdef EBCDIC +! #define DFLT_EFM "%*[^ ] %*[^ ] %f:%l%*[ ]%m,%*[^\"]\"%f\"%*\\D%l: %m,\"%f\"%*\\D%l: %m,%f:%l:%c:%m,%f(%l):%m,%f:%l:%m,\"%f\"\\, line %l%*\\D%c%*[^ ] %m,%D%*\\a[%*\\d]: Entering directory %*[`']%f',%X%*\\a[%*\\d]: Leaving directory %*[`']%f',%DMaking %*\\a in %f,%f|%l| %m" + # else +! #define DFLT_EFM "%*[^\"]\"%f\"%*\\D%l: %m,\"%f\"%*\\D%l: %m,%-G%f:%l: (Each undeclared identifier is reported only once,%-G%f:%l: for each function it appears in.),%-GIn file included from %f:%l:%c:,%-GIn file included from %f:%l:%c\\,,%-GIn file included from %f:%l:%c,%-GIn file included from %f:%l,%-G%*[ ]from %f:%l:%c,%-G%*[ ]from %f:%l:,%-G%*[ ]from %f:%l\\,,%-G%*[ ]from %f:%l,%f:%l:%c:%m,%f(%l):%m,%f:%l:%m,\"%f\"\\, line %l%*\\D%c%*[^ ] %m,%D%*\\a[%*\\d]: Entering directory %*[`']%f',%X%*\\a[%*\\d]: Leaving directory %*[`']%f',%D%*\\a: Entering directory %*[`']%f',%X%*\\a: Leaving directory %*[`']%f',%DMaking %*\\a in %f,%f|%l| %m" + # endif + # endif + # endif +*** ../vim-7.4.137/src/version.c 2014-01-10 13:51:35.000000000 +0100 +--- src/version.c 2014-01-10 15:17:04.000000000 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 138, + /**/ + +-- +In a world without fences, who needs Gates and Windows? + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.139 b/SOURCES/7.4.139 new file mode 100644 index 0000000..dc870dc --- /dev/null +++ b/SOURCES/7.4.139 @@ -0,0 +1,76 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.139 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.139 +Problem: Crash when using :cd in autocommand. (François Ingelrest) +Solution: Set w_localdir to NULL after freeing it. (Dominique Pelle) +Files: src/ex_docmd.c, src/window.c + + +*** ../vim-7.4.138/src/ex_docmd.c 2013-12-14 13:06:13.000000000 +0100 +--- src/ex_docmd.c 2014-01-10 15:39:58.000000000 +0100 +*************** +*** 8228,8233 **** +--- 8228,8234 ---- + int local; + { + vim_free(curwin->w_localdir); ++ curwin->w_localdir = NULL; + if (local) + { + /* If still in global directory, need to remember current +*************** +*** 8244,8250 **** + * name. */ + vim_free(globaldir); + globaldir = NULL; +- curwin->w_localdir = NULL; + } + + shorten_fnames(TRUE); +--- 8245,8250 ---- +*** ../vim-7.4.138/src/window.c 2013-08-14 17:11:14.000000000 +0200 +--- src/window.c 2014-01-10 15:39:58.000000000 +0100 +*************** +*** 1216,1223 **** + else + copy_loclist(oldp, newp); + #endif +! if (oldp->w_localdir != NULL) +! newp->w_localdir = vim_strsave(oldp->w_localdir); + + /* copy tagstack and folds */ + for (i = 0; i < oldp->w_tagstacklen; i++) +--- 1216,1223 ---- + else + copy_loclist(oldp, newp); + #endif +! newp->w_localdir = (oldp->w_localdir == NULL) +! ? NULL : vim_strsave(oldp->w_localdir); + + /* copy tagstack and folds */ + for (i = 0; i < oldp->w_tagstacklen; i++) +*** ../vim-7.4.138/src/version.c 2014-01-10 15:32:17.000000000 +0100 +--- src/version.c 2014-01-10 15:39:48.000000000 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 139, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +132. You come back and check this list every half-hour. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.140 b/SOURCES/7.4.140 new file mode 100644 index 0000000..e493828 --- /dev/null +++ b/SOURCES/7.4.140 @@ -0,0 +1,174 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.140 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.140 +Problem: Crash when wiping out buffer triggers autocommand that wipes out + only other buffer. +Solution: Do not delete the last buffer, make it empty. (Hirohito Higashi) +Files: src/buffer.c + + +*** ../vim-7.4.139/src/buffer.c 2013-11-06 05:26:08.000000000 +0100 +--- src/buffer.c 2014-01-10 16:41:22.000000000 +0100 +*************** +*** 994,999 **** +--- 994,1043 ---- + #if defined(FEAT_LISTCMDS) || defined(FEAT_PYTHON) \ + || defined(FEAT_PYTHON3) || defined(PROTO) + ++ static int empty_curbuf __ARGS((int close_others, int forceit, int action)); ++ ++ /* ++ * Make the current buffer empty. ++ * Used when it is wiped out and it's the last buffer. ++ */ ++ static int ++ empty_curbuf(close_others, forceit, action) ++ int close_others; ++ int forceit; ++ int action; ++ { ++ int retval; ++ buf_T *buf = curbuf; ++ ++ if (action == DOBUF_UNLOAD) ++ { ++ EMSG(_("E90: Cannot unload last buffer")); ++ return FAIL; ++ } ++ ++ if (close_others) ++ { ++ /* Close any other windows on this buffer, then make it empty. */ ++ #ifdef FEAT_WINDOWS ++ close_windows(buf, TRUE); ++ #endif ++ } ++ ++ setpcmark(); ++ retval = do_ecmd(0, NULL, NULL, NULL, ECMD_ONE, ++ forceit ? ECMD_FORCEIT : 0, curwin); ++ ++ /* ++ * do_ecmd() may create a new buffer, then we have to delete ++ * the old one. But do_ecmd() may have done that already, check ++ * if the buffer still exists. ++ */ ++ if (buf != curbuf && buf_valid(buf) && buf->b_nwindows == 0) ++ close_buffer(NULL, buf, action, FALSE); ++ if (!close_others) ++ need_fileinfo = FALSE; ++ return retval; ++ } + /* + * Implementation of the commands for the buffer list. + * +*************** +*** 1114,1120 **** + if (unload) + { + int forward; +- int retval; + + /* When unloading or deleting a buffer that's already unloaded and + * unlisted: fail silently. */ +--- 1158,1163 ---- +*************** +*** 1155,1184 **** + if (bp->b_p_bl && bp != buf) + break; + if (bp == NULL && buf == curbuf) +! { +! if (action == DOBUF_UNLOAD) +! { +! EMSG(_("E90: Cannot unload last buffer")); +! return FAIL; +! } +! +! /* Close any other windows on this buffer, then make it empty. */ +! #ifdef FEAT_WINDOWS +! close_windows(buf, TRUE); +! #endif +! setpcmark(); +! retval = do_ecmd(0, NULL, NULL, NULL, ECMD_ONE, +! forceit ? ECMD_FORCEIT : 0, curwin); +! +! /* +! * do_ecmd() may create a new buffer, then we have to delete +! * the old one. But do_ecmd() may have done that already, check +! * if the buffer still exists. +! */ +! if (buf != curbuf && buf_valid(buf) && buf->b_nwindows == 0) +! close_buffer(NULL, buf, action, FALSE); +! return retval; +! } + + #ifdef FEAT_WINDOWS + /* +--- 1198,1204 ---- + if (bp->b_p_bl && bp != buf) + break; + if (bp == NULL && buf == curbuf) +! return empty_curbuf(TRUE, forceit, action); + + #ifdef FEAT_WINDOWS + /* +*************** +*** 1212,1218 **** + + /* + * Deleting the current buffer: Need to find another buffer to go to. +! * There must be another, otherwise it would have been handled above. + * First use au_new_curbuf, if it is valid. + * Then prefer the buffer we most recently visited. + * Else try to find one that is loaded, after the current buffer, +--- 1232,1239 ---- + + /* + * Deleting the current buffer: Need to find another buffer to go to. +! * There should be another, otherwise it would have been handled +! * above. However, autocommands may have deleted all buffers. + * First use au_new_curbuf, if it is valid. + * Then prefer the buffer we most recently visited. + * Else try to find one that is loaded, after the current buffer, +*************** +*** 1311,1316 **** +--- 1332,1344 ---- + } + } + ++ if (buf == NULL) ++ { ++ /* Autocommands must have wiped out all other buffers. Only option ++ * now is to make the current buffer empty. */ ++ return empty_curbuf(FALSE, forceit, action); ++ } ++ + /* + * make buf current buffer + */ +*** ../vim-7.4.139/src/version.c 2014-01-10 15:53:09.000000000 +0100 +--- src/version.c 2014-01-10 16:36:03.000000000 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 140, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +133. You communicate with people on other continents more than you + do with your own neighbors. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.141 b/SOURCES/7.4.141 new file mode 100644 index 0000000..8667b72 --- /dev/null +++ b/SOURCES/7.4.141 @@ -0,0 +1,88 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.141 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.141 +Problem: Problems when building with Borland: st_mode is signed short; + can't build with Python; temp files not ignored by Mercurial; + building with DEBUG doesn't define _DEBUG. +Solution: Fix the problems. (Ken Takata) +Files: src/Make_bc5.mak, src/if_py_both.h, src/os_win32.c + + +*** ../vim-7.4.140/src/Make_bc5.mak 2013-06-03 20:09:58.000000000 +0200 +--- src/Make_bc5.mak 2014-01-10 18:12:14.000000000 +0100 +*************** +*** 419,425 **** + ALIGNARG = -a$(ALIGN) + # + !if ("$(DEBUG)"=="yes") +! DEFINES=$(DEFINES) -DDEBUG + !endif + # + !if ("$(OLE)"=="yes") +--- 419,425 ---- + ALIGNARG = -a$(ALIGN) + # + !if ("$(DEBUG)"=="yes") +! DEFINES=$(DEFINES) -DDEBUG -D_DEBUG + !endif + # + !if ("$(OLE)"=="yes") +*** ../vim-7.4.140/src/if_py_both.h 2013-12-07 14:28:37.000000000 +0100 +--- src/if_py_both.h 2014-01-10 18:12:14.000000000 +0100 +*************** +*** 13,18 **** +--- 13,23 ---- + * Common code for if_python.c and if_python3.c. + */ + ++ #ifdef __BORLANDC__ ++ /* Disable Warning W8060: Possibly incorrect assignment in function ... */ ++ # pragma warn -8060 ++ #endif ++ + static char_u e_py_systemexit[] = "E880: Can't handle SystemExit of %s exception in vim"; + + #if PY_VERSION_HEX < 0x02050000 +*** ../vim-7.4.140/src/os_win32.c 2014-01-10 13:51:35.000000000 +0100 +--- src/os_win32.c 2014-01-10 18:12:14.000000000 +0100 +*************** +*** 2960,2966 **** + int n; + + n = mch_stat(name, &st); +! return n == 0 ? (long)st.st_mode : -1L; + } + + +--- 2960,2966 ---- + int n; + + n = mch_stat(name, &st); +! return n == 0 ? (long)(unsigned short)st.st_mode : -1L; + } + + +*** ../vim-7.4.140/src/version.c 2014-01-10 16:43:09.000000000 +0100 +--- src/version.c 2014-01-10 18:14:58.000000000 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 141, + /**/ + +-- +Never eat yellow snow. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.142 b/SOURCES/7.4.142 new file mode 100644 index 0000000..0e4f8f0 --- /dev/null +++ b/SOURCES/7.4.142 @@ -0,0 +1,186 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.142 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.142 (after 7.4.137) +Problem: On MS-Windows 8 IME input doen't work correctly. +Solution: Work around the problem. (Nobuhiro Takasaki) +Files: src/os_win32.c + + +*** ../vim-7.4.141/src/os_win32.c 2014-01-10 18:16:00.000000000 +0100 +--- src/os_win32.c 2014-01-12 13:23:24.000000000 +0100 +*************** +*** 234,289 **** + + /* + * Version of ReadConsoleInput() that works with IME. + */ + static BOOL + read_console_input( +! HANDLE hConsoleInput, +! PINPUT_RECORD lpBuffer, +! DWORD nLength, +! LPDWORD lpNumberOfEventsRead) + { + enum + { +! IRSIZE = 10, /* rough value */ + }; +! static INPUT_RECORD irCache[IRSIZE]; + static DWORD s_dwIndex = 0; + static DWORD s_dwMax = 0; +! +! if (hConsoleInput == NULL || lpBuffer == NULL) +! return ReadConsoleInput(hConsoleInput, lpBuffer, nLength, +! lpNumberOfEventsRead); +! +! if (nLength == -1) +! { +! if (s_dwMax == 0) +! { +! PeekConsoleInput(hConsoleInput, lpBuffer, 1, lpNumberOfEventsRead); +! if (*lpNumberOfEventsRead == 0) +! return FALSE; +! ReadConsoleInput(hConsoleInput, irCache, IRSIZE, &s_dwMax); +! s_dwIndex = 0; +! } +! ((PINPUT_RECORD)lpBuffer)[0] = irCache[s_dwIndex]; +! *lpNumberOfEventsRead = 1; +! return TRUE; +! } + + if (s_dwMax == 0) + { +! ReadConsoleInput(hConsoleInput, irCache, IRSIZE, &s_dwMax); + s_dwIndex = 0; +! if (s_dwMax == 0) + { +! *lpNumberOfEventsRead = 0; +! return FALSE; + } + } +! +! ((PINPUT_RECORD)lpBuffer)[0] = irCache[s_dwIndex]; +! if (++s_dwIndex == s_dwMax) + s_dwMax = 0; +! *lpNumberOfEventsRead = 1; + return TRUE; + } + +--- 234,275 ---- + + /* + * Version of ReadConsoleInput() that works with IME. ++ * Works around problems on Windows 8. + */ + static BOOL + read_console_input( +! HANDLE hInput, +! INPUT_RECORD *lpBuffer, +! DWORD nLength, +! LPDWORD lpEvents) + { + enum + { +! IRSIZE = 10 + }; +! static INPUT_RECORD s_irCache[IRSIZE]; + static DWORD s_dwIndex = 0; + static DWORD s_dwMax = 0; +! DWORD dwEvents; + + if (s_dwMax == 0) + { +! if (nLength == -1) +! return PeekConsoleInput(hInput, lpBuffer, 1, lpEvents); +! if (!ReadConsoleInput(hInput, s_irCache, IRSIZE, &dwEvents)) +! return FALSE; + s_dwIndex = 0; +! s_dwMax = dwEvents; +! if (dwEvents == 0) + { +! *lpEvents = 0; +! return TRUE; + } + } +! *lpBuffer = s_irCache[s_dwIndex]; +! if (nLength != -1 && ++s_dwIndex >= s_dwMax) + s_dwMax = 0; +! *lpEvents = 1; + return TRUE; + } + +*************** +*** 292,304 **** + */ + static BOOL + peek_console_input( +! HANDLE hConsoleInput, +! PINPUT_RECORD lpBuffer, +! DWORD nLength, +! LPDWORD lpNumberOfEventsRead) + { +! return read_console_input(hConsoleInput, lpBuffer, -1, +! lpNumberOfEventsRead); + } + + static void +--- 278,289 ---- + */ + static BOOL + peek_console_input( +! HANDLE hInput, +! INPUT_RECORD *lpBuffer, +! DWORD nLength, +! LPDWORD lpEvents) + { +! return read_console_input(hInput, lpBuffer, -1, lpEvents); + } + + static void +*************** +*** 585,594 **** + static BOOL + win32_enable_privilege(LPTSTR lpszPrivilege, BOOL bEnable) + { +! BOOL bResult; +! LUID luid; +! HANDLE hToken; +! TOKEN_PRIVILEGES tokenPrivileges; + + if (!OpenProcessToken(GetCurrentProcess(), + TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, &hToken)) +--- 570,579 ---- + static BOOL + win32_enable_privilege(LPTSTR lpszPrivilege, BOOL bEnable) + { +! BOOL bResult; +! LUID luid; +! HANDLE hToken; +! TOKEN_PRIVILEGES tokenPrivileges; + + if (!OpenProcessToken(GetCurrentProcess(), + TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, &hToken)) +*** ../vim-7.4.141/src/version.c 2014-01-10 18:16:00.000000000 +0100 +--- src/version.c 2014-01-12 13:17:47.000000000 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 142, + /**/ + +-- +Drink wet cement and get really stoned. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.143 b/SOURCES/7.4.143 new file mode 100644 index 0000000..909a9e9 --- /dev/null +++ b/SOURCES/7.4.143 @@ -0,0 +1,214 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.143 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.143 +Problem: TextChangedI is not triggered. +Solution: Reverse check for "ready". (lilydjwg) +Files: src/edit.c + + +*** ../vim-7.4.142/src/edit.c 2013-11-06 04:01:31.000000000 +0100 +--- src/edit.c 2014-01-12 13:30:53.000000000 +0100 +*************** +*** 1556,1642 **** + int conceal_update_lines = FALSE; + #endif + +! if (!char_avail()) +! { + #if defined(FEAT_AUTOCMD) || defined(FEAT_CONCEAL) +! /* Trigger CursorMoved if the cursor moved. Not when the popup menu is +! * visible, the command might delete it. */ +! if (ready && ( + # ifdef FEAT_AUTOCMD +! has_cursormovedI() + # endif + # if defined(FEAT_AUTOCMD) && defined(FEAT_CONCEAL) +! || + # endif + # ifdef FEAT_CONCEAL +! curwin->w_p_cole > 0 + # endif +! ) +! && !equalpos(last_cursormoved, curwin->w_cursor) + # ifdef FEAT_INS_EXPAND +! && !pum_visible() + # endif +! ) +! { + # ifdef FEAT_SYN_HL +! /* Need to update the screen first, to make sure syntax +! * highlighting is correct after making a change (e.g., inserting +! * a "(". The autocommand may also require a redraw, so it's done +! * again below, unfortunately. */ +! if (syntax_present(curwin) && must_redraw) +! update_screen(0); + # endif + # ifdef FEAT_AUTOCMD +! if (has_cursormovedI()) +! apply_autocmds(EVENT_CURSORMOVEDI, NULL, NULL, FALSE, curbuf); + # endif + # ifdef FEAT_CONCEAL +! if (curwin->w_p_cole > 0) +! { +! conceal_old_cursor_line = last_cursormoved.lnum; +! conceal_new_cursor_line = curwin->w_cursor.lnum; +! conceal_update_lines = TRUE; +! } +! # endif +! last_cursormoved = curwin->w_cursor; + } + #endif + #ifdef FEAT_AUTOCMD +! /* Trigger TextChangedI if b_changedtick differs. */ +! if (!ready && has_textchangedI() +! && last_changedtick != curbuf->b_changedtick + # ifdef FEAT_INS_EXPAND +! && !pum_visible() + # endif +! ) +! { +! if (last_changedtick_buf == curbuf) +! apply_autocmds(EVENT_TEXTCHANGEDI, NULL, NULL, FALSE, curbuf); +! last_changedtick_buf = curbuf; +! last_changedtick = curbuf->b_changedtick; +! } + #endif +! if (must_redraw) +! update_screen(0); +! else if (clear_cmdline || redraw_cmdline) +! showmode(); /* clear cmdline and show mode */ + # if defined(FEAT_CONCEAL) +! if ((conceal_update_lines +! && (conceal_old_cursor_line != conceal_new_cursor_line +! || conceal_cursor_line(curwin))) +! || need_cursor_line_redraw) +! { +! if (conceal_old_cursor_line != conceal_new_cursor_line) +! update_single_line(curwin, conceal_old_cursor_line); +! update_single_line(curwin, conceal_new_cursor_line == 0 +! ? curwin->w_cursor.lnum : conceal_new_cursor_line); +! curwin->w_valid &= ~VALID_CROW; +! } +! # endif +! showruler(FALSE); +! setcursor(); +! emsg_on_display = FALSE; /* may remove error message now */ + } + } + + /* +--- 1556,1644 ---- + int conceal_update_lines = FALSE; + #endif + +! if (char_avail()) +! return; +! + #if defined(FEAT_AUTOCMD) || defined(FEAT_CONCEAL) +! /* Trigger CursorMoved if the cursor moved. Not when the popup menu is +! * visible, the command might delete it. */ +! if (ready && ( + # ifdef FEAT_AUTOCMD +! has_cursormovedI() + # endif + # if defined(FEAT_AUTOCMD) && defined(FEAT_CONCEAL) +! || + # endif + # ifdef FEAT_CONCEAL +! curwin->w_p_cole > 0 + # endif +! ) +! && !equalpos(last_cursormoved, curwin->w_cursor) + # ifdef FEAT_INS_EXPAND +! && !pum_visible() + # endif +! ) +! { + # ifdef FEAT_SYN_HL +! /* Need to update the screen first, to make sure syntax +! * highlighting is correct after making a change (e.g., inserting +! * a "(". The autocommand may also require a redraw, so it's done +! * again below, unfortunately. */ +! if (syntax_present(curwin) && must_redraw) +! update_screen(0); + # endif + # ifdef FEAT_AUTOCMD +! if (has_cursormovedI()) +! apply_autocmds(EVENT_CURSORMOVEDI, NULL, NULL, FALSE, curbuf); + # endif + # ifdef FEAT_CONCEAL +! if (curwin->w_p_cole > 0) +! { +! conceal_old_cursor_line = last_cursormoved.lnum; +! conceal_new_cursor_line = curwin->w_cursor.lnum; +! conceal_update_lines = TRUE; + } ++ # endif ++ last_cursormoved = curwin->w_cursor; ++ } + #endif ++ + #ifdef FEAT_AUTOCMD +! /* Trigger TextChangedI if b_changedtick differs. */ +! if (ready && has_textchangedI() +! && last_changedtick != curbuf->b_changedtick + # ifdef FEAT_INS_EXPAND +! && !pum_visible() + # endif +! ) +! { +! if (last_changedtick_buf == curbuf) +! apply_autocmds(EVENT_TEXTCHANGEDI, NULL, NULL, FALSE, curbuf); +! last_changedtick_buf = curbuf; +! last_changedtick = curbuf->b_changedtick; +! } + #endif +! +! if (must_redraw) +! update_screen(0); +! else if (clear_cmdline || redraw_cmdline) +! showmode(); /* clear cmdline and show mode */ + # if defined(FEAT_CONCEAL) +! if ((conceal_update_lines +! && (conceal_old_cursor_line != conceal_new_cursor_line +! || conceal_cursor_line(curwin))) +! || need_cursor_line_redraw) +! { +! if (conceal_old_cursor_line != conceal_new_cursor_line) +! update_single_line(curwin, conceal_old_cursor_line); +! update_single_line(curwin, conceal_new_cursor_line == 0 +! ? curwin->w_cursor.lnum : conceal_new_cursor_line); +! curwin->w_valid &= ~VALID_CROW; + } ++ # endif ++ showruler(FALSE); ++ setcursor(); ++ emsg_on_display = FALSE; /* may remove error message now */ + } + + /* +*** ../vim-7.4.142/src/version.c 2014-01-12 13:24:46.000000000 +0100 +--- src/version.c 2014-01-14 12:15:50.000000000 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 143, + /**/ + +-- +You are not really successful until someone claims he sat +beside you in school. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.144 b/SOURCES/7.4.144 new file mode 100644 index 0000000..c88e2d2 --- /dev/null +++ b/SOURCES/7.4.144 @@ -0,0 +1,52 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.144 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.144 +Problem: MingW also supports intptr_t for OPEN_OH_ARGTYPE. +Solution: Adjust #ifdef. (Ken Takata) +Files: src/os_mswin.c + + +*** ../vim-7.4.143/src/os_mswin.c 2014-01-10 13:05:12.000000000 +0100 +--- src/os_mswin.c 2014-01-14 12:15:30.000000000 +0100 +*************** +*** 498,504 **** + } + } + +! #if (_MSC_VER >= 1300) + # define OPEN_OH_ARGTYPE intptr_t + #else + # define OPEN_OH_ARGTYPE long +--- 498,504 ---- + } + } + +! #if (defined(_MSC_VER) && (_MSC_VER >= 1300)) || defined(__MINGW32__) + # define OPEN_OH_ARGTYPE intptr_t + #else + # define OPEN_OH_ARGTYPE long +*** ../vim-7.4.143/src/version.c 2014-01-14 12:16:57.000000000 +0100 +--- src/version.c 2014-01-14 12:18:10.000000000 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 144, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +150. You find yourself counting emoticons to get to sleep. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.145 b/SOURCES/7.4.145 new file mode 100644 index 0000000..aa7b28d --- /dev/null +++ b/SOURCES/7.4.145 @@ -0,0 +1,75 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.145 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.145 +Problem: getregtype() does not return zero for unknown register. +Solution: Adjust documention: return empty string for unknown register. + Check the register name to be valid. (Yukihiro Nakadaira) +Files: runtime/doc/eval.txt, src/ops.c + + +*** ../vim-7.4.144/runtime/doc/eval.txt 2013-11-09 01:44:38.000000000 +0100 +--- runtime/doc/eval.txt 2014-01-14 12:24:35.000000000 +0100 +*************** +*** 3459,3465 **** + "v" for |characterwise| text + "V" for |linewise| text + "{width}" for |blockwise-visual| text +! 0 for an empty or unknown register + is one character with value 0x16. + If {regname} is not specified, |v:register| is used. + +--- 3460,3466 ---- + "v" for |characterwise| text + "V" for |linewise| text + "{width}" for |blockwise-visual| text +! "" for an empty or unknown register + is one character with value 0x16. + If {regname} is not specified, |v:register| is used. + +*** ../vim-7.4.144/src/ops.c 2013-11-21 14:39:58.000000000 +0100 +--- src/ops.c 2014-01-14 12:28:33.000000000 +0100 +*************** +*** 6240,6246 **** + regname = may_get_selection(regname); + #endif + +! /* Should we check for a valid name? */ + get_yank_register(regname, FALSE); + + if (y_current->y_array != NULL) +--- 6240,6248 ---- + regname = may_get_selection(regname); + #endif + +! if (regname != NUL && !valid_yank_reg(regname, FALSE)) +! return MAUTO; +! + get_yank_register(regname, FALSE); + + if (y_current->y_array != NULL) +*** ../vim-7.4.144/src/version.c 2014-01-14 12:18:41.000000000 +0100 +--- src/version.c 2014-01-14 12:26:13.000000000 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 145, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +151. You find yourself engaged to someone you've never actually met, + except through e-mail. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.146 b/SOURCES/7.4.146 new file mode 100644 index 0000000..f23a77d --- /dev/null +++ b/SOURCES/7.4.146 @@ -0,0 +1,67 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.146 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.146 +Problem: When starting Vim with "-u NONE" v:oldfiles is NULL. +Solution: Set v:oldfiles to an empty list. (Yasuhiro Matsumoto) +Files: src/main.c + + +*** ../vim-7.4.145/src/main.c 2013-09-29 16:27:42.000000000 +0200 +--- src/main.c 2014-01-14 12:53:28.000000000 +0100 +*************** +*** 702,707 **** +--- 702,712 ---- + TIME_MSG("reading viminfo"); + } + #endif ++ #ifdef FEAT_EVAL ++ /* It's better to make v:oldfiles an empty list than NULL. */ ++ if (get_vim_var_list(VV_OLDFILES) == NULL) ++ set_vim_var_list(VV_OLDFILES, list_alloc()); ++ #endif + + #ifdef FEAT_QUICKFIX + /* +*************** +*** 1048,1054 **** + /* Setup to catch a terminating error from the X server. Just ignore + * it, restore the state and continue. This might not always work + * properly, but at least we don't exit unexpectedly when the X server +! * exists while Vim is running in a console. */ + if (!cmdwin && !noexmode && SETJMP(x_jump_env)) + { + State = NORMAL; +--- 1053,1059 ---- + /* Setup to catch a terminating error from the X server. Just ignore + * it, restore the state and continue. This might not always work + * properly, but at least we don't exit unexpectedly when the X server +! * exits while Vim is running in a console. */ + if (!cmdwin && !noexmode && SETJMP(x_jump_env)) + { + State = NORMAL; +*** ../vim-7.4.145/src/version.c 2014-01-14 12:33:32.000000000 +0100 +--- src/version.c 2014-01-14 12:56:08.000000000 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 146, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +152. You find yourself falling for someone you've never seen or hardly + know, but, boy can he/she TYPE!!!!!! + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.148 b/SOURCES/7.4.148 new file mode 100644 index 0000000..582b378 --- /dev/null +++ b/SOURCES/7.4.148 @@ -0,0 +1,83 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.148 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.148 +Problem: Cannot build with Cygwin and X11. +Solution: Include Xwindows.h instead of windows.h. (Lech Lorens) +Files: src/mbyte.c + + +*** ../vim-7.4.147/src/mbyte.c 2013-11-12 04:43:57.000000000 +0100 +--- src/mbyte.c 2014-01-14 13:21:36.000000000 +0100 +*************** +*** 83,92 **** + # ifndef WIN32_LEAN_AND_MEAN + # define WIN32_LEAN_AND_MEAN + # endif +! # include + # ifdef WIN32 + # undef WIN32 /* Some windows.h define WIN32, we don't want that here. */ + # endif + #endif + + #if (defined(WIN3264) || defined(WIN32UNIX)) && !defined(__MINGW32__) +--- 83,100 ---- + # ifndef WIN32_LEAN_AND_MEAN + # define WIN32_LEAN_AND_MEAN + # endif +! # if defined(FEAT_GUI) || defined(FEAT_XCLIPBOARD) +! # include +! # define WINBYTE wBYTE +! # else +! # include +! # define WINBYTE BYTE +! # endif + # ifdef WIN32 + # undef WIN32 /* Some windows.h define WIN32, we don't want that here. */ + # endif ++ #else ++ # define WINBYTE BYTE + #endif + + #if (defined(WIN3264) || defined(WIN32UNIX)) && !defined(__MINGW32__) +*************** +*** 698,704 **** + /* enc_dbcs is set by setting 'fileencoding'. It becomes a Windows + * CodePage identifier, which we can pass directly in to Windows + * API */ +! n = IsDBCSLeadByteEx(enc_dbcs, (BYTE)i) ? 2 : 1; + #else + # if defined(MACOS) || defined(__amigaos4__) + /* +--- 706,712 ---- + /* enc_dbcs is set by setting 'fileencoding'. It becomes a Windows + * CodePage identifier, which we can pass directly in to Windows + * API */ +! n = IsDBCSLeadByteEx(enc_dbcs, (WINBYTE)i) ? 2 : 1; + #else + # if defined(MACOS) || defined(__amigaos4__) + /* +*** ../vim-7.4.147/src/version.c 2014-01-14 13:18:53.000000000 +0100 +--- src/version.c 2014-01-14 13:24:17.000000000 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 148, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +154. You fondle your mouse. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.149 b/SOURCES/7.4.149 new file mode 100644 index 0000000..b158420 --- /dev/null +++ b/SOURCES/7.4.149 @@ -0,0 +1,822 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.149 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.149 +Problem: Get E685 error when assigning a function to an autoload variable. + (Yukihiro Nakadaira) +Solution: Instead of having a global no_autoload variable, pass an autoload + flag down to where it is used. (ZyX) +Files: src/eval.c, src/testdir/test55.in, src/testdir/test55.ok, + src/testdir/test60.in, src/testdir/test60.ok, + src/testdir/sautest/autoload/footest.vim + + +*** ../vim-7.4.148/src/eval.c 2014-01-06 06:18:44.000000000 +0100 +--- src/eval.c 2014-01-14 15:14:05.000000000 +0100 +*************** +*** 125,133 **** + */ + static hashtab_T compat_hashtab; + +- /* When using exists() don't auto-load a script. */ +- static int no_autoload = FALSE; +- + /* + * When recursively copying lists and dicts we need to remember which ones we + * have done to avoid endless recursiveness. This unique ID is used for that. +--- 125,130 ---- +*************** +*** 156,161 **** +--- 153,163 ---- + /* Values for trans_function_name() argument: */ + #define TFN_INT 1 /* internal function name OK */ + #define TFN_QUIET 2 /* no error messages */ ++ #define TFN_NO_AUTOLOAD 4 /* do not use script autoloading */ ++ ++ /* Values for get_lval() flags argument: */ ++ #define GLV_QUIET TFN_QUIET /* no error messages */ ++ #define GLV_NO_AUTOLOAD TFN_NO_AUTOLOAD /* do not use script autoloading */ + + /* + * Structure to hold info for a user function. +*************** +*** 390,396 **** + static char_u *list_arg_vars __ARGS((exarg_T *eap, char_u *arg, int *first)); + static char_u *ex_let_one __ARGS((char_u *arg, typval_T *tv, int copy, char_u *endchars, char_u *op)); + static int check_changedtick __ARGS((char_u *arg)); +! static char_u *get_lval __ARGS((char_u *name, typval_T *rettv, lval_T *lp, int unlet, int skip, int quiet, int fne_flags)); + static void clear_lval __ARGS((lval_T *lp)); + static void set_var_lval __ARGS((lval_T *lp, char_u *endp, typval_T *rettv, int copy, char_u *op)); + static int tv_op __ARGS((typval_T *tv1, typval_T *tv2, char_u *op)); +--- 392,398 ---- + static char_u *list_arg_vars __ARGS((exarg_T *eap, char_u *arg, int *first)); + static char_u *ex_let_one __ARGS((char_u *arg, typval_T *tv, int copy, char_u *endchars, char_u *op)); + static int check_changedtick __ARGS((char_u *arg)); +! static char_u *get_lval __ARGS((char_u *name, typval_T *rettv, lval_T *lp, int unlet, int skip, int flags, int fne_flags)); + static void clear_lval __ARGS((lval_T *lp)); + static void set_var_lval __ARGS((lval_T *lp, char_u *endp, typval_T *rettv, int copy, char_u *op)); + static int tv_op __ARGS((typval_T *tv1, typval_T *tv2, char_u *op)); +*************** +*** 770,776 **** + static char_u * make_expanded_name __ARGS((char_u *in_start, char_u *expr_start, char_u *expr_end, char_u *in_end)); + static int eval_isnamec __ARGS((int c)); + static int eval_isnamec1 __ARGS((int c)); +! static int get_var_tv __ARGS((char_u *name, int len, typval_T *rettv, int verbose)); + static int handle_subscript __ARGS((char_u **arg, typval_T *rettv, int evaluate, int verbose)); + static typval_T *alloc_tv __ARGS((void)); + static typval_T *alloc_string_tv __ARGS((char_u *string)); +--- 772,778 ---- + static char_u * make_expanded_name __ARGS((char_u *in_start, char_u *expr_start, char_u *expr_end, char_u *in_end)); + static int eval_isnamec __ARGS((int c)); + static int eval_isnamec1 __ARGS((int c)); +! static int get_var_tv __ARGS((char_u *name, int len, typval_T *rettv, int verbose, int no_autoload)); + static int handle_subscript __ARGS((char_u **arg, typval_T *rettv, int evaluate, int verbose)); + static typval_T *alloc_tv __ARGS((void)); + static typval_T *alloc_string_tv __ARGS((char_u *string)); +*************** +*** 781,788 **** + static char_u *get_tv_string __ARGS((typval_T *varp)); + static char_u *get_tv_string_buf __ARGS((typval_T *varp, char_u *buf)); + static char_u *get_tv_string_buf_chk __ARGS((typval_T *varp, char_u *buf)); +! static dictitem_T *find_var __ARGS((char_u *name, hashtab_T **htp)); +! static dictitem_T *find_var_in_ht __ARGS((hashtab_T *ht, int htname, char_u *varname, int writing)); + static hashtab_T *find_var_ht __ARGS((char_u *name, char_u **varname)); + static void vars_clear_ext __ARGS((hashtab_T *ht, int free_val)); + static void delete_var __ARGS((hashtab_T *ht, hashitem_T *hi)); +--- 783,790 ---- + static char_u *get_tv_string __ARGS((typval_T *varp)); + static char_u *get_tv_string_buf __ARGS((typval_T *varp, char_u *buf)); + static char_u *get_tv_string_buf_chk __ARGS((typval_T *varp, char_u *buf)); +! static dictitem_T *find_var __ARGS((char_u *name, hashtab_T **htp, int no_autoload)); +! static dictitem_T *find_var_in_ht __ARGS((hashtab_T *ht, int htname, char_u *varname, int no_autoload)); + static hashtab_T *find_var_ht __ARGS((char_u *name, char_u **varname)); + static void vars_clear_ext __ARGS((hashtab_T *ht, int free_val)); + static void delete_var __ARGS((hashtab_T *ht, hashitem_T *hi)); +*************** +*** 1059,1065 **** + ga_init2(&redir_ga, (int)sizeof(char), 500); + + /* Parse the variable name (can be a dict or list entry). */ +! redir_endp = get_lval(redir_varname, NULL, redir_lval, FALSE, FALSE, FALSE, + FNE_CHECK_START); + if (redir_endp == NULL || redir_lval->ll_name == NULL || *redir_endp != NUL) + { +--- 1061,1067 ---- + ga_init2(&redir_ga, (int)sizeof(char), 500); + + /* Parse the variable name (can be a dict or list entry). */ +! redir_endp = get_lval(redir_varname, NULL, redir_lval, FALSE, FALSE, 0, + FNE_CHECK_START); + if (redir_endp == NULL || redir_lval->ll_name == NULL || *redir_endp != NUL) + { +*************** +*** 1150,1156 **** + /* Call get_lval() again, if it's inside a Dict or List it may + * have changed. */ + redir_endp = get_lval(redir_varname, NULL, redir_lval, +! FALSE, FALSE, FALSE, FNE_CHECK_START); + if (redir_endp != NULL && redir_lval->ll_name != NULL) + set_var_lval(redir_lval, redir_endp, &tv, FALSE, (char_u *)"."); + clear_lval(redir_lval); +--- 1152,1158 ---- + /* Call get_lval() again, if it's inside a Dict or List it may + * have changed. */ + redir_endp = get_lval(redir_varname, NULL, redir_lval, +! FALSE, FALSE, 0, FNE_CHECK_START); + if (redir_endp != NULL && redir_lval->ll_name != NULL) + set_var_lval(redir_lval, redir_endp, &tv, FALSE, (char_u *)"."); + clear_lval(redir_lval); +*************** +*** 2239,2245 **** + { + if (tofree != NULL) + name = tofree; +! if (get_var_tv(name, len, &tv, TRUE) == FAIL) + error = TRUE; + else + { +--- 2241,2247 ---- + { + if (tofree != NULL) + name = tofree; +! if (get_var_tv(name, len, &tv, TRUE, FALSE) == FAIL) + error = TRUE; + else + { +*************** +*** 2474,2480 **** + { + lval_T lv; + +! p = get_lval(arg, tv, &lv, FALSE, FALSE, FALSE, FNE_CHECK_START); + if (p != NULL && lv.ll_name != NULL) + { + if (endchars != NULL && vim_strchr(endchars, *skipwhite(p)) == NULL) +--- 2476,2482 ---- + { + lval_T lv; + +! p = get_lval(arg, tv, &lv, FALSE, FALSE, 0, FNE_CHECK_START); + if (p != NULL && lv.ll_name != NULL) + { + if (endchars != NULL && vim_strchr(endchars, *skipwhite(p)) == NULL) +*************** +*** 2519,2536 **** + * "unlet" is TRUE for ":unlet": slightly different behavior when something is + * wrong; must end in space or cmd separator. + * + * Returns a pointer to just after the name, including indexes. + * When an evaluation error occurs "lp->ll_name" is NULL; + * Returns NULL for a parsing error. Still need to free items in "lp"! + */ + static char_u * +! get_lval(name, rettv, lp, unlet, skip, quiet, fne_flags) + char_u *name; + typval_T *rettv; + lval_T *lp; + int unlet; + int skip; +! int quiet; /* don't give error messages */ + int fne_flags; /* flags for find_name_end() */ + { + char_u *p; +--- 2521,2542 ---- + * "unlet" is TRUE for ":unlet": slightly different behavior when something is + * wrong; must end in space or cmd separator. + * ++ * flags: ++ * GLV_QUIET: do not give error messages ++ * GLV_NO_AUTOLOAD: do not use script autoloading ++ * + * Returns a pointer to just after the name, including indexes. + * When an evaluation error occurs "lp->ll_name" is NULL; + * Returns NULL for a parsing error. Still need to free items in "lp"! + */ + static char_u * +! get_lval(name, rettv, lp, unlet, skip, flags, fne_flags) + char_u *name; + typval_T *rettv; + lval_T *lp; + int unlet; + int skip; +! int flags; /* GLV_ values */ + int fne_flags; /* flags for find_name_end() */ + { + char_u *p; +*************** +*** 2544,2549 **** +--- 2550,2556 ---- + char_u *key = NULL; + int len; + hashtab_T *ht; ++ int quiet = flags & GLV_QUIET; + + /* Clear everything in "lp". */ + vim_memset(lp, 0, sizeof(lval_T)); +*************** +*** 2591,2597 **** + + cc = *p; + *p = NUL; +! v = find_var(lp->ll_name, &ht); + if (v == NULL && !quiet) + EMSG2(_(e_undefvar), lp->ll_name); + *p = cc; +--- 2598,2604 ---- + + cc = *p; + *p = NUL; +! v = find_var(lp->ll_name, &ht, flags & GLV_NO_AUTOLOAD); + if (v == NULL && !quiet) + EMSG2(_(e_undefvar), lp->ll_name); + *p = cc; +*************** +*** 2904,2910 **** + + /* handle +=, -= and .= */ + if (get_var_tv(lp->ll_name, (int)STRLEN(lp->ll_name), +! &tv, TRUE) == OK) + { + if (tv_op(&tv, rettv, op) == OK) + set_var(lp->ll_name, &tv, FALSE); +--- 2911,2917 ---- + + /* handle +=, -= and .= */ + if (get_var_tv(lp->ll_name, (int)STRLEN(lp->ll_name), +! &tv, TRUE, FALSE) == OK) + { + if (tv_op(&tv, rettv, op) == OK) + set_var(lp->ll_name, &tv, FALSE); +*************** +*** 3556,3562 **** + do + { + /* Parse the name and find the end. */ +! name_end = get_lval(arg, NULL, &lv, TRUE, eap->skip || error, FALSE, + FNE_CHECK_START); + if (lv.ll_name == NULL) + error = TRUE; /* error but continue parsing */ +--- 3563,3569 ---- + do + { + /* Parse the name and find the end. */ +! name_end = get_lval(arg, NULL, &lv, TRUE, eap->skip || error, 0, + FNE_CHECK_START); + if (lv.ll_name == NULL) + error = TRUE; /* error but continue parsing */ +*************** +*** 3709,3715 **** + ret = FAIL; + else + { +! di = find_var(lp->ll_name, NULL); + if (di == NULL) + ret = FAIL; + else +--- 3716,3722 ---- + ret = FAIL; + else + { +! di = find_var(lp->ll_name, NULL, TRUE); + if (di == NULL) + ret = FAIL; + else +*************** +*** 5179,5185 **** + } + } + else if (evaluate) +! ret = get_var_tv(s, len, rettv, TRUE); + else + ret = OK; + } +--- 5186,5192 ---- + } + } + else if (evaluate) +! ret = get_var_tv(s, len, rettv, TRUE, FALSE); + else + ret = OK; + } +*************** +*** 8284,8290 **** + + cc = name[*lenp]; + name[*lenp] = NUL; +! v = find_var(name, NULL); + name[*lenp] = cc; + if (v != NULL && v->di_tv.v_type == VAR_FUNC) + { +--- 8291,8297 ---- + + cc = name[*lenp]; + name[*lenp] = NUL; +! v = find_var(name, NULL, FALSE); + name[*lenp] = cc; + if (v != NULL && v->di_tv.v_type == VAR_FUNC) + { +*************** +*** 10039,10046 **** + int n = FALSE; + int len = 0; + +- no_autoload = TRUE; +- + p = get_tv_string(&argvars[0]); + if (*p == '$') /* environment variable */ + { +--- 10046,10051 ---- +*************** +*** 10091,10097 **** + { + if (tofree != NULL) + name = tofree; +! n = (get_var_tv(name, len, &tv, FALSE) == OK); + if (n) + { + /* handle d.key, l[idx], f(expr) */ +--- 10096,10102 ---- + { + if (tofree != NULL) + name = tofree; +! n = (get_var_tv(name, len, &tv, FALSE, TRUE) == OK); + if (n) + { + /* handle d.key, l[idx], f(expr) */ +*************** +*** 10107,10114 **** + } + + rettv->vval.v_number = n; +- +- no_autoload = FALSE; + } + + #ifdef FEAT_FLOAT +--- 10112,10117 ---- +*************** +*** 13344,13351 **** + dictitem_T *di; + + rettv->vval.v_number = -1; +! end = get_lval(get_tv_string(&argvars[0]), NULL, &lv, FALSE, FALSE, FALSE, +! FNE_CHECK_START); + if (end != NULL && lv.ll_name != NULL) + { + if (*end != NUL) +--- 13347,13354 ---- + dictitem_T *di; + + rettv->vval.v_number = -1; +! end = get_lval(get_tv_string(&argvars[0]), NULL, &lv, FALSE, FALSE, +! GLV_NO_AUTOLOAD, FNE_CHECK_START); + if (end != NULL && lv.ll_name != NULL) + { + if (*end != NUL) +*************** +*** 13358,13364 **** + rettv->vval.v_number = 1; /* always locked */ + else + { +! di = find_var(lv.ll_name, NULL); + if (di != NULL) + { + /* Consider a variable locked when: +--- 13361,13367 ---- + rettv->vval.v_number = 1; /* always locked */ + else + { +! di = find_var(lv.ll_name, NULL, TRUE); + if (di != NULL) + { + /* Consider a variable locked when: +*************** +*** 19774,19784 **** + * Return OK or FAIL. + */ + static int +! get_var_tv(name, len, rettv, verbose) + char_u *name; + int len; /* length of "name" */ + typval_T *rettv; /* NULL when only checking existence */ + int verbose; /* may give error message */ + { + int ret = OK; + typval_T *tv = NULL; +--- 19777,19788 ---- + * Return OK or FAIL. + */ + static int +! get_var_tv(name, len, rettv, verbose, no_autoload) + char_u *name; + int len; /* length of "name" */ + typval_T *rettv; /* NULL when only checking existence */ + int verbose; /* may give error message */ ++ int no_autoload; /* do not use script autoloading */ + { + int ret = OK; + typval_T *tv = NULL; +*************** +*** 19805,19811 **** + */ + else + { +! v = find_var(name, NULL); + if (v != NULL) + tv = &v->di_tv; + } +--- 19809,19815 ---- + */ + else + { +! v = find_var(name, NULL, no_autoload); + if (v != NULL) + tv = &v->di_tv; + } +*************** +*** 20207,20215 **** + * hashtab_T used. + */ + static dictitem_T * +! find_var(name, htp) + char_u *name; + hashtab_T **htp; + { + char_u *varname; + hashtab_T *ht; +--- 20211,20220 ---- + * hashtab_T used. + */ + static dictitem_T * +! find_var(name, htp, no_autoload) + char_u *name; + hashtab_T **htp; ++ int no_autoload; + { + char_u *varname; + hashtab_T *ht; +*************** +*** 20219,20225 **** + *htp = ht; + if (ht == NULL) + return NULL; +! return find_var_in_ht(ht, *name, varname, htp != NULL); + } + + /* +--- 20224,20230 ---- + *htp = ht; + if (ht == NULL) + return NULL; +! return find_var_in_ht(ht, *name, varname, no_autoload || htp != NULL); + } + + /* +*************** +*** 20227,20237 **** + * Returns NULL if not found. + */ + static dictitem_T * +! find_var_in_ht(ht, htname, varname, writing) + hashtab_T *ht; + int htname; + char_u *varname; +! int writing; + { + hashitem_T *hi; + +--- 20232,20242 ---- + * Returns NULL if not found. + */ + static dictitem_T * +! find_var_in_ht(ht, htname, varname, no_autoload) + hashtab_T *ht; + int htname; + char_u *varname; +! int no_autoload; + { + hashitem_T *hi; + +*************** +*** 20263,20269 **** + * worked find the variable again. Don't auto-load a script if it was + * loaded already, otherwise it would be loaded every time when + * checking if a function name is a Funcref variable. */ +! if (ht == &globvarht && !writing) + { + /* Note: script_autoload() may make "hi" invalid. It must either + * be obtained again or not used. */ +--- 20268,20274 ---- + * worked find the variable again. Don't auto-load a script if it was + * loaded already, otherwise it would be loaded every time when + * checking if a function name is a Funcref variable. */ +! if (ht == &globvarht && !no_autoload) + { + /* Note: script_autoload() may make "hi" invalid. It must either + * be obtained again or not used. */ +*************** +*** 20343,20349 **** + { + dictitem_T *v; + +! v = find_var(name, NULL); + if (v == NULL) + return NULL; + return get_tv_string(&v->di_tv); +--- 20348,20354 ---- + { + dictitem_T *v; + +! v = find_var(name, NULL, FALSE); + if (v == NULL) + return NULL; + return get_tv_string(&v->di_tv); +*************** +*** 21672,21678 **** + */ + if (fudi.fd_dict == NULL) + { +! v = find_var(name, &ht); + if (v != NULL && v->di_tv.v_type == VAR_FUNC) + { + emsg_funcname(N_("E707: Function name conflicts with variable: %s"), +--- 21677,21683 ---- + */ + if (fudi.fd_dict == NULL) + { +! v = find_var(name, &ht, FALSE); + if (v != NULL && v->di_tv.v_type == VAR_FUNC) + { + emsg_funcname(N_("E707: Function name conflicts with variable: %s"), +*************** +*** 21830,21837 **** + * Also handles a Funcref in a List or Dictionary. + * Returns the function name in allocated memory, or NULL for failure. + * flags: +! * TFN_INT: internal function name OK +! * TFN_QUIET: be quiet + * Advances "pp" to just after the function name (if no error). + */ + static char_u * +--- 21835,21843 ---- + * Also handles a Funcref in a List or Dictionary. + * Returns the function name in allocated memory, or NULL for failure. + * flags: +! * TFN_INT: internal function name OK +! * TFN_QUIET: be quiet +! * TFN_NO_AUTOLOAD: do not use script autoloading + * Advances "pp" to just after the function name (if no error). + */ + static char_u * +*************** +*** 21869,21875 **** + if (lead > 2) + start += lead; + +! end = get_lval(start, NULL, &lv, FALSE, skip, flags & TFN_QUIET, + lead > 2 ? 0 : FNE_CHECK_START); + if (end == start) + { +--- 21875,21882 ---- + if (lead > 2) + start += lead; + +! /* Note that TFN_ flags use the same values as GLV_ flags. */ +! end = get_lval(start, NULL, &lv, FALSE, skip, flags, + lead > 2 ? 0 : FNE_CHECK_START); + if (end == start) + { +*************** +*** 22146,22152 **** + char_u *p; + int n = FALSE; + +! p = trans_function_name(&nm, FALSE, TFN_INT|TFN_QUIET, NULL); + nm = skipwhite(nm); + + /* Only accept "funcname", "funcname ", "funcname (..." and +--- 22153,22160 ---- + char_u *p; + int n = FALSE; + +! p = trans_function_name(&nm, FALSE, TFN_INT|TFN_QUIET|TFN_NO_AUTOLOAD, +! NULL); + nm = skipwhite(nm); + + /* Only accept "funcname", "funcname ", "funcname (..." and +*************** +*** 22393,22402 **** + int ret = FALSE; + int i; + +- /* Return quickly when autoload disabled. */ +- if (no_autoload) +- return FALSE; +- + /* If there is no '#' after name[0] there is no package name. */ + p = vim_strchr(name, AUTOLOAD_CHAR); + if (p == NULL || p == name) +--- 22401,22406 ---- +*** ../vim-7.4.148/src/testdir/test55.in 2013-03-07 14:33:12.000000000 +0100 +--- src/testdir/test55.in 2014-01-14 14:48:10.000000000 +0100 +*************** +*** 282,287 **** +--- 282,294 ---- + : $put =ps + : endfor + :endfor ++ :" :lockvar/islocked() triggering script autoloading ++ :set rtp+=./sautest ++ :lockvar g:footest#x ++ :unlockvar g:footest#x ++ :$put ='locked g:footest#x:'.islocked('g:footest#x') ++ :$put ='exists g:footest#x:'.exists('g:footest#x') ++ :$put ='g:footest#x: '.g:footest#x + :" + :" a:000 function argument + :" first the tests that should fail +*** ../vim-7.4.148/src/testdir/test55.ok 2012-08-29 16:51:15.000000000 +0200 +--- src/testdir/test55.ok 2014-01-14 14:45:14.000000000 +0100 +*************** +*** 86,91 **** +--- 86,94 ---- + FFpFFpp + 0000-000 + ppppppp ++ locked g:footest#x:-1 ++ exists g:footest#x:0 ++ g:footest#x: 1 + caught a:000 + caught a:000[0] + caught a:000[2] +*** ../vim-7.4.148/src/testdir/test60.in 2010-05-15 13:04:10.000000000 +0200 +--- src/testdir/test60.in 2014-01-14 14:49:10.000000000 +0100 +*************** +*** 1,4 **** +! Tests for the exists() function. vim: set ft=vim : + + STARTTEST + :so small.vim +--- 1,4 ---- +! Tests for the exists() function. vim: set ft=vim ts=8 : + + STARTTEST + :so small.vim +*************** +*** 11,18 **** + endfunction + :function! TestExists() + augroup myagroup +! autocmd! BufEnter *.my echo 'myfile edited' + augroup END + + let test_cases = [] + +--- 11,20 ---- + endfunction + :function! TestExists() + augroup myagroup +! autocmd! BufEnter *.my echo "myfile edited" +! autocmd! FuncUndefined UndefFun exec "fu UndefFun()\nendfu" + augroup END ++ set rtp+=./sautest + + let test_cases = [] + +*************** +*** 95,104 **** + " Non-existing user defined function + let test_cases += [['*MyxyzFunc', 0]] + + redir! > test.out + + for [test_case, result] in test_cases +! echo test_case . ": " . result + call RunTest(test_case, result) + endfor + +--- 97,111 ---- + " Non-existing user defined function + let test_cases += [['*MyxyzFunc', 0]] + ++ " Function that may be created by FuncUndefined event ++ let test_cases += [['*UndefFun', 0]] ++ " Function that may be created by script autoloading ++ let test_cases += [['*footest#F', 0]] ++ + redir! > test.out + + for [test_case, result] in test_cases +! echo test_case . ": " . result + call RunTest(test_case, result) + endfor + +*************** +*** 207,212 **** +--- 214,227 ---- + echo "FAILED" + endif + ++ " Non-existing autoload variable that may be autoloaded ++ echo 'footest#x: 0' ++ if !exists('footest#x') ++ echo "OK" ++ else ++ echo "FAILED" ++ endif ++ + " Valid local list + let local_list = ["blue", "orange"] + echo 'local_list: 1' +*************** +*** 566,571 **** +--- 581,590 ---- + + call TestFuncArg("arg1", "arg2") + ++ echo ' g:footest#x =' g:footest#x ++ echo ' footest#F()' footest#F() ++ echo 'UndefFun()' UndefFun() ++ + redir END + endfunction + :call TestExists() +*************** +*** 576,580 **** +--- 595,600 ---- + :set ff=unix + :w + :qa! ++ :while getchar(1) | call getchar() | endwhile + ENDTEST + +*** ../vim-7.4.148/src/testdir/test60.ok 2010-05-15 13:04:10.000000000 +0200 +--- src/testdir/test60.ok 2014-01-14 14:50:50.000000000 +0100 +*************** +*** 71,76 **** +--- 71,80 ---- + OK + *MyxyzFunc: 0 + OK ++ *UndefFun: 0 ++ OK ++ *footest#F: 0 ++ OK + :edit: 2 + OK + :edit/a: 0 +*************** +*** 95,100 **** +--- 99,106 ---- + OK + local_var: 0 + OK ++ footest#x: 0 ++ OK + local_list: 1 + OK + local_list[1]: 1 +*************** +*** 195,197 **** +--- 201,206 ---- + OK + a:2: 0 + OK ++ g:footest#x = 1 ++ footest#F() 0 ++ UndefFun() 0 +*** ../vim-7.4.148/src/testdir/sautest/autoload/footest.vim 1970-01-01 01:00:00.000000000 +0100 +--- src/testdir/sautest/autoload/footest.vim 2014-01-14 14:52:06.000000000 +0100 +*************** +*** 0 **** +--- 1,5 ---- ++ " Autoload script used by test55 and test60 ++ let footest#x = 1 ++ func footest#F() ++ return 0 ++ endfunc +*** ../vim-7.4.148/src/version.c 2014-01-14 13:26:17.000000000 +0100 +--- src/version.c 2014-01-14 15:23:36.000000000 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 149, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +157. You fum through a magazine, you first check to see if it has a web + address. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.150 b/SOURCES/7.4.150 new file mode 100644 index 0000000..528f4d6 --- /dev/null +++ b/SOURCES/7.4.150 @@ -0,0 +1,93 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.150 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.150 +Problem: :keeppatterns is not respected for :s. +Solution: Check the keeppatterns flag. (Yasuhiro Matsumoto) +Files: src/search.c, src/testdir/test14.in, src/testdir/test14.ok + + +*** ../vim-7.4.149/src/search.c 2013-11-28 19:27:18.000000000 +0100 +--- src/search.c 2014-01-14 15:44:33.000000000 +0100 +*************** +*** 201,207 **** + * Save the currently used pattern in the appropriate place, + * unless the pattern should not be remembered. + */ +! if (!(options & SEARCH_KEEP)) + { + /* search or global command */ + if (pat_save == RE_SEARCH || pat_save == RE_BOTH) +--- 201,207 ---- + * Save the currently used pattern in the appropriate place, + * unless the pattern should not be remembered. + */ +! if (!(options & SEARCH_KEEP) && !cmdmod.keeppatterns) + { + /* search or global command */ + if (pat_save == RE_SEARCH || pat_save == RE_BOTH) +*** ../vim-7.4.149/src/testdir/test14.in 2013-04-03 20:59:14.000000000 +0200 +--- src/testdir/test14.in 2014-01-14 15:43:28.000000000 +0100 +*************** +*** 47,52 **** +--- 47,61 ---- + /two + :call search('.', 'c') + :call append(line('$'), getline('.')[col('.') - 1:]) ++ :" ++ /^substitute ++ :s/foo/bar/ ++ :$put =@/ ++ /^substitute ++ :keeppatterns s/asdf/xyz/ ++ :$put =@/ ++ /^substitute ++ Y:$put =@0 + :/^search()/,$w >>test.out + :qa! + ENDTEST +*************** +*** 81,86 **** +--- 90,96 ---- + + foobar + ++ substitute foo asdf + + one two + search() +*** ../vim-7.4.149/src/testdir/test14.ok 2013-04-03 20:59:14.000000000 +0200 +--- src/testdir/test14.ok 2014-01-14 15:46:42.000000000 +0100 +*************** +*** 20,22 **** +--- 20,25 ---- + 1 + 1 + two ++ foo ++ ^substitute ++ substitute bar xyz +*** ../vim-7.4.149/src/version.c 2014-01-14 15:24:24.000000000 +0100 +--- src/version.c 2014-01-14 15:45:34.000000000 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 150, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +158. You get a tuner card so you can watch TV while surfing. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.151 b/SOURCES/7.4.151 new file mode 100644 index 0000000..646cc79 --- /dev/null +++ b/SOURCES/7.4.151 @@ -0,0 +1,1470 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.151 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.151 +Problem: Python: slices with steps are not supported. +Solution: Support slices in Python vim.List. (ZyX) +Files: src/eval.c, src/if_py_both.h, src/if_python3.c, src/if_python.c, + src/proto/eval.pro, src/testdir/test86.in, src/testdir/test86.ok, + src/testdir/test87.in, src/testdir/test87.ok + + +*** ../vim-7.4.150/src/eval.c 2014-01-14 15:24:24.000000000 +0100 +--- src/eval.c 2014-01-14 16:24:49.000000000 +0100 +*************** +*** 6425,6430 **** +--- 6425,6440 ---- + if (ni == NULL) + return FAIL; + copy_tv(tv, &ni->li_tv); ++ list_insert(l, ni, item); ++ return OK; ++ } ++ ++ void ++ list_insert(l, ni, item) ++ list_T *l; ++ listitem_T *ni; ++ listitem_T *item; ++ { + if (item == NULL) + /* Append new item at end of list. */ + list_append(l, ni); +*************** +*** 6446,6452 **** + item->li_prev = ni; + ++l->lv_len; + } +- return OK; + } + + /* +--- 6456,6461 ---- +*** ../vim-7.4.150/src/if_py_both.h 2014-01-10 18:16:00.000000000 +0100 +--- src/if_py_both.h 2014-01-14 16:31:49.000000000 +0100 +*************** +*** 36,43 **** + #define PyErr_SET_STRING(exc, str) PyErr_SetString(exc, _(str)) + #define PyErr_SetVim(str) PyErr_SetString(VimError, str) + #define PyErr_SET_VIM(str) PyErr_SET_STRING(VimError, str) +! #define PyErr_FORMAT(exc, str, tail) PyErr_Format(exc, _(str), tail) +! #define PyErr_VIM_FORMAT(str, tail) PyErr_FORMAT(VimError, str, tail) + + #define Py_TYPE_NAME(obj) (obj->ob_type->tp_name == NULL \ + ? "(NULL)" \ +--- 36,44 ---- + #define PyErr_SET_STRING(exc, str) PyErr_SetString(exc, _(str)) + #define PyErr_SetVim(str) PyErr_SetString(VimError, str) + #define PyErr_SET_VIM(str) PyErr_SET_STRING(VimError, str) +! #define PyErr_FORMAT(exc, str, arg) PyErr_Format(exc, _(str), arg) +! #define PyErr_FORMAT2(exc, str, arg1, arg2) PyErr_Format(exc, _(str), arg1,arg2) +! #define PyErr_VIM_FORMAT(str, arg) PyErr_FORMAT(VimError, str, arg) + + #define Py_TYPE_NAME(obj) (obj->ob_type->tp_name == NULL \ + ? "(NULL)" \ +*************** +*** 2108,2115 **** + }; + + static PyTypeObject ListType; +- static PySequenceMethods ListAsSeq; +- static PyMappingMethods ListAsMapping; + + typedef struct + { +--- 2109,2114 ---- +*************** +*** 2253,2259 **** + } + + static PyObject * +! ListItem(ListObject *self, Py_ssize_t index) + { + listitem_T *li; + +--- 2252,2258 ---- + } + + static PyObject * +! ListIndex(ListObject *self, Py_ssize_t index) + { + listitem_T *li; + +*************** +*** 2273,2436 **** + return ConvertToPyObject(&li->li_tv); + } + +- #define PROC_RANGE \ +- if (last < 0) {\ +- if (last < -size) \ +- last = 0; \ +- else \ +- last += size; \ +- } \ +- if (first < 0) \ +- first = 0; \ +- if (first > size) \ +- first = size; \ +- if (last > size) \ +- last = size; +- + static PyObject * +! ListSlice(ListObject *self, Py_ssize_t first, Py_ssize_t last) + { + PyInt i; +- PyInt size = ListLength(self); +- PyInt n; + PyObject *list; +- int reversed = 0; + +! PROC_RANGE +! if (first >= last) +! first = last; + +! n = last-first; +! list = PyList_New(n); + if (list == NULL) + return NULL; + +! for (i = 0; i < n; ++i) + { +! PyObject *item = ListItem(self, first + i); + if (item == NULL) + { + Py_DECREF(list); + return NULL; + } + +! PyList_SET_ITEM(list, ((reversed)?(n-i-1):(i)), item); + } + + return list; + } + +- typedef struct +- { +- listwatch_T lw; +- list_T *list; +- } listiterinfo_T; +- +- static void +- ListIterDestruct(listiterinfo_T *lii) +- { +- list_rem_watch(lii->list, &lii->lw); +- PyMem_Free(lii); +- } +- + static PyObject * +! ListIterNext(listiterinfo_T **lii) + { +! PyObject *ret; +! +! if (!((*lii)->lw.lw_item)) +! return NULL; +! +! if (!(ret = ConvertToPyObject(&((*lii)->lw.lw_item->li_tv)))) +! return NULL; +! +! (*lii)->lw.lw_item = (*lii)->lw.lw_item->li_next; +! +! return ret; +! } +! +! static PyObject * +! ListIter(ListObject *self) +! { +! listiterinfo_T *lii; +! list_T *l = self->list; +! +! if (!(lii = PyMem_New(listiterinfo_T, 1))) + { +! PyErr_NoMemory(); +! return NULL; + } +! +! list_add_watch(l, &lii->lw); +! lii->lw.lw_item = l->lv_first; +! lii->list = l; +! +! return IterNew(lii, +! (destructorfun) ListIterDestruct, (nextfun) ListIterNext, +! NULL, NULL); +! } +! +! static int +! ListAssItem(ListObject *self, Py_ssize_t index, PyObject *obj) +! { +! typval_T tv; +! list_T *l = self->list; +! listitem_T *li; +! Py_ssize_t length = ListLength(self); +! +! if (l->lv_lock) + { +! RAISE_LOCKED_LIST; +! return -1; + } +! if (index > length || (index == length && obj == NULL)) + { +! PyErr_SET_STRING(PyExc_IndexError, N_("list index out of range")); +! return -1; +! } + +! if (obj == NULL) + { +! li = list_find(l, (long) index); +! list_remove(l, li, li); +! clear_tv(&li->li_tv); +! vim_free(li); +! return 0; + } + +! if (ConvertFromPyObject(obj, &tv) == -1) +! return -1; +! +! if (index == length) + { +! if (list_append_tv(l, &tv) == FAIL) +! { +! clear_tv(&tv); +! PyErr_SET_VIM(N_("failed to add item to list")); +! return -1; +! } + } +! else + { +! li = list_find(l, (long) index); +! clear_tv(&li->li_tv); +! copy_tv(&tv, &li->li_tv); +! clear_tv(&tv); + } +- return 0; + } + + static int +! ListAssSlice(ListObject *self, Py_ssize_t first, Py_ssize_t last, PyObject *obj) + { +- PyInt size = ListLength(self); + PyObject *iterator; + PyObject *item; + listitem_T *li; + listitem_T *next; + typval_T v; + list_T *l = self->list; + PyInt i; + + if (l->lv_lock) + { +--- 2272,2381 ---- + return ConvertToPyObject(&li->li_tv); + } + + static PyObject * +! ListSlice(ListObject *self, Py_ssize_t first, Py_ssize_t step, +! Py_ssize_t slicelen) + { + PyInt i; + PyObject *list; + +! if (step == 0) +! { +! PyErr_SET_STRING(PyExc_ValueError, N_("slice step cannot be zero")); +! return NULL; +! } + +! list = PyList_New(slicelen); + if (list == NULL) + return NULL; + +! for (i = 0; i < slicelen; ++i) + { +! PyObject *item; +! +! item = ListIndex(self, first + i*step); + if (item == NULL) + { + Py_DECREF(list); + return NULL; + } + +! PyList_SET_ITEM(list, i, item); + } + + return list; + } + + static PyObject * +! ListItem(ListObject *self, PyObject* idx) + { +! #if PY_MAJOR_VERSION < 3 +! if (PyInt_Check(idx)) + { +! long _idx = PyInt_AsLong(idx); +! return ListIndex(self, _idx); + } +! else +! #endif +! if (PyLong_Check(idx)) + { +! long _idx = PyLong_AsLong(idx); +! return ListIndex(self, _idx); + } +! else if (PySlice_Check(idx)) + { +! Py_ssize_t start, stop, step, slicelen; + +! if (PySlice_GetIndicesEx(idx, ListLength(self), +! &start, &stop, &step, &slicelen) < 0) +! return NULL; +! return ListSlice(self, start, step, slicelen); +! } +! else + { +! RAISE_INVALID_INDEX_TYPE(idx); +! return NULL; + } ++ } + +! static void +! list_restore(Py_ssize_t numadded, Py_ssize_t numreplaced, Py_ssize_t slicelen, +! list_T *l, listitem_T **lis, listitem_T *lastaddedli) +! { +! while (numreplaced--) + { +! list_insert(l, lis[numreplaced], lis[slicelen + numreplaced]); +! listitem_remove(l, lis[slicelen + numreplaced]); + } +! while (numadded--) + { +! listitem_T *next; +! +! next = lastaddedli->li_prev; +! listitem_remove(l, lastaddedli); +! lastaddedli = next; + } + } + + static int +! ListAssSlice(ListObject *self, Py_ssize_t first, +! Py_ssize_t step, Py_ssize_t slicelen, PyObject *obj) + { + PyObject *iterator; + PyObject *item; + listitem_T *li; ++ listitem_T *lastaddedli = NULL; + listitem_T *next; + typval_T v; + list_T *l = self->list; + PyInt i; ++ PyInt j; ++ PyInt numreplaced = 0; ++ PyInt numadded = 0; ++ PyInt size; ++ listitem_T **lis; ++ ++ size = ListLength(self); + + if (l->lv_lock) + { +*************** +*** 2438,2444 **** + return -1; + } + +! PROC_RANGE + + if (first == size) + li = NULL; +--- 2383,2424 ---- + return -1; + } + +! if (step == 0) +! { +! PyErr_SET_STRING(PyExc_ValueError, N_("slice step cannot be zero")); +! return -1; +! } +! +! if (step != 1 && slicelen == 0) +! { +! /* Nothing to do. Only error out if obj has some items. */ +! int ret = 0; +! +! if (obj == NULL) +! return 0; +! +! if (!(iterator = PyObject_GetIter(obj))) +! return -1; +! +! if ((item = PyIter_Next(iterator))) +! { +! PyErr_FORMAT(PyExc_ValueError, +! N_("attempt to assign sequence of size greater then %d " +! "to extended slice"), 0); +! Py_DECREF(item); +! ret = -1; +! } +! Py_DECREF(iterator); +! return ret; +! } +! +! if (obj != NULL) +! /* XXX May allocate zero bytes. */ +! if (!(lis = PyMem_New(listitem_T *, slicelen * 2))) +! { +! PyErr_NoMemory(); +! return -1; +! } + + if (first == size) + li = NULL; +*************** +*** 2449,2465 **** + { + PyErr_VIM_FORMAT(N_("internal error: no vim list item %d"), + (int)first); + return -1; + } +! if (last > first) + { +! i = last - first; +! while (i-- && li != NULL) +! { +! next = li->li_next; + listitem_remove(l, li); +! li = next; +! } + } + } + +--- 2429,2461 ---- + { + PyErr_VIM_FORMAT(N_("internal error: no vim list item %d"), + (int)first); ++ if (obj != NULL) ++ PyMem_Free(lis); + return -1; + } +! i = slicelen; +! while (i-- && li != NULL) + { +! j = step; +! next = li; +! if (step > 0) +! while (next != NULL && ((next = next->li_next) != NULL) && --j); +! else +! while (next != NULL && ((next = next->li_prev) != NULL) && ++j); +! +! if (obj == NULL) + listitem_remove(l, li); +! else +! lis[slicelen - i - 1] = li; +! +! li = next; +! } +! if (li == NULL && i != -1) +! { +! PyErr_SET_VIM(N_("internal error: not enough list items")); +! if (obj != NULL) +! PyMem_Free(lis); +! return -1; + } + } + +*************** +*** 2467,2499 **** + return 0; + + if (!(iterator = PyObject_GetIter(obj))) + return -1; + + while ((item = PyIter_Next(iterator))) + { + if (ConvertFromPyObject(item, &v) == -1) + { + Py_DECREF(iterator); + Py_DECREF(item); + return -1; + } + Py_DECREF(item); +! if (list_insert_tv(l, &v, li) == FAIL) + { + clear_tv(&v); + PyErr_SET_VIM(N_("internal error: failed to add item to list")); + return -1; + } + clear_tv(&v); + } + Py_DECREF(iterator); + + if (PyErr_Occurred()) + return -1; + + return 0; + } + + static PyObject * + ListConcatInPlace(ListObject *self, PyObject *obj) + { +--- 2463,2634 ---- + return 0; + + if (!(iterator = PyObject_GetIter(obj))) ++ { ++ PyMem_Free(lis); + return -1; ++ } + ++ i = 0; + while ((item = PyIter_Next(iterator))) + { + if (ConvertFromPyObject(item, &v) == -1) + { + Py_DECREF(iterator); + Py_DECREF(item); ++ PyMem_Free(lis); + return -1; + } + Py_DECREF(item); +! if (list_insert_tv(l, &v, numreplaced < slicelen +! ? lis[numreplaced] +! : li) == FAIL) + { + clear_tv(&v); + PyErr_SET_VIM(N_("internal error: failed to add item to list")); ++ list_restore(numadded, numreplaced, slicelen, l, lis, lastaddedli); ++ PyMem_Free(lis); + return -1; + } ++ if (numreplaced < slicelen) ++ { ++ lis[slicelen + numreplaced] = lis[numreplaced]->li_prev; ++ list_remove(l, lis[numreplaced], lis[numreplaced]); ++ numreplaced++; ++ } ++ else ++ { ++ if (li) ++ lastaddedli = li->li_prev; ++ else ++ lastaddedli = l->lv_last; ++ numadded++; ++ } + clear_tv(&v); ++ if (step != 1 && i >= slicelen) ++ { ++ Py_DECREF(iterator); ++ PyErr_FORMAT(PyExc_ValueError, ++ N_("attempt to assign sequence of size greater then %d " ++ "to extended slice"), slicelen); ++ list_restore(numadded, numreplaced, slicelen, l, lis, lastaddedli); ++ PyMem_Free(lis); ++ return -1; ++ } ++ ++i; + } + Py_DECREF(iterator); + ++ if (step != 1 && i != slicelen) ++ { ++ PyErr_FORMAT2(PyExc_ValueError, ++ N_("attempt to assign sequence of size %d to extended slice " ++ "of size %d"), i, slicelen); ++ list_restore(numadded, numreplaced, slicelen, l, lis, lastaddedli); ++ PyMem_Free(lis); ++ return -1; ++ } ++ + if (PyErr_Occurred()) ++ { ++ list_restore(numadded, numreplaced, slicelen, l, lis, lastaddedli); ++ PyMem_Free(lis); + return -1; ++ } ++ ++ for (i = 0; i < numreplaced; i++) ++ listitem_free(lis[i]); ++ if (step == 1) ++ for (i = numreplaced; i < slicelen; i++) ++ listitem_remove(l, lis[i]); ++ ++ PyMem_Free(lis); + + return 0; + } + ++ static int ++ ListAssIndex(ListObject *self, Py_ssize_t index, PyObject *obj) ++ { ++ typval_T tv; ++ list_T *l = self->list; ++ listitem_T *li; ++ Py_ssize_t length = ListLength(self); ++ ++ if (l->lv_lock) ++ { ++ RAISE_LOCKED_LIST; ++ return -1; ++ } ++ if (index > length || (index == length && obj == NULL)) ++ { ++ PyErr_SET_STRING(PyExc_IndexError, N_("list index out of range")); ++ return -1; ++ } ++ ++ if (obj == NULL) ++ { ++ li = list_find(l, (long) index); ++ list_remove(l, li, li); ++ clear_tv(&li->li_tv); ++ vim_free(li); ++ return 0; ++ } ++ ++ if (ConvertFromPyObject(obj, &tv) == -1) ++ return -1; ++ ++ if (index == length) ++ { ++ if (list_append_tv(l, &tv) == FAIL) ++ { ++ clear_tv(&tv); ++ PyErr_SET_VIM(N_("failed to add item to list")); ++ return -1; ++ } ++ } ++ else ++ { ++ li = list_find(l, (long) index); ++ clear_tv(&li->li_tv); ++ copy_tv(&tv, &li->li_tv); ++ clear_tv(&tv); ++ } ++ return 0; ++ } ++ ++ static Py_ssize_t ++ ListAssItem(ListObject *self, PyObject *idx, PyObject *obj) ++ { ++ #if PY_MAJOR_VERSION < 3 ++ if (PyInt_Check(idx)) ++ { ++ long _idx = PyInt_AsLong(idx); ++ return ListAssIndex(self, _idx, obj); ++ } ++ else ++ #endif ++ if (PyLong_Check(idx)) ++ { ++ long _idx = PyLong_AsLong(idx); ++ return ListAssIndex(self, _idx, obj); ++ } ++ else if (PySlice_Check(idx)) ++ { ++ Py_ssize_t start, stop, step, slicelen; ++ ++ if (PySlice_GetIndicesEx(idx, ListLength(self), ++ &start, &stop, &step, &slicelen) < 0) ++ return -1; ++ return ListAssSlice(self, start, step, slicelen, ++ obj); ++ } ++ else ++ { ++ RAISE_INVALID_INDEX_TYPE(idx); ++ return -1; ++ } ++ } ++ + static PyObject * + ListConcatInPlace(ListObject *self, PyObject *obj) + { +*************** +*** 2520,2525 **** +--- 2655,2710 ---- + return (PyObject *)(self); + } + ++ typedef struct ++ { ++ listwatch_T lw; ++ list_T *list; ++ } listiterinfo_T; ++ ++ static void ++ ListIterDestruct(listiterinfo_T *lii) ++ { ++ list_rem_watch(lii->list, &lii->lw); ++ PyMem_Free(lii); ++ } ++ ++ static PyObject * ++ ListIterNext(listiterinfo_T **lii) ++ { ++ PyObject *ret; ++ ++ if (!((*lii)->lw.lw_item)) ++ return NULL; ++ ++ if (!(ret = ConvertToPyObject(&((*lii)->lw.lw_item->li_tv)))) ++ return NULL; ++ ++ (*lii)->lw.lw_item = (*lii)->lw.lw_item->li_next; ++ ++ return ret; ++ } ++ ++ static PyObject * ++ ListIter(ListObject *self) ++ { ++ listiterinfo_T *lii; ++ list_T *l = self->list; ++ ++ if (!(lii = PyMem_New(listiterinfo_T, 1))) ++ { ++ PyErr_NoMemory(); ++ return NULL; ++ } ++ ++ list_add_watch(l, &lii->lw); ++ lii->lw.lw_item = l->lv_first; ++ lii->list = l; ++ ++ return IterNew(lii, ++ (destructorfun) ListIterDestruct, (nextfun) ListIterNext, ++ NULL, NULL); ++ } ++ + static char *ListAttrs[] = { + "locked", + NULL +*************** +*** 2567,2572 **** +--- 2752,2776 ---- + } + } + ++ static PySequenceMethods ListAsSeq = { ++ (lenfunc) ListLength, /* sq_length, len(x) */ ++ (binaryfunc) 0, /* RangeConcat, sq_concat, x+y */ ++ 0, /* RangeRepeat, sq_repeat, x*n */ ++ (PyIntArgFunc) ListIndex, /* sq_item, x[i] */ ++ 0, /* was_sq_slice, x[i:j] */ ++ (PyIntObjArgProc) ListAssIndex, /* sq_as_item, x[i]=v */ ++ 0, /* was_sq_ass_slice, x[i:j]=v */ ++ 0, /* sq_contains */ ++ (binaryfunc) ListConcatInPlace,/* sq_inplace_concat */ ++ 0, /* sq_inplace_repeat */ ++ }; ++ ++ static PyMappingMethods ListAsMapping = { ++ /* mp_length */ (lenfunc) ListLength, ++ /* mp_subscript */ (binaryfunc) ListItem, ++ /* mp_ass_subscript */ (objobjargproc) ListAssItem, ++ }; ++ + static struct PyMethodDef ListMethods[] = { + {"extend", (PyCFunction)ListConcatInPlace, METH_O, ""}, + {"__dir__", (PyCFunction)ListDir, METH_NOARGS, ""}, +*** ../vim-7.4.150/src/if_python3.c 2013-11-03 00:28:20.000000000 +0100 +--- src/if_python3.c 2014-01-14 16:32:40.000000000 +0100 +*************** +*** 97,102 **** +--- 97,105 ---- + #define Py_ssize_t_fmt "n" + #define Py_bytes_fmt "y" + ++ #define PyIntArgFunc ssizeargfunc ++ #define PyIntObjArgProc ssizeobjargproc ++ + #if defined(DYNAMIC_PYTHON3) || defined(PROTO) + + # ifndef WIN3264 +*************** +*** 292,298 **** + static int (*py3_PyMapping_Check)(PyObject *); + static PyObject* (*py3_PyMapping_Keys)(PyObject *); + static int (*py3_PySlice_GetIndicesEx)(PyObject *r, Py_ssize_t length, +! Py_ssize_t *start, Py_ssize_t *stop, Py_ssize_t *step, Py_ssize_t *slicelength); + static PyObject* (*py3_PyErr_NoMemory)(void); + static void (*py3_Py_Finalize)(void); + static void (*py3_PyErr_SetString)(PyObject *, const char *); +--- 295,302 ---- + static int (*py3_PyMapping_Check)(PyObject *); + static PyObject* (*py3_PyMapping_Keys)(PyObject *); + static int (*py3_PySlice_GetIndicesEx)(PyObject *r, Py_ssize_t length, +! Py_ssize_t *start, Py_ssize_t *stop, Py_ssize_t *step, +! Py_ssize_t *slicelen); + static PyObject* (*py3_PyErr_NoMemory)(void); + static void (*py3_Py_Finalize)(void); + static void (*py3_PyErr_SetString)(PyObject *, const char *); +*************** +*** 1478,1553 **** + /* List object - Definitions + */ + +- static PySequenceMethods ListAsSeq = { +- (lenfunc) ListLength, /* sq_length, len(x) */ +- (binaryfunc) 0, /* RangeConcat, sq_concat, x+y */ +- (ssizeargfunc) 0, /* RangeRepeat, sq_repeat, x*n */ +- (ssizeargfunc) ListItem, /* sq_item, x[i] */ +- (void *) 0, /* was_sq_slice, x[i:j] */ +- (ssizeobjargproc) ListAssItem, /* sq_as_item, x[i]=v */ +- (void *) 0, /* was_sq_ass_slice, x[i:j]=v */ +- 0, /* sq_contains */ +- (binaryfunc) ListConcatInPlace,/* sq_inplace_concat */ +- 0, /* sq_inplace_repeat */ +- }; +- +- static PyObject *ListSubscript(PyObject *, PyObject *); +- static Py_ssize_t ListAsSubscript(PyObject *, PyObject *, PyObject *); +- +- static PyMappingMethods ListAsMapping = { +- /* mp_length */ (lenfunc) ListLength, +- /* mp_subscript */ (binaryfunc) ListSubscript, +- /* mp_ass_subscript */ (objobjargproc) ListAsSubscript, +- }; +- +- static PyObject * +- ListSubscript(PyObject *self, PyObject* idx) +- { +- if (PyLong_Check(idx)) +- { +- long _idx = PyLong_AsLong(idx); +- return ListItem((ListObject *)(self), _idx); +- } +- else if (PySlice_Check(idx)) +- { +- Py_ssize_t start, stop, step, slicelen; +- +- if (PySlice_GetIndicesEx(idx, ListLength((ListObject *)(self)), +- &start, &stop, &step, &slicelen) < 0) +- return NULL; +- return ListSlice((ListObject *)(self), start, stop); +- } +- else +- { +- RAISE_INVALID_INDEX_TYPE(idx); +- return NULL; +- } +- } +- +- static Py_ssize_t +- ListAsSubscript(PyObject *self, PyObject *idx, PyObject *obj) +- { +- if (PyLong_Check(idx)) +- { +- long _idx = PyLong_AsLong(idx); +- return ListAssItem((ListObject *)(self), _idx, obj); +- } +- else if (PySlice_Check(idx)) +- { +- Py_ssize_t start, stop, step, slicelen; +- +- if (PySlice_GetIndicesEx(idx, ListLength((ListObject *)(self)), +- &start, &stop, &step, &slicelen) < 0) +- return -1; +- return ListAssSlice((ListObject *)(self), start, stop, obj); +- } +- else +- { +- RAISE_INVALID_INDEX_TYPE(idx); +- return -1; +- } +- } +- + static PyObject * + ListGetattro(PyObject *self, PyObject *nameobj) + { +--- 1482,1487 ---- +*** ../vim-7.4.150/src/if_python.c 2013-11-03 00:28:20.000000000 +0100 +--- src/if_python.c 2014-01-14 16:24:49.000000000 +0100 +*************** +*** 196,201 **** +--- 196,202 ---- + # define PyTuple_Size dll_PyTuple_Size + # define PyTuple_GetItem dll_PyTuple_GetItem + # define PyTuple_Type (*dll_PyTuple_Type) ++ # define PySlice_GetIndicesEx dll_PySlice_GetIndicesEx + # define PyImport_ImportModule dll_PyImport_ImportModule + # define PyDict_New dll_PyDict_New + # define PyDict_GetItemString dll_PyDict_GetItemString +*************** +*** 241,246 **** +--- 242,248 ---- + # define PySys_GetObject dll_PySys_GetObject + # define PySys_SetArgv dll_PySys_SetArgv + # define PyType_Type (*dll_PyType_Type) ++ # define PySlice_Type (*dll_PySlice_Type) + # define PyType_Ready (*dll_PyType_Ready) + # define PyType_GenericAlloc dll_PyType_GenericAlloc + # define Py_BuildValue dll_Py_BuildValue +*************** +*** 341,346 **** +--- 343,351 ---- + static PyInt(*dll_PyTuple_Size)(PyObject *); + static PyObject*(*dll_PyTuple_GetItem)(PyObject *, PyInt); + static PyTypeObject* dll_PyTuple_Type; ++ static int (*dll_PySlice_GetIndicesEx)(PyObject *r, PyInt length, ++ PyInt *start, PyInt *stop, PyInt *step, ++ PyInt *slicelen); + static PyObject*(*dll_PyImport_ImportModule)(const char *); + static PyObject*(*dll_PyDict_New)(void); + static PyObject*(*dll_PyDict_GetItemString)(PyObject *, const char *); +*************** +*** 382,387 **** +--- 387,393 ---- + static PyObject *(*dll_PySys_GetObject)(char *); + static int(*dll_PySys_SetArgv)(int, char **); + static PyTypeObject* dll_PyType_Type; ++ static PyTypeObject* dll_PySlice_Type; + static int (*dll_PyType_Ready)(PyTypeObject *type); + static PyObject* (*dll_PyType_GenericAlloc)(PyTypeObject *type, PyInt nitems); + static PyObject*(*dll_Py_BuildValue)(char *, ...); +*************** +*** 521,526 **** +--- 527,533 ---- + {"PyTuple_GetItem", (PYTHON_PROC*)&dll_PyTuple_GetItem}, + {"PyTuple_Size", (PYTHON_PROC*)&dll_PyTuple_Size}, + {"PyTuple_Type", (PYTHON_PROC*)&dll_PyTuple_Type}, ++ {"PySlice_GetIndicesEx", (PYTHON_PROC*)&dll_PySlice_GetIndicesEx}, + {"PyImport_ImportModule", (PYTHON_PROC*)&dll_PyImport_ImportModule}, + {"PyDict_GetItemString", (PYTHON_PROC*)&dll_PyDict_GetItemString}, + {"PyDict_Next", (PYTHON_PROC*)&dll_PyDict_Next}, +*************** +*** 562,567 **** +--- 569,575 ---- + {"PySys_GetObject", (PYTHON_PROC*)&dll_PySys_GetObject}, + {"PySys_SetArgv", (PYTHON_PROC*)&dll_PySys_SetArgv}, + {"PyType_Type", (PYTHON_PROC*)&dll_PyType_Type}, ++ {"PySlice_Type", (PYTHON_PROC*)&dll_PySlice_Type}, + {"PyType_Ready", (PYTHON_PROC*)&dll_PyType_Ready}, + {"PyType_GenericAlloc", (PYTHON_PROC*)&dll_PyType_GenericAlloc}, + {"Py_FindMethod", (PYTHON_PROC*)&dll_Py_FindMethod}, +*************** +*** 1472,1492 **** + return Py_FindMethod(DictionaryMethods, self, name); + } + +- static PySequenceMethods ListAsSeq = { +- (PyInquiry) ListLength, +- (binaryfunc) 0, +- (PyIntArgFunc) 0, +- (PyIntArgFunc) ListItem, +- (PyIntIntArgFunc) ListSlice, +- (PyIntObjArgProc) ListAssItem, +- (PyIntIntObjArgProc) ListAssSlice, +- (objobjproc) 0, +- #if PY_MAJOR_VERSION >= 2 +- (binaryfunc) ListConcatInPlace, +- 0, +- #endif +- }; +- + static PyObject * + ListGetattr(PyObject *self, char *name) + { +--- 1480,1485 ---- +*** ../vim-7.4.150/src/proto/eval.pro 2013-08-10 13:37:09.000000000 +0200 +--- src/proto/eval.pro 2014-01-14 16:24:49.000000000 +0100 +*************** +*** 60,65 **** +--- 60,66 ---- + int list_append_string __ARGS((list_T *l, char_u *str, int len)); + int list_insert_tv __ARGS((list_T *l, typval_T *tv, listitem_T *item)); + void list_remove __ARGS((list_T *l, listitem_T *item, listitem_T *item2)); ++ void list_insert __ARGS((list_T *l, listitem_T *ni, listitem_T *item)); + int garbage_collect __ARGS((void)); + void set_ref_in_ht __ARGS((hashtab_T *ht, int copyID)); + void set_ref_in_list __ARGS((list_T *l, int copyID)); +*** ../vim-7.4.150/src/testdir/test86.in 2013-11-28 17:04:38.000000000 +0100 +--- src/testdir/test86.in 2014-01-14 16:24:49.000000000 +0100 +*************** +*** 135,140 **** +--- 135,152 ---- + :py l=vim.bindeval('l') + :py del l[-6:2] + :$put =string(l) ++ :let l = [0, 1, 2, 3] ++ :py l=vim.bindeval('l') ++ :py del l[::2] ++ :$put =string(l) ++ :let l = [0, 1, 2, 3] ++ :py l=vim.bindeval('l') ++ :py del l[3:0:-2] ++ :$put =string(l) ++ :let l = [0, 1, 2, 3] ++ :py l=vim.bindeval('l') ++ :py del l[2:4:-2] ++ :$put =string(l) + :" + :" Slice assignment to a list + :let l = [0, 1, 2, 3] +*************** +*** 169,174 **** +--- 181,206 ---- + :py l=vim.bindeval('l') + :py l[0:0]=['h'] + :$put =string(l) ++ :let l = range(8) ++ :py l=vim.bindeval('l') ++ :py l[2:6:2] = [10, 20] ++ :$put =string(l) ++ :let l = range(8) ++ :py l=vim.bindeval('l') ++ :py l[6:2:-2] = [10, 20] ++ :$put =string(l) ++ :let l = range(8) ++ :py l=vim.bindeval('l') ++ :py l[6:2] = () ++ :$put =string(l) ++ :let l = range(8) ++ :py l=vim.bindeval('l') ++ :py l[6:2:1] = () ++ :$put =string(l) ++ :let l = range(8) ++ :py l=vim.bindeval('l') ++ :py l[2:2:1] = () ++ :$put =string(l) + :" + :" Locked variables + :let l = [0, 1, 2, 3] +*************** +*** 390,395 **** +--- 422,434 ---- + :$put =string(pyeval('l')) + :py l = ll[-10:10] + :$put =string(pyeval('l')) ++ :py l = ll[4:2:-1] ++ :$put =string(pyeval('l')) ++ :py l = ll[::2] ++ :$put =string(pyeval('l')) ++ :py l = ll[4:2:1] ++ :$put =string(pyeval('l')) ++ :py del l + :" + :" Vars + :let g:foo = 'bac' +*************** +*** 907,912 **** +--- 946,952 ---- + l = vim.List() + ll = vim.List('abcE') + ll.locked = True ++ nel = vim.List('abcO') + f = vim.Function('string') + fd = vim.Function('F') + fdel = vim.Function('D') +*************** +*** 994,999 **** +--- 1034,1053 ---- + def next(self): + raise NotImplementedError('next') + ++ class FailingIterNextN(object): ++ def __init__(self, n): ++ self.n = n ++ ++ def __iter__(self): ++ return self ++ ++ def next(self): ++ if self.n: ++ self.n -= 1 ++ return 1 ++ else: ++ raise NotImplementedError('next N') ++ + class FailingMappingKey(object): + def __getitem__(self, item): + raise NotImplementedError('getitem:mappingkey') +*************** +*** 1098,1103 **** +--- 1152,1158 ---- + cb.append(">>> iter") + ee('d.update(FailingMapping())') + ee('d.update([FailingIterNext()])') ++ ee('d.update([FailingIterNextN(1)])') + iter_test('d.update(%s)') + convertfrompyobject_test('d.update(%s)') + stringtochars_test('d.update(((%s, 0),))') +*************** +*** 1120,1125 **** +--- 1175,1188 ---- + cb.append(">> ListAssSlice") + ee('ll[1:100] = "abcJ"') + iter_test('l[:] = %s') ++ ee('nel[1:10:2] = "abcK"') ++ cb.append(repr(tuple(nel))) ++ ee('nel[1:10:2] = "a"') ++ cb.append(repr(tuple(nel))) ++ ee('nel[1:1:-1] = "a"') ++ cb.append(repr(tuple(nel))) ++ ee('nel[:] = FailingIterNextN(2)') ++ cb.append(repr(tuple(nel))) + convertfrompyobject_test('l[:] = [%s]') + cb.append(">> ListConcatInPlace") + iter_test('l.extend(%s)') +*************** +*** 1201,1206 **** +--- 1264,1270 ---- + del dl + del l + del ll ++ del nel + del f + del fd + del fdel +*************** +*** 1214,1219 **** +--- 1278,1284 ---- + del FailingTrue + del FailingIter + del FailingIterNext ++ del FailingIterNextN + del FailingMapping + del FailingMappingKey + del FailingList +*** ../vim-7.4.150/src/testdir/test86.ok 2013-11-28 17:04:38.000000000 +0100 +--- src/testdir/test86.ok 2014-01-14 16:24:49.000000000 +0100 +*************** +*** 41,46 **** +--- 41,49 ---- + [2, 3] + [2, 3] + [2, 3] ++ [1, 3] ++ [0, 2] ++ [0, 1, 2, 3] + ['a', 0, 1, 2, 3] + [0, 'b', 2, 3] + [0, 1, 'c'] +*************** +*** 49,54 **** +--- 52,62 ---- + ['f', 2, 3] + [0, 1, 'g', 2, 3] + ['h'] ++ [0, 1, 10, 3, 20, 5, 6, 7] ++ [0, 1, 2, 3, 20, 5, 10, 7] ++ [0, 1, 2, 3, 4, 5, 6, 7] ++ [0, 1, 2, 3, 4, 5, 6, 7] ++ [0, 1, 2, 3, 4, 5, 6, 7] + [0, 1, 2, 3] + [function('New'), function('DictNew'), 'NewStart', 1, 2, 3, 'NewEnd'] + [function('New'), function('DictNew'), 'NewStart', 1, 2, 3, 'NewEnd', 'DictNewStart', 1, 2, 3, 'DictNewEnd', {'a': 'b'}] +*************** +*** 96,101 **** +--- 104,112 ---- + [0, 1, 2, 3, 4, 5] + [0, 1, 2, 3, 4, 5] + [0, 1, 2, 3, 4, 5] ++ [4, 3] ++ [0, 2, 4] ++ [] + Abc + bac + def +*************** +*** 599,604 **** +--- 610,616 ---- + >>> iter + d.update(FailingMapping()):NotImplementedError:('keys',) + d.update([FailingIterNext()]):NotImplementedError:('next',) ++ d.update([FailingIterNextN(1)]):NotImplementedError:('next N',) + >>> Testing *Iter* using d.update(%s) + d.update(FailingIter()):NotImplementedError:('iter',) + d.update(FailingIterNext()):NotImplementedError:('next',) +*************** +*** 829,834 **** +--- 841,854 ---- + l[:] = FailingIter():NotImplementedError:('iter',) + l[:] = FailingIterNext():NotImplementedError:('next',) + <<< Finished ++ nel[1:10:2] = "abcK":ValueError:('attempt to assign sequence of size greater then 2 to extended slice',) ++ ('a', 'b', 'c', 'O') ++ nel[1:10:2] = "a":ValueError:('attempt to assign sequence of size 1 to extended slice of size 2',) ++ ('a', 'b', 'c', 'O') ++ nel[1:1:-1] = "a":ValueError:('attempt to assign sequence of size greater then 0 to extended slice',) ++ ('a', 'b', 'c', 'O') ++ nel[:] = FailingIterNextN(2):NotImplementedError:('next N',) ++ ('a', 'b', 'c', 'O') + >>> Testing StringToChars using l[:] = [{%s : 1}] + l[:] = [{1 : 1}]:TypeError:('expected str() or unicode() instance, but got int',) + l[:] = [{u"\0" : 1}]:TypeError:('expected string without null bytes',) +*** ../vim-7.4.150/src/testdir/test87.in 2013-11-28 17:04:38.000000000 +0100 +--- src/testdir/test87.in 2014-01-14 16:24:49.000000000 +0100 +*************** +*** 128,133 **** +--- 128,145 ---- + :py3 l=vim.bindeval('l') + :py3 del l[-6:2] + :$put =string(l) ++ :let l = [0, 1, 2, 3] ++ :py3 l=vim.bindeval('l') ++ :py3 del l[::2] ++ :$put =string(l) ++ :let l = [0, 1, 2, 3] ++ :py3 l=vim.bindeval('l') ++ :py3 del l[3:0:-2] ++ :$put =string(l) ++ :let l = [0, 1, 2, 3] ++ :py3 l=vim.bindeval('l') ++ :py3 del l[2:4:-2] ++ :$put =string(l) + :" + :" Slice assignment to a list + :let l = [0, 1, 2, 3] +*************** +*** 162,167 **** +--- 174,199 ---- + :py3 l=vim.bindeval('l') + :py3 l[0:0]=['h'] + :$put =string(l) ++ :let l = range(8) ++ :py3 l=vim.bindeval('l') ++ :py3 l[2:6:2] = [10, 20] ++ :$put =string(l) ++ :let l = range(8) ++ :py3 l=vim.bindeval('l') ++ :py3 l[6:2:-2] = [10, 20] ++ :$put =string(l) ++ :let l = range(8) ++ :py3 l=vim.bindeval('l') ++ :py3 l[6:2] = () ++ :$put =string(l) ++ :let l = range(8) ++ :py3 l=vim.bindeval('l') ++ :py3 l[6:2:1] = () ++ :$put =string(l) ++ :let l = range(8) ++ :py3 l=vim.bindeval('l') ++ :py3 l[2:2:1] = () ++ :$put =string(l) + :" + :" Locked variables + :let l = [0, 1, 2, 3] +*************** +*** 363,368 **** +--- 395,432 ---- + :py3 del trace_main + :$put =string(l) + :" ++ :" Slice ++ :py3 ll = vim.bindeval('[0, 1, 2, 3, 4, 5]') ++ :py3 l = ll[:4] ++ :$put =string(py3eval('l')) ++ :py3 l = ll[2:] ++ :$put =string(py3eval('l')) ++ :py3 l = ll[:-4] ++ :$put =string(py3eval('l')) ++ :py3 l = ll[-2:] ++ :$put =string(py3eval('l')) ++ :py3 l = ll[2:4] ++ :$put =string(py3eval('l')) ++ :py3 l = ll[4:2] ++ :$put =string(py3eval('l')) ++ :py3 l = ll[-4:-2] ++ :$put =string(py3eval('l')) ++ :py3 l = ll[-2:-4] ++ :$put =string(py3eval('l')) ++ :py3 l = ll[:] ++ :$put =string(py3eval('l')) ++ :py3 l = ll[0:6] ++ :$put =string(py3eval('l')) ++ :py3 l = ll[-10:10] ++ :$put =string(py3eval('l')) ++ :py3 l = ll[4:2:-1] ++ :$put =string(py3eval('l')) ++ :py3 l = ll[::2] ++ :$put =string(py3eval('l')) ++ :py3 l = ll[4:2:1] ++ :$put =string(py3eval('l')) ++ :py3 del l ++ :" + :" Vars + :let g:foo = 'bac' + :let w:abc3 = 'def' +*************** +*** 859,864 **** +--- 923,929 ---- + l = vim.List() + ll = vim.List('abcE') + ll.locked = True ++ nel = vim.List('abcO') + f = vim.Function('string') + fd = vim.Function('F') + fdel = vim.Function('D') +*************** +*** 946,951 **** +--- 1011,1030 ---- + def __next__(self): + raise NotImplementedError('next') + ++ class FailingIterNextN(object): ++ def __init__(self, n): ++ self.n = n ++ ++ def __iter__(self): ++ return self ++ ++ def __next__(self): ++ if self.n: ++ self.n -= 1 ++ return 1 ++ else: ++ raise NotImplementedError('next N') ++ + class FailingMappingKey(object): + def __getitem__(self, item): + raise NotImplementedError('getitem:mappingkey') +*************** +*** 1050,1055 **** +--- 1129,1135 ---- + cb.append(">>> iter") + ee('d.update(FailingMapping())') + ee('d.update([FailingIterNext()])') ++ ee('d.update([FailingIterNextN(1)])') + iter_test('d.update(%s)') + convertfrompyobject_test('d.update(%s)') + stringtochars_test('d.update(((%s, 0),))') +*************** +*** 1072,1077 **** +--- 1152,1165 ---- + cb.append(">> ListAssSlice") + ee('ll[1:100] = "abcJ"') + iter_test('l[:] = %s') ++ ee('nel[1:10:2] = "abcK"') ++ cb.append(repr(tuple(nel))) ++ ee('nel[1:10:2] = "a"') ++ cb.append(repr(tuple(nel))) ++ ee('nel[1:1:-1] = "a"') ++ cb.append(repr(tuple(nel))) ++ ee('nel[:] = FailingIterNextN(2)') ++ cb.append(repr(tuple(nel))) + convertfrompyobject_test('l[:] = [%s]') + cb.append(">> ListConcatInPlace") + iter_test('l.extend(%s)') +*************** +*** 1153,1158 **** +--- 1241,1247 ---- + del dl + del l + del ll ++ del nel + del f + del fd + del fdel +*************** +*** 1166,1171 **** +--- 1255,1261 ---- + del FailingTrue + del FailingIter + del FailingIterNext ++ del FailingIterNextN + del FailingMapping + del FailingMappingKey + del FailingList +*** ../vim-7.4.150/src/testdir/test87.ok 2013-11-28 17:04:38.000000000 +0100 +--- src/testdir/test87.ok 2014-01-14 16:24:49.000000000 +0100 +*************** +*** 41,46 **** +--- 41,49 ---- + [2, 3] + [2, 3] + [2, 3] ++ [1, 3] ++ [0, 2] ++ [0, 1, 2, 3] + ['a', 0, 1, 2, 3] + [0, 'b', 2, 3] + [0, 1, 'c'] +*************** +*** 49,54 **** +--- 52,62 ---- + ['f', 2, 3] + [0, 1, 'g', 2, 3] + ['h'] ++ [0, 1, 10, 3, 20, 5, 6, 7] ++ [0, 1, 2, 3, 20, 5, 10, 7] ++ [0, 1, 2, 3, 4, 5, 6, 7] ++ [0, 1, 2, 3, 4, 5, 6, 7] ++ [0, 1, 2, 3, 4, 5, 6, 7] + [0, 1, 2, 3] + [function('New'), function('DictNew'), 'NewStart', 1, 2, 3, 'NewEnd'] + [function('New'), function('DictNew'), 'NewStart', 1, 2, 3, 'NewEnd', 'DictNewStart', 1, 2, 3, 'DictNewEnd', {'a': 'b'}] +*************** +*** 85,90 **** +--- 93,112 ---- + vim: Vim(let):E859: + [1] + [1, 10, 11, 10, 11, 10, 11, 10, 11, 10, 11, 10, 1] ++ [0, 1, 2, 3] ++ [2, 3, 4, 5] ++ [0, 1] ++ [4, 5] ++ [2, 3] ++ [] ++ [2, 3] ++ [] ++ [0, 1, 2, 3, 4, 5] ++ [0, 1, 2, 3, 4, 5] ++ [0, 1, 2, 3, 4, 5] ++ [4, 3] ++ [0, 2, 4] ++ [] + Abc + bac + def +*************** +*** 588,593 **** +--- 610,616 ---- + >>> iter + d.update(FailingMapping()):(, NotImplementedError('keys',)) + d.update([FailingIterNext()]):(, NotImplementedError('next',)) ++ d.update([FailingIterNextN(1)]):(, NotImplementedError('next N',)) + >>> Testing *Iter* using d.update(%s) + d.update(FailingIter()):(, NotImplementedError('iter',)) + d.update(FailingIterNext()):(, NotImplementedError('next',)) +*************** +*** 818,823 **** +--- 841,854 ---- + l[:] = FailingIter():(, NotImplementedError('iter',)) + l[:] = FailingIterNext():(, NotImplementedError('next',)) + <<< Finished ++ nel[1:10:2] = "abcK":(, ValueError('attempt to assign sequence of size greater then 2 to extended slice',)) ++ (b'a', b'b', b'c', b'O') ++ nel[1:10:2] = "a":(, ValueError('attempt to assign sequence of size 1 to extended slice of size 2',)) ++ (b'a', b'b', b'c', b'O') ++ nel[1:1:-1] = "a":(, ValueError('attempt to assign sequence of size greater then 0 to extended slice',)) ++ (b'a', b'b', b'c', b'O') ++ nel[:] = FailingIterNextN(2):(, NotImplementedError('next N',)) ++ (b'a', b'b', b'c', b'O') + >>> Testing StringToChars using l[:] = [{%s : 1}] + l[:] = [{1 : 1}]:(, TypeError('expected bytes() or str() instance, but got int',)) + l[:] = [{b"\0" : 1}]:(, TypeError('expected bytes with no null',)) +*** ../vim-7.4.150/src/version.c 2014-01-14 15:53:47.000000000 +0100 +--- src/version.c 2014-01-14 16:27:01.000000000 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 151, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +159. You get excited whenever discussing your hard drive. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.152 b/SOURCES/7.4.152 new file mode 100644 index 0000000..6e54ddb --- /dev/null +++ b/SOURCES/7.4.152 @@ -0,0 +1,708 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.152 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.152 +Problem: Python: Cannot iterate over options. +Solution: Add options iterator. (ZyX) +Files: src/if_py_both.h, src/option.c, src/proto/option.pro, + src/testdir/test86.in, src/testdir/test86.ok, + src/testdir/test87.in, src/testdir/test87.ok, src/vim.h + + +*** ../vim-7.4.151/src/if_py_both.h 2014-01-14 16:36:40.000000000 +0100 +--- src/if_py_both.h 2014-01-14 16:51:30.000000000 +0100 +*************** +*** 2949,2958 **** + typedef struct + { + PyObject_HEAD +! int opt_type; +! void *from; +! checkfun Check; +! PyObject *fromObj; + } OptionsObject; + + static int +--- 2949,2958 ---- + typedef struct + { + PyObject_HEAD +! int opt_type; +! void *from; +! checkfun Check; +! PyObject *fromObj; + } OptionsObject; + + static int +*************** +*** 3072,3077 **** +--- 3072,3140 ---- + } + + static int ++ OptionsContains(OptionsObject *self, PyObject *keyObject) ++ { ++ char_u *key; ++ PyObject *todecref; ++ ++ if (!(key = StringToChars(keyObject, &todecref))) ++ return -1; ++ ++ if (*key == NUL) ++ { ++ Py_XDECREF(todecref); ++ return 0; ++ } ++ ++ if (get_option_value_strict(key, NULL, NULL, self->opt_type, NULL)) ++ { ++ Py_XDECREF(todecref); ++ return 1; ++ } ++ else ++ { ++ Py_XDECREF(todecref); ++ return 0; ++ } ++ } ++ ++ typedef struct ++ { ++ void *lastoption; ++ int opt_type; ++ } optiterinfo_T; ++ ++ static PyObject * ++ OptionsIterNext(optiterinfo_T **oii) ++ { ++ char_u *name; ++ ++ if ((name = option_iter_next(&((*oii)->lastoption), (*oii)->opt_type))) ++ return PyString_FromString((char *)name); ++ ++ return NULL; ++ } ++ ++ static PyObject * ++ OptionsIter(OptionsObject *self) ++ { ++ optiterinfo_T *oii; ++ ++ if (!(oii = PyMem_New(optiterinfo_T, 1))) ++ { ++ PyErr_NoMemory(); ++ return NULL; ++ } ++ ++ oii->opt_type = self->opt_type; ++ oii->lastoption = NULL; ++ ++ return IterNew(oii, ++ (destructorfun) PyMem_Free, (nextfun) OptionsIterNext, ++ NULL, NULL); ++ } ++ ++ static int + set_option_value_err(char_u *key, int numval, char_u *stringval, int opt_flags) + { + char_u *errmsg; +*************** +*** 3231,3236 **** +--- 3294,3312 ---- + return ret; + } + ++ static PySequenceMethods OptionsAsSeq = { ++ 0, /* sq_length */ ++ 0, /* sq_concat */ ++ 0, /* sq_repeat */ ++ 0, /* sq_item */ ++ 0, /* sq_slice */ ++ 0, /* sq_ass_item */ ++ 0, /* sq_ass_slice */ ++ (objobjproc) OptionsContains, /* sq_contains */ ++ 0, /* sq_inplace_concat */ ++ 0, /* sq_inplace_repeat */ ++ }; ++ + static PyMappingMethods OptionsAsMapping = { + (lenfunc) NULL, + (binaryfunc) OptionsItem, +*************** +*** 6121,6128 **** +--- 6197,6206 ---- + vim_memset(&OptionsType, 0, sizeof(OptionsType)); + OptionsType.tp_name = "vim.options"; + OptionsType.tp_basicsize = sizeof(OptionsObject); ++ OptionsType.tp_as_sequence = &OptionsAsSeq; + OptionsType.tp_flags = Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_GC; + OptionsType.tp_doc = "object for manipulating options"; ++ OptionsType.tp_iter = (getiterfunc)OptionsIter; + OptionsType.tp_as_mapping = &OptionsAsMapping; + OptionsType.tp_dealloc = (destructor)OptionsDestructor; + OptionsType.tp_traverse = (traverseproc)OptionsTraverse; +*** ../vim-7.4.151/src/option.c 2013-11-12 04:43:57.000000000 +0100 +--- src/option.c 2014-01-14 16:50:52.000000000 +0100 +*************** +*** 8861,8867 **** + } + #endif + +! #if defined(FEAT_PYTHON) || defined(FEAT_PYTHON3) + /* + * Returns the option attributes and its value. Unlike the above function it + * will return either global value or local value of the option depending on +--- 8861,8867 ---- + } + #endif + +! #if defined(FEAT_PYTHON) || defined(FEAT_PYTHON3) || defined(PROTO) + /* + * Returns the option attributes and its value. Unlike the above function it + * will return either global value or local value of the option depending on +*************** +*** 8874,8880 **** + * opt_type). Uses + * + * Returned flags: +! * 0 hidden or unknown option + * see SOPT_* in vim.h for other flags + * + * Possible opt_type values: see SREQ_* in vim.h +--- 8874,8881 ---- + * opt_type). Uses + * + * Returned flags: +! * 0 hidden or unknown option, also option that does not have requested +! * type (see SREQ_* in vim.h) + * see SOPT_* in vim.h for other flags + * + * Possible opt_type values: see SREQ_* in vim.h +*************** +*** 8997,9002 **** +--- 8998,9065 ---- + + return r; + } ++ ++ /* ++ * Iterate over options. First argument is a pointer to a pointer to a structure ++ * inside options[] array, second is option type like in the above function. ++ * ++ * If first argument points to NULL it is assumed that iteration just started ++ * and caller needs the very first value. ++ * If first argument points to the end marker function returns NULL and sets ++ * first argument to NULL. ++ * ++ * Returns full option name for current option on each call. ++ */ ++ char_u * ++ option_iter_next(option, opt_type) ++ void **option; ++ int opt_type; ++ { ++ struct vimoption *ret = NULL; ++ do ++ { ++ if (*option == NULL) ++ *option = (void *) options; ++ else if (((struct vimoption *) (*option))->fullname == NULL) ++ { ++ *option = NULL; ++ return NULL; ++ } ++ else ++ *option = (void *) (((struct vimoption *) (*option)) + 1); ++ ++ ret = ((struct vimoption *) (*option)); ++ ++ /* Hidden option */ ++ if (ret->var == NULL) ++ { ++ ret = NULL; ++ continue; ++ } ++ ++ switch (opt_type) ++ { ++ case SREQ_GLOBAL: ++ if (!(ret->indir == PV_NONE || ret->indir & PV_BOTH)) ++ ret = NULL; ++ break; ++ case SREQ_BUF: ++ if (!(ret->indir & PV_BUF)) ++ ret = NULL; ++ break; ++ case SREQ_WIN: ++ if (!(ret->indir & PV_WIN)) ++ ret = NULL; ++ break; ++ default: ++ EMSG2(_(e_intern2), "option_iter_next()"); ++ return NULL; ++ } ++ } ++ while (ret == NULL); ++ ++ return (char_u *)ret->fullname; ++ } + #endif + + /* +*** ../vim-7.4.151/src/proto/option.pro 2013-11-05 07:12:59.000000000 +0100 +--- src/proto/option.pro 2014-01-14 16:51:41.000000000 +0100 +*************** +*** 23,28 **** +--- 23,29 ---- + char_u *check_stl_option __ARGS((char_u *s)); + int get_option_value __ARGS((char_u *name, long *numval, char_u **stringval, int opt_flags)); + int get_option_value_strict __ARGS((char_u *name, long *numval, char_u **stringval, int opt_type, void *from)); ++ char_u *option_iter_next __ARGS((void **option, int opt_type)); + char_u *set_option_value __ARGS((char_u *name, long number, char_u *string, int opt_flags)); + char_u *get_term_code __ARGS((char_u *tname)); + char_u *get_highlight_default __ARGS((void)); +*** ../vim-7.4.151/src/testdir/test86.in 2014-01-14 16:36:40.000000000 +0100 +--- src/testdir/test86.in 2014-01-14 16:49:10.000000000 +0100 +*************** +*** 506,511 **** +--- 506,516 ---- + :py bopts1=vim.buffers[vim.bindeval("g:bufs")[2]].options + :py bopts2=vim.buffers[vim.bindeval("g:bufs")[1]].options + :py bopts3=vim.buffers[vim.bindeval("g:bufs")[0]].options ++ :$put ='wopts iters equal: '.pyeval('list(wopts1) == list(wopts2)') ++ :$put ='bopts iters equal: '.pyeval('list(bopts1) == list(bopts2)') ++ :py gset=set(iter(gopts1)) ++ :py wset=set(iter(wopts1)) ++ :py bset=set(iter(bopts1)) + :set path=.,..,, + :let lst=[] + :let lst+=[['paste', 1, 0, 1, 2, 1, 1, 0 ]] +*************** +*** 536,541 **** +--- 541,548 ---- + : py oval3=bool(oval3) + : endif + : put ='>>> '.oname ++ : $put =' g/w/b:'.pyeval('oname in gset').'/'.pyeval('oname in wset').'/'.pyeval('oname in bset') ++ : $put =' g/w/b (in):'.pyeval('oname in gopts1').'/'.pyeval('oname in wopts1').'/'.pyeval('oname in bopts1') + : for v in ['gopts1', 'wopts1', 'bopts1'] + : try + : put =' p/'.v.': '.Ev('repr('.v.'['''.oname.'''])') +*************** +*** 1122,1127 **** +--- 1129,1141 ---- + ee('import failing') + vim.options['rtp'] = old_rtp + del old_rtp ++ cb.append("> Options") ++ cb.append(">> OptionsItem") ++ ee('vim.options["abcQ"]') ++ ee('vim.options[""]') ++ stringtochars_test('vim.options[%s]') ++ cb.append(">> OptionsContains") ++ stringtochars_test('%s in vim.options') + cb.append("> Dictionary") + cb.append(">> DictionaryConstructor") + ee('vim.Dictionary("abcI")') +*** ../vim-7.4.151/src/testdir/test86.ok 2014-01-14 16:36:40.000000000 +0100 +--- src/testdir/test86.ok 2014-01-14 16:49:10.000000000 +0100 +*************** +*** 112,118 **** +--- 112,122 ---- + def + bar + jkl ++ wopts iters equal: 1 ++ bopts iters equal: 1 + >>> paste ++ g/w/b:1/0/0 ++ g/w/b (in):1/0/0 + p/gopts1: False + p/wopts1! KeyError + inv: 2! KeyError +*************** +*** 133,138 **** +--- 137,144 ---- + W: 1:1 2:1 3:1 4:1 + B: 1:1 2:1 3:1 4:1 + >>> previewheight ++ g/w/b:1/0/0 ++ g/w/b (in):1/0/0 + p/gopts1: 12 + inv: 'a'! TypeError + p/wopts1! KeyError +*************** +*** 154,159 **** +--- 160,167 ---- + W: 1:5 2:5 3:5 4:5 + B: 1:5 2:5 3:5 4:5 + >>> operatorfunc ++ g/w/b:1/0/0 ++ g/w/b (in):1/0/0 + p/gopts1: '' + inv: 2! TypeError + p/wopts1! KeyError +*************** +*** 175,180 **** +--- 183,190 ---- + W: 1:'A' 2:'A' 3:'A' 4:'A' + B: 1:'A' 2:'A' 3:'A' 4:'A' + >>> number ++ g/w/b:0/1/0 ++ g/w/b (in):0/1/0 + p/gopts1! KeyError + inv: 0! KeyError + gopts1! KeyError +*************** +*** 193,198 **** +--- 203,210 ---- + W: 1:1 2:1 3:0 4:0 + B: 1:1 2:1 3:0 4:0 + >>> numberwidth ++ g/w/b:0/1/0 ++ g/w/b (in):0/1/0 + p/gopts1! KeyError + inv: -100! KeyError + gopts1! KeyError +*************** +*** 212,217 **** +--- 224,231 ---- + W: 1:3 2:5 3:2 4:8 + B: 1:3 2:5 3:2 4:8 + >>> colorcolumn ++ g/w/b:0/1/0 ++ g/w/b (in):0/1/0 + p/gopts1! KeyError + inv: 'abc4'! KeyError + gopts1! KeyError +*************** +*** 231,236 **** +--- 245,252 ---- + W: 1:'+2' 2:'+3' 3:'+1' 4:'' + B: 1:'+2' 2:'+3' 3:'+1' 4:'' + >>> statusline ++ g/w/b:1/1/0 ++ g/w/b (in):1/1/0 + p/gopts1: '' + inv: 0! TypeError + p/wopts1: None +*************** +*** 248,253 **** +--- 264,271 ---- + W: 1:'2' 2:'1' 3:'1' 4:'1' + B: 1:'2' 2:'1' 3:'1' 4:'1' + >>> autoindent ++ g/w/b:0/0/1 ++ g/w/b (in):0/0/1 + p/gopts1! KeyError + inv: 2! KeyError + gopts1! KeyError +*************** +*** 266,271 **** +--- 284,291 ---- + W: 1:0 2:1 3:0 4:1 + B: 1:0 2:1 3:0 4:1 + >>> shiftwidth ++ g/w/b:0/0/1 ++ g/w/b (in):0/0/1 + p/gopts1! KeyError + inv: 3! KeyError + gopts1! KeyError +*************** +*** 284,289 **** +--- 304,311 ---- + W: 1:0 2:2 3:8 4:1 + B: 1:0 2:2 3:8 4:1 + >>> omnifunc ++ g/w/b:0/0/1 ++ g/w/b (in):0/0/1 + p/gopts1! KeyError + inv: 1! KeyError + gopts1! KeyError +*************** +*** 303,308 **** +--- 325,332 ---- + W: 1:'A' 2:'B' 3:'' 4:'C' + B: 1:'A' 2:'B' 3:'' 4:'C' + >>> preserveindent ++ g/w/b:0/0/1 ++ g/w/b (in):0/0/1 + p/gopts1! KeyError + inv: 2! KeyError + gopts1! KeyError +*************** +*** 321,326 **** +--- 345,352 ---- + W: 1:0 2:1 3:0 4:1 + B: 1:0 2:1 3:0 4:1 + >>> path ++ g/w/b:1/0/1 ++ g/w/b (in):1/0/1 + p/gopts1: '.,..,,' + inv: 0! TypeError + p/wopts1! KeyError +*************** +*** 509,514 **** +--- 535,555 ---- + import xxx_no_such_module_xxx:ImportError:('No module named xxx_no_such_module_xxx',) + import failing_import:ImportError:('No module named failing_import',) + import failing:NotImplementedError:() ++ > Options ++ >> OptionsItem ++ vim.options["abcQ"]:KeyError:('abcQ',) ++ vim.options[""]:ValueError:('empty keys are not allowed',) ++ >>> Testing StringToChars using vim.options[%s] ++ vim.options[1]:TypeError:('expected str() or unicode() instance, but got int',) ++ vim.options[u"\0"]:TypeError:('expected string without null bytes',) ++ vim.options["\0"]:TypeError:('expected string without null bytes',) ++ <<< Finished ++ >> OptionsContains ++ >>> Testing StringToChars using %s in vim.options ++ 1 in vim.options:TypeError:('expected str() or unicode() instance, but got int',) ++ u"\0" in vim.options:TypeError:('expected string without null bytes',) ++ "\0" in vim.options:TypeError:('expected string without null bytes',) ++ <<< Finished + > Dictionary + >> DictionaryConstructor + vim.Dictionary("abcI"):ValueError:('expected sequence element of size 2, but got sequence of size 1',) +*** ../vim-7.4.151/src/testdir/test87.in 2014-01-14 16:36:40.000000000 +0100 +--- src/testdir/test87.in 2014-01-14 16:49:10.000000000 +0100 +*************** +*** 503,508 **** +--- 503,513 ---- + :py3 bopts1=vim.buffers[vim.bindeval("g:bufs")[2]].options + :py3 bopts2=vim.buffers[vim.bindeval("g:bufs")[1]].options + :py3 bopts3=vim.buffers[vim.bindeval("g:bufs")[0]].options ++ :$put ='wopts iters equal: '.py3eval('list(wopts1) == list(wopts2)') ++ :$put ='bopts iters equal: '.py3eval('list(bopts1) == list(bopts2)') ++ :py3 gset=set(iter(gopts1)) ++ :py3 wset=set(iter(wopts1)) ++ :py3 bset=set(iter(bopts1)) + :set path=.,..,, + :let lst=[] + :let lst+=[['paste', 1, 0, 1, 2, 1, 1, 0 ]] +*************** +*** 533,538 **** +--- 538,545 ---- + : py3 oval3=bool(oval3) + : endif + : put ='>>> '.oname ++ : $put =' g/w/b:'.py3eval('oname in gset').'/'.py3eval('oname in wset').'/'.py3eval('oname in bset') ++ : $put =' g/w/b (in):'.py3eval('oname in gopts1').'/'.py3eval('oname in wopts1').'/'.py3eval('oname in bopts1') + : for v in ['gopts1', 'wopts1', 'bopts1'] + : try + : put =' p/'.v.': '.Ev('repr('.v.'['''.oname.'''])') +*************** +*** 1099,1104 **** +--- 1106,1118 ---- + ee('import failing') + vim.options['rtp'] = old_rtp + del old_rtp ++ cb.append("> Options") ++ cb.append(">> OptionsItem") ++ ee('vim.options["abcQ"]') ++ ee('vim.options[""]') ++ stringtochars_test('vim.options[%s]') ++ cb.append(">> OptionsContains") ++ stringtochars_test('%s in vim.options') + cb.append("> Dictionary") + cb.append(">> DictionaryConstructor") + ee('vim.Dictionary("abcI")') +*** ../vim-7.4.151/src/testdir/test87.ok 2014-01-14 16:36:40.000000000 +0100 +--- src/testdir/test87.ok 2014-01-14 16:49:10.000000000 +0100 +*************** +*** 112,118 **** +--- 112,122 ---- + def + bar + jkl ++ wopts iters equal: 1 ++ bopts iters equal: 1 + >>> paste ++ g/w/b:1/0/0 ++ g/w/b (in):1/0/0 + p/gopts1: False + p/wopts1! KeyError + inv: 2! KeyError +*************** +*** 133,138 **** +--- 137,144 ---- + W: 1:1 2:1 3:1 4:1 + B: 1:1 2:1 3:1 4:1 + >>> previewheight ++ g/w/b:1/0/0 ++ g/w/b (in):1/0/0 + p/gopts1: 12 + inv: 'a'! TypeError + p/wopts1! KeyError +*************** +*** 154,159 **** +--- 160,167 ---- + W: 1:5 2:5 3:5 4:5 + B: 1:5 2:5 3:5 4:5 + >>> operatorfunc ++ g/w/b:1/0/0 ++ g/w/b (in):1/0/0 + p/gopts1: b'' + inv: 2! TypeError + p/wopts1! KeyError +*************** +*** 175,180 **** +--- 183,190 ---- + W: 1:'A' 2:'A' 3:'A' 4:'A' + B: 1:'A' 2:'A' 3:'A' 4:'A' + >>> number ++ g/w/b:0/1/0 ++ g/w/b (in):0/1/0 + p/gopts1! KeyError + inv: 0! KeyError + gopts1! KeyError +*************** +*** 193,198 **** +--- 203,210 ---- + W: 1:1 2:1 3:0 4:0 + B: 1:1 2:1 3:0 4:0 + >>> numberwidth ++ g/w/b:0/1/0 ++ g/w/b (in):0/1/0 + p/gopts1! KeyError + inv: -100! KeyError + gopts1! KeyError +*************** +*** 212,217 **** +--- 224,231 ---- + W: 1:3 2:5 3:2 4:8 + B: 1:3 2:5 3:2 4:8 + >>> colorcolumn ++ g/w/b:0/1/0 ++ g/w/b (in):0/1/0 + p/gopts1! KeyError + inv: 'abc4'! KeyError + gopts1! KeyError +*************** +*** 231,236 **** +--- 245,252 ---- + W: 1:'+2' 2:'+3' 3:'+1' 4:'' + B: 1:'+2' 2:'+3' 3:'+1' 4:'' + >>> statusline ++ g/w/b:1/1/0 ++ g/w/b (in):1/1/0 + p/gopts1: b'' + inv: 0! TypeError + p/wopts1: None +*************** +*** 248,253 **** +--- 264,271 ---- + W: 1:'2' 2:'1' 3:'1' 4:'1' + B: 1:'2' 2:'1' 3:'1' 4:'1' + >>> autoindent ++ g/w/b:0/0/1 ++ g/w/b (in):0/0/1 + p/gopts1! KeyError + inv: 2! KeyError + gopts1! KeyError +*************** +*** 266,271 **** +--- 284,291 ---- + W: 1:0 2:1 3:0 4:1 + B: 1:0 2:1 3:0 4:1 + >>> shiftwidth ++ g/w/b:0/0/1 ++ g/w/b (in):0/0/1 + p/gopts1! KeyError + inv: 3! KeyError + gopts1! KeyError +*************** +*** 284,289 **** +--- 304,311 ---- + W: 1:0 2:2 3:8 4:1 + B: 1:0 2:2 3:8 4:1 + >>> omnifunc ++ g/w/b:0/0/1 ++ g/w/b (in):0/0/1 + p/gopts1! KeyError + inv: 1! KeyError + gopts1! KeyError +*************** +*** 303,308 **** +--- 325,332 ---- + W: 1:'A' 2:'B' 3:'' 4:'C' + B: 1:'A' 2:'B' 3:'' 4:'C' + >>> preserveindent ++ g/w/b:0/0/1 ++ g/w/b (in):0/0/1 + p/gopts1! KeyError + inv: 2! KeyError + gopts1! KeyError +*************** +*** 321,326 **** +--- 345,352 ---- + W: 1:0 2:1 3:0 4:1 + B: 1:0 2:1 3:0 4:1 + >>> path ++ g/w/b:1/0/1 ++ g/w/b (in):1/0/1 + p/gopts1: b'.,..,,' + inv: 0! TypeError + p/wopts1! KeyError +*************** +*** 509,514 **** +--- 535,555 ---- + import xxx_no_such_module_xxx:(, ImportError('No module named xxx_no_such_module_xxx',)) + import failing_import:(, ImportError('No module named failing_import',)) + import failing:(, NotImplementedError()) ++ > Options ++ >> OptionsItem ++ vim.options["abcQ"]:(, KeyError('abcQ',)) ++ vim.options[""]:(, ValueError('empty keys are not allowed',)) ++ >>> Testing StringToChars using vim.options[%s] ++ vim.options[1]:(, TypeError('expected bytes() or str() instance, but got int',)) ++ vim.options[b"\0"]:(, TypeError('expected bytes with no null',)) ++ vim.options["\0"]:(, TypeError('expected bytes with no null',)) ++ <<< Finished ++ >> OptionsContains ++ >>> Testing StringToChars using %s in vim.options ++ 1 in vim.options:(, TypeError('expected bytes() or str() instance, but got int',)) ++ b"\0" in vim.options:(, TypeError('expected bytes with no null',)) ++ "\0" in vim.options:(, TypeError('expected bytes with no null',)) ++ <<< Finished + > Dictionary + >> DictionaryConstructor + vim.Dictionary("abcI"):(, ValueError('expected sequence element of size 2, but got sequence of size 1',)) +*** ../vim-7.4.151/src/vim.h 2013-11-09 03:31:45.000000000 +0100 +--- src/vim.h 2014-01-14 16:49:10.000000000 +0100 +*************** +*** 2249,2254 **** +--- 2249,2255 ---- + #define SOPT_BUF 0x20 /* Option has buffer-local value */ + #define SOPT_UNSET 0x40 /* Option does not have local value set */ + ++ /* Option types for various functions in option.c */ + #define SREQ_GLOBAL 0 /* Request global option */ + #define SREQ_WIN 1 /* Request window-local option */ + #define SREQ_BUF 2 /* Request buffer-local option */ +*** ../vim-7.4.151/src/version.c 2014-01-14 16:36:40.000000000 +0100 +--- src/version.c 2014-01-14 16:43:58.000000000 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 152, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +160. You get in the elevator and double-click the button for the floor + you want. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.153 b/SOURCES/7.4.153 new file mode 100644 index 0000000..73881b5 --- /dev/null +++ b/SOURCES/7.4.153 @@ -0,0 +1,176 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.153 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.153 +Problem: Compiler warning for pointer type. +Solution: Add type cast. +Files: src/if_py_both.h, src/if_python.c, src/if_python3.c + + +*** ../vim-7.4.152/src/if_py_both.h 2014-01-14 16:54:53.000000000 +0100 +--- src/if_py_both.h 2014-01-14 18:54:47.000000000 +0100 +*************** +*** 2326,2332 **** + { + Py_ssize_t start, stop, step, slicelen; + +! if (PySlice_GetIndicesEx(idx, ListLength(self), + &start, &stop, &step, &slicelen) < 0) + return NULL; + return ListSlice(self, start, step, slicelen); +--- 2326,2332 ---- + { + Py_ssize_t start, stop, step, slicelen; + +! if (PySlice_GetIndicesEx((PySliceObject *)idx, ListLength(self), + &start, &stop, &step, &slicelen) < 0) + return NULL; + return ListSlice(self, start, step, slicelen); +*************** +*** 2616,2622 **** + { + Py_ssize_t start, stop, step, slicelen; + +! if (PySlice_GetIndicesEx(idx, ListLength(self), + &start, &stop, &step, &slicelen) < 0) + return -1; + return ListAssSlice(self, start, step, slicelen, +--- 2616,2622 ---- + { + Py_ssize_t start, stop, step, slicelen; + +! if (PySlice_GetIndicesEx((PySliceObject *)idx, ListLength(self), + &start, &stop, &step, &slicelen) < 0) + return -1; + return ListAssSlice(self, start, step, slicelen, +*** ../vim-7.4.152/src/if_python.c 2014-01-14 16:36:40.000000000 +0100 +--- src/if_python.c 2014-01-14 18:56:41.000000000 +0100 +*************** +*** 343,349 **** + static PyInt(*dll_PyTuple_Size)(PyObject *); + static PyObject*(*dll_PyTuple_GetItem)(PyObject *, PyInt); + static PyTypeObject* dll_PyTuple_Type; +! static int (*dll_PySlice_GetIndicesEx)(PyObject *r, PyInt length, + PyInt *start, PyInt *stop, PyInt *step, + PyInt *slicelen); + static PyObject*(*dll_PyImport_ImportModule)(const char *); +--- 343,349 ---- + static PyInt(*dll_PyTuple_Size)(PyObject *); + static PyObject*(*dll_PyTuple_GetItem)(PyObject *, PyInt); + static PyTypeObject* dll_PyTuple_Type; +! static int (*dll_PySlice_GetIndicesEx)(PySliceObject *r, PyInt length, + PyInt *start, PyInt *stop, PyInt *step, + PyInt *slicelen); + static PyObject*(*dll_PyImport_ImportModule)(const char *); +*** ../vim-7.4.152/src/if_python3.c 2014-01-14 16:36:40.000000000 +0100 +--- src/if_python3.c 2014-01-14 18:58:19.000000000 +0100 +*************** +*** 294,300 **** + static PyObject* (*py3_PyTuple_GetItem)(PyObject *, Py_ssize_t); + static int (*py3_PyMapping_Check)(PyObject *); + static PyObject* (*py3_PyMapping_Keys)(PyObject *); +! static int (*py3_PySlice_GetIndicesEx)(PyObject *r, Py_ssize_t length, + Py_ssize_t *start, Py_ssize_t *stop, Py_ssize_t *step, + Py_ssize_t *slicelen); + static PyObject* (*py3_PyErr_NoMemory)(void); +--- 294,300 ---- + static PyObject* (*py3_PyTuple_GetItem)(PyObject *, Py_ssize_t); + static int (*py3_PyMapping_Check)(PyObject *); + static PyObject* (*py3_PyMapping_Keys)(PyObject *); +! static int (*py3_PySlice_GetIndicesEx)(PySliceObject *r, Py_ssize_t length, + Py_ssize_t *start, Py_ssize_t *stop, Py_ssize_t *step, + Py_ssize_t *slicelen); + static PyObject* (*py3_PyErr_NoMemory)(void); +*************** +*** 1190,1196 **** + if (CheckBuffer((BufferObject *) self)) + return NULL; + +! if (PySlice_GetIndicesEx((PyObject *)idx, + (Py_ssize_t)((BufferObject *)(self))->buf->b_ml.ml_line_count, + &start, &stop, + &step, &slicelen) < 0) +--- 1190,1196 ---- + if (CheckBuffer((BufferObject *) self)) + return NULL; + +! if (PySlice_GetIndicesEx((PySliceObject *)idx, + (Py_ssize_t)((BufferObject *)(self))->buf->b_ml.ml_line_count, + &start, &stop, + &step, &slicelen) < 0) +*************** +*** 1222,1228 **** + if (CheckBuffer((BufferObject *) self)) + return -1; + +! if (PySlice_GetIndicesEx((PyObject *)idx, + (Py_ssize_t)((BufferObject *)(self))->buf->b_ml.ml_line_count, + &start, &stop, + &step, &slicelen) < 0) +--- 1222,1228 ---- + if (CheckBuffer((BufferObject *) self)) + return -1; + +! if (PySlice_GetIndicesEx((PySliceObject *)idx, + (Py_ssize_t)((BufferObject *)(self))->buf->b_ml.ml_line_count, + &start, &stop, + &step, &slicelen) < 0) +*************** +*** 1306,1312 **** + { + Py_ssize_t start, stop, step, slicelen; + +! if (PySlice_GetIndicesEx((PyObject *)idx, + ((RangeObject *)(self))->end-((RangeObject *)(self))->start+1, + &start, &stop, + &step, &slicelen) < 0) +--- 1306,1312 ---- + { + Py_ssize_t start, stop, step, slicelen; + +! if (PySlice_GetIndicesEx((PySliceObject *)idx, + ((RangeObject *)(self))->end-((RangeObject *)(self))->start+1, + &start, &stop, + &step, &slicelen) < 0) +*************** +*** 1333,1339 **** + { + Py_ssize_t start, stop, step, slicelen; + +! if (PySlice_GetIndicesEx((PyObject *)idx, + ((RangeObject *)(self))->end-((RangeObject *)(self))->start+1, + &start, &stop, + &step, &slicelen) < 0) +--- 1333,1339 ---- + { + Py_ssize_t start, stop, step, slicelen; + +! if (PySlice_GetIndicesEx((PySliceObject *)idx, + ((RangeObject *)(self))->end-((RangeObject *)(self))->start+1, + &start, &stop, + &step, &slicelen) < 0) +*** ../vim-7.4.152/src/version.c 2014-01-14 16:54:53.000000000 +0100 +--- src/version.c 2014-01-14 18:54:01.000000000 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 153, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +161. You get up before the sun rises to check your e-mail, and you + find yourself in the very same chair long after the sun has set. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.154 b/SOURCES/7.4.154 new file mode 100644 index 0000000..db5ae62 --- /dev/null +++ b/SOURCES/7.4.154 @@ -0,0 +1,153 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.154 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.154 (after 7.4.149) +Problem: Still a problem with auto-loading. +Solution: Pass no_autoload to deref_func_name(). (Yukihiro Nakadaira) +Files: src/eval.c + + +*** ../vim-7.4.153/src/eval.c 2014-01-14 16:36:40.000000000 +0100 +--- src/eval.c 2014-01-14 19:40:36.000000000 +0100 +*************** +*** 447,453 **** + #endif + static int get_env_tv __ARGS((char_u **arg, typval_T *rettv, int evaluate)); + static int find_internal_func __ARGS((char_u *name)); +! static char_u *deref_func_name __ARGS((char_u *name, int *lenp)); + static int get_func_tv __ARGS((char_u *name, int len, typval_T *rettv, char_u **arg, linenr_T firstline, linenr_T lastline, int *doesrange, int evaluate, dict_T *selfdict)); + static int call_func __ARGS((char_u *funcname, int len, typval_T *rettv, int argcount, typval_T *argvars, linenr_T firstline, linenr_T lastline, int *doesrange, int evaluate, dict_T *selfdict)); + static void emsg_funcname __ARGS((char *ermsg, char_u *name)); +--- 447,453 ---- + #endif + static int get_env_tv __ARGS((char_u **arg, typval_T *rettv, int evaluate)); + static int find_internal_func __ARGS((char_u *name)); +! static char_u *deref_func_name __ARGS((char_u *name, int *lenp, int no_autoload)); + static int get_func_tv __ARGS((char_u *name, int len, typval_T *rettv, char_u **arg, linenr_T firstline, linenr_T lastline, int *doesrange, int evaluate, dict_T *selfdict)); + static int call_func __ARGS((char_u *funcname, int len, typval_T *rettv, int argcount, typval_T *argvars, linenr_T firstline, linenr_T lastline, int *doesrange, int evaluate, dict_T *selfdict)); + static void emsg_funcname __ARGS((char *ermsg, char_u *name)); +*************** +*** 3432,3438 **** + + /* If it is the name of a variable of type VAR_FUNC use its contents. */ + len = (int)STRLEN(tofree); +! name = deref_func_name(tofree, &len); + + /* Skip white space to allow ":call func ()". Not good, but required for + * backward compatibility. */ +--- 3432,3438 ---- + + /* If it is the name of a variable of type VAR_FUNC use its contents. */ + len = (int)STRLEN(tofree); +! name = deref_func_name(tofree, &len, FALSE); + + /* Skip white space to allow ":call func ()". Not good, but required for + * backward compatibility. */ +*************** +*** 5159,5165 **** + { + /* If "s" is the name of a variable of type VAR_FUNC + * use its contents. */ +! s = deref_func_name(s, &len); + + /* Invoke the function. */ + ret = get_func_tv(s, len, rettv, arg, +--- 5159,5165 ---- + { + /* If "s" is the name of a variable of type VAR_FUNC + * use its contents. */ +! s = deref_func_name(s, &len, FALSE); + + /* Invoke the function. */ + ret = get_func_tv(s, len, rettv, arg, +*************** +*** 8291,8306 **** + * name it contains, otherwise return "name". + */ + static char_u * +! deref_func_name(name, lenp) + char_u *name; + int *lenp; + { + dictitem_T *v; + int cc; + + cc = name[*lenp]; + name[*lenp] = NUL; +! v = find_var(name, NULL, FALSE); + name[*lenp] = cc; + if (v != NULL && v->di_tv.v_type == VAR_FUNC) + { +--- 8291,8307 ---- + * name it contains, otherwise return "name". + */ + static char_u * +! deref_func_name(name, lenp, no_autoload) + char_u *name; + int *lenp; ++ int no_autoload; + { + dictitem_T *v; + int cc; + + cc = name[*lenp]; + name[*lenp] = NUL; +! v = find_var(name, NULL, no_autoload); + name[*lenp] = cc; + if (v != NULL && v->di_tv.v_type == VAR_FUNC) + { +*************** +*** 21947,21960 **** + if (lv.ll_exp_name != NULL) + { + len = (int)STRLEN(lv.ll_exp_name); +! name = deref_func_name(lv.ll_exp_name, &len); + if (name == lv.ll_exp_name) + name = NULL; + } + else + { + len = (int)(end - *pp); +! name = deref_func_name(*pp, &len); + if (name == *pp) + name = NULL; + } +--- 21948,21961 ---- + if (lv.ll_exp_name != NULL) + { + len = (int)STRLEN(lv.ll_exp_name); +! name = deref_func_name(lv.ll_exp_name, &len, flags & TFN_NO_AUTOLOAD); + if (name == lv.ll_exp_name) + name = NULL; + } + else + { + len = (int)(end - *pp); +! name = deref_func_name(*pp, &len, flags & TFN_NO_AUTOLOAD); + if (name == *pp) + name = NULL; + } +*** ../vim-7.4.153/src/version.c 2014-01-14 19:35:49.000000000 +0100 +--- src/version.c 2014-01-14 19:42:05.000000000 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 154, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +162. You go outside and look for a brightness knob to turn down the sun. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.155 b/SOURCES/7.4.155 new file mode 100644 index 0000000..e2b26bd --- /dev/null +++ b/SOURCES/7.4.155 @@ -0,0 +1,83 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.155 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.155 +Problem: ":keeppatterns /pat" does not keep search pattern offset. +Solution: Restore the offset after doing the search. +Files: src/search.c, src/testdir/test14.in, src/testdir/test14.ok + + +*** ../vim-7.4.154/src/search.c 2014-01-14 15:53:47.000000000 +0100 +--- src/search.c 2014-01-14 21:27:32.000000000 +0100 +*************** +*** 1437,1443 **** + curwin->w_set_curswant = TRUE; + + end_do_search: +! if (options & SEARCH_KEEP) + spats[0].off = old_off; + vim_free(strcopy); + +--- 1437,1443 ---- + curwin->w_set_curswant = TRUE; + + end_do_search: +! if ((options & SEARCH_KEEP) || cmdmod.keeppatterns) + spats[0].off = old_off; + vim_free(strcopy); + +*** ../vim-7.4.154/src/testdir/test14.in 2014-01-14 15:53:47.000000000 +0100 +--- src/testdir/test14.in 2014-01-14 21:13:39.000000000 +0100 +*************** +*** 56,62 **** + :$put =@/ + /^substitute + Y:$put =@0 +! :/^search()/,$w >>test.out + :qa! + ENDTEST + +--- 56,65 ---- + :$put =@/ + /^substitute + Y:$put =@0 +! /bar /e +! :$put =@0 +! -:keeppatterns /xyz +! 0dn:/^search()/,$w >>test.out + :qa! + ENDTEST + +*** ../vim-7.4.154/src/testdir/test14.ok 2014-01-14 15:53:47.000000000 +0100 +--- src/testdir/test14.ok 2014-01-14 21:16:23.000000000 +0100 +*************** +*** 23,25 **** +--- 23,26 ---- + foo + ^substitute + substitute bar xyz ++ xyz +*** ../vim-7.4.154/src/version.c 2014-01-14 19:44:30.000000000 +0100 +--- src/version.c 2014-01-14 21:28:24.000000000 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 155, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +164. You got out to buy software, instead of going out for a beer. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.156 b/SOURCES/7.4.156 new file mode 100644 index 0000000..a1a272c --- /dev/null +++ b/SOURCES/7.4.156 @@ -0,0 +1,49 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.156 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.156 +Problem: Test file missing from distribution. +Solution: Add new directory to file list. +Files: Filelist + + +*** ../vim-7.4.155/Filelist 2013-07-13 15:23:38.000000000 +0200 +--- Filelist 2014-01-23 14:23:38.639298979 +0100 +*************** +*** 80,85 **** +--- 80,86 ---- + src/main.aap \ + src/testdir/main.aap \ + src/testdir/*.in \ ++ src/testdir/sautest/autoload/*.vim \ + src/testdir/test[0-9]*.ok \ + src/testdir/test49.vim \ + src/testdir/test60.vim \ +*** ../vim-7.4.155/src/version.c 2014-01-14 21:31:30.000000000 +0100 +--- src/version.c 2014-01-23 14:24:18.475300074 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 156, + /**/ + +-- +Some of the well known MS-Windows errors: + ETIME Wrong time, wait a little while + ECRASH Try again... + EDETECT Unable to detect errors + EOVER You lost! Play another game? + ENOCLUE Eh, what did you want? + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.157 b/SOURCES/7.4.157 new file mode 100644 index 0000000..9ec2bd0 --- /dev/null +++ b/SOURCES/7.4.157 @@ -0,0 +1,53 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.157 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.157 +Problem: Error number used twice. (Yukihiro Nakadaira) +Solution: Change the one not referred in the docs. +Files: src/undo.c + + +*** ../vim-7.4.156/src/undo.c 2013-11-07 03:04:06.000000000 +0100 +--- src/undo.c 2014-01-23 18:07:33.395668196 +0100 +*************** +*** 409,415 **** + { + /* This happens when the FileChangedRO autocommand changes the + * file in a way it becomes shorter. */ +! EMSG(_("E834: Line count changed unexpectedly")); + return FAIL; + } + #endif +--- 409,415 ---- + { + /* This happens when the FileChangedRO autocommand changes the + * file in a way it becomes shorter. */ +! EMSG(_("E881: Line count changed unexpectedly")); + return FAIL; + } + #endif +*** ../vim-7.4.156/src/version.c 2014-01-23 14:26:18.815303381 +0100 +--- src/version.c 2014-01-23 18:10:47.551673532 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 157, + /**/ + + +-- +hundred-and-one symptoms of being an internet addict: +201. When somebody asks you where you are, you tell them in which chat room. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.158 b/SOURCES/7.4.158 new file mode 100644 index 0000000..d5291d3 --- /dev/null +++ b/SOURCES/7.4.158 @@ -0,0 +1,140 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.158 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.158 (after 7.4.045) +Problem: Pattern containing \zs is not handled correctly by substitute(). +Solution: Change how an empty match is skipped. (Yukihiro Nakadaira) +Files: src/eval.c, src/testdir/test80.in, src/testdir/test80.ok + + +*** ../vim-7.4.157/src/eval.c 2014-01-14 19:44:30.000000000 +0100 +--- src/eval.c 2014-01-23 19:25:23.199796533 +0100 +*************** +*** 24365,24371 **** + garray_T ga; + char_u *ret; + char_u *save_cpo; +! int zero_width; + + /* Make 'cpoptions' empty, so that the 'l' flag doesn't work here */ + save_cpo = p_cpo; +--- 24365,24371 ---- + garray_T ga; + char_u *ret; + char_u *save_cpo; +! char_u *zero_width = NULL; + + /* Make 'cpoptions' empty, so that the 'l' flag doesn't work here */ + save_cpo = p_cpo; +*************** +*** 24382,24387 **** +--- 24382,24400 ---- + tail = str; + while (vim_regexec_nl(®match, str, (colnr_T)(tail - str))) + { ++ /* Skip empty match except for first match. */ ++ if (regmatch.startp[0] == regmatch.endp[0]) ++ { ++ if (zero_width == regmatch.startp[0]) ++ { ++ /* avoid getting stuck on a match with an empty string */ ++ *((char_u *)ga.ga_data + ga.ga_len) = *tail++; ++ ++ga.ga_len; ++ continue; ++ } ++ zero_width = regmatch.startp[0]; ++ } ++ + /* + * Get some space for a temporary buffer to do the substitution + * into. It will contain: +*************** +*** 24404,24420 **** + (void)vim_regsub(®match, sub, (char_u *)ga.ga_data + + ga.ga_len + i, TRUE, TRUE, FALSE); + ga.ga_len += i + sublen - 1; +- zero_width = (tail == regmatch.endp[0] +- || regmatch.startp[0] == regmatch.endp[0]); + tail = regmatch.endp[0]; + if (*tail == NUL) + break; +- if (zero_width) +- { +- /* avoid getting stuck on a match with an empty string */ +- *((char_u *)ga.ga_data + ga.ga_len) = *tail++; +- ++ga.ga_len; +- } + if (!do_all) + break; + } +--- 24417,24425 ---- +*** ../vim-7.4.157/src/testdir/test80.in 2013-09-29 21:11:00.000000000 +0200 +--- src/testdir/test80.in 2014-01-23 19:24:30.487795084 +0100 +*************** +*** 176,181 **** +--- 176,198 ---- + TEST_10: + + STARTTEST ++ :set magic& ++ :set cpo& ++ :$put =\"\n\nTEST_10:\" ++ :let y = substitute('123', '\zs', 'a', 'g') | $put =y ++ :let y = substitute('123', '\zs.', 'a', 'g') | $put =y ++ :let y = substitute('123', '.\zs', 'a', 'g') | $put =y ++ :let y = substitute('123', '\ze', 'a', 'g') | $put =y ++ :let y = substitute('123', '\ze.', 'a', 'g') | $put =y ++ :let y = substitute('123', '.\ze', 'a', 'g') | $put =y ++ :let y = substitute('123', '1\|\ze', 'a', 'g') | $put =y ++ :let y = substitute('123', '1\zs\|[23]', 'a', 'g') | $put =y ++ /^TEST_11 ++ ENDTEST ++ ++ TEST_11: ++ ++ STARTTEST + :/^Results/,$wq! test.out + ENDTEST + +*** ../vim-7.4.157/src/testdir/test80.ok 2013-09-29 21:11:00.000000000 +0200 +--- src/testdir/test80.ok 2014-01-23 19:24:35.691795227 +0100 +*************** +*** 115,117 **** +--- 115,128 ---- + + TEST_9: + XXx ++ ++ ++ TEST_10: ++ a1a2a3a ++ aaa ++ 1a2a3a ++ a1a2a3a ++ a1a2a3 ++ aaa ++ aa2a3a ++ 1aaa +*** ../vim-7.4.157/src/version.c 2014-01-23 18:12:44.695676751 +0100 +--- src/version.c 2014-01-23 19:27:21.611799787 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 158, + /**/ + +-- +$ echo pizza > /dev/oven + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.159 b/SOURCES/7.4.159 new file mode 100644 index 0000000..be89abe --- /dev/null +++ b/SOURCES/7.4.159 @@ -0,0 +1,116 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.159 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.159 +Problem: Completion hangs when scanning the current buffer after doing + keywords. (Christian Brabandt) +Solution: Set the first match position when starting to scan the current + buffer. +Files: src/edit.c + + +*** ../vim-7.4.158/src/edit.c 2014-01-14 12:16:57.000000000 +0100 +--- src/edit.c 2014-01-23 22:42:20.964121311 +0100 +*************** +*** 4180,4185 **** +--- 4180,4186 ---- + char_u *dict = NULL; + int dict_f = 0; + compl_T *old_match; ++ int set_match_pos; + + if (!compl_started) + { +*************** +*** 4198,4203 **** +--- 4199,4205 ---- + for (;;) + { + found_new_match = FAIL; ++ set_match_pos = FALSE; + + /* For ^N/^P pick a new entry from e_cpt if compl_started is off, + * or if found_all says this entry is done. For ^X^L only use the +*************** +*** 4217,4222 **** +--- 4219,4228 ---- + dec(&first_match_pos); + last_match_pos = first_match_pos; + type = 0; ++ ++ /* Remember the first match so that the loop stops when we ++ * wrap and come back there a second time. */ ++ set_match_pos = TRUE; + } + else if (vim_strchr((char_u *)"buwU", *e_cpt) != NULL + && (ins_buf = ins_compl_next_buf(ins_buf, *e_cpt)) != curbuf) +*************** +*** 4381,4387 **** + if (ins_buf->b_p_inf) + p_scs = FALSE; + +! /* buffers other than curbuf are scanned from the beginning or the + * end but never from the middle, thus setting nowrapscan in this + * buffers is a good idea, on the other hand, we always set + * wrapscan for curbuf to avoid missing matches -- Acevedo,Webb */ +--- 4387,4393 ---- + if (ins_buf->b_p_inf) + p_scs = FALSE; + +! /* Buffers other than curbuf are scanned from the beginning or the + * end but never from the middle, thus setting nowrapscan in this + * buffers is a good idea, on the other hand, we always set + * wrapscan for curbuf to avoid missing matches -- Acevedo,Webb */ +*************** +*** 4408,4419 **** + compl_pattern, 1L, SEARCH_KEEP + SEARCH_NFMSG, + RE_LAST, (linenr_T)0, NULL); + --msg_silent; +! if (!compl_started) + { + /* set "compl_started" even on fail */ + compl_started = TRUE; + first_match_pos = *pos; + last_match_pos = *pos; + } + else if (first_match_pos.lnum == last_match_pos.lnum + && first_match_pos.col == last_match_pos.col) +--- 4414,4426 ---- + compl_pattern, 1L, SEARCH_KEEP + SEARCH_NFMSG, + RE_LAST, (linenr_T)0, NULL); + --msg_silent; +! if (!compl_started || set_match_pos) + { + /* set "compl_started" even on fail */ + compl_started = TRUE; + first_match_pos = *pos; + last_match_pos = *pos; ++ set_match_pos = FALSE; + } + else if (first_match_pos.lnum == last_match_pos.lnum + && first_match_pos.col == last_match_pos.col) +*** ../vim-7.4.158/src/version.c 2014-01-23 20:09:29.523869260 +0100 +--- src/version.c 2014-01-23 22:44:40.908125157 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 159, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +205. You're constantly yelling at your spouse, family, roommate, whatever, + for using the phone for stupid things...like talking. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/7.4.160 b/SOURCES/7.4.160 new file mode 100644 index 0000000..41b0043 --- /dev/null +++ b/SOURCES/7.4.160 @@ -0,0 +1,66 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.160 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.160 +Problem: Win32: Crash when executing external command. +Solution: Only close the handle when it was created. (Yasuhiro Matsumoto) +Files: src/os_win32.c + + +*** ../vim-7.4.159/src/os_win32.c 2014-01-12 13:24:46.000000000 +0100 +--- src/os_win32.c 2014-01-24 19:54:35.778219160 +0100 +*************** +*** 4627,4632 **** +--- 4627,4633 ---- + DWORD flags = CREATE_NEW_CONSOLE; + char_u *p; + ++ ZeroMemory(&si, sizeof(si)); + si.cb = sizeof(si); + si.lpReserved = NULL; + si.lpDesktop = NULL; +*************** +*** 4723,4731 **** + if (newcmd != cmdbase) + vim_free(newcmd); + +! if (si.hStdInput != NULL) + { +! /* Close the handle to \\.\NUL */ + CloseHandle(si.hStdInput); + } + /* Close the handles to the subprocess, so that it goes away */ +--- 4724,4732 ---- + if (newcmd != cmdbase) + vim_free(newcmd); + +! if (si.dwFlags == STARTF_USESTDHANDLES && si.hStdInput != NULL) + { +! /* Close the handle to \\.\NUL created above. */ + CloseHandle(si.hStdInput); + } + /* Close the handles to the subprocess, so that it goes away */ +*** ../vim-7.4.159/src/version.c 2014-01-23 22:45:54.608127182 +0100 +--- src/version.c 2014-01-24 19:52:46.946216170 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 160, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +209. Your house stinks because you haven't cleaned it in a week. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/SOURCES/README.patches b/SOURCES/README.patches new file mode 100644 index 0000000..7d0f450 --- /dev/null +++ b/SOURCES/README.patches @@ -0,0 +1,186 @@ +Patches for Vim - Vi IMproved 7.4 + +The files in this directory contain source code changes to fix problems +in a released version of Vim. Each file also contains an explanation of +the problem that is fixed, like the message that was sent to the vim-dev +maillist. + +The best is to apply the patches in sequence. This avoids problems when +a patch depends on a previous patch. + +Before patching, change to the top Vim directory, where the "src" and +"runtime" directories are located. +Depending on the version of "patch" that you use, you may have add an +argument to make it patch the right file: + patch -p < 7.4.001 + patch -p0 < 7.4.001 + +After applying a patch, you need to compile Vim. There are no patches +for binaries. + +Checksums for the patch files can be found in the file MD5. + + +Individual patches for Vim 7.4: + + SIZE NAME FIXES + 13179 7.4.001 'ic' doesn't work for patterns such as [a-z] + 2522 7.4.002 pattern with two alternative look-behind matches doesn't match + 2680 7.4.003 memory access error in Ruby syntax highlighting + 7145 7.4.004 when closing a window fails ":bwipe" may hang + 1391 7.4.005 "vaB" while 'virtualedit' is set selects the wrong area + 1952 7.4.006 mkdir("foo/bar/", "p") gives an error message + 2538 7.4.007 creating a preview window on startup messes up the screen + 2176 7.4.008 new regexp engine can't be interrupted + 2051 7.4.009 too easy to write a file was not decrypted (yet) + 2307 7.4.010 (after 7.4.006) crash with invalid argument to mkdir() + 2270 7.4.011 cannot find out if "acl" and "xpm" features are supported + 6180 7.4.012 MS-Windows: resolving multi-bye shortcut does not work + 2986 7.4.013 MS-Windows: File name buffer too small for utf-8 + 2671 7.4.014 MS-Windows: check for writing to device does not work + 3135 7.4.015 MS-Windows: Detecting node type fails for multi-byte chars + 5999 7.4.016 MS-Windows: File name completion has problem with Chinese + 2319 7.4.017 ":help !!" does not find the "!!" tag in the help file + 1400 7.4.018 when completing item becomes unselected + 1948 7.4.019 file name completion fails with Chinese characters + 2586 7.4.020 NFA engine matches too much with \@> + 2806 7.4.021 NFA regexp: Using \ze may result in wrong end + 4209 7.4.022 deadlock while exiting, because of allocating memory + 1704 7.4.023 MS-Windows: warning for 64 bit type + 1992 7.4.024 current user cannot always use the undo file he created + 2074 7.4.025 reading before start of a string + 1710 7.4.026 clang warning for int shift overflow + 2815 7.4.027 valgrind error when using CTRL-X CTRL-F at start of the line + 27323 7.4.028 equivalence classes are not working for multi-byte characters + 1837 7.4.029 an error in a pattern is reported twice + 2724 7.4.030 the -mno-cygwin argument is no longer supported by Cygwin + 1748 7.4.031 ":diffoff!" resets options even when 'diff' is not set + 2629 7.4.032 NFA engine does not match the NUL character + 3610 7.4.033 if terminal has 20 lines test 92 and 93 overwrite input file + 5336 7.4.034 using "p" in Visual block mode only changes the first line + 1696 7.4.035 MS-Windows: mouse pointer flickers when going to Normal mode + 7996 7.4.036 NFA engine does not capture group correctly when using \@> + 4274 7.4.037 "\ze" in a sub-pattern does set the end of the match + 3579 7.4.038 Using "zw" and "zg" when 'spell' is off give confusing error + 6108 7.4.039 MS-Windows: < MSCV10 can't handle symlinks to a directory + 2320 7.4.040 error on exit when variable holds reference to a script scope + 1695 7.4.041 Visual selection does not remain after being copied over + 2104 7.4.042 after ":setlocal" 'spell'/'spellang' :spelldump doesn't work + 2920 7.4.043 VMS can't handle long function names + 2134 7.4.044 can't build with old MSVC + 3167 7.4.045 substitute() has a problem with pattern starting with "\ze". + 2147 7.4.046 can't use Tcl 8.6 + 1685 7.4.047 input() does not work in a function invoked by a mapping + 4441 7.4.048 recent clang version complains about -fno-strength-reduce + 2145 7.4.049 in Ex mode substitute prompt is wrong with line numbers + 2605 7.4.050 "gn" may select too much when there are two matching lines + 2068 7.4.051 syntax highlighting a Yaml file causes a crash + 5890 7.4.052 cursor may end up in the wrong position when auto-formatting + 1251 7.4.053 test75 has a wrong header + 1441 7.4.054 reading past end of the 'stl' string + 4758 7.4.055 Mac: Where macros are defined depends on the system + 1651 7.4.056 Mac: Compilation problem with OS X 10.9 Mavericks + 7773 7.4.057 byteidx() does not work for composing characters + 2094 7.4.058 warnings on 64 bit Windows + 1479 7.4.059 set_last_cursor() may encounter w_buffer being NULL + 3582 7.4.060 declaration has wrong return type for PyObject_SetAttrString() + 4688 7.4.061 (after 7.4.056) configure check in the wrong place + 2634 7.4.062 (after 7.4.061) wrong configure check for AvailabilityMacros.h + 3619 7.4.063 crash when using invalid key in Python dictionary + 5347 7.4.064 in Visual block mode replacing with CR does not break lines + 2117 7.4.065 the character typed at the hit-enter prompt is recorded twice + 9483 7.4.066 MS-Windows: swap file name wrong if colon in file name + 4139 7.4.067 CTRL-\ CTRL-O moves the cursor after inserting comment leader + 5093 7.4.068 cannot build Vim on Mac with non-Apple compilers + 73551 7.4.069 cannot right shift comment lines starting with # + 1387 7.4.070 (after 7.4.069) can't compile with tiny features + 38365 7.4.071 (after 7.4.069) passing limits around too often + 1748 7.4.072 crash when using Insert mode completion + 11426 7.4.073 setting undolevels for one buffer changes undo in another + 2054 7.4.074 when undo'ing all and making a change, undo structure is wrong + 9907 7.4.075 locally setting 'undolevels' is not tested + 1894 7.4.076 "cgn" does not wrap around the end of the file + 2216 7.4.077 DOS installer creates shortcut without a path + 3552 7.4.078 MSVC 2013 is not supported + 13657 7.4.079 a script cannot detect whether 'hlsearch' highlighting is on + 1873 7.4.080 (after 7.4.079) missing documentation for v:hlsearch + 1659 7.4.081 (after 7.4.078) wrong logic when ANALYZE is "yes" + 11034 7.4.082 using "gf" in a changed buffer suggests adding "!" + 4493 7.4.083 hard to avoid adding a used pattern to the search history + 5971 7.4.084 Python: interrupt not being properly discarded + 3581 7.4.085 can't move cursor when inserting text in Visual block mode + 4786 7.4.086 can't skip over expression when not evaluating for dict member + 1770 7.4.087 compiler warning on 64 bit Windows systems + 16587 7.4.088 Asian characters are always marked as spell errors + 1397 7.4.089 Vim doesn't set the security context on a renamed file + 7859 7.4.090 Win32: no completion if dir name contains an exclamation mark + 1926 7.4.091 (after 7.4.089) missing semicolon + 1697 7.4.092 (after 7.4.088) can't build small version + 2993 7.4.093 configure can't use LuaJIT on ubuntu 12.04 + 4837 7.4.094 configure may not find that -lint is needed for gettext() + 3138 7.4.095 (after 7.4.093) regexp for LuaJIT version doesn't work on BSD + 2294 7.4.096 can't change directory to an UNC path + 1615 7.4.097 unexpected behavior change related to 'virtualedit' + 8357 7.4.098 error for line numbers out of range when using ":'<,'>del" + 3122 7.4.099 append in blockwise Visual mode with "$" is wrong + 3069 7.4.100 NFA regexp doesn't handle backreference correctly + 2899 7.4.101 using \1 in pattern goes one line too far + 2128 7.4.102 crash when interrupting "z=" + 3846 7.4.103 dos installer escapes spaces in the diff command wrong + 2823 7.4.104 ":help s/\_" reports an internal error + 1792 7.4.105 completing a tag pattern may give an error for invalid pattern + 1971 7.4.106 can't build with Ruby using Cygwin + 21498 7.4.107 Python try/catch doesn't catch Vim error in vim.eval() + 5478 7.4.108 "zG" and "zW" leave temp files around on MS-Windows + 3775 7.4.109 ColorScheme autocommand matches with the current buffer name + 3703 7.4.110 "gUgn" cannot be repeeated + 1709 7.4.111 memory leak in Python OptionsAssItem + 1862 7.4.112 MS-Windows: defaults for 'dir' and 'bdir' do not include $TEMP + 2561 7.4.113 MSVC static analysis gives warnings + 3353 7.4.114 new GNU make directory change messages are different + 1633 7.4.115 Zsh: expanding ~abc fails when the result contains a space + 1381 7.4.116 'showcmd' does not show a typed space + 8049 7.4.117 can't build with Cygwin/MingW and Perl 5.18 + 2394 7.4.118 redrawing status lines may causes recursive call + 7060 7.4.119 Vim doesn't work well on OpenVMS + 1702 7.4.120 (after 7.4.117) can't build with Perl 5.18 on Linux + 1426 7.4.121 completion doesn't work for ":py3d" and ":py3f" + 6071 7.4.122 Win32: :grep doesn't work when 'encoding' and ACP differ + 1883 7.4.123 Win32: Getting user name does not use wide function + 1730 7.4.124 Win32: Getting host name does not use wide function + 1568 7.4.125 Win32: Dealing with messages may not work for multi-byte chars + 1946 7.4.126 compiler warnings for "const" and incompatible types + 1949 7.4.127 Perl 5.18 on Unix doesn't work + 1948 7.4.128 Perl 5.18 for MSVC doesn't work + 1499 7.4.129 getline(-1) returns zero + 2064 7.4.130 relative line numbers mix up windows when using folds + 3038 7.4.131 syncbind causes E315 errors in some situations + 1559 7.4.132 (after 7.4.122) Win32: flags/inherit_handles args mixed up + 2043 7.4.133 Clang warns for using NUL + 1562 7.4.134 spurious space in MingW Makefile + 1696 7.4.135 missing dot in MingW test Makefile + 2314 7.4.136 (after 7.4.096) Windows: readonly when saving UNC path file + 6184 7.4.137 cannot use IME with Windows 8 console + 3391 7.4.138 (after 7.4.114) directory change messages are not recognized + 2254 7.4.139 crash when using :cd in autocommand + 5016 7.4.140 crash when autocommand wipes out only other buffer + 2430 7.4.141 problems when building with Borland + 4651 7.4.142 (after 7.4.137) on MS-Windows 8 IME input doen't work well + 6310 7.4.143 TextChangedI is not triggered. + 1480 7.4.144 MingW also supports intptr_t for OPEN_OH_ARGTYPE + 2513 7.4.145 getregtype() does not return zero for unknown register + 2324 7.4.146 when starting Vim with "-u NONE" v:oldfiles is NULL + 2583 7.4.147 cursor position wrong when using "gj" after "$" + 2554 7.4.148 cannot build with Cygwin and X1. + 24083 7.4.149 get E685 error when assigning a function to autoload variable + 2596 7.4.150 :keeppatterns is not respected for :s + 37572 7.4.151 Python: slices with steps are not supported + 19610 7.4.152 Python: Cannot iterate over options + 6150 7.4.153 compiler warning for pointer type + 5202 7.4.154 (after 7.4.149) still a problem with auto-loading + 2233 7.4.155 (after 7.4.150) search offset not kept with :keeppatterns + 1466 7.4.156 test file missing from distribution + 1643 7.4.157 error number used twice + 4006 7.4.158 pattern containing \zs not handled correctly by substitute() + 3819 7.4.159 completion hangs when using the current buffer after keywords + 2026 7.4.160 Win32: Crash when executing external command diff --git a/SOURCES/gvim.desktop b/SOURCES/gvim.desktop new file mode 100644 index 0000000..97bf6ac --- /dev/null +++ b/SOURCES/gvim.desktop @@ -0,0 +1,64 @@ +[Desktop Entry] +Name=Vi IMproved +Name[bg]=Vi Ðåäàêòîð +Name[ca]=Vi Millorat +Name[da]=Vi forbedret +Name[eo]=VIM +Name[et]=Täiustatud Vi (vim) +Name[fr]=Vi étendu (VIM) +Name[he]=רפושמ Vi +Name[hu]=Vi +Name[is]=Vi IMproved ritillinn +Name[it]=Vi iMproved +Name[no]=Vi IMproved (forbedret VI) +Name[pl]=Poprawiony VI (vim) +Name[ro]=VIM +Name[ru]=Улучшенный VI +Name[sk]=Vi IMpreved +Name[sl]=Izboljšani vi (vim) +Name[sv]=Förbättrad Vi +Name[zh_CN.GB2312]=改进的 Vi +Comment=Powerful text editor with scripting functions and macro recorder +Comment[bg]=Ðåäàêòîð ñ ìíîãî âúçìîæíîñòè +Comment[ca]=Editor vi potent +Comment[cs]=Mocný textový editor vi +Comment[da]=En kraftig vi tekstbehandler +Comment[de]=Ein leistungsfähiger vi-Editor +Comment[el]=Πανίσχυρος διορθωτής vi +Comment[eo]=VIM similas al redaktilo "vi", sed havas aldonajn ecojn +Comment[es]=Una versión mejorada del editor vi +Comment[et]=Võimas tekstiredaktor vi +Comment[fi]=Tehokas vi-tekstieditori +Comment[fr]=Éditeur vi puissant +Comment[gl]=Potente editor vi +Comment[he]=Vi המצועה בר ךרועה +Comment[hr]=Napredni vi uređivač +Comment[hu]=Vi szövegszerkesztő +Comment[is]=Öflug útgáfa vi ritilsins +Comment[it]=Un editor vi potenziato +Comment[ja]=強力なViエディタ +Comment[lt]=Galingas vi redaktorius +Comment[mk]=Моќен VI уредувач +Comment[nl]=Krachtige vi-editor +Comment[no]=En kraftig vi-redigerer +Comment[no_NY]=Kraftig vi-tekstredigeringsprogram +Comment[pl]=Edytor vi +Comment[pt]=Um poderoso editor de texto +Comment[ro]=Un editor de texte VI, puternic +Comment[ru]=Мощный текстовый редактор vi +Comment[sk]=Silný textový procesor vi +Comment[sl]=Zmogljivi urejevalnik vi +Comment[sr]=Moćni vi editor +Comment[sv]=En kraftfull texteditor +Comment[ta]=ºì¾¢Å¡öó¾ vi ¦¾¡ÌôÀ¡Ç÷ +Comment[tr]=Güçlü vi düzenleyicisi +Comment[uk]=Потужний редактор vi +Comment[zh_CN.GB2312]=功能强大的 vi 编辑器 +MimeType=text/english;text/plain;text/x-makefile;text/x-c++hdr;text/x-c++src;text/x-chdr;text/x-csrc;text/x-java;text/x-moc;text/x-pascal;text/x-tcl;text/x-tex;application/x-shellscript;text/x-c;text/x-c++; +Exec=gvim -f %F +Icon=gvim +Type=Application +Terminal=false +X-XClassHintResName=VIM +MapNotify=false +Categories=Utility;TextEditor; diff --git a/SOURCES/gvim16.png b/SOURCES/gvim16.png new file mode 100644 index 0000000..fb45d22 Binary files /dev/null and b/SOURCES/gvim16.png differ diff --git a/SOURCES/gvim32.png b/SOURCES/gvim32.png new file mode 100644 index 0000000..c6e04fa Binary files /dev/null and b/SOURCES/gvim32.png differ diff --git a/SOURCES/gvim48.png b/SOURCES/gvim48.png new file mode 100644 index 0000000..4bac67e Binary files /dev/null and b/SOURCES/gvim48.png differ diff --git a/SOURCES/spec-template b/SOURCES/spec-template new file mode 100644 index 0000000..a5363cc --- /dev/null +++ b/SOURCES/spec-template @@ -0,0 +1,42 @@ +Name: +Version: +Release: 1%{?dist} +Summary: + +Group: +License: +URL: +Source0: +BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) + +BuildRequires: +Requires: + +%description + + +%prep +%setup -q + + +%build +%configure +make %{?_smp_mflags} + + +%install +rm -rf $RPM_BUILD_ROOT +make install DESTDIR=$RPM_BUILD_ROOT + + +%clean +rm -rf $RPM_BUILD_ROOT + + +%files +%defattr(-,root,root,-) +%doc + + + +%changelog diff --git a/SOURCES/spec-template.new b/SOURCES/spec-template.new new file mode 100644 index 0000000..cea6bfc --- /dev/null +++ b/SOURCES/spec-template.new @@ -0,0 +1,35 @@ +Name: +Version: +Release: 1%{?dist} +Summary: + +Group: +License: +URL: +Source0: + +BuildRequires: +Requires: + +%description + + +%prep +%setup -q + + +%build +%configure +make %{?_smp_mflags} + + +%install +make install DESTDIR=%{buildroot} + + +%files +%doc + + + +%changelog diff --git a/SOURCES/vi_help.txt b/SOURCES/vi_help.txt new file mode 100644 index 0000000..23e5fe9 --- /dev/null +++ b/SOURCES/vi_help.txt @@ -0,0 +1,126 @@ +*vi-help.txt* For Vim version 7.1. Last change: 2008 Mar 03 + + VIM - minimal help file + (NOTE: This is a minimal help file and many tags won't work. Use 'vim' or + 'gvim' to read the complete help docs.) + k + Move around: Use the cursor keys, or "h" to go left, h l + "j" to go down, "k" to go up, "l" to go right. j +Close this window: Use ":q". + Get out of Vim: Use ":qa!" (careful, all changes are lost!). + +Jump to a subject: Position the cursor on a tag between |bars| and hit CTRL-]. + Jump back: Type CTRL-T or CTRL-O (repeat to go further back). + +Get specific help: It is possible to go directly to whatever you want help + on, by giving an argument to the ":help" command |:help|. + It is possible to further specify the context: + *vi-help-context* + WHAT PREPEND EXAMPLE ~ + Normal mode command (nothing) :help x + Insert mode command i_ :help i_ + Command-line command : :help :quit + Command-line editing c_ :help c_ + Vim command argument - :help -r + Option ' :help 'textwidth' + Search for help: Type ":help word", then hit CTRL-D to see matching + help entries for "word". + +VIM stands for Vi IMproved. Most of VIM was made by Bram Moolenaar, but only +through the help of many others. See |vi-credits|. +------------------------------------------------------------------------------ +3. Credits *vi-credits* *vi-author* *vi-Bram* *vi-Moolenaar* + +Most of Vim was written by Bram Moolenaar . + +Parts of the documentation come from several Vi manuals, written by: + W.N. Joy + Alan P.W. Hewett + Mark Horton + +The Vim editor is based on Stevie and includes (ideas from) other software, +worked on by the people mentioned here. Other people helped by sending me +patches, suggestions and giving feedback about what is good and bad in Vim. + +Vim would never have become what it is now, without the help of these people! + + Ron Aaron Win32 GUI changes + Zoltan Arpadffy work on VMS port + Tony Andrews Stevie + Gert van Antwerpen changes for DJGPP on MS-DOS + Berkeley DB(3) ideas for swap file implementation + Keith Bostic Nvi + Walter Briscoe Makefile updates, various patches + Ralf Brown SPAWNO library for MS-DOS + Robert Colon many useful remarks + Marcin Dalecki GTK+ GUI port, toolbar icons, gettext() + Kayhan Demirel sent me news in Uganda + Chris & John Downey xvi (ideas for multi-windows version) + Henk Elbers first VMS port + Daniel Elstner GTK+ 2 port + Eric Fischer Mac port, 'cindent', and other improvements + Benji Fisher Answering lots of user questions + Bill Foster Athena GUI port + Loic Grenie xvim (ideas for multi windows version) + Sven Guckes Vim promotor and previous WWW page maintainer + Darren Hiebert Exuberant ctags + Jason Hildebrand GTK+ 2 port + Bruce Hunsaker improvements for VMS port + Andy Kahn Cscope support, GTK+ GUI port + Oezguer Kesim Maintainer of Vim Mailing Lists + Axel Kielhorn work on the Macintosh port + Steve Kirkendall Elvis + Roger Knobbe original port to Windows NT + Sergey Laskavy Vim's help from Moscow + Felix von Leitner Maintainer of Vim Mailing Lists + David Leonard Port of Python extensions to Unix + Avner Lottem Edit in right-to-left windows + Flemming Madsen X11 client-server, various features and patches + MicroSoft Gave me a copy of DevStudio to compile Vim with + Paul Moore Python interface extensions, many patches + Katsuhito Nagano Work on multi-byte versions + Sung-Hyun Nam Work on multi-byte versions + Vince Negri Win32 GUI and generic console enhancements + Steve Oualline Author of the first Vim book |frombook| + George V. Reilly Win32 port, Win32 GUI start-off + Stephen Riehm bug collector + Stefan Roemer various patches and help to users + Ralf Schandl IBM OS/390 port + Olaf Seibert DICE and BeBox version, regexp improvements + Mortaza Shiran Farsi patches + Peter da Silva termlib + Paul Slootman OS/2 port + Henry Spencer regular expressions + Dany St-Amant Macintosh port + Tim Thompson Stevie + G. R. (Fred) Walter Stevie + Sven Verdoolaege Perl interface + Robert Webb Command-line completion, GUI versions, and + lots of patches + Ingo Wilken Tcl interface + Mike Williams PostScript printing + Juergen Weigert Lattice version, AUX improvements, UNIX and + MS-DOS ports, autoconf + Stefan 'Sec' Zehl Maintainer of vim.org + +I wish to thank all the people that sent me bug reports and suggestions. The +list is too long to mention them all here. Vim would not be the same without +the ideas from all these people: They keep Vim alive! + + +------------------------------------------------------------------------------ + *vi-doc-file-list* *V_ct* +BASIC: +|copying| About copyrights +|iccf| Helping poor children in Uganda +|sponsor| Sponsor Vim development, become a registered Vim user +|www| Vim on the World Wide Web +|bugs| Where to send bug reports + + +------------------------------------------------------------------------------ + +Now that you've jumped here with CTRL-] or a double mouse click, you can use +CTRL-T, CTRL-O, g, or to go back to where you were. +------------------------------------------------------------------------------ + vim:tw=78:fo=tcq2:isk=!-~,^*,^\|,^\":ts=8:ft=help:norl: diff --git a/SOURCES/vim-6.2-specsyntax.patch b/SOURCES/vim-6.2-specsyntax.patch new file mode 100644 index 0000000..334d8a1 --- /dev/null +++ b/SOURCES/vim-6.2-specsyntax.patch @@ -0,0 +1,32 @@ +--- vim62d/runtime/syntax/spec.vim.highlite 2003-05-13 14:48:55.000000000 +0200 ++++ vim62d/runtime/syntax/spec.vim 2003-05-13 14:52:51.000000000 +0200 +@@ -38,7 +38,7 @@ + syn match specManpageFile '[a-zA-Z]\.1' + + "Day, Month and most used license acronyms +-syn keyword specLicense contained GPL LGPL BSD MIT GNU ++syn keyword specLicense contained GPL LGPL BSD MIT GNU distributable + syn keyword specWeekday contained Mon Tue Wed Thu Fri Sat Sun + syn keyword specMonth contained Jan Feb Mar Apr Jun Jul Aug Sep Oct Nov Dec + syn keyword specMonth contained January February March April May June July August September October November December +@@ -61,9 +61,9 @@ + + "specComands + syn match specConfigure contained '\./configure' +-syn match specTarCommand contained '\skip) + eap->errmsg = (char_u *)N_("E319: Sorry, the command is not available in this version"); + } diff --git a/SOURCES/vim-7.3-manpage-typo-668894-675480.patch b/SOURCES/vim-7.3-manpage-typo-668894-675480.patch new file mode 100644 index 0000000..cb4ccd1 --- /dev/null +++ b/SOURCES/vim-7.3-manpage-typo-668894-675480.patch @@ -0,0 +1,21 @@ +diff -up vim73/runtime/doc/vim.1.668894 vim73/runtime/doc/vim.1 +--- vim73/runtime/doc/vim.1.668894 2010-05-15 13:04:00.000000000 +0200 ++++ vim73/runtime/doc/vim.1 2012-08-28 12:41:36.000000000 +0200 +@@ -73,7 +73,7 @@ To edit a file that starts with a dash, + .TP + \- + The file to edit is read from stdin. Commands are read from stderr, which +-should be a tty. ++should be a TTY. + .TP + \-t {tag} + The file to edit and the initial cursor position depends on a "tag", a sort +@@ -321,7 +321,7 @@ When N is omitted, open one tab page for + \-R + Read-only mode. + The 'readonly' option will be set. +-You can still edit the buffer, but will be prevented from accidently ++You can still edit the buffer, but will be prevented from accidentally + overwriting a file. + If you do want to overwrite a file, add an exclamation mark to the Ex command, + as in ":w!". diff --git a/SOURCES/vim-7.3-xsubpp-path.patch b/SOURCES/vim-7.3-xsubpp-path.patch new file mode 100644 index 0000000..971b10a --- /dev/null +++ b/SOURCES/vim-7.3-xsubpp-path.patch @@ -0,0 +1,12 @@ +diff -up vim73/src/Makefile.xsubpp vim73/src/Makefile +--- vim73/src/Makefile.xsubpp 2013-05-13 15:02:15.894805644 +0200 ++++ vim73/src/Makefile 2013-05-13 15:07:03.922821257 +0200 +@@ -2416,7 +2416,7 @@ lintinstall: + + auto/if_perl.c: if_perl.xs + $(PERL) -e 'unless ( $$] >= 5.005 ) { for (qw(na defgv errgv)) { print "#define PL_$$_ $$_\n" }}' > $@ +- $(PERL) $(PERLLIB)/ExtUtils/xsubpp -prototypes -typemap \ ++ $(PERL) $(PERLLIB)/vendor_perl/ExtUtils/xsubpp -prototypes -typemap \ + $(PERLLIB)/ExtUtils/typemap if_perl.xs >> $@ + + auto/osdef.h: auto/config.h osdef.sh osdef1.h.in osdef2.h.in diff --git a/SOURCES/vim-7.4-CVE-2016-1248.patch b/SOURCES/vim-7.4-CVE-2016-1248.patch new file mode 100644 index 0000000..c1f9095 --- /dev/null +++ b/SOURCES/vim-7.4-CVE-2016-1248.patch @@ -0,0 +1,63 @@ +diff -urN vim74_orig/src/option.c vim74/src/option.c +--- vim74_orig/src/option.c 2016-12-12 12:18:52.614342651 +0100 ++++ vim74/src/option.c 2016-12-12 12:34:08.192983990 +0100 +@@ -5663,6 +5663,21 @@ + return r; + } + ++ /* ++ * Return TRUE if "val" is a valid 'filetype' name. ++ * Also used for 'syntax' and 'keymap'. ++ */ ++ static int ++valid_filetype(char_u *val) ++{ ++ char_u *s; ++ ++ for (s = val; *s != NUL; ++s) ++ if (!ASCII_ISALNUM(*s) && vim_strchr((char_u *)".-_", *s) == NULL) ++ return FALSE; ++ return TRUE; ++} ++ + /* + * Handle string options that need some action to perform when changed. + * Returns NULL for success, or an error message for an error. +@@ -6054,8 +6069,11 @@ + #ifdef FEAT_KEYMAP + else if (varp == &curbuf->b_p_keymap) + { +- /* load or unload key mapping tables */ +- errmsg = keymap_init(); ++ if (!valid_filetype(*varp)) ++ errmsg = e_invarg; ++ else ++ /* load or unload key mapping tables */ ++ errmsg = keymap_init(); + + if (errmsg == NULL) + { +@@ -7010,6 +7028,23 @@ + } + #endif + ++#ifdef FEAT_AUTOCMD ++ else if (gvarp == &p_ft) ++ { ++ if (!valid_filetype(*varp)) ++ errmsg = e_invarg; ++ } ++#endif ++ ++#ifdef FEAT_SYN_HL ++ else if (gvarp == &p_syn) ++ { ++ if (!valid_filetype(*varp)) ++ errmsg = e_invarg; ++ } ++#endif ++ ++ + /* Options that are a list of flags. */ + else + { diff --git a/SOURCES/vim-7.4-blowfish2.patch b/SOURCES/vim-7.4-blowfish2.patch new file mode 100644 index 0000000..08dab82 --- /dev/null +++ b/SOURCES/vim-7.4-blowfish2.patch @@ -0,0 +1,4045 @@ +diff -up vim74/runtime/doc/editing.txt.blowfish2 vim74/runtime/doc/editing.txt +--- vim74/runtime/doc/editing.txt.blowfish2 2013-08-10 13:24:53.000000000 +0200 ++++ vim74/runtime/doc/editing.txt 2017-09-05 14:47:34.915912305 +0200 +@@ -1364,8 +1364,13 @@ The text in the swap file and the undo f + + Note: The text in memory is not encrypted. A system administrator may be able + to see your text while you are editing it. When filtering text with +-":!filter" or using ":w !command" the text is not encrypted, this may reveal +-it to others. The 'viminfo' file is not encrypted. ++":!filter" or using ":w !command" the text is also not encrypted, this may ++reveal it to others. The 'viminfo' file is not encrypted. ++ ++You could do this to edit very secret text: > ++ :set noundofile viminfo= ++ :noswapfile edit secrets.txt ++Keep in mind that without a swap file you risk loosing your work in a crash. + + WARNING: If you make a typo when entering the key and then write the file and + exit, the text will be lost! +@@ -1392,18 +1397,24 @@ To disable the encryption, reset the 'ke + :set key= + + You can use the 'cryptmethod' option to select the type of encryption, use one +-of these two: > +- :setlocal cm=zip " weak method, backwards compatible +- :setlocal cm=blowfish " strong method ++of these: > ++ :setlocal cm=zip " weak method, backwards compatible ++ :setlocal cm=blowfish " method with flaws ++ :setlocal cm=blowfish2 " medium strong method ++ + Do this before writing the file. When reading an encrypted file it will be + set automatically to the method used when that file was written. You can + change 'cryptmethod' before writing that file to change the method. + To set the default method, used for new files, use one of these in your + |vimrc| file: > + set cm=zip +- set cm=blowfish ++ set cm=blowfish2 ++Use the first one if you need to be compatible with Vim 7.2 and older. Using ++"blowfish2" is highly recommended if you can use a Vim version that supports ++it. ++ + The message given for reading and writing a file will show "[crypted]" when +-using zip, "[blowfish]" when using blowfish. ++using zip, "[blowfish]" when using blowfish, etc. + + When writing an undo file, the same key and method will be used for the text + in the undo file. |persistent-undo|. +@@ -1438,7 +1449,7 @@ lines to "/etc/magic", "/usr/share/misc/ + 0 string VimCrypt~ Vim encrypted file + >9 string 01 - "zip" cryptmethod + >9 string 02 - "blowfish" cryptmethod +- ++ >9 string 03 - "blowfish2" cryptmethod + + Notes: + - Encryption is not possible when doing conversion with 'charconvert'. +@@ -1462,6 +1473,10 @@ Notes: + - Pkzip uses the same encryption as 'cryptmethod' "zip", and US Govt has no + objection to its export. Pkzip's public file APPNOTE.TXT describes this + algorithm in detail. ++- The implementation of 'cryptmethod' "blowfish" has a flaw. It is possible to ++ crack the first 64 bytes of a file and in some circumstances more of the ++ file. Use of it is not recommended, but it's still the strongest method ++ supported by Vim 7.3 and 7.4. The "zip" method is even weaker. + - Vim originates from the Netherlands. That is where the sources come from. + Thus the encryption code is not exported from the USA. + +diff -up vim74/runtime/doc/options.txt.blowfish2 vim74/runtime/doc/options.txt +--- vim74/runtime/doc/options.txt.blowfish2 2017-09-05 14:47:33.976919884 +0200 ++++ vim74/runtime/doc/options.txt 2017-09-05 14:47:34.925912224 +0200 +@@ -2197,10 +2197,18 @@ A jump table for the options with a shor + zip PkZip compatible method. A weak kind of encryption. + Backwards compatible with Vim 7.2 and older. + *blowfish* +- blowfish Blowfish method. Strong encryption. Requires Vim 7.3 +- or later, files can NOT be read by Vim 7.2 and older. +- This adds a "seed" to the file, every time you write +- the file the encrypted bytes will be different. ++ blowfish Blowfish method. Medium strong encryption but it has ++ an implementation flaw. Requires Vim 7.3 or later, ++ files can NOT be read by Vim 7.2 and older. This adds ++ a "seed" to the file, every time you write the file ++ the encrypted bytes will be different. ++ *blowfish2* ++ blowfish2 Blowfish method. Medium strong encryption. Requires ++ Vim 7.4.399 or later, files can NOT be read by Vim 7.3 ++ and older. This adds a "seed" to the file, every time ++ you write the file the encrypted bytes will be ++ different. The whole undo file is encrypted, not just ++ the pieces of text. + + When reading an encrypted file 'cryptmethod' will be set automatically + to the detected method of the file being read. Thus if you write it +diff -up vim74/src/blowfish.c.blowfish2 vim74/src/blowfish.c +--- vim74/src/blowfish.c.blowfish2 2010-12-17 19:58:18.000000000 +0100 ++++ vim74/src/blowfish.c 2017-09-05 14:47:34.926912216 +0200 +@@ -9,17 +9,25 @@ + * Blowfish encryption for Vim; in Blowfish output feedback mode. + * Contributed by Mohsin Ahmed, http://www.cs.albany.edu/~mosh + * Based on http://www.schneier.com/blowfish.html by Bruce Schneier. ++ * ++ * There are two variants: ++ * - The old one "blowfish" has a flaw which makes it much easier to crack the ++ * key. To see this, make a text file with one line of 1000 "x" characters ++ * and write it encrypted. Use "xxd" to inspect the bytes in the file. You ++ * will see that a block of 8 bytes repeats 8 times. ++ * - The new one "blowfish2" is better. It uses an 8 byte CFB to avoid the ++ * repeats. + */ + + #include "vim.h" + +-#if defined(FEAT_CRYPT) ++#if defined(FEAT_CRYPT) || defined(PROTO) + + #define ARRAY_LENGTH(A) (sizeof(A)/sizeof(A[0])) + + #define BF_BLOCK 8 + #define BF_BLOCK_MASK 7 +-#define BF_OFB_LEN (8*(BF_BLOCK)) ++#define BF_MAX_CFB_LEN (8 * BF_BLOCK) + + typedef union { + UINT32_T ul[2]; +@@ -37,14 +45,26 @@ typedef union { + # endif + #endif + +-static void bf_e_block __ARGS((UINT32_T *p_xl, UINT32_T *p_xr)); +-static void bf_e_cblock __ARGS((char_u *block)); +-static int bf_check_tables __ARGS((UINT32_T a_ipa[18], UINT32_T a_sbi[4][256], UINT32_T val)); ++/* The state of encryption, referenced by cryptstate_T. */ ++typedef struct { ++ UINT32_T pax[18]; /* P-array */ ++ UINT32_T sbx[4][256]; /* S-boxes */ ++ int randbyte_offset; ++ int update_offset; ++ char_u cfb_buffer[BF_MAX_CFB_LEN]; /* up to 64 bytes used */ ++ int cfb_len; /* size of cfb_buffer actually used */ ++} bf_state_T; ++ ++ ++static void bf_e_block __ARGS((bf_state_T *state, UINT32_T *p_xl, UINT32_T *p_xr)); ++static void bf_e_cblock __ARGS((bf_state_T *state, char_u *block)); ++static int bf_check_tables __ARGS((UINT32_T pax[18], UINT32_T sbx[4][256], UINT32_T val)); + static int bf_self_test __ARGS((void)); ++static void bf_key_init __ARGS((bf_state_T *state, char_u *password, char_u *salt, int salt_len)); ++static void bf_cfb_init __ARGS((bf_state_T *state, char_u *seed, int seed_len)); + + /* Blowfish code */ +-static UINT32_T pax[18]; +-static UINT32_T ipa[18] = { ++static UINT32_T pax_init[18] = { + 0x243f6a88u, 0x85a308d3u, 0x13198a2eu, + 0x03707344u, 0xa4093822u, 0x299f31d0u, + 0x082efa98u, 0xec4e6c89u, 0x452821e6u, +@@ -53,8 +73,7 @@ static UINT32_T ipa[18] = { + 0xb5470917u, 0x9216d5d9u, 0x8979fb1bu + }; + +-static UINT32_T sbx[4][256]; +-static UINT32_T sbi[4][256] = { ++static UINT32_T sbx_init[4][256] = { + {0xd1310ba6u, 0x98dfb5acu, 0x2ffd72dbu, 0xd01adfb7u, + 0xb8e1afedu, 0x6a267e96u, 0xba7c9045u, 0xf12c7f99u, + 0x24a19947u, 0xb3916cf7u, 0x0801f2e2u, 0x858efc16u, +@@ -314,33 +333,40 @@ static UINT32_T sbi[4][256] = { + } + }; + +- + #define F1(i) \ +- xl ^= pax[i]; \ +- xr ^= ((sbx[0][xl >> 24] + \ +- sbx[1][(xl & 0xFF0000) >> 16]) ^ \ +- sbx[2][(xl & 0xFF00) >> 8]) + \ +- sbx[3][xl & 0xFF]; ++ xl ^= bfs->pax[i]; \ ++ xr ^= ((bfs->sbx[0][xl >> 24] + \ ++ bfs->sbx[1][(xl & 0xFF0000) >> 16]) ^ \ ++ bfs->sbx[2][(xl & 0xFF00) >> 8]) + \ ++ bfs->sbx[3][xl & 0xFF]; + + #define F2(i) \ +- xr ^= pax[i]; \ +- xl ^= ((sbx[0][xr >> 24] + \ +- sbx[1][(xr & 0xFF0000) >> 16]) ^ \ +- sbx[2][(xr & 0xFF00) >> 8]) + \ +- sbx[3][xr & 0xFF]; +- ++ xr ^= bfs->pax[i]; \ ++ xl ^= ((bfs->sbx[0][xr >> 24] + \ ++ bfs->sbx[1][(xr & 0xFF0000) >> 16]) ^ \ ++ bfs->sbx[2][(xr & 0xFF00) >> 8]) + \ ++ bfs->sbx[3][xr & 0xFF]; + + static void +-bf_e_block(p_xl, p_xr) ++bf_e_block(bfs, p_xl, p_xr) ++ bf_state_T *bfs; + UINT32_T *p_xl; + UINT32_T *p_xr; + { +- UINT32_T temp, xl = *p_xl, xr = *p_xr; +- +- F1(0) F2(1) F1(2) F2(3) F1(4) F2(5) F1(6) F2(7) +- F1(8) F2(9) F1(10) F2(11) F1(12) F2(13) F1(14) F2(15) +- xl ^= pax[16]; +- xr ^= pax[17]; ++ UINT32_T temp; ++ UINT32_T xl = *p_xl; ++ UINT32_T xr = *p_xr; ++ ++ F1(0) F2(1) ++ F1(2) F2(3) ++ F1(4) F2(5) ++ F1(6) F2(7) ++ F1(8) F2(9) ++ F1(10) F2(11) ++ F1(12) F2(13) ++ F1(14) F2(15) ++ xl ^= bfs->pax[16]; ++ xr ^= bfs->pax[17]; + temp = xl; + xl = xr; + xr = temp; +@@ -348,23 +374,6 @@ bf_e_block(p_xl, p_xr) + *p_xr = xr; + } + +-#if 0 /* not used */ +- static void +-bf_d_block(p_xl, p_xr) +- UINT32_T *p_xl; +- UINT32_T *p_xr; +-{ +- UINT32_T temp, xl = *p_xl, xr = *p_xr; +- F1(17) F2(16) F1(15) F2(14) F1(13) F2(12) F1(11) F2(10) +- F1(9) F2(8) F1(7) F2(6) F1(5) F2(4) F1(3) F2(2) +- xl ^= pax[1]; +- xr ^= pax[0]; +- temp = xl; xl = xr; xr = temp; +- *p_xl = xl; *p_xr = xr; +-} +-#endif +- +- + #ifdef WORDS_BIGENDIAN + # define htonl2(x) \ + x = ((((x) & 0xffL) << 24) | (((x) & 0xff00L) << 8) | \ +@@ -374,7 +383,8 @@ bf_d_block(p_xl, p_xr) + #endif + + static void +-bf_e_cblock(block) ++bf_e_cblock(bfs, block) ++ bf_state_T *bfs; + char_u *block; + { + block8 bk; +@@ -382,35 +392,22 @@ bf_e_cblock(block) + memcpy(bk.uc, block, 8); + htonl2(bk.ul[0]); + htonl2(bk.ul[1]); +- bf_e_block(&bk.ul[0], &bk.ul[1]); ++ bf_e_block(bfs, &bk.ul[0], &bk.ul[1]); + htonl2(bk.ul[0]); + htonl2(bk.ul[1]); + memcpy(block, bk.uc, 8); + } + +-#if 0 /* not used */ +- void +-bf_d_cblock(block) +- char_u *block; +-{ +- block8 bk; +- memcpy(bk.uc, block, 8); +- htonl2(bk.ul[0]); htonl2(bk.ul[1]); +- bf_d_block(&bk.ul[0], &bk.ul[1]); +- htonl2(bk.ul[0]); htonl2(bk.ul[1]); +- memcpy(block, bk.uc, 8); +-} +-#endif +- + /* + * Initialize the crypt method using "password" as the encryption key and + * "salt[salt_len]" as the salt. + */ +- void +-bf_key_init(password, salt, salt_len) +- char_u *password; +- char_u *salt; +- int salt_len; ++ static void ++bf_key_init(bfs, password, salt, salt_len) ++ bf_state_T *bfs; ++ char_u *password; ++ char_u *salt; ++ int salt_len; + { + int i, j, keypos = 0; + unsigned u; +@@ -418,7 +415,7 @@ bf_key_init(password, salt, salt_len) + char_u *key; + int keylen; + +- /* Process the key 1000 times. ++ /* Process the key 1001 times. + * See http://en.wikipedia.org/wiki/Key_strengthening. */ + key = sha256_key(password, salt, salt_len); + for (i = 0; i < 1000; i++) +@@ -437,52 +434,54 @@ bf_key_init(password, salt, salt_len) + key[i] = u; + } + +- mch_memmove(sbx, sbi, 4 * 4 * 256); ++ /* Use "key" to initialize the P-array ("pax") and S-boxes ("sbx") of ++ * Blowfish. */ ++ mch_memmove(bfs->sbx, sbx_init, 4 * 4 * 256); + + for (i = 0; i < 18; ++i) + { + val = 0; + for (j = 0; j < 4; ++j) + val = (val << 8) | key[keypos++ % keylen]; +- pax[i] = ipa[i] ^ val; ++ bfs->pax[i] = pax_init[i] ^ val; + } + + data_l = data_r = 0; + for (i = 0; i < 18; i += 2) + { +- bf_e_block(&data_l, &data_r); +- pax[i + 0] = data_l; +- pax[i + 1] = data_r; ++ bf_e_block(bfs, &data_l, &data_r); ++ bfs->pax[i + 0] = data_l; ++ bfs->pax[i + 1] = data_r; + } + + for (i = 0; i < 4; ++i) + { + for (j = 0; j < 256; j += 2) + { +- bf_e_block(&data_l, &data_r); +- sbx[i][j + 0] = data_l; +- sbx[i][j + 1] = data_r; ++ bf_e_block(bfs, &data_l, &data_r); ++ bfs->sbx[i][j + 0] = data_l; ++ bfs->sbx[i][j + 1] = data_r; + } + } + } + + /* +- * BF Self test for corrupted tables or instructions ++ * Blowfish self-test for corrupted tables or instructions. + */ + static int +-bf_check_tables(a_ipa, a_sbi, val) +- UINT32_T a_ipa[18]; +- UINT32_T a_sbi[4][256]; ++bf_check_tables(pax, sbx, val) ++ UINT32_T pax[18]; ++ UINT32_T sbx[4][256]; + UINT32_T val; + { + int i, j; + UINT32_T c = 0; + + for (i = 0; i < 18; i++) +- c ^= a_ipa[i]; ++ c ^= pax[i]; + for (i = 0; i < 4; i++) + for (j = 0; j < 256; j++) +- c ^= a_sbi[i][j]; ++ c ^= sbx[i][j]; + return c == val; + } + +@@ -520,6 +519,10 @@ bf_self_test() + int err = 0; + block8 bk; + UINT32_T ui = 0xffffffffUL; ++ bf_state_T state; ++ ++ vim_memset(&state, 0, sizeof(bf_state_T)); ++ state.cfb_len = BF_MAX_CFB_LEN; + + /* We can't simply use sizeof(UINT32_T), it would generate a compiler + * warning. */ +@@ -528,21 +531,21 @@ bf_self_test() + EMSG(_("E820: sizeof(uint32_t) != 4")); + } + +- if (!bf_check_tables(ipa, sbi, 0x6ffa520a)) ++ if (!bf_check_tables(pax_init, sbx_init, 0x6ffa520a)) + err++; + + bn = ARRAY_LENGTH(bf_test_data); + for (i = 0; i < bn; i++) + { +- bf_key_init((char_u *)(bf_test_data[i].password), ++ bf_key_init(&state, (char_u *)(bf_test_data[i].password), + bf_test_data[i].salt, + (int)STRLEN(bf_test_data[i].salt)); +- if (!bf_check_tables(pax, sbx, bf_test_data[i].keysum)) ++ if (!bf_check_tables(state.pax, state.sbx, bf_test_data[i].keysum)) + err++; + + /* Don't modify bf_test_data[i].plaintxt, self test is idempotent. */ + memcpy(bk.uc, bf_test_data[i].plaintxt, 8); +- bf_e_cblock(bk.uc); ++ bf_e_cblock(&state, bk.uc); + if (memcmp(bk.uc, bf_test_data[i].cryptxt, 8) != 0) + { + if (err == 0 && memcmp(bk.uc, bf_test_data[i].badcryptxt, 8) == 0) +@@ -554,43 +557,43 @@ bf_self_test() + return err > 0 ? FAIL : OK; + } + +-/* Output feedback mode. */ +-static int randbyte_offset = 0; +-static int update_offset = 0; +-static char_u ofb_buffer[BF_OFB_LEN]; /* 64 bytes */ ++/* ++ * CFB: Cipher Feedback Mode. ++ */ + + /* +- * Initialize with seed "iv[iv_len]". ++ * Initialize with seed "seed[seed_len]". + */ +- void +-bf_ofb_init(iv, iv_len) +- char_u *iv; +- int iv_len; ++ static void ++bf_cfb_init(bfs, seed, seed_len) ++ bf_state_T *bfs; ++ char_u *seed; ++ int seed_len; + { + int i, mi; + +- randbyte_offset = update_offset = 0; +- vim_memset(ofb_buffer, 0, BF_OFB_LEN); +- if (iv_len > 0) ++ bfs->randbyte_offset = bfs->update_offset = 0; ++ vim_memset(bfs->cfb_buffer, 0, bfs->cfb_len); ++ if (seed_len > 0) + { +- mi = iv_len > BF_OFB_LEN ? iv_len : BF_OFB_LEN; ++ mi = seed_len > bfs->cfb_len ? seed_len : bfs->cfb_len; + for (i = 0; i < mi; i++) +- ofb_buffer[i % BF_OFB_LEN] ^= iv[i % iv_len]; ++ bfs->cfb_buffer[i % bfs->cfb_len] ^= seed[i % seed_len]; + } + } + +-#define BF_OFB_UPDATE(c) { \ +- ofb_buffer[update_offset] ^= (char_u)c; \ +- if (++update_offset == BF_OFB_LEN) \ +- update_offset = 0; \ ++#define BF_CFB_UPDATE(bfs, c) { \ ++ bfs->cfb_buffer[bfs->update_offset] ^= (char_u)c; \ ++ if (++bfs->update_offset == bfs->cfb_len) \ ++ bfs->update_offset = 0; \ + } + +-#define BF_RANBYTE(t) { \ +- if ((randbyte_offset & BF_BLOCK_MASK) == 0) \ +- bf_e_cblock(&ofb_buffer[randbyte_offset]); \ +- t = ofb_buffer[randbyte_offset]; \ +- if (++randbyte_offset == BF_OFB_LEN) \ +- randbyte_offset = 0; \ ++#define BF_RANBYTE(bfs, t) { \ ++ if ((bfs->randbyte_offset & BF_BLOCK_MASK) == 0) \ ++ bf_e_cblock(bfs, &(bfs->cfb_buffer[bfs->randbyte_offset])); \ ++ t = bfs->cfb_buffer[bfs->randbyte_offset]; \ ++ if (++bfs->randbyte_offset == bfs->cfb_len) \ ++ bfs->randbyte_offset = 0; \ + } + + /* +@@ -598,90 +601,69 @@ bf_ofb_init(iv, iv_len) + * "from" and "to" can be equal to encrypt in place. + */ + void +-bf_crypt_encode(from, len, to) ++crypt_blowfish_encode(state, from, len, to) ++ cryptstate_T *state; + char_u *from; + size_t len; + char_u *to; + { ++ bf_state_T *bfs = state->method_state; + size_t i; + int ztemp, t; + + for (i = 0; i < len; ++i) + { + ztemp = from[i]; +- BF_RANBYTE(t); +- BF_OFB_UPDATE(ztemp); ++ BF_RANBYTE(bfs, t); ++ BF_CFB_UPDATE(bfs, ztemp); + to[i] = t ^ ztemp; + } + } + + /* +- * Decrypt "ptr[len]" in place. ++ * Decrypt "from[len]" into "to[len]". + */ + void +-bf_crypt_decode(ptr, len) +- char_u *ptr; +- long len; ++crypt_blowfish_decode(state, from, len, to) ++ cryptstate_T *state; ++ char_u *from; ++ size_t len; ++ char_u *to; + { +- char_u *p; ++ bf_state_T *bfs = state->method_state; ++ size_t i; + int t; + +- for (p = ptr; p < ptr + len; ++p) ++ for (i = 0; i < len; ++i) + { +- BF_RANBYTE(t); +- *p ^= t; +- BF_OFB_UPDATE(*p); ++ BF_RANBYTE(bfs, t); ++ to[i] = from[i] ^ t; ++ BF_CFB_UPDATE(bfs, to[i]); + } + } + +-/* +- * Initialize the encryption keys and the random header according to +- * the given password. +- */ + void +-bf_crypt_init_keys(passwd) +- char_u *passwd; /* password string with which to modify keys */ +-{ +- char_u *p; +- +- for (p = passwd; *p != NUL; ++p) +- { +- BF_OFB_UPDATE(*p); +- } +-} ++crypt_blowfish_init(state, key, salt, salt_len, seed, seed_len) ++ cryptstate_T *state; ++ char_u* key; ++ char_u* salt; ++ int salt_len; ++ char_u* seed; ++ int seed_len; ++{ ++ bf_state_T *bfs = (bf_state_T *)alloc_clear(sizeof(bf_state_T)); ++ ++ state->method_state = bfs; ++ ++ /* "blowfish" uses a 64 byte buffer, causing it to repeat 8 byte groups 8 ++ * times. "blowfish2" uses a 8 byte buffer to avoid repeating. */ ++ bfs->cfb_len = state->method_nr == CRYPT_M_BF ? BF_MAX_CFB_LEN : BF_BLOCK; + +-static int save_randbyte_offset; +-static int save_update_offset; +-static char_u save_ofb_buffer[BF_OFB_LEN]; +-static UINT32_T save_pax[18]; +-static UINT32_T save_sbx[4][256]; +- +-/* +- * Save the current crypt state. Can only be used once before +- * bf_crypt_restore(). +- */ +- void +-bf_crypt_save() +-{ +- save_randbyte_offset = randbyte_offset; +- save_update_offset = update_offset; +- mch_memmove(save_ofb_buffer, ofb_buffer, BF_OFB_LEN); +- mch_memmove(save_pax, pax, 4 * 18); +- mch_memmove(save_sbx, sbx, 4 * 4 * 256); +-} ++ if (blowfish_self_test() == FAIL) ++ return; + +-/* +- * Restore the current crypt state. Can only be used after +- * bf_crypt_save(). +- */ +- void +-bf_crypt_restore() +-{ +- randbyte_offset = save_randbyte_offset; +- update_offset = save_update_offset; +- mch_memmove(ofb_buffer, save_ofb_buffer, BF_OFB_LEN); +- mch_memmove(pax, save_pax, 4 * 18); +- mch_memmove(sbx, save_sbx, 4 * 4 * 256); ++ bf_key_init(bfs, key, salt, salt_len); ++ bf_cfb_init(bfs, seed, seed_len); + } + + /* +diff -up vim74/src/crypt.c.blowfish2 vim74/src/crypt.c +--- vim74/src/crypt.c.blowfish2 2017-09-05 14:47:34.933912159 +0200 ++++ vim74/src/crypt.c 2017-09-05 14:47:34.933912159 +0200 +@@ -0,0 +1,585 @@ ++/* vi:set ts=8 sts=4 sw=4: ++ * ++ * VIM - Vi IMproved by Bram Moolenaar ++ * ++ * Do ":help uganda" in Vim to read copying and usage conditions. ++ * Do ":help credits" in Vim to see a list of people who contributed. ++ * See README.txt for an overview of the Vim source code. ++ */ ++ ++/* ++ * crypt.c: Generic encryption support. ++ */ ++#include "vim.h" ++ ++#if defined(FEAT_CRYPT) || defined(PROTO) ++/* ++ * Optional encryption support. ++ * Mohsin Ahmed, mosh@sasi.com, 1998-09-24 ++ * Based on zip/crypt sources. ++ * Refactored by David Leadbeater, 2014. ++ * ++ * NOTE FOR USA: Since 2000 exporting this code from the USA is allowed to ++ * most countries. There are a few exceptions, but that still should not be a ++ * problem since this code was originally created in Europe and India. ++ * ++ * Blowfish addition originally made by Mohsin Ahmed, ++ * http://www.cs.albany.edu/~mosh 2010-03-14 ++ * Based on blowfish by Bruce Schneier (http://www.schneier.com/blowfish.html) ++ * and sha256 by Christophe Devine. ++ */ ++ ++typedef struct { ++ char *name; /* encryption name as used in 'cryptmethod' */ ++ char *magic; /* magic bytes stored in file header */ ++ int salt_len; /* length of salt, or 0 when not using salt */ ++ int seed_len; /* length of seed, or 0 when not using salt */ ++ int works_inplace; /* encryption/decryption can be done in-place */ ++ int whole_undofile; /* whole undo file is encrypted */ ++ ++ /* Optional function pointer for a self-test. */ ++ int (* self_test_fn)(); ++ ++ /* Function pointer for initializing encryption/decription. */ ++ void (* init_fn)(cryptstate_T *state, char_u *key, ++ char_u *salt, int salt_len, char_u *seed, int seed_len); ++ ++ /* Function pointers for encoding/decoding from one buffer into another. ++ * Optional, however, these or the _buffer ones should be configured. */ ++ void (*encode_fn)(cryptstate_T *state, char_u *from, size_t len, ++ char_u *to); ++ void (*decode_fn)(cryptstate_T *state, char_u *from, size_t len, ++ char_u *to); ++ ++ /* Function pointers for encoding and decoding, can buffer data if needed. ++ * Optional (however, these or the above should be configured). */ ++ long (*encode_buffer_fn)(cryptstate_T *state, char_u *from, size_t len, ++ char_u **newptr); ++ long (*decode_buffer_fn)(cryptstate_T *state, char_u *from, size_t len, ++ char_u **newptr); ++ ++ /* Function pointers for in-place encoding and decoding, used for ++ * crypt_*_inplace(). "from" and "to" arguments will be equal. ++ * These may be the same as decode_fn and encode_fn above, however an ++ * algorithm may implement them in a way that is not interchangeable with ++ * the crypt_(en|de)code() interface (for example because it wishes to add ++ * padding to files). ++ * This method is used for swap and undo files which have a rigid format. ++ */ ++ void (*encode_inplace_fn)(cryptstate_T *state, char_u *p1, size_t len, ++ char_u *p2); ++ void (*decode_inplace_fn)(cryptstate_T *state, char_u *p1, size_t len, ++ char_u *p2); ++} cryptmethod_T; ++ ++/* index is method_nr of cryptstate_T, CRYPT_M_* */ ++static cryptmethod_T cryptmethods[CRYPT_M_COUNT] = { ++ /* PK_Zip; very weak */ ++ { ++ "zip", ++ "VimCrypt~01!", ++ 0, ++ 0, ++ TRUE, ++ FALSE, ++ NULL, ++ crypt_zip_init, ++ crypt_zip_encode, crypt_zip_decode, ++ NULL, NULL, ++ crypt_zip_encode, crypt_zip_decode, ++ }, ++ ++ /* Blowfish/CFB + SHA-256 custom key derivation; implementation issues. */ ++ { ++ "blowfish", ++ "VimCrypt~02!", ++ 8, ++ 8, ++ TRUE, ++ FALSE, ++ blowfish_self_test, ++ crypt_blowfish_init, ++ crypt_blowfish_encode, crypt_blowfish_decode, ++ NULL, NULL, ++ crypt_blowfish_encode, crypt_blowfish_decode, ++ }, ++ ++ /* Blowfish/CFB + SHA-256 custom key derivation; fixed. */ ++ { ++ "blowfish2", ++ "VimCrypt~03!", ++ 8, ++ 8, ++ TRUE, ++ TRUE, ++ blowfish_self_test, ++ crypt_blowfish_init, ++ crypt_blowfish_encode, crypt_blowfish_decode, ++ NULL, NULL, ++ crypt_blowfish_encode, crypt_blowfish_decode, ++ }, ++}; ++ ++#define CRYPT_MAGIC_LEN 12 /* cannot change */ ++static char crypt_magic_head[] = "VimCrypt~"; ++ ++/* ++ * Return int value for crypt method name. ++ * 0 for "zip", the old method. Also for any non-valid value. ++ * 1 for "blowfish". ++ * 2 for "blowfish2". ++ */ ++ int ++crypt_method_nr_from_name(name) ++ char_u *name; ++{ ++ int i; ++ ++ for (i = 0; i < CRYPT_M_COUNT; ++i) ++ if (STRCMP(name, cryptmethods[i].name) == 0) ++ return i; ++ return 0; ++} ++ ++/* ++ * Get the crypt method used for a file from "ptr[len]", the magic text at the ++ * start of the file. ++ * Returns -1 when no encryption used. ++ */ ++ int ++crypt_method_nr_from_magic(ptr, len) ++ char *ptr; ++ int len; ++{ ++ int i; ++ ++ if (len < CRYPT_MAGIC_LEN) ++ return -1; ++ ++ for (i = 0; i < CRYPT_M_COUNT; i++) ++ if (memcmp(ptr, cryptmethods[i].magic, CRYPT_MAGIC_LEN) == 0) ++ return i; ++ ++ i = (int)STRLEN(crypt_magic_head); ++ if (len >= i && memcmp(ptr, crypt_magic_head, i) == 0) ++ EMSG(_("E821: File is encrypted with unknown method")); ++ ++ return -1; ++} ++ ++/* ++ * Return TRUE if the crypt method for "method_nr" can be done in-place. ++ */ ++ int ++crypt_works_inplace(state) ++ cryptstate_T *state; ++{ ++ return cryptmethods[state->method_nr].works_inplace; ++} ++ ++/* ++ * Get the crypt method for buffer "buf" as a number. ++ */ ++ int ++crypt_get_method_nr(buf) ++ buf_T *buf; ++{ ++ return crypt_method_nr_from_name(*buf->b_p_cm == NUL ? p_cm : buf->b_p_cm); ++} ++ ++/* ++ * Return TRUE when the buffer uses an encryption method that encrypts the ++ * whole undo file, not only the text. ++ */ ++ int ++crypt_whole_undofile(method_nr) ++ int method_nr; ++{ ++ return cryptmethods[method_nr].whole_undofile; ++} ++ ++/* ++ * Get crypt method specifc length of the file header in bytes. ++ */ ++ int ++crypt_get_header_len(method_nr) ++ int method_nr; ++{ ++ return CRYPT_MAGIC_LEN ++ + cryptmethods[method_nr].salt_len ++ + cryptmethods[method_nr].seed_len; ++} ++ ++/* ++ * Set the crypt method for buffer "buf" to "method_nr" using the int value as ++ * returned by crypt_method_nr_from_name(). ++ */ ++ void ++crypt_set_cm_option(buf, method_nr) ++ buf_T *buf; ++ int method_nr; ++{ ++ free_string_option(buf->b_p_cm); ++ buf->b_p_cm = vim_strsave((char_u *)cryptmethods[method_nr].name); ++} ++ ++/* ++ * If the crypt method for the current buffer has a self-test, run it and ++ * return OK/FAIL. ++ */ ++ int ++crypt_self_test() ++{ ++ int method_nr = crypt_get_method_nr(curbuf); ++ ++ if (cryptmethods[method_nr].self_test_fn == NULL) ++ return OK; ++ return cryptmethods[method_nr].self_test_fn(); ++} ++ ++/* ++ * Allocate a crypt state and initialize it. ++ */ ++ cryptstate_T * ++crypt_create(method_nr, key, salt, salt_len, seed, seed_len) ++ int method_nr; ++ char_u *key; ++ char_u *salt; ++ int salt_len; ++ char_u *seed; ++ int seed_len; ++{ ++ cryptstate_T *state = (cryptstate_T *)alloc((int)sizeof(cryptstate_T)); ++ ++ state->method_nr = method_nr; ++ cryptmethods[method_nr].init_fn(state, key, salt, salt_len, seed, seed_len); ++ return state; ++} ++ ++/* ++ * Allocate a crypt state from a file header and initialize it. ++ * Assumes that header contains at least the number of bytes that ++ * crypt_get_header_len() returns for "method_nr". ++ */ ++ cryptstate_T * ++crypt_create_from_header(method_nr, key, header) ++ int method_nr; ++ char_u *key; ++ char_u *header; ++{ ++ char_u *salt = NULL; ++ char_u *seed = NULL; ++ int salt_len = cryptmethods[method_nr].salt_len; ++ int seed_len = cryptmethods[method_nr].seed_len; ++ ++ if (salt_len > 0) ++ salt = header + CRYPT_MAGIC_LEN; ++ if (seed_len > 0) ++ seed = header + CRYPT_MAGIC_LEN + salt_len; ++ ++ return crypt_create(method_nr, key, salt, salt_len, seed, seed_len); ++} ++ ++/* ++ * Read the crypt method specific header data from "fp". ++ * Return an allocated cryptstate_T or NULL on error. ++ */ ++ cryptstate_T * ++crypt_create_from_file(fp, key) ++ FILE *fp; ++ char_u *key; ++{ ++ int method_nr; ++ int header_len; ++ char magic_buffer[CRYPT_MAGIC_LEN]; ++ char_u *buffer; ++ cryptstate_T *state; ++ ++ if (fread(magic_buffer, CRYPT_MAGIC_LEN, 1, fp) != 1) ++ return NULL; ++ method_nr = crypt_method_nr_from_magic(magic_buffer, CRYPT_MAGIC_LEN); ++ if (method_nr < 0) ++ return NULL; ++ ++ header_len = crypt_get_header_len(method_nr); ++ if ((buffer = alloc(header_len)) == NULL) ++ return NULL; ++ mch_memmove(buffer, magic_buffer, CRYPT_MAGIC_LEN); ++ if (header_len > CRYPT_MAGIC_LEN ++ && fread(buffer + CRYPT_MAGIC_LEN, ++ header_len - CRYPT_MAGIC_LEN, 1, fp) != 1) ++ { ++ vim_free(buffer); ++ return NULL; ++ } ++ ++ state = crypt_create_from_header(method_nr, key, buffer); ++ vim_free(buffer); ++ return state; ++} ++ ++/* ++ * Allocate a cryptstate_T for writing and initialize it with "key". ++ * Allocates and fills in the header and stores it in "header", setting ++ * "header_len". The header may include salt and seed, depending on ++ * cryptmethod. Caller must free header. ++ * Returns the state or NULL on failure. ++ */ ++ cryptstate_T * ++crypt_create_for_writing(method_nr, key, header, header_len) ++ int method_nr; ++ char_u *key; ++ char_u **header; ++ int *header_len; ++{ ++ int len = crypt_get_header_len(method_nr); ++ char_u *salt = NULL; ++ char_u *seed = NULL; ++ int salt_len = cryptmethods[method_nr].salt_len; ++ int seed_len = cryptmethods[method_nr].seed_len; ++ cryptstate_T *state; ++ ++ *header_len = len; ++ *header = alloc(len); ++ if (*header == NULL) ++ return NULL; ++ ++ mch_memmove(*header, cryptmethods[method_nr].magic, CRYPT_MAGIC_LEN); ++ if (salt_len > 0 || seed_len > 0) ++ { ++ if (salt_len > 0) ++ salt = *header + CRYPT_MAGIC_LEN; ++ if (seed_len > 0) ++ seed = *header + CRYPT_MAGIC_LEN + salt_len; ++ ++ /* TODO: Should this be crypt method specific? (Probably not worth ++ * it). sha2_seed is pretty bad for large amounts of entropy, so make ++ * that into something which is suitable for anything. */ ++ sha2_seed(salt, salt_len, seed, seed_len); ++ } ++ ++ state = crypt_create(method_nr, key, salt, salt_len, seed, seed_len); ++ if (state == NULL) ++ { ++ vim_free(*header); ++ *header = NULL; ++ } ++ return state; ++} ++ ++/* ++ * Free the crypt state. ++ */ ++ void ++crypt_free_state(state) ++ cryptstate_T *state; ++{ ++ vim_free(state->method_state); ++ vim_free(state); ++} ++ ++/* ++ * Encode "from[len]" and store the result in a newly allocated buffer, which ++ * is stored in "newptr". ++ * Return number of bytes in "newptr", 0 for need more or -1 on error. ++ */ ++ long ++crypt_encode_alloc(state, from, len, newptr) ++ cryptstate_T *state; ++ char_u *from; ++ size_t len; ++ char_u **newptr; ++{ ++ cryptmethod_T *method = &cryptmethods[state->method_nr]; ++ ++ if (method->encode_buffer_fn != NULL) ++ /* Has buffer function, pass through. */ ++ return method->encode_buffer_fn(state, from, len, newptr); ++ if (len == 0) ++ /* Not buffering, just return EOF. */ ++ return len; ++ ++ *newptr = alloc(len); ++ if (*newptr == NULL) ++ return -1; ++ method->encode_fn(state, from, len, *newptr); ++ return len; ++} ++ ++/* ++ * Decrypt "ptr[len]" and store the result in a newly allocated buffer, which ++ * is stored in "newptr". ++ * Return number of bytes in "newptr", 0 for need more or -1 on error. ++ */ ++ long ++crypt_decode_alloc(state, ptr, len, newptr) ++ cryptstate_T *state; ++ char_u *ptr; ++ long len; ++ char_u **newptr; ++{ ++ cryptmethod_T *method = &cryptmethods[state->method_nr]; ++ ++ if (method->decode_buffer_fn != NULL) ++ /* Has buffer function, pass through. */ ++ return method->decode_buffer_fn(state, ptr, len, newptr); ++ ++ if (len == 0) ++ /* Not buffering, just return EOF. */ ++ return len; ++ ++ *newptr = alloc(len); ++ if (*newptr == NULL) ++ return -1; ++ method->decode_fn(state, ptr, len, *newptr); ++ return len; ++} ++ ++/* ++ * Encrypting "from[len]" into "to[len]". ++ */ ++ void ++crypt_encode(state, from, len, to) ++ cryptstate_T *state; ++ char_u *from; ++ size_t len; ++ char_u *to; ++{ ++ cryptmethods[state->method_nr].encode_fn(state, from, len, to); ++} ++ ++/* ++ * decrypting "from[len]" into "to[len]". ++ */ ++ void ++crypt_decode(state, from, len, to) ++ cryptstate_T *state; ++ char_u *from; ++ size_t len; ++ char_u *to; ++{ ++ cryptmethods[state->method_nr].decode_fn(state, from, len, to); ++} ++ ++/* ++ * Simple inplace encryption, modifies "buf[len]" in place. ++ */ ++ void ++crypt_encode_inplace(state, buf, len) ++ cryptstate_T *state; ++ char_u *buf; ++ size_t len; ++{ ++ cryptmethods[state->method_nr].encode_inplace_fn(state, buf, len, buf); ++} ++ ++/* ++ * Simple inplace decryption, modifies "buf[len]" in place. ++ */ ++ void ++crypt_decode_inplace(state, buf, len) ++ cryptstate_T *state; ++ char_u *buf; ++ size_t len; ++{ ++ cryptmethods[state->method_nr].decode_inplace_fn(state, buf, len, buf); ++} ++ ++/* ++ * Free an allocated crypt key. Clear the text to make sure it doesn't stay ++ * in memory anywhere. ++ */ ++ void ++crypt_free_key(key) ++ char_u *key; ++{ ++ char_u *p; ++ ++ if (key != NULL) ++ { ++ for (p = key; *p != NUL; ++p) ++ *p = 0; ++ vim_free(key); ++ } ++} ++ ++/* ++ * Ask the user for a crypt key. ++ * When "store" is TRUE, the new key is stored in the 'key' option, and the ++ * 'key' option value is returned: Don't free it. ++ * When "store" is FALSE, the typed key is returned in allocated memory. ++ * Returns NULL on failure. ++ */ ++ char_u * ++crypt_get_key(store, twice) ++ int store; ++ int twice; /* Ask for the key twice. */ ++{ ++ char_u *p1, *p2 = NULL; ++ int round; ++ ++ for (round = 0; ; ++round) ++ { ++ cmdline_star = TRUE; ++ cmdline_row = msg_row; ++ p1 = getcmdline_prompt(NUL, round == 0 ++ ? (char_u *)_("Enter encryption key: ") ++ : (char_u *)_("Enter same key again: "), 0, EXPAND_NOTHING, ++ NULL); ++ cmdline_star = FALSE; ++ ++ if (p1 == NULL) ++ break; ++ ++ if (round == twice) ++ { ++ if (p2 != NULL && STRCMP(p1, p2) != 0) ++ { ++ MSG(_("Keys don't match!")); ++ crypt_free_key(p1); ++ crypt_free_key(p2); ++ p2 = NULL; ++ round = -1; /* do it again */ ++ continue; ++ } ++ ++ if (store) ++ { ++ set_option_value((char_u *)"key", 0L, p1, OPT_LOCAL); ++ crypt_free_key(p1); ++ p1 = curbuf->b_p_key; ++ } ++ break; ++ } ++ p2 = p1; ++ } ++ ++ /* since the user typed this, no need to wait for return */ ++ if (msg_didout) ++ msg_putchar('\n'); ++ need_wait_return = FALSE; ++ msg_didout = FALSE; ++ ++ crypt_free_key(p2); ++ return p1; ++} ++ ++ ++/* ++ * Append a message to IObuff for the encryption/decryption method being used. ++ */ ++ void ++crypt_append_msg(buf) ++ buf_T *buf; ++{ ++ if (crypt_get_method_nr(buf) == 0) ++ STRCAT(IObuff, _("[crypted]")); ++ else ++ { ++ STRCAT(IObuff, "["); ++ STRCAT(IObuff, *buf->b_p_cm == NUL ? p_cm : buf->b_p_cm); ++ STRCAT(IObuff, "]"); ++ } ++} ++ ++#endif /* FEAT_CRYPT */ +diff -up vim74/src/crypt_zip.c.blowfish2 vim74/src/crypt_zip.c +--- vim74/src/crypt_zip.c.blowfish2 2017-09-05 14:47:34.934912151 +0200 ++++ vim74/src/crypt_zip.c 2017-09-05 14:47:34.934912151 +0200 +@@ -0,0 +1,158 @@ ++/* vi:set ts=8 sts=4 sw=4: ++ * ++ * VIM - Vi IMproved by Bram Moolenaar ++ * ++ * Do ":help uganda" in Vim to read copying and usage conditions. ++ * Do ":help credits" in Vim to see a list of people who contributed. ++ * See README.txt for an overview of the Vim source code. ++ */ ++ ++/* ++ * crypt_zip.c: Zip encryption support. ++ */ ++#include "vim.h" ++ ++#if defined(FEAT_CRYPT) || defined(PROTO) ++/* ++ * Optional encryption support. ++ * Mohsin Ahmed, mosh@sasi.com, 98-09-24 ++ * Based on zip/crypt sources. ++ * ++ * NOTE FOR USA: Since 2000 exporting this code from the USA is allowed to ++ * most countries. There are a few exceptions, but that still should not be a ++ * problem since this code was originally created in Europe and India. ++ */ ++ ++/* Need a type that should be 32 bits. 64 also works but wastes space. */ ++# if VIM_SIZEOF_INT >= 4 ++typedef unsigned int u32_T; /* int is at least 32 bits */ ++# else ++typedef unsigned long u32_T; /* long should be 32 bits or more */ ++# endif ++ ++/* The state of encryption, referenced by cryptstate_T. */ ++typedef struct { ++ u32_T keys[3]; ++} zip_state_T; ++ ++ ++static void make_crc_tab __ARGS((void)); ++ ++static u32_T crc_32_table[256]; ++ ++/* ++ * Fill the CRC table, if not done already. ++ */ ++ static void ++make_crc_tab() ++{ ++ u32_T s, t, v; ++ static int done = FALSE; ++ ++ if (done) ++ return; ++ for (t = 0; t < 256; t++) ++ { ++ v = t; ++ for (s = 0; s < 8; s++) ++ v = (v >> 1) ^ ((v & 1) * (u32_T)0xedb88320L); ++ crc_32_table[t] = v; ++ } ++ done = TRUE; ++} ++ ++#define CRC32(c, b) (crc_32_table[((int)(c) ^ (b)) & 0xff] ^ ((c) >> 8)) ++ ++/* ++ * Return the next byte in the pseudo-random sequence. ++ */ ++#define DECRYPT_BYTE_ZIP(keys, t) { \ ++ short_u temp = (short_u)keys[2] | 2; \ ++ t = (int)(((unsigned)(temp * (temp ^ 1U)) >> 8) & 0xff); \ ++} ++ ++/* ++ * Update the encryption keys with the next byte of plain text. ++ */ ++#define UPDATE_KEYS_ZIP(keys, c) { \ ++ keys[0] = CRC32(keys[0], (c)); \ ++ keys[1] += keys[0] & 0xff; \ ++ keys[1] = keys[1] * 134775813L + 1; \ ++ keys[2] = CRC32(keys[2], (int)(keys[1] >> 24)); \ ++} ++ ++/* ++ * Initialize for encryption/decryption. ++ */ ++ void ++crypt_zip_init(state, key, salt, salt_len, seed, seed_len) ++ cryptstate_T *state; ++ char_u *key; ++ char_u *salt UNUSED; ++ int salt_len UNUSED; ++ char_u *seed UNUSED; ++ int seed_len UNUSED; ++{ ++ char_u *p; ++ zip_state_T *zs; ++ ++ zs = (zip_state_T *)alloc(sizeof(zip_state_T)); ++ state->method_state = zs; ++ ++ make_crc_tab(); ++ zs->keys[0] = 305419896L; ++ zs->keys[1] = 591751049L; ++ zs->keys[2] = 878082192L; ++ for (p = key; *p != NUL; ++p) ++ { ++ UPDATE_KEYS_ZIP(zs->keys, (int)*p); ++ } ++} ++ ++/* ++ * Encrypt "from[len]" into "to[len]". ++ * "from" and "to" can be equal to encrypt in place. ++ */ ++ void ++crypt_zip_encode(state, from, len, to) ++ cryptstate_T *state; ++ char_u *from; ++ size_t len; ++ char_u *to; ++{ ++ zip_state_T *zs = state->method_state; ++ size_t i; ++ int ztemp, t; ++ ++ for (i = 0; i < len; ++i) ++ { ++ ztemp = from[i]; ++ DECRYPT_BYTE_ZIP(zs->keys, t); ++ UPDATE_KEYS_ZIP(zs->keys, ztemp); ++ to[i] = t ^ ztemp; ++ } ++} ++ ++/* ++ * Decrypt "from[len]" into "to[len]". ++ */ ++ void ++crypt_zip_decode(state, from, len, to) ++ cryptstate_T *state; ++ char_u *from; ++ size_t len; ++ char_u *to; ++{ ++ zip_state_T *zs = state->method_state; ++ size_t i; ++ short_u temp; ++ ++ for (i = 0; i < len; ++i) ++ { ++ temp = (short_u)zs->keys[2] | 2; ++ temp = (int)(((unsigned)(temp * (temp ^ 1U)) >> 8) & 0xff); ++ UPDATE_KEYS_ZIP(zs->keys, to[i] = from[i] ^ temp); ++ } ++} ++ ++#endif /* FEAT_CRYPT */ +diff -up vim74/src/eval.c.blowfish2 vim74/src/eval.c +--- vim74/src/eval.c.blowfish2 2017-09-05 14:47:34.837912934 +0200 ++++ vim74/src/eval.c 2017-09-05 14:47:34.939912111 +0200 +@@ -12228,6 +12228,8 @@ f_has(argvars, rettv) + #endif + #ifdef FEAT_CRYPT + "cryptv", ++ "crypt-blowfish", ++ "crypt-blowfish2", + #endif + #ifdef FEAT_CSCOPE + "cscope", +diff -up vim74/src/ex_docmd.c.blowfish2 vim74/src/ex_docmd.c +--- vim74/src/ex_docmd.c.blowfish2 2017-09-05 14:47:34.782913378 +0200 ++++ vim74/src/ex_docmd.c 2017-09-05 14:47:34.945912063 +0200 +@@ -11497,8 +11497,7 @@ ex_match(eap) + ex_X(eap) + exarg_T *eap UNUSED; + { +- if (get_crypt_method(curbuf) == 0 || blowfish_self_test() == OK) +- (void)get_crypt_key(TRUE, TRUE); ++ (void)crypt_get_key(TRUE, TRUE); + } + #endif + +diff -up vim74/src/fileio.c.blowfish2 vim74/src/fileio.c +--- vim74/src/fileio.c.blowfish2 2017-09-05 14:47:34.245917713 +0200 ++++ vim74/src/fileio.c 2017-09-05 14:47:34.947912046 +0200 +@@ -24,20 +24,6 @@ + #define BUFSIZE 8192 /* size of normal write buffer */ + #define SMBUFSIZE 256 /* size of emergency write buffer */ + +-#ifdef FEAT_CRYPT +-/* crypt_magic[0] is pkzip crypt, crypt_magic[1] is sha2+blowfish */ +-static char *crypt_magic[] = {"VimCrypt~01!", "VimCrypt~02!"}; +-static char crypt_magic_head[] = "VimCrypt~"; +-# define CRYPT_MAGIC_LEN 12 /* must be multiple of 4! */ +- +-/* For blowfish, after the magic header, we store 8 bytes of salt and then 8 +- * bytes of seed (initialisation vector). */ +-static int crypt_salt_len[] = {0, 8}; +-static int crypt_seed_len[] = {0, 8}; +-#define CRYPT_SALT_LEN_MAX 8 +-#define CRYPT_SEED_LEN_MAX 8 +-#endif +- + /* Is there any system that doesn't have access()? */ + #define USE_MCH_ACCESS + +@@ -55,7 +41,6 @@ static char_u *readfile_charconvert __AR + static void check_marks_read __ARGS((void)); + #endif + #ifdef FEAT_CRYPT +-static int crypt_method_from_magic __ARGS((char *ptr, int len)); + static char_u *check_for_cryptkey __ARGS((char_u *cryptkey, char_u *ptr, long *sizep, off_t *filesizep, int newfile, char_u *fname, int *did_ask)); + #endif + #ifdef UNIX +@@ -116,6 +101,9 @@ struct bw_info + #ifdef HAS_BW_FLAGS + int bw_flags; /* FIO_ flags */ + #endif ++#ifdef FEAT_CRYPT ++ buf_T *bw_buffer; /* buffer being written */ ++#endif + #ifdef FEAT_MBYTE + char_u bw_rest[CONV_RESTLEN]; /* not converted bytes */ + int bw_restlen; /* nr of bytes in bw_rest[] */ +@@ -250,7 +238,6 @@ readfile(fname, sfname, from, lines_to_s + #ifdef FEAT_CRYPT + char_u *cryptkey = NULL; + int did_ask_for_key = FALSE; +- int crypt_method_used; + #endif + #ifdef FEAT_PERSISTENT_UNDO + context_sha256_T sha_ctx; +@@ -966,13 +953,6 @@ retry: + #endif + } + +-#ifdef FEAT_CRYPT +- if (cryptkey != NULL) +- /* Need to reset the state, but keep the key, don't want to ask for it +- * again. */ +- crypt_pop_state(); +-#endif +- + /* + * When retrying with another "fenc" and the first time "fileformat" + * will be reset. +@@ -1175,6 +1155,15 @@ retry: + if (read_undo_file) + sha256_start(&sha_ctx); + #endif ++#ifdef FEAT_CRYPT ++ if (curbuf->b_cryptstate != NULL) ++ { ++ /* Need to free the state, but keep the key, don't want to ask for ++ * it again. */ ++ crypt_free_state(curbuf->b_cryptstate); ++ curbuf->b_cryptstate = NULL; ++ } ++#endif + } + + while (!error && !got_int) +@@ -1339,6 +1328,76 @@ retry: + size = read_eintr(fd, ptr, size); + } + ++#ifdef FEAT_CRYPT ++ /* ++ * At start of file: Check for magic number of encryption. ++ */ ++ if (filesize == 0 && size > 0) ++ cryptkey = check_for_cryptkey(cryptkey, ptr, &size, ++ &filesize, newfile, sfname, ++ &did_ask_for_key); ++ /* ++ * Decrypt the read bytes. This is done before checking for ++ * EOF because the crypt layer may be buffering. ++ */ ++ if (cryptkey != NULL && curbuf->b_cryptstate != NULL && size > 0) ++ { ++ if (crypt_works_inplace(curbuf->b_cryptstate)) ++ { ++ crypt_decode_inplace(curbuf->b_cryptstate, ptr, size); ++ } ++ else ++ { ++ char_u *newptr = NULL; ++ int decrypted_size; ++ ++ decrypted_size = crypt_decode_alloc( ++ curbuf->b_cryptstate, ptr, size, &newptr); ++ ++ /* If the crypt layer is buffering, not producing ++ * anything yet, need to read more. */ ++ if (size > 0 && decrypted_size == 0) ++ continue; ++ ++ if (linerest == 0) ++ { ++ /* Simple case: reuse returned buffer (may be ++ * NULL, checked later). */ ++ new_buffer = newptr; ++ } ++ else ++ { ++ long_u new_size; ++ ++ /* Need new buffer to add bytes carried over. */ ++ new_size = (long_u)(decrypted_size + linerest + 1); ++ new_buffer = lalloc(new_size, FALSE); ++ if (new_buffer == NULL) ++ { ++ do_outofmem_msg(new_size); ++ error = TRUE; ++ break; ++ } ++ ++ mch_memmove(new_buffer, buffer, linerest); ++ if (newptr != NULL) ++ mch_memmove(new_buffer + linerest, newptr, ++ decrypted_size); ++ } ++ ++ if (new_buffer != NULL) ++ { ++ vim_free(buffer); ++ buffer = new_buffer; ++ new_buffer = NULL; ++ line_start = buffer; ++ ptr = buffer + linerest; ++ } ++ size = decrypted_size; ++ } ++ } ++#endif ++ + if (size <= 0) + { + if (size < 0) /* read error */ +@@ -1403,21 +1462,6 @@ retry: + } + #endif + } +- +-#ifdef FEAT_CRYPT +- /* +- * At start of file: Check for magic number of encryption. +- */ +- if (filesize == 0) +- cryptkey = check_for_cryptkey(cryptkey, ptr, &size, +- &filesize, newfile, sfname, +- &did_ask_for_key); +- /* +- * Decrypt the read bytes. +- */ +- if (cryptkey != NULL && size > 0) +- crypt_decode(ptr, size); +-#endif + } + skip_read = FALSE; + +@@ -1430,10 +1474,9 @@ retry: + */ + if ((filesize == 0 + # ifdef FEAT_CRYPT +- || (filesize == (CRYPT_MAGIC_LEN +- + crypt_salt_len[use_crypt_method] +- + crypt_seed_len[use_crypt_method]) +- && cryptkey != NULL) ++ || (cryptkey != NULL ++ && filesize == crypt_get_header_len( ++ crypt_get_method_nr(curbuf))) + # endif + ) + && (fio_flags == FIO_UCSBOM +@@ -2262,15 +2305,15 @@ failed: + save_file_ff(curbuf); /* remember the current file format */ + + #ifdef FEAT_CRYPT +- crypt_method_used = use_crypt_method; +- if (cryptkey != NULL) ++ if (curbuf->b_cryptstate != NULL) + { +- crypt_pop_state(); +- if (cryptkey != curbuf->b_p_key) +- free_crypt_key(cryptkey); +- /* don't set cryptkey to NULL, it's used below as a flag that +- * encryption was used */ ++ crypt_free_state(curbuf->b_cryptstate); ++ curbuf->b_cryptstate = NULL; + } ++ if (cryptkey != NULL && cryptkey != curbuf->b_p_key) ++ crypt_free_key(cryptkey); ++ /* Don't set cryptkey to NULL, it's used below as a flag that ++ * encryption was used. */ + #endif + + #ifdef FEAT_MBYTE +@@ -2457,10 +2500,7 @@ failed: + #ifdef FEAT_CRYPT + if (cryptkey != NULL) + { +- if (crypt_method_used == 1) +- STRCAT(IObuff, _("[blowfish]")); +- else +- STRCAT(IObuff, _("[crypted]")); ++ crypt_append_msg(curbuf); + c = TRUE; + } + #endif +@@ -2489,9 +2529,7 @@ failed: + #ifdef FEAT_CRYPT + if (cryptkey != NULL) + msg_add_lines(c, (long)linecnt, filesize +- - CRYPT_MAGIC_LEN +- - crypt_salt_len[use_crypt_method] +- - crypt_seed_len[use_crypt_method]); ++ - crypt_get_header_len(crypt_get_method_nr(curbuf))); + else + #endif + msg_add_lines(c, (long)linecnt, filesize); +@@ -2882,33 +2920,6 @@ check_marks_read() + + #if defined(FEAT_CRYPT) || defined(PROTO) + /* +- * Get the crypt method used for a file from "ptr[len]", the magic text at the +- * start of the file. +- * Returns -1 when no encryption used. +- */ +- static int +-crypt_method_from_magic(ptr, len) +- char *ptr; +- int len; +-{ +- int i; +- +- for (i = 0; i < (int)(sizeof(crypt_magic) / sizeof(crypt_magic[0])); i++) +- { +- if (len < (CRYPT_MAGIC_LEN + crypt_salt_len[i] + crypt_seed_len[i])) +- continue; +- if (memcmp(ptr, crypt_magic[i], CRYPT_MAGIC_LEN) == 0) +- return i; +- } +- +- i = (int)STRLEN(crypt_magic_head); +- if (len >= i && memcmp(ptr, crypt_magic_head, i) == 0) +- EMSG(_("E821: File is encrypted with unknown method")); +- +- return -1; +-} +- +-/* + * Check for magic number used for encryption. Applies to the current buffer. + * If found, the magic number is removed from ptr[*sizep] and *sizep and + * *filesizep are updated. +@@ -2924,7 +2935,7 @@ check_for_cryptkey(cryptkey, ptr, sizep, + char_u *fname; /* file name to display */ + int *did_ask; /* flag: whether already asked for key */ + { +- int method = crypt_method_from_magic((char *)ptr, *sizep); ++ int method = crypt_method_nr_from_magic((char *)ptr, *sizep); + int b_p_ro = curbuf->b_p_ro; + + if (method >= 0) +@@ -2933,9 +2944,8 @@ check_for_cryptkey(cryptkey, ptr, sizep, + * Avoids accidentally overwriting the file with garbage. */ + curbuf->b_p_ro = TRUE; + +- set_crypt_method(curbuf, method); +- if (method > 0) +- (void)blowfish_self_test(); ++ /* Set the cryptmethod local to the buffer. */ ++ crypt_set_cm_option(curbuf, method); + if (cryptkey == NULL && !*did_ask) + { + if (*curbuf->b_p_key) +@@ -2948,7 +2958,7 @@ check_for_cryptkey(cryptkey, ptr, sizep, + * Happens when retrying to detect encoding. */ + smsg((char_u *)_(need_key_msg), fname); + msg_scroll = TRUE; +- cryptkey = get_crypt_key(newfile, FALSE); ++ cryptkey = crypt_get_key(newfile, FALSE); + *did_ask = TRUE; + + /* check if empty key entered */ +@@ -2963,24 +2973,18 @@ check_for_cryptkey(cryptkey, ptr, sizep, + + if (cryptkey != NULL) + { +- int seed_len = crypt_seed_len[method]; +- int salt_len = crypt_salt_len[method]; ++ int header_len; + +- crypt_push_state(); +- use_crypt_method = method; +- if (method == 0) +- crypt_init_keys(cryptkey); +- else +- { +- bf_key_init(cryptkey, ptr + CRYPT_MAGIC_LEN, salt_len); +- bf_ofb_init(ptr + CRYPT_MAGIC_LEN + salt_len, seed_len); +- } ++ curbuf->b_cryptstate = crypt_create_from_header( ++ method, cryptkey, ptr); ++ crypt_set_cm_option(curbuf, method); ++ ++ /* Remove cryptmethod specific header from the text. */ ++ header_len = crypt_get_header_len(method); ++ *filesizep += header_len; ++ *sizep -= header_len; ++ mch_memmove(ptr, ptr + header_len, (size_t)*sizep); + +- /* Remove magic number from the text */ +- *filesizep += CRYPT_MAGIC_LEN + salt_len + seed_len; +- *sizep -= CRYPT_MAGIC_LEN + salt_len + seed_len; +- mch_memmove(ptr, ptr + CRYPT_MAGIC_LEN + salt_len + seed_len, +- (size_t)*sizep); + /* Restore the read-only flag. */ + curbuf->b_p_ro = b_p_ro; + } +@@ -2992,85 +2996,6 @@ check_for_cryptkey(cryptkey, ptr, sizep, + + return cryptkey; + } +- +-/* +- * Check for magic number used for encryption. Applies to the current buffer. +- * If found and decryption is possible returns OK; +- */ +- int +-prepare_crypt_read(fp) +- FILE *fp; +-{ +- int method; +- char_u buffer[CRYPT_MAGIC_LEN + CRYPT_SALT_LEN_MAX +- + CRYPT_SEED_LEN_MAX + 2]; +- +- if (fread(buffer, CRYPT_MAGIC_LEN, 1, fp) != 1) +- return FAIL; +- method = crypt_method_from_magic((char *)buffer, +- CRYPT_MAGIC_LEN + +- CRYPT_SEED_LEN_MAX + +- CRYPT_SALT_LEN_MAX); +- if (method < 0 || method != get_crypt_method(curbuf)) +- return FAIL; +- +- crypt_push_state(); +- if (method == 0) +- crypt_init_keys(curbuf->b_p_key); +- else +- { +- int salt_len = crypt_salt_len[method]; +- int seed_len = crypt_seed_len[method]; +- +- if (fread(buffer, salt_len + seed_len, 1, fp) != 1) +- return FAIL; +- bf_key_init(curbuf->b_p_key, buffer, salt_len); +- bf_ofb_init(buffer + salt_len, seed_len); +- } +- return OK; +-} +- +-/* +- * Prepare for writing encrypted bytes for buffer "buf". +- * Returns a pointer to an allocated header of length "*lenp". +- * When out of memory returns NULL. +- * Otherwise calls crypt_push_state(), call crypt_pop_state() later. +- */ +- char_u * +-prepare_crypt_write(buf, lenp) +- buf_T *buf; +- int *lenp; +-{ +- char_u *header; +- int seed_len = crypt_seed_len[get_crypt_method(buf)]; +- int salt_len = crypt_salt_len[get_crypt_method(buf)]; +- char_u *salt; +- char_u *seed; +- +- header = alloc_clear(CRYPT_MAGIC_LEN + CRYPT_SALT_LEN_MAX +- + CRYPT_SEED_LEN_MAX + 2); +- if (header != NULL) +- { +- crypt_push_state(); +- use_crypt_method = get_crypt_method(buf); /* select zip or blowfish */ +- vim_strncpy(header, (char_u *)crypt_magic[use_crypt_method], +- CRYPT_MAGIC_LEN); +- if (use_crypt_method == 0) +- crypt_init_keys(buf->b_p_key); +- else +- { +- /* Using blowfish, add salt and seed. */ +- salt = header + CRYPT_MAGIC_LEN; +- seed = salt + salt_len; +- sha2_seed(salt, salt_len, seed, seed_len); +- bf_key_init(buf->b_p_key, salt, salt_len); +- bf_ofb_init(seed, seed_len); +- } +- } +- *lenp = CRYPT_MAGIC_LEN + salt_len + seed_len; +- return header; +-} +- + #endif /* FEAT_CRYPT */ + + #ifdef UNIX +@@ -3224,9 +3149,6 @@ buf_write(buf, fname, sfname, start, end + int write_undo_file = FALSE; + context_sha256_T sha_ctx; + #endif +-#ifdef FEAT_CRYPT +- int crypt_method_used; +-#endif + + if (fname == NULL || *fname == NUL) /* safety check */ + return FAIL; +@@ -3262,6 +3184,9 @@ buf_write(buf, fname, sfname, start, end + write_info.bw_iconv_fd = (iconv_t)-1; + # endif + #endif ++#ifdef FEAT_CRYPT ++ write_info.bw_buffer = buf; ++#endif + + /* After writing a file changedtick changes but we don't want to display + * the line. */ +@@ -4505,17 +4430,17 @@ restore_backup: + #ifdef FEAT_CRYPT + if (*buf->b_p_key != NUL && !filtering) + { +- char_u *header; +- int header_len; ++ char_u *header; ++ int header_len; + +- header = prepare_crypt_write(buf, &header_len); +- if (header == NULL) ++ buf->b_cryptstate = crypt_create_for_writing(crypt_get_method_nr(buf), ++ buf->b_p_key, &header, &header_len); ++ if (buf->b_cryptstate == NULL || header == NULL) + end = 0; + else + { +- /* Write magic number, so that Vim knows that this file is +- * encrypted when reading it again. This also undergoes utf-8 to +- * ucs-2/4 conversion when needed. */ ++ /* Write magic number, so that Vim knows how this file is ++ * encrypted when reading it back. */ + write_info.bw_buf = header; + write_info.bw_len = header_len; + write_info.bw_flags = FIO_NOCONVERT; +@@ -4769,9 +4694,11 @@ restore_backup: + mch_set_acl(wfname, acl); + #endif + #ifdef FEAT_CRYPT +- crypt_method_used = use_crypt_method; +- if (wb_flags & FIO_ENCRYPTED) +- crypt_pop_state(); ++ if (buf->b_cryptstate != NULL) ++ { ++ crypt_free_state(buf->b_cryptstate); ++ buf->b_cryptstate = NULL; ++ } + #endif + + +@@ -4924,10 +4851,7 @@ restore_backup: + #ifdef FEAT_CRYPT + if (wb_flags & FIO_ENCRYPTED) + { +- if (crypt_method_used == 1) +- STRCAT(IObuff, _("[blowfish]")); +- else +- STRCAT(IObuff, _("[crypted]")); ++ crypt_append_msg(buf); + c = TRUE; + } + #endif +@@ -5740,8 +5664,26 @@ buf_write_bytes(ip) + #endif /* FEAT_MBYTE */ + + #ifdef FEAT_CRYPT +- if (flags & FIO_ENCRYPTED) /* encrypt the data */ +- crypt_encode(buf, len, buf); ++ if (flags & FIO_ENCRYPTED) ++ { ++ /* Encrypt the data. Do it in-place if possible, otherwise use an ++ * allocated buffer. */ ++ if (crypt_works_inplace(ip->bw_buffer->b_cryptstate)) ++ { ++ crypt_encode_inplace(ip->bw_buffer->b_cryptstate, buf, len); ++ } ++ else ++ { ++ char_u *outbuf; ++ ++ len = crypt_encode_alloc(curbuf->b_cryptstate, buf, len, &outbuf); ++ if (len == 0) ++ return OK; /* Crypt layer is buffering, will flush later. */ ++ wlen = write_eintr(ip->bw_fd, outbuf, len); ++ vim_free(outbuf); ++ return (wlen < len) ? FAIL : OK; ++ } ++ } + #endif + + wlen = write_eintr(ip->bw_fd, buf, len); +diff -up vim74/src/globals.h.blowfish2 vim74/src/globals.h +--- vim74/src/globals.h.blowfish2 2017-09-05 14:47:33.909920425 +0200 ++++ vim74/src/globals.h 2017-09-05 14:47:34.950912022 +0200 +@@ -105,10 +105,6 @@ EXTERN int exec_from_reg INIT(= FALSE); + + EXTERN int screen_cleared INIT(= FALSE); /* screen has been cleared */ + +-#ifdef FEAT_CRYPT +-EXTERN int use_crypt_method INIT(= 0); +-#endif +- + /* + * When '$' is included in 'cpoptions' option set: + * When a change command is given that deletes only part of a line, a dollar +diff -up vim74/src/main.c.blowfish2 vim74/src/main.c +--- vim74/src/main.c.blowfish2 2017-09-05 14:47:34.571915081 +0200 ++++ vim74/src/main.c 2017-09-05 14:47:34.955911982 +0200 +@@ -845,8 +845,7 @@ vim_main2(int argc UNUSED, char **argv U + #ifdef FEAT_CRYPT + if (params.ask_for_key) + { +- (void)blowfish_self_test(); +- (void)get_crypt_key(TRUE, TRUE); ++ (void)crypt_get_key(TRUE, TRUE); + TIME_MSG("getting crypt key"); + } + #endif +diff -up vim74/src/Makefile.blowfish2 vim74/src/Makefile +--- vim74/src/Makefile.blowfish2 2017-09-05 14:47:34.847912854 +0200 ++++ vim74/src/Makefile 2017-09-05 14:47:34.956911974 +0200 +@@ -1427,6 +1427,8 @@ BASIC_SRC = \ + blowfish.c \ + buffer.c \ + charset.c \ ++ crypt.c \ ++ crypt_zip.c \ + diff.c \ + digraph.c \ + edit.c \ +@@ -1516,6 +1518,8 @@ OBJ_COMMON = \ + objects/buffer.o \ + objects/blowfish.o \ + objects/charset.o \ ++ objects/crypt.o \ ++ objects/crypt_zip.o \ + objects/diff.o \ + objects/digraph.o \ + objects/edit.o \ +@@ -1585,6 +1589,8 @@ PRO_AUTO = \ + blowfish.pro \ + buffer.pro \ + charset.pro \ ++ crypt.pro \ ++ crypt_zip.pro \ + diff.pro \ + digraph.pro \ + edit.pro \ +@@ -1745,10 +1751,11 @@ xxd/xxd$(EXEEXT): xxd/xxd.c + languages: + @if test -n "$(MAKEMO)" -a -f $(PODIR)/Makefile; then \ + cd $(PODIR); \ +- CC="$(CC)" $(MAKE) prefix=$(DESTDIR)$(prefix); \ ++ CC="$(CC)" $(MAKE) prefix=$(DESTDIR)$(prefix); \ + fi + -@if test -n "$(MAKEMO)" -a -f $(PODIR)/Makefile; then \ +- cd $(PODIR); CC="$(CC)" $(MAKE) prefix=$(DESTDIR)$(prefix) converted; \ ++ cd $(PODIR); \ ++ CC="$(CC)" $(MAKE) prefix=$(DESTDIR)$(prefix) converted; \ + fi + + # Update the *.po files for changes in the sources. Only run manually. +@@ -1874,6 +1881,12 @@ unittest unittests: $(UNITTEST_TARGETS) + + # Run individual test, assuming that Vim was already compiled. + test1 test2 test3 test4 test5 test6 test7 test8 test9 \ ++ test_breakindent \ ++ test_changelist \ ++ test_insertcount \ ++ test_listlbr \ ++ test_listlbr_utf8 \ ++ test_qf_title \ + test10 test11 test12 test13 test14 test15 test16 test17 test18 test19 \ + test20 test21 test22 test23 test24 test25 test26 test27 test28 test29 \ + test30 test31 test32 test33 test34 test35 test36 test37 test38 test39 \ +@@ -2494,6 +2507,12 @@ objects/buffer.o: buffer.c + objects/charset.o: charset.c + $(CCC) -o $@ charset.c + ++objects/crypt.o: crypt.c ++ $(CCC) -o $@ crypt.c ++ ++objects/crypt_zip.o: crypt_zip.c ++ $(CCC) -o $@ crypt_zip.c ++ + objects/diff.o: diff.c + $(CCC) -o $@ diff.c + +@@ -2843,6 +2862,14 @@ objects/charset.o: charset.c vim.h auto/ + ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \ + gui_beval.h proto/gui_beval.pro ex_cmds.h proto.h globals.h farsi.h \ + arabic.h ++objects/crypt.o: crypt.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \ ++ ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \ ++ gui_beval.h proto/gui_beval.pro ex_cmds.h proto.h globals.h farsi.h \ ++ arabic.h ++objects/crypt_zip.o: crypt_zip.c vim.h auto/config.h feature.h os_unix.h \ ++ auto/osdef.h ascii.h keymap.h term.h macros.h option.h structs.h \ ++ regexp.h gui.h gui_beval.h proto/gui_beval.pro ex_cmds.h proto.h \ ++ globals.h farsi.h arabic.h + objects/diff.o: diff.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \ + ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \ + gui_beval.h proto/gui_beval.pro ex_cmds.h proto.h globals.h farsi.h \ +diff -up vim74/src/memline.c.blowfish2 vim74/src/memline.c +--- vim74/src/memline.c.blowfish2 2017-09-05 14:47:34.217917939 +0200 ++++ vim74/src/memline.c 2017-09-05 14:47:34.957911966 +0200 +@@ -63,6 +63,15 @@ typedef struct pointer_entry PTR_EN; + #define BLOCK0_ID1 '0' /* block 0 id 1 */ + #define BLOCK0_ID1_C0 'c' /* block 0 id 1 'cm' 0 */ + #define BLOCK0_ID1_C1 'C' /* block 0 id 1 'cm' 1 */ ++#define BLOCK0_ID1_C2 'd' /* block 0 id 1 'cm' 2 */ ++ ++#if defined(FEAT_CRYPT) ++static int id1_codes[] = { ++ BLOCK0_ID1_C0, /* CRYPT_M_ZIP */ ++ BLOCK0_ID1_C1, /* CRYPT_M_BF */ ++ BLOCK0_ID1_C2, /* CRYPT_M_BF2 */ ++}; ++#endif + + /* + * pointer to a block, used in a pointer block +@@ -151,7 +160,7 @@ struct data_block + struct block0 + { + char_u b0_id[2]; /* id for block 0: BLOCK0_ID0 and BLOCK0_ID1, +- * BLOCK0_ID1_C0, BLOCK0_ID1_C1 */ ++ * BLOCK0_ID1_C0, BLOCK0_ID1_C1, etc. */ + char_u b0_version[10]; /* Vim version string */ + char_u b0_page_size[4];/* number of bytes per page */ + char_u b0_mtime[4]; /* last modification time of file */ +@@ -226,6 +235,7 @@ typedef enum { + } upd_block0_T; + + #ifdef FEAT_CRYPT ++static void ml_set_mfp_crypt __ARGS((buf_T *buf)); + static void ml_set_b0_crypt __ARGS((buf_T *buf, ZERO_BL *b0p)); + #endif + static int ml_check_b0_id __ARGS((ZERO_BL *b0p)); +@@ -256,7 +266,7 @@ static long char_to_long __ARGS((char_u + static char_u *make_percent_swname __ARGS((char_u *dir, char_u *name)); + #endif + #ifdef FEAT_CRYPT +-static void ml_crypt_prepare __ARGS((memfile_T *mfp, off_t offset, int reading)); ++static cryptstate_T *ml_crypt_prepare __ARGS((memfile_T *mfp, off_t offset, int reading)); + #endif + #ifdef FEAT_BYTEOFF + static void ml_updatechunk __ARGS((buf_T *buf, long line, long len, int updtype)); +@@ -356,8 +366,7 @@ ml_open(buf) + b0p->b0_hname[B0_HNAME_SIZE - 1] = NUL; + long_to_char(mch_get_pid(), b0p->b0_pid); + #ifdef FEAT_CRYPT +- if (*buf->b_p_key != NUL) +- ml_set_b0_crypt(buf, b0p); ++ ml_set_b0_crypt(buf, b0p); + #endif + } + +@@ -422,6 +431,25 @@ error: + + #if defined(FEAT_CRYPT) || defined(PROTO) + /* ++ * Prepare encryption for "buf" for the current key and method. ++ */ ++ static void ++ml_set_mfp_crypt(buf) ++ buf_T *buf; ++{ ++ if (*buf->b_p_key != NUL) ++ { ++ int method_nr = crypt_get_method_nr(buf); ++ ++ if (method_nr > CRYPT_M_ZIP) ++ { ++ /* Generate a seed and store it in the memfile. */ ++ sha2_seed(buf->b_ml.ml_mfp->mf_seed, MF_SEED_LEN, NULL, 0); ++ } ++ } ++} ++ ++/* + * Prepare encryption for "buf" with block 0 "b0p". + */ + static void +@@ -433,11 +461,11 @@ ml_set_b0_crypt(buf, b0p) + b0p->b0_id[1] = BLOCK0_ID1; + else + { +- if (get_crypt_method(buf) == 0) +- b0p->b0_id[1] = BLOCK0_ID1_C0; +- else ++ int method_nr = crypt_get_method_nr(buf); ++ ++ b0p->b0_id[1] = id1_codes[method_nr]; ++ if (method_nr > CRYPT_M_ZIP) + { +- b0p->b0_id[1] = BLOCK0_ID1_C1; + /* Generate a seed and store it in block 0 and in the memfile. */ + sha2_seed(&b0p->b0_seed, MF_SEED_LEN, NULL, 0); + mch_memmove(buf->b_ml.ml_mfp->mf_seed, &b0p->b0_seed, MF_SEED_LEN); +@@ -884,7 +912,8 @@ ml_check_b0_id(b0p) + if (b0p->b0_id[0] != BLOCK0_ID0 + || (b0p->b0_id[1] != BLOCK0_ID1 + && b0p->b0_id[1] != BLOCK0_ID1_C0 +- && b0p->b0_id[1] != BLOCK0_ID1_C1) ++ && b0p->b0_id[1] != BLOCK0_ID1_C1 ++ && b0p->b0_id[1] != BLOCK0_ID1_C2) + ) + return FAIL; + return OK; +@@ -903,8 +932,19 @@ ml_upd_block0(buf, what) + ZERO_BL *b0p; + + mfp = buf->b_ml.ml_mfp; +- if (mfp == NULL || (hp = mf_get(mfp, (blocknr_T)0, 1)) == NULL) ++ if (mfp == NULL) ++ return; ++ hp = mf_get(mfp, (blocknr_T)0, 1); ++ if (hp == NULL) ++ { ++#ifdef FEAT_CRYPT ++ /* Possibly update the seed in the memfile before there is a block0. */ ++ if (what == UB_CRYPT) ++ ml_set_mfp_crypt(buf); ++#endif + return; ++ } ++ + b0p = (ZERO_BL *)(hp->bh_data); + if (ml_check_b0_id(b0p) == FAIL) + EMSG(_("E304: ml_upd_block0(): Didn't get block 0??")); +@@ -1252,14 +1292,12 @@ ml_recover() + } + + #ifdef FEAT_CRYPT +- if (b0p->b0_id[1] == BLOCK0_ID1_C0) +- b0_cm = 0; +- else if (b0p->b0_id[1] == BLOCK0_ID1_C1) +- { +- b0_cm = 1; ++ for (i = 0; i < (int)(sizeof(id1_codes) / sizeof(int)); ++i) ++ if (id1_codes[i] == b0p->b0_id[1]) ++ b0_cm = i; ++ if (b0_cm > 0) + mch_memmove(mfp->mf_seed, &b0p->b0_seed, MF_SEED_LEN); +- } +- set_crypt_method(buf, b0_cm); ++ crypt_set_cm_option(buf, b0_cm < 0 ? 0 : b0_cm); + #else + if (b0p->b0_id[1] != BLOCK0_ID1) + { +@@ -1386,7 +1424,7 @@ ml_recover() + } + else + smsg((char_u *)_(need_key_msg), fname_used); +- buf->b_p_key = get_crypt_key(FALSE, FALSE); ++ buf->b_p_key = crypt_get_key(FALSE, FALSE); + if (buf->b_p_key == NULL) + buf->b_p_key = curbuf->b_p_key; + else if (*buf->b_p_key == NUL) +@@ -4813,6 +4851,7 @@ ml_encrypt_data(mfp, data, offset, size) + char_u *text_start; + char_u *new_data; + int text_len; ++ cryptstate_T *state; + + if (dp->db_id != DATA_ID) + return data; +@@ -4828,10 +4867,9 @@ ml_encrypt_data(mfp, data, offset, size) + mch_memmove(new_data, dp, head_end - (char_u *)dp); + + /* Encrypt the text. */ +- crypt_push_state(); +- ml_crypt_prepare(mfp, offset, FALSE); +- crypt_encode(text_start, text_len, new_data + dp->db_txt_start); +- crypt_pop_state(); ++ state = ml_crypt_prepare(mfp, offset, FALSE); ++ crypt_encode(state, text_start, text_len, new_data + dp->db_txt_start); ++ crypt_free_state(state); + + /* Clear the gap. */ + if (head_end < text_start) +@@ -4854,6 +4892,7 @@ ml_decrypt_data(mfp, data, offset, size) + char_u *head_end; + char_u *text_start; + int text_len; ++ cryptstate_T *state; + + if (dp->db_id == DATA_ID) + { +@@ -4866,17 +4905,17 @@ ml_decrypt_data(mfp, data, offset, size) + return; /* data was messed up */ + + /* Decrypt the text in place. */ +- crypt_push_state(); +- ml_crypt_prepare(mfp, offset, TRUE); +- crypt_decode(text_start, text_len); +- crypt_pop_state(); ++ state = ml_crypt_prepare(mfp, offset, TRUE); ++ crypt_decode_inplace(state, text_start, text_len); ++ crypt_free_state(state); + } + } + + /* + * Prepare for encryption/decryption, using the key, seed and offset. ++ * Return an allocated cryptstate_T *. + */ +- static void ++ static cryptstate_T * + ml_crypt_prepare(mfp, offset, reading) + memfile_T *mfp; + off_t offset; +@@ -4884,38 +4923,37 @@ ml_crypt_prepare(mfp, offset, reading) + { + buf_T *buf = mfp->mf_buffer; + char_u salt[50]; +- int method; ++ int method_nr; + char_u *key; + char_u *seed; + + if (reading && mfp->mf_old_key != NULL) + { + /* Reading back blocks with the previous key/method/seed. */ +- method = mfp->mf_old_cm; ++ method_nr = mfp->mf_old_cm; + key = mfp->mf_old_key; + seed = mfp->mf_old_seed; + } + else + { +- method = get_crypt_method(buf); ++ method_nr = crypt_get_method_nr(buf); + key = buf->b_p_key; + seed = mfp->mf_seed; + } + +- use_crypt_method = method; /* select pkzip or blowfish */ +- if (method == 0) ++ if (method_nr == CRYPT_M_ZIP) + { ++ /* For PKzip: Append the offset to the key, so that we use a different ++ * key for every block. */ + vim_snprintf((char *)salt, sizeof(salt), "%s%ld", key, (long)offset); +- crypt_init_keys(salt); +- } +- else +- { +- /* Using blowfish, add salt and seed. We use the byte offset of the +- * block for the salt. */ +- vim_snprintf((char *)salt, sizeof(salt), "%ld", (long)offset); +- bf_key_init(key, salt, (int)STRLEN(salt)); +- bf_ofb_init(seed, MF_SEED_LEN); ++ return crypt_create(method_nr, salt, NULL, 0, NULL, 0); + } ++ ++ /* Using blowfish or better: add salt and seed. We use the byte offset ++ * of the block for the salt. */ ++ vim_snprintf((char *)salt, sizeof(salt), "%ld", (long)offset); ++ return crypt_create(method_nr, key, salt, (int)STRLEN(salt), ++ seed, MF_SEED_LEN); + } + + #endif +diff -up vim74/src/misc2.c.blowfish2 vim74/src/misc2.c +--- vim74/src/misc2.c.blowfish2 2017-09-05 14:47:34.461915969 +0200 ++++ vim74/src/misc2.c 2017-09-05 14:47:34.959911949 +0200 +@@ -3803,322 +3803,6 @@ update_mouseshape(shape_idx) + #endif /* CURSOR_SHAPE */ + + +-#ifdef FEAT_CRYPT +-/* +- * Optional encryption support. +- * Mohsin Ahmed, mosh@sasi.com, 98-09-24 +- * Based on zip/crypt sources. +- * +- * NOTE FOR USA: Since 2000 exporting this code from the USA is allowed to +- * most countries. There are a few exceptions, but that still should not be a +- * problem since this code was originally created in Europe and India. +- * +- * Blowfish addition originally made by Mohsin Ahmed, +- * http://www.cs.albany.edu/~mosh 2010-03-14 +- * Based on blowfish by Bruce Schneier (http://www.schneier.com/blowfish.html) +- * and sha256 by Christophe Devine. +- */ +- +-/* from zip.h */ +- +-typedef unsigned short ush; /* unsigned 16-bit value */ +-typedef unsigned long ulg; /* unsigned 32-bit value */ +- +-static void make_crc_tab __ARGS((void)); +- +-static ulg crc_32_tab[256]; +- +-/* +- * Fill the CRC table. +- */ +- static void +-make_crc_tab() +-{ +- ulg s,t,v; +- static int done = FALSE; +- +- if (done) +- return; +- for (t = 0; t < 256; t++) +- { +- v = t; +- for (s = 0; s < 8; s++) +- v = (v >> 1) ^ ((v & 1) * (ulg)0xedb88320L); +- crc_32_tab[t] = v; +- } +- done = TRUE; +-} +- +-#define CRC32(c, b) (crc_32_tab[((int)(c) ^ (b)) & 0xff] ^ ((c) >> 8)) +- +-static ulg keys[3]; /* keys defining the pseudo-random sequence */ +- +-/* +- * Return the next byte in the pseudo-random sequence. +- */ +-#define DECRYPT_BYTE_ZIP(t) { \ +- ush temp; \ +- \ +- temp = (ush)keys[2] | 2; \ +- t = (int)(((unsigned)(temp * (temp ^ 1U)) >> 8) & 0xff); \ +-} +- +-/* +- * Update the encryption keys with the next byte of plain text. +- */ +-#define UPDATE_KEYS_ZIP(c) { \ +- keys[0] = CRC32(keys[0], (c)); \ +- keys[1] += keys[0] & 0xff; \ +- keys[1] = keys[1] * 134775813L + 1; \ +- keys[2] = CRC32(keys[2], (int)(keys[1] >> 24)); \ +-} +- +-static int crypt_busy = 0; +-static ulg saved_keys[3]; +-static int saved_crypt_method; +- +-/* +- * Return int value for crypt method string: +- * 0 for "zip", the old method. Also for any non-valid value. +- * 1 for "blowfish". +- */ +- int +-crypt_method_from_string(s) +- char_u *s; +-{ +- return *s == 'b' ? 1 : 0; +-} +- +-/* +- * Get the crypt method for buffer "buf" as a number. +- */ +- int +-get_crypt_method(buf) +- buf_T *buf; +-{ +- return crypt_method_from_string(*buf->b_p_cm == NUL ? p_cm : buf->b_p_cm); +-} +- +-/* +- * Set the crypt method for buffer "buf" to "method" using the int value as +- * returned by crypt_method_from_string(). +- */ +- void +-set_crypt_method(buf, method) +- buf_T *buf; +- int method; +-{ +- free_string_option(buf->b_p_cm); +- buf->b_p_cm = vim_strsave((char_u *)(method == 0 ? "zip" : "blowfish")); +-} +- +-/* +- * Prepare for initializing encryption. If already doing encryption then save +- * the state. +- * Must always be called symmetrically with crypt_pop_state(). +- */ +- void +-crypt_push_state() +-{ +- if (crypt_busy == 1) +- { +- /* save the state */ +- if (use_crypt_method == 0) +- { +- saved_keys[0] = keys[0]; +- saved_keys[1] = keys[1]; +- saved_keys[2] = keys[2]; +- } +- else +- bf_crypt_save(); +- saved_crypt_method = use_crypt_method; +- } +- else if (crypt_busy > 1) +- EMSG2(_(e_intern2), "crypt_push_state()"); +- ++crypt_busy; +-} +- +-/* +- * End encryption. If doing encryption before crypt_push_state() then restore +- * the saved state. +- * Must always be called symmetrically with crypt_push_state(). +- */ +- void +-crypt_pop_state() +-{ +- --crypt_busy; +- if (crypt_busy == 1) +- { +- use_crypt_method = saved_crypt_method; +- if (use_crypt_method == 0) +- { +- keys[0] = saved_keys[0]; +- keys[1] = saved_keys[1]; +- keys[2] = saved_keys[2]; +- } +- else +- bf_crypt_restore(); +- } +-} +- +-/* +- * Encrypt "from[len]" into "to[len]". +- * "from" and "to" can be equal to encrypt in place. +- */ +- void +-crypt_encode(from, len, to) +- char_u *from; +- size_t len; +- char_u *to; +-{ +- size_t i; +- int ztemp, t; +- +- if (use_crypt_method == 0) +- for (i = 0; i < len; ++i) +- { +- ztemp = from[i]; +- DECRYPT_BYTE_ZIP(t); +- UPDATE_KEYS_ZIP(ztemp); +- to[i] = t ^ ztemp; +- } +- else +- bf_crypt_encode(from, len, to); +-} +- +-/* +- * Decrypt "ptr[len]" in place. +- */ +- void +-crypt_decode(ptr, len) +- char_u *ptr; +- long len; +-{ +- char_u *p; +- +- if (use_crypt_method == 0) +- for (p = ptr; p < ptr + len; ++p) +- { +- ush temp; +- +- temp = (ush)keys[2] | 2; +- temp = (int)(((unsigned)(temp * (temp ^ 1U)) >> 8) & 0xff); +- UPDATE_KEYS_ZIP(*p ^= temp); +- } +- else +- bf_crypt_decode(ptr, len); +-} +- +-/* +- * Initialize the encryption keys and the random header according to +- * the given password. +- * If "passwd" is NULL or empty, don't do anything. +- */ +- void +-crypt_init_keys(passwd) +- char_u *passwd; /* password string with which to modify keys */ +-{ +- if (passwd != NULL && *passwd != NUL) +- { +- if (use_crypt_method == 0) +- { +- char_u *p; +- +- make_crc_tab(); +- keys[0] = 305419896L; +- keys[1] = 591751049L; +- keys[2] = 878082192L; +- for (p = passwd; *p!= NUL; ++p) +- { +- UPDATE_KEYS_ZIP((int)*p); +- } +- } +- else +- bf_crypt_init_keys(passwd); +- } +-} +- +-/* +- * Free an allocated crypt key. Clear the text to make sure it doesn't stay +- * in memory anywhere. +- */ +- void +-free_crypt_key(key) +- char_u *key; +-{ +- char_u *p; +- +- if (key != NULL) +- { +- for (p = key; *p != NUL; ++p) +- *p = 0; +- vim_free(key); +- } +-} +- +-/* +- * Ask the user for a crypt key. +- * When "store" is TRUE, the new key is stored in the 'key' option, and the +- * 'key' option value is returned: Don't free it. +- * When "store" is FALSE, the typed key is returned in allocated memory. +- * Returns NULL on failure. +- */ +- char_u * +-get_crypt_key(store, twice) +- int store; +- int twice; /* Ask for the key twice. */ +-{ +- char_u *p1, *p2 = NULL; +- int round; +- +- for (round = 0; ; ++round) +- { +- cmdline_star = TRUE; +- cmdline_row = msg_row; +- p1 = getcmdline_prompt(NUL, round == 0 +- ? (char_u *)_("Enter encryption key: ") +- : (char_u *)_("Enter same key again: "), 0, EXPAND_NOTHING, +- NULL); +- cmdline_star = FALSE; +- +- if (p1 == NULL) +- break; +- +- if (round == twice) +- { +- if (p2 != NULL && STRCMP(p1, p2) != 0) +- { +- MSG(_("Keys don't match!")); +- free_crypt_key(p1); +- free_crypt_key(p2); +- p2 = NULL; +- round = -1; /* do it again */ +- continue; +- } +- +- if (store) +- { +- set_option_value((char_u *)"key", 0L, p1, OPT_LOCAL); +- free_crypt_key(p1); +- p1 = curbuf->b_p_key; +- } +- break; +- } +- p2 = p1; +- } +- +- /* since the user typed this, no need to wait for return */ +- if (msg_didout) +- msg_putchar('\n'); +- need_wait_return = FALSE; +- msg_didout = FALSE; +- +- free_crypt_key(p2); +- return p1; +-} +- +-#endif /* FEAT_CRYPT */ +- + /* TODO: make some #ifdef for this */ + /*--------[ file searching ]-------------------------------------------------*/ + /* +@@ -6588,8 +6272,23 @@ put_time(fd, the_time) + FILE *fd; + time_t the_time; + { ++ char_u buf[8]; ++ ++ time_to_bytes(the_time, buf); ++ fwrite(buf, (size_t)8, (size_t)1, fd); ++} ++ ++/* ++ * Write time_t to "buf[8]". ++ */ ++ void ++time_to_bytes(the_time, buf) ++ time_t the_time; ++ char_u *buf; ++{ + int c; + int i; ++ int bi = 0; + time_t wtime = the_time; + + /* time_t can be up to 8 bytes in size, more than long_u, thus we +@@ -6603,7 +6302,7 @@ put_time(fd, the_time) + { + if (i + 1 > (int)sizeof(time_t)) + /* ">>" doesn't work well when shifting more bits than avail */ +- putc(0, fd); ++ buf[bi++] = 0; + else + { + #if defined(SIZEOF_TIME_T) && SIZEOF_TIME_T > 4 +@@ -6611,7 +6310,7 @@ put_time(fd, the_time) + #else + c = (int)((long_u)wtime >> (i * 8)); + #endif +- putc(c, fd); ++ buf[bi++] = c; + } + } + } +diff -up vim74/src/option.c.blowfish2 vim74/src/option.c +--- vim74/src/option.c.blowfish2 2017-09-05 14:47:34.899912434 +0200 ++++ vim74/src/option.c 2017-09-05 14:47:34.961911933 +0200 +@@ -2969,7 +2969,7 @@ static char *(p_bg_values[]) = {"light", + static char *(p_nf_values[]) = {"octal", "hex", "alpha", NULL}; + static char *(p_ff_values[]) = {FF_UNIX, FF_DOS, FF_MAC, NULL}; + #ifdef FEAT_CRYPT +-static char *(p_cm_values[]) = {"zip", "blowfish", NULL}; ++static char *(p_cm_values[]) = {"zip", "blowfish", "blowfish2", NULL}; + #endif + #ifdef FEAT_CMDL_COMPL + static char *(p_wop_values[]) = {"tagfile", NULL}; +@@ -6156,7 +6156,7 @@ did_set_string_option(opt_idx, varp, new + # endif + if (STRCMP(curbuf->b_p_key, oldval) != 0) + /* Need to update the swapfile. */ +- ml_set_crypt_key(curbuf, oldval, get_crypt_method(curbuf)); ++ ml_set_crypt_key(curbuf, oldval, crypt_get_method_nr(curbuf)); + } + + else if (gvarp == &p_cm) +@@ -6167,7 +6167,7 @@ did_set_string_option(opt_idx, varp, new + p = p_cm; + if (check_opt_strings(p, p_cm_values, TRUE) != OK) + errmsg = e_invarg; +- else if (get_crypt_method(curbuf) > 0 && blowfish_self_test() == FAIL) ++ else if (crypt_self_test() == FAIL) + errmsg = e_invarg; + else + { +@@ -6179,6 +6179,14 @@ did_set_string_option(opt_idx, varp, new + p_cm = vim_strsave((char_u *)"zip"); + new_value_alloced = TRUE; + } ++ /* When using ":set cm=name" the local value is going to be empty. ++ * Do that here, otherwise the crypt functions will still use the ++ * local value. */ ++ if ((opt_flags & (OPT_LOCAL | OPT_GLOBAL)) == 0) ++ { ++ free_string_option(curbuf->b_p_cm); ++ curbuf->b_p_cm = empty_option; ++ } + + /* Need to update the swapfile when the effective method changed. + * Set "s" to the effective old value, "p" to the effective new +@@ -6193,7 +6201,7 @@ did_set_string_option(opt_idx, varp, new + p = curbuf->b_p_cm; + if (STRCMP(s, p) != 0) + ml_set_crypt_key(curbuf, curbuf->b_p_key, +- crypt_method_from_string(s)); ++ crypt_method_nr_from_name(s)); + + /* If the global value changes need to update the swapfile for all + * buffers using that value. */ +@@ -6204,7 +6212,7 @@ did_set_string_option(opt_idx, varp, new + for (buf = firstbuf; buf != NULL; buf = buf->b_next) + if (buf != curbuf && *buf->b_p_cm == NUL) + ml_set_crypt_key(buf, buf->b_p_key, +- crypt_method_from_string(oldval)); ++ crypt_method_nr_from_name(oldval)); + } + } + } +diff -up vim74/src/proto/blowfish.pro.blowfish2 vim74/src/proto/blowfish.pro +--- vim74/src/proto/blowfish.pro.blowfish2 2013-08-10 13:37:06.000000000 +0200 ++++ vim74/src/proto/blowfish.pro 2017-09-05 14:47:34.964911909 +0200 +@@ -1,10 +1,6 @@ + /* blowfish.c */ +-void bf_key_init __ARGS((char_u *password, char_u *salt, int salt_len)); +-void bf_ofb_init __ARGS((char_u *iv, int iv_len)); +-void bf_crypt_encode __ARGS((char_u *from, size_t len, char_u *to)); +-void bf_crypt_decode __ARGS((char_u *ptr, long len)); +-void bf_crypt_init_keys __ARGS((char_u *passwd)); +-void bf_crypt_save __ARGS((void)); +-void bf_crypt_restore __ARGS((void)); ++void crypt_blowfish_encode __ARGS((cryptstate_T *state, char_u *from, size_t len, char_u *to)); ++void crypt_blowfish_decode __ARGS((cryptstate_T *state, char_u *from, size_t len, char_u *to)); ++void crypt_blowfish_init __ARGS((cryptstate_T *state, char_u *key, char_u *salt, int salt_len, char_u *seed, int seed_len)); + int blowfish_self_test __ARGS((void)); + /* vim: set ft=c : */ +diff -up vim74/src/proto/crypt.pro.blowfish2 vim74/src/proto/crypt.pro +--- vim74/src/proto/crypt.pro.blowfish2 2017-09-05 14:47:34.965911901 +0200 ++++ vim74/src/proto/crypt.pro 2017-09-05 14:47:34.965911901 +0200 +@@ -0,0 +1,24 @@ ++/* crypt.c */ ++int crypt_method_nr_from_name __ARGS((char_u *name)); ++int crypt_method_nr_from_magic __ARGS((char *ptr, int len)); ++int crypt_works_inplace __ARGS((cryptstate_T *state)); ++int crypt_get_method_nr __ARGS((buf_T *buf)); ++int crypt_whole_undofile __ARGS((int method_nr)); ++int crypt_get_header_len __ARGS((int method_nr)); ++void crypt_set_cm_option __ARGS((buf_T *buf, int method_nr)); ++int crypt_self_test __ARGS((void)); ++cryptstate_T *crypt_create __ARGS((int method_nr, char_u *key, char_u *salt, int salt_len, char_u *seed, int seed_len)); ++cryptstate_T *crypt_create_from_header __ARGS((int method_nr, char_u *key, char_u *header)); ++cryptstate_T *crypt_create_from_file __ARGS((FILE *fp, char_u *key)); ++cryptstate_T *crypt_create_for_writing __ARGS((int method_nr, char_u *key, char_u **header, int *header_len)); ++void crypt_free_state __ARGS((cryptstate_T *state)); ++long crypt_encode_alloc __ARGS((cryptstate_T *state, char_u *from, size_t len, char_u **newptr)); ++long crypt_decode_alloc __ARGS((cryptstate_T *state, char_u *ptr, long len, char_u **newptr)); ++void crypt_encode __ARGS((cryptstate_T *state, char_u *from, size_t len, char_u *to)); ++void crypt_decode __ARGS((cryptstate_T *state, char_u *from, size_t len, char_u *to)); ++void crypt_encode_inplace __ARGS((cryptstate_T *state, char_u *buf, size_t len)); ++void crypt_decode_inplace __ARGS((cryptstate_T *state, char_u *buf, size_t len)); ++void crypt_free_key __ARGS((char_u *key)); ++char_u *crypt_get_key __ARGS((int store, int twice)); ++void crypt_append_msg __ARGS((buf_T *buf)); ++/* vim: set ft=c : */ +diff -up vim74/src/proto/crypt_zip.pro.blowfish2 vim74/src/proto/crypt_zip.pro +--- vim74/src/proto/crypt_zip.pro.blowfish2 2017-09-05 14:47:34.965911901 +0200 ++++ vim74/src/proto/crypt_zip.pro 2017-09-05 14:47:34.965911901 +0200 +@@ -0,0 +1,5 @@ ++/* crypt_zip.c */ ++void crypt_zip_init __ARGS((cryptstate_T *state, char_u *key, char_u *salt, int salt_len, char_u *seed, int seed_len)); ++void crypt_zip_encode __ARGS((cryptstate_T *state, char_u *from, size_t len, char_u *to)); ++void crypt_zip_decode __ARGS((cryptstate_T *state, char_u *from, size_t len, char_u *to)); ++/* vim: set ft=c : */ +diff -up vim74/src/proto/fileio.pro.blowfish2 vim74/src/proto/fileio.pro +--- vim74/src/proto/fileio.pro.blowfish2 2013-08-10 13:37:11.000000000 +0200 ++++ vim74/src/proto/fileio.pro 2017-09-05 14:47:34.965911901 +0200 +@@ -4,8 +4,6 @@ int readfile __ARGS((char_u *fname, char + int prep_exarg __ARGS((exarg_T *eap, buf_T *buf)); + void set_file_options __ARGS((int set_options, exarg_T *eap)); + void set_forced_fenc __ARGS((exarg_T *eap)); +-int prepare_crypt_read __ARGS((FILE *fp)); +-char_u *prepare_crypt_write __ARGS((buf_T *buf, int *lenp)); + int check_file_readonly __ARGS((char_u *fname, int perm)); + 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)); + void msg_add_fname __ARGS((buf_T *buf, char_u *fname)); +diff -up vim74/src/proto.h.blowfish2 vim74/src/proto.h +--- vim74/src/proto.h.blowfish2 2013-02-26 14:18:19.000000000 +0100 ++++ vim74/src/proto.h 2017-09-05 14:47:34.966911893 +0200 +@@ -70,6 +70,8 @@ extern int _stricoll __ARGS((char *a, ch + + # ifdef FEAT_CRYPT + # include "blowfish.pro" ++# include "crypt.pro" ++# include "crypt_zip.pro" + # endif + # include "buffer.pro" + # include "charset.pro" +diff -up vim74/src/proto/misc2.pro.blowfish2 vim74/src/proto/misc2.pro +--- vim74/src/proto/misc2.pro.blowfish2 2013-08-10 13:37:20.000000000 +0200 ++++ vim74/src/proto/misc2.pro 2017-09-05 14:47:34.966911893 +0200 +@@ -84,16 +84,6 @@ int illegal_slash __ARGS((char *name)); + char_u *parse_shape_opt __ARGS((int what)); + int get_shape_idx __ARGS((int mouse)); + void update_mouseshape __ARGS((int shape_idx)); +-int crypt_method_from_string __ARGS((char_u *s)); +-int get_crypt_method __ARGS((buf_T *buf)); +-void set_crypt_method __ARGS((buf_T *buf, int method)); +-void crypt_push_state __ARGS((void)); +-void crypt_pop_state __ARGS((void)); +-void crypt_encode __ARGS((char_u *from, size_t len, char_u *to)); +-void crypt_decode __ARGS((char_u *ptr, long len)); +-void crypt_init_keys __ARGS((char_u *passwd)); +-void free_crypt_key __ARGS((char_u *key)); +-char_u *get_crypt_key __ARGS((int store, int twice)); + void *vim_findfile_init __ARGS((char_u *path, char_u *filename, char_u *stopdirs, int level, int free_visited, int find_what, void *search_ctx_arg, int tagfile, char_u *rel_fname)); + char_u *vim_findfile_stopdir __ARGS((char_u *buf)); + void vim_findfile_cleanup __ARGS((void *ctx)); +@@ -116,5 +106,6 @@ time_t get8ctime __ARGS((FILE *fd)); + char_u *read_string __ARGS((FILE *fd, int cnt)); + int put_bytes __ARGS((FILE *fd, long_u nr, int len)); + void put_time __ARGS((FILE *fd, time_t the_time)); ++void time_to_bytes __ARGS((time_t the_time, char_u *buf)); + int has_non_ascii __ARGS((char_u *s)); + /* vim: set ft=c : */ +diff -up vim74/src/structs.h.blowfish2 vim74/src/structs.h +--- vim74/src/structs.h.blowfish2 2017-09-05 14:47:34.839912918 +0200 ++++ vim74/src/structs.h 2017-09-05 14:47:34.967911885 +0200 +@@ -1240,6 +1240,24 @@ typedef struct { + } syn_time_T; + #endif + ++#ifdef FEAT_CRYPT ++/* ++ * Structure to hold the type of encryption and the state of encryption or ++ * decryption. ++ */ ++typedef struct { ++ int method_nr; ++ void *method_state; /* method-specific state information */ ++} cryptstate_T; ++ ++/* values for method_nr */ ++# define CRYPT_M_ZIP 0 ++# define CRYPT_M_BF 1 ++# define CRYPT_M_BF2 2 ++# define CRYPT_M_COUNT 3 /* number of crypt methods */ ++#endif ++ ++ + /* + * These are items normally related to a buffer. But when using ":ownsyntax" + * a window may have its own instance. +@@ -1765,7 +1783,12 @@ struct file_buffer + int b_was_netbeans_file;/* TRUE if b_netbeans_file was once set */ + #endif + +-}; ++#ifdef FEAT_CRYPT ++ cryptstate_T *b_cryptstate; /* Encryption state while reading or writing ++ * the file. NULL when not using encryption. */ ++#endif ++ ++}; /* file_buffer */ + + + #ifdef FEAT_DIFF +diff -up vim74/src/testdir/test72.in.blowfish2 vim74/src/testdir/test72.in +--- vim74/src/testdir/test72.in.blowfish2 2012-01-04 19:04:17.000000000 +0100 ++++ vim74/src/testdir/test72.in 2017-09-05 15:23:47.590060199 +0200 +@@ -4,6 +4,7 @@ undo-able pieces. Do that by setting 'u + + STARTTEST + :so small.vim ++:set belloff=all + :" + :" Test 'undofile': first a simple one-line change. + :set nocompatible viminfo+=nviminfo visualbell +@@ -25,7 +26,6 @@ u:.w! test.out + :set undofile + :bwipe! + :e Xtestfile +-:" TODO: this beeps + u:.w >>test.out + :" + :" Test 'undofile', add 10 lines, delete 6 lines, undo 3 +@@ -81,7 +81,8 @@ uu:w >>test.out + :" + :" With encryption, cryptmethod=blowfish + :e! Xtestfile +-:set undofile cm=blowfish ++rubbish ++:set undofile cm=blowfish ff& + ggdGijan + feb + mar +@@ -104,8 +105,38 @@ u:.w >>test.out + u:.w >>test.out + u:.w >>test.out + :" ++:" With encryption, cryptmethod=blowfish2 ++:e! Xtestfile ++rubbish ++:set undofile cm=blowfish2 ff& ++ggdGijan ++feb ++mar ++apr ++jun:set ul=100 ++kk0ifoo :set ul=100 ++dd:set ul=100 ++ibar :set ul=100 ++:X ++foo2bar ++foo2bar ++:w! ++:bwipe! ++:e Xtestfile ++foo2bar ++:set key= ++/bar ++:.w >>test.out ++u:.w >>test.out ++u:.w >>test.out ++u:.w >>test.out ++:" + :" Rename the undo file so that it gets cleaned up. +-:call rename(".Xtestfile.un~", "Xtestundo") ++:if has("vms") ++: call rename("_un_Xtestfile", "Xtestundo") ++:else ++: call rename(".Xtestfile.un~", "Xtestundo") ++:endif + :qa! + ENDTEST + +diff -up vim74/src/testdir/test72.ok.blowfish2 vim74/src/testdir/test72.ok +--- vim74/src/testdir/test72.ok.blowfish2 2012-01-04 19:04:17.000000000 +0100 ++++ vim74/src/testdir/test72.ok 2017-09-05 15:23:47.596060147 +0200 +@@ -25,3 +25,7 @@ bar apr + apr + foo mar + mar ++bar apr ++apr ++foo mar ++mar +diff -up vim74/src/undo.c.blowfish2 vim74/src/undo.c +--- vim74/src/undo.c.blowfish2 2017-09-05 14:47:34.740913717 +0200 ++++ vim74/src/undo.c 2017-09-05 14:47:34.973911836 +0200 +@@ -81,8 +81,25 @@ + #define UH_MAGIC 0x18dade /* value for uh_magic when in use */ + #define UE_MAGIC 0xabc123 /* value for ue_magic when in use */ + ++/* Size of buffer used for encryption. */ ++#define CRYPT_BUF_SIZE 8192 ++ + #include "vim.h" + ++/* Structure passed around between functions. ++ * Avoids passing cryptstate_T when encryption not available. */ ++typedef struct { ++ buf_T *bi_buf; ++ FILE *bi_fp; ++#ifdef FEAT_CRYPT ++ cryptstate_T *bi_state; ++ char_u *bi_buffer; /* CRYPT_BUF_SIZE, NULL when not buffering */ ++ size_t bi_used; /* bytes written to/read from bi_buffer */ ++ size_t bi_avail; /* bytes available in bi_buffer */ ++#endif ++} bufinfo_T; ++ ++ + static long get_undolevel __ARGS((void)); + static void u_unch_branch __ARGS((u_header_T *uhp)); + static u_entry_T *u_get_headentry __ARGS((void)); +@@ -98,18 +115,26 @@ static void u_freeentry __ARGS((u_entry_ + #ifdef FEAT_PERSISTENT_UNDO + static void corruption_error __ARGS((char *mesg, char_u *file_name)); + static void u_free_uhp __ARGS((u_header_T *uhp)); +-static size_t fwrite_crypt __ARGS((buf_T *buf UNUSED, char_u *ptr, size_t len, FILE *fp)); +-static char_u *read_string_decrypt __ARGS((buf_T *buf UNUSED, FILE *fd, int len)); +-static int serialize_header __ARGS((FILE *fp, buf_T *buf, char_u *hash)); +-static int serialize_uhp __ARGS((FILE *fp, buf_T *buf, u_header_T *uhp)); +-static u_header_T *unserialize_uhp __ARGS((FILE *fp, char_u *file_name)); +-static int serialize_uep __ARGS((FILE *fp, buf_T *buf, u_entry_T *uep)); +-static u_entry_T *unserialize_uep __ARGS((FILE *fp, int *error, char_u *file_name)); +-static void serialize_pos __ARGS((pos_T pos, FILE *fp)); +-static void unserialize_pos __ARGS((pos_T *pos, FILE *fp)); +-static void serialize_visualinfo __ARGS((visualinfo_T *info, FILE *fp)); +-static void unserialize_visualinfo __ARGS((visualinfo_T *info, FILE *fp)); +-static void put_header_ptr __ARGS((FILE *fp, u_header_T *uhp)); ++static int undo_write __ARGS((bufinfo_T *bi, char_u *ptr, size_t len)); ++static int undo_flush __ARGS((bufinfo_T *bi)); ++static int fwrite_crypt __ARGS((bufinfo_T *bi, char_u *ptr, size_t len)); ++static int undo_write_bytes __ARGS((bufinfo_T *bi, long_u nr, int len)); ++static void put_header_ptr __ARGS((bufinfo_T *bi, u_header_T *uhp)); ++static int undo_read_4c __ARGS((bufinfo_T *bi)); ++static int undo_read_2c __ARGS((bufinfo_T *bi)); ++static int undo_read_byte __ARGS((bufinfo_T *bi)); ++static time_t undo_read_time __ARGS((bufinfo_T *bi)); ++static int undo_read __ARGS((bufinfo_T *bi, char_u *buffer, size_t size)); ++static char_u *read_string_decrypt __ARGS((bufinfo_T *bi, int len)); ++static int serialize_header __ARGS((bufinfo_T *bi, char_u *hash)); ++static int serialize_uhp __ARGS((bufinfo_T *bi, u_header_T *uhp)); ++static u_header_T *unserialize_uhp __ARGS((bufinfo_T *bi, char_u *file_name)); ++static int serialize_uep __ARGS((bufinfo_T *bi, u_entry_T *uep)); ++static u_entry_T *unserialize_uep __ARGS((bufinfo_T *bi, int *error, char_u *file_name)); ++static void serialize_pos __ARGS((bufinfo_T *bi, pos_T pos)); ++static void unserialize_pos __ARGS((bufinfo_T *bi, pos_T *pos)); ++static void serialize_visualinfo __ARGS((bufinfo_T *bi, visualinfo_T *info)); ++static void unserialize_visualinfo __ARGS((bufinfo_T *bi, visualinfo_T *info)); + #endif + + #define U_ALLOC_LINE(size) lalloc((long_u)(size), FALSE) +@@ -850,68 +875,294 @@ u_free_uhp(uhp) + } + + /* +- * Like fwrite() but crypt the bytes when 'key' is set. +- * Returns 1 if successful. ++ * Write a sequence of bytes to the undo file. ++ * Buffers and encrypts as needed. ++ * Returns OK or FAIL. + */ +- static size_t +-fwrite_crypt(buf, ptr, len, fp) +- buf_T *buf UNUSED; ++ static int ++undo_write(bi, ptr, len) ++ bufinfo_T *bi; ++ char_u *ptr; ++ size_t len; ++{ ++#ifdef FEAT_CRYPT ++ if (bi->bi_buffer != NULL) ++ { ++ size_t len_todo = len; ++ char_u *p = ptr; ++ ++ while (bi->bi_used + len_todo >= CRYPT_BUF_SIZE) ++ { ++ size_t n = CRYPT_BUF_SIZE - bi->bi_used; ++ ++ mch_memmove(bi->bi_buffer + bi->bi_used, p, n); ++ len_todo -= n; ++ p += n; ++ bi->bi_used = CRYPT_BUF_SIZE; ++ if (undo_flush(bi) == FAIL) ++ return FAIL; ++ } ++ if (len_todo > 0) ++ { ++ mch_memmove(bi->bi_buffer + bi->bi_used, p, len_todo); ++ bi->bi_used += len_todo; ++ } ++ return OK; ++ } ++#endif ++ if (fwrite(ptr, len, (size_t)1, bi->bi_fp) != 1) ++ return FAIL; ++ return OK; ++} ++ ++#ifdef FEAT_CRYPT ++ static int ++undo_flush(bi) ++ bufinfo_T *bi; ++{ ++ if (bi->bi_buffer != NULL && bi->bi_state != NULL && bi->bi_used > 0) ++ { ++ crypt_encode_inplace(bi->bi_state, bi->bi_buffer, bi->bi_used); ++ if (fwrite(bi->bi_buffer, bi->bi_used, (size_t)1, bi->bi_fp) != 1) ++ return FAIL; ++ bi->bi_used = 0; ++ } ++ return OK; ++} ++#endif ++ ++/* ++ * Write "ptr[len]" and crypt the bytes when needed. ++ * Returns OK or FAIL. ++ */ ++ static int ++fwrite_crypt(bi, ptr, len) ++ bufinfo_T *bi; + char_u *ptr; + size_t len; +- FILE *fp; + { + #ifdef FEAT_CRYPT + char_u *copy; + char_u small_buf[100]; + size_t i; + +- if (*buf->b_p_key == NUL) +- return fwrite(ptr, len, (size_t)1, fp); +- if (len < 100) +- copy = small_buf; /* no malloc()/free() for short strings */ +- else ++ if (bi->bi_state != NULL && bi->bi_buffer == NULL) + { +- copy = lalloc(len, FALSE); +- if (copy == NULL) +- return 0; +- } +- crypt_encode(ptr, len, copy); +- i = fwrite(copy, len, (size_t)1, fp); +- if (copy != small_buf) +- vim_free(copy); +- return i; +-#else +- return fwrite(ptr, len, (size_t)1, fp); ++ /* crypting every piece of text separately */ ++ if (len < 100) ++ copy = small_buf; /* no malloc()/free() for short strings */ ++ else ++ { ++ copy = lalloc(len, FALSE); ++ if (copy == NULL) ++ return 0; ++ } ++ crypt_encode(bi->bi_state, ptr, len, copy); ++ i = fwrite(copy, len, (size_t)1, bi->bi_fp); ++ if (copy != small_buf) ++ vim_free(copy); ++ return i == 1 ? OK : FAIL; ++ } + #endif ++ return undo_write(bi, ptr, len); + } + + /* +- * Read a string of length "len" from "fd". +- * When 'key' is set decrypt the bytes. ++ * Write a number, MSB first, in "len" bytes. ++ * Must match with undo_read_?c() functions. ++ * Returns OK or FAIL. + */ +- static char_u * +-read_string_decrypt(buf, fd, len) +- buf_T *buf UNUSED; +- FILE *fd; ++ static int ++undo_write_bytes(bi, nr, len) ++ bufinfo_T *bi; ++ long_u nr; + int len; + { +- char_u *ptr; ++ char_u buf[8]; ++ int i; ++ int bufi = 0; ++ ++ for (i = len - 1; i >= 0; --i) ++ buf[bufi++] = nr >> (i * 8); ++ return undo_write(bi, buf, (size_t)len); ++} + +- ptr = read_string(fd, len); ++/* ++ * Write the pointer to an undo header. Instead of writing the pointer itself ++ * we use the sequence number of the header. This is converted back to ++ * pointers when reading. */ ++ static void ++put_header_ptr(bi, uhp) ++ bufinfo_T *bi; ++ u_header_T *uhp; ++{ ++ undo_write_bytes(bi, (long_u)(uhp != NULL ? uhp->uh_seq : 0), 4); ++} ++ ++ static int ++undo_read_4c(bi) ++ bufinfo_T *bi; ++{ + #ifdef FEAT_CRYPT +- if (ptr != NULL && *buf->b_p_key != NUL) +- crypt_decode(ptr, len); ++ if (bi->bi_buffer != NULL) ++ { ++ char_u buf[4]; ++ int n; ++ ++ undo_read(bi, buf, (size_t)4); ++ n = (buf[0] << 24) + (buf[1] << 16) + (buf[2] << 8) + buf[3]; ++ return n; ++ } + #endif ++ return get4c(bi->bi_fp); ++} ++ ++ static int ++undo_read_2c(bi) ++ bufinfo_T *bi; ++{ ++#ifdef FEAT_CRYPT ++ if (bi->bi_buffer != NULL) ++ { ++ char_u buf[2]; ++ int n; ++ ++ undo_read(bi, buf, (size_t)2); ++ n = (buf[0] << 8) + buf[1]; ++ return n; ++ } ++#endif ++ return get2c(bi->bi_fp); ++} ++ ++ static int ++undo_read_byte(bi) ++ bufinfo_T *bi; ++{ ++#ifdef FEAT_CRYPT ++ if (bi->bi_buffer != NULL) ++ { ++ char_u buf[1]; ++ ++ undo_read(bi, buf, (size_t)1); ++ return buf[0]; ++ } ++#endif ++ return getc(bi->bi_fp); ++} ++ ++ static time_t ++undo_read_time(bi) ++ bufinfo_T *bi; ++{ ++#ifdef FEAT_CRYPT ++ if (bi->bi_buffer != NULL) ++ { ++ char_u buf[8]; ++ time_t n = 0; ++ int i; ++ ++ undo_read(bi, buf, (size_t)8); ++ for (i = 0; i < 8; ++i) ++ n = (n << 8) + buf[i]; ++ return n; ++ } ++#endif ++ return get8ctime(bi->bi_fp); ++} ++ ++/* ++ * Read "buffer[size]" from the undo file. ++ * Return OK or FAIL. ++ */ ++ static int ++undo_read(bi, buffer, size) ++ bufinfo_T *bi; ++ char_u *buffer; ++ size_t size; ++{ ++#ifdef FEAT_CRYPT ++ if (bi->bi_buffer != NULL) ++ { ++ int size_todo = size; ++ char_u *p = buffer; ++ ++ while (size_todo > 0) ++ { ++ size_t n; ++ ++ if (bi->bi_used >= bi->bi_avail) ++ { ++ n = fread(bi->bi_buffer, 1, (size_t)CRYPT_BUF_SIZE, bi->bi_fp); ++ if (n <= 0) ++ { ++ /* Error may be checked for only later. Fill with zeros, ++ * so that the reader won't use garbage. */ ++ vim_memset(p, 0, size_todo); ++ return FAIL; ++ } ++ bi->bi_avail = n; ++ bi->bi_used = 0; ++ crypt_decode_inplace(bi->bi_state, bi->bi_buffer, bi->bi_avail); ++ } ++ n = size_todo; ++ if (n > bi->bi_avail - bi->bi_used) ++ n = bi->bi_avail - bi->bi_used; ++ mch_memmove(p, bi->bi_buffer + bi->bi_used, n); ++ bi->bi_used += n; ++ size_todo -= n; ++ p += n; ++ } ++ return OK; ++ } ++#endif ++ if (fread(buffer, (size_t)size, 1, bi->bi_fp) != 1) ++ return FAIL; ++ return OK; ++} ++ ++/* ++ * Read a string of length "len" from "bi->bi_fd". ++ * "len" can be zero to allocate an empty line. ++ * Decrypt the bytes if needed. ++ * Append a NUL. ++ * Returns a pointer to allocated memory or NULL for failure. ++ */ ++ static char_u * ++read_string_decrypt(bi, len) ++ bufinfo_T *bi; ++ int len; ++{ ++ char_u *ptr = alloc((unsigned)len + 1); ++ ++ if (ptr != NULL) ++ { ++ if (len > 0 && undo_read(bi, ptr, len) == FAIL) ++ { ++ vim_free(ptr); ++ return NULL; ++ } ++ ptr[len] = NUL; ++#ifdef FEAT_CRYPT ++ if (bi->bi_state != NULL && bi->bi_buffer == NULL) ++ crypt_decode_inplace(bi->bi_state, ptr, len); ++#endif ++ } + return ptr; + } + ++/* ++ * Writes the (not encrypted) header and initializes encryption if needed. ++ */ + static int +-serialize_header(fp, buf, hash) +- FILE *fp; +- buf_T *buf; ++serialize_header(bi, hash) ++ bufinfo_T *bi; + char_u *hash; + { +- int len; ++ int len; ++ buf_T *buf = bi->bi_buf; ++ FILE *fp = bi->bi_fp; ++ char_u time_buf[8]; + + /* Start writing, first the magic marker and undo info version. */ + if (fwrite(UF_START_MAGIC, (size_t)UF_START_MAGIC_LEN, (size_t)1, fp) != 1) +@@ -925,117 +1176,124 @@ serialize_header(fp, buf, hash) + char_u *header; + int header_len; + +- put_bytes(fp, (long_u)UF_VERSION_CRYPT, 2); +- header = prepare_crypt_write(buf, &header_len); +- if (header == NULL) ++ undo_write_bytes(bi, (long_u)UF_VERSION_CRYPT, 2); ++ bi->bi_state = crypt_create_for_writing(crypt_get_method_nr(buf), ++ buf->b_p_key, &header, &header_len); ++ if (bi->bi_state == NULL) + return FAIL; + len = (int)fwrite(header, (size_t)header_len, (size_t)1, fp); + vim_free(header); + if (len != 1) + { +- crypt_pop_state(); ++ crypt_free_state(bi->bi_state); ++ bi->bi_state = NULL; + return FAIL; + } ++ ++ if (crypt_whole_undofile(crypt_get_method_nr(buf))) ++ { ++ bi->bi_buffer = alloc(CRYPT_BUF_SIZE); ++ if (bi->bi_buffer == NULL) ++ { ++ crypt_free_state(bi->bi_state); ++ bi->bi_state = NULL; ++ return FAIL; ++ } ++ bi->bi_used = 0; ++ } + } + else + #endif +- put_bytes(fp, (long_u)UF_VERSION, 2); ++ undo_write_bytes(bi, (long_u)UF_VERSION, 2); + + + /* Write a hash of the buffer text, so that we can verify it is still the + * same when reading the buffer text. */ +- if (fwrite(hash, (size_t)UNDO_HASH_SIZE, (size_t)1, fp) != 1) ++ if (undo_write(bi, hash, (size_t)UNDO_HASH_SIZE) == FAIL) + return FAIL; + + /* buffer-specific data */ +- put_bytes(fp, (long_u)buf->b_ml.ml_line_count, 4); ++ undo_write_bytes(bi, (long_u)buf->b_ml.ml_line_count, 4); + len = buf->b_u_line_ptr != NULL ? (int)STRLEN(buf->b_u_line_ptr) : 0; +- put_bytes(fp, (long_u)len, 4); +- if (len > 0 && fwrite_crypt(buf, buf->b_u_line_ptr, (size_t)len, fp) != 1) ++ undo_write_bytes(bi, (long_u)len, 4); ++ if (len > 0 && fwrite_crypt(bi, buf->b_u_line_ptr, (size_t)len) == FAIL) + return FAIL; +- put_bytes(fp, (long_u)buf->b_u_line_lnum, 4); +- put_bytes(fp, (long_u)buf->b_u_line_colnr, 4); ++ undo_write_bytes(bi, (long_u)buf->b_u_line_lnum, 4); ++ undo_write_bytes(bi, (long_u)buf->b_u_line_colnr, 4); + + /* Undo structures header data */ +- put_header_ptr(fp, buf->b_u_oldhead); +- put_header_ptr(fp, buf->b_u_newhead); +- put_header_ptr(fp, buf->b_u_curhead); +- +- put_bytes(fp, (long_u)buf->b_u_numhead, 4); +- put_bytes(fp, (long_u)buf->b_u_seq_last, 4); +- put_bytes(fp, (long_u)buf->b_u_seq_cur, 4); +- put_time(fp, buf->b_u_time_cur); ++ put_header_ptr(bi, buf->b_u_oldhead); ++ put_header_ptr(bi, buf->b_u_newhead); ++ put_header_ptr(bi, buf->b_u_curhead); ++ ++ undo_write_bytes(bi, (long_u)buf->b_u_numhead, 4); ++ undo_write_bytes(bi, (long_u)buf->b_u_seq_last, 4); ++ undo_write_bytes(bi, (long_u)buf->b_u_seq_cur, 4); ++ time_to_bytes(buf->b_u_time_cur, time_buf); ++ undo_write(bi, time_buf, 8); + + /* Optional fields. */ +- putc(4, fp); +- putc(UF_LAST_SAVE_NR, fp); +- put_bytes(fp, (long_u)buf->b_u_save_nr_last, 4); ++ undo_write_bytes(bi, 4, 1); ++ undo_write_bytes(bi, UF_LAST_SAVE_NR, 1); ++ undo_write_bytes(bi, (long_u)buf->b_u_save_nr_last, 4); + +- putc(0, fp); /* end marker */ ++ undo_write_bytes(bi, 0, 1); /* end marker */ + + return OK; + } + + static int +-serialize_uhp(fp, buf, uhp) +- FILE *fp; +- buf_T *buf; ++serialize_uhp(bi, uhp) ++ bufinfo_T *bi; + u_header_T *uhp; + { + int i; + u_entry_T *uep; ++ char_u time_buf[8]; + +- if (put_bytes(fp, (long_u)UF_HEADER_MAGIC, 2) == FAIL) ++ if (undo_write_bytes(bi, (long_u)UF_HEADER_MAGIC, 2) == FAIL) + return FAIL; + +- put_header_ptr(fp, uhp->uh_next.ptr); +- put_header_ptr(fp, uhp->uh_prev.ptr); +- put_header_ptr(fp, uhp->uh_alt_next.ptr); +- put_header_ptr(fp, uhp->uh_alt_prev.ptr); +- put_bytes(fp, uhp->uh_seq, 4); +- serialize_pos(uhp->uh_cursor, fp); ++ put_header_ptr(bi, uhp->uh_next.ptr); ++ put_header_ptr(bi, uhp->uh_prev.ptr); ++ put_header_ptr(bi, uhp->uh_alt_next.ptr); ++ put_header_ptr(bi, uhp->uh_alt_prev.ptr); ++ undo_write_bytes(bi, uhp->uh_seq, 4); ++ serialize_pos(bi, uhp->uh_cursor); + #ifdef FEAT_VIRTUALEDIT +- put_bytes(fp, (long_u)uhp->uh_cursor_vcol, 4); ++ undo_write_bytes(bi, (long_u)uhp->uh_cursor_vcol, 4); + #else +- put_bytes(fp, (long_u)0, 4); ++ undo_write_bytes(bi, (long_u)0, 4); + #endif +- put_bytes(fp, (long_u)uhp->uh_flags, 2); ++ undo_write_bytes(bi, (long_u)uhp->uh_flags, 2); + /* Assume NMARKS will stay the same. */ + for (i = 0; i < NMARKS; ++i) +- serialize_pos(uhp->uh_namedm[i], fp); +-#ifdef FEAT_VISUAL +- serialize_visualinfo(&uhp->uh_visual, fp); +-#else +- { +- visualinfo_T info; +- +- memset(&info, 0, sizeof(visualinfo_T)); +- serialize_visualinfo(&info, fp); +- } +-#endif +- put_time(fp, uhp->uh_time); ++ serialize_pos(bi, uhp->uh_namedm[i]); ++ serialize_visualinfo(bi, &uhp->uh_visual); ++ time_to_bytes(uhp->uh_time, time_buf); ++ undo_write(bi, time_buf, 8); + + /* Optional fields. */ +- putc(4, fp); +- putc(UHP_SAVE_NR, fp); +- put_bytes(fp, (long_u)uhp->uh_save_nr, 4); ++ undo_write_bytes(bi, 4, 1); ++ undo_write_bytes(bi, UHP_SAVE_NR, 1); ++ undo_write_bytes(bi, (long_u)uhp->uh_save_nr, 4); + +- putc(0, fp); /* end marker */ ++ undo_write_bytes(bi, 0, 1); /* end marker */ + + /* Write all the entries. */ + for (uep = uhp->uh_entry; uep != NULL; uep = uep->ue_next) + { +- put_bytes(fp, (long_u)UF_ENTRY_MAGIC, 2); +- if (serialize_uep(fp, buf, uep) == FAIL) ++ undo_write_bytes(bi, (long_u)UF_ENTRY_MAGIC, 2); ++ if (serialize_uep(bi, uep) == FAIL) + return FAIL; + } +- put_bytes(fp, (long_u)UF_ENTRY_END_MAGIC, 2); ++ undo_write_bytes(bi, (long_u)UF_ENTRY_END_MAGIC, 2); + return OK; + } + + static u_header_T * +-unserialize_uhp(fp, file_name) +- FILE *fp; ++unserialize_uhp(bi, file_name) ++ bufinfo_T *bi; + char_u *file_name; + { + u_header_T *uhp; +@@ -1051,63 +1309,56 @@ unserialize_uhp(fp, file_name) + #ifdef U_DEBUG + uhp->uh_magic = UH_MAGIC; + #endif +- uhp->uh_next.seq = get4c(fp); +- uhp->uh_prev.seq = get4c(fp); +- uhp->uh_alt_next.seq = get4c(fp); +- uhp->uh_alt_prev.seq = get4c(fp); +- uhp->uh_seq = get4c(fp); ++ uhp->uh_next.seq = undo_read_4c(bi); ++ uhp->uh_prev.seq = undo_read_4c(bi); ++ uhp->uh_alt_next.seq = undo_read_4c(bi); ++ uhp->uh_alt_prev.seq = undo_read_4c(bi); ++ uhp->uh_seq = undo_read_4c(bi); + if (uhp->uh_seq <= 0) + { + corruption_error("uh_seq", file_name); + vim_free(uhp); + return NULL; + } +- unserialize_pos(&uhp->uh_cursor, fp); ++ unserialize_pos(bi, &uhp->uh_cursor); + #ifdef FEAT_VIRTUALEDIT +- uhp->uh_cursor_vcol = get4c(fp); ++ uhp->uh_cursor_vcol = undo_read_4c(bi); + #else +- (void)get4c(fp); ++ (void)undo_read_4c(bi); + #endif +- uhp->uh_flags = get2c(fp); ++ uhp->uh_flags = undo_read_2c(bi); + for (i = 0; i < NMARKS; ++i) +- unserialize_pos(&uhp->uh_namedm[i], fp); +-#ifdef FEAT_VISUAL +- unserialize_visualinfo(&uhp->uh_visual, fp); +-#else +- { +- visualinfo_T info; +- unserialize_visualinfo(&info, fp); +- } +-#endif +- uhp->uh_time = get8ctime(fp); ++ unserialize_pos(bi, &uhp->uh_namedm[i]); ++ unserialize_visualinfo(bi, &uhp->uh_visual); ++ uhp->uh_time = undo_read_time(bi); + + /* Optional fields. */ + for (;;) + { +- int len = getc(fp); ++ int len = undo_read_byte(bi); + int what; + + if (len == 0) + break; +- what = getc(fp); ++ what = undo_read_byte(bi); + switch (what) + { + case UHP_SAVE_NR: +- uhp->uh_save_nr = get4c(fp); ++ uhp->uh_save_nr = undo_read_4c(bi); + break; + default: + /* field not supported, skip */ + while (--len >= 0) +- (void)getc(fp); ++ (void)undo_read_byte(bi); + } + } + + /* Unserialize the uep list. */ + last_uep = NULL; +- while ((c = get2c(fp)) == UF_ENTRY_MAGIC) ++ while ((c = undo_read_2c(bi)) == UF_ENTRY_MAGIC) + { + error = FALSE; +- uep = unserialize_uep(fp, &error, file_name); ++ uep = unserialize_uep(bi, &error, file_name); + if (last_uep == NULL) + uhp->uh_entry = uep; + else +@@ -1130,35 +1381,34 @@ unserialize_uhp(fp, file_name) + } + + /* +- * Serialize "uep" to "fp". ++ * Serialize "uep". + */ + static int +-serialize_uep(fp, buf, uep) +- FILE *fp; +- buf_T *buf; ++serialize_uep(bi, uep) ++ bufinfo_T *bi; + u_entry_T *uep; + { + int i; + size_t len; + +- put_bytes(fp, (long_u)uep->ue_top, 4); +- put_bytes(fp, (long_u)uep->ue_bot, 4); +- put_bytes(fp, (long_u)uep->ue_lcount, 4); +- put_bytes(fp, (long_u)uep->ue_size, 4); ++ undo_write_bytes(bi, (long_u)uep->ue_top, 4); ++ undo_write_bytes(bi, (long_u)uep->ue_bot, 4); ++ undo_write_bytes(bi, (long_u)uep->ue_lcount, 4); ++ undo_write_bytes(bi, (long_u)uep->ue_size, 4); + for (i = 0; i < uep->ue_size; ++i) + { + len = STRLEN(uep->ue_array[i]); +- if (put_bytes(fp, (long_u)len, 4) == FAIL) ++ if (undo_write_bytes(bi, (long_u)len, 4) == FAIL) + return FAIL; +- if (len > 0 && fwrite_crypt(buf, uep->ue_array[i], len, fp) != 1) ++ if (len > 0 && fwrite_crypt(bi, uep->ue_array[i], len) == FAIL) + return FAIL; + } + return OK; + } + + static u_entry_T * +-unserialize_uep(fp, error, file_name) +- FILE *fp; ++unserialize_uep(bi, error, file_name) ++ bufinfo_T *bi; + int *error; + char_u *file_name; + { +@@ -1175,10 +1425,10 @@ unserialize_uep(fp, error, file_name) + #ifdef U_DEBUG + uep->ue_magic = UE_MAGIC; + #endif +- uep->ue_top = get4c(fp); +- uep->ue_bot = get4c(fp); +- uep->ue_lcount = get4c(fp); +- uep->ue_size = get4c(fp); ++ uep->ue_top = undo_read_4c(bi); ++ uep->ue_bot = undo_read_4c(bi); ++ uep->ue_lcount = undo_read_4c(bi); ++ uep->ue_size = undo_read_4c(bi); + if (uep->ue_size > 0) + { + array = (char_u **)U_ALLOC_LINE(sizeof(char_u *) * uep->ue_size); +@@ -1195,9 +1445,9 @@ unserialize_uep(fp, error, file_name) + + for (i = 0; i < uep->ue_size; ++i) + { +- line_len = get4c(fp); ++ line_len = undo_read_4c(bi); + if (line_len >= 0) +- line = read_string_decrypt(curbuf, fp, line_len); ++ line = read_string_decrypt(bi, line_len); + else + { + line = NULL; +@@ -1214,83 +1464,71 @@ unserialize_uep(fp, error, file_name) + } + + /* +- * Serialize "pos" to "fp". ++ * Serialize "pos". + */ + static void +-serialize_pos(pos, fp) ++serialize_pos(bi, pos) ++ bufinfo_T *bi; + pos_T pos; +- FILE *fp; + { +- put_bytes(fp, (long_u)pos.lnum, 4); +- put_bytes(fp, (long_u)pos.col, 4); ++ undo_write_bytes(bi, (long_u)pos.lnum, 4); ++ undo_write_bytes(bi, (long_u)pos.col, 4); + #ifdef FEAT_VIRTUALEDIT +- put_bytes(fp, (long_u)pos.coladd, 4); ++ undo_write_bytes(bi, (long_u)pos.coladd, 4); + #else +- put_bytes(fp, (long_u)0, 4); ++ undo_write_bytes(bi, (long_u)0, 4); + #endif + } + + /* +- * Unserialize the pos_T at the current position in fp. ++ * Unserialize the pos_T at the current position. + */ + static void +-unserialize_pos(pos, fp) ++unserialize_pos(bi, pos) ++ bufinfo_T *bi; + pos_T *pos; +- FILE *fp; + { +- pos->lnum = get4c(fp); ++ pos->lnum = undo_read_4c(bi); + if (pos->lnum < 0) + pos->lnum = 0; +- pos->col = get4c(fp); ++ pos->col = undo_read_4c(bi); + if (pos->col < 0) + pos->col = 0; + #ifdef FEAT_VIRTUALEDIT +- pos->coladd = get4c(fp); ++ pos->coladd = undo_read_4c(bi); + if (pos->coladd < 0) + pos->coladd = 0; + #else +- (void)get4c(fp); ++ (void)undo_read_4c(bi); + #endif + } + + /* +- * Serialize "info" to "fp". ++ * Serialize "info". + */ + static void +-serialize_visualinfo(info, fp) ++serialize_visualinfo(bi, info) ++ bufinfo_T *bi; + visualinfo_T *info; +- FILE *fp; + { +- serialize_pos(info->vi_start, fp); +- serialize_pos(info->vi_end, fp); +- put_bytes(fp, (long_u)info->vi_mode, 4); +- put_bytes(fp, (long_u)info->vi_curswant, 4); ++ serialize_pos(bi, info->vi_start); ++ serialize_pos(bi, info->vi_end); ++ undo_write_bytes(bi, (long_u)info->vi_mode, 4); ++ undo_write_bytes(bi, (long_u)info->vi_curswant, 4); + } + + /* +- * Unserialize the visualinfo_T at the current position in fp. ++ * Unserialize the visualinfo_T at the current position. + */ + static void +-unserialize_visualinfo(info, fp) ++unserialize_visualinfo(bi, info) ++ bufinfo_T *bi; + visualinfo_T *info; +- FILE *fp; +-{ +- unserialize_pos(&info->vi_start, fp); +- unserialize_pos(&info->vi_end, fp); +- info->vi_mode = get4c(fp); +- info->vi_curswant = get4c(fp); +-} +- +-/* +- * Write the pointer to an undo header. Instead of writing the pointer itself +- * we use the sequence number of the header. This is converted back to +- * pointers when reading. */ +- static void +-put_header_ptr(fp, uhp) +- FILE *fp; +- u_header_T *uhp; + { +- put_bytes(fp, (long_u)(uhp != NULL ? uhp->uh_seq : 0), 4); ++ unserialize_pos(bi, &info->vi_start); ++ unserialize_pos(bi, &info->vi_end); ++ info->vi_mode = undo_read_4c(bi); ++ info->vi_curswant = undo_read_4c(bi); + } + + /* +@@ -1324,9 +1562,9 @@ u_write_undo(name, forceit, buf, hash) + struct stat st_old; + struct stat st_new; + #endif +-#ifdef FEAT_CRYPT +- int do_crypt = FALSE; +-#endif ++ bufinfo_T bi; ++ ++ vim_memset(&bi, 0, sizeof(bi)); + + if (name == NULL) + { +@@ -1481,14 +1719,12 @@ u_write_undo(name, forceit, buf, hash) + u_sync(TRUE); + + /* +- * Write the header. ++ * Write the header. Initializes encryption, if enabled. + */ +- if (serialize_header(fp, buf, hash) == FAIL) ++ bi.bi_buf = buf; ++ bi.bi_fp = fp; ++ if (serialize_header(&bi, hash) == FAIL) + goto write_error; +-#ifdef FEAT_CRYPT +- if (*buf->b_p_key != NUL) +- do_crypt = TRUE; +-#endif + + /* + * Iteratively serialize UHPs and their UEPs from the top down. +@@ -1504,7 +1740,7 @@ u_write_undo(name, forceit, buf, hash) + #ifdef U_DEBUG + ++headers_written; + #endif +- if (serialize_uhp(fp, buf, uhp) == FAIL) ++ if (serialize_uhp(&bi, uhp) == FAIL) + goto write_error; + } + +@@ -1523,7 +1759,7 @@ u_write_undo(name, forceit, buf, hash) + uhp = uhp->uh_next.ptr; + } + +- if (put_bytes(fp, (long_u)UF_HEADER_END_MAGIC, 2) == OK) ++ if (undo_write_bytes(&bi, (long_u)UF_HEADER_END_MAGIC, 2) == OK) + write_ok = TRUE; + #ifdef U_DEBUG + if (headers_written != buf->b_u_numhead) +@@ -1533,6 +1769,11 @@ u_write_undo(name, forceit, buf, hash) + } + #endif + ++#ifdef FEAT_CRYPT ++ if (bi.bi_state != NULL && undo_flush(&bi) == FAIL) ++ write_ok = FALSE; ++#endif ++ + write_error: + fclose(fp); + if (!write_ok) +@@ -1558,8 +1799,9 @@ write_error: + + theend: + #ifdef FEAT_CRYPT +- if (do_crypt) +- crypt_pop_state(); ++ if (bi.bi_state != NULL) ++ crypt_free_state(bi.bi_state); ++ vim_free(bi.bi_buffer); + #endif + if (file_name != name) + vim_free(file_name); +@@ -1605,10 +1847,9 @@ u_read_undo(name, hash, orig_name) + struct stat st_orig; + struct stat st_undo; + #endif +-#ifdef FEAT_CRYPT +- int do_decrypt = FALSE; +-#endif ++ bufinfo_T bi; + ++ vim_memset(&bi, 0, sizeof(bi)); + if (name == NULL) + { + file_name = u_get_undo_file_name(curbuf->b_ffname, TRUE); +@@ -1651,6 +1892,8 @@ u_read_undo(name, hash, orig_name) + EMSG2(_("E822: Cannot open undo file for reading: %s"), file_name); + goto error; + } ++ bi.bi_buf = curbuf; ++ bi.bi_fp = fp; + + /* + * Read the undo file header. +@@ -1671,12 +1914,24 @@ u_read_undo(name, hash, orig_name) + file_name); + goto error; + } +- if (prepare_crypt_read(fp) == FAIL) ++ bi.bi_state = crypt_create_from_file(fp, curbuf->b_p_key); ++ if (bi.bi_state == NULL) + { + EMSG2(_("E826: Undo file decryption failed: %s"), file_name); + goto error; + } +- do_decrypt = TRUE; ++ if (crypt_whole_undofile(bi.bi_state->method_nr)) ++ { ++ bi.bi_buffer = alloc(CRYPT_BUF_SIZE); ++ if (bi.bi_buffer == NULL) ++ { ++ crypt_free_state(bi.bi_state); ++ bi.bi_state = NULL; ++ goto error; ++ } ++ bi.bi_avail = 0; ++ bi.bi_used = 0; ++ } + #else + EMSG2(_("E827: Undo file is encrypted: %s"), file_name); + goto error; +@@ -1688,12 +1943,12 @@ u_read_undo(name, hash, orig_name) + goto error; + } + +- if (fread(read_hash, UNDO_HASH_SIZE, 1, fp) != 1) ++ if (undo_read(&bi, read_hash, (size_t)UNDO_HASH_SIZE) == FAIL) + { + corruption_error("hash", file_name); + goto error; + } +- line_count = (linenr_T)get4c(fp); ++ line_count = (linenr_T)undo_read_4c(&bi); + if (memcmp(hash, read_hash, UNDO_HASH_SIZE) != 0 + || line_count != curbuf->b_ml.ml_line_count) + { +@@ -1710,13 +1965,13 @@ u_read_undo(name, hash, orig_name) + } + + /* Read undo data for "U" command. */ +- str_len = get4c(fp); ++ str_len = undo_read_4c(&bi); + if (str_len < 0) + goto error; + if (str_len > 0) +- line_ptr = read_string_decrypt(curbuf, fp, str_len); +- line_lnum = (linenr_T)get4c(fp); +- line_colnr = (colnr_T)get4c(fp); ++ line_ptr = read_string_decrypt(&bi, str_len); ++ line_lnum = (linenr_T)undo_read_4c(&bi); ++ line_colnr = (colnr_T)undo_read_4c(&bi); + if (line_lnum < 0 || line_colnr < 0) + { + corruption_error("line lnum/col", file_name); +@@ -1724,32 +1979,32 @@ u_read_undo(name, hash, orig_name) + } + + /* Begin general undo data */ +- old_header_seq = get4c(fp); +- new_header_seq = get4c(fp); +- cur_header_seq = get4c(fp); +- num_head = get4c(fp); +- seq_last = get4c(fp); +- seq_cur = get4c(fp); +- seq_time = get8ctime(fp); ++ old_header_seq = undo_read_4c(&bi); ++ new_header_seq = undo_read_4c(&bi); ++ cur_header_seq = undo_read_4c(&bi); ++ num_head = undo_read_4c(&bi); ++ seq_last = undo_read_4c(&bi); ++ seq_cur = undo_read_4c(&bi); ++ seq_time = undo_read_time(&bi); + + /* Optional header fields. */ + for (;;) + { +- int len = getc(fp); ++ int len = undo_read_byte(&bi); + int what; + + if (len == 0 || len == EOF) + break; +- what = getc(fp); ++ what = undo_read_byte(&bi); + switch (what) + { + case UF_LAST_SAVE_NR: +- last_save_nr = get4c(fp); ++ last_save_nr = undo_read_4c(&bi); + break; + default: + /* field not supported, skip */ + while (--len >= 0) +- (void)getc(fp); ++ (void)undo_read_byte(&bi); + } + } + +@@ -1765,7 +2020,7 @@ u_read_undo(name, hash, orig_name) + goto error; + } + +- while ((c = get2c(fp)) == UF_HEADER_MAGIC) ++ while ((c = undo_read_2c(&bi)) == UF_HEADER_MAGIC) + { + if (num_read_uhps >= num_head) + { +@@ -1773,7 +2028,7 @@ u_read_undo(name, hash, orig_name) + goto error; + } + +- uhp = unserialize_uhp(fp, file_name); ++ uhp = unserialize_uhp(&bi, file_name); + if (uhp == NULL) + goto error; + uhp_table[num_read_uhps++] = uhp; +@@ -1905,8 +2160,9 @@ error: + + theend: + #ifdef FEAT_CRYPT +- if (do_decrypt) +- crypt_pop_state(); ++ if (bi.bi_state != NULL) ++ crypt_free_state(bi.bi_state); ++ vim_free(bi.bi_buffer); + #endif + if (fp != NULL) + fclose(fp); +diff -up vim74/src/version.c.blowfish2 vim74/src/version.c +--- vim74/src/version.c.blowfish2 2017-09-05 14:47:34.768913491 +0200 ++++ vim74/src/version.c 2017-09-05 14:47:34.973911836 +0200 +@@ -739,6 +739,14 @@ static char *(features[]) = + static int included_patches[] = + { /* Add new patch number below this line */ + /**/ ++ 1099, ++/**/ ++ 403, ++/**/ ++ 402, ++/**/ ++ 399, ++/**/ + 160, + /**/ + 159, diff --git a/SOURCES/vim-7.4-c++11.patch b/SOURCES/vim-7.4-c++11.patch new file mode 100644 index 0000000..91268b0 --- /dev/null +++ b/SOURCES/vim-7.4-c++11.patch @@ -0,0 +1,114 @@ +diff -up vim74/runtime/syntax/cpp.vim.c++11 vim74/runtime/syntax/cpp.vim +--- vim74/runtime/syntax/cpp.vim.c++11 2017-08-23 17:49:00.722250142 +0200 ++++ vim74/runtime/syntax/cpp.vim 2017-08-23 17:49:29.132979711 +0200 +@@ -1,29 +1,23 @@ + " Vim syntax file + " Language: C++ +-" Current Maintainer: vim-jp (https://github.com/vim-jp/cpp-vim) ++" Current Maintainer: vim-jp (https://github.com/vim-jp/vim-cpp) + " Previous Maintainer: Ken Shan +-" Last Change: 2012 Jun 14 ++" Last Change: 2017 Jun 05 + +-" For version 5.x: Clear all syntax items +-" For version 6.x: Quit when a syntax file was already loaded +-if version < 600 +- syntax clear +-elseif exists("b:current_syntax") ++" quit when a syntax file was already loaded ++if exists("b:current_syntax") + finish + endif + + " Read the C syntax to start with +-if version < 600 +- so :p:h/c.vim +-else +- runtime! syntax/c.vim +- unlet b:current_syntax +-endif ++runtime! syntax/c.vim ++unlet b:current_syntax + + " C++ extensions + syn keyword cppStatement new delete this friend using + syn keyword cppAccess public protected private +-syn keyword cppType inline virtual explicit export bool wchar_t ++syn keyword cppModifier inline virtual explicit export ++syn keyword cppType bool wchar_t + syn keyword cppExceptions throw try catch + syn keyword cppOperator operator typeid + syn keyword cppOperator and bitor or xor compl bitand and_eq or_eq xor_eq not not_eq +@@ -32,38 +26,51 @@ syn match cppCast "\<\(const\|static\|d + syn keyword cppStorageClass mutable + syn keyword cppStructure class typename template namespace + syn keyword cppBoolean true false ++syn keyword cppConstant __cplusplus + + " C++ 11 extensions + if !exists("cpp_no_cpp11") +- syn keyword cppType override final ++ syn keyword cppModifier override final ++ syn keyword cppType nullptr_t auto + syn keyword cppExceptions noexcept +- syn keyword cppStorageClass constexpr decltype ++ syn keyword cppStorageClass constexpr decltype thread_local + syn keyword cppConstant nullptr ++ syn keyword cppConstant ATOMIC_FLAG_INIT ATOMIC_VAR_INIT ++ syn keyword cppConstant ATOMIC_BOOL_LOCK_FREE ATOMIC_CHAR_LOCK_FREE ++ syn keyword cppConstant ATOMIC_CHAR16_T_LOCK_FREE ATOMIC_CHAR32_T_LOCK_FREE ++ syn keyword cppConstant ATOMIC_WCHAR_T_LOCK_FREE ATOMIC_SHORT_LOCK_FREE ++ syn keyword cppConstant ATOMIC_INT_LOCK_FREE ATOMIC_LONG_LOCK_FREE ++ syn keyword cppConstant ATOMIC_LLONG_LOCK_FREE ATOMIC_POINTER_LOCK_FREE ++ syn region cppRawString matchgroup=cppRawStringDelimiter start=+\%(u8\|[uLU]\)\=R"\z([[:alnum:]_{}[\]#<>%:;.?*\+\-/\^&|~!=,"']\{,16}\)(+ end=+)\z1"+ contains=@Spell ++endif ++ ++" C++ 14 extensions ++if !exists("cpp_no_cpp14") ++ syn case ignore ++ syn match cppNumber display "\<0b[01]\('\=[01]\+\)*\(u\=l\{0,2}\|ll\=u\)\>" ++ syn match cppNumber display "\<[1-9]\('\=\d\+\)*\(u\=l\{0,2}\|ll\=u\)\>" contains=cFloat ++ syn match cppNumber display "\<0x\x\('\=\x\+\)*\(u\=l\{0,2}\|ll\=u\)\>" ++ syn case match + endif + + " The minimum and maximum operators in GNU C++ + syn match cppMinMax "[<>]?" + + " Default highlighting +-if version >= 508 || !exists("did_cpp_syntax_inits") +- if version < 508 +- let did_cpp_syntax_inits = 1 +- command -nargs=+ HiLink hi link +- else +- command -nargs=+ HiLink hi def link +- endif +- HiLink cppAccess cppStatement +- HiLink cppCast cppStatement +- HiLink cppExceptions Exception +- HiLink cppOperator Operator +- HiLink cppStatement Statement +- HiLink cppType Type +- HiLink cppStorageClass StorageClass +- HiLink cppStructure Structure +- HiLink cppBoolean Boolean +- HiLink cppConstant Constant +- delcommand HiLink +-endif ++hi def link cppAccess cppStatement ++hi def link cppCast cppStatement ++hi def link cppExceptions Exception ++hi def link cppOperator Operator ++hi def link cppStatement Statement ++hi def link cppModifier Type ++hi def link cppType Type ++hi def link cppStorageClass StorageClass ++hi def link cppStructure Structure ++hi def link cppBoolean Boolean ++hi def link cppConstant Constant ++hi def link cppRawStringDelimiter Delimiter ++hi def link cppRawString String ++hi def link cppNumber Number + + let b:current_syntax = "cpp" + diff --git a/SOURCES/vim-7.4-fstabsyntax.patch b/SOURCES/vim-7.4-fstabsyntax.patch new file mode 100644 index 0000000..4bea4bd --- /dev/null +++ b/SOURCES/vim-7.4-fstabsyntax.patch @@ -0,0 +1,20 @@ +--- vim74/runtime/syntax/fstab.vim.orig 2013-05-21 16:07:26.000000000 +0200 ++++ vim74/runtime/syntax/fstab.vim 2013-08-12 15:05:43.682707639 +0200 +@@ -53,7 +53,7 @@ + " Type + syn cluster fsTypeCluster contains=fsTypeKeyword,fsTypeUnknown + syn match fsTypeUnknown /\s\+\zs\w\+/ contained +-syn keyword fsTypeKeyword contained adfs ados affs anon_inodefs atfs audiofs auto autofs bdev befs bfs btrfs binfmt_misc cd9660 cfs cgroup cifs coda configfs cpuset cramfs devfs devpts devtmpfs e2compr efs ext2 ext2fs ext3 ext4 fdesc ffs filecore fuse fuseblk fusectl hfs hpfs hugetlbfs iso9660 jffs jffs2 jfs kernfs lfs linprocfs mfs minix mqueue msdos ncpfs nfs nfsd nilfs2 none ntfs null nwfs overlay ovlfs pipefs portal proc procfs pstore ptyfs qnx4 reiserfs ramfs romfs securityfs shm smbfs squashfs sockfs sshfs std subfs swap sysfs sysv tcfs tmpfs udf ufs umap umsdos union usbfs userfs vfat vs3fs vxfs wrapfs wvfs xenfs xfs zisofs ++syn keyword fsTypeKeyword contained adfs ados affs anon_inodefs atfs audiofs auto autofs bdev befs bfs btrfs binfmt_misc cd9660 cfs cgroup cifs coda configfs cpuset cramfs devfs devpts devtmpfs e2compr efs ext2 ext2fs ext3 ext4 fdesc ffs filecore fuse fuseblk fusectl hfs hpfs hugetlbfs iso9660 jffs jffs2 jfs kernfs lfs linprocfs mfs minix mqueue msdos ncpfs nfs nfsd nilfs2 none ntfs null nwfs overlay ovlfs pipefs portal proc procfs pstore ptyfs qnx4 reiserfs ramfs romfs rpc_pipefs securityfs shm smbfs squashfs sockfs sshfs std subfs swap sysfs sysv tcfs tmpfs udf ufs umap umsdos union usbfs userfs vfat vs3fs vxfs wrapfs wvfs xenfs xfs zisofs + + " Options + " ------- +@@ -65,7 +65,7 @@ + syn keyword fsOptionsYesNo yes no + syn cluster fsOptionsCheckCluster contains=fsOptionsExt2Check,fsOptionsFatCheck + syn keyword fsOptionsSize 512 1024 2048 +-syn keyword fsOptionsGeneral async atime auto bind current defaults dev devgid devmode devmtime devuid dirsync exec force fstab kudzu loop mand move noatime noauto noclusterr noclusterw nodev nodevmtime nodiratime noexec nomand nosuid nosymfollow nouser owner rbind rdonly remount ro rq rw suid suiddir supermount sw sync union update user users xx ++syn keyword fsOptionsGeneral async atime auto bind current defaults dev devgid devmode devmtime devuid dirsync exec force fstab kudzu loop managed mand move noatime noauto noclusterr noclusterw nodev nodevmtime nodiratime noexec nomand nosuid nosymfollow nouser owner pamconsole rbind rdonly remount ro rq rw suid suiddir supermount sw sync union update user[s] xx + syn match fsOptionsGeneral /_netdev/ + + " Options: adfs diff --git a/SOURCES/vim-7.4-syntax.patch b/SOURCES/vim-7.4-syntax.patch new file mode 100644 index 0000000..5131c80 --- /dev/null +++ b/SOURCES/vim-7.4-syntax.patch @@ -0,0 +1,11 @@ +--- vim74/runtime/filetype.vim.orig 2013-08-12 14:51:58.669350813 +0200 ++++ vim74/runtime/filetype.vim 2013-08-12 14:56:12.432540523 +0200 +@@ -2475,7 +2475,7 @@ + + " More Apache config files + au BufNewFile,BufRead access.conf*,apache.conf*,apache2.conf*,httpd.conf*,srm.conf* call s:StarSetf('apache') +-au BufNewFile,BufRead */etc/apache2/*.conf*,*/etc/apache2/conf.*/*,*/etc/apache2/mods-*/*,*/etc/apache2/sites-*/*,*/etc/httpd/conf.d/*.conf* call s:StarSetf('apache') ++au BufNewFile,BufRead */etc/apache2/*.conf*,*/etc/httpd/conf.*/*,*/etc/httpd/mods-*/*,*/etc/httpd/sites-*/*,*/etc/httpd/conf.d/*.conf*,auth_mysql.conf*,auth_pgsql.conf*,ssl.conf*,perl.conf*,php.conf*,python.conf*,squirrelmail.conf* call s:StarSetf('apache') + + " Asterisk config file + au BufNewFile,BufRead *asterisk/*.conf* call s:StarSetf('asterisk') diff --git a/SOURCES/vim-7.4-yamlsyntax.patch b/SOURCES/vim-7.4-yamlsyntax.patch new file mode 100644 index 0000000..5a06fe6 --- /dev/null +++ b/SOURCES/vim-7.4-yamlsyntax.patch @@ -0,0 +1,22 @@ +diff -up vim74/runtime/syntax/yaml.vim.yamlsyntax vim74/runtime/syntax/yaml.vim +--- vim74/runtime/syntax/yaml.vim.yamlsyntax 2016-11-25 13:08:38.621772847 +0100 ++++ vim74/runtime/syntax/yaml.vim 2016-11-25 15:04:38.170017620 +0100 +@@ -103,14 +103,15 @@ execute 'syn match yamlPlainScalar conta + syn match yamlMappingKeyStart '?\ze\s' + syn match yamlMappingKeyStart '?' contained + +-execute 'syn match yamlFlowMappingKey /'.s:ns_plain_in.'\ze\s*:/ contained '. ++execute 'syn match yamlFlowMappingKey /\%#=1'.s:ns_plain_in.'\%(\s\+'.s:ns_plain_in.'\)*\ze\s*:/ contained '. + \'nextgroup=yamlKeyValueDelimiter' + syn match yamlFlowMappingMerge /<<\ze\s*:/ contained nextgroup=yamlKeyValueDelimiter + + syn match yamlBlockCollectionItemStart '^\s*\zs-\%(\s\+-\)*\s' nextgroup=yamlBlockMappingKey,yamlBlockMappingMerge +-execute 'syn match yamlBlockMappingKey /^\s*\zs'.s:ns_plain_out.'\ze\s*:\%(\s\|$\)/ '. ++" Use the old regexp engine, the NFA engine doesn't like all the \@ items. ++execute 'syn match yamlBlockMappingKey /\%#=1^\s*\zs'.s:ns_plain_out.'\%(\s\+'.s:ns_plain_out.'\)*\ze\s*:\%(\s\|$\)/ '. + \'nextgroup=yamlKeyValueDelimiter' +-execute 'syn match yamlBlockMappingKey /\s*\zs'.s:ns_plain_out.'\ze\s*:\%(\s\|$\)/ contained '. ++execute 'syn match yamlBlockMappingKey /\%#=1\s*\zs'.s:ns_plain_out.'\%(\s\+'.s:ns_plain_out.'\)*\ze\s*:\%(\s\|$\)/ contained '. + \'nextgroup=yamlKeyValueDelimiter' + syn match yamlBlockMappingMerge /^\s*\zs<<\ze:\%(\s\|$\)/ nextgroup=yamlKeyValueDelimiter + syn match yamlBlockMappingMerge /<<\ze\s*:\%(\s\|$\)/ nextgroup=yamlKeyValueDelimiter contained diff --git a/SOURCES/vim-manpagefixes-948566.patch b/SOURCES/vim-manpagefixes-948566.patch new file mode 100644 index 0000000..6f49560 --- /dev/null +++ b/SOURCES/vim-manpagefixes-948566.patch @@ -0,0 +1,326 @@ +diff -up vim73/runtime/doc/vim.man.rh1 vim73/runtime/doc/vim.man +--- vim73/runtime/doc/vim.man.rh1 2013-07-26 11:26:20.566576864 +0200 ++++ vim73/runtime/doc/vim.man 2013-07-26 11:47:42.061351469 +0200 +@@ -11,9 +11,9 @@ SYNOPSIS + vim [options] -t tag + vim [options] -q [errorfile] + +- ex ++ ex gex + view +- gvim gview evim eview ++ gvim gview vimx evim eview + rvim rview rgvim rgview + + DESCRIPTION +@@ -79,8 +79,13 @@ DESCRIPTION + the files. Can also be done with the "-R" argument. + + gvim gview +- The GUI version. Starts a new window. Can also be done with +- the "-g" argument. ++ The GUI version. Starts a new window. ++ ++ gex Starts a new gvim window in Ex mode. Can also be done with ++ the "-e" argument to gvim. ++ ++ vimx Starts gvim in "Vi" mode similar to "vim", but with ++ additional features like xterm clipboard support. + + evim eview + The GUI version in easy mode. Starts a new window. Can also +diff -urN vim73/runtime/doc/vim.1 vim73_new/runtime/doc/vim.1 +--- vim73/runtime/doc/vim.1 2013-07-31 14:13:01.039765800 +0200 ++++ vim73_new/runtime/doc/vim.1 2013-07-31 13:57:59.861912768 +0200 +@@ -17,11 +17,13 @@ + .PP + .br + .B ex ++.B gex + .br + .B view + .br + .B gvim + .B gview ++.B vimx + .B evim + .B eview + .br +@@ -114,7 +116,12 @@ + gvim gview + The GUI version. + Starts a new window. +-Can also be done with the "\-g" argument. ++.TP ++gex ++Starts a new gvim window in Ex mode. Can also be done with the "-e" argument to gvim ++.TP ++vimx ++Starts gvim in "Vi" mode similar to "vim", but with additional features like xterm clipboard support + .TP + evim eview + The GUI version in easy mode. +@@ -458,6 +458,12 @@ + \-\-remote\-wait\-silent + As \-\-remote\-wait, but without the warning when no server is found. + .TP ++\-\-remote\-tab[\-wait][\-silent] ++As \-\-remote but use tab page per file ++.TP ++\-\-role ++Set a unique role to identify the main window ++.TP + \-\-serverlist + List the names of all Vim servers that can be found. + .TP +diff -urN vim73/runtime/doc/vim-fr.1 vim73_new/runtime/doc/vim-fr.1 +--- vim73/runtime/doc/vim-fr.1 2010-05-15 13:04:00.000000000 +0200 ++++ vim73_new/runtime/doc/vim-fr.1 2013-07-31 13:59:10.587467916 +0200 +@@ -24,11 +24,13 @@ + .PP + .br + .B ex ++.B gex + .br + .B view + .br + .B gvim + .B gview ++.B vimx + .B evim + .B eview + .br +diff -urN vim73/runtime/doc/vim-fr.UTF-8.1 vim73_new/runtime/doc/vim-fr.UTF-8.1 +--- vim73/runtime/doc/vim-fr.UTF-8.1 2010-05-15 13:04:00.000000000 +0200 ++++ vim73_new/runtime/doc/vim-fr.UTF-8.1 2013-07-31 13:59:28.394852347 +0200 +@@ -24,11 +24,13 @@ + .PP + .br + .B ex ++.B gex + .br + .B view + .br + .B gvim + .B gview ++.B vimx + .B evim + .B eview + .br +diff -urN vim73/runtime/doc/vim-it.1 vim73_new/runtime/doc/vim-it.1 +--- vim73/runtime/doc/vim-it.1 2010-07-27 22:22:52.000000000 +0200 ++++ vim73_new/runtime/doc/vim-it.1 2013-07-31 13:59:43.474331077 +0200 +@@ -17,11 +17,13 @@ + .PP + .br + .B ex ++.B gex + .br + .B view + .br + .B gvim + .B gview ++.B vimx + .B evim + .B eview + .br +diff -urN vim73/runtime/doc/vim-it.UTF-8.1 vim73_new/runtime/doc/vim-it.UTF-8.1 +--- vim73/runtime/doc/vim-it.UTF-8.1 2010-07-30 20:53:57.000000000 +0200 ++++ vim73_new/runtime/doc/vim-it.UTF-8.1 2013-07-31 13:59:55.985898573 +0200 +@@ -17,11 +17,13 @@ + .PP + .br + .B ex ++.B gex + .br + .B view + .br + .B gvim + .B gview ++.B vimx + .B evim + .B eview + .br +diff -urN vim73/runtime/doc/vim.man vim73_new/runtime/doc/vim.man +--- vim73/runtime/doc/vim.man 2013-07-31 14:13:01.044765627 +0200 ++++ vim73_new/runtime/doc/vim.man 2013-07-31 13:53:35.107064804 +0200 +@@ -82,10 +82,10 @@ + The GUI version. Starts a new window. + + gex Starts a new gvim window in Ex mode. Can also be done with +- the "-e" argument to gvim. ++ the "-e" argument to gvim + + vimx Starts gvim in "Vi" mode similar to "vim", but with +- additional features like xterm clipboard support. ++ additional features like xterm clipboard support + + evim eview + The GUI version in easy mode. Starts a new window. Can also +diff -urN vim73/runtime/doc/vim-pl.1 vim73_new/runtime/doc/vim-pl.1 +--- vim73/runtime/doc/vim-pl.1 2010-05-15 13:04:01.000000000 +0200 ++++ vim73_new/runtime/doc/vim-pl.1 2013-07-31 14:00:21.282024131 +0200 +@@ -17,11 +17,13 @@ + .PP + .br + .B ex ++.B gex + .br + .B view + .br + .B gvim + .B gview ++.B vimx + .B evim + .B eview + .br +diff -urN vim73/runtime/doc/vim-pl.UTF-8.1 vim73_new/runtime/doc/vim-pl.UTF-8.1 +--- vim73/runtime/doc/vim-pl.UTF-8.1 2010-05-15 13:37:38.000000000 +0200 ++++ vim73_new/runtime/doc/vim-pl.UTF-8.1 2013-07-31 14:00:36.056513402 +0200 +@@ -17,11 +17,13 @@ + .PP + .br + .B ex ++.B gex + .br + .B view + .br + .B gvim + .B gview ++.B vimx + .B evim + .B eview + .br +diff -urN vim73/runtime/doc/vim-ru.1 vim73_new/runtime/doc/vim-ru.1 +--- vim73/runtime/doc/vim-ru.1 2010-05-15 13:04:00.000000000 +0200 ++++ vim73_new/runtime/doc/vim-ru.1 2013-07-31 14:01:10.071337568 +0200 +@@ -17,11 +17,15 @@ + .PP + .br + .B ex ++.B gex + .br + .B view + .br + .B gvim + .B gview ++.B vimx ++.B evim ++.B eview + .br + .B rvim + .B rview +diff -urN vim73/runtime/doc/vim-ru.UTF-8.1 vim73_new/runtime/doc/vim-ru.UTF-8.1 +--- vim73/runtime/doc/vim-ru.UTF-8.1 2010-05-15 13:04:00.000000000 +0200 ++++ vim73_new/runtime/doc/vim-ru.UTF-8.1 2013-07-31 14:01:34.494493301 +0200 +@@ -17,11 +17,15 @@ + .PP + .br + .B ex ++.B gex + .br + .B view + .br + .B gvim + .B gview ++.B vimx ++.B evim ++.B eview + .br + .B rvim + .B rview +diff -urN vim73/runtime/doc/vimtutor.1 vim73_new/runtime/doc/vimtutor.1 +--- vim73/runtime/doc/vimtutor.1 2010-05-15 13:04:00.000000000 +0200 ++++ vim73_new/runtime/doc/vimtutor.1 2013-07-31 14:10:10.093671964 +0200 +@@ -4,6 +4,8 @@ + .SH SYNOPSIS + .br + .B vimtutor [\-g] [language] ++.br ++.B gvimtutor + .SH DESCRIPTION + .B Vimtutor + starts the +diff -urN vim73/runtime/doc/vimtutor-it.1 vim73_new/runtime/doc/vimtutor-it.1 +--- vim73/runtime/doc/vimtutor-it.1 2010-07-27 22:35:32.000000000 +0200 ++++ vim73_new/runtime/doc/vimtutor-it.1 2013-07-31 14:10:33.564861055 +0200 +@@ -4,6 +4,8 @@ + .SH SINTASSI + .br + .B vimtutor [\-g] [lingua] ++.br ++.B gvimtutor + .SH DESCRIZIONE + .B Vimtutor + inizia il +diff -urN vim73/runtime/doc/vimtutor-it.UTF-8.1 vim73_new/runtime/doc/vimtutor-it.UTF-8.1 +--- vim73/runtime/doc/vimtutor-it.UTF-8.1 2010-07-30 20:53:57.000000000 +0200 ++++ vim73_new/runtime/doc/vimtutor-it.UTF-8.1 2013-07-31 14:10:40.483622016 +0200 +@@ -4,6 +4,8 @@ + .SH SINTASSI + .br + .B vimtutor [\-g] [lingua] ++.br ++.B gvimtutor + .SH DESCRIZIONE + .B Vimtutor + inizia il +diff -urN vim73/runtime/doc/vimtutor.man vim73_new/runtime/doc/vimtutor.man +--- vim73/runtime/doc/vimtutor.man 2010-05-15 13:04:00.000000000 +0200 ++++ vim73_new/runtime/doc/vimtutor.man 2013-07-31 14:11:04.786782356 +0200 +@@ -7,6 +7,7 @@ + + SYNOPSIS + vimtutor [-g] [language] ++ gvimtutor + + DESCRIPTION + Vimtutor starts the Vim tutor. It copies the tutor file first, so that +diff -urN vim73/runtime/doc/vimtutor-pl.1 vim73_new/runtime/doc/vimtutor-pl.1 +--- vim73/runtime/doc/vimtutor-pl.1 2010-05-15 13:04:00.000000000 +0200 ++++ vim73_new/runtime/doc/vimtutor-pl.1 2013-07-31 14:11:13.602477777 +0200 +@@ -4,6 +4,8 @@ + .SH SYNOPSIS + .br + .B vimtutor -g [j�zyk] ++.br ++.B gvimtutor + .SH OPIS + .B Vimtutor + uruchamia nauczyciela +diff -urN vim73/runtime/doc/vimtutor-pl.UTF-8.1 vim73_new/runtime/doc/vimtutor-pl.UTF-8.1 +--- vim73/runtime/doc/vimtutor-pl.UTF-8.1 2010-05-15 13:04:00.000000000 +0200 ++++ vim73_new/runtime/doc/vimtutor-pl.UTF-8.1 2013-07-31 14:11:20.571237009 +0200 +@@ -4,6 +4,8 @@ + .SH SYNOPSIS + .br + .B vimtutor -g [język] ++.br ++.B gvimtutor + .SH OPIS + .B Vimtutor + uruchamia nauczyciela +diff -urN vim73/runtime/doc/vimtutor-ru.1 vim73_new/runtime/doc/vimtutor-ru.1 +--- vim73/runtime/doc/vimtutor-ru.1 2010-05-15 13:04:00.000000000 +0200 ++++ vim73_new/runtime/doc/vimtutor-ru.1 2013-07-31 14:11:35.673715221 +0200 +@@ -4,6 +4,8 @@ + .SH ��������� ������ + .br + .B vimtutor [����] ++.br ++.B gvimtutor + .SH �������� + ������� + .B vimtutor +diff -urN vim73/runtime/doc/vimtutor-ru.UTF-8.1 vim73_new/runtime/doc/vimtutor-ru.UTF-8.1 +--- vim73/runtime/doc/vimtutor-ru.UTF-8.1 2010-05-15 13:04:00.000000000 +0200 ++++ vim73_new/runtime/doc/vimtutor-ru.UTF-8.1 2013-07-31 14:11:46.649335999 +0200 +@@ -7,6 +7,8 @@ + .SH ОПИСАНИЕ + Команда + .B vimtutor ++.br ++.B gvimtutor + запускает учебник по + .B Vim. + При этом сначала происходит создание копии файла учебника, diff --git a/SOURCES/vim72-rh514717.patch b/SOURCES/vim72-rh514717.patch new file mode 100644 index 0000000..e2dafa9 --- /dev/null +++ b/SOURCES/vim72-rh514717.patch @@ -0,0 +1,30 @@ +diff -up vim72/src/eval.c.rh514717 vim72/src/eval.c +--- vim72/src/eval.c.rh514717 2009-08-03 16:15:42.882375154 +0200 ++++ vim72/src/eval.c 2009-08-03 16:34:14.863381780 +0200 +@@ -286,13 +286,12 @@ typedef struct + #define VV_RO 2 /* read-only */ + #define VV_RO_SBX 4 /* read-only in the sandbox */ + +-#define VV_NAME(s, t) s, {{t, 0, {0}}, 0, {0}}, {0} ++#define VV_NAME(s, t) s, {{t, 0, {0}}, 0, {0}} + + static struct vimvar + { + char *vv_name; /* name of variable, without v: */ + dictitem_T vv_di; /* value and name for key */ +- char vv_filler[16]; /* space for LONGEST name below!!! */ + char vv_flags; /* VV_COMPAT, VV_RO, VV_RO_SBX */ + } vimvars[VV_LEN] = + { +diff -up vim72/src/structs.h.rh514717 vim72/src/structs.h +--- vim72/src/structs.h.rh514717 2009-08-03 16:33:35.274870950 +0200 ++++ vim72/src/structs.h 2009-08-03 16:33:48.607436706 +0200 +@@ -1095,7 +1095,7 @@ struct dictitem_S + { + typval_T di_tv; /* type and value of the variable */ + char_u di_flags; /* flags (only used for variable) */ +- char_u di_key[10]; /* key (actually longer!) */ ++ char_u di_key[18]; /* key */ + }; + + typedef struct dictitem_S dictitem_T; diff --git a/SOURCES/vimrc b/SOURCES/vimrc new file mode 100644 index 0000000..cf66061 --- /dev/null +++ b/SOURCES/vimrc @@ -0,0 +1,64 @@ +if v:lang =~ "utf8$" || v:lang =~ "UTF-8$" + set fileencodings=ucs-bom,utf-8,latin1 +endif + +set nocompatible " Use Vim defaults (much better!) +set bs=indent,eol,start " allow backspacing over everything in insert mode +"set ai " always set autoindenting on +"set backup " keep a backup file +set viminfo='20,\"50 " read/write a .viminfo file, don't store more + " than 50 lines of registers +set history=50 " keep 50 lines of command line history +set ruler " show the cursor position all the time + +" Only do this part when compiled with support for autocommands +if has("autocmd") + augroup fedora + autocmd! + " In text files, always limit the width of text to 78 characters + " autocmd BufRead *.txt set tw=78 + " When editing a file, always jump to the last cursor position + autocmd BufReadPost * + \ if line("'\"") > 0 && line ("'\"") <= line("$") | + \ exe "normal! g'\"" | + \ endif + " don't write swapfile on most commonly used directories for NFS mounts or USB sticks + autocmd BufNewFile,BufReadPre /media/*,/run/media/*,/mnt/* set directory=~/tmp,/var/tmp,/tmp + " start with spec file template + autocmd BufNewFile *.spec 0r /usr/share/vim/vimfiles/template.spec + augroup END +endif + +if has("cscope") && filereadable("/usr/bin/cscope") + set csprg=/usr/bin/cscope + set csto=0 + set cst + set nocsverb + " add any database in current directory + if filereadable("cscope.out") + cs add $PWD/cscope.out + " else add database pointed to by environment + elseif $CSCOPE_DB != "" + cs add $CSCOPE_DB + endif + set csverb +endif + +" Switch syntax highlighting on, when the terminal has colors +" Also switch on highlighting the last used search pattern. +if &t_Co > 2 || has("gui_running") + syntax on + set hlsearch +endif + +filetype plugin on + +if &term=="xterm" + set t_Co=8 + set t_Sb=[4%dm + set t_Sf=[3%dm +endif + +" Don't wake up system with blinking cursor: +" http://www.linuxpowertop.org/known.php +let &guicursor = &guicursor . ",a:blinkon0" diff --git a/SPECS/vim.spec b/SPECS/vim.spec new file mode 100644 index 0000000..cb03cb2 --- /dev/null +++ b/SPECS/vim.spec @@ -0,0 +1,1188 @@ +%define patchlevel 160 +%if %{?WITH_SELINUX:0}%{!?WITH_SELINUX:1} +%define WITH_SELINUX 1 +%endif +%define desktop_file 1 +%if %{desktop_file} +%define desktop_file_utils_version 0.2.93 +%endif + +%define withnetbeans 1 + +%define withvimspell 0 +%define withhunspell 0 +%define withruby 1 + +%define baseversion 7.4 +%define vimdir vim74 + +Summary: The VIM editor +URL: http://www.vim.org/ +Name: vim +Version: %{baseversion}.%{patchlevel} +Release: 4%{?dist} +License: Vim +Group: Applications/Editors +Source0: ftp://ftp.vim.org/pub/vim/unix/vim-%{baseversion}.tar.bz2 +Source3: gvim.desktop +Source4: vimrc +Source5: ftp://ftp.vim.org/pub/vim/patches/README.patches +Source7: gvim16.png +Source8: gvim32.png +Source9: gvim48.png +Source10: gvim64.png +Source11: Changelog.rpm +Source12: vi_help.txt +%if %{withvimspell} +Source13: vim-spell-files.tar.bz2 +%endif +Source14: spec-template +Source15: spec-template.new + +Patch2002: vim-7.0-fixkeys.patch +Patch2003: vim-6.2-specsyntax.patch +%if %{withhunspell} +Patch2011: vim-7.0-hunspell.patch +BuildRequires: hunspell-devel +%endif +# If you're as lazy as me, generate the list using +# for i in `seq 1 14`; do printf "Patch%03d: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.%03d\n" $i $i; done +Patch001: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.001 +Patch002: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.002 +Patch003: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.003 +Patch004: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.004 +Patch005: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.005 +Patch006: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.006 +Patch007: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.007 +Patch008: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.008 +Patch009: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.009 +Patch010: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.010 +Patch011: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.011 +Patch012: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.012 +Patch013: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.013 +Patch014: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.014 +Patch015: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.015 +Patch016: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.016 +Patch017: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.017 +Patch018: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.018 +Patch019: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.019 +Patch020: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.020 +Patch021: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.021 +Patch022: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.022 +Patch023: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.023 +Patch024: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.024 +Patch025: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.025 +Patch026: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.026 +Patch027: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.027 +Patch028: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.028 +Patch029: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.029 +Patch030: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.030 +Patch031: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.031 +Patch032: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.032 +Patch033: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.033 +Patch034: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.034 +Patch035: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.035 +Patch036: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.036 +Patch037: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.037 +Patch038: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.038 +Patch039: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.039 +Patch040: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.040 +Patch041: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.041 +Patch042: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.042 +Patch043: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.043 +Patch044: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.044 +Patch045: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.045 +Patch046: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.046 +Patch047: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.047 +Patch048: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.048 +Patch049: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.049 +Patch050: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.050 +Patch051: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.051 +Patch052: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.052 +Patch053: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.053 +Patch054: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.054 +Patch055: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.055 +Patch056: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.056 +Patch057: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.057 +Patch058: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.058 +Patch059: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.059 +Patch060: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.060 +Patch061: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.061 +Patch062: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.062 +Patch063: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.063 +Patch064: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.064 +Patch065: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.065 +Patch066: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.066 +Patch067: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.067 +Patch068: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.068 +Patch069: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.069 +Patch070: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.070 +Patch071: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.071 +Patch072: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.072 +Patch073: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.073 +Patch074: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.074 +Patch075: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.075 +Patch076: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.076 +Patch077: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.077 +Patch078: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.078 +Patch079: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.079 +Patch080: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.080 +Patch081: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.081 +Patch082: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.082 +Patch083: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.083 +Patch084: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.084 +Patch085: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.085 +Patch086: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.086 +Patch087: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.087 +Patch088: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.088 +Patch089: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.089 +Patch090: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.090 +Patch091: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.091 +Patch092: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.092 +Patch093: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.093 +Patch094: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.094 +Patch095: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.095 +Patch096: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.096 +Patch097: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.097 +Patch098: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.098 +Patch099: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.099 +Patch100: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.100 +Patch101: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.101 +Patch102: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.102 +Patch103: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.103 +Patch104: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.104 +Patch105: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.105 +Patch106: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.106 +Patch107: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.107 +Patch108: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.108 +Patch109: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.109 +Patch110: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.110 +Patch111: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.111 +Patch112: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.112 +Patch113: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.113 +Patch114: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.114 +Patch115: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.115 +Patch116: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.116 +Patch117: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.117 +Patch118: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.118 +Patch119: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.119 +Patch120: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.120 +Patch121: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.121 +Patch122: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.122 +Patch123: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.123 +Patch124: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.124 +Patch125: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.125 +Patch126: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.126 +Patch127: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.127 +Patch128: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.128 +Patch129: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.129 +Patch130: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.130 +Patch131: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.131 +Patch132: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.132 +Patch133: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.133 +Patch134: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.134 +Patch135: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.135 +Patch136: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.136 +Patch137: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.137 +Patch138: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.138 +Patch139: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.139 +Patch140: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.140 +Patch141: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.141 +Patch142: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.142 +Patch143: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.143 +Patch144: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.144 +Patch145: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.145 +Patch146: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.146 +Patch147: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.147 +Patch148: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.148 +Patch149: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.149 +Patch150: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.150 +Patch151: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.151 +Patch152: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.152 +Patch153: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.153 +Patch154: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.154 +Patch155: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.155 +Patch156: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.156 +Patch157: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.157 +Patch158: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.158 +Patch159: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.159 +Patch160: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.160 + +Patch3000: vim-7.4-syntax.patch +Patch3002: vim-7.1-nowarnings.patch +Patch3004: vim-7.0-rclocation.patch +Patch3006: vim-6.4-checkhl.patch +Patch3007: vim-7.4-fstabsyntax.patch +Patch3008: vim-7.0-warning.patch +Patch3009: vim-7.0-syncolor.patch +Patch3010: vim-7.0-specedit.patch +Patch3011: vim72-rh514717.patch +Patch3012: vim-7.3-manpage-typo-668894-675480.patch +Patch3013: vim-7.3-xsubpp-path.patch +Patch3014: vim-manpagefixes-948566.patch +Patch3015: vim-7.4-CVE-2016-1248.patch +Patch3016: vim-7.4-yamlsyntax.patch +# 1267826 - Include c++11 syntax highlighting in vim +Patch3017: vim-7.4-c++11.patch +# 1319760 - [RFE] Vim should support blowfish2, plus ensure that RHEL6 encrypted files can be opened in RHEL7 +Patch3018: vim-7.4-blowfish2.patch + +Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +BuildRequires: python-devel ncurses-devel gettext perl-devel +BuildRequires: perl(ExtUtils::Embed) perl(ExtUtils::ParseXS) +BuildRequires: libacl-devel gpm-devel autoconf +%if %{WITH_SELINUX} +BuildRequires: libselinux-devel +%endif +%if "%{withruby}" == "1" +Buildrequires: ruby-devel ruby +%endif +%if %{desktop_file} +# for /usr/bin/desktop-file-install +Requires: desktop-file-utils +BuildRequires: desktop-file-utils >= %{desktop_file_utils_version} +%endif +Epoch: 2 +Conflicts: filesystem < 3 + +%description +VIM (VIsual editor iMproved) is an updated and improved version of the +vi editor. Vi was the first real screen-based editor for UNIX, and is +still very popular. VIM improves on vi by adding new features: +multiple windows, multi-level undo, block highlighting and more. + +%package common +Summary: The common files needed by any version of the VIM editor +Group: Applications/Editors +Conflicts: man-pages-fr < 0.9.7-14 +Conflicts: man-pages-it < 0.3.0-17 +Conflicts: man-pages-pl < 0.24-2 +Requires: %{name}-filesystem + +%description common +VIM (VIsual editor iMproved) is an updated and improved version of the +vi editor. Vi was the first real screen-based editor for UNIX, and is +still very popular. VIM improves on vi by adding new features: +multiple windows, multi-level undo, block highlighting and more. The +vim-common package contains files which every VIM binary will need in +order to run. + +If you are installing vim-enhanced or vim-X11, you'll also need +to install the vim-common package. + +%package spell +Summary: The dictionaries for spell checking. This package is optional +Group: Applications/Editors +Requires: vim-common = %{epoch}:%{version}-%{release} + +%description spell +This subpackage contains dictionaries for vim spell checking in +many different languages. + +%package minimal +Summary: A minimal version of the VIM editor +Group: Applications/Editors +Provides: vi = %{version}-%{release} +Provides: /bin/vi + +%description minimal +VIM (VIsual editor iMproved) is an updated and improved version of the +vi editor. Vi was the first real screen-based editor for UNIX, and is +still very popular. VIM improves on vi by adding new features: +multiple windows, multi-level undo, block highlighting and more. The +vim-minimal package includes a minimal version of VIM, which is +installed into /bin/vi for use when only the root partition is +present. NOTE: The online help is only available when the vim-common +package is installed. + +%package enhanced +Summary: A version of the VIM editor which includes recent enhancements +Group: Applications/Editors +Requires: vim-common = %{epoch}:%{version}-%{release} which +Provides: vim = %{version}-%{release} +Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) + +%description enhanced +VIM (VIsual editor iMproved) is an updated and improved version of the +vi editor. Vi was the first real screen-based editor for UNIX, and is +still very popular. VIM improves on vi by adding new features: +multiple windows, multi-level undo, block highlighting and more. The +vim-enhanced package contains a version of VIM with extra, recently +introduced features like Python and Perl interpreters. + +Install the vim-enhanced package if you'd like to use a version of the +VIM editor which includes recently added enhancements like +interpreters for the Python and Perl scripting languages. You'll also +need to install the vim-common package. + +%package filesystem +Summary: VIM filesystem layout +Group: Applications/Editors + +%Description filesystem +This package provides some directories which are required by other +packages that add vim files, p.e. additional syntax files or filetypes. + +%package X11 +Summary: The VIM version of the vi editor for the X Window System +Group: Applications/Editors +Requires: vim-common = %{epoch}:%{version}-%{release} libattr >= 2.4 gtk2 >= 2.6 +Provides: gvim = %{version}-%{release} +BuildRequires: gtk2-devel libSM-devel libXt-devel libXpm-devel +Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) +Requires: hicolor-icon-theme + +%description X11 +VIM (VIsual editor iMproved) is an updated and improved version of the +vi editor. Vi was the first real screen-based editor for UNIX, and is +still very popular. VIM improves on vi by adding new features: +multiple windows, multi-level undo, block highlighting and +more. VIM-X11 is a version of the VIM editor which will run within the +X Window System. If you install this package, you can run VIM as an X +application with a full GUI interface and mouse support. + +Install the vim-X11 package if you'd like to try out a version of vi +with graphics and mouse capabilities. You'll also need to install the +vim-common package. + +%prep +%setup -q -b 0 -n %{vimdir} +# fix rogue dependencies from sample code +chmod -x runtime/tools/mve.awk +%patch2002 -p1 +%patch2003 -p1 +%if %{withhunspell} +%patch2011 -p1 +%endif +perl -pi -e "s,bin/nawk,bin/awk,g" runtime/tools/mve.awk + +# Base patches... +# for i in `seq 1 14`; do printf "%%patch%03d -p0 \n" $i; done +%patch001 -p0 +%patch002 -p0 +%patch003 -p0 +%patch004 -p0 +%patch005 -p0 +%patch006 -p0 +%patch007 -p0 +%patch008 -p0 +%patch009 -p0 +%patch010 -p0 +%patch011 -p0 +%patch012 -p0 +%patch013 -p0 +%patch014 -p0 +%patch015 -p0 +%patch016 -p0 +%patch017 -p0 +%patch018 -p0 +%patch019 -p0 +%patch020 -p0 +%patch021 -p0 +%patch022 -p0 +%patch023 -p0 +%patch024 -p0 +%patch025 -p0 +%patch026 -p0 +%patch027 -p0 +%patch028 -p0 +%patch029 -p0 +%patch030 -p0 +%patch031 -p0 +%patch032 -p0 +%patch033 -p0 +%patch034 -p0 +%patch035 -p0 +%patch036 -p0 +%patch037 -p0 +%patch038 -p0 +%patch039 -p0 +%patch040 -p0 +%patch041 -p0 +%patch042 -p0 +%patch043 -p0 +%patch044 -p0 +%patch045 -p0 +%patch046 -p0 +%patch047 -p0 +%patch048 -p0 +%patch049 -p0 +%patch050 -p0 +%patch051 -p0 +%patch052 -p0 +%patch053 -p0 +%patch054 -p0 +%patch055 -p0 +%patch056 -p0 +%patch057 -p0 +%patch058 -p0 +%patch059 -p0 +%patch060 -p0 +%patch061 -p0 +%patch062 -p0 +%patch063 -p0 +%patch064 -p0 +%patch065 -p0 +%patch066 -p0 +%patch067 -p0 +%patch068 -p0 +%patch069 -p0 +%patch070 -p0 +%patch071 -p0 +%patch072 -p0 +%patch073 -p0 +%patch074 -p0 +%patch075 -p0 +%patch076 -p0 +%patch077 -p0 +%patch078 -p0 +%patch079 -p0 +%patch080 -p0 +%patch081 -p0 +%patch082 -p0 +%patch083 -p0 +%patch084 -p0 +%patch085 -p0 +%patch086 -p0 +%patch087 -p0 +%patch088 -p0 +%patch089 -p0 +%patch090 -p0 +%patch091 -p0 +%patch092 -p0 +%patch093 -p0 +%patch094 -p0 +%patch095 -p0 +%patch096 -p0 +%patch097 -p0 +%patch098 -p0 +%patch099 -p0 +%patch100 -p0 +%patch101 -p0 +%patch102 -p0 +%patch103 -p0 +%patch104 -p0 +%patch105 -p0 +%patch106 -p0 +%patch107 -p0 +%patch108 -p0 +%patch109 -p0 +%patch110 -p0 +%patch111 -p0 +%patch112 -p0 +%patch113 -p0 +%patch114 -p0 +%patch115 -p0 +%patch116 -p0 +%patch117 -p0 +%patch118 -p0 +%patch119 -p0 +%patch120 -p0 +%patch121 -p0 +%patch122 -p0 +%patch123 -p0 +%patch124 -p0 +%patch125 -p0 +%patch126 -p0 +%patch127 -p0 +%patch128 -p0 +%patch129 -p0 +%patch130 -p0 +%patch131 -p0 +%patch132 -p0 +%patch133 -p0 +%patch134 -p0 +%patch135 -p0 +%patch136 -p0 +%patch137 -p0 +%patch138 -p0 +%patch139 -p0 +%patch140 -p0 +%patch141 -p0 +%patch142 -p0 +%patch143 -p0 +%patch144 -p0 +%patch145 -p0 +%patch146 -p0 +%patch147 -p0 +%patch148 -p0 +%patch149 -p0 +%patch150 -p0 +%patch151 -p0 +%patch152 -p0 +%patch153 -p0 +%patch154 -p0 +%patch155 -p0 +%patch156 -p0 +%patch157 -p0 +%patch158 -p0 +%patch159 -p0 +%patch160 -p0 + +# install spell files +%if %{withvimspell} +%{__tar} xjf %{SOURCE13} +%endif + +%patch3000 -p1 +%patch3002 -p1 +%patch3004 -p1 +%patch3006 -p1 +%patch3007 -p1 +%patch3008 -p1 +%patch3009 -p1 +%patch3010 -p1 +%patch3011 -p1 +%patch3012 -p1 + +%if %{?fedora}%{!?fedora:0} >= 20 || %{?rhel}%{!?rhel:0} >= 7 +%patch3013 -p1 +%endif +%patch3014 -p1 +%patch3015 -p1 +%patch3016 -p1 +%patch3017 -p1 +%patch3018 -p1 + +%build +cp -f %{SOURCE5} . +cd src +autoconf + +sed -e "s+VIMRCLOC = \$(VIMLOC)+VIMRCLOC = /etc+" Makefile > Makefile.tmp +mv -f Makefile.tmp Makefile + +export CFLAGS="%{optflags} -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2" +export CXXFLAGS="%{optflags} -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2" + +%configure --with-features=huge \ + --enable-pythoninterp=dynamic \ + --enable-perlinterp \ + --disable-tclinterp --with-x=yes \ + --enable-xim --enable-multibyte \ + --with-tlib=ncurses \ + --enable-gtk2-check --enable-gui=gtk2 \ + --with-compiledby="" --enable-cscope \ + --with-modified-by="" \ +%if "%{withnetbeans}" == "1" + --enable-netbeans \ +%else + --disable-netbeans \ +%endif +%if %{WITH_SELINUX} + --enable-selinux \ +%else + --disable-selinux \ +%endif +%if "%{withruby}" == "1" + --enable-rubyinterp=dynamic \ +%else + --disable-rubyinterp \ +%endif + +make VIMRCLOC=/etc VIMRUNTIMEDIR=/usr/share/vim/%{vimdir} %{?_smp_mflags} +cp vim gvim +make clean + +%configure --prefix=%{_prefix} --with-features=huge \ + --enable-pythoninterp=dynamic \ + --enable-perlinterp \ + --disable-tclinterp \ + --with-x=no \ + --enable-gui=no --exec-prefix=%{_prefix} --enable-multibyte \ + --enable-cscope --with-modified-by="" \ + --with-tlib=ncurses \ + --with-compiledby="" \ +%if "%{withnetbeans}" == "1" + --enable-netbeans \ +%else + --disable-netbeans \ +%endif +%if %{WITH_SELINUX} + --enable-selinux \ +%else + --disable-selinux \ +%endif +%if "%{withruby}" == "1" + --enable-rubyinterp=dynamic \ +%else + --disable-rubyinterp \ +%endif + +make VIMRCLOC=/etc VIMRUNTIMEDIR=/usr/share/vim/%{vimdir} %{?_smp_mflags} +cp vim enhanced-vim +make clean + +perl -pi -e "s/help.txt/vi_help.txt/" os_unix.h ex_cmds.c +perl -pi -e "s/\/etc\/vimrc/\/etc\/virc/" os_unix.h +%configure --prefix=%{_prefix} --with-features=small --with-x=no \ + --enable-multibyte \ + --disable-netbeans \ +%if %{WITH_SELINUX} + --enable-selinux \ +%else + --disable-selinux \ +%endif + --disable-pythoninterp --disable-perlinterp --disable-tclinterp \ + --with-tlib=ncurses --enable-gui=no --disable-gpm --exec-prefix=/ \ + --with-compiledby="" \ + --with-modified-by="" + +make VIMRCLOC=/etc VIMRUNTIMEDIR=/usr/share/vim/%{vimdir} %{?_smp_mflags} + +%install +rm -rf %{buildroot} +mkdir -p %{buildroot}/%{_bindir} +mkdir -p %{buildroot}/%{_datadir}/%{name}/vimfiles/{after,autoload,colors,compiler,doc,ftdetect,ftplugin,indent,keymap,lang,plugin,print,spell,syntax,tutor} +mkdir -p %{buildroot}/%{_datadir}/%{name}/vimfiles/after/{autoload,colors,compiler,doc,ftdetect,ftplugin,indent,keymap,lang,plugin,print,spell,syntax,tutor} +cp -f %{SOURCE11} . +%if %{?fedora}%{!?fedora:0} >= 16 || %{?rhel}%{!?rhel:0} >= 6 +cp -f %{SOURCE15} %{buildroot}/%{_datadir}/%{name}/vimfiles/template.spec +%else +cp -f %{SOURCE14} %{buildroot}/%{_datadir}/%{name}/vimfiles/template.spec +%endif +cp runtime/doc/uganda.txt LICENSE +# Those aren't Linux info files but some binary files for Amiga: +rm -f README*.info + + +cd src +make install DESTDIR=%{buildroot} BINDIR=%{_bindir} VIMRCLOC=/etc VIMRUNTIMEDIR=/usr/share/vim/%{vimdir} +make installgtutorbin DESTDIR=%{buildroot} BINDIR=%{_bindir} VIMRCLOC=/etc VIMRUNTIMEDIR=/usr/share/vim/%{vimdir} +mkdir -p %{buildroot}%{_datadir}/icons/hicolor/{16x16,32x32,48x48,64x64}/apps +install -m755 vim %{buildroot}%{_bindir}/vi +install -m755 enhanced-vim %{buildroot}%{_bindir}/vim +install -m755 gvim %{buildroot}%{_bindir}/gvim +install -p -m644 %{SOURCE7} \ + %{buildroot}%{_datadir}/icons/hicolor/16x16/apps/gvim.png +install -p -m644 %{SOURCE8} \ + %{buildroot}%{_datadir}/icons/hicolor/32x32/apps/gvim.png +install -p -m644 %{SOURCE9} \ + %{buildroot}%{_datadir}/icons/hicolor/48x48/apps/gvim.png +install -p -m644 %{SOURCE10} \ + %{buildroot}%{_datadir}/icons/hicolor/64x64/apps/gvim.png + +( cd %{buildroot} + ln -sf vi ./%{_bindir}/rvi + ln -sf vi ./%{_bindir}/rview + ln -sf vi ./%{_bindir}/view + ln -sf vi ./%{_bindir}/ex + ln -sf vim ./%{_bindir}/rvim + ln -sf vim ./%{_bindir}/vimdiff + perl -pi -e "s,%{buildroot},," .%{_mandir}/man1/vim.1 .%{_mandir}/man1/vimtutor.1 + rm -f .%{_mandir}/man1/rvim.1 + ln -sf vim.1.gz .%{_mandir}/man1/vi.1.gz + ln -sf vim.1.gz .%{_mandir}/man1/rvi.1.gz + ln -sf vim.1.gz .%{_mandir}/man1/vimdiff.1.gz + ln -sf gvim ./%{_bindir}/gview + ln -sf gvim ./%{_bindir}/gex + ln -sf gvim ./%{_bindir}/evim + ln -sf gvim ./%{_bindir}/gvimdiff + ln -sf gvim ./%{_bindir}/vimx + %if "%{desktop_file}" == "1" + mkdir -p %{buildroot}/%{_datadir}/applications + desktop-file-install \ + %if 0%{?fedora} && 0%{?fedora} < 19 + --vendor fedora \ + %endif + --dir %{buildroot}/%{_datadir}/applications \ + %{SOURCE3} + # --add-category "Development;TextEditor;X-Red-Hat-Base" D\ + %else + mkdir -p ./%{_sysconfdir}/X11/applnk/Applications + cp %{SOURCE3} ./%{_sysconfdir}/X11/applnk/Applications/gvim.desktop + %endif + # ja_JP.ujis is obsolete, ja_JP.eucJP is recommended. + ( cd ./%{_datadir}/%{name}/%{vimdir}/lang; \ + ln -sf menu_ja_jp.ujis.vim menu_ja_jp.eucjp.vim ) +) + +pushd %{buildroot}/%{_datadir}/%{name}/%{vimdir}/tutor +mkdir conv + iconv -f CP1252 -t UTF8 tutor.ca > conv/tutor.ca + iconv -f CP1252 -t UTF8 tutor.it > conv/tutor.it + #iconv -f CP1253 -t UTF8 tutor.gr > conv/tutor.gr + iconv -f CP1252 -t UTF8 tutor.fr > conv/tutor.fr + iconv -f CP1252 -t UTF8 tutor.es > conv/tutor.es + iconv -f CP1252 -t UTF8 tutor.de > conv/tutor.de + #iconv -f CP737 -t UTF8 tutor.gr.cp737 > conv/tutor.gr.cp737 + #iconv -f EUC-JP -t UTF8 tutor.ja.euc > conv/tutor.ja.euc + #iconv -f SJIS -t UTF8 tutor.ja.sjis > conv/tutor.ja.sjis + iconv -f UTF8 -t UTF8 tutor.ja.utf-8 > conv/tutor.ja.utf-8 + iconv -f UTF8 -t UTF8 tutor.ko.utf-8 > conv/tutor.ko.utf-8 + iconv -f CP1252 -t UTF8 tutor.no > conv/tutor.no + iconv -f ISO-8859-2 -t UTF8 tutor.pl > conv/tutor.pl + iconv -f ISO-8859-2 -t UTF8 tutor.sk > conv/tutor.sk + iconv -f KOI8R -t UTF8 tutor.ru > conv/tutor.ru + iconv -f CP1252 -t UTF8 tutor.sv > conv/tutor.sv + mv -f tutor.ja.euc tutor.ja.sjis tutor.ko.euc tutor.pl.cp1250 tutor.zh.big5 tutor.ru.cp1251 tutor.zh.euc conv/ + rm -f tutor.ca tutor.de tutor.es tutor.fr tutor.gr tutor.it tutor.ja.utf-8 tutor.ko.utf-8 tutor.no tutor.pl tutor.sk tutor.ru tutor.sv +mv -f conv/* . +rmdir conv +popd + +# Dependency cleanups +chmod 644 %{buildroot}/%{_datadir}/%{name}/%{vimdir}/doc/vim2html.pl \ + %{buildroot}/%{_datadir}/%{name}/%{vimdir}/tools/*.pl \ + %{buildroot}/%{_datadir}/%{name}/%{vimdir}/tools/vim132 +chmod 644 ../runtime/doc/vim2html.pl + +mkdir -p %{buildroot}/%{_sysconfdir}/profile.d +cat >%{buildroot}/%{_sysconfdir}/profile.d/vim.sh </dev/null 2>&1 || alias vi=vim +fi +EOF +cat >%{buildroot}/%{_sysconfdir}/profile.d/vim.csh < 200 ) then + alias vi vim + endif +endif +EOF +chmod 0644 %{buildroot}/%{_sysconfdir}/profile.d/* +install -p -m644 %{SOURCE4} %{buildroot}/%{_sysconfdir}/vimrc +install -p -m644 %{SOURCE4} %{buildroot}/%{_sysconfdir}/virc +%if %{?rhel}%{!?rhel:0} >= 7 +sed -i -e "s/augroup fedora/augroup redhat/" %{buildroot}/%{_sysconfdir}/vimrc +sed -i -e "s/augroup fedora/augroup redhat/" %{buildroot}/%{_sysconfdir}/virc +%endif +(cd %{buildroot}/%{_datadir}/%{name}/%{vimdir}/doc; + gzip -n -9 *.txt + gzip -n -d help.txt.gz version7.txt.gz sponsor.txt.gz + cp %{SOURCE12} . + cat tags | sed -e 's/\t\(.*.txt\)\t/\t\1.gz\t/;s/\thelp.txt.gz\t/\thelp.txt\t/;s/\tversion7.txt.gz\t/\tversion7.txt\t/;s/\tsponsor.txt.gz\t/\tsponsor.txt\t/' > tags.new; mv -f tags.new tags +cat >> tags << EOF +vi_help.txt vi_help.txt /*vi_help.txt* +vi-author.txt vi_help.txt /*vi-author* +vi-Bram.txt vi_help.txt /*vi-Bram* +vi-Moolenaar.txt vi_help.txt /*vi-Moolenaar* +vi-credits.txt vi_help.txt /*vi-credits* +EOF +LANG=C sort tags > tags.tmp; mv tags.tmp tags + ) +(cd ../runtime; rm -rf doc; ln -svf ../../vim/%{vimdir}/doc docs;) +rm -f %{buildroot}/%{_datadir}/vim/%{vimdir}/macros/maze/maze*.c +rm -rf %{buildroot}/%{_datadir}/vim/%{vimdir}/tools +rm -rf %{buildroot}/%{_datadir}/vim/%{vimdir}/doc/vim2html.pl +rm -f %{buildroot}/%{_datadir}/vim/%{vimdir}/tutor/tutor.gr.utf-8~ +( cd %{buildroot}/%{_mandir} + for i in `find ??/ -type f`; do + bi=`basename $i` + iconv -f latin1 -t UTF8 $i > %{buildroot}/$bi + mv -f %{buildroot}/$bi $i + done +) + +# Remove not UTF-8 manpages +for i in pl.ISO8859-2 it.ISO8859-1 ru.KOI8-R fr.ISO8859-1; do + rm -rf %{buildroot}/%{_mandir}/$i +done + +# use common man1/ru directory +mv %{buildroot}/%{_mandir}/ru.UTF-8 %{buildroot}/%{_mandir}/ru + +# Remove duplicate man pages +for i in fr.UTF-8 it.UTF-8 pl.UTF-8; do + rm -rf %{buildroot}/%{_mandir}/$i +done + +for i in rvim.1 gvim.1 gex.1 gview.1 vimx.1; do + echo ".so man1/vim.1" > %{buildroot}/%{_mandir}/man1/$i +done +echo ".so man1/vimdiff.1" > %{buildroot}/%{_mandir}/man1/gvimdiff.1 +echo ".so man1/vimtutor.1" > %{buildroot}/%{_mandir}/man1/gvimtutor.1 +mkdir -p %{buildroot}/%{_mandir}/man5 +for i in virc.5 vimrc.5; do + echo ".so man1/vim.1" > %{buildroot}/%{_mandir}/man5/$i +done +touch %{buildroot}/%{_datadir}/%{name}/vimfiles/doc/tags + +%post X11 +touch --no-create %{_datadir}/icons/hicolor +if [ -x /%{_bindir}/gtk-update-icon-cache ]; then + gtk-update-icon-cache --ignore-theme-index -q %{_datadir}/icons/hicolor +fi +update-desktop-database &> /dev/null ||: + +%postun X11 +touch --no-create %{_datadir}/icons/hicolor +if [ -x /%{_bindir}/gtk-update-icon-cache ]; then + gtk-update-icon-cache --ignore-theme-index -q %{_datadir}/icons/hicolor +fi +update-desktop-database &> /dev/null ||: + +%clean +rm -rf %{buildroot} + +%files common +%defattr(-,root,root) +%config(noreplace) %{_sysconfdir}/vimrc +%doc README* LICENSE +%doc runtime/docs +%doc Changelog.rpm +%dir %{_datadir}/%{name} +%{_datadir}/%{name}/vimfiles/template.spec +%dir %{_datadir}/%{name}/%{vimdir} +%{_datadir}/%{name}/%{vimdir}/autoload +%{_datadir}/%{name}/%{vimdir}/colors +%{_datadir}/%{name}/%{vimdir}/compiler +%{_datadir}/%{name}/%{vimdir}/doc +%{_datadir}/%{name}/%{vimdir}/*.vim +%{_datadir}/%{name}/%{vimdir}/ftplugin +%{_datadir}/%{name}/%{vimdir}/indent +%{_datadir}/%{name}/%{vimdir}/keymap +%{_datadir}/%{name}/%{vimdir}/lang/*.vim +%{_datadir}/%{name}/%{vimdir}/lang/*.txt +%dir %{_datadir}/%{name}/%{vimdir}/lang +%{_datadir}/%{name}/%{vimdir}/macros +%{_datadir}/%{name}/%{vimdir}/plugin +%{_datadir}/%{name}/%{vimdir}/print +%{_datadir}/%{name}/%{vimdir}/syntax +%{_datadir}/%{name}/%{vimdir}/tutor +%if ! %{withvimspell} +%{_datadir}/%{name}/%{vimdir}/spell +%endif +%lang(af) %{_datadir}/%{name}/%{vimdir}/lang/af +%lang(ca) %{_datadir}/%{name}/%{vimdir}/lang/ca +%lang(cs) %{_datadir}/%{name}/%{vimdir}/lang/cs +%lang(cs.cp1250) %{_datadir}/%{name}/%{vimdir}/lang/cs.cp1250 +%lang(de) %{_datadir}/%{name}/%{vimdir}/lang/de +%lang(en_GB) %{_datadir}/%{name}/%{vimdir}/lang/en_GB +%lang(eo) %{_datadir}/%{name}/%{vimdir}/lang/eo +%lang(es) %{_datadir}/%{name}/%{vimdir}/lang/es +%lang(fi) %{_datadir}/%{name}/%{vimdir}/lang/fi +%lang(fr) %{_datadir}/%{name}/%{vimdir}/lang/fr +%lang(ga) %{_datadir}/%{name}/%{vimdir}/lang/ga +%lang(it) %{_datadir}/%{name}/%{vimdir}/lang/it +%lang(ja) %{_datadir}/%{name}/%{vimdir}/lang/ja +%lang(ja.euc-jp) %{_datadir}/%{name}/%{vimdir}/lang/ja.euc-jp +%lang(ja.sjis) %{_datadir}/%{name}/%{vimdir}/lang/ja.sjis +%lang(ko) %{_datadir}/%{name}/%{vimdir}/lang/ko +%lang(ko) %{_datadir}/%{name}/%{vimdir}/lang/ko.UTF-8 +%lang(nb) %{_datadir}/%{name}/%{vimdir}/lang/nb +%lang(nl) %{_datadir}/%{name}/%{vimdir}/lang/nl +%lang(no) %{_datadir}/%{name}/%{vimdir}/lang/no +%lang(pl) %{_datadir}/%{name}/%{vimdir}/lang/pl +%lang(pl.UTF-8) %{_datadir}/%{name}/%{vimdir}/lang/pl.UTF-8 +%lang(pl.cp1250) %{_datadir}/%{name}/%{vimdir}/lang/pl.cp1250 +%lang(pt_BR) %{_datadir}/%{name}/%{vimdir}/lang/pt_BR +%lang(ru) %{_datadir}/%{name}/%{vimdir}/lang/ru +%lang(ru.cp1251) %{_datadir}/%{name}/%{vimdir}/lang/ru.cp1251 +%lang(sk) %{_datadir}/%{name}/%{vimdir}/lang/sk +%lang(sk.cp1250) %{_datadir}/%{name}/%{vimdir}/lang/sk.cp1250 +%lang(sv) %{_datadir}/%{name}/%{vimdir}/lang/sv +%lang(uk) %{_datadir}/%{name}/%{vimdir}/lang/uk +%lang(uk.cp1251) %{_datadir}/%{name}/%{vimdir}/lang/uk.cp1251 +%lang(vi) %{_datadir}/%{name}/%{vimdir}/lang/vi +%lang(zh_CN) %{_datadir}/%{name}/%{vimdir}/lang/zh_CN +%lang(zh_CN.cp936) %{_datadir}/%{name}/%{vimdir}/lang/zh_CN.cp936 +%lang(zh_TW) %{_datadir}/%{name}/%{vimdir}/lang/zh_TW +%lang(zh_CN.UTF-8) %{_datadir}/%{name}/%{vimdir}/lang/zh_CN.UTF-8 +%lang(zh_TW.UTF-8) %{_datadir}/%{name}/%{vimdir}/lang/zh_TW.UTF-8 +/%{_bindir}/xxd +%{_mandir}/man1/ex.* +%{_mandir}/man1/gex.* +%{_mandir}/man1/gview.* +%{_mandir}/man1/gvim* +%{_mandir}/man1/rvi.* +%{_mandir}/man1/rview.* +%{_mandir}/man1/rvim.* +%{_mandir}/man1/vi.* +%{_mandir}/man1/view.* +%{_mandir}/man1/vim.* +%{_mandir}/man1/vimdiff.* +%{_mandir}/man1/vimtutor.* +%{_mandir}/man1/vimx.* +%{_mandir}/man1/xxd.* +%{_mandir}/man5/vimrc.* +%lang(fr) %{_mandir}/fr/man1/* +%lang(it) %{_mandir}/it/man1/* +%lang(ja) %{_mandir}/ja/man1/* +%lang(pl) %{_mandir}/pl/man1/* +%lang(ru) %{_mandir}/ru/man1/* + +%if %{withvimspell} +%files spell +%defattr(-,root,root) +%dir %{_datadir}/%{name}/%{vimdir}/spell +%{_datadir}/%{name}/vim70/spell/cleanadd.vim +%lang(af) %{_datadir}/%{name}/%{vimdir}/spell/af.* +%lang(am) %{_datadir}/%{name}/%{vimdir}/spell/am.* +%lang(bg) %{_datadir}/%{name}/%{vimdir}/spell/bg.* +%lang(ca) %{_datadir}/%{name}/%{vimdir}/spell/ca.* +%lang(cs) %{_datadir}/%{name}/%{vimdir}/spell/cs.* +%lang(cy) %{_datadir}/%{name}/%{vimdir}/spell/cy.* +%lang(da) %{_datadir}/%{name}/%{vimdir}/spell/da.* +%lang(de) %{_datadir}/%{name}/%{vimdir}/spell/de.* +%lang(el) %{_datadir}/%{name}/%{vimdir}/spell/el.* +%lang(en) %{_datadir}/%{name}/%{vimdir}/spell/en.* +%lang(eo) %{_datadir}/%{name}/%{vimdir}/spell/eo.* +%lang(es) %{_datadir}/%{name}/%{vimdir}/spell/es.* +%lang(fo) %{_datadir}/%{name}/%{vimdir}/spell/fo.* +%lang(fr) %{_datadir}/%{name}/%{vimdir}/spell/fr.* +%lang(ga) %{_datadir}/%{name}/%{vimdir}/spell/ga.* +%lang(gd) %{_datadir}/%{name}/%{vimdir}/spell/gd.* +%lang(gl) %{_datadir}/%{name}/%{vimdir}/spell/gl.* +%lang(he) %{_datadir}/%{name}/%{vimdir}/spell/he.* +%lang(hr) %{_datadir}/%{name}/%{vimdir}/spell/hr.* +%lang(hu) %{_datadir}/%{name}/%{vimdir}/spell/hu.* +%lang(id) %{_datadir}/%{name}/%{vimdir}/spell/id.* +%lang(it) %{_datadir}/%{name}/%{vimdir}/spell/it.* +%lang(ku) %{_datadir}/%{name}/%{vimdir}/spell/ku.* +%lang(la) %{_datadir}/%{name}/%{vimdir}/spell/la.* +%lang(lt) %{_datadir}/%{name}/%{vimdir}/spell/lt.* +%lang(lv) %{_datadir}/%{name}/%{vimdir}/spell/lv.* +%lang(mg) %{_datadir}/%{name}/%{vimdir}/spell/mg.* +%lang(mi) %{_datadir}/%{name}/%{vimdir}/spell/mi.* +%lang(ms) %{_datadir}/%{name}/%{vimdir}/spell/ms.* +%lang(nb) %{_datadir}/%{name}/%{vimdir}/spell/nb.* +%lang(nl) %{_datadir}/%{name}/%{vimdir}/spell/nl.* +%lang(nn) %{_datadir}/%{name}/%{vimdir}/spell/nn.* +%lang(ny) %{_datadir}/%{name}/%{vimdir}/spell/ny.* +%lang(pl) %{_datadir}/%{name}/%{vimdir}/spell/pl.* +%lang(pt) %{_datadir}/%{name}/%{vimdir}/spell/pt.* +%lang(ro) %{_datadir}/%{name}/%{vimdir}/spell/ro.* +%lang(ru) %{_datadir}/%{name}/%{vimdir}/spell/ru.* +%lang(rw) %{_datadir}/%{name}/%{vimdir}/spell/rw.* +%lang(sk) %{_datadir}/%{name}/%{vimdir}/spell/sk.* +%lang(sl) %{_datadir}/%{name}/%{vimdir}/spell/sl.* +%lang(sv) %{_datadir}/%{name}/%{vimdir}/spell/sv.* +%lang(sw) %{_datadir}/%{name}/%{vimdir}/spell/sw.* +%lang(tet) %{_datadir}/%{name}/%{vimdir}/spell/tet.* +%lang(th) %{_datadir}/%{name}/%{vimdir}/spell/th.* +%lang(tl) %{_datadir}/%{name}/%{vimdir}/spell/tl.* +%lang(tn) %{_datadir}/%{name}/%{vimdir}/spell/tn.* +%lang(uk) %{_datadir}/%{name}/%{vimdir}/spell/uk.* +%lang(yi) %{_datadir}/%{name}/%{vimdir}/spell/yi.* +%lang(yi-tr) %{_datadir}/%{name}/%{vimdir}/spell/yi-tr.* +%lang(zu) %{_datadir}/%{name}/%{vimdir}/spell/zu.* +%endif + +%files minimal +%defattr(-,root,root) +%config(noreplace) %{_sysconfdir}/virc +%{_bindir}/ex +%{_bindir}/vi +%{_bindir}/view +%{_bindir}/rvi +%{_bindir}/rview +%{_mandir}/man1/vim.* +%{_mandir}/man1/vi.* +%{_mandir}/man1/ex.* +%{_mandir}/man1/rvi.* +%{_mandir}/man1/rview.* +%{_mandir}/man1/view.* +%{_mandir}/man5/virc.* + +%files enhanced +%defattr(-,root,root) +%{_bindir}/vim +%{_bindir}/rvim +%{_bindir}/vimdiff +%{_bindir}/vimtutor +%config(noreplace) %{_sysconfdir}/profile.d/vim.* + +%files filesystem +%defattr(-,root,root) +%dir %{_datadir}/%{name}/vimfiles +%dir %{_datadir}/%{name}/vimfiles/after +%dir %{_datadir}/%{name}/vimfiles/after/* +%dir %{_datadir}/%{name}/vimfiles/autoload +%dir %{_datadir}/%{name}/vimfiles/colors +%dir %{_datadir}/%{name}/vimfiles/compiler +%dir %{_datadir}/%{name}/vimfiles/doc +%ghost %{_datadir}/%{name}/vimfiles/doc/tags +%dir %{_datadir}/%{name}/vimfiles/ftdetect +%dir %{_datadir}/%{name}/vimfiles/ftplugin +%dir %{_datadir}/%{name}/vimfiles/indent +%dir %{_datadir}/%{name}/vimfiles/keymap +%dir %{_datadir}/%{name}/vimfiles/lang +%dir %{_datadir}/%{name}/vimfiles/plugin +%dir %{_datadir}/%{name}/vimfiles/print +%dir %{_datadir}/%{name}/vimfiles/spell +%dir %{_datadir}/%{name}/vimfiles/syntax +%dir %{_datadir}/%{name}/vimfiles/tutor + +%files X11 +%defattr(-,root,root) +%if "%{desktop_file}" == "1" +/%{_datadir}/applications/* +%else +/%{_sysconfdir}/X11/applnk/*/gvim.desktop +%endif +%{_bindir}/gvimtutor +%{_bindir}/gvim +%{_bindir}/gvimdiff +%{_bindir}/gview +%{_bindir}/gex +%{_bindir}/vimx +%{_bindir}/evim +%{_mandir}/man1/evim.* +%{_datadir}/icons/hicolor/*/apps/* + +%changelog +* Tue Sep 05 2017 Zdenek Dohnal - 2:7.4.160-4 +- fixed upstream tests, which failed after last build + +* Wed Aug 23 2017 Zdenek Dohnal - 2:7.4.160-3 +- 1267826 - Include c++11 syntax highlighting in vim +- 1319760 - [RFE] Vim should support blowfish2, plus ensure that RHEL6 encrypted files can be opened in RHEL7 + +* Fri Jan 20 2017 Zdenek Dohnal - 2:7.4.160-2 +- 1383902 - CPU spikes to 100% and timeouts observed in strace when opening yaml extensions using vim + +* Mon Dec 12 2016 Karsten Hopp 7.4.160-1.1 +- add fix for CVE-2016-1248 + +* Wed Jan 29 2014 Karsten Hopp 7.4.160-1 +- patchlevel 160 +- Resolves: rhbz#1059321 + +* Tue Dec 17 2013 Karsten Hopp 7.4.131-1 +- patchlevel 131 + +* Wed Nov 20 2013 Karsten Hopp 7.4.094-1 +- patchlevel 094 + +* Tue Oct 15 2013 Karsten Hopp 7.4.052-1 +- patchlevel 052 + +* Wed Sep 11 2013 Karsten Hopp 7.4.027-2 +- update vim icons (#1004788) +- check if 'id -u' returns empty string (vim.sh) + +* Wed Sep 11 2013 Karsten Hopp 7.4.027-1 +- patchlevel 027 + +* Wed Sep 04 2013 Karsten Hopp 7.4.016-1 +- patchlevel 016 + +* Wed Aug 28 2013 Karsten Hopp 7.4.009-1 +- patchlevel 009 + mkdir("foo/bar/", "p") gives an error message + creating a preview window on startup messes up the screen + new regexp engine can't be interrupted + too easy to write a file was not decrypted (yet) + +* Wed Aug 21 2013 Karsten Hopp 7.4.5-1 +- patchlevel 5 +- when closing a window fails ":bwipe" may hang +- "vaB" while 'virtualedit' is set selects the wrong area + +* Wed Aug 21 2013 Karsten Hopp 7.4.3-1 +- patchlevel 3, memory access error in Ruby syntax highlighting + +* Wed Aug 21 2013 Karsten Hopp 7.4.2-1 +- patchlevel 2, pattern with two alternative look-behind matches doesn't match + +* Wed Aug 21 2013 Karsten Hopp 7.4.1-1 +- patchlevel 1, 'ic' doesn't work for patterns such as [a-z] + +* Mon Aug 12 2013 Karsten Hopp 7.4.0-1 +- update to vim-7.4 + +* Sun Aug 04 2013 Fedora Release Engineering - 2:7.3.1314-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Fri Jul 26 2013 Karsten Hopp 7.3.1314-2 +- document gex and vimx in man page +- fix gvimdiff and gvimtutor man page redirects + +* Wed Jul 17 2013 Petr Pisar - 2:7.3.1314-2 +- Perl 5.18 rebuild + +* Tue Jul 09 2013 Karsten Hopp 7.3.1314-1 +- patchlevel 1314 + +* Thu Jul 04 2013 Karsten Hopp 7.3.1293-1 +- patchlevel 1293 + +* Fri Jun 14 2013 Karsten Hopp 7.3.1189-1 +- patchlevel 1189 + +* Tue Jun 04 2013 Karsten Hopp 7.3.1109-1 +- patchlevel 1109 + +* Wed May 22 2013 Karsten Hopp 7.3.1004-1 +- patchlevel 1004 + +* Wed May 22 2013 Karsten Hopp 7.3.1000-1 +- patchlevel 1000 ! + +* Tue May 21 2013 Karsten Hopp 7.3.987-1 +- patchlevel 987 + +* Tue May 21 2013 Karsten Hopp 7.3.944-2 +- consistent use of macros in spec file +- add some links to man pages + +* Tue May 14 2013 Karsten Hopp 7.3.944-1 +- patchlevel 944 + +* Mon May 13 2013 Karsten Hopp 7.3.943-2 +- add BR perl(ExtUtils::ParseXS) + +* Mon May 13 2013 Karsten Hopp 7.3.943-1 +- patchlevel 943 + +* Wed May 08 2013 Karsten Hopp 7.3.931-1 +- patchlevel 931 + +* Wed May 08 2013 Karsten Hopp 7.3.903-1 +- fix ruby version check + +* Fri Apr 19 2013 Karsten Hopp 7.3.903-1 +- drop crv patch +- update 7.3.838 patch, it was broken upstream + +* Mon Apr 15 2013 Karsten Hopp 7.3.903-1 +- patchlevel 903 + +* Mon Feb 18 2013 Karsten Hopp 7.3.822-1 +- patchlevel 822 + +* Fri Feb 15 2013 Toshio Kuratomi - 7.3.797-2 +- Only use --vendor for desktop-file-install on F18 or less + +* Thu Jan 31 2013 Karsten Hopp 7.3.797-1 +- patchlevel 797 + +* Mon Jan 28 2013 Karsten Hopp 7.3.785-1 +- patchlevel 785 + +* Tue Nov 20 2012 Karsten Hopp 7.3.715-1 +- patchlevel 715 + +* Mon Nov 12 2012 Karsten Hopp 7.3.712-1 +- patchlevel 712 + +* Mon Nov 12 2012 Karsten Hopp 7.3.682-2 +- fix vim.csh syntax + +* Tue Oct 23 2012 Karsten Hopp 7.3.712-1 +- patchlevel 712 + +* Mon Oct 15 2012 Karsten Hopp 7.3.691-1 +- patchlevel 691 + +* Fri Oct 05 2012 Karsten Hopp 7.3.682-1 +- patchlevel 682 +- use --enable-rubyinterp=dynamic and --enable-pythoninterp=dynamic + +* Mon Sep 03 2012 Karsten Hopp 7.3.646-1 +- patchlevel 646 + +* Tue Aug 28 2012 Karsten Hopp 7.3.638-2 +- fix some man page typos (#668894, #675480) +- own usr/share/vim/vimfiles/doc/tags (#845564) +- add path to csope database (#844843) + +* Tue Aug 28 2012 Karsten Hopp 7.3.638-1 +- patchlevel 638 + +# vim:nrformats-=octal