diff options
Diffstat (limited to 'patches/source/vim')
408 files changed, 82260 insertions, 0 deletions
diff --git a/patches/source/vim/doinst.sh b/patches/source/vim/doinst.sh new file mode 100644 index 000000000..f1ccd5ca3 --- /dev/null +++ b/patches/source/vim/doinst.sh @@ -0,0 +1,5 @@ + +# If there's no vi link, take over: +if [ ! -r usr/bin/vi ]; then + ( cd usr/bin ; ln -sf vim vi ) +fi diff --git a/patches/source/vim/gvim.desktop b/patches/source/vim/gvim.desktop new file mode 100644 index 000000000..520c72e61 --- /dev/null +++ b/patches/source/vim/gvim.desktop @@ -0,0 +1,120 @@ +[Desktop Entry] +Encoding=UTF-8 +Name=Vi IMproved +Name[af]=Vi Verbeterde +Name[ar]=في.أي المحسن +Name[bn]=ভি-আই উন্নত +Name[br]=Vi gwellaet +Name[ca]=Vi millorat +Name[cy]=VIM (Vi wedi'i wella) +Name[da]=Vi IMproved (Vi forbedret) +Name[eo]=VIM +Name[fa]=Vi پیشرفت کرده VIM +Name[hi]=वीआई इम्प्रूव्ड +Name[hu]=VIM +Name[is]=Vi endurbættur (vim) +Name[it]=Vi iMproved +Name[ko]=더 나은 Vi +Name[mn]=Сайжирсан Vi +Name[nso]=KAonafaditswe ka Vi +Name[oc]=VI aMillorat +Name[pl]=Poprawiony VI (vim) +Name[pt_BR]=Vi melhorado +Name[ru]=Улучшенный vi +Name[rw]=Vi Ivuguruwe +Name[sl]=Izboljšani vi (vim) +Name[sv]=Förbättrad Vi +Name[ta]=Vi மேம்படுத்தப்பட்ட +Name[tg]=Vi пешрафт кардаи VIM +Name[th]=VI IMprove +Name[uz]=Яхшиланган Vi +Name[ven]=Vi Khwinifhadzhwa +Name[vi]=Vi Cải tiến +Name[wa]=VIM +Name[zh_CN]=改进的 VI (VIM) +Name[zh_TW]=VIM +Name[zu]=I-Vi yenziwe ngcono +GenericName=Text Editor +GenericName[af]=Teks Redigeerder +GenericName[ar]=محرر نصوص +GenericName[az]=Mətn Editoru +GenericName[be]=Тэкставы рэдактар +GenericName[bg]=Текстов редактор +GenericName[bn]=টেক্সট সম্পাদক +GenericName[br]=Aozer skrid +GenericName[bs]=Tekst editor +GenericName[ca]=Editor de text +GenericName[cs]=Textový editor +GenericName[cy]=Golygydd Testun +GenericName[da]= Teksteditor +GenericName[de]=Texteditor +GenericName[el]=Επεξεργαστής κειμένου +GenericName[eo]=Tekstredaktilo +GenericName[es]=Editor de texto +GenericName[et]=Tekstiredaktor +GenericName[eu]=Testu editorea +GenericName[fa]=ویرایشگر متن +GenericName[fi]=Tekstieditori +GenericName[fo]=Tekstritil +GenericName[fr]=Éditeur de texte +GenericName[fy]=Tekst Bewurker +GenericName[ga]=Eagarthóir Téacs +GenericName[gl]=Editor de Textos +GenericName[he]=עורך טקסט +GenericName[hi]=पाठ संपादक +GenericName[hr]=Uređivač teksta +GenericName[hsb]=Wobdźěłar tekstow +GenericName[hu]=Szövegszerkesztő +GenericName[is]=Textaritill +GenericName[it]=Editor di testi +GenericName[ja]=テキストエディタ +GenericName[km]=កម្មវិធីវាយអត្ថបទ +GenericName[ko]=글월 편집기 +GenericName[lo]=ເຄື່ອງມືແກ້ໄຂຂໍ້ຄວາມ +GenericName[lt]=Teksto rengyklė +GenericName[lv]=Teksta Redaktors +GenericName[mk]=Уредувач на текст +GenericName[mn]=Текст боловсруулагч +GenericName[ms]=Penyunting Teks +GenericName[mt]=Editur tat-test +GenericName[nb]=Skriveprogram +GenericName[nds]=Texteditor +GenericName[nl]=Teksteditor +GenericName[nn]=Skriveprogram +GenericName[nso]=Mofetosi wa Sengwalwana +GenericName[pa]=ਪਾਠ ਸੰਪਾਦਕ +GenericName[pl]=Edytor tekstu +GenericName[pt]=Editor de Texto +GenericName[pt_BR]=Editor de Texto +GenericName[ro]=Editor de text +GenericName[ru]=Текстовый редактор +GenericName[rw]=Muhinduzi Umwandiko +GenericName[se]=Čállinprográmma +GenericName[sk]=Textový editor +GenericName[sl]=Urejevalnik besedil +GenericName[sr]=Уређивач текста +GenericName[sr@Latn]=Uređivač teksta +GenericName[ss]=Sihleli sembhalo +GenericName[sv]=Texteditor +GenericName[ta]=உரை தொகுப்பாளர் +GenericName[tg]=Муҳаррири матн +GenericName[th]=โปรแกรมแก้ไขข้อความ +GenericName[tr]=Metin Düzenleyici +GenericName[tt]=Mäten Tözätkeçe +GenericName[uk]=Редактор текстів +GenericName[uz]=Матн таҳрирчи +GenericName[ven]=Musengulusi wa Manwalwa +GenericName[vi]=Trình soạn văn bản +GenericName[wa]=Aspougneu di tecse +GenericName[xh]=Umhleli Wombhalo +GenericName[zh_CN]=文本编辑器 +GenericName[zh_TW]=文字編輯器 +GenericName[zu]=Umlungisi wombhalo +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.png +Type=Application +Terminal=false +X-KDE-StartupNotify=true +X-KDE-AuthorizeAction=shell_access +Categories=TextEditor; diff --git a/patches/source/vim/gvim.png b/patches/source/vim/gvim.png Binary files differnew file mode 100644 index 000000000..2bdc8bd8c --- /dev/null +++ b/patches/source/vim/gvim.png diff --git a/patches/source/vim/patches/7.4.001 b/patches/source/vim/patches/7.4.001 new file mode 100644 index 000000000..5788972a5 --- /dev/null +++ b/patches/source/vim/patches/7.4.001 @@ -0,0 +1,489 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.001 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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/patches/source/vim/patches/7.4.002 b/patches/source/vim/patches/7.4.002 new file mode 100644 index 000000000..d92f4de6c --- /dev/null +++ b/patches/source/vim/patches/7.4.002 @@ -0,0 +1,77 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.002 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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\@<!\)\/', 'x = /word/;', '/']) ++ :" + :""""" \@> + :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\@<!\)\/ ++ OK 1 - \(r\@<=\|\w\@<!\)\/ ++ OK 2 - \(r\@<=\|\w\@<!\)\/ + OK 0 - \(a*\)\@>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/patches/source/vim/patches/7.4.003 b/patches/source/vim/patches/7.4.003 new file mode 100644 index 000000000..9aad3c8c8 --- /dev/null +++ b/patches/source/vim/patches/7.4.003 @@ -0,0 +1,100 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.003 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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/patches/source/vim/patches/7.4.004 b/patches/source/vim/patches/7.4.004 new file mode 100644 index 000000000..f629d673f --- /dev/null +++ b/patches/source/vim/patches/7.4.004 @@ -0,0 +1,232 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.004 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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/patches/source/vim/patches/7.4.005 b/patches/source/vim/patches/7.4.005 new file mode 100644 index 000000000..f85d1f0e3 --- /dev/null +++ b/patches/source/vim/patches/7.4.005 @@ -0,0 +1,48 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.005 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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/patches/source/vim/patches/7.4.006 b/patches/source/vim/patches/7.4.006 new file mode 100644 index 000000000..55d3802c4 --- /dev/null +++ b/patches/source/vim/patches/7.4.006 @@ -0,0 +1,66 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.006 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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/patches/source/vim/patches/7.4.007 b/patches/source/vim/patches/7.4.007 new file mode 100644 index 000000000..5495ffbf9 --- /dev/null +++ b/patches/source/vim/patches/7.4.007 @@ -0,0 +1,95 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.007 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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/patches/source/vim/patches/7.4.008 b/patches/source/vim/patches/7.4.008 new file mode 100644 index 000000000..6abd493f9 --- /dev/null +++ b/patches/source/vim/patches/7.4.008 @@ -0,0 +1,71 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.008 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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/patches/source/vim/patches/7.4.009 b/patches/source/vim/patches/7.4.009 new file mode 100644 index 000000000..f5e5fa609 --- /dev/null +++ b/patches/source/vim/patches/7.4.009 @@ -0,0 +1,64 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.009 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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/patches/source/vim/patches/7.4.010 b/patches/source/vim/patches/7.4.010 new file mode 100644 index 000000000..fee6ba5b4 --- /dev/null +++ b/patches/source/vim/patches/7.4.010 @@ -0,0 +1,79 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.010 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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/patches/source/vim/patches/7.4.011 b/patches/source/vim/patches/7.4.011 new file mode 100644 index 000000000..efff82c5e --- /dev/null +++ b/patches/source/vim/patches/7.4.011 @@ -0,0 +1,100 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.011 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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/patches/source/vim/patches/7.4.012 b/patches/source/vim/patches/7.4.012 new file mode 100644 index 000000000..f831442ea --- /dev/null +++ b/patches/source/vim/patches/7.4.012 @@ -0,0 +1,202 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.012 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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/patches/source/vim/patches/7.4.013 b/patches/source/vim/patches/7.4.013 new file mode 100644 index 000000000..dcbe0fb3e --- /dev/null +++ b/patches/source/vim/patches/7.4.013 @@ -0,0 +1,99 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.013 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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/patches/source/vim/patches/7.4.014 b/patches/source/vim/patches/7.4.014 new file mode 100644 index 000000000..f6554337f --- /dev/null +++ b/patches/source/vim/patches/7.4.014 @@ -0,0 +1,102 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.014 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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/patches/source/vim/patches/7.4.015 b/patches/source/vim/patches/7.4.015 new file mode 100644 index 000000000..e8b284d12 --- /dev/null +++ b/patches/source/vim/patches/7.4.015 @@ -0,0 +1,106 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.015 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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/patches/source/vim/patches/7.4.016 b/patches/source/vim/patches/7.4.016 new file mode 100644 index 000000000..c58c605f5 --- /dev/null +++ b/patches/source/vim/patches/7.4.016 @@ -0,0 +1,221 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.016 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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/patches/source/vim/patches/7.4.017 b/patches/source/vim/patches/7.4.017 new file mode 100644 index 000000000..7d7fad83f --- /dev/null +++ b/patches/source/vim/patches/7.4.017 @@ -0,0 +1,78 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.017 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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/patches/source/vim/patches/7.4.018 b/patches/source/vim/patches/7.4.018 new file mode 100644 index 000000000..2214c30b2 --- /dev/null +++ b/patches/source/vim/patches/7.4.018 @@ -0,0 +1,45 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.018 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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/patches/source/vim/patches/7.4.019 b/patches/source/vim/patches/7.4.019 new file mode 100644 index 000000000..b1532c19c --- /dev/null +++ b/patches/source/vim/patches/7.4.019 @@ -0,0 +1,61 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.019 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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/patches/source/vim/patches/7.4.020 b/patches/source/vim/patches/7.4.020 new file mode 100644 index 000000000..942d82fe2 --- /dev/null +++ b/patches/source/vim/patches/7.4.020 @@ -0,0 +1,82 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.020 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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/patches/source/vim/patches/7.4.021 b/patches/source/vim/patches/7.4.021 new file mode 100644 index 000000000..0936d9a19 --- /dev/null +++ b/patches/source/vim/patches/7.4.021 @@ -0,0 +1,86 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.021 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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/patches/source/vim/patches/7.4.022 b/patches/source/vim/patches/7.4.022 new file mode 100644 index 000000000..81a0901f5 --- /dev/null +++ b/patches/source/vim/patches/7.4.022 @@ -0,0 +1,148 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.022 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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/patches/source/vim/patches/7.4.023 b/patches/source/vim/patches/7.4.023 new file mode 100644 index 000000000..03005213e --- /dev/null +++ b/patches/source/vim/patches/7.4.023 @@ -0,0 +1,53 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.023 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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/patches/source/vim/patches/7.4.024 b/patches/source/vim/patches/7.4.024 new file mode 100644 index 000000000..da0df9c6f --- /dev/null +++ b/patches/source/vim/patches/7.4.024 @@ -0,0 +1,61 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.024 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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/patches/source/vim/patches/7.4.025 b/patches/source/vim/patches/7.4.025 new file mode 100644 index 000000000..9ead176eb --- /dev/null +++ b/patches/source/vim/patches/7.4.025 @@ -0,0 +1,62 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.025 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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/patches/source/vim/patches/7.4.026 b/patches/source/vim/patches/7.4.026 new file mode 100644 index 000000000..8add91f7a --- /dev/null +++ b/patches/source/vim/patches/7.4.026 @@ -0,0 +1,65 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.026 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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/patches/source/vim/patches/7.4.027 b/patches/source/vim/patches/7.4.027 new file mode 100644 index 000000000..ab43d59ac --- /dev/null +++ b/patches/source/vim/patches/7.4.027 @@ -0,0 +1,89 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.027 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.027 (after 7.4.025) +Problem: Another valgrind error when using CTRL-X CTRL-F at the start of + the line. (Dominique Pelle) +Solution: Don't call mb_ptr_back() at the start of the line. Add a test. +Files: src/edit.c, src/testdir/test32.in + + +*** ../vim-7.4.026/src/edit.c 2013-09-08 16:03:40.000000000 +0200 +--- src/edit.c 2013-09-08 18:18:32.000000000 +0200 +*************** +*** 5183,5197 **** + } + 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 (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; +--- 5183,5201 ---- + } + else if (ctrl_x_mode == CTRL_X_FILES) + { + /* Go back to just before the first filename character. */ +! if (startcol > 0) +! { +! char_u *p = line + startcol; +! + mb_ptr_back(line, p); +! while (p > line && vim_isfilec(PTR2CHAR(p))) +! mb_ptr_back(line, p); +! if (p == line && vim_isfilec(PTR2CHAR(p))) +! startcol = 0; +! else +! startcol = (int)(p - line) + 1; +! } + + compl_col += startcol; + compl_length = (int)curs_col - startcol; +*** ../vim-7.4.026/src/testdir/test32.in 2010-05-15 13:04:10.000000000 +0200 +--- src/testdir/test32.in 2013-09-08 18:08:07.000000000 +0200 +*************** +*** 36,41 **** +--- 36,44 ---- + :w Xtest11.one + :w Xtest11.two + OIXA ++ :" use CTRL-X CTRL-F to complete Xtest11.one, remove it and then use ++ :" CTRL-X CTRL-F again to verify this doesn't cause trouble. ++ OXddk + :se cpt=w + OST + :se cpt=u nohid +*** ../vim-7.4.026/src/version.c 2013-09-08 16:07:03.000000000 +0200 +--- src/version.c 2013-09-08 18:14:17.000000000 +0200 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 27, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +190. You quickly hand over your wallet, leather jacket, and car keys + during a mugging, then proceed to beat the crap out of your + assailant when he asks for your 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/patches/source/vim/patches/7.4.028 b/patches/source/vim/patches/7.4.028 new file mode 100644 index 000000000..4a0e3cf9d --- /dev/null +++ b/patches/source/vim/patches/7.4.028 @@ -0,0 +1,753 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.028 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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, <arpadffy@polarhome.com> + # Sandor Kopanyi, <sandor.kopanyi@mailbox.hu> + # +! # 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, <arpadffy@polarhome.com> + # Sandor Kopanyi, <sandor.kopanyi@mailbox.hu> + # +! # 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/patches/source/vim/patches/7.4.029 b/patches/source/vim/patches/7.4.029 new file mode 100644 index 000000000..b87e3a356 --- /dev/null +++ b/patches/source/vim/patches/7.4.029 @@ -0,0 +1,63 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.029 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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/patches/source/vim/patches/7.4.030 b/patches/source/vim/patches/7.4.030 new file mode 100644 index 000000000..d685df673 --- /dev/null +++ b/patches/source/vim/patches/7.4.030 @@ -0,0 +1,109 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.030 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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/patches/source/vim/patches/7.4.031 b/patches/source/vim/patches/7.4.031 new file mode 100644 index 000000000..f4e49d86b --- /dev/null +++ b/patches/source/vim/patches/7.4.031 @@ -0,0 +1,54 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.031 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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/patches/source/vim/patches/7.4.032 b/patches/source/vim/patches/7.4.032 new file mode 100644 index 000000000..9e25dc4ee --- /dev/null +++ b/patches/source/vim/patches/7.4.032 @@ -0,0 +1,82 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.032 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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/patches/source/vim/patches/7.4.033 b/patches/source/vim/patches/7.4.033 new file mode 100644 index 000000000..7eba8a0af --- /dev/null +++ b/patches/source/vim/patches/7.4.033 @@ -0,0 +1,116 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.033 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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/patches/source/vim/patches/7.4.034 b/patches/source/vim/patches/7.4.034 new file mode 100644 index 000000000..f111e1161 --- /dev/null +++ b/patches/source/vim/patches/7.4.034 @@ -0,0 +1,180 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.034 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.034 +Problem: Using "p" in Visual block mode only changes the first line. +Solution: Repeat the put in all text in the block. (Christian Brabandt) +Files: runtime/doc/change.txt, src/ops.c, src/normal.c, + src/testdir/test20.in, src/testdir/test20.ok + + +*** ../vim-7.4.033/runtime/doc/change.txt 2013-08-10 13:24:52.000000000 +0200 +--- runtime/doc/change.txt 2013-09-22 15:12:20.000000000 +0200 +*************** +*** 1069,1074 **** +--- 1069,1079 ---- + replace and use "0p . You can repeat this as many times as you like, the + unnamed register will be changed each time. + ++ When you use a blockwise Visual mode command and yank only a single line into ++ a register, a paste on a visual selected area will paste that single line on ++ each of the selected lines (thus replacing the blockwise selected region by a ++ block of the pasted line). ++ + *blockwise-register* + If you use a blockwise Visual mode command to get the text into the register, + the block of text will be inserted before ("P") or after ("p") the cursor +*** ../vim-7.4.033/src/ops.c 2013-08-09 19:34:32.000000000 +0200 +--- src/ops.c 2013-09-22 15:18:03.000000000 +0200 +*************** +*** 3776,3800 **** + */ + if (y_type == MCHAR && y_size == 1) + { +! totlen = count * yanklen; +! if (totlen) +! { +! oldp = ml_get(lnum); +! newp = alloc_check((unsigned)(STRLEN(oldp) + totlen + 1)); +! if (newp == NULL) +! goto end; /* alloc() will give error message */ +! mch_memmove(newp, oldp, (size_t)col); +! ptr = newp + col; +! for (i = 0; i < count; ++i) + { +! mch_memmove(ptr, y_array[0], (size_t)yanklen); +! ptr += yanklen; + } +! STRMOVE(ptr, oldp + col); +! ml_replace(lnum, newp, FALSE); +! /* Put cursor on last putted char. */ +! curwin->w_cursor.col += (colnr_T)(totlen - 1); +! } + curbuf->b_op_end = curwin->w_cursor; + /* For "CTRL-O p" in Insert mode, put cursor after last char */ + if (totlen && (restart_edit != 0 || (flags & PUT_CURSEND))) +--- 3776,3817 ---- + */ + if (y_type == MCHAR && y_size == 1) + { +! do { +! totlen = count * yanklen; +! if (totlen > 0) + { +! oldp = ml_get(lnum); +! newp = alloc_check((unsigned)(STRLEN(oldp) + totlen + 1)); +! if (newp == NULL) +! goto end; /* alloc() gave an error message */ +! mch_memmove(newp, oldp, (size_t)col); +! ptr = newp + col; +! for (i = 0; i < count; ++i) +! { +! mch_memmove(ptr, y_array[0], (size_t)yanklen); +! ptr += yanklen; +! } +! STRMOVE(ptr, oldp + col); +! ml_replace(lnum, newp, FALSE); +! /* Place cursor on last putted char. */ +! if (lnum == curwin->w_cursor.lnum) +! curwin->w_cursor.col += (colnr_T)(totlen - 1); + } +! #ifdef FEAT_VISUAL +! if (VIsual_active) +! lnum++; +! #endif +! } while ( +! #ifdef FEAT_VISUAL +! VIsual_active && lnum <= curbuf->b_visual.vi_end.lnum +! #else +! 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 */ + if (totlen && (restart_edit != 0 || (flags & PUT_CURSEND))) +*** ../vim-7.4.033/src/normal.c 2013-07-14 13:24:37.000000000 +0200 +--- src/normal.c 2013-09-22 15:15:18.000000000 +0200 +*************** +*** 9518,9523 **** +--- 9518,9525 ---- + /* cursor is at the end of the line or end of file, put + * forward. */ + dir = FORWARD; ++ /* May have been reset in do_put(). */ ++ VIsual_active = TRUE; + } + #endif + do_put(cap->oap->regname, dir, cap->count1, flags); +*** ../vim-7.4.033/src/testdir/test20.in 2010-05-15 13:04:10.000000000 +0200 +--- src/testdir/test20.in 2013-09-22 15:11:37.000000000 +0200 +*************** +*** 9,19 **** + @auY:quit! + GP + /start here$ +! jjlld +! :/here$/,$-1w! test.out + :qa! + ENDTEST + + test text test tex start here + some text + test text +--- 9,25 ---- + @auY:quit! + GP + /start here$ +! "by$jjlld +! /456$ +! jj"bP +! :/56$/,$-1w! test.out + :qa! + ENDTEST + ++ 123456 ++ 234567 ++ 345678 ++ + test text test tex start here + some text + test text +*** ../vim-7.4.033/src/testdir/test20.ok 2010-05-15 13:04:10.000000000 +0200 +--- src/testdir/test20.ok 2013-09-22 15:11:37.000000000 +0200 +*************** +*** 1,3 **** +--- 1,7 ---- ++ 123start here56 ++ 234start here67 ++ 345start here78 ++ + test text test tex rt here + somext + tesext +*** ../vim-7.4.033/src/version.c 2013-09-22 15:03:34.000000000 +0200 +--- src/version.c 2013-09-22 15:14:04.000000000 +0200 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 34, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +249. You've forgotten what the outside looks like. + + /// 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/patches/source/vim/patches/7.4.035 b/patches/source/vim/patches/7.4.035 new file mode 100644 index 000000000..9c4664a6e --- /dev/null +++ b/patches/source/vim/patches/7.4.035 @@ -0,0 +1,53 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.035 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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/patches/source/vim/patches/7.4.036 b/patches/source/vim/patches/7.4.036 new file mode 100644 index 000000000..49afc269a --- /dev/null +++ b/patches/source/vim/patches/7.4.036 @@ -0,0 +1,273 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.036 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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/patches/source/vim/patches/7.4.037 b/patches/source/vim/patches/7.4.037 new file mode 100644 index 000000000..3c6369b72 --- /dev/null +++ b/patches/source/vim/patches/7.4.037 @@ -0,0 +1,130 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.037 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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\@<!\)\/', 'x = /word/;', '/']) ++ :call add(tl, [2, '^[a-z]\+\ze \&\(asdf\)\@<!', 'foo bar', 'foo']) + :" + :""""" \@> + :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\@<!\)\/ + OK 1 - \(r\@<=\|\w\@<!\)\/ + OK 2 - \(r\@<=\|\w\@<!\)\/ ++ OK 0 - ^[a-z]\+\ze \&\(asdf\)\@<! ++ OK 1 - ^[a-z]\+\ze \&\(asdf\)\@<! ++ OK 2 - ^[a-z]\+\ze \&\(asdf\)\@<! + OK 0 - \(a*\)\@>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/patches/source/vim/patches/7.4.038 b/patches/source/vim/patches/7.4.038 new file mode 100644 index 000000000..0aae370e3 --- /dev/null +++ b/patches/source/vim/patches/7.4.038 @@ -0,0 +1,116 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.038 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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/patches/source/vim/patches/7.4.039 b/patches/source/vim/patches/7.4.039 new file mode 100644 index 000000000..5d653e353 --- /dev/null +++ b/patches/source/vim/patches/7.4.039 @@ -0,0 +1,217 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.039 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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/patches/source/vim/patches/7.4.040 b/patches/source/vim/patches/7.4.040 new file mode 100644 index 000000000..a60022366 --- /dev/null +++ b/patches/source/vim/patches/7.4.040 @@ -0,0 +1,68 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.040 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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/patches/source/vim/patches/7.4.041 b/patches/source/vim/patches/7.4.041 new file mode 100644 index 000000000..190604e93 --- /dev/null +++ b/patches/source/vim/patches/7.4.041 @@ -0,0 +1,61 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.041 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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/patches/source/vim/patches/7.4.042 b/patches/source/vim/patches/7.4.042 new file mode 100644 index 000000000..648a1bfef --- /dev/null +++ b/patches/source/vim/patches/7.4.042 @@ -0,0 +1,71 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.042 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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/patches/source/vim/patches/7.4.043 b/patches/source/vim/patches/7.4.043 new file mode 100644 index 000000000..0c3d852ca --- /dev/null +++ b/patches/source/vim/patches/7.4.043 @@ -0,0 +1,89 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.043 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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/patches/source/vim/patches/7.4.044 b/patches/source/vim/patches/7.4.044 new file mode 100644 index 000000000..3d8832dfa --- /dev/null +++ b/patches/source/vim/patches/7.4.044 @@ -0,0 +1,83 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.044 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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/patches/source/vim/patches/7.4.045 b/patches/source/vim/patches/7.4.045 new file mode 100644 index 000000000..0e82735ac --- /dev/null +++ b/patches/source/vim/patches/7.4.045 @@ -0,0 +1,111 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.045 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.045 +Problem: substitute() does not work properly when the pattern starts with + "\ze". +Solution: Detect an empty match. (Christian Brabandt) +Files: src/eval.c, src/testdir/test80.in, src/testdir/test80.ok + + +*** ../vim-7.4.044/src/eval.c 2013-09-25 21:00:24.000000000 +0200 +--- src/eval.c 2013-09-29 21:03:22.000000000 +0200 +*************** +*** 24301,24306 **** +--- 24301,24307 ---- + 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; +*************** +*** 24339,24358 **** + (void)vim_regsub(®match, sub, (char_u *)ga.ga_data + + ga.ga_len + i, TRUE, TRUE, FALSE); + ga.ga_len += i + sublen - 1; +! /* avoid getting stuck on a match with an empty string */ +! if (tail == regmatch.endp[0]) + { +! if (*tail == NUL) +! break; + *((char_u *)ga.ga_data + ga.ga_len) = *tail++; + ++ga.ga_len; + } +- else +- { +- tail = regmatch.endp[0]; +- if (*tail == NUL) +- break; +- } + if (!do_all) + break; + } +--- 24340,24356 ---- + (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; + } +*** ../vim-7.4.044/src/testdir/test80.in 2013-03-19 17:30:51.000000000 +0100 +--- src/testdir/test80.in 2013-09-29 20:59:00.000000000 +0200 +*************** +*** 142,147 **** +--- 142,149 ---- + :$put =\"\n\nTEST_7:\" + :$put =substitute('A
A', 'A.', '\=submatch(0)', '') + :$put =substitute(\"B\nB\", 'B.', '\=submatch(0)', '') ++ :$put =substitute('-bb', '\zeb', 'a', 'g') ++ :$put =substitute('-bb', '\ze', 'c', 'g') + /^TEST_8 + ENDTEST + +*** ../vim-7.4.044/src/testdir/test80.ok 2013-03-19 17:31:45.000000000 +0100 +--- src/testdir/test80.ok 2013-09-29 20:59:35.000000000 +0200 +*************** +*** 103,108 **** +--- 103,110 ---- + A
A + B + B ++ -abab ++ c-cbcbc + + + TEST_8: +*** ../vim-7.4.044/src/version.c 2013-09-29 19:05:17.000000000 +0200 +--- src/version.c 2013-09-29 21:04:50.000000000 +0200 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 45, + /**/ + +-- +Just think of all the things we haven't thought of yet. + + /// 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/patches/source/vim/patches/7.4.046 b/patches/source/vim/patches/7.4.046 new file mode 100644 index 000000000..5bb426582 --- /dev/null +++ b/patches/source/vim/patches/7.4.046 @@ -0,0 +1,80 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.046 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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/patches/source/vim/patches/7.4.047 b/patches/source/vim/patches/7.4.047 new file mode 100644 index 000000000..2871340b7 --- /dev/null +++ b/patches/source/vim/patches/7.4.047 @@ -0,0 +1,56 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.047 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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/patches/source/vim/patches/7.4.048 b/patches/source/vim/patches/7.4.048 new file mode 100644 index 000000000..6e911a0bf --- /dev/null +++ b/patches/source/vim/patches/7.4.048 @@ -0,0 +1,96 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.048 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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/patches/source/vim/patches/7.4.049 b/patches/source/vim/patches/7.4.049 new file mode 100644 index 000000000..c1a23b989 --- /dev/null +++ b/patches/source/vim/patches/7.4.049 @@ -0,0 +1,67 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.049 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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/patches/source/vim/patches/7.4.050 b/patches/source/vim/patches/7.4.050 new file mode 100644 index 000000000..afe2b044f --- /dev/null +++ b/patches/source/vim/patches/7.4.050 @@ -0,0 +1,90 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.050 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.050 +Problem: "gn" selects too much for the pattern "\d" when there are two + lines with a single digit. (Ryan Carney) +Solution: Adjust the logic of is_one_char(). (Christian Brabandt) +Files: src/search.c, src/testdir/test53.in, src/testdir/test53.ok + + +*** ../vim-7.4.049/src/search.c 2013-08-14 17:45:25.000000000 +0200 +--- src/search.c 2013-10-02 21:49:40.000000000 +0200 +*************** +*** 4680,4687 **** + && regmatch.startpos[0].lnum == regmatch.endpos[0].lnum + && regmatch.startpos[0].col == regmatch.endpos[0].col); + +! if (!result && incl(&pos) == 0 && pos.col == regmatch.endpos[0].col) +! result = TRUE; + } + + called_emsg |= save_called_emsg; +--- 4680,4687 ---- + && regmatch.startpos[0].lnum == regmatch.endpos[0].lnum + && regmatch.startpos[0].col == regmatch.endpos[0].col); + +! if (!result && inc(&pos) >= 0 && pos.col == regmatch.endpos[0].col) +! result = TRUE; + } + + called_emsg |= save_called_emsg; +*** ../vim-7.4.049/src/testdir/test53.in 2013-06-30 14:31:56.000000000 +0200 +--- src/testdir/test53.in 2013-10-02 21:47:10.000000000 +0200 +*************** +*** 46,51 **** +--- 46,54 ---- + :set selection=exclusive + $cgNmongoose/i + cgnj ++ :" Make sure there is no other match y uppercase. ++ /x59 ++ gggnd + :/^start:/,/^end:/wq! test.out + ENDTEST + +*************** +*** 75,78 **** +--- 78,84 ---- + uniquepattern uniquepattern + my very excellent mother just served us nachos + for (i=0; i<=10; i++) ++ Y ++ text ++ Y + end: +*** ../vim-7.4.049/src/testdir/test53.ok 2013-06-30 14:31:56.000000000 +0200 +--- src/testdir/test53.ok 2013-10-02 21:47:34.000000000 +0200 +*************** +*** 27,30 **** +--- 27,33 ---- + uniquepattern + my very excellent mongoose just served us nachos + for (j=0; i<=10; i++) ++ ++ text ++ Y + end: +*** ../vim-7.4.049/src/version.c 2013-10-02 18:43:00.000000000 +0200 +--- src/version.c 2013-10-02 21:51:34.000000000 +0200 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 50, + /**/ + +-- +Why doesn't Tarzan have a beard? + + /// 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/patches/source/vim/patches/7.4.051 b/patches/source/vim/patches/7.4.051 new file mode 100644 index 000000000..ca5c3a04e --- /dev/null +++ b/patches/source/vim/patches/7.4.051 @@ -0,0 +1,67 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.051 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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/patches/source/vim/patches/7.4.052 b/patches/source/vim/patches/7.4.052 new file mode 100644 index 000000000..502d07b56 --- /dev/null +++ b/patches/source/vim/patches/7.4.052 @@ -0,0 +1,197 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.052 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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/patches/source/vim/patches/7.4.053 b/patches/source/vim/patches/7.4.053 new file mode 100644 index 000000000..22724fc70 --- /dev/null +++ b/patches/source/vim/patches/7.4.053 @@ -0,0 +1,45 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.053 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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/patches/source/vim/patches/7.4.054 b/patches/source/vim/patches/7.4.054 new file mode 100644 index 000000000..0fcffac2d --- /dev/null +++ b/patches/source/vim/patches/7.4.054 @@ -0,0 +1,53 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.054 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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/patches/source/vim/patches/7.4.055 b/patches/source/vim/patches/7.4.055 new file mode 100644 index 000000000..b6adc044f --- /dev/null +++ b/patches/source/vim/patches/7.4.055 @@ -0,0 +1,138 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.055 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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 <AvailabilityMacros.h> ++ #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/patches/source/vim/patches/7.4.056 b/patches/source/vim/patches/7.4.056 new file mode 100644 index 000000000..e8c1a346f --- /dev/null +++ b/patches/source/vim/patches/7.4.056 @@ -0,0 +1,51 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.056 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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 <AvailabilityMacros.h> ++ #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/patches/source/vim/patches/7.4.057 b/patches/source/vim/patches/7.4.057 new file mode 100644 index 000000000..aee16b6aa --- /dev/null +++ b/patches/source/vim/patches/7.4.057 @@ -0,0 +1,252 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.057 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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/patches/source/vim/patches/7.4.058 b/patches/source/vim/patches/7.4.058 new file mode 100644 index 000000000..0715c848d --- /dev/null +++ b/patches/source/vim/patches/7.4.058 @@ -0,0 +1,67 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.058 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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/patches/source/vim/patches/7.4.059 b/patches/source/vim/patches/7.4.059 new file mode 100644 index 000000000..b00cbfe04 --- /dev/null +++ b/patches/source/vim/patches/7.4.059 @@ -0,0 +1,53 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.059 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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/patches/source/vim/patches/7.4.060 b/patches/source/vim/patches/7.4.060 new file mode 100644 index 000000000..d6a767275 --- /dev/null +++ b/patches/source/vim/patches/7.4.060 @@ -0,0 +1,71 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.060 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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/patches/source/vim/patches/7.4.061 b/patches/source/vim/patches/7.4.061 new file mode 100644 index 000000000..ebd5b2d78 --- /dev/null +++ b/patches/source/vim/patches/7.4.061 @@ -0,0 +1,144 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.061 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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 <AvailabilityMacros.h> + #endif + +--- 804,810 ---- + * completely full. + */ + +! #if defined(HAVE_AVAILABILITYMACROS_H) + # include <AvailabilityMacros.h> + #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/patches/source/vim/patches/7.4.062 b/patches/source/vim/patches/7.4.062 new file mode 100644 index 000000000..dad0a420c --- /dev/null +++ b/patches/source/vim/patches/7.4.062 @@ -0,0 +1,87 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.062 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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/patches/source/vim/patches/7.4.063 b/patches/source/vim/patches/7.4.063 new file mode 100644 index 000000000..b72b0b764 --- /dev/null +++ b/patches/source/vim/patches/7.4.063 @@ -0,0 +1,105 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.063 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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"):(<class 'KeyError'>, KeyError('a',)) + dl.pop("a"):(<class 'vim.error'>, error('dictionary is locked',)) ++ >> DictionaryContains ++ "" in d:(<class 'ValueError'>, ValueError('empty keys are not allowed',)) ++ 0 in d:(<class 'TypeError'>, TypeError('expected bytes() or str() instance, but got int',)) + >> DictionaryIterNext + for i in ned: ned["a"] = 1:(<class 'RuntimeError'>, 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/patches/source/vim/patches/7.4.064 b/patches/source/vim/patches/7.4.064 Binary files differnew file mode 100644 index 000000000..771320851 --- /dev/null +++ b/patches/source/vim/patches/7.4.064 diff --git a/patches/source/vim/patches/7.4.065 b/patches/source/vim/patches/7.4.065 new file mode 100644 index 000000000..fd17fa06e --- /dev/null +++ b/patches/source/vim/patches/7.4.065 @@ -0,0 +1,70 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.065 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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/patches/source/vim/patches/7.4.066 b/patches/source/vim/patches/7.4.066 new file mode 100644 index 000000000..edab09261 --- /dev/null +++ b/patches/source/vim/patches/7.4.066 @@ -0,0 +1,354 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.066 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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/patches/source/vim/patches/7.4.067 b/patches/source/vim/patches/7.4.067 new file mode 100644 index 000000000..75a89c2aa --- /dev/null +++ b/patches/source/vim/patches/7.4.067 @@ -0,0 +1,126 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.067 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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; /* <c-\><c-o>, 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/patches/source/vim/patches/7.4.068 b/patches/source/vim/patches/7.4.068 new file mode 100644 index 000000000..a90933856 --- /dev/null +++ b/patches/source/vim/patches/7.4.068 @@ -0,0 +1,131 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.068 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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/patches/source/vim/patches/7.4.069 b/patches/source/vim/patches/7.4.069 new file mode 100644 index 000000000..ac52affcf --- /dev/null +++ b/patches/source/vim/patches/7.4.069 @@ -0,0 +1,2559 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.069 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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/patches/source/vim/patches/7.4.070 b/patches/source/vim/patches/7.4.070 new file mode 100644 index 000000000..749b7445b --- /dev/null +++ b/patches/source/vim/patches/7.4.070 @@ -0,0 +1,47 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.070 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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/patches/source/vim/patches/7.4.071 b/patches/source/vim/patches/7.4.071 new file mode 100644 index 000000000..71b2984e5 --- /dev/null +++ b/patches/source/vim/patches/7.4.071 @@ -0,0 +1,1302 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.071 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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/patches/source/vim/patches/7.4.072 b/patches/source/vim/patches/7.4.072 new file mode 100644 index 000000000..e96888e7a --- /dev/null +++ b/patches/source/vim/patches/7.4.072 @@ -0,0 +1,61 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.072 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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/patches/source/vim/patches/7.4.073 b/patches/source/vim/patches/7.4.073 new file mode 100644 index 000000000..7d9cedcff --- /dev/null +++ b/patches/source/vim/patches/7.4.073 @@ -0,0 +1,404 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.073 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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/patches/source/vim/patches/7.4.074 b/patches/source/vim/patches/7.4.074 new file mode 100644 index 000000000..70045c088 --- /dev/null +++ b/patches/source/vim/patches/7.4.074 @@ -0,0 +1,67 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.074 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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/patches/source/vim/patches/7.4.075 b/patches/source/vim/patches/7.4.075 new file mode 100644 index 000000000..f7ba21e1f --- /dev/null +++ b/patches/source/vim/patches/7.4.075 @@ -0,0 +1,290 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.075 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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, <arpadffy@polarhome.com> + # Sandor Kopanyi, <sandor.kopanyi@mailbox.hu> + # +! # 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, <arpadffy@polarhome.com> + # Sandor Kopanyi, <sandor.kopanyi@mailbox.hu> + # +! # 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/patches/source/vim/patches/7.4.076 b/patches/source/vim/patches/7.4.076 new file mode 100644 index 000000000..fa9abbc25 --- /dev/null +++ b/patches/source/vim/patches/7.4.076 @@ -0,0 +1,66 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.076 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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/patches/source/vim/patches/7.4.077 b/patches/source/vim/patches/7.4.077 new file mode 100644 index 000000000..fd2d3d7c2 --- /dev/null +++ b/patches/source/vim/patches/7.4.077 @@ -0,0 +1,63 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.077 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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/patches/source/vim/patches/7.4.078 b/patches/source/vim/patches/7.4.078 new file mode 100644 index 000000000..56b507634 --- /dev/null +++ b/patches/source/vim/patches/7.4.078 @@ -0,0 +1,114 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.078 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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/patches/source/vim/patches/7.4.079 b/patches/source/vim/patches/7.4.079 new file mode 100644 index 000000000..fbda97d82 --- /dev/null +++ b/patches/source/vim/patches/7.4.079 @@ -0,0 +1,470 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.079 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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, <arpadffy@polarhome.com> + # Sandor Kopanyi, <sandor.kopanyi@mailbox.hu> + # +! # 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, <arpadffy@polarhome.com> + # Sandor Kopanyi, <sandor.kopanyi@mailbox.hu> + # +! # 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/patches/source/vim/patches/7.4.080 b/patches/source/vim/patches/7.4.080 new file mode 100644 index 000000000..eeec1decb --- /dev/null +++ b/patches/source/vim/patches/7.4.080 @@ -0,0 +1,52 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.080 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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/patches/source/vim/patches/7.4.081 b/patches/source/vim/patches/7.4.081 new file mode 100644 index 000000000..b2c61d9ac --- /dev/null +++ b/patches/source/vim/patches/7.4.081 @@ -0,0 +1,52 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.081 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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/patches/source/vim/patches/7.4.082 b/patches/source/vim/patches/7.4.082 new file mode 100644 index 000000000..03089d662 --- /dev/null +++ b/patches/source/vim/patches/7.4.082 @@ -0,0 +1,344 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.082 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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/patches/source/vim/patches/7.4.083 b/patches/source/vim/patches/7.4.083 new file mode 100644 index 000000000..c71450eb6 --- /dev/null +++ b/patches/source/vim/patches/7.4.083 @@ -0,0 +1,136 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.083 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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/patches/source/vim/patches/7.4.084 b/patches/source/vim/patches/7.4.084 new file mode 100644 index 000000000..142e251d3 --- /dev/null +++ b/patches/source/vim/patches/7.4.084 @@ -0,0 +1,184 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.084 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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''')"):(<class 'vim.error'>, error('Vim(echoerr):jkl',)) + vim.eval("Exe('xxx_non_existent_command_xxx')"):(<class 'vim.error'>, error('Vim:E492: Not an editor command: xxx_non_existent_command_xxx',)) + vim.bindeval("Exe('xxx_non_existent_command_xxx')"):(<class 'vim.error'>, 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/patches/source/vim/patches/7.4.085 b/patches/source/vim/patches/7.4.085 new file mode 100644 index 000000000..a6e9a8047 --- /dev/null +++ b/patches/source/vim/patches/7.4.085 @@ -0,0 +1,118 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.085 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.085 +Problem: When inserting text in Visual block mode and moving the cursor the + wrong text gets repeated in other lines. +Solution: Use the '[ mark to find the start of the actually inserted text. + (Christian Brabandt) +Files: src/ops.c, src/testdir/test39.in, src/testdir/test39.ok + + +*** ../vim-7.4.084/src/ops.c 2013-11-05 07:12:59.000000000 +0100 +--- src/ops.c 2013-11-11 01:23:14.000000000 +0100 +*************** +*** 2640,2645 **** +--- 2640,2670 ---- + { + struct block_def bd2; + ++ /* 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) ++ { ++ oap->start.col = curbuf->b_op_start.col; ++ pre_textlen -= getviscol2(oap->start.col, oap->start.coladd) ++ - oap->start_vcol; ++ oap->start_vcol = getviscol2(oap->start.col, oap->start.coladd); ++ } ++ else if (oap->op_type == OP_APPEND ++ && oap->end.col >= curbuf->b_op_start.col) ++ { ++ oap->start.col = curbuf->b_op_start.col; ++ /* reset pre_textlen to the value of OP_INSERT */ ++ pre_textlen += bd.textlen; ++ pre_textlen -= getviscol2(oap->start.col, oap->start.coladd) ++ - oap->start_vcol; ++ oap->start_vcol = getviscol2(oap->start.col, oap->start.coladd); ++ oap->op_type = OP_INSERT; ++ } ++ } ++ + /* + * Spaces and tabs in the indent may have changed to other spaces and + * tabs. Get the starting column again and correct the length. +*** ../vim-7.4.084/src/testdir/test39.in 2013-11-04 01:41:11.000000000 +0100 +--- src/testdir/test39.in 2013-11-11 01:20:51.000000000 +0100 +*************** +*** 19,24 **** +--- 19,28 ---- + :" Test block-change + G$khhhhhkkcmno + :$-4,$w! test.out ++ :" Test block-insert using cursor keys for movement ++ /^aaaa/ ++ :exe ":norm! l\<C-V>jjjlllI\<Right>\<Right> \<Esc>" ++ :/^aa/,/^$/w >> test.out + :" gUe must uppercase a whole word, also when changes to SS + Gothe youtueuu endYpk0wgUe + :" gUfx must uppercase until x, inclusive. +*************** +*** 40,45 **** +--- 44,54 ---- + :qa! + ENDTEST + ++ aaaaaa ++ bbbbbb ++ cccccc ++ dddddd ++ + abcdefghijklm + abcdefghijklm + abcdefghijklm +*** ../vim-7.4.084/src/testdir/test39.ok 2013-11-04 01:41:11.000000000 +0100 +--- src/testdir/test39.ok 2013-11-11 01:20:51.000000000 +0100 +*************** +*** 3,8 **** +--- 3,13 ---- + axyzqqqqef mno ghijklm + axyzqqqqefgmnoklm + abcdqqqqijklm ++ aaa aaa ++ bbb bbb ++ ccc ccc ++ ddd ddd ++ + the YOUTUSSEUU end + - yOUSSTUSSEXu - + THE YOUTUSSEUU END +*** ../vim-7.4.084/src/version.c 2013-11-11 01:05:43.000000000 +0100 +--- src/version.c 2013-11-11 01:18:01.000000000 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 85, + /**/ + +-- +SOLDIER: What? Ridden on a horse? +ARTHUR: Yes! +SOLDIER: You're using coconuts! + "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/patches/source/vim/patches/7.4.086 b/patches/source/vim/patches/7.4.086 new file mode 100644 index 000000000..46f9eb90a --- /dev/null +++ b/patches/source/vim/patches/7.4.086 @@ -0,0 +1,145 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.086 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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 <expr> 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/patches/source/vim/patches/7.4.087 b/patches/source/vim/patches/7.4.087 new file mode 100644 index 000000000..b8c1a48a9 --- /dev/null +++ b/patches/source/vim/patches/7.4.087 @@ -0,0 +1,56 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.087 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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/patches/source/vim/patches/7.4.088 b/patches/source/vim/patches/7.4.088 new file mode 100644 index 000000000..62dc91cac --- /dev/null +++ b/patches/source/vim/patches/7.4.088 @@ -0,0 +1,564 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.088 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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/patches/source/vim/patches/7.4.089 b/patches/source/vim/patches/7.4.089 new file mode 100644 index 000000000..80697cef2 --- /dev/null +++ b/patches/source/vim/patches/7.4.089 @@ -0,0 +1,47 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.089 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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/patches/source/vim/patches/7.4.090 b/patches/source/vim/patches/7.4.090 new file mode 100644 index 000000000..a7ee9275d --- /dev/null +++ b/patches/source/vim/patches/7.4.090 @@ -0,0 +1,223 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.090 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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, <arpadffy@polarhome.com> + # Sandor Kopanyi, <sandor.kopanyi@mailbox.hu> + # +! # 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, <arpadffy@polarhome.com> + # Sandor Kopanyi, <sandor.kopanyi@mailbox.hu> + # +! # 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/patches/source/vim/patches/7.4.091 b/patches/source/vim/patches/7.4.091 new file mode 100644 index 000000000..230601df3 --- /dev/null +++ b/patches/source/vim/patches/7.4.091 @@ -0,0 +1,59 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.091 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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/patches/source/vim/patches/7.4.092 b/patches/source/vim/patches/7.4.092 new file mode 100644 index 000000000..e74888eba --- /dev/null +++ b/patches/source/vim/patches/7.4.092 @@ -0,0 +1,62 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.092 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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/patches/source/vim/patches/7.4.093 b/patches/source/vim/patches/7.4.093 new file mode 100644 index 000000000..24da0a8f3 --- /dev/null +++ b/patches/source/vim/patches/7.4.093 @@ -0,0 +1,72 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.093 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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/patches/source/vim/patches/7.4.094 b/patches/source/vim/patches/7.4.094 new file mode 100644 index 000000000..96ebc4d41 --- /dev/null +++ b/patches/source/vim/patches/7.4.094 @@ -0,0 +1,139 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.094 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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 <libintl.h>], + [gettext("Test");], +! AC_MSG_RESULT([gettext() works]); have_gettext="yes", +! olibs=$LIBS +! LIBS="$LIBS -lintl" + AC_TRY_LINK( + [#include <libintl.h>], + [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 <libintl.h>], + [gettext("Test");], +! AC_MSG_RESULT([gettext() works]); have_gettext="yes"; LIBS=$olibs, +! LIBS="-lintl" + AC_TRY_LINK( + [#include <libintl.h>], + [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 <libintl.h> +*************** +*** 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 <libintl.h> +--- 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 <libintl.h> +*************** +*** 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/patches/source/vim/patches/7.4.095 b/patches/source/vim/patches/7.4.095 new file mode 100644 index 000000000..f7abfcafb --- /dev/null +++ b/patches/source/vim/patches/7.4.095 @@ -0,0 +1,73 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.095 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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/patches/source/vim/patches/7.4.096 b/patches/source/vim/patches/7.4.096 new file mode 100644 index 000000000..be20959b3 --- /dev/null +++ b/patches/source/vim/patches/7.4.096 @@ -0,0 +1,96 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.096 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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/patches/source/vim/patches/7.4.097 b/patches/source/vim/patches/7.4.097 new file mode 100644 index 000000000..cfb618398 --- /dev/null +++ b/patches/source/vim/patches/7.4.097 @@ -0,0 +1,50 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.097 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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/patches/source/vim/patches/7.4.098 b/patches/source/vim/patches/7.4.098 new file mode 100644 index 000000000..78af90e21 --- /dev/null +++ b/patches/source/vim/patches/7.4.098 @@ -0,0 +1,243 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.098 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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 \<Esc>" ++ : 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, <arpadffy@polarhome.com> + # Sandor Kopanyi, <sandor.kopanyi@mailbox.hu> + # +! # 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, <arpadffy@polarhome.com> + # Sandor Kopanyi, <sandor.kopanyi@mailbox.hu> + # +! # 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/patches/source/vim/patches/7.4.099 b/patches/source/vim/patches/7.4.099 new file mode 100644 index 000000000..a9cf63689 --- /dev/null +++ b/patches/source/vim/patches/7.4.099 @@ -0,0 +1,113 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.099 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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\<C-V>jjjlllI\<Right>\<Right> \<Esc>" + :/^aa/,/^$/w >> test.out ++ :" Test for Visual block was created with the last <C-v>$ ++ /^A23$/ ++ :exe ":norm! l\<C-V>j$Aab\<Esc>" ++ :.,/^$/w >> test.out ++ :" Test for Visual block was created with the middle <C-v>$ (1) ++ /^B23$/ ++ :exe ":norm! l\<C-V>j$hAab\<Esc>" ++ :.,/^$/w >> test.out ++ :" Test for Visual block was created with the middle <C-v>$ (2) ++ /^C23$/ ++ :exe ":norm! l\<C-V>j$hhAab\<Esc>" ++ :.,/^$/w >> test.out + :" gUe must uppercase a whole word, also when changes to SS + Gothe youtueuu 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/patches/source/vim/patches/7.4.100 b/patches/source/vim/patches/7.4.100 new file mode 100644 index 000000000..c3c0cb647 --- /dev/null +++ b/patches/source/vim/patches/7.4.100 @@ -0,0 +1,82 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.100 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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\)\@<!$', 'foo.bat/foo.bat']) + :call add(tl, [2, '^.*\.\(.*\)/.\+\(\1\)\@<=$', 'foo.bat/foo.bat', 'foo.bat/foo.bat', 'bat', 'bat']) + :call add(tl, [2, '\\\@<!\${\(\d\+\%(:.\{-}\)\?\\\@<!\)}', '2013-06-27${0}', '${0}', '0']) ++ :call add(tl, [2, '^\(a*\)\1$', 'aaaaaaaa', 'aaaaaaaa', 'aaaa']) + :" + :"""" Look-behind with limit + :call add(tl, [2, '<\@<=span.', 'xxspanxx<spanyyy', 'spany']) +*** ../vim-7.4.099/src/testdir/test64.ok 2013-09-25 18:16:34.000000000 +0200 +--- src/testdir/test64.ok 2013-11-21 15:59:04.000000000 +0100 +*************** +*** 944,949 **** +--- 944,952 ---- + OK 0 - \\\@<!\${\(\d\+\%(:.\{-}\)\?\\\@<!\)} + OK 1 - \\\@<!\${\(\d\+\%(:.\{-}\)\?\\\@<!\)} + OK 2 - \\\@<!\${\(\d\+\%(:.\{-}\)\?\\\@<!\)} ++ OK 0 - ^\(a*\)\1$ ++ OK 1 - ^\(a*\)\1$ ++ OK 2 - ^\(a*\)\1$ + OK 0 - <\@<=span. + OK 1 - <\@<=span. + OK 2 - <\@<=span. +*** ../vim-7.4.099/src/version.c 2013-11-21 14:39:58.000000000 +0100 +--- src/version.c 2013-11-21 16:02:27.000000000 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 100, + /**/ + +-- +Sometimes you can protect millions of dollars in your budget simply by buying +a bag of cookies, dropping it on the budget anylyst's desk, and saying +something deeply personal such as "How was your weekend, big guy?" + (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/patches/source/vim/patches/7.4.101 b/patches/source/vim/patches/7.4.101 new file mode 100644 index 000000000..99150ef9a --- /dev/null +++ b/patches/source/vim/patches/7.4.101 @@ -0,0 +1,93 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.101 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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 + + <T="5">Ta 5</Title> + <T="7">Ac 7</Title> +*** ../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/patches/source/vim/patches/7.4.102 b/patches/source/vim/patches/7.4.102 new file mode 100644 index 000000000..b41341301 --- /dev/null +++ b/patches/source/vim/patches/7.4.102 @@ -0,0 +1,84 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.102 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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/patches/source/vim/patches/7.4.103 b/patches/source/vim/patches/7.4.103 new file mode 100644 index 000000000..4dbce9970 --- /dev/null +++ b/patches/source/vim/patches/7.4.103 @@ -0,0 +1,93 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.103 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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 =~ '\\<cmd'\n"); +! fprintf(fd, " let cmd = '\"\"' . $VIMRUNTIME . '\\diff\"'\n"); +! fprintf(fd, " let eq = '\"'\n"); + fprintf(fd, " else\n"); + fprintf(fd, " let cmd = substitute($VIMRUNTIME, ' ', '\" ', '') . '\\diff\"'\n"); + fprintf(fd, " endif\n"); + fprintf(fd, " else\n"); + fprintf(fd, " let cmd = $VIMRUNTIME . '\\diff'\n"); + fprintf(fd, " endif\n"); +! fprintf(fd, " silent execute '!' . cmd . ' ' . opt . arg1 . ' ' . arg2 . ' > ' . 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 =~ '\\<cmd'\n"); +! fprintf(fd, " if empty(&shellxquote)\n"); +! fprintf(fd, " let l:shxq_sav = ''\n"); +! fprintf(fd, " set shellxquote&\n"); +! fprintf(fd, " endif\n"); +! fprintf(fd, " let cmd = '\"' . $VIMRUNTIME . '\\diff\"'\n"); + fprintf(fd, " else\n"); + fprintf(fd, " let cmd = substitute($VIMRUNTIME, ' ', '\" ', '') . '\\diff\"'\n"); + fprintf(fd, " endif\n"); + fprintf(fd, " else\n"); + fprintf(fd, " let cmd = $VIMRUNTIME . '\\diff'\n"); + fprintf(fd, " endif\n"); +! fprintf(fd, " silent execute '!' . cmd . ' ' . opt . arg1 . ' ' . arg2 . ' > ' . 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/patches/source/vim/patches/7.4.104 b/patches/source/vim/patches/7.4.104 new file mode 100644 index 000000000..6e51568a3 --- /dev/null +++ b/patches/source/vim/patches/7.4.104 @@ -0,0 +1,107 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.104 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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/patches/source/vim/patches/7.4.105 b/patches/source/vim/patches/7.4.105 new file mode 100644 index 000000000..f219ac6ff --- /dev/null +++ b/patches/source/vim/patches/7.4.105 @@ -0,0 +1,58 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.105 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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/patches/source/vim/patches/7.4.106 b/patches/source/vim/patches/7.4.106 new file mode 100644 index 000000000..13ab0b117 --- /dev/null +++ b/patches/source/vim/patches/7.4.106 @@ -0,0 +1,68 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.106 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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/patches/source/vim/patches/7.4.107 b/patches/source/vim/patches/7.4.107 new file mode 100644 index 000000000..5ac7189f1 --- /dev/null +++ b/patches/source/vim/patches/7.4.107 @@ -0,0 +1,639 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.107 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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 <<EOF +- import sys + d=vim.bindeval('{}') + m=vim.bindeval('messages') + def em(expr, g=globals(), l=locals()): +--- 234,239 ---- +*************** +*** 323,328 **** +--- 340,346 ---- + :py l[0] = t.t > 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):(<class 'vim.error'>, error('Vim:E725: Calling dict function without Dictionary: DictNew',)) +! f(1, 2, 3):(<class 'vim.error'>, error('Vim:E117: Unknown function: New',)) + [0.0, 0.0] + KeyError + TypeError +*************** +*** 1186,1191 **** +--- 1186,1192 ---- + vim.eval("Exe('throw ''ghi''')"):(<class 'vim.error'>, error('ghi',)) + vim.eval("Exe('echoerr ''jkl''')"):(<class 'vim.error'>, error('Vim(echoerr):jkl',)) + vim.eval("Exe('xxx_non_existent_command_xxx')"):(<class 'vim.error'>, error('Vim:E492: Not an editor command: xxx_non_existent_command_xxx',)) ++ vim.eval("xxx_unknown_function_xxx()"):(<class 'vim.error'>, error('Vim:E117: Unknown function: xxx_unknown_function_xxx',)) + vim.bindeval("Exe('xxx_non_existent_command_xxx')"):(<class 'vim.error'>, 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/patches/source/vim/patches/7.4.108 b/patches/source/vim/patches/7.4.108 new file mode 100644 index 000000000..054234746 --- /dev/null +++ b/patches/source/vim/patches/7.4.108 @@ -0,0 +1,215 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.108 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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'. <VN> */ + 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/patches/source/vim/patches/7.4.109 b/patches/source/vim/patches/7.4.109 new file mode 100644 index 000000000..70ed86d23 --- /dev/null +++ b/patches/source/vim/patches/7.4.109 @@ -0,0 +1,123 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.109 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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. <afile> can be used for the ++ name of the actual file where this option was ++ set, and <amatch> 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/patches/source/vim/patches/7.4.110 b/patches/source/vim/patches/7.4.110 new file mode 100644 index 000000000..0a40ee90f --- /dev/null +++ b/patches/source/vim/patches/7.4.110 @@ -0,0 +1,102 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.110 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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/patches/source/vim/patches/7.4.111 b/patches/source/vim/patches/7.4.111 new file mode 100644 index 000000000..e8c7a48d8 --- /dev/null +++ b/patches/source/vim/patches/7.4.111 @@ -0,0 +1,63 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.111 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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/patches/source/vim/patches/7.4.112 b/patches/source/vim/patches/7.4.112 new file mode 100644 index 000000000..ab64e1311 --- /dev/null +++ b/patches/source/vim/patches/7.4.112 @@ -0,0 +1,70 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.112 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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/patches/source/vim/patches/7.4.113 b/patches/source/vim/patches/7.4.113 new file mode 100644 index 000000000..97059e551 --- /dev/null +++ b/patches/source/vim/patches/7.4.113 @@ -0,0 +1,101 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.113 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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/patches/source/vim/patches/7.4.114 b/patches/source/vim/patches/7.4.114 new file mode 100644 index 000000000..9b982f6b6 --- /dev/null +++ b/patches/source/vim/patches/7.4.114 @@ -0,0 +1,56 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.114 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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/patches/source/vim/patches/7.4.115 b/patches/source/vim/patches/7.4.115 new file mode 100644 index 000000000..1d1a561bb --- /dev/null +++ b/patches/source/vim/patches/7.4.115 @@ -0,0 +1,52 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.115 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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/patches/source/vim/patches/7.4.116 b/patches/source/vim/patches/7.4.116 new file mode 100644 index 000000000..f242f0500 --- /dev/null +++ b/patches/source/vim/patches/7.4.116 @@ -0,0 +1,46 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.116 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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/patches/source/vim/patches/7.4.117 b/patches/source/vim/patches/7.4.117 new file mode 100644 index 000000000..5fb026891 --- /dev/null +++ b/patches/source/vim/patches/7.4.117 @@ -0,0 +1,263 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.117 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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 <EXTERN.h> +*************** +*** 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 <inline.h> ++ #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/patches/source/vim/patches/7.4.118 b/patches/source/vim/patches/7.4.118 new file mode 100644 index 000000000..04701cc40 --- /dev/null +++ b/patches/source/vim/patches/7.4.118 @@ -0,0 +1,90 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.118 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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/patches/source/vim/patches/7.4.119 b/patches/source/vim/patches/7.4.119 new file mode 100644 index 000000000..061b81a55 --- /dev/null +++ b/patches/source/vim/patches/7.4.119 @@ -0,0 +1,245 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.119 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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 <starlet.h> + # include <socket.h> + # include <lib$routines.h> ++ # include <libdef.h> ++ # include <libdtdef.h> + + # 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 <gen64def.h> ++ #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/patches/source/vim/patches/7.4.120 b/patches/source/vim/patches/7.4.120 new file mode 100644 index 000000000..4f7a17a18 --- /dev/null +++ b/patches/source/vim/patches/7.4.120 @@ -0,0 +1,53 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.120 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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/patches/source/vim/patches/7.4.121 b/patches/source/vim/patches/7.4.121 new file mode 100644 index 000000000..2e04890ec --- /dev/null +++ b/patches/source/vim/patches/7.4.121 @@ -0,0 +1,48 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.121 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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/patches/source/vim/patches/7.4.122 b/patches/source/vim/patches/7.4.122 new file mode 100644 index 000000000..2e6e581c7 --- /dev/null +++ b/patches/source/vim/patches/7.4.122 @@ -0,0 +1,215 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.122 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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/patches/source/vim/patches/7.4.123 b/patches/source/vim/patches/7.4.123 new file mode 100644 index 000000000..b564fe405 --- /dev/null +++ b/patches/source/vim/patches/7.4.123 @@ -0,0 +1,64 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.123 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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/patches/source/vim/patches/7.4.124 b/patches/source/vim/patches/7.4.124 new file mode 100644 index 000000000..7815bf5e9 --- /dev/null +++ b/patches/source/vim/patches/7.4.124 @@ -0,0 +1,63 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.124 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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/patches/source/vim/patches/7.4.125 b/patches/source/vim/patches/7.4.125 new file mode 100644 index 000000000..04a0fe9aa --- /dev/null +++ b/patches/source/vim/patches/7.4.125 @@ -0,0 +1,57 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.125 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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/patches/source/vim/patches/7.4.126 b/patches/source/vim/patches/7.4.126 new file mode 100644 index 000000000..c7acae7d8 --- /dev/null +++ b/patches/source/vim/patches/7.4.126 @@ -0,0 +1,68 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.126 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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/patches/source/vim/patches/7.4.127 b/patches/source/vim/patches/7.4.127 new file mode 100644 index 000000000..71ce694b4 --- /dev/null +++ b/patches/source/vim/patches/7.4.127 @@ -0,0 +1,67 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.127 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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 <EXTERN.h> + #include <perl.h> + #include <XSUB.h> +*** ../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/patches/source/vim/patches/7.4.128 b/patches/source/vim/patches/7.4.128 new file mode 100644 index 000000000..ead1b6766 --- /dev/null +++ b/patches/source/vim/patches/7.4.128 @@ -0,0 +1,66 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.128 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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 <EXTERN.h> + #include <perl.h> + #include <XSUB.h> +*** ../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/patches/source/vim/patches/7.4.129 b/patches/source/vim/patches/7.4.129 new file mode 100644 index 000000000..efe9a1c5d --- /dev/null +++ b/patches/source/vim/patches/7.4.129 @@ -0,0 +1,56 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.129 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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/patches/source/vim/patches/7.4.130 b/patches/source/vim/patches/7.4.130 new file mode 100644 index 000000000..864d82c9d --- /dev/null +++ b/patches/source/vim/patches/7.4.130 @@ -0,0 +1,69 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.130 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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/patches/source/vim/patches/7.4.131 b/patches/source/vim/patches/7.4.131 new file mode 100644 index 000000000..ec04b85fd --- /dev/null +++ b/patches/source/vim/patches/7.4.131 @@ -0,0 +1,113 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.131 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.131 +Problem: Syncbind causes E315 errors in some situations. (Liang Li) +Solution: Set and restore curbuf in ex_syncbind(). (Christian Brabandt) +Files: src/ex_docmd.c, src/testdir/test37.ok + + +*** ../vim-7.4.130/src/ex_docmd.c 2013-12-11 17:44:33.000000000 +0100 +--- src/ex_docmd.c 2013-12-14 12:55:05.000000000 +0100 +*************** +*** 8054,8059 **** +--- 8054,8061 ---- + { + #ifdef FEAT_SCROLLBIND + win_T *wp; ++ win_T *save_curwin = curwin; ++ buf_T *save_curbuf = curbuf; + long topline; + long y; + linenr_T old_linenr = curwin->w_cursor.lnum; +*************** +*** 8085,8097 **** + + + /* +! * set all scrollbind windows to the same topline + */ +- wp = curwin; + for (curwin = firstwin; curwin; curwin = curwin->w_next) + { + if (curwin->w_p_scb) + { + y = topline - curwin->w_topline; + if (y > 0) + scrollup(y, TRUE); +--- 8087,8099 ---- + + + /* +! * Set all scrollbind windows to the same topline. + */ + for (curwin = firstwin; curwin; curwin = curwin->w_next) + { + if (curwin->w_p_scb) + { ++ curbuf = curwin->w_buffer; + y = topline - curwin->w_topline; + if (y > 0) + scrollup(y, TRUE); +*************** +*** 8105,8111 **** + #endif + } + } +! curwin = wp; + if (curwin->w_p_scb) + { + did_syncbind = TRUE; +--- 8107,8114 ---- + #endif + } + } +! curwin = save_curwin; +! curbuf = save_curbuf; + if (curwin->w_p_scb) + { + did_syncbind = TRUE; +*** ../vim-7.4.130/src/testdir/test37.ok 2010-05-15 13:04:10.000000000 +0200 +--- src/testdir/test37.ok 2013-12-14 12:54:57.000000000 +0100 +*************** +*** 27,33 **** + + . line 16 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 16 + :set scrollbind +- zt: +- . line 15 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 15 + :set scrollbind +! . line 11 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 11 +--- 27,33 ---- + + . line 16 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 16 + :set scrollbind + :set scrollbind +! . line 16 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 16 +! j: +! . line 12 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 12 +*** ../vim-7.4.130/src/version.c 2013-12-14 12:48:55.000000000 +0100 +--- src/version.c 2013-12-14 13:03:51.000000000 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 131, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +57. You begin to wonder how on earth your service provider is allowed to call + 200 hours per month "unlimited." + + /// 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/patches/source/vim/patches/7.4.132 b/patches/source/vim/patches/7.4.132 new file mode 100644 index 000000000..73d7281c4 --- /dev/null +++ b/patches/source/vim/patches/7.4.132 @@ -0,0 +1,54 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.132 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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/patches/source/vim/patches/7.4.133 b/patches/source/vim/patches/7.4.133 new file mode 100644 index 000000000..7c4bdfad9 --- /dev/null +++ b/patches/source/vim/patches/7.4.133 @@ -0,0 +1,74 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.133 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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/patches/source/vim/patches/7.4.134 b/patches/source/vim/patches/7.4.134 new file mode 100644 index 000000000..d8f47c570 --- /dev/null +++ b/patches/source/vim/patches/7.4.134 @@ -0,0 +1,53 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.134 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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/patches/source/vim/patches/7.4.135 b/patches/source/vim/patches/7.4.135 new file mode 100644 index 000000000..4f11071b5 --- /dev/null +++ b/patches/source/vim/patches/7.4.135 @@ -0,0 +1,51 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.135 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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/patches/source/vim/patches/7.4.136 b/patches/source/vim/patches/7.4.136 new file mode 100644 index 000000000..20976809a --- /dev/null +++ b/patches/source/vim/patches/7.4.136 @@ -0,0 +1,75 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.136 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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/patches/source/vim/patches/7.4.137 b/patches/source/vim/patches/7.4.137 new file mode 100644 index 000000000..4e685c139 --- /dev/null +++ b/patches/source/vim/patches/7.4.137 @@ -0,0 +1,239 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.137 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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/patches/source/vim/patches/7.4.138 b/patches/source/vim/patches/7.4.138 new file mode 100644 index 000000000..413383c50 --- /dev/null +++ b/patches/source/vim/patches/7.4.138 @@ -0,0 +1,55 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.138 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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/patches/source/vim/patches/7.4.139 b/patches/source/vim/patches/7.4.139 new file mode 100644 index 000000000..dc870dc0a --- /dev/null +++ b/patches/source/vim/patches/7.4.139 @@ -0,0 +1,76 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.139 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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/patches/source/vim/patches/7.4.140 b/patches/source/vim/patches/7.4.140 new file mode 100644 index 000000000..e493828e7 --- /dev/null +++ b/patches/source/vim/patches/7.4.140 @@ -0,0 +1,174 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.140 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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/patches/source/vim/patches/7.4.141 b/patches/source/vim/patches/7.4.141 new file mode 100644 index 000000000..8667b7277 --- /dev/null +++ b/patches/source/vim/patches/7.4.141 @@ -0,0 +1,88 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.141 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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/patches/source/vim/patches/7.4.142 b/patches/source/vim/patches/7.4.142 new file mode 100644 index 000000000..0e4f8f07d --- /dev/null +++ b/patches/source/vim/patches/7.4.142 @@ -0,0 +1,186 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.142 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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/patches/source/vim/patches/7.4.143 b/patches/source/vim/patches/7.4.143 new file mode 100644 index 000000000..909a9e9c2 --- /dev/null +++ b/patches/source/vim/patches/7.4.143 @@ -0,0 +1,214 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.143 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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/patches/source/vim/patches/7.4.144 b/patches/source/vim/patches/7.4.144 new file mode 100644 index 000000000..c88e2d2c3 --- /dev/null +++ b/patches/source/vim/patches/7.4.144 @@ -0,0 +1,52 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.144 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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/patches/source/vim/patches/7.4.145 b/patches/source/vim/patches/7.4.145 new file mode 100644 index 000000000..aa7b28d09 --- /dev/null +++ b/patches/source/vim/patches/7.4.145 @@ -0,0 +1,75 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.145 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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 + "<CTRL-V>{width}" for |blockwise-visual| text +! 0 for an empty or unknown register + <CTRL-V> 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 + "<CTRL-V>{width}" for |blockwise-visual| text +! "" for an empty or unknown register + <CTRL-V> 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/patches/source/vim/patches/7.4.146 b/patches/source/vim/patches/7.4.146 new file mode 100644 index 000000000..f23a77dae --- /dev/null +++ b/patches/source/vim/patches/7.4.146 @@ -0,0 +1,67 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.146 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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/patches/source/vim/patches/7.4.147 b/patches/source/vim/patches/7.4.147 Binary files differnew file mode 100644 index 000000000..0df6ffa81 --- /dev/null +++ b/patches/source/vim/patches/7.4.147 diff --git a/patches/source/vim/patches/7.4.148 b/patches/source/vim/patches/7.4.148 new file mode 100644 index 000000000..582b37880 --- /dev/null +++ b/patches/source/vim/patches/7.4.148 @@ -0,0 +1,83 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.148 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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 <windows.h> + # 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 <X11/Xwindows.h> +! # define WINBYTE wBYTE +! # else +! # include <windows.h> +! # 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/patches/source/vim/patches/7.4.149 b/patches/source/vim/patches/7.4.149 new file mode 100644 index 000000000..b1584205a --- /dev/null +++ b/patches/source/vim/patches/7.4.149 @@ -0,0 +1,822 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.149 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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/patches/source/vim/patches/7.4.150 b/patches/source/vim/patches/7.4.150 new file mode 100644 index 000000000..528f4d6bd --- /dev/null +++ b/patches/source/vim/patches/7.4.150 @@ -0,0 +1,93 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.150 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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/patches/source/vim/patches/7.4.151 b/patches/source/vim/patches/7.4.151 new file mode 100644 index 000000000..646cc7924 --- /dev/null +++ b/patches/source/vim/patches/7.4.151 @@ -0,0 +1,1470 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.151 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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()):(<class 'NotImplementedError'>, NotImplementedError('keys',)) + d.update([FailingIterNext()]):(<class 'NotImplementedError'>, NotImplementedError('next',)) ++ d.update([FailingIterNextN(1)]):(<class 'NotImplementedError'>, NotImplementedError('next N',)) + >>> Testing *Iter* using d.update(%s) + d.update(FailingIter()):(<class 'NotImplementedError'>, NotImplementedError('iter',)) + d.update(FailingIterNext()):(<class 'NotImplementedError'>, NotImplementedError('next',)) +*************** +*** 818,823 **** +--- 841,854 ---- + l[:] = FailingIter():(<class 'NotImplementedError'>, NotImplementedError('iter',)) + l[:] = FailingIterNext():(<class 'NotImplementedError'>, NotImplementedError('next',)) + <<< Finished ++ nel[1:10:2] = "abcK":(<class 'ValueError'>, 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":(<class 'ValueError'>, 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":(<class 'ValueError'>, ValueError('attempt to assign sequence of size greater then 0 to extended slice',)) ++ (b'a', b'b', b'c', b'O') ++ nel[:] = FailingIterNextN(2):(<class 'NotImplementedError'>, NotImplementedError('next N',)) ++ (b'a', b'b', b'c', b'O') + >>> Testing StringToChars using l[:] = [{%s : 1}] + l[:] = [{1 : 1}]:(<class 'TypeError'>, TypeError('expected bytes() or str() instance, but got int',)) + l[:] = [{b"\0" : 1}]:(<class 'TypeError'>, 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/patches/source/vim/patches/7.4.152 b/patches/source/vim/patches/7.4.152 new file mode 100644 index 000000000..6e54ddb9c --- /dev/null +++ b/patches/source/vim/patches/7.4.152 @@ -0,0 +1,708 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.152 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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:(<class 'ImportError'>, ImportError('No module named xxx_no_such_module_xxx',)) + import failing_import:(<class 'ImportError'>, ImportError('No module named failing_import',)) + import failing:(<class 'NotImplementedError'>, NotImplementedError()) ++ > Options ++ >> OptionsItem ++ vim.options["abcQ"]:(<class 'KeyError'>, KeyError('abcQ',)) ++ vim.options[""]:(<class 'ValueError'>, ValueError('empty keys are not allowed',)) ++ >>> Testing StringToChars using vim.options[%s] ++ vim.options[1]:(<class 'TypeError'>, TypeError('expected bytes() or str() instance, but got int',)) ++ vim.options[b"\0"]:(<class 'TypeError'>, TypeError('expected bytes with no null',)) ++ vim.options["\0"]:(<class 'TypeError'>, TypeError('expected bytes with no null',)) ++ <<< Finished ++ >> OptionsContains ++ >>> Testing StringToChars using %s in vim.options ++ 1 in vim.options:(<class 'TypeError'>, TypeError('expected bytes() or str() instance, but got int',)) ++ b"\0" in vim.options:(<class 'TypeError'>, TypeError('expected bytes with no null',)) ++ "\0" in vim.options:(<class 'TypeError'>, TypeError('expected bytes with no null',)) ++ <<< Finished + > Dictionary + >> DictionaryConstructor + vim.Dictionary("abcI"):(<class 'ValueError'>, 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/patches/source/vim/patches/7.4.153 b/patches/source/vim/patches/7.4.153 new file mode 100644 index 000000000..73881b5d9 --- /dev/null +++ b/patches/source/vim/patches/7.4.153 @@ -0,0 +1,176 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.153 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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/patches/source/vim/patches/7.4.154 b/patches/source/vim/patches/7.4.154 new file mode 100644 index 000000000..db5ae62d6 --- /dev/null +++ b/patches/source/vim/patches/7.4.154 @@ -0,0 +1,153 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.154 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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/patches/source/vim/patches/7.4.155 b/patches/source/vim/patches/7.4.155 new file mode 100644 index 000000000..e2b26bde5 --- /dev/null +++ b/patches/source/vim/patches/7.4.155 @@ -0,0 +1,83 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.155 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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/patches/source/vim/patches/7.4.156 b/patches/source/vim/patches/7.4.156 new file mode 100644 index 000000000..a1a272c5d --- /dev/null +++ b/patches/source/vim/patches/7.4.156 @@ -0,0 +1,49 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.156 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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/patches/source/vim/patches/7.4.157 b/patches/source/vim/patches/7.4.157 new file mode 100644 index 000000000..9ec2bd067 --- /dev/null +++ b/patches/source/vim/patches/7.4.157 @@ -0,0 +1,53 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.157 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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/patches/source/vim/patches/7.4.158 b/patches/source/vim/patches/7.4.158 new file mode 100644 index 000000000..d5291d3ee --- /dev/null +++ b/patches/source/vim/patches/7.4.158 @@ -0,0 +1,140 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.158 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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/patches/source/vim/patches/7.4.159 b/patches/source/vim/patches/7.4.159 new file mode 100644 index 000000000..be89abeb8 --- /dev/null +++ b/patches/source/vim/patches/7.4.159 @@ -0,0 +1,116 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.159 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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/patches/source/vim/patches/7.4.160 b/patches/source/vim/patches/7.4.160 new file mode 100644 index 000000000..41b0043e5 --- /dev/null +++ b/patches/source/vim/patches/7.4.160 @@ -0,0 +1,66 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.160 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +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/patches/source/vim/patches/7.4.161 b/patches/source/vim/patches/7.4.161 new file mode 100644 index 000000000..0487264c7 --- /dev/null +++ b/patches/source/vim/patches/7.4.161 @@ -0,0 +1,75 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.161 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.161 +Problem: Crash in Python exception handling. +Solution: Only use exception variables if did_throw is set. (ZyX) +Files: if_py_both.h + + +*** ../vim-7.4.160/src/if_py_both.h 2014-01-14 19:35:49.000000000 +0100 +--- src/if_py_both.h 2014-01-31 14:46:20.455526607 +0100 +*************** +*** 564,573 **** + /* 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; +--- 564,571 ---- + /* Keyboard interrupt should be preferred over anything else */ + if (got_int) + { +! if (did_throw) + discard_current_exception(); + got_int = FALSE; + PyErr_SetNone(PyExc_KeyboardInterrupt); + return -1; +*************** +*** 599,608 **** + /* 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 */ +--- 597,603 ---- + /* Python exception is preferred over vim one; unlikely to occur though */ + else if (PyErr_Occurred()) + { +! discard_current_exception(); + return -1; + } + /* Finally transform VimL exception to python one */ +*** ../vim-7.4.160/src/version.c 2014-01-24 19:55:33.078220735 +0100 +--- src/version.c 2014-01-31 14:46:39.127526894 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 161, + /**/ + +-- +Eagles may soar, but weasels don't get sucked into jet engines. + + /// 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/patches/source/vim/patches/7.4.162 b/patches/source/vim/patches/7.4.162 new file mode 100644 index 000000000..0687e882b --- /dev/null +++ b/patches/source/vim/patches/7.4.162 @@ -0,0 +1,45 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.162 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.162 +Problem: Running tests in shadow dir doesn't work. +Solution: Add testdir/sautest to the shadow target. (James McCoy) +Files: src/Makefile + + +*** ../vim-7.4.161/src/Makefile 2013-11-07 03:25:51.000000000 +0100 +--- src/Makefile 2014-02-05 12:34:00.214024436 +0100 +*************** +*** 2381,2386 **** +--- 2381,2387 ---- + ../../testdir/*.in \ + ../../testdir/*.vim \ + ../../testdir/python* \ ++ ../../testdir/sautest \ + ../../testdir/test83-tags? \ + ../../testdir/*.ok . + +*** ../vim-7.4.161/src/version.c 2014-01-31 14:53:59.715533645 +0100 +--- src/version.c 2014-02-05 12:34:19.766024736 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 162, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +263. You have more e-mail addresses than shorts. + + /// 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/patches/source/vim/patches/7.4.163 b/patches/source/vim/patches/7.4.163 new file mode 100644 index 000000000..b04e91d71 --- /dev/null +++ b/patches/source/vim/patches/7.4.163 @@ -0,0 +1,75 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.163 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.163 (after 7.4.142) +Problem: MS-Windows input doesn't work properly on Windows 7 and earlier. +Solution: Add a check for Windows 8. (Yasuhiro Matsumoto) +Files: src/os_win32.c + + +*** ../vim-7.4.162/src/os_win32.c 2014-01-24 19:55:33.078220735 +0100 +--- src/os_win32.c 2014-02-05 13:33:03.758078734 +0100 +*************** +*** 232,237 **** +--- 232,239 ---- + + static char_u *exe_path = NULL; + ++ static BOOL win8_or_later = FALSE; ++ + /* + * Version of ReadConsoleInput() that works with IME. + * Works around problems on Windows 8. +*************** +*** 252,257 **** +--- 254,266 ---- + static DWORD s_dwMax = 0; + DWORD dwEvents; + ++ if (!win8_or_later) ++ { ++ if (nLength == -1) ++ return PeekConsoleInput(hInput, lpBuffer, 1, lpEvents); ++ return ReadConsoleInput(hInput, lpBuffer, 1, &dwEvents); ++ } ++ + if (s_dwMax == 0) + { + if (nLength == -1) +*************** +*** 617,622 **** +--- 626,635 ---- + + g_PlatformId = ovi.dwPlatformId; + ++ if ((ovi.dwMajorVersion == 6 && ovi.dwMinorVersion >= 2) ++ || ovi.dwMajorVersion > 6) ++ win8_or_later = TRUE; ++ + #ifdef HAVE_ACL + /* + * Load the ADVAPI runtime if we are on anything +*** ../vim-7.4.162/src/version.c 2014-02-05 12:36:36.622026833 +0100 +--- src/version.c 2014-02-05 13:31:31.618077322 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 163, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +266. You hear most of your jokes via e-mail instead of in 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/patches/source/vim/patches/7.4.164 b/patches/source/vim/patches/7.4.164 new file mode 100644 index 000000000..b35debadf --- /dev/null +++ b/patches/source/vim/patches/7.4.164 @@ -0,0 +1,78 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.164 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.164 (after 7.4.163) +Problem: Problem with event handling on Windows 8. +Solution: Ignore duplicate WINDOW_BUFFER_SIZE_EVENTs. (Nobuhiro Takasaki) +Files: src/os_win32.c + + +*** ../vim-7.4.163/src/os_win32.c 2014-02-05 13:36:50.846082213 +0100 +--- src/os_win32.c 2014-02-05 14:01:13.350104623 +0100 +*************** +*** 253,258 **** +--- 253,261 ---- + static DWORD s_dwIndex = 0; + static DWORD s_dwMax = 0; + DWORD dwEvents; ++ int head; ++ int tail; ++ int i; + + if (!win8_or_later) + { +*************** +*** 274,280 **** +--- 277,305 ---- + *lpEvents = 0; + return TRUE; + } ++ ++ if (s_dwMax > 1) ++ { ++ head = 0; ++ tail = s_dwMax - 1; ++ while (head != tail) ++ { ++ if (s_irCache[head].EventType == WINDOW_BUFFER_SIZE_EVENT ++ && s_irCache[head + 1].EventType ++ == WINDOW_BUFFER_SIZE_EVENT) ++ { ++ /* Remove duplicate event to avoid flicker. */ ++ for (i = head; i < tail; ++i) ++ s_irCache[i] = s_irCache[i + 1]; ++ --tail; ++ continue; ++ } ++ head++; ++ } ++ s_dwMax = tail + 1; ++ } + } ++ + *lpBuffer = s_irCache[s_dwIndex]; + if (nLength != -1 && ++s_dwIndex >= s_dwMax) + s_dwMax = 0; +*** ../vim-7.4.163/src/version.c 2014-02-05 13:36:50.850082213 +0100 +--- src/version.c 2014-02-05 13:54:15.570098222 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 164, + /**/ + +-- +XML is a nice language for computers. Not for humans. + + /// 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/patches/source/vim/patches/7.4.165 b/patches/source/vim/patches/7.4.165 new file mode 100644 index 000000000..ab42f7300 --- /dev/null +++ b/patches/source/vim/patches/7.4.165 @@ -0,0 +1,71 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.165 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.165 +Problem: By default, after closing a buffer changes can't be undone. +Solution: In the example vimrc file set 'undofile'. +Files: runtime/vimrc_example.vim + + +*** ../vim-7.4.164/runtime/vimrc_example.vim 2011-04-15 20:58:36.000000000 +0200 +--- runtime/vimrc_example.vim 2014-02-05 21:59:40.534544501 +0100 +*************** +*** 1,7 **** + " An example for a vimrc file. + " + " Maintainer: Bram Moolenaar <Bram@vim.org> +! " Last change: 2011 Apr 15 + " + " To use it, copy it to + " for Unix and OS/2: ~/.vimrc +--- 1,7 ---- + " An example for a vimrc file. + " + " Maintainer: Bram Moolenaar <Bram@vim.org> +! " Last change: 2014 Feb 05 + " + " To use it, copy it to + " for Unix and OS/2: ~/.vimrc +*************** +*** 24,30 **** + if has("vms") + set nobackup " do not keep a backup file, use versions instead + else +! set backup " keep a backup file + endif + set history=50 " keep 50 lines of command line history + set ruler " show the cursor position all the time +--- 24,31 ---- + if has("vms") + set nobackup " do not keep a backup file, use versions instead + else +! set backup " keep a backup file (restore to previous version) +! set undofile " keep an undo file (undo changes after closing) + endif + set history=50 " keep 50 lines of command line history + set ruler " show the cursor position all the time +*** ../vim-7.4.164/src/version.c 2014-02-05 14:02:23.590105699 +0100 +--- src/version.c 2014-02-05 21:59:47.774544612 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 165, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +269. You wonder how you can make your dustbin produce Sesame Street's + Oscar's the Garbage Monster song when you empty it. + + /// 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/patches/source/vim/patches/7.4.166 b/patches/source/vim/patches/7.4.166 new file mode 100644 index 000000000..16f51b42d --- /dev/null +++ b/patches/source/vim/patches/7.4.166 @@ -0,0 +1,53 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.166 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.166 +Problem: Auto-loading a function for code that won't be executed. +Solution: Do not auto-load when evaluation is off. (Yasuhiro Matsumoto) +Files: src/eval.c + + +*** ../vim-7.4.165/src/eval.c 2014-01-23 20:09:29.523869260 +0100 +--- src/eval.c 2014-02-05 22:04:21.110548800 +0100 +*************** +*** 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, +--- 5159,5165 ---- + { + /* If "s" is the name of a variable of type VAR_FUNC + * use its contents. */ +! s = deref_func_name(s, &len, !evaluate); + + /* Invoke the function. */ + ret = get_func_tv(s, len, rettv, arg, +*** ../vim-7.4.165/src/version.c 2014-02-05 22:01:56.690546587 +0100 +--- src/version.c 2014-02-05 22:06:18.610550600 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 166, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +270. You are subscribed to a mailing list for every piece of software + you use. + + /// 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/patches/source/vim/patches/7.4.167 b/patches/source/vim/patches/7.4.167 new file mode 100644 index 000000000..c3ad07400 --- /dev/null +++ b/patches/source/vim/patches/7.4.167 @@ -0,0 +1,195 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.167 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.167 (after 7.4.149) +Problem: Fixes are not tested. +Solution: Add a test for not autoloading on assignment. (Yukihiro Nakadaira) +Files: 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/testdir/sautest/autoload/Test104.vim, src/testdir/test104.in, + src/testdir/test104.ok + + +*** ../vim-7.4.166/src/testdir/Make_amiga.mak 2013-11-21 14:21:25.000000000 +0100 +--- src/testdir/Make_amiga.mak 2014-02-05 22:16:46.654560224 +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 test103.out + + .SUFFIXES: .in .out + +--- 34,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 test97.out test98.out \ +! test99.out test100.out test101.out test102.out test103.out \ +! test104.out + + .SUFFIXES: .in .out + +*************** +*** 154,156 **** +--- 155,158 ---- + test101.out: test101.in + test102.out: test102.in + test103.out: test103.in ++ test104.out: test104.in +*** ../vim-7.4.166/src/testdir/Make_dos.mak 2013-11-21 14:21:25.000000000 +0100 +--- src/testdir/Make_dos.mak 2014-02-05 22:16:46.654560224 +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 test103.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 test104.out + + SCRIPTS32 = test50.out test70.out + +*** ../vim-7.4.166/src/testdir/Make_ming.mak 2014-01-06 15:51:46.000000000 +0100 +--- src/testdir/Make_ming.mak 2014-02-05 22:16:46.654560224 +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 \ +! test100.out 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 test104.out + + SCRIPTS32 = test50.out test70.out + +*** ../vim-7.4.166/src/testdir/Make_os2.mak 2013-11-21 14:21:25.000000000 +0100 +--- src/testdir/Make_os2.mak 2014-02-05 22:16:46.654560224 +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 test103.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 test104.out + + .SUFFIXES: .in .out + +*** ../vim-7.4.166/src/testdir/Make_vms.mms 2013-11-21 14:21:25.000000000 +0100 +--- src/testdir/Make_vms.mms 2014-02-05 22:16:46.658560224 +0100 +*************** +*** 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 +--- 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 test104.out + + # Known problems: + # Test 30: a problem around mac format - unknown reason +*** ../vim-7.4.166/src/testdir/Makefile 2013-11-21 14:21:25.000000000 +0100 +--- src/testdir/Makefile 2014-02-05 22:16:46.658560224 +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 test103.out + + SCRIPTS_GUI = test16.out + +--- 30,37 ---- + 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 \ +! test104.out + + SCRIPTS_GUI = test16.out + +*** ../vim-7.4.166/src/testdir/sautest/autoload/Test104.vim 2014-02-05 22:25:12.050567968 +0100 +--- src/testdir/sautest/autoload/Test104.vim 2014-02-05 22:16:46.658560224 +0100 +*************** +*** 0 **** +--- 1 ---- ++ let Test104#numvar = 123 +*** ../vim-7.4.166/src/testdir/test104.in 2014-02-05 22:25:12.062567968 +0100 +--- src/testdir/test104.in 2014-02-05 22:24:07.706566982 +0100 +*************** +*** 0 **** +--- 1,16 ---- ++ Tests for autoload. vim: set ft=vim ts=8 : ++ ++ STARTTEST ++ :so small.vim ++ :set runtimepath+=./sautest ++ :" Test to not autoload when assigning. It causes internal error. ++ :try ++ : let Test104#numvar = function('tr') ++ : $put ='OK: ' . string(Test104#numvar) ++ :catch ++ : $put ='FAIL: ' . v:exception ++ :endtry ++ :/^Results/,$wq! test.out ++ ENDTEST ++ ++ Results of test104: +*** ../vim-7.4.166/src/testdir/test104.ok 2014-02-05 22:25:12.070567968 +0100 +--- src/testdir/test104.ok 2014-02-05 22:16:46.658560224 +0100 +*************** +*** 0 **** +--- 1,2 ---- ++ Results of test104: ++ OK: function('tr') +*** ../vim-7.4.166/src/version.c 2014-02-05 22:13:02.366556787 +0100 +--- src/version.c 2014-02-05 22:18:05.506561432 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 167, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +271. You collect hilarious signatures from all 250 mailing lists you + are subscribed to. + + /// 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/patches/source/vim/patches/7.4.168 b/patches/source/vim/patches/7.4.168 new file mode 100644 index 000000000..ac57dc490 --- /dev/null +++ b/patches/source/vim/patches/7.4.168 @@ -0,0 +1,91 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.168 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.168 +Problem: Can't compile with Ruby 2.1.0. +Solution: Add support for new GC. (Kohei Suzuki) +Files: src/if_ruby.c + + +*** ../vim-7.4.167/src/if_ruby.c 2013-05-20 12:47:48.000000000 +0200 +--- src/if_ruby.c 2014-02-05 22:35:17.378577243 +0100 +*************** +*** 96,101 **** +--- 96,107 ---- + # define rb_num2int rb_num2int_stub + #endif + ++ # if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 21 ++ /* Ruby 2.1 adds new GC called RGenGC and RARRAY_PTR uses ++ * rb_gc_writebarrier_unprotect_promoted if USE_RGENGC */ ++ # define rb_gc_writebarrier_unprotect_promoted rb_gc_writebarrier_unprotect_promoted_stub ++ # endif ++ + #include <ruby.h> + #ifdef RUBY19_OR_LATER + # include <ruby/encoding.h> +*************** +*** 373,378 **** +--- 379,388 ---- + static void* (*ruby_process_options)(int, char**); + # endif + ++ # if defined(USE_RGENGC) && USE_RGENGC ++ static void (*dll_rb_gc_writebarrier_unprotect_promoted)(VALUE); ++ # endif ++ + # if defined(RUBY19_OR_LATER) && !defined(PROTO) + SIGNED_VALUE rb_num2long_stub(VALUE x) + { +*************** +*** 406,411 **** +--- 416,428 ---- + # endif + # endif + ++ # if defined(USE_RGENGC) && USE_RGENGC ++ void rb_gc_writebarrier_unprotect_promoted_stub(VALUE obj) ++ { ++ return dll_rb_gc_writebarrier_unprotect_promoted(obj); ++ } ++ # endif ++ + static HINSTANCE hinstRuby = NULL; /* Instance of ruby.dll */ + + /* +*************** +*** 521,526 **** +--- 538,546 ---- + # endif + {"ruby_init_stack", (RUBY_PROC*)&dll_ruby_init_stack}, + # endif ++ # if defined(USE_RGENGC) && USE_RGENGC ++ {"rb_gc_writebarrier_unprotect_promoted", (RUBY_PROC*)&dll_rb_gc_writebarrier_unprotect_promoted}, ++ # endif + {"", NULL}, + }; + +*** ../vim-7.4.167/src/version.c 2014-02-05 22:25:29.982568243 +0100 +--- src/version.c 2014-02-05 22:36:14.010578111 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 168, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +10E. You start counting in hex. + + /// 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/patches/source/vim/patches/7.4.169 b/patches/source/vim/patches/7.4.169 new file mode 100644 index 000000000..bfb4c16f7 --- /dev/null +++ b/patches/source/vim/patches/7.4.169 @@ -0,0 +1,53 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.169 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.169 +Problem: ":sleep" puts cursor in the wrong column. (Liang Li) +Solution: Add the window offset. (Christian Brabandt) +Files: src/ex_docmd.c + + +*** ../vim-7.4.168/src/ex_docmd.c 2014-01-10 15:53:09.000000000 +0100 +--- src/ex_docmd.c 2014-02-05 22:45:39.318586773 +0100 +*************** +*** 8371,8377 **** + { + n = W_WINROW(curwin) + curwin->w_wrow - msg_scrolled; + if (n >= 0) +! windgoto((int)n, curwin->w_wcol); + } + + len = eap->line2; +--- 8371,8377 ---- + { + n = W_WINROW(curwin) + curwin->w_wrow - msg_scrolled; + if (n >= 0) +! windgoto((int)n, W_WINCOL(curwin) + curwin->w_wcol); + } + + len = eap->line2; +*** ../vim-7.4.168/src/version.c 2014-02-05 22:41:11.430582669 +0100 +--- src/version.c 2014-02-05 22:44:51.458586040 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 169, + /**/ + +-- +ARTHUR: This new learning amazes me, Sir Bedevere. Explain again how sheep's + bladders may be employed to prevent earthquakes. + "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/patches/source/vim/patches/7.4.170 b/patches/source/vim/patches/7.4.170 new file mode 100644 index 000000000..17de640b6 --- /dev/null +++ b/patches/source/vim/patches/7.4.170 @@ -0,0 +1,90 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.170 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.170 +Problem: Some help tags don't work with ":help". (Tim Chase) +Solution: Add exceptions. +Files: src/ex_cmds.c + + +*** ../vim-7.4.169/src/ex_cmds.c 2013-11-09 03:31:45.000000000 +0100 +--- src/ex_cmds.c 2014-02-11 12:10:43.905946437 +0100 +*************** +*** 5936,5949 **** + "?", ":?", "?<CR>", "g?", "g?g?", "g??", "z?", + "/\\?", "/\\z(\\)", "\\=", ":s\\=", + "[count]", "[quotex]", "[range]", +! "[pattern]", "\\|", "\\%$"}; + static char *(rtable[]) = {"star", "gstar", "[star", "]star", ":star", + "/star", "/\\\\star", "quotestar", "starstar", + "cpo-star", "/\\\\(\\\\)", "/\\\\%(\\\\)", + "?", ":?", "?<CR>", "g?", "g?g?", "g??", "z?", + "/\\\\?", "/\\\\z(\\\\)", "\\\\=", ":s\\\\=", + "\\[count]", "\\[quotex]", "\\[range]", +! "\\[pattern]", "\\\\bar", "/\\\\%\\$"}; + int flags; + + d = IObuff; /* assume IObuff is long enough! */ +--- 5936,5953 ---- + "?", ":?", "?<CR>", "g?", "g?g?", "g??", "z?", + "/\\?", "/\\z(\\)", "\\=", ":s\\=", + "[count]", "[quotex]", "[range]", +! "[pattern]", "\\|", "\\%$", +! "s/\\~", "s/\\U", "s/\\L", +! "s/\\1", "s/\\2", "s/\\3", "s/\\9"}; + static char *(rtable[]) = {"star", "gstar", "[star", "]star", ":star", + "/star", "/\\\\star", "quotestar", "starstar", + "cpo-star", "/\\\\(\\\\)", "/\\\\%(\\\\)", + "?", ":?", "?<CR>", "g?", "g?g?", "g??", "z?", + "/\\\\?", "/\\\\z(\\\\)", "\\\\=", ":s\\\\=", + "\\[count]", "\\[quotex]", "\\[range]", +! "\\[pattern]", "\\\\bar", "/\\\\%\\$", +! "s/\\\\\\~", "s/\\\\U", "s/\\\\L", +! "s/\\\\1", "s/\\\\2", "s/\\\\3", "s/\\\\9"}; + int flags; + + d = IObuff; /* assume IObuff is long enough! */ +*************** +*** 5982,5988 **** + /* Replace: + * "[:...:]" with "\[:...:]" + * "[++...]" with "\[++...]" +! * "\{" with "\\{" + */ + if ((arg[0] == '[' && (arg[1] == ':' + || (arg[1] == '+' && arg[2] == '+'))) +--- 5986,5992 ---- + /* Replace: + * "[:...:]" with "\[:...:]" + * "[++...]" with "\[++...]" +! * "\{" with "\\{" -- matching "} \}" + */ + if ((arg[0] == '[' && (arg[1] == ':' + || (arg[1] == '+' && arg[2] == '+'))) +*** ../vim-7.4.169/src/version.c 2014-02-05 22:46:49.062587842 +0100 +--- src/version.c 2014-02-11 11:41:50.433919875 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 170, + /**/ + +-- + GALAHAD turns back. We see from his POV the lovely ZOOT standing by him + smiling enchantingly and a number of equally delectable GIRLIES draped + around in the seductively poulticed room. They look at him smilingly and + wave. + "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/patches/source/vim/patches/7.4.171 b/patches/source/vim/patches/7.4.171 new file mode 100644 index 000000000..cfd390690 --- /dev/null +++ b/patches/source/vim/patches/7.4.171 @@ -0,0 +1,841 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.171 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.171 +Problem: Redo does not set v:count and v:count1. +Solution: Use a separate buffer for redo, so that we can set the counts when + performing redo. +Files: src/getchar.c, src/globals.h, src/normal.c, src/proto/getchar.pro, + src/structs.h + + +*** ../vim-7.4.170/src/getchar.c 2013-06-29 13:43:27.000000000 +0200 +--- src/getchar.c 2014-02-11 14:54:46.830097259 +0100 +*************** +*** 40,52 **** + + #define MINIMAL_SIZE 20 /* minimal size for b_str */ + +! static struct buffheader redobuff = {{NULL, {NUL}}, NULL, 0, 0}; +! static struct buffheader old_redobuff = {{NULL, {NUL}}, NULL, 0, 0}; + #if defined(FEAT_AUTOCMD) || defined(FEAT_EVAL) || defined(PROTO) +! static struct buffheader save_redobuff = {{NULL, {NUL}}, NULL, 0, 0}; +! static struct buffheader save_old_redobuff = {{NULL, {NUL}}, NULL, 0, 0}; + #endif +! static struct buffheader recordbuff = {{NULL, {NUL}}, NULL, 0, 0}; + + static int typeahead_char = 0; /* typeahead char that's not flushed */ + +--- 40,52 ---- + + #define MINIMAL_SIZE 20 /* minimal size for b_str */ + +! static buffheader_T redobuff = {{NULL, {NUL}}, NULL, 0, 0}; +! static buffheader_T old_redobuff = {{NULL, {NUL}}, NULL, 0, 0}; + #if defined(FEAT_AUTOCMD) || defined(FEAT_EVAL) || defined(PROTO) +! static buffheader_T save_redobuff = {{NULL, {NUL}}, NULL, 0, 0}; +! static buffheader_T save_old_redobuff = {{NULL, {NUL}}, NULL, 0, 0}; + #endif +! static buffheader_T recordbuff = {{NULL, {NUL}}, NULL, 0, 0}; + + static int typeahead_char = 0; /* typeahead char that's not flushed */ + +*************** +*** 112,122 **** + + static int last_recorded_len = 0; /* number of last recorded chars */ + +! static char_u *get_buffcont __ARGS((struct buffheader *, int)); +! static void add_buff __ARGS((struct buffheader *, char_u *, long n)); +! static void add_num_buff __ARGS((struct buffheader *, long)); +! static void add_char_buff __ARGS((struct buffheader *, int)); +! static int read_stuff __ARGS((int advance)); + static void start_stuff __ARGS((void)); + static int read_redo __ARGS((int, int)); + static void copy_redo __ARGS((int)); +--- 112,123 ---- + + static int last_recorded_len = 0; /* number of last recorded chars */ + +! static char_u *get_buffcont __ARGS((buffheader_T *, int)); +! static void add_buff __ARGS((buffheader_T *, char_u *, long n)); +! static void add_num_buff __ARGS((buffheader_T *, long)); +! static void add_char_buff __ARGS((buffheader_T *, int)); +! static int read_readbuffers __ARGS((int advance)); +! static int read_readbuf __ARGS((buffheader_T *buf, int advance)); + static void start_stuff __ARGS((void)); + static int read_redo __ARGS((int, int)); + static void copy_redo __ARGS((int)); +*************** +*** 137,145 **** + */ + void + free_buff(buf) +! struct buffheader *buf; + { +! struct buffblock *p, *np; + + for (p = buf->bh_first.b_next; p != NULL; p = np) + { +--- 138,146 ---- + */ + void + free_buff(buf) +! buffheader_T *buf; + { +! buffblock_T *p, *np; + + for (p = buf->bh_first.b_next; p != NULL; p = np) + { +*************** +*** 155,168 **** + */ + static char_u * + get_buffcont(buffer, dozero) +! struct buffheader *buffer; + int dozero; /* count == zero is not an error */ + { + long_u count = 0; + char_u *p = NULL; + char_u *p2; + char_u *str; +! struct buffblock *bp; + + /* compute the total length of the string */ + for (bp = buffer->bh_first.b_next; bp != NULL; bp = bp->b_next) +--- 156,169 ---- + */ + static char_u * + get_buffcont(buffer, dozero) +! buffheader_T *buffer; + int dozero; /* count == zero is not an error */ + { + long_u count = 0; + char_u *p = NULL; + char_u *p2; + char_u *str; +! buffblock_T *bp; + + /* compute the total length of the string */ + for (bp = buffer->bh_first.b_next; bp != NULL; bp = bp->b_next) +*************** +*** 230,240 **** + */ + static void + add_buff(buf, s, slen) +! struct buffheader *buf; + char_u *s; + long slen; /* length of "s" or -1 */ + { +! struct buffblock *p; + long_u len; + + if (slen < 0) +--- 231,241 ---- + */ + static void + add_buff(buf, s, slen) +! buffheader_T *buf; + char_u *s; + long slen; /* length of "s" or -1 */ + { +! buffblock_T *p; + long_u len; + + if (slen < 0) +*************** +*** 270,276 **** + len = MINIMAL_SIZE; + else + len = slen; +! p = (struct buffblock *)lalloc((long_u)(sizeof(struct buffblock) + len), + TRUE); + if (p == NULL) + return; /* no space, just forget it */ +--- 271,277 ---- + len = MINIMAL_SIZE; + else + len = slen; +! p = (buffblock_T *)lalloc((long_u)(sizeof(buffblock_T) + len), + TRUE); + if (p == NULL) + return; /* no space, just forget it */ +*************** +*** 289,295 **** + */ + static void + add_num_buff(buf, n) +! struct buffheader *buf; + long n; + { + char_u number[32]; +--- 290,296 ---- + */ + static void + add_num_buff(buf, n) +! buffheader_T *buf; + long n; + { + char_u number[32]; +*************** +*** 304,310 **** + */ + static void + add_char_buff(buf, c) +! struct buffheader *buf; + int c; + { + #ifdef FEAT_MBYTE +--- 305,311 ---- + */ + static void + add_char_buff(buf, c) +! buffheader_T *buf; + int c; + { + #ifdef FEAT_MBYTE +*************** +*** 354,399 **** + #endif + } + + /* +! * Get one byte from the stuff buffer. + * If advance == TRUE go to the next char. + * No translation is done K_SPECIAL and CSI are escaped. + */ + static int +! read_stuff(advance) + int advance; + { +! char_u c; +! struct buffblock *curr; + +! if (stuffbuff.bh_first.b_next == NULL) /* buffer is empty */ + return NUL; + +! curr = stuffbuff.bh_first.b_next; +! c = curr->b_str[stuffbuff.bh_index]; + + if (advance) + { +! if (curr->b_str[++stuffbuff.bh_index] == NUL) + { +! stuffbuff.bh_first.b_next = curr->b_next; + vim_free(curr); +! stuffbuff.bh_index = 0; + } + } + return c; + } + + /* +! * Prepare the stuff buffer for reading (if it contains something). + */ + static void + start_stuff() + { +! if (stuffbuff.bh_first.b_next != NULL) + { +! stuffbuff.bh_curr = &(stuffbuff.bh_first); +! stuffbuff.bh_space = 0; + } + } + +--- 355,425 ---- + #endif + } + ++ /* First read ahead buffer. Used for translated commands. */ ++ static buffheader_T readbuf1 = {{NULL, {NUL}}, NULL, 0, 0}; ++ ++ /* Second read ahead buffer. Used for redo. */ ++ static buffheader_T readbuf2 = {{NULL, {NUL}}, NULL, 0, 0}; ++ + /* +! * Get one byte from the read buffers. Use readbuf1 one first, use readbuf2 +! * if that one is empty. + * If advance == TRUE go to the next char. + * No translation is done K_SPECIAL and CSI are escaped. + */ + static int +! read_readbuffers(advance) + int advance; + { +! int c; +! +! c = read_readbuf(&readbuf1, advance); +! if (c == NUL) +! c = read_readbuf(&readbuf2, advance); +! return c; +! } +! +! static int +! read_readbuf(buf, advance) +! buffheader_T *buf; +! int advance; +! { +! char_u c; +! buffblock_T *curr; + +! if (buf->bh_first.b_next == NULL) /* buffer is empty */ + return NUL; + +! curr = buf->bh_first.b_next; +! c = curr->b_str[buf->bh_index]; + + if (advance) + { +! if (curr->b_str[++buf->bh_index] == NUL) + { +! buf->bh_first.b_next = curr->b_next; + vim_free(curr); +! buf->bh_index = 0; + } + } + return c; + } + + /* +! * Prepare the read buffers for reading (if they contains something). + */ + static void + start_stuff() + { +! if (readbuf1.bh_first.b_next != NULL) + { +! readbuf1.bh_curr = &(readbuf1.bh_first); +! readbuf1.bh_space = 0; +! } +! if (readbuf2.bh_first.b_next != NULL) +! { +! readbuf2.bh_curr = &(readbuf2.bh_first); +! readbuf2.bh_space = 0; + } + } + +*************** +*** 403,409 **** + int + stuff_empty() + { +! return (stuffbuff.bh_first.b_next == NULL); + } + + /* +--- 429,446 ---- + int + stuff_empty() + { +! return (readbuf1.bh_first.b_next == NULL +! && readbuf2.bh_first.b_next == NULL); +! } +! +! /* +! * Return TRUE if readbuf1 is empty. There may still be redo characters in +! * redbuf2. +! */ +! int +! readbuf1_empty() +! { +! return (readbuf1.bh_first.b_next == NULL); + } + + /* +*************** +*** 428,434 **** + init_typebuf(); + + start_stuff(); +! while (read_stuff(TRUE) != NUL) + ; + + if (flush_typeahead) /* remove all typeahead */ +--- 465,471 ---- + init_typebuf(); + + start_stuff(); +! while (read_readbuffers(TRUE) != NUL) + ; + + if (flush_typeahead) /* remove all typeahead */ +*************** +*** 483,489 **** + redobuff = old_redobuff; + old_redobuff.bh_first.b_next = NULL; + start_stuff(); +! while (read_stuff(TRUE) != NUL) + ; + } + } +--- 520,526 ---- + redobuff = old_redobuff; + old_redobuff.bh_first.b_next = NULL; + start_stuff(); +! while (read_readbuffers(TRUE) != NUL) + ; + } + } +*************** +*** 638,644 **** + stuffReadbuff(s) + char_u *s; + { +! add_buff(&stuffbuff, s, -1L); + } + + void +--- 675,681 ---- + stuffReadbuff(s) + char_u *s; + { +! add_buff(&readbuf1, s, -1L); + } + + void +*************** +*** 646,652 **** + char_u *s; + long len; + { +! add_buff(&stuffbuff, s, len); + } + + #if defined(FEAT_EVAL) || defined(PROTO) +--- 683,689 ---- + char_u *s; + long len; + { +! add_buff(&readbuf1, s, len); + } + + #if defined(FEAT_EVAL) || defined(PROTO) +*************** +*** 692,698 **** + stuffcharReadbuff(c) + int c; + { +! add_char_buff(&stuffbuff, c); + } + + /* +--- 729,735 ---- + stuffcharReadbuff(c) + int c; + { +! add_char_buff(&readbuf1, c); + } + + /* +*************** +*** 702,708 **** + stuffnumReadbuff(n) + long n; + { +! add_num_buff(&stuffbuff, n); + } + + /* +--- 739,745 ---- + stuffnumReadbuff(n) + long n; + { +! add_num_buff(&readbuf1, n); + } + + /* +*************** +*** 718,730 **** + int init; + int old_redo; + { +! static struct buffblock *bp; +! static char_u *p; +! int c; + #ifdef FEAT_MBYTE +! int n; +! char_u buf[MB_MAXBYTES + 1]; +! int i; + #endif + + if (init) +--- 755,767 ---- + int init; + int old_redo; + { +! static buffblock_T *bp; +! static char_u *p; +! int c; + #ifdef FEAT_MBYTE +! int n; +! char_u buf[MB_MAXBYTES + 1]; +! int i; + #endif + + if (init) +*************** +*** 795,805 **** + int c; + + while ((c = read_redo(FALSE, old_redo)) != NUL) +! stuffcharReadbuff(c); + } + + /* +! * Stuff the redo buffer into the stuffbuff. + * Insert the redo count into the command. + * If "old_redo" is TRUE, the last but one command is repeated + * instead of the last command (inserting text). This is used for +--- 832,842 ---- + int c; + + while ((c = read_redo(FALSE, old_redo)) != NUL) +! add_char_buff(&readbuf2, c); + } + + /* +! * Stuff the redo buffer into readbuf2. + * Insert the redo count into the command. + * If "old_redo" is TRUE, the last but one command is repeated + * instead of the last command (inserting text). This is used for +*************** +*** 823,835 **** + /* copy the buffer name, if present */ + if (c == '"') + { +! add_buff(&stuffbuff, (char_u *)"\"", 1L); + c = read_redo(FALSE, old_redo); + + /* if a numbered buffer is used, increment the number */ + if (c >= '1' && c < '9') + ++c; +! add_char_buff(&stuffbuff, c); + c = read_redo(FALSE, old_redo); + } + +--- 860,872 ---- + /* copy the buffer name, if present */ + if (c == '"') + { +! add_buff(&readbuf2, (char_u *)"\"", 1L); + c = read_redo(FALSE, old_redo); + + /* if a numbered buffer is used, increment the number */ + if (c >= '1' && c < '9') + ++c; +! add_char_buff(&readbuf2, c); + c = read_redo(FALSE, old_redo); + } + +*************** +*** 850,867 **** + { + while (VIM_ISDIGIT(c)) /* skip "old" count */ + c = read_redo(FALSE, old_redo); +! add_num_buff(&stuffbuff, count); + } + + /* copy from the redo buffer into the stuff buffer */ +! add_char_buff(&stuffbuff, c); + copy_redo(old_redo); + return OK; + } + + /* + * Repeat the last insert (R, o, O, a, A, i or I command) by stuffing +! * the redo buffer into the stuffbuff. + * return FAIL for failure, OK otherwise + */ + int +--- 887,904 ---- + { + while (VIM_ISDIGIT(c)) /* skip "old" count */ + c = read_redo(FALSE, old_redo); +! add_num_buff(&readbuf2, count); + } + + /* copy from the redo buffer into the stuff buffer */ +! add_char_buff(&readbuf2, c); + copy_redo(old_redo); + return OK; + } + + /* + * Repeat the last insert (R, o, O, a, A, i or I command) by stuffing +! * the redo buffer into readbuf2. + * return FAIL for failure, OK otherwise + */ + int +*************** +*** 879,885 **** + if (vim_strchr((char_u *)"AaIiRrOo", c) != NULL) + { + if (c == 'O' || c == 'o') +! stuffReadbuff(NL_STR); + break; + } + } +--- 916,922 ---- + if (vim_strchr((char_u *)"AaIiRrOo", c) != NULL) + { + if (c == 'O' || c == 'o') +! add_buff(&readbuf2, NL_STR, -1L); + break; + } + } +*************** +*** 1360,1367 **** + tp->old_mod_mask = old_mod_mask; + old_char = -1; + +! tp->save_stuffbuff = stuffbuff; +! stuffbuff.bh_first.b_next = NULL; + # ifdef USE_INPUT_BUF + tp->save_inputbuf = get_input_buf(); + # endif +--- 1397,1406 ---- + tp->old_mod_mask = old_mod_mask; + old_char = -1; + +! tp->save_readbuf1 = readbuf1; +! readbuf1.bh_first.b_next = NULL; +! tp->save_readbuf2 = readbuf2; +! readbuf2.bh_first.b_next = NULL; + # ifdef USE_INPUT_BUF + tp->save_inputbuf = get_input_buf(); + # endif +*************** +*** 1384,1391 **** + old_char = tp->old_char; + old_mod_mask = tp->old_mod_mask; + +! free_buff(&stuffbuff); +! stuffbuff = tp->save_stuffbuff; + # ifdef USE_INPUT_BUF + set_input_buf(tp->save_inputbuf); + # endif +--- 1423,1432 ---- + old_char = tp->old_char; + old_mod_mask = tp->old_mod_mask; + +! free_buff(&readbuf1); +! readbuf1 = tp->save_readbuf1; +! free_buff(&readbuf2); +! readbuf2 = tp->save_readbuf2; + # ifdef USE_INPUT_BUF + set_input_buf(tp->save_inputbuf); + # endif +*************** +*** 1992,1998 **** + typeahead_char = 0; + } + else +! c = read_stuff(advance); + if (c != NUL && !got_int) + { + if (advance) +--- 2033,2039 ---- + typeahead_char = 0; + } + else +! c = read_readbuffers(advance); + if (c != NUL && !got_int) + { + if (advance) +*** ../vim-7.4.170/src/globals.h 2013-11-09 03:31:45.000000000 +0100 +--- src/globals.h 2014-02-11 14:17:44.070063200 +0100 +*************** +*** 979,989 **** + EXTERN int readonlymode INIT(= FALSE); /* Set to TRUE for "view" */ + EXTERN int recoverymode INIT(= FALSE); /* Set to TRUE for "-r" option */ + +- EXTERN struct buffheader stuffbuff /* stuff buffer */ +- #ifdef DO_INIT +- = {{NULL, {NUL}}, NULL, 0, 0} +- #endif +- ; + EXTERN typebuf_T typebuf /* typeahead buffer */ + #ifdef DO_INIT + = {NULL, NULL, 0, 0, 0, 0, 0, 0, 0} +--- 979,984 ---- +*** ../vim-7.4.170/src/normal.c 2014-01-14 13:18:53.000000000 +0100 +--- src/normal.c 2014-02-11 14:53:54.246096453 +0100 +*************** +*** 655,662 **** + #ifdef FEAT_EVAL + /* Set v:count here, when called from main() and not a stuffed + * command, so that v:count can be used in an expression mapping +! * when there is no count. */ +! if (toplevel && stuff_empty()) + set_vcount_ca(&ca, &set_prevcount); + #endif + +--- 655,662 ---- + #ifdef FEAT_EVAL + /* Set v:count here, when called from main() and not a stuffed + * command, so that v:count can be used in an expression mapping +! * when there is no count. Do set it for redo. */ +! if (toplevel && readbuf1_empty()) + set_vcount_ca(&ca, &set_prevcount); + #endif + +*************** +*** 736,743 **** + #ifdef FEAT_EVAL + /* Set v:count here, when called from main() and not a stuffed + * command, so that v:count can be used in an expression mapping +! * right after the count. */ +! if (toplevel && stuff_empty()) + set_vcount_ca(&ca, &set_prevcount); + #endif + if (ctrl_w) +--- 736,743 ---- + #ifdef FEAT_EVAL + /* Set v:count here, when called from main() and not a stuffed + * command, so that v:count can be used in an expression mapping +! * right after the count. Do set it for redo. */ +! if (toplevel && readbuf1_empty()) + set_vcount_ca(&ca, &set_prevcount); + #endif + if (ctrl_w) +*************** +*** 819,826 **** + #ifdef FEAT_EVAL + /* + * Only set v:count when called from main() and not a stuffed command. + */ +! if (toplevel && stuff_empty()) + set_vcount(ca.count0, ca.count1, set_prevcount); + #endif + +--- 819,827 ---- + #ifdef FEAT_EVAL + /* + * Only set v:count when called from main() and not a stuffed command. ++ * Do set it for redo. + */ +! if (toplevel && readbuf1_empty()) + set_vcount(ca.count0, ca.count1, set_prevcount); + #endif + +*** ../vim-7.4.170/src/proto/getchar.pro 2013-08-10 13:37:12.000000000 +0200 +--- src/proto/getchar.pro 2014-02-11 14:55:14.806097687 +0100 +*************** +*** 1,8 **** + /* getchar.c */ +! void free_buff __ARGS((struct buffheader *buf)); + char_u *get_recorded __ARGS((void)); + char_u *get_inserted __ARGS((void)); + int stuff_empty __ARGS((void)); + void typeahead_noflush __ARGS((int c)); + void flush_buffers __ARGS((int flush_typeahead)); + void ResetRedobuff __ARGS((void)); +--- 1,9 ---- + /* getchar.c */ +! void free_buff __ARGS((buffheader_T *buf)); + char_u *get_recorded __ARGS((void)); + char_u *get_inserted __ARGS((void)); + int stuff_empty __ARGS((void)); ++ int readbuf1_empty __ARGS((void)); + void typeahead_noflush __ARGS((int c)); + void flush_buffers __ARGS((int flush_typeahead)); + void ResetRedobuff __ARGS((void)); +*** ../vim-7.4.170/src/structs.h 2013-11-12 04:43:57.000000000 +0100 +--- src/structs.h 2014-02-11 14:35:43.606079741 +0100 +*************** +*** 471,483 **** + blocknr_T nt_new_bnum; /* new, positive, number */ + }; + + /* + * structure used to store one block of the stuff/redo/recording buffers + */ + struct buffblock + { +! struct buffblock *b_next; /* pointer to next buffblock */ +! char_u b_str[1]; /* contents (actually longer) */ + }; + + /* +--- 471,487 ---- + blocknr_T nt_new_bnum; /* new, positive, number */ + }; + ++ ++ typedef struct buffblock buffblock_T; ++ typedef struct buffheader buffheader_T; ++ + /* + * structure used to store one block of the stuff/redo/recording buffers + */ + struct buffblock + { +! buffblock_T *b_next; /* pointer to next buffblock */ +! char_u b_str[1]; /* contents (actually longer) */ + }; + + /* +*************** +*** 485,494 **** + */ + struct buffheader + { +! struct buffblock bh_first; /* first (dummy) block of list */ +! struct buffblock *bh_curr; /* buffblock for appending */ +! int bh_index; /* index for reading */ +! int bh_space; /* space in bh_curr for appending */ + }; + + /* +--- 489,498 ---- + */ + struct buffheader + { +! buffblock_T bh_first; /* first (dummy) block of list */ +! buffblock_T *bh_curr; /* buffblock for appending */ +! int bh_index; /* index for reading */ +! int bh_space; /* space in bh_curr for appending */ + }; + + /* +*************** +*** 964,970 **** + int typebuf_valid; /* TRUE when save_typebuf valid */ + int old_char; + int old_mod_mask; +! struct buffheader save_stuffbuff; + #ifdef USE_INPUT_BUF + char_u *save_inputbuf; + #endif +--- 968,975 ---- + int typebuf_valid; /* TRUE when save_typebuf valid */ + int old_char; + int old_mod_mask; +! buffheader_T save_readbuf1; +! buffheader_T save_readbuf2; + #ifdef USE_INPUT_BUF + char_u *save_inputbuf; + #endif +*** ../vim-7.4.170/src/version.c 2014-02-11 12:15:39.781950970 +0100 +--- src/version.c 2014-02-11 15:05:17.306106920 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 171, + /**/ + +-- +Linux is just like a wigwam: no Windows, no Gates and an Apache inside. + + /// 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/patches/source/vim/patches/7.4.172 b/patches/source/vim/patches/7.4.172 new file mode 100644 index 000000000..8ad9fca23 --- /dev/null +++ b/patches/source/vim/patches/7.4.172 @@ -0,0 +1,346 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.172 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.172 +Problem: The blowfish code mentions output feedback, but the code is + actually doing cipher feedback. +Solution: Adjust names and comments. +Files: src/blowfish.c, src/fileio.c, src/proto/blowfish.pro, + src/memline.c + + +*** ../vim-7.4.171/src/blowfish.c 2010-12-17 19:58:18.000000000 +0100 +--- src/blowfish.c 2014-02-11 15:18:12.882118804 +0100 +*************** +*** 6,12 **** + * Do ":help credits" in Vim to see a list of people who contributed. + * See README.txt for an overview of the Vim source code. + * +! * 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. + */ +--- 6,12 ---- + * Do ":help credits" in Vim to see a list of people who contributed. + * See README.txt for an overview of the Vim source code. + * +! * Blowfish encryption for Vim; in Blowfish cipher feedback mode. + * Contributed by Mohsin Ahmed, http://www.cs.albany.edu/~mosh + * Based on http://www.schneier.com/blowfish.html by Bruce Schneier. + */ +*************** +*** 19,25 **** + + #define BF_BLOCK 8 + #define BF_BLOCK_MASK 7 +! #define BF_OFB_LEN (8*(BF_BLOCK)) + + typedef union { + UINT32_T ul[2]; +--- 19,25 ---- + + #define BF_BLOCK 8 + #define BF_BLOCK_MASK 7 +! #define BF_CFB_LEN (8*(BF_BLOCK)) + + typedef union { + UINT32_T ul[2]; +*************** +*** 554,595 **** + 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 */ + + /* + * Initialize with seed "iv[iv_len]". + */ + void +! bf_ofb_init(iv, iv_len) + char_u *iv; + int iv_len; + { + int i, mi; + + randbyte_offset = update_offset = 0; +! vim_memset(ofb_buffer, 0, BF_OFB_LEN); + if (iv_len > 0) + { +! mi = iv_len > BF_OFB_LEN ? iv_len : BF_OFB_LEN; + for (i = 0; i < mi; i++) +! ofb_buffer[i % BF_OFB_LEN] ^= iv[i % iv_len]; + } + } + +! #define BF_OFB_UPDATE(c) { \ +! ofb_buffer[update_offset] ^= (char_u)c; \ +! if (++update_offset == BF_OFB_LEN) \ + 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; \ + } + +--- 554,595 ---- + return err > 0 ? FAIL : OK; + } + +! /* Cipher feedback mode. */ + static int randbyte_offset = 0; + static int update_offset = 0; +! static char_u cfb_buffer[BF_CFB_LEN]; /* 64 bytes */ + + /* + * Initialize with seed "iv[iv_len]". + */ + void +! bf_cfb_init(iv, iv_len) + char_u *iv; + int iv_len; + { + int i, mi; + + randbyte_offset = update_offset = 0; +! vim_memset(cfb_buffer, 0, BF_CFB_LEN); + if (iv_len > 0) + { +! mi = iv_len > BF_CFB_LEN ? iv_len : BF_CFB_LEN; + for (i = 0; i < mi; i++) +! cfb_buffer[i % BF_CFB_LEN] ^= iv[i % iv_len]; + } + } + +! #define BF_CFB_UPDATE(c) { \ +! cfb_buffer[update_offset] ^= (char_u)c; \ +! if (++update_offset == BF_CFB_LEN) \ + update_offset = 0; \ + } + + #define BF_RANBYTE(t) { \ + if ((randbyte_offset & BF_BLOCK_MASK) == 0) \ +! bf_e_cblock(&cfb_buffer[randbyte_offset]); \ +! t = cfb_buffer[randbyte_offset]; \ +! if (++randbyte_offset == BF_CFB_LEN) \ + randbyte_offset = 0; \ + } + +*************** +*** 610,616 **** + { + ztemp = from[i]; + BF_RANBYTE(t); +! BF_OFB_UPDATE(ztemp); + to[i] = t ^ ztemp; + } + } +--- 610,616 ---- + { + ztemp = from[i]; + BF_RANBYTE(t); +! BF_CFB_UPDATE(ztemp); + to[i] = t ^ ztemp; + } + } +*************** +*** 630,636 **** + { + BF_RANBYTE(t); + *p ^= t; +! BF_OFB_UPDATE(*p); + } + } + +--- 630,636 ---- + { + BF_RANBYTE(t); + *p ^= t; +! BF_CFB_UPDATE(*p); + } + } + +*************** +*** 646,658 **** + + for (p = passwd; *p != NUL; ++p) + { +! BF_OFB_UPDATE(*p); + } + } + + 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]; + +--- 646,658 ---- + + for (p = passwd; *p != NUL; ++p) + { +! BF_CFB_UPDATE(*p); + } + } + + static int save_randbyte_offset; + static int save_update_offset; +! static char_u save_cfb_buffer[BF_CFB_LEN]; + static UINT32_T save_pax[18]; + static UINT32_T save_sbx[4][256]; + +*************** +*** 665,671 **** + { + 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); + } +--- 665,671 ---- + { + save_randbyte_offset = randbyte_offset; + save_update_offset = update_offset; +! mch_memmove(save_cfb_buffer, cfb_buffer, BF_CFB_LEN); + mch_memmove(save_pax, pax, 4 * 18); + mch_memmove(save_sbx, sbx, 4 * 4 * 256); + } +*************** +*** 679,685 **** + { + 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); + } +--- 679,685 ---- + { + randbyte_offset = save_randbyte_offset; + update_offset = save_update_offset; +! mch_memmove(cfb_buffer, save_cfb_buffer, BF_CFB_LEN); + mch_memmove(pax, save_pax, 4 * 18); + mch_memmove(sbx, save_sbx, 4 * 4 * 256); + } +*** ../vim-7.4.171/src/fileio.c 2013-11-28 18:53:47.000000000 +0100 +--- src/fileio.c 2014-02-11 15:16:57.546117649 +0100 +*************** +*** 2973,2979 **** + else + { + bf_key_init(cryptkey, ptr + CRYPT_MAGIC_LEN, salt_len); +! bf_ofb_init(ptr + CRYPT_MAGIC_LEN + salt_len, seed_len); + } + + /* Remove magic number from the text */ +--- 2973,2979 ---- + else + { + bf_key_init(cryptkey, ptr + CRYPT_MAGIC_LEN, salt_len); +! bf_cfb_init(ptr + CRYPT_MAGIC_LEN + salt_len, seed_len); + } + + /* Remove magic number from the text */ +*************** +*** 3025,3031 **** + 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; + } +--- 3025,3031 ---- + if (fread(buffer, salt_len + seed_len, 1, fp) != 1) + return FAIL; + bf_key_init(curbuf->b_p_key, buffer, salt_len); +! bf_cfb_init(buffer + salt_len, seed_len); + } + return OK; + } +*************** +*** 3064,3070 **** + 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; +--- 3064,3070 ---- + seed = salt + salt_len; + sha2_seed(salt, salt_len, seed, seed_len); + bf_key_init(buf->b_p_key, salt, salt_len); +! bf_cfb_init(seed, seed_len); + } + } + *lenp = CRYPT_MAGIC_LEN + salt_len + seed_len; +*** ../vim-7.4.171/src/proto/blowfish.pro 2013-08-10 13:37:06.000000000 +0200 +--- src/proto/blowfish.pro 2014-02-11 15:18:20.382118919 +0100 +*************** +*** 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)); +--- 1,6 ---- + /* blowfish.c */ + void bf_key_init __ARGS((char_u *password, char_u *salt, int salt_len)); +! void bf_cfb_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)); +*** ../vim-7.4.171/src/memline.c 2013-11-28 17:41:41.000000000 +0100 +--- src/memline.c 2014-02-11 15:17:02.190117720 +0100 +*************** +*** 4914,4920 **** + * 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); + } + } + +--- 4914,4920 ---- + * block for the salt. */ + vim_snprintf((char *)salt, sizeof(salt), "%ld", (long)offset); + bf_key_init(key, salt, (int)STRLEN(salt)); +! bf_cfb_init(seed, MF_SEED_LEN); + } + } + +*** ../vim-7.4.171/src/version.c 2014-02-11 15:10:38.138111836 +0100 +--- src/version.c 2014-02-11 15:16:01.206116786 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 172, + /**/ + +-- +GALAHAD: No look, really, this isn't nescess ... +PIGLET: We must examine you. +GALAHAD: There's nothing wrong with ... that. + "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/patches/source/vim/patches/7.4.173 b/patches/source/vim/patches/7.4.173 new file mode 100644 index 000000000..1756bdcd0 --- /dev/null +++ b/patches/source/vim/patches/7.4.173 @@ -0,0 +1,61 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.173 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.173 +Problem: When using scrollbind the cursor can end up below the last line. + (mvxxc) +Solution: Reset w_botfill when scrolling up. (Christian Brabandt) +Files: src/move.c + + +*** ../vim-7.4.172/src/move.c 2012-11-28 18:15:42.000000000 +0100 +--- src/move.c 2014-02-11 15:39:24.758138292 +0100 +*************** +*** 2101,2106 **** +--- 2101,2107 ---- + int used; + lineoff_T loff; + lineoff_T boff; ++ linenr_T old_topline = curwin->w_topline; + + loff.lnum = boff.lnum = curwin->w_cursor.lnum; + #ifdef FEAT_FOLDING +*************** +*** 2156,2161 **** +--- 2157,2164 ---- + curwin->w_topline = topline; + #ifdef FEAT_DIFF + curwin->w_topfill = topfill; ++ if (old_topline > curwin->w_topline + curwin->w_height) ++ curwin->w_botfill = FALSE; + check_topfill(curwin, FALSE); + #endif + curwin->w_valid &= ~(VALID_WROW|VALID_CROW|VALID_BOTLINE|VALID_BOTLINE_AP); +*** ../vim-7.4.172/src/version.c 2014-02-11 15:23:27.942123631 +0100 +--- src/version.c 2014-02-11 15:38:34.562137523 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 173, + /**/ + +-- + GALAHAD hurries to the door and pushes through it. As he leaves the room + we CUT TO the reverse to show that he is now in a room full of bathing + and romping GIRLIES, all innocent, wide-eyed and beautiful. They smile + enchantingly at him as he tries to keep walking without being diverted by + the lovely sights assaulting his eyeballs. + "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/patches/source/vim/patches/7.4.174 b/patches/source/vim/patches/7.4.174 new file mode 100644 index 000000000..827e65cd8 --- /dev/null +++ b/patches/source/vim/patches/7.4.174 @@ -0,0 +1,94 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.174 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.174 +Problem: Compiler warnings for Python interface. (Tony Mechelynck) +Solution: Add type casts, initialize variable. +Files: src/if_py_both.h + + +*** ../vim-7.4.173/src/if_py_both.h 2014-01-31 14:53:59.715533645 +0100 +--- src/if_py_both.h 2014-02-11 15:57:30.678154932 +0100 +*************** +*** 2368,2374 **** + PyInt numreplaced = 0; + PyInt numadded = 0; + PyInt size; +! listitem_T **lis; + + size = ListLength(self); + +--- 2368,2374 ---- + PyInt numreplaced = 0; + PyInt numadded = 0; + PyInt size; +! listitem_T **lis = NULL; + + size = ListLength(self); + +*************** +*** 2503,2510 **** + { + 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; +--- 2503,2510 ---- + { + Py_DECREF(iterator); + PyErr_FORMAT(PyExc_ValueError, +! N_("attempt to assign sequence of size greater then %ld " +! "to extended slice"), (long)slicelen); + list_restore(numadded, numreplaced, slicelen, l, lis, lastaddedli); + PyMem_Free(lis); + return -1; +*************** +*** 2516,2523 **** + 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; +--- 2516,2523 ---- + if (step != 1 && i != slicelen) + { + PyErr_FORMAT2(PyExc_ValueError, +! N_("attempt to assign sequence of size %ld to extended slice " +! "of size %ld"), (long)i, (long)slicelen); + list_restore(numadded, numreplaced, slicelen, l, lis, lastaddedli); + PyMem_Free(lis); + return -1; +*** ../vim-7.4.173/src/version.c 2014-02-11 15:47:41.382145902 +0100 +--- src/version.c 2014-02-11 15:59:04.646156372 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 174, + /**/ + +-- +DINGO: You must spank her well and after you have spanked her you + may deal with her as you like and then ... spank me. +AMAZING: And spank me! +STUNNER: And me. +LOVELY: And me. + "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/patches/source/vim/patches/7.4.175 b/patches/source/vim/patches/7.4.175 new file mode 100644 index 000000000..99ca39036 --- /dev/null +++ b/patches/source/vim/patches/7.4.175 @@ -0,0 +1,180 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.175 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.175 +Problem: When a wide library function fails, falling back to the non-wide + function may do the wrong thing. +Solution: Check the platform, when the wide function is supported don't fall + back to the non-wide function. (Ken Takata) +Files: src/os_mswin.c, src/os_win32.c + + +*** ../vim-7.4.174/src/os_mswin.c 2014-01-14 12:18:41.000000000 +0100 +--- src/os_mswin.c 2014-02-11 17:02:03.002214267 +0100 +*************** +*** 648,654 **** + { + n = wstat_symlink_aware(wp, (struct _stat *)stp); + vim_free(wp); +! if (n >= 0) + return n; + /* Retry with non-wide function (for Windows 98). Can't use + * GetLastError() here and it's unclear what errno gets set to if +--- 648,654 ---- + { + n = wstat_symlink_aware(wp, (struct _stat *)stp); + vim_free(wp); +! if (n >= 0 || g_PlatformId == VER_PLATFORM_WIN32_NT) + return n; + /* Retry with non-wide function (for Windows 98). Can't use + * GetLastError() here and it's unclear what errno gets set to if +*************** +*** 815,822 **** + { + n = _wchdir(p); + vim_free(p); +! if (n == 0) +! return 0; + /* Retry with non-wide function (for Windows 98). */ + } + } +--- 815,822 ---- + { + n = _wchdir(p); + vim_free(p); +! if (n == 0 || g_PlatformId == VER_PLATFORM_WIN32_NT) +! return n; + /* Retry with non-wide function (for Windows 98). */ + } + } +*************** +*** 1942,1949 **** + + shortcut_errorw: + vim_free(p); +! if (hr == S_OK) +! goto shortcut_end; + } + } + /* Retry with non-wide function (for Windows 98). */ +--- 1942,1948 ---- + + shortcut_errorw: + vim_free(p); +! goto shortcut_end; + } + } + /* Retry with non-wide function (for Windows 98). */ +*** ../vim-7.4.174/src/os_win32.c 2014-02-05 14:02:23.590105699 +0100 +--- src/os_win32.c 2014-02-11 16:59:26.810211874 +0100 +*************** +*** 2877,2882 **** +--- 2877,2884 ---- + return OK; + } + } ++ else if (GetLastError() != ERROR_CALL_NOT_IMPLEMENTED) ++ return FAIL; + /* Retry with non-wide function (for Windows 98). */ + } + #endif +*************** +*** 2917,2922 **** +--- 2919,2926 ---- + return; + } + } ++ else if (GetLastError() != ERROR_CALL_NOT_IMPLEMENTED) ++ return; + /* Retry with non-wide function (for Windows 98). */ + } + #endif +*************** +*** 2966,2971 **** +--- 2970,2977 ---- + return OK; + } + } ++ else if (GetLastError() != ERROR_CALL_NOT_IMPLEMENTED) ++ return FAIL; + /* Retry with non-wide function (for Windows 98). */ + } + #endif +*************** +*** 3006,3012 **** + { + n = _wchmod(p, perm); + vim_free(p); +! if (n == -1 && GetLastError() != ERROR_CALL_NOT_IMPLEMENTED) + return FAIL; + /* Retry with non-wide function (for Windows 98). */ + } +--- 3012,3018 ---- + { + n = _wchmod(p, perm); + vim_free(p); +! if (n == -1 && g_PlatformId == VER_PLATFORM_WIN32_NT) + return FAIL; + /* Retry with non-wide function (for Windows 98). */ + } +*************** +*** 6048,6054 **** + { + f = _wopen(wn, flags, mode); + vim_free(wn); +! if (f >= 0) + return f; + /* Retry with non-wide function (for Windows 98). Can't use + * GetLastError() here and it's unclear what errno gets set to if +--- 6054,6060 ---- + { + f = _wopen(wn, flags, mode); + vim_free(wn); +! if (f >= 0 || g_PlatformId == VER_PLATFORM_WIN32_NT) + return f; + /* Retry with non-wide function (for Windows 98). Can't use + * GetLastError() here and it's unclear what errno gets set to if +*************** +*** 6099,6105 **** + _set_fmode(oldMode); + # endif + +! if (f != NULL) + return f; + /* Retry with non-wide function (for Windows 98). Can't use + * GetLastError() here and it's unclear what errno gets set to if +--- 6105,6111 ---- + _set_fmode(oldMode); + # endif + +! if (f != NULL || g_PlatformId == VER_PLATFORM_WIN32_NT) + return f; + /* Retry with non-wide function (for Windows 98). Can't use + * GetLastError() here and it's unclear what errno gets set to if +*** ../vim-7.4.174/src/version.c 2014-02-11 16:00:31.198157698 +0100 +--- src/version.c 2014-02-11 16:33:10.002187713 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 175, + /**/ + +-- +DINGO: And after the spanking ... the oral sex. +GALAHAD: Oh, dear! Well, I... +GIRLS: The oral sex ... The oral sex. +GALAHAD: Well, I suppose I could stay a BIT longer. + "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/patches/source/vim/patches/7.4.176 b/patches/source/vim/patches/7.4.176 new file mode 100644 index 000000000..ccde6b682 --- /dev/null +++ b/patches/source/vim/patches/7.4.176 @@ -0,0 +1,91 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.176 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.176 +Problem: Dictionary.update() thows an error when used without arguments. + Python programmers don't expect that. +Solution: Make Dictionary.update() without arguments do nothing. (ZyX) +Files: src/if_py_both.h, src/testdir/test86.in, src/testdir/test87.in + + +*** ../vim-7.4.175/src/if_py_both.h 2014-02-11 16:00:31.198157698 +0100 +--- src/if_py_both.h 2014-02-11 18:41:12.774305435 +0100 +*************** +*** 1918,1928 **** + } + else + { +! PyObject *obj; + +! if (!PyArg_ParseTuple(args, "O", &obj)) + return NULL; + + if (PyObject_HasAttrString(obj, "keys")) + return DictionaryUpdate(self, NULL, obj); + else +--- 1919,1935 ---- + } + else + { +! PyObject *obj = NULL; + +! if (!PyArg_ParseTuple(args, "|O", &obj)) + return NULL; + ++ if (obj == NULL) ++ { ++ Py_INCREF(Py_None); ++ return Py_None; ++ } ++ + if (PyObject_HasAttrString(obj, "keys")) + return DictionaryUpdate(self, NULL, obj); + else +*** ../vim-7.4.175/src/testdir/test86.in 2014-01-14 16:54:53.000000000 +0100 +--- src/testdir/test86.in 2014-02-11 17:25:08.414235496 +0100 +*************** +*** 39,44 **** +--- 39,45 ---- + py << EOF + d=vim.bindeval('d') + d['1']='asd' ++ d.update() # Must not do anything, including throwing errors + d.update(b=[1, 2, f]) + d.update((('-1', {'a': 1}),)) + d.update({'0': -1}) +*** ../vim-7.4.175/src/testdir/test87.in 2014-01-14 16:54:53.000000000 +0100 +--- src/testdir/test87.in 2014-02-11 17:25:12.602235560 +0100 +*************** +*** 33,38 **** +--- 33,39 ---- + py3 << EOF + d=vim.bindeval('d') + d['1']='asd' ++ d.update() # Must not do anything, including throwing errors + d.update(b=[1, 2, f]) + d.update((('-1', {'a': 1}),)) + d.update({'0': -1}) +*** ../vim-7.4.175/src/version.c 2014-02-11 17:05:57.282217857 +0100 +--- src/version.c 2014-02-11 18:46:37.518310411 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 176, + /**/ + +-- +"Intelligence has much less practical application than you'd think." + -- Scott Adams, Dilbert. + + /// 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/patches/source/vim/patches/7.4.177 b/patches/source/vim/patches/7.4.177 new file mode 100644 index 000000000..b943a1901 --- /dev/null +++ b/patches/source/vim/patches/7.4.177 @@ -0,0 +1,48 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.177 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.177 +Problem: Compiler warning for unused variable. (Tony Mechelynck) +Solution: Add #ifdef. +Files: src/move.c + + +*** ../vim-7.4.176/src/move.c 2014-02-11 15:47:41.382145902 +0100 +--- src/move.c 2014-02-11 18:13:57.378280376 +0100 +*************** +*** 2101,2107 **** +--- 2101,2109 ---- + int used; + lineoff_T loff; + lineoff_T boff; ++ #ifdef FEAT_DIFF + linenr_T old_topline = curwin->w_topline; ++ #endif + + loff.lnum = boff.lnum = curwin->w_cursor.lnum; + #ifdef FEAT_FOLDING +*** ../vim-7.4.176/src/version.c 2014-02-11 18:47:18.682311042 +0100 +--- src/version.c 2014-02-11 18:57:55.110320794 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 177, + /**/ + +-- +The psychic said, "God bless you." I said, "I didn't sneeze." She +looked deep into my eyes and said, "You will, eventually." And, damn +if she wasn't right. Two days later, I sneezed. --Ellen Degeneres + + /// 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/patches/source/vim/patches/7.4.178 b/patches/source/vim/patches/7.4.178 new file mode 100644 index 000000000..36e2eecea --- /dev/null +++ b/patches/source/vim/patches/7.4.178 @@ -0,0 +1,62 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.178 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.178 +Problem: The J command does not update '[ and '] marks. (William Gardner) +Solution: Set the marks. (Christian Brabandt) +Files: src/ops.c + + +*** ../vim-7.4.177/src/ops.c 2014-01-14 12:33:32.000000000 +0100 +--- src/ops.c 2014-02-11 19:22:46.538343647 +0100 +*************** +*** 4452,4457 **** +--- 4452,4463 ---- + for (t = 0; t < count; ++t) + { + curr = curr_start = ml_get((linenr_T)(curwin->w_cursor.lnum + t)); ++ if (t == 0) ++ { ++ /* Set the '[ mark. */ ++ curwin->w_buffer->b_op_start.lnum = curwin->w_cursor.lnum; ++ curwin->w_buffer->b_op_start.col = (colnr_T)STRLEN(curr); ++ } + #if defined(FEAT_COMMENTS) || defined(PROTO) + if (remove_comments) + { +*************** +*** 4568,4573 **** +--- 4574,4583 ---- + } + ml_replace(curwin->w_cursor.lnum, newp, FALSE); + ++ /* Set the '] mark. */ ++ curwin->w_buffer->b_op_end.lnum = curwin->w_cursor.lnum; ++ curwin->w_buffer->b_op_end.col = (colnr_T)STRLEN(newp); ++ + /* Only report the change in the first line here, del_lines() will report + * the deleted line. */ + changed_lines(curwin->w_cursor.lnum, currsize, +*** ../vim-7.4.177/src/version.c 2014-02-11 18:58:05.102320947 +0100 +--- src/version.c 2014-02-11 19:23:59.722344768 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 178, + /**/ + +-- +Eight Megabytes And Continually Swapping. + + /// 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/patches/source/vim/patches/7.4.179 b/patches/source/vim/patches/7.4.179 new file mode 100644 index 000000000..29b366eec --- /dev/null +++ b/patches/source/vim/patches/7.4.179 @@ -0,0 +1,57 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.179 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.179 +Problem: Warning for type-punned pointer. (Tony Mechelynck) +Solution: Use intermediate variable. +Files: src/if_py_both.h + + +*** ../vim-7.4.178/src/if_py_both.h 2014-02-11 18:47:18.678311042 +0100 +--- src/if_py_both.h 2014-02-11 18:41:12.774305435 +0100 +*************** +*** 1617,1624 **** + } + else if (flags & DICT_FLAG_RETURN_BOOL) + { +! Py_INCREF(Py_True); +! return Py_True; + } + + di = dict_lookup(hi); +--- 1617,1625 ---- + } + else if (flags & DICT_FLAG_RETURN_BOOL) + { +! ret = Py_True; +! Py_INCREF(ret); +! return ret; + } + + di = dict_lookup(hi); +*** ../vim-7.4.178/src/version.c 2014-02-11 19:33:03.358353098 +0100 +--- src/version.c 2014-02-12 22:08:16.795819706 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 179, + /**/ + +-- +Luxury. We used to have to get out of the lake at three o'clock in the +morning, clean the lake, eat a handful of hot gravel, go to work at the +mill every day for tuppence a month, come home, and Dad would beat us +around the head and neck with a broken bottle, if we were LUCKY! + + /// 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/patches/source/vim/patches/7.4.180 b/patches/source/vim/patches/7.4.180 new file mode 100644 index 000000000..4fa07699d --- /dev/null +++ b/patches/source/vim/patches/7.4.180 @@ -0,0 +1,76 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.180 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.180 (after 7.4.174) +Problem: Older Python versions don't support %ld. +Solution: Use %d instead. (ZyX) +Files: src/if_py_both.h + + +*** ../vim-7.4.179/src/if_py_both.h 2014-02-12 22:08:46.055820155 +0100 +--- src/if_py_both.h 2014-02-15 15:56:44.133904982 +0100 +*************** +*** 2510,2517 **** + { + Py_DECREF(iterator); + PyErr_FORMAT(PyExc_ValueError, +! N_("attempt to assign sequence of size greater then %ld " +! "to extended slice"), (long)slicelen); + list_restore(numadded, numreplaced, slicelen, l, lis, lastaddedli); + PyMem_Free(lis); + return -1; +--- 2510,2517 ---- + { + Py_DECREF(iterator); + PyErr_FORMAT(PyExc_ValueError, +! N_("attempt to assign sequence of size greater then %d " +! "to extended slice"), (int) slicelen); + list_restore(numadded, numreplaced, slicelen, l, lis, lastaddedli); + PyMem_Free(lis); + return -1; +*************** +*** 2523,2530 **** + if (step != 1 && i != slicelen) + { + PyErr_FORMAT2(PyExc_ValueError, +! N_("attempt to assign sequence of size %ld to extended slice " +! "of size %ld"), (long)i, (long)slicelen); + list_restore(numadded, numreplaced, slicelen, l, lis, lastaddedli); + PyMem_Free(lis); + return -1; +--- 2523,2530 ---- + if (step != 1 && i != slicelen) + { + PyErr_FORMAT2(PyExc_ValueError, +! N_("attempt to assign sequence of size %d to extended slice " +! "of size %d"), (int) i, (int) slicelen); + list_restore(numadded, numreplaced, slicelen, l, lis, lastaddedli); + PyMem_Free(lis); + return -1; +*** ../vim-7.4.179/src/version.c 2014-02-12 22:08:46.059820155 +0100 +--- src/version.c 2014-02-15 15:58:13.877904839 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 180, + /**/ + +-- + LAUNCELOT leaps into SHOT with a mighty cry and runs the GUARD through and + hacks him to the floor. Blood. Swashbuckling music (perhaps). + LAUNCELOT races through into the castle screaming. +SECOND SENTRY: Hey! + "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/patches/source/vim/patches/7.4.181 b/patches/source/vim/patches/7.4.181 new file mode 100644 index 000000000..3668d086b --- /dev/null +++ b/patches/source/vim/patches/7.4.181 @@ -0,0 +1,68 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.181 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.181 +Problem: When using 'pastetoggle' the status lines are not updated. (Samuel + Ferencik, Jan Christoph Ebersbach) +Solution: Update the status lines. (Nobuhiro Takasaki) +Files: src/getchar.c + + +*** ../vim-7.4.180/src/getchar.c 2014-02-11 15:10:38.130111835 +0100 +--- src/getchar.c 2014-02-15 16:14:34.249903278 +0100 +*************** +*** 406,412 **** + } + + /* +! * Prepare the read buffers for reading (if they contains something). + */ + static void + start_stuff() +--- 406,412 ---- + } + + /* +! * Prepare the read buffers for reading (if they contain something). + */ + static void + start_stuff() +*************** +*** 2302,2307 **** +--- 2302,2311 ---- + msg_row = Rows - 1; + msg_clr_eos(); /* clear ruler */ + } ++ #ifdef FEAT_WINDOWS ++ status_redraw_all(); ++ redraw_statuslines(); ++ #endif + showmode(); + setcursor(); + continue; +*** ../vim-7.4.180/src/version.c 2014-02-15 15:58:55.081904773 +0100 +--- src/version.c 2014-02-15 16:12:22.329903488 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 181, + /**/ + +-- +FIRST GUARD: Ah! Now ... we're not allowed to ... + SIR LAUNCELOT runs him through, grabs his spear and stabs the other + guard who collapses in a heap. Hiccoughs quietly. + "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/patches/source/vim/patches/7.4.182 b/patches/source/vim/patches/7.4.182 new file mode 100644 index 000000000..72b41483d --- /dev/null +++ b/patches/source/vim/patches/7.4.182 @@ -0,0 +1,56 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.182 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.182 +Problem: Building with mzscheme and racket does not work. (David Chimay) +Solution: Adjust autoconf. (Sergey Khorev) +Files: src/configure.in, src/auto/configure + + +*** ../vim-7.4.181/src/configure.in 2013-11-21 12:17:46.000000000 +0100 +--- src/configure.in 2014-02-15 16:21:41.705902597 +0100 +*************** +*** 802,810 **** +--- 802,820 ---- + AC_MSG_CHECKING(for mzscheme_base.c) + if test -f "${SCHEME_COLLECTS}collects/scheme/base.ss" ; then + MZSCHEME_EXTRA="mzscheme_base.c" ++ MZSCHEME_MZC="${vi_cv_path_mzscheme_pfx}/bin/mzc" ++ MZSCHEME_MOD="++lib scheme/base" + else + if test -f "${SCHEME_COLLECTS}collects/scheme/base.rkt" ; then + MZSCHEME_EXTRA="mzscheme_base.c" ++ MZSCHEME_MZC="${vi_cv_path_mzscheme_pfx}/bin/mzc" ++ MZSCHEME_MOD="++lib scheme/base" ++ else ++ if test -f "${SCHEME_COLLECTS}collects/racket/base.rkt" ; then ++ MZSCHEME_EXTRA="mzscheme_base.c" ++ MZSCHEME_MZC="${vi_cv_path_mzscheme_pfx}/bin/raco ctool" ++ MZSCHEME_MOD="" ++ fi + fi + fi + if test "X$MZSCHEME_EXTRA" != "X" ; then +*** ../vim-7.4.181/src/version.c 2014-02-15 16:17:02.213903042 +0100 +--- src/version.c 2014-02-15 16:23:42.505902405 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 182, + /**/ + +-- +Overflow on /dev/null, please empty the bit bucket. + + /// 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/patches/source/vim/patches/7.4.183 b/patches/source/vim/patches/7.4.183 new file mode 100644 index 000000000..f23061cfc --- /dev/null +++ b/patches/source/vim/patches/7.4.183 @@ -0,0 +1,49 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.183 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.183 +Problem: MSVC Visual Studio update not supported. +Solution: Add version number. (Mike William) +Files: src/Make_mvc.mak + + +*** ../vim-7.4.182/src/Make_mvc.mak 2013-12-14 11:50:28.000000000 +0100 +--- src/Make_mvc.mak 2014-02-15 19:25:27.333885042 +0100 +*************** +*** 424,429 **** +--- 424,432 ---- + !if "$(_NMAKE_VER)" == "11.00.60610.1" + MSVCVER = 11.0 + !endif ++ !if "$(_NMAKE_VER)" == "11.00.61030.0" ++ MSVCVER = 11.0 ++ !endif + !if "$(_NMAKE_VER)" == "12.00.21005.1" + MSVCVER = 12.0 + !endif +*** ../vim-7.4.182/src/version.c 2014-02-15 17:18:56.953897128 +0100 +--- src/version.c 2014-02-15 19:31:11.337884494 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 183, + /**/ + +-- +FATHER: Did you kill all those guards? +LAUNCELOT: Yes ... I'm very sorry ... +FATHER: They cost fifty pounds each! + "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/patches/source/vim/patches/7.4.184 b/patches/source/vim/patches/7.4.184 new file mode 100644 index 000000000..d6ceb64af --- /dev/null +++ b/patches/source/vim/patches/7.4.184 @@ -0,0 +1,250 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.184 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.184 +Problem: match() does not work properly with a {count} argument. +Solution: Compute the length once and update it. Quit the loop when at the + end. (Hirohito Higashi) +Files: src/eval.c, src/testdir/test53.in, src/testdir/test53.ok + + +*** ../vim-7.4.183/src/eval.c 2014-02-05 22:13:02.366556787 +0100 +--- src/eval.c 2014-02-22 22:13:26.644906020 +0100 +*************** +*** 8014,8020 **** + {"log10", 1, 1, f_log10}, + #endif + #ifdef FEAT_LUA +! {"luaeval", 1, 2, f_luaeval}, + #endif + {"map", 2, 2, f_map}, + {"maparg", 1, 4, f_maparg}, +--- 8014,8020 ---- + {"log10", 1, 1, f_log10}, + #endif + #ifdef FEAT_LUA +! {"luaeval", 1, 2, f_luaeval}, + #endif + {"map", 2, 2, f_map}, + {"maparg", 1, 4, f_maparg}, +*************** +*** 13905,13910 **** +--- 13905,13911 ---- + int type; + { + char_u *str = NULL; ++ long len = 0; + char_u *expr = NULL; + char_u *pat; + regmatch_T regmatch; +*************** +*** 13944,13950 **** +--- 13945,13954 ---- + li = l->lv_first; + } + else ++ { + expr = str = get_tv_string(&argvars[0]); ++ len = (long)STRLEN(str); ++ } + + pat = get_tv_string_buf_chk(&argvars[1], patbuf); + if (pat == NULL) +*************** +*** 13968,13974 **** + { + if (start < 0) + start = 0; +! if (start > (long)STRLEN(str)) + goto theend; + /* When "count" argument is there ignore matches before "start", + * otherwise skip part of the string. Differs when pattern is "^" +--- 13972,13978 ---- + { + if (start < 0) + start = 0; +! if (start > len) + goto theend; + /* When "count" argument is there ignore matches before "start", + * otherwise skip part of the string. Differs when pattern is "^" +*************** +*** 13976,13982 **** +--- 13980,13989 ---- + if (argvars[3].v_type != VAR_UNKNOWN) + startcol = start; + else ++ { + str += start; ++ len -= start; ++ } + } + + if (argvars[3].v_type != VAR_UNKNOWN) +*************** +*** 14026,14031 **** +--- 14033,14044 ---- + #else + startcol = (colnr_T)(regmatch.startp[0] + 1 - str); + #endif ++ if (startcol > (colnr_T)len ++ || str + startcol <= regmatch.startp[0]) ++ { ++ match = FALSE; ++ break; ++ } + } + } + +*** ../vim-7.4.183/src/testdir/test53.in 2013-10-02 21:54:57.000000000 +0200 +--- src/testdir/test53.in 2014-02-22 22:08:24.260906501 +0100 +*************** +*** 4,9 **** +--- 4,11 ---- + + Also test match() and matchstr() + ++ Also test the gn command and repeating it. ++ + STARTTEST + :so small.vim + /^start:/ +*************** +*** 28,33 **** +--- 30,57 ---- + :put =matchstr(\"abcd\", \".\", 0, -1) " a + :put =match(\"abcd\", \".\", 0, 5) " -1 + :put =match(\"abcd\", \".\", 0, -1) " 0 ++ :put =match('abc', '.', 0, 1) " 0 ++ :put =match('abc', '.', 0, 2) " 1 ++ :put =match('abc', '.', 0, 3) " 2 ++ :put =match('abc', '.', 0, 4) " -1 ++ :put =match('abc', '.', 1, 1) " 1 ++ :put =match('abc', '.', 2, 1) " 2 ++ :put =match('abc', '.', 3, 1) " -1 ++ :put =match('abc', '$', 0, 1) " 3 ++ :put =match('abc', '$', 0, 2) " -1 ++ :put =match('abc', '$', 1, 1) " 3 ++ :put =match('abc', '$', 2, 1) " 3 ++ :put =match('abc', '$', 3, 1) " 3 ++ :put =match('abc', '$', 4, 1) " -1 ++ :put =match('abc', '\zs', 0, 1) " 0 ++ :put =match('abc', '\zs', 0, 2) " 1 ++ :put =match('abc', '\zs', 0, 3) " 2 ++ :put =match('abc', '\zs', 0, 4) " 3 ++ :put =match('abc', '\zs', 0, 5) " -1 ++ :put =match('abc', '\zs', 1, 1) " 1 ++ :put =match('abc', '\zs', 2, 1) " 2 ++ :put =match('abc', '\zs', 3, 1) " 3 ++ :put =match('abc', '\zs', 4, 1) " -1 + /^foobar + gncsearchmatch/one\_s*two\_s + :1 +*************** +*** 49,54 **** +--- 73,84 ---- + :" Make sure there is no other match y uppercase. + /x59 + gggnd ++ :" test repeating dgn ++ /^Johnny ++ ggdgn. ++ :" test repeating gUgn ++ /^Depp ++ gggUgn. + :/^start:/,/^end:/wq! test.out + ENDTEST + +*************** +*** 81,84 **** +--- 111,123 ---- + Y + text + Y ++ --1 ++ Johnny ++ --2 ++ Johnny ++ --3 ++ Depp ++ --4 ++ Depp ++ --5 + end: +*** ../vim-7.4.183/src/testdir/test53.ok 2013-10-02 21:54:57.000000000 +0200 +--- src/testdir/test53.ok 2014-02-22 22:08:24.264906501 +0100 +*************** +*** 18,23 **** +--- 18,45 ---- + a + -1 + 0 ++ 0 ++ 1 ++ 2 ++ -1 ++ 1 ++ 2 ++ -1 ++ 3 ++ -1 ++ 3 ++ 3 ++ 3 ++ -1 ++ 0 ++ 1 ++ 2 ++ 3 ++ -1 ++ 1 ++ 2 ++ 3 ++ -1 + SEARCH: + searchmatch + abcdx | | abcdx +*************** +*** 30,33 **** +--- 52,64 ---- + + text + Y ++ --1 ++ ++ --2 ++ ++ --3 ++ DEPP ++ --4 ++ DEPP ++ --5 + end: +*** ../vim-7.4.183/src/version.c 2014-02-15 19:47:46.685882910 +0100 +--- src/version.c 2014-02-22 22:10:49.604906270 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 184, + /**/ + +-- +WOMAN: I didn't know we had a king. I thought we were an autonomous + collective. +DENNIS: You're fooling yourself. We're living in a dictatorship. A + self-perpetuating autocracy in which the working classes-- +WOMAN: Oh there you go, bringing class into it again. +DENNIS: That's what it's all about if only people would-- + 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/patches/source/vim/patches/7.4.185 b/patches/source/vim/patches/7.4.185 new file mode 100644 index 000000000..b326a16df --- /dev/null +++ b/patches/source/vim/patches/7.4.185 @@ -0,0 +1,64 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.185 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.185 +Problem: Clang gives warnings. +Solution: Adjust how bigness is set. (Dominique Pelle) +Files: src/ex_cmds.c + + +*** ../vim-7.4.184/src/ex_cmds.c 2014-02-11 12:15:39.781950970 +0100 +--- src/ex_cmds.c 2014-02-22 22:25:45.800904843 +0100 +*************** +*** 4099,4110 **** + * 'scroll' */ + if (eap->forceit) + bigness = curwin->w_height; +- else if (firstwin == lastwin) +- bigness = curwin->w_p_scr * 2; + #ifdef FEAT_WINDOWS +! else + bigness = curwin->w_height - 3; + #endif + if (bigness < 1) + bigness = 1; + +--- 4099,4110 ---- + * 'scroll' */ + if (eap->forceit) + bigness = curwin->w_height; + #ifdef FEAT_WINDOWS +! else if (firstwin != lastwin) + bigness = curwin->w_height - 3; + #endif ++ else ++ bigness = curwin->w_p_scr * 2; + if (bigness < 1) + bigness = 1; + +*** ../vim-7.4.184/src/version.c 2014-02-22 22:18:39.536905522 +0100 +--- src/version.c 2014-02-22 22:22:51.912905120 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 185, + /**/ + +-- +There are 2 kinds of people in my world: those who know Unix, Perl, Vim, GNU, +Linux, etc, and those who know COBOL. It gets very difficult for me at +parties, not knowing which group to socialise with :-) + Sitaram Chamarty + + /// 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/patches/source/vim/patches/7.4.186 b/patches/source/vim/patches/7.4.186 new file mode 100644 index 000000000..84f0a3133 --- /dev/null +++ b/patches/source/vim/patches/7.4.186 @@ -0,0 +1,164 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.186 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.186 (after 7.4.085) +Problem: Insert in Visual mode sometimes gives incorrect results. + (Dominique Pelle) +Solution: Remember the original insert start position. (Christian Brabandt, + Dominique Pelle) +Files: src/edit.c, src/globals.h, src/ops.c, src/structs.h + + +*** ../vim-7.4.185/src/edit.c 2014-01-23 22:45:54.608127182 +0100 +--- src/edit.c 2014-02-22 22:43:52.820903112 +0100 +*************** +*** 264,269 **** +--- 264,270 ---- + + static colnr_T Insstart_textlen; /* length of line when insert started */ + static colnr_T Insstart_blank_vcol; /* vcol for first inserted blank */ ++ static int update_Insstart_orig = TRUE; /* set Insstart_orig to Insstart */ + + static char_u *last_insert = NULL; /* the text of the previous insert, + K_SPECIAL and CSI are escaped */ +*************** +*** 340,345 **** +--- 341,349 ---- + * error message */ + check_for_delay(TRUE); + ++ /* set Insstart_orig to Insstart */ ++ update_Insstart_orig = TRUE; ++ + #ifdef HAVE_SANDBOX + /* Don't allow inserting in the sandbox. */ + if (sandbox != 0) +*************** +*** 631,636 **** +--- 635,643 ---- + if (arrow_used) /* don't repeat insert when arrow key used */ + count = 0; + ++ if (update_Insstart_orig) ++ Insstart_orig = Insstart; ++ + if (stop_insert_mode) + { + /* ":stopinsert" used or 'insertmode' reset */ +*************** +*** 6923,6928 **** +--- 6930,6936 ---- + if (end_insert_pos != NULL) + { + curbuf->b_op_start = Insstart; ++ curbuf->b_op_start_orig = Insstart_orig; + curbuf->b_op_end = *end_insert_pos; + } + } +*************** +*** 8257,8262 **** +--- 8265,8271 ---- + + /* Need to reset Insstart, esp. because a BS that joins + * a line to the previous one must save for undo. */ ++ update_Insstart_orig = FALSE; + Insstart = curwin->w_cursor; + break; + +*** ../vim-7.4.185/src/globals.h 2014-02-11 15:10:38.130111835 +0100 +--- src/globals.h 2014-02-22 23:02:01.644901378 +0100 +*************** +*** 752,757 **** +--- 752,763 ---- + */ + EXTERN pos_T Insstart; /* This is where the latest + * insert/append mode started. */ ++ ++ /* This is where the latest insert/append mode started. In contrast to ++ * Insstart, this won't be reset by certain keys and is needed for ++ * op_insert(), to detect correctly where inserting by the user started. */ ++ EXTERN pos_T Insstart_orig; ++ + #ifdef FEAT_VREPLACE + /* + * Stuff for VREPLACE mode. +*** ../vim-7.4.185/src/ops.c 2014-02-11 19:33:03.358353098 +0100 +--- src/ops.c 2014-02-22 22:39:47.588903502 +0100 +*************** +*** 2643,2662 **** + + /* 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) + { +! oap->start.col = curbuf->b_op_start.col; + pre_textlen -= getviscol2(oap->start.col, oap->start.coladd) + - oap->start_vcol; + oap->start_vcol = getviscol2(oap->start.col, oap->start.coladd); + } + else if (oap->op_type == OP_APPEND +! && oap->end.col >= curbuf->b_op_start.col) + { +! oap->start.col = curbuf->b_op_start.col; + /* reset pre_textlen to the value of OP_INSERT */ + pre_textlen += bd.textlen; + pre_textlen -= getviscol2(oap->start.col, oap->start.coladd) +--- 2643,2662 ---- + + /* 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_orig.lnum && !bd.is_MAX) + { + if (oap->op_type == OP_INSERT +! && oap->start.col != curbuf->b_op_start_orig.col) + { +! oap->start.col = curbuf->b_op_start_orig.col; + pre_textlen -= getviscol2(oap->start.col, oap->start.coladd) + - oap->start_vcol; + oap->start_vcol = getviscol2(oap->start.col, oap->start.coladd); + } + else if (oap->op_type == OP_APPEND +! && oap->end.col >= curbuf->b_op_start_orig.col) + { +! oap->start.col = curbuf->b_op_start_orig.col; + /* reset pre_textlen to the value of OP_INSERT */ + pre_textlen += bd.textlen; + pre_textlen -= getviscol2(oap->start.col, oap->start.coladd) +*** ../vim-7.4.185/src/structs.h 2014-02-11 15:10:38.138111836 +0100 +--- src/structs.h 2014-02-22 22:39:47.588903502 +0100 +*************** +*** 1449,1454 **** +--- 1449,1455 ---- + * start and end of an operator, also used for '[ and '] + */ + pos_T b_op_start; ++ pos_T b_op_start_orig; /* used for Insstart_orig */ + pos_T b_op_end; + + #ifdef FEAT_VIMINFO +*** ../vim-7.4.185/src/version.c 2014-02-22 22:27:20.772904692 +0100 +--- src/version.c 2014-02-22 22:39:08.932903564 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 186, + /**/ + +-- +Individualists unite! + + /// 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/patches/source/vim/patches/7.4.187 b/patches/source/vim/patches/7.4.187 new file mode 100644 index 000000000..122056e47 --- /dev/null +++ b/patches/source/vim/patches/7.4.187 @@ -0,0 +1,136 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.187 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.187 +Problem: Delete that crosses line break splits multi-byte character. +Solution: Advance a character instead of a byte. (Cade Foster) +Files: src/normal.c, src/testdir/test69.in, src/testdir/test69.ok + + +*** ../vim-7.4.186/src/normal.c 2014-02-11 15:10:38.134111836 +0100 +--- src/normal.c 2014-02-22 23:41:12.472897635 +0100 +*************** +*** 21,27 **** + static int resel_VIsual_mode = NUL; /* 'v', 'V', or Ctrl-V */ + static linenr_T resel_VIsual_line_count; /* number of lines */ + static colnr_T resel_VIsual_vcol; /* nr of cols or end col */ +! static int VIsual_mode_orig = NUL; /* type of Visual mode, that user entered */ + + static int restart_VIsual_select = 0; + #endif +--- 21,27 ---- + static int resel_VIsual_mode = NUL; /* 'v', 'V', or Ctrl-V */ + static linenr_T resel_VIsual_line_count; /* number of lines */ + static colnr_T resel_VIsual_vcol; /* nr of cols or end col */ +! static int VIsual_mode_orig = NUL; /* saved Visual mode */ + + static int restart_VIsual_select = 0; + #endif +*************** +*** 6202,6209 **** + || cap->oap->op_type == OP_CHANGE) + && !lineempty(curwin->w_cursor.lnum)) + { +! if (*ml_get_cursor() != NUL) +! ++curwin->w_cursor.col; + cap->retval |= CA_NO_ADJ_OP_END; + } + continue; +--- 6202,6218 ---- + || cap->oap->op_type == OP_CHANGE) + && !lineempty(curwin->w_cursor.lnum)) + { +! char_u *cp = ml_get_cursor(); +! +! if (*cp != NUL) +! { +! #ifdef FEAT_MBYTE +! if (has_mbyte) +! curwin->w_cursor.col += (*mb_ptr2len)(cp); +! else +! #endif +! ++curwin->w_cursor.col; +! } + cap->retval |= CA_NO_ADJ_OP_END; + } + continue; +*************** +*** 9482,9488 **** + # ifdef FEAT_CLIPBOARD + adjust_clip_reg(®name); + # endif +! if (regname == 0 || regname == '"' + || VIM_ISDIGIT(regname) || regname == '-' + # ifdef FEAT_CLIPBOARD + || (clip_unnamed && (regname == '*' || regname == '+')) +--- 9491,9497 ---- + # ifdef FEAT_CLIPBOARD + adjust_clip_reg(®name); + # endif +! if (regname == 0 || regname == '"' + || VIM_ISDIGIT(regname) || regname == '-' + # ifdef FEAT_CLIPBOARD + || (clip_unnamed && (regname == '*' || regname == '+')) +*** ../vim-7.4.186/src/testdir/test69.in 2013-11-02 23:29:17.000000000 +0100 +--- src/testdir/test69.in 2014-02-22 23:38:50.508897861 +0100 +*************** +*** 155,160 **** +--- 155,170 ---- + aab + + STARTTEST ++ :set whichwrap+=h ++ /^x ++ dh ++ :set whichwrap-=h ++ ENDTEST ++ ++ á ++ x ++ ++ STARTTEST + :let a = '.é.' " one char of two bytes + :let b = '.é.' " normal e with composing char + /^byteidx +*** ../vim-7.4.186/src/testdir/test69.ok 2013-11-02 23:29:17.000000000 +0100 +--- src/testdir/test69.ok 2014-02-22 23:38:53.752897856 +0100 +*************** +*** 150,155 **** +--- 150,158 ---- + aaa + + ++ áx ++ ++ + byteidx + [0, 1, 3, 4, -1] + [0, 1, 4, 5, -1] +*** ../vim-7.4.186/src/version.c 2014-02-22 23:03:48.716901208 +0100 +--- src/version.c 2014-02-22 23:30:24.412898667 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 187, + /**/ + +-- +ARTHUR: Then who is your lord? +WOMAN: We don't have a lord. +ARTHUR: What? +DENNIS: I told you. We're an anarcho-syndicalist commune. We take it in + turns to act as a sort of executive officer for the week. + 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/patches/source/vim/patches/7.4.188 b/patches/source/vim/patches/7.4.188 new file mode 100644 index 000000000..b2b4fa12f --- /dev/null +++ b/patches/source/vim/patches/7.4.188 @@ -0,0 +1,617 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.188 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.188 +Problem: SIZEOF_LONG clashes with similar defines in header files. +Solution: Rename to a name starting with VIM_. Also for SIZEOF_INT. +Files: src/if_ruby.c, src/vim.h, src/configure.in, src/auto/configure, + src/config.h.in, src/fileio.c, src/if_python.c, src/message.c, + src/spell.c, src/feature.h, src/os_os2_cfg.h, src/os_vms_conf.h, + src/os_win16.h, src/structs.h + + +*** ../vim-7.4.187/src/if_ruby.c 2014-02-05 22:41:11.430582669 +0100 +--- src/if_ruby.c 2014-02-23 21:55:03.516770208 +0100 +*************** +*** 89,97 **** + #endif + + #if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 20 \ +! && SIZEOF_INT < SIZEOF_LONG + /* Ruby 2.0 defines a number of static functions which use rb_fix2int and +! * rb_num2int if SIZEOF_INT < SIZEOF_LONG (64bit) */ + # define rb_fix2int rb_fix2int_stub + # define rb_num2int rb_num2int_stub + #endif +--- 89,97 ---- + #endif + + #if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 20 \ +! && VIM_SIZEOF_INT < VIM_SIZEOF_LONG + /* Ruby 2.0 defines a number of static functions which use rb_fix2int and +! * rb_num2int if VIM_SIZEOF_INT < VIM_SIZEOF_LONG (64bit) */ + # define rb_fix2int rb_fix2int_stub + # define rb_num2int rb_num2int_stub + #endif +*************** +*** 202,208 **** + # define rb_hash_new dll_rb_hash_new + # define rb_inspect dll_rb_inspect + # define rb_int2inum dll_rb_int2inum +! # if SIZEOF_INT < SIZEOF_LONG /* 64 bits only */ + # define rb_fix2int dll_rb_fix2int + # define rb_num2int dll_rb_num2int + # define rb_num2uint dll_rb_num2uint +--- 202,208 ---- + # define rb_hash_new dll_rb_hash_new + # define rb_inspect dll_rb_inspect + # define rb_int2inum dll_rb_int2inum +! # if VIM_SIZEOF_INT < VIM_SIZEOF_LONG /* 64 bits only */ + # define rb_fix2int dll_rb_fix2int + # define rb_num2int dll_rb_num2int + # define rb_num2uint dll_rb_num2uint +*************** +*** 310,316 **** + static VALUE (*dll_rb_hash_new) (void); + static VALUE (*dll_rb_inspect) (VALUE); + static VALUE (*dll_rb_int2inum) (long); +! # if SIZEOF_INT < SIZEOF_LONG /* 64 bits only */ + static long (*dll_rb_fix2int) (VALUE); + static long (*dll_rb_num2int) (VALUE); + static unsigned long (*dll_rb_num2uint) (VALUE); +--- 310,316 ---- + static VALUE (*dll_rb_hash_new) (void); + static VALUE (*dll_rb_inspect) (VALUE); + static VALUE (*dll_rb_int2inum) (long); +! # if VIM_SIZEOF_INT < VIM_SIZEOF_LONG /* 64 bits only */ + static long (*dll_rb_fix2int) (VALUE); + static long (*dll_rb_num2int) (VALUE); + static unsigned long (*dll_rb_num2uint) (VALUE); +*************** +*** 393,399 **** + return dll_rb_int2big(x); + } + # if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 20 \ +! && SIZEOF_INT < SIZEOF_LONG + long rb_fix2int_stub(VALUE x) + { + return dll_rb_fix2int(x); +--- 393,399 ---- + return dll_rb_int2big(x); + } + # if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 20 \ +! && VIM_SIZEOF_INT < VIM_SIZEOF_LONG + long rb_fix2int_stub(VALUE x) + { + return dll_rb_fix2int(x); +*************** +*** 466,472 **** + {"rb_hash_new", (RUBY_PROC*)&dll_rb_hash_new}, + {"rb_inspect", (RUBY_PROC*)&dll_rb_inspect}, + {"rb_int2inum", (RUBY_PROC*)&dll_rb_int2inum}, +! # if SIZEOF_INT < SIZEOF_LONG /* 64 bits only */ + {"rb_fix2int", (RUBY_PROC*)&dll_rb_fix2int}, + {"rb_num2int", (RUBY_PROC*)&dll_rb_num2int}, + {"rb_num2uint", (RUBY_PROC*)&dll_rb_num2uint}, +--- 466,472 ---- + {"rb_hash_new", (RUBY_PROC*)&dll_rb_hash_new}, + {"rb_inspect", (RUBY_PROC*)&dll_rb_inspect}, + {"rb_int2inum", (RUBY_PROC*)&dll_rb_int2inum}, +! # if VIM_SIZEOF_INT < VIM_SIZEOF_LONG /* 64 bits only */ + {"rb_fix2int", (RUBY_PROC*)&dll_rb_fix2int}, + {"rb_num2int", (RUBY_PROC*)&dll_rb_num2int}, + {"rb_num2uint", (RUBY_PROC*)&dll_rb_num2uint}, +*** ../vim-7.4.187/src/vim.h 2014-01-14 16:54:53.000000000 +0100 +--- src/vim.h 2014-02-23 21:58:23.764769890 +0100 +*************** +*** 43,49 **** + * it becomes zero. This is likely a problem of not being able to run the + * test program. Other items from configure may also be wrong then! + */ +! # if (SIZEOF_INT == 0) + Error: configure did not run properly. Check auto/config.log. + # endif + +--- 43,49 ---- + * it becomes zero. This is likely a problem of not being able to run the + * test program. Other items from configure may also be wrong then! + */ +! # if (VIM_SIZEOF_INT == 0) + Error: configure did not run properly. Check auto/config.log. + # endif + +*************** +*** 148,169 **** + #endif + + /* +! * SIZEOF_INT is used in feature.h, and the system-specific included files +! * need items from feature.h. Therefore define SIZEOF_INT here. + */ + #ifdef WIN3264 +! # define SIZEOF_INT 4 + #endif + #ifdef MSDOS + # ifdef DJGPP + # ifndef FEAT_GUI_GTK /* avoid problems when generating prototypes */ +! # define SIZEOF_INT 4 /* 32 bit ints */ + # endif + # define DOS32 + # define FEAT_CLIPBOARD + # else + # ifndef FEAT_GUI_GTK /* avoid problems when generating prototypes */ +! # define SIZEOF_INT 2 /* 16 bit ints */ + # endif + # define SMALL_MALLOC /* 16 bit storage allocation */ + # define DOS16 +--- 148,169 ---- + #endif + + /* +! * VIM_SIZEOF_INT is used in feature.h, and the system-specific included files +! * need items from feature.h. Therefore define VIM_SIZEOF_INT here. + */ + #ifdef WIN3264 +! # define VIM_SIZEOF_INT 4 + #endif + #ifdef MSDOS + # ifdef DJGPP + # ifndef FEAT_GUI_GTK /* avoid problems when generating prototypes */ +! # define VIM_SIZEOF_INT 4 /* 32 bit ints */ + # endif + # define DOS32 + # define FEAT_CLIPBOARD + # else + # ifndef FEAT_GUI_GTK /* avoid problems when generating prototypes */ +! # define VIM_SIZEOF_INT 2 /* 16 bit ints */ + # endif + # define SMALL_MALLOC /* 16 bit storage allocation */ + # define DOS16 +*************** +*** 174,191 **** + /* Be conservative about sizeof(int). It could be 4 too. */ + # ifndef FEAT_GUI_GTK /* avoid problems when generating prototypes */ + # ifdef __GNUC__ +! # define SIZEOF_INT 4 + # else +! # define SIZEOF_INT 2 + # endif + # endif + #endif + #ifdef MACOS + # if defined(__POWERPC__) || defined(MACOS_X) || defined(__fourbyteints__) \ + || defined(__MRC__) || defined(__SC__) || defined(__APPLE_CC__)/* MPW Compilers */ +! # define SIZEOF_INT 4 + # else +! # define SIZEOF_INT 2 + # endif + #endif + +--- 174,191 ---- + /* Be conservative about sizeof(int). It could be 4 too. */ + # ifndef FEAT_GUI_GTK /* avoid problems when generating prototypes */ + # ifdef __GNUC__ +! # define VIM_SIZEOF_INT 4 + # else +! # define VIM_SIZEOF_INT 2 + # endif + # endif + #endif + #ifdef MACOS + # if defined(__POWERPC__) || defined(MACOS_X) || defined(__fourbyteints__) \ + || defined(__MRC__) || defined(__SC__) || defined(__APPLE_CC__)/* MPW Compilers */ +! # define VIM_SIZEOF_INT 4 + # else +! # define VIM_SIZEOF_INT 2 + # endif + #endif + +*************** +*** 417,428 **** + #define PRINTF_DECIMAL_LONG_U SCANF_DECIMAL_LONG_U + + /* +! * Only systems which use configure will have SIZEOF_OFF_T and SIZEOF_LONG + * defined, which is ok since those are the same systems which can have + * varying sizes for off_t. The other systems will continue to use "%ld" to + * print off_t since off_t is simply a typedef to long for them. + */ +! #if defined(SIZEOF_OFF_T) && (SIZEOF_OFF_T > SIZEOF_LONG) + # define LONG_LONG_OFF_T + #endif + +--- 417,428 ---- + #define PRINTF_DECIMAL_LONG_U SCANF_DECIMAL_LONG_U + + /* +! * Only systems which use configure will have SIZEOF_OFF_T and VIM_SIZEOF_LONG + * defined, which is ok since those are the same systems which can have + * varying sizes for off_t. The other systems will continue to use "%ld" to + * print off_t since off_t is simply a typedef to long for them. + */ +! #if defined(SIZEOF_OFF_T) && (SIZEOF_OFF_T > VIM_SIZEOF_LONG) + # define LONG_LONG_OFF_T + #endif + +*************** +*** 448,454 **** + # ifdef UNICODE16 + typedef unsigned short u8char_T; /* short should be 16 bits */ + # else +! # if SIZEOF_INT >= 4 + typedef unsigned int u8char_T; /* int is 32 bits */ + # else + typedef unsigned long u8char_T; /* long should be 32 bits or more */ +--- 448,454 ---- + # ifdef UNICODE16 + typedef unsigned short u8char_T; /* short should be 16 bits */ + # else +! # if VIM_SIZEOF_INT >= 4 + typedef unsigned int u8char_T; /* int is 32 bits */ + # else + typedef unsigned long u8char_T; /* long should be 32 bits or more */ +*************** +*** 1608,1614 **** + * With this we restrict the maximum line length to 1073741823. I guess this is + * not a real problem. BTW: Longer lines are split. + */ +! #if SIZEOF_INT >= 4 + # ifdef __MVS__ + # define MAXCOL (0x3fffffffL) /* maximum column number, 30 bits */ + # else +--- 1608,1614 ---- + * With this we restrict the maximum line length to 1073741823. I guess this is + * not a real problem. BTW: Longer lines are split. + */ +! #if VIM_SIZEOF_INT >= 4 + # ifdef __MVS__ + # define MAXCOL (0x3fffffffL) /* maximum column number, 30 bits */ + # else +*** ../vim-7.4.187/src/configure.in 2014-02-15 17:18:56.953897128 +0100 +--- src/configure.in 2014-02-23 22:37:40.080766138 +0100 +*************** +*** 3581,3586 **** +--- 3581,3590 ---- + AC_CHECK_SIZEOF([time_t]) + AC_CHECK_SIZEOF([off_t]) + ++ dnl Use different names to avoid clashing with other header files. ++ AC_DEFINE_UNQUOTED(VIM_SIZEOF_INT, [$ac_cv_sizeof_int]) ++ AC_DEFINE_UNQUOTED(VIM_SIZEOF_LONG, [$ac_cv_sizeof_long]) ++ + dnl Make sure that uint32_t is really 32 bits unsigned. + AC_MSG_CHECKING([uint32_t is 32 bits]) + AC_TRY_RUN([ +*** ../vim-7.4.187/src/auto/configure 2013-11-21 12:17:46.000000000 +0100 +--- src/auto/configure 2014-02-23 22:37:43.692766132 +0100 +*************** +*** 5199,5207 **** +--- 5199,5217 ---- + $as_echo_n "checking for mzscheme_base.c... " >&6; } + if test -f "${SCHEME_COLLECTS}collects/scheme/base.ss" ; then + MZSCHEME_EXTRA="mzscheme_base.c" ++ MZSCHEME_MZC="${vi_cv_path_mzscheme_pfx}/bin/mzc" ++ MZSCHEME_MOD="++lib scheme/base" + else + if test -f "${SCHEME_COLLECTS}collects/scheme/base.rkt" ; then + MZSCHEME_EXTRA="mzscheme_base.c" ++ MZSCHEME_MZC="${vi_cv_path_mzscheme_pfx}/bin/mzc" ++ MZSCHEME_MOD="++lib scheme/base" ++ else ++ if test -f "${SCHEME_COLLECTS}collects/racket/base.rkt" ; then ++ MZSCHEME_EXTRA="mzscheme_base.c" ++ MZSCHEME_MZC="${vi_cv_path_mzscheme_pfx}/bin/raco ctool" ++ MZSCHEME_MOD="" ++ fi + fi + fi + if test "X$MZSCHEME_EXTRA" != "X" ; then +*************** +*** 12323,12328 **** +--- 12333,12347 ---- + + + ++ cat >>confdefs.h <<_ACEOF ++ #define VIM_SIZEOF_INT $ac_cv_sizeof_int ++ _ACEOF ++ ++ cat >>confdefs.h <<_ACEOF ++ #define VIM_SIZEOF_LONG $ac_cv_sizeof_long ++ _ACEOF ++ ++ + { $as_echo "$as_me:${as_lineno-$LINENO}: checking uint32_t is 32 bits" >&5 + $as_echo_n "checking uint32_t is 32 bits... " >&6; } + if test "$cross_compiling" = yes; then : +*** ../vim-7.4.187/src/config.h.in 2013-11-02 21:04:32.000000000 +0100 +--- src/config.h.in 2014-02-23 21:45:36.784771111 +0100 +*************** +*** 37,46 **** + #undef UNIX + + /* Defined to the size of an int */ +! #undef SIZEOF_INT + + /* Defined to the size of a long */ +! #undef SIZEOF_LONG + + /* Defined to the size of off_t */ + #undef SIZEOF_OFF_T +--- 37,46 ---- + #undef UNIX + + /* Defined to the size of an int */ +! #undef VIM_SIZEOF_INT + + /* Defined to the size of a long */ +! #undef VIM_SIZEOF_LONG + + /* Defined to the size of off_t */ + #undef SIZEOF_OFF_T +*** ../vim-7.4.187/src/fileio.c 2014-02-11 15:23:27.938123631 +0100 +--- src/fileio.c 2014-02-23 22:31:00.824766773 +0100 +*************** +*** 1185,1191 **** + * The amount is limited by the fact that read() only can read + * upto max_unsigned characters (and other things). + */ +! #if SIZEOF_INT <= 2 + if (linerest >= 0x7ff0) + { + ++split; +--- 1185,1191 ---- + * The amount is limited by the fact that read() only can read + * upto max_unsigned characters (and other things). + */ +! #if VIM_SIZEOF_INT <= 2 + if (linerest >= 0x7ff0) + { + ++split; +*************** +*** 1197,1203 **** + { + if (!skip_read) + { +! #if SIZEOF_INT > 2 + # if defined(SSIZE_MAX) && (SSIZE_MAX < 0x10000L) + size = SSIZE_MAX; /* use max I/O size, 52K */ + # else +--- 1197,1203 ---- + { + if (!skip_read) + { +! #if VIM_SIZEOF_INT > 2 + # if defined(SSIZE_MAX) && (SSIZE_MAX < 0x10000L) + size = SSIZE_MAX; /* use max I/O size, 52K */ + # else +*** ../vim-7.4.187/src/if_python.c 2014-01-14 19:35:49.000000000 +0100 +--- src/if_python.c 2014-02-23 21:54:39.212770247 +0100 +*************** +*** 613,619 **** + # endif + # endif + # if defined(PY_VERSION_HEX) && PY_VERSION_HEX >= 0x02050000 \ +! && SIZEOF_SIZE_T != SIZEOF_INT + # ifdef Py_DEBUG + {"Py_InitModule4TraceRefs_64", (PYTHON_PROC*)&dll_Py_InitModule4}, + # else +--- 613,619 ---- + # endif + # endif + # if defined(PY_VERSION_HEX) && PY_VERSION_HEX >= 0x02050000 \ +! && SIZEOF_SIZE_T != VIM_SIZEOF_INT + # ifdef Py_DEBUG + {"Py_InitModule4TraceRefs_64", (PYTHON_PROC*)&dll_Py_InitModule4}, + # else +*** ../vim-7.4.187/src/message.c 2013-11-04 02:00:55.000000000 +0100 +--- src/message.c 2014-02-23 21:55:16.984770187 +0100 +*************** +*** 4376,4382 **** + { + /* Don't put the #if inside memchr(), it can be a + * macro. */ +! #if SIZEOF_INT <= 2 + char *q = memchr(str_arg, '\0', precision); + #else + /* memchr on HP does not like n > 2^31 !!! */ +--- 4376,4382 ---- + { + /* Don't put the #if inside memchr(), it can be a + * macro. */ +! #if VIM_SIZEOF_INT <= 2 + char *q = memchr(str_arg, '\0', precision); + #else + /* memchr on HP does not like n > 2^31 !!! */ +*** ../vim-7.4.187/src/spell.c 2013-11-28 17:41:41.000000000 +0100 +--- src/spell.c 2014-02-23 21:55:24.600770175 +0100 +*************** +*** 317,323 **** + + /* Type used for indexes in the word tree need to be at least 4 bytes. If int + * is 8 bytes we could use something smaller, but what? */ +! #if SIZEOF_INT > 3 + typedef int idx_T; + #else + typedef long idx_T; +--- 317,323 ---- + + /* Type used for indexes in the word tree need to be at least 4 bytes. If int + * is 8 bytes we could use something smaller, but what? */ +! #if VIM_SIZEOF_INT > 3 + typedef int idx_T; + #else + typedef long idx_T; +*** ../vim-7.4.187/src/feature.h 2013-05-18 20:18:20.000000000 +0200 +--- src/feature.h 2014-02-23 21:55:54.868770127 +0100 +*************** +*** 328,334 **** + * + * Disabled for EBCDIC as it requires multibyte. + */ +! #if defined(FEAT_BIG) && !defined(WIN16) && SIZEOF_INT >= 4 && !defined(EBCDIC) + # define FEAT_ARABIC + #endif + #ifdef FEAT_ARABIC +--- 328,334 ---- + * + * Disabled for EBCDIC as it requires multibyte. + */ +! #if defined(FEAT_BIG) && !defined(WIN16) && VIM_SIZEOF_INT >= 4 && !defined(EBCDIC) + # define FEAT_ARABIC + #endif + #ifdef FEAT_ARABIC +*************** +*** 640,646 **** + */ + #if (defined(FEAT_NORMAL) || defined(FEAT_GUI_GTK) || defined(FEAT_ARABIC)) \ + && !defined(FEAT_MBYTE) && !defined(WIN16) \ +! && SIZEOF_INT >= 4 && !defined(EBCDIC) + # define FEAT_MBYTE + #endif + +--- 640,646 ---- + */ + #if (defined(FEAT_NORMAL) || defined(FEAT_GUI_GTK) || defined(FEAT_ARABIC)) \ + && !defined(FEAT_MBYTE) && !defined(WIN16) \ +! && VIM_SIZEOF_INT >= 4 && !defined(EBCDIC) + # define FEAT_MBYTE + #endif + +*************** +*** 661,667 **** + # define FEAT_MBYTE + #endif + +! #if defined(FEAT_MBYTE) && SIZEOF_INT < 4 && !defined(PROTO) + Error: Can only handle multi-byte feature with 32 bit int or larger + #endif + +--- 661,667 ---- + # define FEAT_MBYTE + #endif + +! #if defined(FEAT_MBYTE) && VIM_SIZEOF_INT < 4 && !defined(PROTO) + Error: Can only handle multi-byte feature with 32 bit int or larger + #endif + +*** ../vim-7.4.187/src/os_os2_cfg.h 2010-05-15 13:04:11.000000000 +0200 +--- src/os_os2_cfg.h 2014-02-23 21:56:03.540770113 +0100 +*************** +*** 47,53 **** + #undef UNIX /* define always by current configure script */ + + /* Defined to the size of an int */ +! #define SIZEOF_INT 4 + + /* + * If we cannot trust one of the following from the libraries, we use our +--- 47,53 ---- + #undef UNIX /* define always by current configure script */ + + /* Defined to the size of an int */ +! #define VIM_SIZEOF_INT 4 + + /* + * If we cannot trust one of the following from the libraries, we use our +*** ../vim-7.4.187/src/os_vms_conf.h 2010-07-28 19:07:48.000000000 +0200 +--- src/os_vms_conf.h 2014-02-23 21:56:20.700770086 +0100 +*************** +*** 23,29 **** + #define HAVE_DATE_TIME + + /* Defined to the size of an int */ +! #define SIZEOF_INT 4 + + /* #undef USEBCOPY */ + #define USEMEMMOVE +--- 23,29 ---- + #define HAVE_DATE_TIME + + /* Defined to the size of an int */ +! #define VIM_SIZEOF_INT 4 + + /* #undef USEBCOPY */ + #define USEMEMMOVE +*** ../vim-7.4.187/src/os_win16.h 2013-05-06 04:06:04.000000000 +0200 +--- src/os_win16.h 2014-02-23 21:56:39.292770056 +0100 +*************** +*** 55,62 **** + + #define FNAME_ILLEGAL "\"*?><|" /* illegal characters in a file name */ + +! #ifndef SIZEOF_INT +! # define SIZEOF_INT 2 + #endif + + typedef long off_t; +--- 55,62 ---- + + #define FNAME_ILLEGAL "\"*?><|" /* illegal characters in a file name */ + +! #ifndef VIM_SIZEOF_INT +! # define VIM_SIZEOF_INT 2 + #endif + + typedef long off_t; +*** ../vim-7.4.187/src/structs.h 2014-02-22 23:03:48.716901208 +0100 +--- src/structs.h 2014-02-23 21:57:17.680769995 +0100 +*************** +*** 364,370 **** + /* + * structures used in undo.c + */ +! #if SIZEOF_INT > 2 + # define ALIGN_LONG /* longword alignment and use filler byte */ + # define ALIGN_SIZE (sizeof(long)) + #else +--- 364,370 ---- + /* + * structures used in undo.c + */ +! #if VIM_SIZEOF_INT > 2 + # define ALIGN_LONG /* longword alignment and use filler byte */ + # define ALIGN_SIZE (sizeof(long)) + #else +*************** +*** 1094,1100 **** + typedef long_u hash_T; /* Type for hi_hash */ + + +! #if SIZEOF_INT <= 3 /* use long if int is smaller than 32 bits */ + typedef long varnumber_T; + #else + typedef int varnumber_T; +--- 1094,1100 ---- + typedef long_u hash_T; /* Type for hi_hash */ + + +! #if VIM_SIZEOF_INT <= 3 /* use long if int is smaller than 32 bits */ + typedef long varnumber_T; + #else + typedef int varnumber_T; +*** ../vim-7.4.187/src/version.c 2014-02-22 23:49:30.268896843 +0100 +--- src/version.c 2014-02-23 22:40:55.708765826 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 188, + /**/ + +-- +I'm sure that I asked CBuilder to do a "full" install. Looks like I got +a "fool" install, instead. Charles E Campbell, Jr, PhD + + + /// 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/patches/source/vim/patches/7.4.189 b/patches/source/vim/patches/7.4.189 new file mode 100644 index 000000000..cf6a2b702 --- /dev/null +++ b/patches/source/vim/patches/7.4.189 @@ -0,0 +1,52 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.189 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.189 +Problem: Compiler warning for unused argument. +Solution: Add UNUSED. +Files: src/eval.c + + +*** ../vim-7.4.188/src/eval.c 2014-02-22 22:18:39.532905522 +0100 +--- src/eval.c 2014-02-23 22:29:14.976766942 +0100 +*************** +*** 9203,9209 **** + byteidx(argvars, rettv, comp) + typval_T *argvars; + typval_T *rettv; +! int comp; + { + #ifdef FEAT_MBYTE + char_u *t; +--- 9203,9209 ---- + byteidx(argvars, rettv, comp) + typval_T *argvars; + typval_T *rettv; +! int comp UNUSED; + { + #ifdef FEAT_MBYTE + char_u *t; +*** ../vim-7.4.188/src/version.c 2014-02-23 22:52:33.372764715 +0100 +--- src/version.c 2014-02-23 22:54:17.836764549 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 189, + /**/ + +-- +Q: How does a UNIX Guru pick up a girl? +A: look; grep; which; eval; nice; uname; talk; date; + + /// 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/patches/source/vim/patches/7.4.190 b/patches/source/vim/patches/7.4.190 new file mode 100644 index 000000000..6cafb4b26 --- /dev/null +++ b/patches/source/vim/patches/7.4.190 @@ -0,0 +1,70 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.190 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.190 +Problem: Compiler warning for using %lld for off_t. +Solution: Add type cast. +Files: src/fileio.c + + +*** ../vim-7.4.189/src/fileio.c 2014-02-23 22:52:33.368764715 +0100 +--- src/fileio.c 2014-02-23 22:31:00.824766773 +0100 +*************** +*** 5294,5300 **** + if (shortmess(SHM_LINES)) + sprintf((char *)p, + #ifdef LONG_LONG_OFF_T +! "%ldL, %lldC", lnum, nchars + #else + /* Explicit typecast avoids warning on Mac OS X 10.6 */ + "%ldL, %ldC", lnum, (long)nchars +--- 5294,5300 ---- + if (shortmess(SHM_LINES)) + sprintf((char *)p, + #ifdef LONG_LONG_OFF_T +! "%ldL, %lldC", lnum, (long long)nchars + #else + /* Explicit typecast avoids warning on Mac OS X 10.6 */ + "%ldL, %ldC", lnum, (long)nchars +*************** +*** 5312,5318 **** + else + sprintf((char *)p, + #ifdef LONG_LONG_OFF_T +! _("%lld characters"), nchars + #else + /* Explicit typecast avoids warning on Mac OS X 10.6 */ + _("%ld characters"), (long)nchars +--- 5312,5318 ---- + else + sprintf((char *)p, + #ifdef LONG_LONG_OFF_T +! _("%lld characters"), (long long)nchars + #else + /* Explicit typecast avoids warning on Mac OS X 10.6 */ + _("%ld characters"), (long)nchars +*** ../vim-7.4.189/src/version.c 2014-02-23 22:54:54.728764490 +0100 +--- src/version.c 2014-02-23 22:57:43.648764221 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 190, + /**/ + +-- +Courtroom Quote #19: +Q: Doctor, how many autopsies have you performed on dead people? +A: All my autopsies have been performed on dead 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/patches/source/vim/patches/7.4.191 b/patches/source/vim/patches/7.4.191 new file mode 100644 index 000000000..f0bb71bfc --- /dev/null +++ b/patches/source/vim/patches/7.4.191 @@ -0,0 +1,689 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.191 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.191 +Problem: Escaping a file name for shell commands can't be done without a + function. +Solution: Add the :S file name modifier. +Files: 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/testdir/test105.in, src/testdir/test105.ok, + runtime/doc/cmdline.txt, runtime/doc/eval.txt, + runtime/doc/map.txt, runtime/doc/options.txt, + runtime/doc/quickfix.txt, runtime/doc/usr_30.txt, + runtime/doc/usr_40.txt, runtime/doc/usr_42.txt, + runtime/doc/vi_diff.txt, src/eval.c, src/misc2.c, src/normal.c, + src/proto/misc2.pro + + +*** ../vim-7.4.190/src/testdir/Make_amiga.mak 2014-02-05 22:25:29.974568243 +0100 +--- src/testdir/Make_amiga.mak 2014-02-23 23:16:51.056762395 +0100 +*************** +*** 35,41 **** + 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 \ +! test104.out + + .SUFFIXES: .in .out + +--- 35,41 ---- + 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 \ +! test104.out test105.out + + .SUFFIXES: .in .out + +*************** +*** 156,158 **** +--- 156,159 ---- + test102.out: test102.in + test103.out: test103.in + test104.out: test104.in ++ test105.out: test105.in +*** ../vim-7.4.190/src/testdir/Make_dos.mak 2014-02-05 22:25:29.978568243 +0100 +--- src/testdir/Make_dos.mak 2014-02-23 23:17:41.840762314 +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 test103.out test104.out + + SCRIPTS32 = test50.out test70.out + +--- 33,40 ---- + 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 test104.out \ +! test105.out + + SCRIPTS32 = test50.out test70.out + +*** ../vim-7.4.190/src/testdir/Make_ming.mak 2014-02-05 22:25:29.978568243 +0100 +--- src/testdir/Make_ming.mak 2014-02-23 23:17:29.400762333 +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 \ +! test100.out test101.out test102.out test103.out test104.out + + SCRIPTS32 = test50.out test70.out + +--- 53,60 ---- + 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 test104.out \ +! test105.out + + SCRIPTS32 = test50.out test70.out + +*** ../vim-7.4.190/src/testdir/Make_os2.mak 2014-02-05 22:25:29.978568243 +0100 +--- src/testdir/Make_os2.mak 2014-02-23 23:17:49.476762302 +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 test103.out test104.out + + .SUFFIXES: .in .out + +--- 35,42 ---- + 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 test104.out \ +! test105.out + + .SUFFIXES: .in .out + +*** ../vim-7.4.190/src/testdir/Make_vms.mms 2014-02-05 22:25:29.978568243 +0100 +--- src/testdir/Make_vms.mms 2014-02-23 23:17:56.596762290 +0100 +*************** +*** 4,10 **** + # Authors: Zoltan Arpadffy, <arpadffy@polarhome.com> + # Sandor Kopanyi, <sandor.kopanyi@mailbox.hu> + # +! # 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. +--- 4,10 ---- + # Authors: Zoltan Arpadffy, <arpadffy@polarhome.com> + # Sandor Kopanyi, <sandor.kopanyi@mailbox.hu> + # +! # Last change: 2014 Feb 23 + # + # 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 test103.out test104.out + + # Known problems: + # Test 30: a problem around mac format - unknown reason +--- 79,86 ---- + 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 test104.out \ +! test105.out + + # Known problems: + # Test 30: a problem around mac format - unknown reason +*** ../vim-7.4.190/src/testdir/Makefile 2014-02-05 22:25:29.982568243 +0100 +--- src/testdir/Makefile 2014-02-23 23:18:14.040762262 +0100 +*************** +*** 31,37 **** + 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 \ +! test104.out + + SCRIPTS_GUI = test16.out + +--- 31,37 ---- + 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 \ +! test104.out test105.out + + SCRIPTS_GUI = test16.out + +*** ../vim-7.4.190/src/testdir/test105.in 2014-02-23 23:35:40.680760596 +0100 +--- src/testdir/test105.in 2014-02-23 23:30:24.748761099 +0100 +*************** +*** 0 **** +--- 1,45 ---- ++ Test filename modifiers vim: set ft=vim : ++ ++ STARTTEST ++ :source small.vim ++ :%delete _ ++ :set shell=sh ++ :set shellslash ++ :let tab="\t" ++ :command -nargs=1 Put :let expr=<q-args> | $put =expr.tab.strtrans(string(eval(expr))) ++ :let $HOME=fnamemodify('.', ':p:h:h:h') ++ :Put fnamemodify('.', ':p' )[-1:] ++ :Put fnamemodify('.', ':p:h' )[-1:] ++ :Put fnamemodify('test.out', ':p' )[-1:] ++ :Put fnamemodify('test.out', ':.' ) ++ :Put fnamemodify('../testdir/a', ':.' ) ++ :Put fnamemodify('test.out', ':~' ) ++ :Put fnamemodify('../testdir/a', ':~' ) ++ :Put fnamemodify('../testdir/a', ':t' ) ++ :Put fnamemodify('.', ':p:t' ) ++ :Put fnamemodify('test.out', ':p:t' ) ++ :Put fnamemodify('test.out', ':p:e' ) ++ :Put fnamemodify('test.out', ':p:t:e' ) ++ :Put fnamemodify('abc.fb2.tar.gz', ':r' ) ++ :Put fnamemodify('abc.fb2.tar.gz', ':r:r' ) ++ :Put fnamemodify('abc.fb2.tar.gz', ':r:r:r' ) ++ :Put substitute(fnamemodify('abc.fb2.tar.gz', ':p:r:r'), '.*\(src/testdir/.*\)', '\1', '') ++ :Put fnamemodify('abc.fb2.tar.gz', ':e' ) ++ :Put fnamemodify('abc.fb2.tar.gz', ':e:e' ) ++ :Put fnamemodify('abc.fb2.tar.gz', ':e:e:e' ) ++ :Put fnamemodify('abc.fb2.tar.gz', ':e:e:e:e') ++ :Put fnamemodify('abc.fb2.tar.gz', ':e:e:r' ) ++ :Put fnamemodify('abc def', ':S' ) ++ :Put fnamemodify('abc" "def', ':S' ) ++ :Put fnamemodify('abc"%"def', ':S' ) ++ :Put fnamemodify('abc'' ''def', ':S' ) ++ :Put fnamemodify('abc''%''def', ':S' ) ++ :Put fnamemodify("abc\ndef", ':S' ) ++ :set shell=tcsh ++ :Put fnamemodify("abc\ndef", ':S' ) ++ :$put ='vim: ts=8' ++ :1 delete _ ++ :w! test.out ++ :qa! ++ ENDTEST ++ +*** ../vim-7.4.190/src/testdir/test105.ok 2014-02-23 23:35:40.688760596 +0100 +--- src/testdir/test105.ok 2014-02-23 23:32:11.204760929 +0100 +*************** +*** 0 **** +--- 1,29 ---- ++ fnamemodify('.', ':p' )[-1:] '/' ++ fnamemodify('.', ':p:h' )[-1:] 'r' ++ fnamemodify('test.out', ':p' )[-1:] 't' ++ fnamemodify('test.out', ':.' ) 'test.out' ++ fnamemodify('../testdir/a', ':.' ) 'a' ++ fnamemodify('test.out', ':~' ) '~/src/testdir/test.out' ++ fnamemodify('../testdir/a', ':~' ) '~/src/testdir/a' ++ fnamemodify('../testdir/a', ':t' ) 'a' ++ fnamemodify('.', ':p:t' ) '' ++ fnamemodify('test.out', ':p:t' ) 'test.out' ++ fnamemodify('test.out', ':p:e' ) 'out' ++ fnamemodify('test.out', ':p:t:e' ) 'out' ++ fnamemodify('abc.fb2.tar.gz', ':r' ) 'abc.fb2.tar' ++ fnamemodify('abc.fb2.tar.gz', ':r:r' ) 'abc.fb2' ++ fnamemodify('abc.fb2.tar.gz', ':r:r:r' ) 'abc' ++ substitute(fnamemodify('abc.fb2.tar.gz', ':p:r:r'), '.*\(src/testdir/.*\)', '\1', '') 'src/testdir/abc.fb2' ++ fnamemodify('abc.fb2.tar.gz', ':e' ) 'gz' ++ fnamemodify('abc.fb2.tar.gz', ':e:e' ) 'tar.gz' ++ fnamemodify('abc.fb2.tar.gz', ':e:e:e' ) 'fb2.tar.gz' ++ fnamemodify('abc.fb2.tar.gz', ':e:e:e:e') 'fb2.tar.gz' ++ fnamemodify('abc.fb2.tar.gz', ':e:e:r' ) 'tar' ++ fnamemodify('abc def', ':S' ) '''abc def''' ++ fnamemodify('abc" "def', ':S' ) '''abc" "def''' ++ fnamemodify('abc"%"def', ':S' ) '''abc"%"def''' ++ fnamemodify('abc'' ''def', ':S' ) '''abc''\'''' ''\''''def''' ++ fnamemodify('abc''%''def', ':S' ) '''abc''\''''%''\''''def''' ++ fnamemodify("abc\ndef", ':S' ) '''abc^@def''' ++ fnamemodify("abc\ndef", ':S' ) '''abc\^@def''' ++ vim: ts=8 +*** ../vim-7.4.190/runtime/doc/cmdline.txt 2013-11-09 05:30:18.000000000 +0100 +--- runtime/doc/cmdline.txt 2014-02-23 23:20:57.020762003 +0100 +*************** +*** 758,763 **** +--- 758,764 ---- + function expand() |expand()|. + % Is replaced with the current file name. *:_%* *c_%* + # Is replaced with the alternate file name. *:_#* *c_#* ++ This is remembered for every window. + #n (where n is a number) is replaced with *:_#0* *:_#n* + the file name of buffer n. "#0" is the same as "#". *c_#n* + ## Is replaced with all names in the argument list *:_##* *c_##* +*************** +*** 823,830 **** + the start of the function. + + *filename-modifiers* +! *:_%:* *::8* *::p* *::.* *::~* *::h* *::t* *::r* *::e* *::s* *::gs* +! *%:8* *%:p* *%:.* *%:~* *%:h* *%:t* *%:r* *%:e* *%:s* *%:gs* + The file name modifiers can be used after "%", "#", "#n", "<cfile>", "<sfile>", + "<afile>" or "<abuf>". They are also used with the |fnamemodify()| function. + These are not available when Vim has been compiled without the |+modify_fname| +--- 824,831 ---- + the start of the function. + + *filename-modifiers* +! *:_%:* *::8* *::p* *::.* *::~* *::h* *::t* *::r* *::e* *::s* *::gs* *::S* +! *%:8* *%:p* *%:.* *%:~* *%:h* *%:t* *%:r* *%:e* *%:s* *%:gs* *%:S* + The file name modifiers can be used after "%", "#", "#n", "<cfile>", "<sfile>", + "<afile>" or "<abuf>". They are also used with the |fnamemodify()| function. + These are not available when Vim has been compiled without the |+modify_fname| +*************** +*** 879,884 **** +--- 880,889 ---- + :gs?pat?sub? + Substitute all occurrences of "pat" with "sub". Otherwise + this works like ":s". ++ :S Escape special characters for use with a shell command (see ++ |shellescape()|). Must be the last one. Examples: > ++ :!dir <cfile>:S ++ :call system('chmod +w -- ' . expand('%:S')) + + Examples, when the file name is "src/version.c", current dir + "/home/mool/vim": > +*** ../vim-7.4.190/runtime/doc/eval.txt 2014-01-14 12:33:32.000000000 +0100 +--- runtime/doc/eval.txt 2014-02-23 23:19:32.420762138 +0100 +*************** +*** 5414,5419 **** +--- 5428,5434 ---- + < This results in a directory listing for the file under the + cursor. Example of use with |system()|: > + :call system("chmod +w -- " . shellescape(expand("%"))) ++ < See also |::S|. + + + shiftwidth() *shiftwidth()* +*************** +*** 5896,5909 **** + passed as stdin to the command. The string is written as-is, + you need to take care of using the correct line separators + yourself. Pipes are not used. +! Note: Use |shellescape()| to escape special characters in a +! command argument. Newlines in {expr} may cause the command to +! fail. The characters in 'shellquote' and 'shellxquote' may +! also cause trouble. + This is not to be used for interactive commands. + + The result is a String. Example: > + :let files = system("ls " . shellescape(expand('%:h'))) + + < To make the result more system-independent, the shell output + is filtered to replace <CR> with <NL> for Macintosh, and +--- 5911,5926 ---- + passed as stdin to the command. The string is written as-is, + you need to take care of using the correct line separators + yourself. Pipes are not used. +! Note: Use |shellescape()| or |::S| with |expand()| or +! |fnamemodify()| to escape special characters in a command +! argument. Newlines in {expr} may cause the command to fail. +! The characters in 'shellquote' and 'shellxquote' may also +! cause trouble. + This is not to be used for interactive commands. + + The result is a String. Example: > + :let files = system("ls " . shellescape(expand('%:h'))) ++ :let files = system('ls ' . expand('%:h:S')) + + < To make the result more system-independent, the shell output + is filtered to replace <CR> with <NL> for Macintosh, and +*** ../vim-7.4.190/runtime/doc/map.txt 2013-08-10 13:24:56.000000000 +0200 +--- runtime/doc/map.txt 2014-02-23 23:19:32.424762138 +0100 +*************** +*** 380,386 **** + The simplest way to load a set of related language mappings is by using the + 'keymap' option. See |45.5|. + In Insert mode and in Command-line mode the mappings can be disabled with +! the CTRL-^ command |i_CTRL-^| |c_CTRL-^| These commands change the value of + the 'iminsert' option. When starting to enter a normal command line (not a + search pattern) the mappings are disabled until a CTRL-^ is typed. The state + last used is remembered for Insert mode and Search patterns separately. The +--- 380,386 ---- + The simplest way to load a set of related language mappings is by using the + 'keymap' option. See |45.5|. + In Insert mode and in Command-line mode the mappings can be disabled with +! the CTRL-^ command |i_CTRL-^| |c_CTRL-^|. These commands change the value of + the 'iminsert' option. When starting to enter a normal command line (not a + search pattern) the mappings are disabled until a CTRL-^ is typed. The state + last used is remembered for Insert mode and Search patterns separately. The +*************** +*** 593,599 **** + When you have a mapping that contains an Ex command, you need to put a line + terminator after it to have it executed. The use of <CR> is recommended for + this (see |<>|). Example: > +! :map _ls :!ls -l %<CR>:echo "the end"<CR> + + To avoid mapping of the characters you type in insert or Command-line mode, + type a CTRL-V first. The mapping in Insert mode is disabled if the 'paste' +--- 593,599 ---- + When you have a mapping that contains an Ex command, you need to put a line + terminator after it to have it executed. The use of <CR> is recommended for + this (see |<>|). Example: > +! :map _ls :!ls -l %:S<CR>:echo "the end"<CR> + + To avoid mapping of the characters you type in insert or Command-line mode, + type a CTRL-V first. The mapping in Insert mode is disabled if the 'paste' +*** ../vim-7.4.190/runtime/doc/options.txt 2013-11-12 04:43:57.000000000 +0100 +--- runtime/doc/options.txt 2014-02-23 23:19:32.428762138 +0100 +*************** +*** 4757,4764 **** + global or local to buffer |global-local| + {not in Vi} + Program to use for the ":make" command. See |:make_makeprg|. +! This option may contain '%' and '#' characters, which are expanded to +! the current and alternate file name. |:_%| |:_#| + Environment variables are expanded |:set_env|. See |option-backslash| + about including spaces and backslashes. + Note that a '|' must be escaped twice: once for ":set" and once for +--- 4757,4765 ---- + global or local to buffer |global-local| + {not in Vi} + Program to use for the ":make" command. See |:make_makeprg|. +! This option may contain '%' and '#' characters (see |:_%| and |:_#|), +! which are expanded to the current and alternate file name. Use |::S| +! to escape file names in case they contain special characters. + Environment variables are expanded |:set_env|. See |option-backslash| + about including spaces and backslashes. + Note that a '|' must be escaped twice: once for ":set" and once for +*** ../vim-7.4.190/runtime/doc/quickfix.txt 2013-08-10 13:25:00.000000000 +0200 +--- runtime/doc/quickfix.txt 2014-02-23 23:19:32.432762138 +0100 +*************** +*** 838,844 **** + The alltests.py script seems to be used quite often, that's all. + Useful values for the 'makeprg' options therefore are: + setlocal makeprg=./alltests.py " Run a testsuite +! setlocal makeprg=python % " Run a single testcase + + Also see http://vim.sourceforge.net/tip_view.php?tip_id=280. + +--- 838,844 ---- + The alltests.py script seems to be used quite often, that's all. + Useful values for the 'makeprg' options therefore are: + setlocal makeprg=./alltests.py " Run a testsuite +! setlocal makeprg=python\ %:S " Run a single testcase + + Also see http://vim.sourceforge.net/tip_view.php?tip_id=280. + +*************** +*** 1332,1338 **** + Here is an alternative from Michael F. Lamb for Unix that filters the errors + first: > + :setl errorformat=%Z%f:%l:\ %m,%A%p^,%-G%*[^sl]%.%# +! :setl makeprg=javac\ %\ 2>&1\ \\\|\ vim-javac-filter + + You need to put the following in "vim-javac-filter" somewhere in your path + (e.g., in ~/bin) and make it executable: > +--- 1332,1338 ---- + Here is an alternative from Michael F. Lamb for Unix that filters the errors + first: > + :setl errorformat=%Z%f:%l:\ %m,%A%p^,%-G%*[^sl]%.%# +! :setl makeprg=javac\ %:S\ 2>&1\ \\\|\ vim-javac-filter + + You need to put the following in "vim-javac-filter" somewhere in your path + (e.g., in ~/bin) and make it executable: > +*** ../vim-7.4.190/runtime/doc/usr_30.txt 2013-08-10 13:25:05.000000000 +0200 +--- runtime/doc/usr_30.txt 2014-02-23 23:19:32.432762138 +0100 +*************** +*** 128,134 **** + You can include special Vim keywords in the command specification. The % + character expands to the name of the current file. So if you execute the + command: > +! :set makeprg=make\ % + + When you are editing main.c, then ":make" executes the following command: > + +--- 128,134 ---- + You can include special Vim keywords in the command specification. The % + character expands to the name of the current file. So if you execute the + command: > +! :set makeprg=make\ %:S + + When you are editing main.c, then ":make" executes the following command: > + +*************** +*** 137,143 **** + This is not too useful, so you will refine the command a little and use the :r + (root) modifier: > + +! :set makeprg=make\ %:r.o + + Now the command executed is as follows: > + +--- 137,143 ---- + This is not too useful, so you will refine the command a little and use the :r + (root) modifier: > + +! :set makeprg=make\ %:r:S.o + + Now the command executed is as follows: > + +*** ../vim-7.4.190/runtime/doc/usr_40.txt 2013-08-10 13:25:05.000000000 +0200 +--- runtime/doc/usr_40.txt 2014-02-23 23:19:32.432762138 +0100 +*************** +*** 209,215 **** + separates the two commands. This also means that a | character can't be used + inside a map command. To include one, use <Bar> (five characters). Example: + > +! :map <F8> :write <Bar> !checkin %<CR> + + The same problem applies to the ":unmap" command, with the addition that you + have to watch out for trailing white space. These two commands are different: +--- 209,215 ---- + separates the two commands. This also means that a | character can't be used + inside a map command. To include one, use <Bar> (five characters). Example: + > +! :map <F8> :write <Bar> !checkin %:S<CR> + + The same problem applies to the ":unmap" command, with the addition that you + have to watch out for trailing white space. These two commands are different: +*** ../vim-7.4.190/runtime/doc/usr_42.txt 2013-08-10 13:25:05.000000000 +0200 +--- runtime/doc/usr_42.txt 2014-02-23 23:19:32.432762138 +0100 +*************** +*** 311,317 **** + item with a bitmap. For example, define a new toolbar item with: > + + :tmenu ToolBar.Compile Compile the current file +! :amenu ToolBar.Compile :!cc % -o %:r<CR> + + Now you need to create the icon. For MS-Windows it must be in bitmap format, + with the name "Compile.bmp". For Unix XPM format is used, the file name is +--- 311,317 ---- + item with a bitmap. For example, define a new toolbar item with: > + + :tmenu ToolBar.Compile Compile the current file +! :amenu ToolBar.Compile :!cc %:S -o %:r:S<CR> + + Now you need to create the icon. For MS-Windows it must be in bitmap format, + with the name "Compile.bmp". For Unix XPM format is used, the file name is +*** ../vim-7.4.190/runtime/doc/vi_diff.txt 2013-08-10 13:25:07.000000000 +0200 +--- runtime/doc/vi_diff.txt 2014-02-23 23:19:32.432762138 +0100 +*************** +*** 540,546 **** + Added :wnext command. Same as ":write" followed by ":next". + + The ":w!" command always writes, also when the file is write protected. In Vi +! you would have to do ":!chmod +w %" and ":set noro". + + When 'tildeop' has been set, "~" is an operator (must be followed by a + movement command). +--- 540,546 ---- + Added :wnext command. Same as ":write" followed by ":next". + + The ":w!" command always writes, also when the file is write protected. In Vi +! you would have to do ":!chmod +w %:S" and ":set noro". + + When 'tildeop' has been set, "~" is an operator (must be followed by a + movement command). +*** ../vim-7.4.190/src/eval.c 2014-02-23 22:54:54.724764490 +0100 +--- src/eval.c 2014-02-23 23:19:32.432762138 +0100 +*************** +*** 16950,16956 **** + typval_T *rettv; + { + rettv->vval.v_string = vim_strsave_shellescape( +! get_tv_string(&argvars[0]), non_zero_arg(&argvars[1])); + rettv->v_type = VAR_STRING; + } + +--- 16950,16956 ---- + typval_T *rettv; + { + rettv->vval.v_string = vim_strsave_shellescape( +! get_tv_string(&argvars[0]), non_zero_arg(&argvars[1]), TRUE); + rettv->v_type = VAR_STRING; + } + +*************** +*** 24355,24360 **** +--- 24355,24371 ---- + } + } + ++ if (src[*usedlen] == ':' && src[*usedlen + 1] == 'S') ++ { ++ p = vim_strsave_shellescape(*fnamep, FALSE, FALSE); ++ if (p == NULL) ++ return -1; ++ vim_free(*bufp); ++ *bufp = *fnamep = p; ++ *fnamelen = (int)STRLEN(p); ++ *usedlen += 2; ++ } ++ + return valid; + } + +*** ../vim-7.4.190/src/misc2.c 2014-01-06 06:18:44.000000000 +0100 +--- src/misc2.c 2014-02-23 23:25:44.168761546 +0100 +*************** +*** 1369,1380 **** + * Escape a newline, depending on the 'shell' option. + * When "do_special" is TRUE also replace "!", "%", "#" and things starting + * with "<" like "<cfile>". + * Returns the result in allocated memory, NULL if we have run out. + */ + char_u * +! vim_strsave_shellescape(string, do_special) + char_u *string; + int do_special; + { + unsigned length; + char_u *p; +--- 1369,1382 ---- + * Escape a newline, depending on the 'shell' option. + * When "do_special" is TRUE also replace "!", "%", "#" and things starting + * with "<" like "<cfile>". ++ * When "do_newline" is FALSE do not escape newline unless it is csh shell. + * Returns the result in allocated memory, NULL if we have run out. + */ + char_u * +! vim_strsave_shellescape(string, do_special, do_newline) + char_u *string; + int do_special; ++ int do_newline; + { + unsigned length; + char_u *p; +*************** +*** 1403,1409 **** + # endif + if (*p == '\'') + length += 3; /* ' => '\'' */ +! if (*p == '\n' || (*p == '!' && (csh_like || do_special))) + { + ++length; /* insert backslash */ + if (csh_like && do_special) +--- 1405,1412 ---- + # endif + if (*p == '\'') + length += 3; /* ' => '\'' */ +! if ((*p == '\n' && (csh_like || do_newline)) +! || (*p == '!' && (csh_like || do_special))) + { + ++length; /* insert backslash */ + if (csh_like && do_special) +*************** +*** 1454,1460 **** + ++p; + continue; + } +! if (*p == '\n' || (*p == '!' && (csh_like || do_special))) + { + *d++ = '\\'; + if (csh_like && do_special) +--- 1457,1464 ---- + ++p; + continue; + } +! if ((*p == '\n' && (csh_like || do_newline)) +! || (*p == '!' && (csh_like || do_special))) + { + *d++ = '\\'; + if (csh_like && do_special) +*** ../vim-7.4.190/src/normal.c 2014-02-22 23:49:30.268896843 +0100 +--- src/normal.c 2014-02-23 23:19:32.436762138 +0100 +*************** +*** 5790,5796 **** + { + /* Escape the argument properly for a shell command */ + ptr = vim_strnsave(ptr, n); +! p = vim_strsave_shellescape(ptr, TRUE); + vim_free(ptr); + if (p == NULL) + { +--- 5790,5796 ---- + { + /* Escape the argument properly for a shell command */ + ptr = vim_strnsave(ptr, n); +! p = vim_strsave_shellescape(ptr, TRUE, TRUE); + vim_free(ptr); + if (p == NULL) + { +*** ../vim-7.4.190/src/proto/misc2.pro 2013-08-10 13:37:20.000000000 +0200 +--- src/proto/misc2.pro 2014-02-23 23:19:32.436762138 +0100 +*************** +*** 32,38 **** + char_u *vim_strsave_escaped __ARGS((char_u *string, char_u *esc_chars)); + char_u *vim_strsave_escaped_ext __ARGS((char_u *string, char_u *esc_chars, int cc, int bsl)); + int csh_like_shell __ARGS((void)); +! char_u *vim_strsave_shellescape __ARGS((char_u *string, int do_special)); + char_u *vim_strsave_up __ARGS((char_u *string)); + char_u *vim_strnsave_up __ARGS((char_u *string, int len)); + void vim_strup __ARGS((char_u *p)); +--- 32,38 ---- + char_u *vim_strsave_escaped __ARGS((char_u *string, char_u *esc_chars)); + char_u *vim_strsave_escaped_ext __ARGS((char_u *string, char_u *esc_chars, int cc, int bsl)); + int csh_like_shell __ARGS((void)); +! char_u *vim_strsave_shellescape __ARGS((char_u *string, int do_special, int do_newline)); + char_u *vim_strsave_up __ARGS((char_u *string)); + char_u *vim_strnsave_up __ARGS((char_u *string, int len)); + void vim_strup __ARGS((char_u *p)); +*** ../vim-7.4.190/src/version.c 2014-02-23 22:58:12.072764176 +0100 +--- src/version.c 2014-02-23 23:35:51.044760579 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 191, + /**/ + +-- +Windows +M!uqoms + + /// 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/patches/source/vim/patches/7.4.192 b/patches/source/vim/patches/7.4.192 new file mode 100644 index 000000000..256d0fafb --- /dev/null +++ b/patches/source/vim/patches/7.4.192 @@ -0,0 +1,44 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.192 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.192 +Problem: Memory leak when giving E853. +Solution: Free the argument. (Dominique Pelle) +Files: src/eval.c + + +*** ../vim-7.4.191/src/eval.c 2014-02-23 23:38:58.824760280 +0100 +--- src/eval.c 2014-02-24 03:27:39.244738435 +0100 +*************** +*** 21457,21462 **** +--- 21457,21463 ---- + if (STRCMP(((char_u **)(newargs.ga_data))[i], arg) == 0) + { + EMSG2(_("E853: Duplicate argument name: %s"), arg); ++ vim_free(arg); + goto erret; + } + +*** ../vim-7.4.191/src/version.c 2014-02-23 23:38:58.828760280 +0100 +--- src/version.c 2014-02-24 03:28:23.068738365 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 192, + /**/ + +-- +Seen on the back of a biker's vest: If you can read this, my wife fell 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/patches/source/vim/patches/7.4.193 b/patches/source/vim/patches/7.4.193 new file mode 100644 index 000000000..f84a9d1c7 --- /dev/null +++ b/patches/source/vim/patches/7.4.193 @@ -0,0 +1,106 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.193 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.193 +Problem: Typos in messages. +Solution: "then" -> "than". (Dominique Pelle) +Files: src/if_py_both.h, src/spell.c + + +*** ../vim-7.4.192/src/if_py_both.h 2014-02-15 15:58:55.081904773 +0100 +--- src/if_py_both.h 2014-03-08 16:10:46.015459417 +0100 +*************** +*** 236,242 **** + if (*result <= 0) + { + PyErr_SET_STRING(PyExc_ValueError, +! N_("number must be greater then zero")); + return -1; + } + } +--- 236,242 ---- + if (*result <= 0) + { + PyErr_SET_STRING(PyExc_ValueError, +! N_("number must be greater than zero")); + return -1; + } + } +*************** +*** 2405,2411 **** + 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; +--- 2405,2411 ---- + if ((item = PyIter_Next(iterator))) + { + PyErr_FORMAT(PyExc_ValueError, +! N_("attempt to assign sequence of size greater than %d " + "to extended slice"), 0); + Py_DECREF(item); + ret = -1; +*************** +*** 2510,2516 **** + { + Py_DECREF(iterator); + PyErr_FORMAT(PyExc_ValueError, +! N_("attempt to assign sequence of size greater then %d " + "to extended slice"), (int) slicelen); + list_restore(numadded, numreplaced, slicelen, l, lis, lastaddedli); + PyMem_Free(lis); +--- 2510,2516 ---- + { + Py_DECREF(iterator); + PyErr_FORMAT(PyExc_ValueError, +! N_("attempt to assign sequence of size greater than %d " + "to extended slice"), (int) slicelen); + list_restore(numadded, numreplaced, slicelen, l, lis, lastaddedli); + PyMem_Free(lis); +*** ../vim-7.4.192/src/spell.c 2014-02-23 22:52:33.372764715 +0100 +--- src/spell.c 2014-03-08 16:10:46.019459417 +0100 +*************** +*** 12037,12043 **** + /* Normal byte, go one level deeper. If it's not equal to the + * byte in the bad word adjust the score. But don't even try + * when the byte was already changed. And don't try when we +! * just deleted this byte, accepting it is always cheaper then + * delete + substitute. */ + if (c == fword[sp->ts_fidx] + #ifdef FEAT_MBYTE +--- 12037,12043 ---- + /* Normal byte, go one level deeper. If it's not equal to the + * byte in the bad word adjust the score. But don't even try + * when the byte was already changed. And don't try when we +! * just deleted this byte, accepting it is always cheaper than + * delete + substitute. */ + if (c == fword[sp->ts_fidx] + #ifdef FEAT_MBYTE +*** ../vim-7.4.192/src/version.c 2014-02-24 03:31:55.816738026 +0100 +--- src/version.c 2014-03-08 16:11:51.591460422 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 193, + /**/ + +-- +BEDEVERE: How do you know so much about swallows? +ARTHUR: Well you have to know these things when you're a king, you know. + "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/patches/source/vim/patches/7.4.194 b/patches/source/vim/patches/7.4.194 new file mode 100644 index 000000000..e73bd1398 --- /dev/null +++ b/patches/source/vim/patches/7.4.194 @@ -0,0 +1,53 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.194 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.194 +Problem: Can't build for Android. +Solution: Add #if condition. (Fredrik Fornwall) +Files: src/mbyte.c + + +*** ../vim-7.4.193/src/mbyte.c 2014-01-14 13:26:17.000000000 +0100 +--- src/mbyte.c 2014-03-03 22:41:30.527101306 +0100 +*************** +*** 708,714 **** + * API */ + n = IsDBCSLeadByteEx(enc_dbcs, (WINBYTE)i) ? 2 : 1; + #else +! # if defined(MACOS) || defined(__amigaos4__) + /* + * if mblen() is not available, character which MSB is turned on + * are treated as leading byte character. (note : This assumption +--- 708,714 ---- + * API */ + n = IsDBCSLeadByteEx(enc_dbcs, (WINBYTE)i) ? 2 : 1; + #else +! # if defined(MACOS) || defined(__amigaos4__) || defined(__ANDROID__) + /* + * if mblen() is not available, character which MSB is turned on + * are treated as leading byte character. (note : This assumption +*** ../vim-7.4.193/src/version.c 2014-03-08 16:13:39.123462070 +0100 +--- src/version.c 2014-03-12 14:53:45.148684209 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 194, + /**/ + +-- +A programmer's wife asks him: "Please run to the store and pick up a loaf of +bread. If they have eggs, get a dozen". The programmer comes home with 12 +loafs of bread. + + /// 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/patches/source/vim/patches/7.4.195 b/patches/source/vim/patches/7.4.195 new file mode 100644 index 000000000..0cd888d46 --- /dev/null +++ b/patches/source/vim/patches/7.4.195 @@ -0,0 +1,164 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.195 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.195 (after 7.4.193) +Problem: Python tests fail. +Solution: Change "then" to "than" in more places. (Dominique Pelle, Taro + Muraoka) +Files: src/testdir/test86.in, src/testdir/test86.ok, + src/testdir/test87.in, src/testdir/test87.ok + + +*** ../vim-7.4.194/src/testdir/test86.in 2014-02-11 18:47:18.678311042 +0100 +--- src/testdir/test86.in 2014-03-12 15:20:41.512708977 +0100 +*************** +*** 675,681 **** + # Check GCing iterator that was not fully exhausted + i = iter(vim.buffers) + cb.append('i:' + str(next(i))) +! # and also check creating more then one iterator at a time + i2 = iter(vim.buffers) + cb.append('i2:' + str(next(i2))) + cb.append('i:' + str(next(i))) +--- 675,681 ---- + # Check GCing iterator that was not fully exhausted + i = iter(vim.buffers) + cb.append('i:' + str(next(i))) +! # and also check creating more than one iterator at a time + i2 = iter(vim.buffers) + cb.append('i2:' + str(next(i2))) + cb.append('i:' + str(next(i))) +*** ../vim-7.4.194/src/testdir/test86.ok 2014-01-14 16:54:53.000000000 +0100 +--- src/testdir/test86.ok 2014-03-12 15:19:28.080707851 +0100 +*************** +*** 882,892 **** + 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') +--- 882,892 ---- + l[:] = FailingIter():NotImplementedError:('iter',) + l[:] = FailingIterNext():NotImplementedError:('next',) + <<< Finished +! nel[1:10:2] = "abcK":ValueError:('attempt to assign sequence of size greater than 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 than 0 to extended slice',) + ('a', 'b', 'c', 'O') + nel[:] = FailingIterNextN(2):NotImplementedError:('next N',) + ('a', 'b', 'c', 'O') +*************** +*** 1233,1240 **** + >>> Testing NumberToLong using vim.buffers[%s] + vim.buffers[[]]:TypeError:('expected int(), long() or something supporting coercing to long(), but got list',) + vim.buffers[None]:TypeError:('expected int(), long() or something supporting coercing to long(), but got NoneType',) +! vim.buffers[-1]:ValueError:('number must be greater then zero',) +! vim.buffers[0]:ValueError:('number must be greater then zero',) + <<< Finished + > Current + >> CurrentGetattr +--- 1233,1240 ---- + >>> Testing NumberToLong using vim.buffers[%s] + vim.buffers[[]]:TypeError:('expected int(), long() or something supporting coercing to long(), but got list',) + vim.buffers[None]:TypeError:('expected int(), long() or something supporting coercing to long(), but got NoneType',) +! vim.buffers[-1]:ValueError:('number must be greater than zero',) +! vim.buffers[0]:ValueError:('number must be greater than zero',) + <<< Finished + > Current + >> CurrentGetattr +*** ../vim-7.4.194/src/testdir/test87.in 2014-02-11 18:47:18.678311042 +0100 +--- src/testdir/test87.in 2014-03-12 15:21:20.036709567 +0100 +*************** +*** 664,670 **** + # Check GCing iterator that was not fully exhausted + i = iter(vim.buffers) + cb.append('i:' + str(next(i))) +! # and also check creating more then one iterator at a time + i2 = iter(vim.buffers) + cb.append('i2:' + str(next(i2))) + cb.append('i:' + str(next(i))) +--- 664,670 ---- + # Check GCing iterator that was not fully exhausted + i = iter(vim.buffers) + cb.append('i:' + str(next(i))) +! # and also check creating more than one iterator at a time + i2 = iter(vim.buffers) + cb.append('i2:' + str(next(i2))) + cb.append('i:' + str(next(i))) +*** ../vim-7.4.194/src/testdir/test87.ok 2014-01-14 16:54:53.000000000 +0100 +--- src/testdir/test87.ok 2014-03-12 15:19:28.080707851 +0100 +*************** +*** 882,892 **** + l[:] = FailingIter():(<class 'NotImplementedError'>, NotImplementedError('iter',)) + l[:] = FailingIterNext():(<class 'NotImplementedError'>, NotImplementedError('next',)) + <<< Finished +! nel[1:10:2] = "abcK":(<class 'ValueError'>, 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":(<class 'ValueError'>, 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":(<class 'ValueError'>, ValueError('attempt to assign sequence of size greater then 0 to extended slice',)) + (b'a', b'b', b'c', b'O') + nel[:] = FailingIterNextN(2):(<class 'NotImplementedError'>, NotImplementedError('next N',)) + (b'a', b'b', b'c', b'O') +--- 882,892 ---- + l[:] = FailingIter():(<class 'NotImplementedError'>, NotImplementedError('iter',)) + l[:] = FailingIterNext():(<class 'NotImplementedError'>, NotImplementedError('next',)) + <<< Finished +! nel[1:10:2] = "abcK":(<class 'ValueError'>, ValueError('attempt to assign sequence of size greater than 2 to extended slice',)) + (b'a', b'b', b'c', b'O') + nel[1:10:2] = "a":(<class 'ValueError'>, 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":(<class 'ValueError'>, ValueError('attempt to assign sequence of size greater than 0 to extended slice',)) + (b'a', b'b', b'c', b'O') + nel[:] = FailingIterNextN(2):(<class 'NotImplementedError'>, NotImplementedError('next N',)) + (b'a', b'b', b'c', b'O') +*************** +*** 1233,1240 **** + >>> Testing NumberToLong using vim.buffers[%s] + vim.buffers[[]]:(<class 'TypeError'>, TypeError('expected int() or something supporting coercing to int(), but got list',)) + vim.buffers[None]:(<class 'TypeError'>, TypeError('expected int() or something supporting coercing to int(), but got NoneType',)) +! vim.buffers[-1]:(<class 'ValueError'>, ValueError('number must be greater then zero',)) +! vim.buffers[0]:(<class 'ValueError'>, ValueError('number must be greater then zero',)) + <<< Finished + > Current + >> CurrentGetattr +--- 1233,1240 ---- + >>> Testing NumberToLong using vim.buffers[%s] + vim.buffers[[]]:(<class 'TypeError'>, TypeError('expected int() or something supporting coercing to int(), but got list',)) + vim.buffers[None]:(<class 'TypeError'>, TypeError('expected int() or something supporting coercing to int(), but got NoneType',)) +! vim.buffers[-1]:(<class 'ValueError'>, ValueError('number must be greater than zero',)) +! vim.buffers[0]:(<class 'ValueError'>, ValueError('number must be greater than zero',)) + <<< Finished + > Current + >> CurrentGetattr +*** ../vim-7.4.194/src/version.c 2014-03-12 14:54:29.920684895 +0100 +--- src/version.c 2014-03-12 15:19:20.016707728 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 195, + /**/ + +-- +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/patches/source/vim/patches/7.4.196 b/patches/source/vim/patches/7.4.196 new file mode 100644 index 000000000..d483b241d --- /dev/null +++ b/patches/source/vim/patches/7.4.196 @@ -0,0 +1,51 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.196 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.196 +Problem: Tests fail on Solaris 9 and 10. +Solution: Use "test -f" instead of "test -e". (Laurent Blume) +Files: src/testdir/Makefile + + +*** ../vim-7.4.195/src/testdir/Makefile 2014-02-23 23:38:58.812760280 +0100 +--- src/testdir/Makefile 2014-03-12 15:46:41.352732878 +0100 +*************** +*** 61,67 **** + 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; \ +--- 61,67 ---- + test1.out: test1.in + -rm -rf $*.failed $(RM_ON_RUN) $(RM_ON_START) wrongtermsize + $(RUN_VIM) $*.in +! @/bin/sh -c "if test -f wrongtermsize; \ + then echo; \ + echo test1 FAILED - terminal size must be 80x24 or larger; \ + echo; exit 1; \ +*** ../vim-7.4.195/src/version.c 2014-03-12 15:26:36.432714415 +0100 +--- src/version.c 2014-03-12 15:48:09.700734232 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 196, + /**/ + +-- +My Go, this amn keyboar oesn't have a . + + /// 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/patches/source/vim/patches/7.4.197 b/patches/source/vim/patches/7.4.197 new file mode 100644 index 000000000..80783eb46 --- /dev/null +++ b/patches/source/vim/patches/7.4.197 @@ -0,0 +1,1052 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.197 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.197 +Problem: Various problems on VMS. +Solution: Fix several VMS problems. (Zoltan Arpadffy) +Files: runtime/doc/os_vms.txt, src/Make_vms.mms, src/fileio.c, + src/os_unix.c, src/os_unix.h, src/os_vms.c, src/os_vms_conf.h, + src/proto/os_vms.pro, src/testdir/Make_vms.mms, + src/testdir/test72.in, src/testdir/test77a.com, + src/testdir/test77a.in, src/testdir/test77a.ok src/undo.c + + +*** ../vim-7.4.196/runtime/doc/os_vms.txt 2013-08-10 13:24:59.000000000 +0200 +--- runtime/doc/os_vms.txt 2014-03-12 15:55:50.196741288 +0100 +*************** +*** 1,4 **** +! *os_vms.txt* For Vim version 7.4. Last change: 2011 Aug 14 + + + VIM REFERENCE MANUAL +--- 1,4 ---- +! *os_vms.txt* For Vim version 7.4. Last change: 2014 Feb 24 + + + VIM REFERENCE MANUAL +*************** +*** 24,30 **** + + 1. Getting started *vms-started* + +! Vim (Vi IMproved) is a vi-compatible text editor that runs on nearly every + operating system known to humanity. Now use Vim on OpenVMS too, in character + or X/Motif environment. It is fully featured and absolutely compatible with + Vim on other operating systems. +--- 24,30 ---- + + 1. Getting started *vms-started* + +! Vim (Vi IMproved) is a Vi-compatible text editor that runs on nearly every + operating system known to humanity. Now use Vim on OpenVMS too, in character + or X/Motif environment. It is fully featured and absolutely compatible with + Vim on other operating systems. +*************** +*** 764,769 **** +--- 764,785 ---- + + 9. VMS related changes *vms-changes* + ++ Version 7.4 ++ - Undo: VMS can not handle more than one dot in the filenames use "dir/name" -> "dir/_un_name" ++ add _un_ at the beginning to keep the extension ++ - correct swap file name wildcard handling ++ - handle iconv usage correctly ++ - do not optimize on vax - otherwise it hangs compiling crypto files ++ - fileio.c fix the comment ++ - correct RealWaitForChar ++ - after 7.4-119 use different functions lib$cvtf_to_internal_time because Alpha and VAX have ++ G_FLOAT but IA64 uses IEEE float otherwise Vim crashes ++ - guard agains crashes that are caused by mixed filenames ++ - [TESTDIR]make_vms.mms changed to see the output files ++ - Improve tests, update known issues ++ - minor compiler warnings fixed ++ - CTAGS 5.8 +regex included ++ + Version 7.3 + - CTAGS 5.8 included + - VMS compile warnings fixed - floating-point overflow warning corrected on VAX +*** ../vim-7.4.196/src/Make_vms.mms 2013-05-06 04:06:04.000000000 +0200 +--- src/Make_vms.mms 2014-03-12 15:55:50.196741288 +0100 +*************** +*** 2,8 **** + # Makefile for Vim on OpenVMS + # + # Maintainer: Zoltan Arpadffy <arpadffy@polarhome.com> +! # Last change: 2008 Aug 16 + # + # This has script been tested on VMS 6.2 to 8.2 on DEC Alpha, VAX and IA64 + # with MMS and MMK +--- 2,8 ---- + # Makefile for Vim on OpenVMS + # + # Maintainer: Zoltan Arpadffy <arpadffy@polarhome.com> +! # Last change: 2014 Feb 24 + # + # This has script been tested on VMS 6.2 to 8.2 on DEC Alpha, VAX and IA64 + # with MMS and MMK +*************** +*** 21,29 **** + ###################################################################### + # Configuration section. + ###################################################################### +- # VMS version +- # Uncomment if you use VMS version 6.2 or older +- # OLD_VMS = YES + + # Compiler selection. + # Comment out if you use the VAXC compiler +--- 21,26 ---- +*************** +*** 60,66 **** + + # Uncomment if want a debug version. Resulting executable is DVIM.EXE + # Development purpose only! Normally, it should not be defined. !!! +! # DEBUG = YES + + # Languages support for Perl, Python, TCL etc. + # If you don't need it really, leave them behind the comment. +--- 57,63 ---- + + # Uncomment if want a debug version. Resulting executable is DVIM.EXE + # Development purpose only! Normally, it should not be defined. !!! +! # DEBUG = YES + + # Languages support for Perl, Python, TCL etc. + # If you don't need it really, leave them behind the comment. +*************** +*** 87,92 **** +--- 84,92 ---- + # Allow FEATURE_MZSCHEME + # VIM_MZSCHEME = YES + ++ # Use ICONV ++ # VIM_ICONV = YES ++ + ###################################################################### + # Directory, library and include files configuration section. + # Normally you need not to change anything below. ! +*************** +*** 99,123 **** + + .IFDEF MMSVAX + .IFDEF DECC # VAX with DECC +! CC_DEF = cc # /decc # some system requires this switch but when it is not required /ver might fail + PREFIX = /prefix=all + .ELSE # VAX with VAXC + CC_DEF = cc + PREFIX = + CCVER = + .ENDIF +! .ELSE # AXP wixh DECC + CC_DEF = cc + PREFIX = /prefix=all + .ENDIF + + LD_DEF = link + C_INC = [.proto] + +- .IFDEF OLD_VMS +- VMS_DEF = ,"OLD_VMS" +- .ENDIF +- + .IFDEF DEBUG + DEBUG_DEF = ,"DEBUG" + TARGET = dvim.exe +--- 99,123 ---- + + .IFDEF MMSVAX + .IFDEF DECC # VAX with DECC +! CC_DEF = cc # /decc # some versions require /decc switch but when it is not required /ver might fail + PREFIX = /prefix=all ++ OPTIMIZE= /noopt # do not optimize on VAX. The compiler has hard time with crypto functions + .ELSE # VAX with VAXC + CC_DEF = cc + PREFIX = ++ OPTIMIZE= /noopt + CCVER = + .ENDIF +! .ELSE # AXP and IA64 with DECC + CC_DEF = cc + PREFIX = /prefix=all ++ OPTIMIZE= /opt + .ENDIF + ++ + LD_DEF = link + C_INC = [.proto] + + .IFDEF DEBUG + DEBUG_DEF = ,"DEBUG" + TARGET = dvim.exe +*************** +*** 125,131 **** + LDFLAGS = /debug + .ELSE + TARGET = vim.exe +! CFLAGS = /opt$(PREFIX) + LDFLAGS = + .ENDIF + +--- 125,131 ---- + LDFLAGS = /debug + .ELSE + TARGET = vim.exe +! CFLAGS = $(OPTIMIZE)$(PREFIX) + LDFLAGS = + .ENDIF + +*************** +*** 274,279 **** +--- 274,284 ---- + MZSCH_OBJ = if_mzsch.obj + .ENDIF + ++ .IFDEF VIM_ICONV ++ # ICONV related setup ++ ICONV_DEF = ,"USE_ICONV" ++ .ENDIF ++ + ###################################################################### + # End of configuration section. + # Please, do not change anything below without programming experience. +*************** +*** 287,294 **** + + .SUFFIXES : .obj .c + +! ALL_CFLAGS = /def=($(MODEL_DEF)$(DEFS)$(VMS_DEF)$(DEBUG_DEF)$(PERL_DEF)$(PYTHON_DEF) - +! $(TCL_DEF)$(SNIFF_DEF)$(RUBY_DEF)$(XIM_DEF)$(HANGULIN_DEF)$(TAG_DEF)$(MZSCH_DEF)) - + $(CFLAGS)$(GUI_FLAG) - + /include=($(C_INC)$(GUI_INC_DIR)$(GUI_INC)$(PERL_INC)$(PYTHON_INC)$(TCL_INC)) + +--- 292,299 ---- + + .SUFFIXES : .obj .c + +! ALL_CFLAGS = /def=($(MODEL_DEF)$(DEFS)$(DEBUG_DEF)$(PERL_DEF)$(PYTHON_DEF) - +! $(TCL_DEF)$(SNIFF_DEF)$(RUBY_DEF)$(XIM_DEF)$(HANGULIN_DEF)$(TAG_DEF)$(MZSCH_DEF)$(ICONV_DEF)) - + $(CFLAGS)$(GUI_FLAG) - + /include=($(C_INC)$(GUI_INC_DIR)$(GUI_INC)$(PERL_INC)$(PYTHON_INC)$(TCL_INC)) + +*************** +*** 296,303 **** + # It is specially formated for correct display of unix like includes + # as $(GUI_INC) - replaced with $(GUI_INC_VER) + # Otherwise should not be any other difference. +! ALL_CFLAGS_VER = /def=($(MODEL_DEF)$(DEFS)$(VMS_DEF)$(DEBUG_DEF)$(PERL_DEF)$(PYTHON_DEF) - +! $(TCL_DEF)$(SNIFF_DEF)$(RUBY_DEF)$(XIM_DEF)$(HANGULIN_DEF)$(TAG_DEF)$(MZSCH_DEF)) - + $(CFLAGS)$(GUI_FLAG) - + /include=($(C_INC)$(GUI_INC_DIR)$(GUI_INC_VER)$(PERL_INC)$(PYTHON_INC)$(TCL_INC)) + +--- 301,308 ---- + # It is specially formated for correct display of unix like includes + # as $(GUI_INC) - replaced with $(GUI_INC_VER) + # Otherwise should not be any other difference. +! ALL_CFLAGS_VER = /def=($(MODEL_DEF)$(DEFS)$(DEBUG_DEF)$(PERL_DEF)$(PYTHON_DEF) - +! $(TCL_DEF)$(SNIFF_DEF)$(RUBY_DEF)$(XIM_DEF)$(HANGULIN_DEF)$(TAG_DEF)$(MZSCH_DEF)$(ICONV_DEF)) - + $(CFLAGS)$(GUI_FLAG) - + /include=($(C_INC)$(GUI_INC_DIR)$(GUI_INC_VER)$(PERL_INC)$(PYTHON_INC)$(TCL_INC)) + +*** ../vim-7.4.196/src/fileio.c 2014-02-23 22:58:12.072764176 +0100 +--- src/fileio.c 2014-03-12 15:55:50.200741288 +0100 +*************** +*** 7559,7565 **** + p = (char_u *)tempnam("tmp:", (char *)itmp); + if (p != NULL) + { +! /* VMS will use '.LOG' if we don't explicitly specify an extension, + * and VIM will then be unable to find the file later */ + STRCPY(itmp, p); + STRCAT(itmp, ".txt"); +--- 7559,7565 ---- + p = (char_u *)tempnam("tmp:", (char *)itmp); + if (p != NULL) + { +! /* VMS will use '.LIS' if we don't explicitly specify an extension, + * and VIM will then be unable to find the file later */ + STRCPY(itmp, p); + STRCAT(itmp, ".txt"); +*** ../vim-7.4.196/src/os_unix.c 2013-12-11 17:12:32.000000000 +0100 +--- src/os_unix.c 2014-03-12 16:25:11.144768271 +0100 +*************** +*** 2965,2971 **** +--- 2965,2990 ---- + + if (stat((char *)name, &st)) + return 0; ++ #ifdef VMS ++ /* Like on Unix system file can have executable rights but not necessarily ++ * be an executable, but on Unix is not a default for an ordianry file to ++ * have an executable flag - on VMS it is in most cases. ++ * Therefore, this check does not have any sense - let keep us to the ++ * conventions instead: ++ * *.COM and *.EXE files are the executables - the rest are not. This is ++ * not ideal but better then it was. ++ */ ++ int vms_executable = 0; ++ if (S_ISREG(st.st_mode) && mch_access((char *)name, X_OK) == 0) ++ { ++ if (strstr(vms_tolower((char*)name),".exe") != NULL ++ || strstr(vms_tolower((char*)name),".com")!= NULL) ++ vms_executable = 1; ++ } ++ return vms_executable; ++ #else + return S_ISREG(st.st_mode) && mch_access((char *)name, X_OK) == 0; ++ #endif + } + + /* +*************** +*** 2983,2989 **** +--- 3002,3010 ---- + /* If it's an absolute or relative path don't need to use $PATH. */ + if (mch_isFullName(name) || (name[0] == '.' && (name[1] == '/' + || (name[1] == '.' && name[2] == '/')))) ++ { + return executable_file(name); ++ } + + p = (char_u *)getenv("PATH"); + if (p == NULL || *p == NUL) +*** ../vim-7.4.196/src/os_unix.h 2013-12-11 17:12:32.000000000 +0100 +--- src/os_unix.h 2014-03-12 15:55:50.204741288 +0100 +*************** +*** 302,308 **** + # define USR_VIMRC_FILE2 "$HOME/vimfiles/vimrc" + # else + # ifdef VMS +! # define USR_VIMRC_FILE2 "sys$login:vimfiles:vimrc" + # else + # define USR_VIMRC_FILE2 "~/.vim/vimrc" + # endif +--- 302,308 ---- + # define USR_VIMRC_FILE2 "$HOME/vimfiles/vimrc" + # else + # ifdef VMS +! # define USR_VIMRC_FILE2 "sys$login:vimfiles/vimrc" + # else + # define USR_VIMRC_FILE2 "~/.vim/vimrc" + # endif +*************** +*** 329,335 **** + # define USR_GVIMRC_FILE2 "$HOME/vimfiles/gvimrc" + # else + # ifdef VMS +! # define USR_GVIMRC_FILE2 "sys$login:vimfiles:gvimrc" + # else + # define USR_GVIMRC_FILE2 "~/.vim/gvimrc" + # endif +--- 329,335 ---- + # define USR_GVIMRC_FILE2 "$HOME/vimfiles/gvimrc" + # else + # ifdef VMS +! # define USR_GVIMRC_FILE2 "sys$login:vimfiles/gvimrc" + # else + # define USR_GVIMRC_FILE2 "~/.vim/gvimrc" + # endif +*** ../vim-7.4.196/src/os_vms.c 2013-12-11 17:12:32.000000000 +0100 +--- src/os_vms.c 2014-03-12 16:26:17.544769288 +0100 +*************** +*** 296,301 **** +--- 296,313 ---- + } + + /* ++ * Convert string to lowercase - most often filename ++ */ ++ char * ++ vms_tolower( char *name ) ++ { ++ int i,nlen = strlen(name); ++ for (i = 0; i < nlen; i++) ++ name[i] = TOLOWER_ASC(name[i]); ++ return name; ++ } ++ ++ /* + * Convert VMS system() or lib$spawn() return code to Unix-like exit value. + */ + int +*************** +*** 361,373 **** + vms_wproc(char *name, int val) + { + int i; +- int nlen; + static int vms_match_alloced = 0; + +! if (val != DECC$K_FILE) /* Directories and foreign non VMS files are not +! counting */ + return 1; + + if (vms_match_num == 0) { + /* first time through, setup some things */ + if (NULL == vms_fmatch) { +--- 373,384 ---- + vms_wproc(char *name, int val) + { + int i; + static int vms_match_alloced = 0; + +! if (val == DECC$K_FOREIGN ) /* foreign non VMS files are not counting */ + return 1; + ++ /* accept all DECC$K_FILE and DECC$K_DIRECTORY */ + if (vms_match_num == 0) { + /* first time through, setup some things */ + if (NULL == vms_fmatch) { +*************** +*** 383,394 **** + } + } + + vms_remove_version(name); +! +! /* convert filename to lowercase */ +! nlen = strlen(name); +! for (i = 0; i < nlen; i++) +! name[i] = TOLOWER_ASC(name[i]); + + /* if name already exists, don't add it */ + for (i = 0; i<vms_match_num; i++) { +--- 394,402 ---- + } + } + ++ /* make matches look uniform */ + vms_remove_version(name); +! name=vms_tolower(name); + + /* if name already exists, don't add it */ + for (i = 0; i<vms_match_num; i++) { +*************** +*** 428,433 **** +--- 436,442 ---- + { + int i, cnt = 0; + char_u buf[MAXPATHL]; ++ char *result; + int dir; + int files_alloced, files_free; + +*************** +*** 449,456 **** + STRCPY(buf,pat[i]); + + vms_match_num = 0; /* reset collection counter */ +! cnt = decc$to_vms(decc$translate_vms(vms_fixfilename(buf)), vms_wproc, 1, 0); +! /* allow wild, no dir */ + if (cnt > 0) + cnt = vms_match_num; + +--- 458,470 ---- + STRCPY(buf,pat[i]); + + vms_match_num = 0; /* reset collection counter */ +! result = decc$translate_vms(vms_fixfilename(buf)); +! if ( (int) result == 0 || (int) result == -1 ) { +! cnt = 0; +! } +! else { +! cnt = decc$to_vms(result, vms_wproc, 1 /*allow wild*/ , (flags & EW_DIR ? 0:1 ) /*allow directory*/) ; +! } + if (cnt > 0) + cnt = vms_match_num; + +*************** +*** 497,506 **** + mch_expandpath(garray_T *gap, char_u *path, int flags) + { + int i,cnt = 0; +! vms_match_num = 0; + +! cnt = decc$to_vms(decc$translate_vms(vms_fixfilename(path)), vms_wproc, 1, 0); +! /* allow wild, no dir */ + if (cnt > 0) + cnt = vms_match_num; + for (i = 0; i < cnt; i++) +--- 511,528 ---- + mch_expandpath(garray_T *gap, char_u *path, int flags) + { + int i,cnt = 0; +! char *result; + +! vms_match_num = 0; +! /* the result from the decc$translate_vms needs to be handled */ +! /* otherwise it might create ACCVIO error in decc$to_vms */ +! result = decc$translate_vms(vms_fixfilename(path)); +! if ( (int) result == 0 || (int) result == -1 ) { +! cnt = 0; +! } +! else { +! cnt = decc$to_vms(result, vms_wproc, 1 /*allow_wild*/, (flags & EW_DIR ? 0:1 ) /*allow directory*/); +! } + if (cnt > 0) + cnt = vms_match_num; + for (i = 0; i < cnt; i++) +*************** +*** 521,526 **** +--- 543,549 ---- + char *end_of_dir; + char ch; + int len; ++ char *out_str=out; + + /* copy vms filename portion up to last colon + * (node and/or disk) +*************** +*** 602,608 **** + *end_of_dir = ']'; + } + +- + /* + * for decc$to_vms in vms_fixfilename + */ +--- 625,630 ---- +*************** +*** 710,735 **** + 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, +--- 732,764 ---- + 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 (sec > 0) { + /* time-out specified; convert it to absolute time */ ++ /* sec>0 requirement of lib$cvtf_to_internal_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 */ +! #if __G_FLOAT==0 +! # ifndef VAX +! /* IEEE is default on IA64, but can be used on Alpha too - but not on VAX */ +! status = lib$cvts_to_internal_time( + &convert_operation, &sec, &time_diff); ++ # endif ++ #else /* default on Alpha and VAX */ ++ status = lib$cvtf_to_internal_time( ++ &convert_operation, &sec, &time_diff); ++ #endif + if (status != LIB$_NORMAL) + return 0; /* error */ + /* add them up */ + status = lib$add_times( + &time_curr, +*** ../vim-7.4.196/src/os_vms_conf.h 2014-02-23 22:52:33.372764715 +0100 +--- src/os_vms_conf.h 2014-03-12 15:55:50.204741288 +0100 +*************** +*** 166,173 **** + #undef HAVE_SYS_TIME_H + #undef HAVE_LOCALE_H + #define BROKEN_LOCALE +- #undef HAVE_ICONV_H +- #undef HAVE_ICONV + #undef DYNAMIC_ICONV + #undef HAVE_STRFTIME + #else +--- 166,171 ---- +*************** +*** 177,188 **** + #define HAVE_SYS_TIME_H + #define HAVE_LOCALE_H + #define BROKEN_LOCALE +- #undef HAVE_ICONV_H +- #undef HAVE_ICONV + #undef DYNAMIC_ICONV + #define HAVE_STRFTIME + #endif + + /* GUI support defines */ + #if defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_GTK) + #define HAVE_X11 +--- 175,192 ---- + #define HAVE_SYS_TIME_H + #define HAVE_LOCALE_H + #define BROKEN_LOCALE + #undef DYNAMIC_ICONV + #define HAVE_STRFTIME + #endif + ++ #if defined(USE_ICONV) ++ #define HAVE_ICONV_H ++ #define HAVE_ICONV ++ #else ++ #undef HAVE_ICONV_H ++ #undef HAVE_ICONV ++ #endif ++ + /* GUI support defines */ + #if defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_GTK) + #define HAVE_X11 +*** ../vim-7.4.196/src/proto/os_vms.pro 2013-08-10 13:37:40.000000000 +0200 +--- src/proto/os_vms.pro 2014-03-12 15:55:50.204741288 +0100 +*************** +*** 7,12 **** +--- 7,13 ---- + int vms_sys __ARGS((char *cmd, char *out, char *inp)); + int vms_sys_status __ARGS((int status)); + int vms_read __ARGS((char *inbuf, size_t nbytes)); ++ char *vms_tolower __ARGS((char *name)); + int mch_expand_wildcards __ARGS((int num_pat, char_u **pat, int *num_file, char_u ***file, int flags)); + int mch_expandpath __ARGS((garray_T *gap, char_u *path, int flags)); + void *vms_fixfilename __ARGS((void *instring)); +*** ../vim-7.4.196/src/testdir/Make_vms.mms 2014-02-23 23:38:58.812760280 +0100 +--- src/testdir/Make_vms.mms 2014-03-12 16:06:22.888750982 +0100 +*************** +*** 4,10 **** + # Authors: Zoltan Arpadffy, <arpadffy@polarhome.com> + # Sandor Kopanyi, <sandor.kopanyi@mailbox.hu> + # +! # Last change: 2014 Feb 23 + # + # 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, <arpadffy@polarhome.com> + # Sandor Kopanyi, <sandor.kopanyi@mailbox.hu> + # +! # Last change: 2014 Mar 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. +*************** +*** 41,56 **** + # They fail because VMS does not support file names. + # WANT_SPELL = YES + +! # Comment out if you want to run mzschema tests. + # It fails because VMS does not support this feature yet. + # WANT_MZSCH = YES + + # Comment out if you have gzip on your system + # HAVE_GZIP = YES + + # Comment out if you have GNU compatible diff on your system + # HAVE_GDIFF = YES + + ####################################################################### + # End of configuration section. + # +--- 41,71 ---- + # They fail because VMS does not support file names. + # WANT_SPELL = YES + +! # Comment out if you want to run mzschema tests. + # It fails because VMS does not support this feature yet. + # WANT_MZSCH = YES + ++ # Comment out if you have ODS-5 file system ++ # HAVE_ODS5 = YES ++ + # Comment out if you have gzip on your system + # HAVE_GZIP = YES + + # Comment out if you have GNU compatible diff on your system + # HAVE_GDIFF = YES + ++ # Comment out if you have GNU compatible cksum on your system ++ # HAVE_CKSUM = YES ++ ++ # Comment out if you have ICONV support ++ # HAVE_ICONV = YES ++ ++ # Comment out if you have LUA support ++ # HAVE_LUA = YES ++ ++ # Comment out if you have PYTHON support ++ # HAVE_PYTHON = YES ++ + ####################################################################### + # End of configuration section. + # +*************** +*** 63,99 **** + + SCRIPT = test1.out test2.out test3.out test4.out test5.out \ + test6.out test7.out test8.out test9.out test10a.out\ +! test13.out test14.out test15.out test17.out \ + test18.out test19.out test20.out test21.out test22.out \ + test23.out test24.out test26.out \ + test28.out test29.out test30.out test31.out test32.out \ + test33.out test34.out test35.out test36.out test37.out \ + test38.out test39.out test40.out test41.out test42.out \ + test43.out test44.out test45.out test46.out \ +! test48.out test51.out test53.out test54.out test55.out \ +! test56.out test57.out test60.out \ + test61.out test62.out test63.out test64.out test65.out \ + test66.out test67.out test68.out test69.out \ + test71.out test72.out test74.out test75.out 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 \ +! test100.out test101.out test102.out test103.out test104.out \ + test105.out + + # Known problems: +! # Test 30: a problem around mac format - unknown reason + # +! # Test 32: VMS is not case sensitive and all filenames are lowercase within Vim + # (this should be changed in order to preserve the original filename) - should + # be fixed. VMS allows just one dot in the filename + # +! # Test 58 and 59: Failed/Hangs - VMS does not support spell files (file names + # with too many dots). + # +! # Test 72: unknown reason +! # Test 85: no Lua interface + + .IFDEF WANT_GUI + SCRIPT_GUI = test16.out +--- 78,121 ---- + + SCRIPT = test1.out test2.out test3.out test4.out test5.out \ + test6.out test7.out test8.out test9.out test10a.out\ +! test13.out test14.out test15.out \ + test18.out test19.out test20.out test21.out test22.out \ + test23.out test24.out test26.out \ + test28.out test29.out test30.out test31.out test32.out \ + test33.out test34.out test35.out test36.out test37.out \ + test38.out test39.out test40.out test41.out test42.out \ + test43.out test44.out test45.out test46.out \ +! test48.out test49.out test51.out test53.out test54.out \ +! test55.out test56.out test57.out test60.out \ + test61.out test62.out test63.out test64.out test65.out \ + test66.out test67.out test68.out test69.out \ + test71.out test72.out test74.out test75.out test76.out \ +! test77a.out test78.out test79.out test80.out test81.out \ +! test82.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 test103.out test104.out \ + test105.out + + # Known problems: +! # test17: ? +! # +! # test30: bug, most probably - a problem around mac format + # +! # test32: VMS is not case sensitive and all filenames are lowercase within Vim + # (this should be changed in order to preserve the original filename) - should + # be fixed. VMS allows just one dot in the filename + # +! # test58, test59: Failed/Hangs - VMS does not support spell files (file names + # with too many dots). + # +! # test72: bug - Vim hangs at :rename (while rename works well otherwise) +! # test78: bug - Vim dies at :recover Xtest +! # test83: ? +! # test85: no Lua interface +! # test89: bug - findfile() does not work on VMS (just in the current directory) +! # test97, test102: Just ODS-5 supports space and special chars in the filename. +! # On ODS-2 tests fail. + + .IFDEF WANT_GUI + SCRIPT_GUI = test16.out +*************** +*** 101,107 **** + .ENDIF + + .IFDEF WANT_UNIX +! SCRIPT_UNIX = test10.out test12.out test25.out test27.out test49.out test73.out + .ENDIF + + .IFDEF WANT_WIN +--- 123,129 ---- + .ENDIF + + .IFDEF WANT_UNIX +! SCRIPT_UNIX = test10.out test12.out test17.out test25.out test27.out test49.out test73.out + .ENDIF + + .IFDEF WANT_WIN +*************** +*** 116,121 **** +--- 138,147 ---- + SCRIPT_MZSCH = test70.out + .ENDIF + ++ .IFDEF HAVE_ODS5 ++ SCRIPT_ODS5 = test97.out test102.out ++ .ENDIF ++ + .IFDEF HAVE_GZIP + SCRIPT_GZIP = test11.out + .ENDIF +*************** +*** 124,133 **** +--- 150,177 ---- + SCRIPT_GDIFF = test47.out + .ENDIF + ++ .IFDEF HAVE_CKSUM ++ SCRIPT_CKSUM = test77.out ++ .ENDIF ++ ++ .IFDEF HAVE_ICONV ++ SCRIPT_ICONV = test83.out ++ .ENDIF ++ ++ .IFDEF HAVE_LUA ++ SCRIPT_LUA = test85.out ++ .ENDIF ++ ++ .IFDEF HAVE_PYTHON ++ SCRIPT_PYTHON = test86.out test87.out ++ .ENDIF ++ + .in.out : + -@ !clean up before doing the test + -@ if "''F$SEARCH("test.out.*")'" .NES. "" then delete/noconfirm/nolog test.out.* + -@ if "''F$SEARCH("$*.out.*")'" .NES. "" then delete/noconfirm/nolog $*.out.* ++ -@ ! define TMP if not set - some tests use it ++ -@ if "''F$TRNLNM("TMP")'" .EQS. "" then define/nolog TMP [] + -@ write sys$output " " + -@ write sys$output "-----------------------------------------------" + -@ write sys$output " "$*" " +*************** +*** 140,148 **** + -@ if "''F$SEARCH("$*.out.*")'" .NES. "" then differences /par $*.out $*.ok; + -@ !clean up after the test + -@ if "''F$SEARCH("Xdotest.*")'" .NES. "" then delete/noconfirm/nolog Xdotest.*.* + +! all : clean nolog $(START_WITH) $(SCRIPT) $(SCRIPT_GUI) $(SCRIPT_UNIX) $(SCRIPT_WIN) $(SCRIPT_SPELL) $(SCRIPT_GZIP) \ +! $(SCRIPT_GDIFF) $(SCRIPT_MZSCH) nolog + -@ write sys$output " " + -@ write sys$output "-----------------------------------------------" + -@ write sys$output " All done" +--- 184,193 ---- + -@ if "''F$SEARCH("$*.out.*")'" .NES. "" then differences /par $*.out $*.ok; + -@ !clean up after the test + -@ if "''F$SEARCH("Xdotest.*")'" .NES. "" then delete/noconfirm/nolog Xdotest.*.* ++ -@ if "''F$SEARCH("Xtest.*")'" .NES. "" then delete/noconfirm/nolog Xtest.*.* + +! all : clean nolog $(START_WITH) $(SCRIPT) $(SCRIPT_GUI) $(SCRIPT_UNIX) $(SCRIPT_WIN) $(SCRIPT_SPELL) $(SCRIPT_ODS5) $(SCRIPT_GZIP) \ +! $(SCRIPT_GDIFF) $(SCRIPT_MZSCH) $(SCRIPT_CKSUM) $(SCRIPT_ICONV) $(SCRIPT_LUA) $(SCRIPT_PYTHON) nolog + -@ write sys$output " " + -@ write sys$output "-----------------------------------------------" + -@ write sys$output " All done" +*************** +*** 165,177 **** + -@ write sys$output " Test results:" + -@ write sys$output "-----------------------------------------------" + -@ write sys$output "MAKE_VMS.MMS options:" +! -@ write sys$output " WANT_GUI = ""$(WANT_GUI)"" " +! -@ write sys$output " WANT_UNIX = ""$(WANT_UNIX)"" " +! -@ write sys$output " WANT_WIN = ""$(WANT_WIN)"" " +! -@ write sys$output " WANT_SPELL= ""$(WANT_SPELL)"" " +! -@ write sys$output " WANT_MZSCH= ""$(WANT_MZSCH)"" " +! -@ write sys$output " HAVE_GZIP = ""$(HAVE_GZIP)"" " +! -@ write sys$output " HAVE_GDIFF= ""$(HAVE_GDIFF)"" " + -@ write sys$output "Default vimrc file is VMS.VIM:" + -@ write sys$output "-----------------------------------------------" + -@ type VMS.VIM +--- 210,227 ---- + -@ write sys$output " Test results:" + -@ write sys$output "-----------------------------------------------" + -@ write sys$output "MAKE_VMS.MMS options:" +! -@ write sys$output " WANT_GUI = ""$(WANT_GUI)"" " +! -@ write sys$output " WANT_UNIX = ""$(WANT_UNIX)"" " +! -@ write sys$output " WANT_WIN = ""$(WANT_WIN)"" " +! -@ write sys$output " WANT_SPELL = ""$(WANT_SPELL)"" " +! -@ write sys$output " WANT_MZSCH = ""$(WANT_MZSCH)"" " +! -@ write sys$output " HAVE_ODS5 = ""$(HAVE_ODS5)"" " +! -@ write sys$output " HAVE_GZIP = ""$(HAVE_GZIP)"" " +! -@ write sys$output " HAVE_GDIFF = ""$(HAVE_GDIFF)"" " +! -@ write sys$output " HAVE_CKSUM = ""$(HAVE_CKSUM)"" " +! -@ write sys$output " HAVE_ICONV = ""$(HAVE_ICONV)"" " +! -@ write sys$output " HAVE_LUA = ""$(HAVE_LUA)"" " +! -@ write sys$output " HAVE_PYTHON= ""$(HAVE_PYTHON)"" " + -@ write sys$output "Default vimrc file is VMS.VIM:" + -@ write sys$output "-----------------------------------------------" + -@ type VMS.VIM +*************** +*** 181,186 **** +--- 231,239 ---- + -@ if "''F$SEARCH("test.log")'" .NES. "" then delete/noconfirm/nolog test.log.* + -@ if "''F$SEARCH("test.ok")'" .NES. "" then delete/noconfirm/nolog test.ok.* + -@ if "''F$SEARCH("Xdotest.*")'" .NES. "" then delete/noconfirm/nolog Xdotest.*.* ++ -@ if "''F$SEARCH("Xtest*.*")'" .NES. "" then delete/noconfirm/nolog Xtest*.*.* ++ -@ if "''F$SEARCH("XX*.*")'" .NES. "" then delete/noconfirm/nolog XX*.*.* ++ -@ if "''F$SEARCH("_un_*.*")'" .NES. "" then delete/noconfirm/nolog _un_*.*.* + -@ if "''F$SEARCH("*.*_sw*")'" .NES. "" then delete/noconfirm/nolog *.*_sw*.* + -@ if "''F$SEARCH("*.failed")'" .NES. "" then delete/noconfirm/nolog *.failed.* + -@ if "''F$SEARCH("*.rej")'" .NES. "" then delete/noconfirm/nolog *.rej.* +*************** +*** 188,193 **** + -@ if "''F$SEARCH("small.vim")'" .NES. "" then delete/noconfirm/nolog small.vim.* + -@ if "''F$SEARCH("mbyte.vim")'" .NES. "" then delete/noconfirm/nolog mbyte.vim.* + -@ if "''F$SEARCH("mzscheme.vim")'" .NES. "" then delete/noconfirm/nolog mzscheme.vim.* +! -@ if "''F$SEARCH("lua.vim")'" .NES. "" then delete/noconfirm/nolog lua.vim.* + -@ if "''F$SEARCH("viminfo.*")'" .NES. "" then delete/noconfirm/nolog viminfo.*.* + +--- 241,246 ---- + -@ if "''F$SEARCH("small.vim")'" .NES. "" then delete/noconfirm/nolog small.vim.* + -@ if "''F$SEARCH("mbyte.vim")'" .NES. "" then delete/noconfirm/nolog mbyte.vim.* + -@ if "''F$SEARCH("mzscheme.vim")'" .NES. "" then delete/noconfirm/nolog mzscheme.vim.* +! -@ if "''F$SEARCH("lua.vim")'" .NES. "" then delete/noconfirm/nolog lua.vim.* + -@ if "''F$SEARCH("viminfo.*")'" .NES. "" then delete/noconfirm/nolog viminfo.*.* + +*** ../vim-7.4.196/src/testdir/test72.in 2012-01-04 19:04:17.000000000 +0100 +--- src/testdir/test72.in 2014-03-12 15:55:50.204741288 +0100 +*************** +*** 105,111 **** + u:.w >>test.out + :" + :" Rename the undo file so that it gets cleaned up. +! :call rename(".Xtestfile.un~", "Xtestundo") + :qa! + ENDTEST + +--- 105,115 ---- + u:.w >>test.out + :" + :" Rename the undo file so that it gets cleaned up. +! :if has("vms") +! : call rename("_un_Xtestfile", "Xtestundo") +! :else +! : call rename(".Xtestfile.un~", "Xtestundo") +! :endif + :qa! + ENDTEST + +*** ../vim-7.4.196/src/testdir/test77a.com 2014-03-12 16:49:10.740790329 +0100 +--- src/testdir/test77a.com 2014-03-12 16:40:04.316781957 +0100 +*************** +*** 0 **** +--- 1,8 ---- ++ $! test77a - help file creating checksum on VMS ++ $! Created by Zoltan Arpadffy ++ $ ++ $ IF P1 .NES. "" ++ $ THEN ++ $ checksum 'P1' ++ $ show symb CHECKSUM$CHECKSUM ++ $ ENDIF +*** ../vim-7.4.196/src/testdir/test77a.in 2014-03-12 16:49:10.748790329 +0100 +--- src/testdir/test77a.in 2014-03-12 15:55:50.204741288 +0100 +*************** +*** 0 **** +--- 1,31 ---- ++ Inserts 2 million lines with consecutive integers starting from 1 ++ (essentially, the output of GNU's seq 1 2000000), writes them to Xtest ++ and writes its cksum to test.out. ++ ++ We need 2 million lines to trigger a call to mf_hash_grow(). If it would mess ++ up the lines the checksum would differ. ++ ++ cksum is part of POSIX and so should be available on most Unixes. ++ If it isn't available then the test will be skipped. ++ ++ VMS does not have CKSUM but has a built in CHECKSUM - it should be used ++ STARTTEST ++ :so small.vim ++ :if !has("vms") ++ : e! test.ok ++ : w! test.out ++ : qa! ++ :endif ++ :set fileformat=unix undolevels=-1 ++ ggdG ++ :let i = 1 ++ :while i <= 2000000 | call append(i, range(i, i + 99)) | let i += 100 | endwhile ++ ggdd ++ :w! Xtest. ++ :r !@test77a.com Xtest. ++ :s/\s/ /g ++ :set fileformat& ++ :.w! test.out ++ :qa! ++ ENDTEST ++ +*** ../vim-7.4.196/src/testdir/test77a.ok 2014-03-12 16:49:10.756790330 +0100 +--- src/testdir/test77a.ok 2014-03-12 15:55:50.204741288 +0100 +*************** +*** 0 **** +--- 1 ---- ++ CHECKSUM$CHECKSUM = "844110470" +*** ../vim-7.4.196/src/undo.c 2014-01-23 18:12:44.695676751 +0100 +--- src/undo.c 2014-03-12 16:31:52.432774419 +0100 +*************** +*** 790,798 **** +--- 790,809 ---- + if (undo_file_name == NULL) + break; + p = gettail(undo_file_name); ++ #ifdef VMS ++ /* VMS can not handle more than one dot in the filenames ++ * use "dir/name" -> "dir/_un_name" - add _un_ ++ * at the beginning to keep the extension */ ++ mch_memmove(p + 4, p, STRLEN(p) + 1); ++ mch_memmove(p, "_un_", 4); ++ ++ #else ++ /* Use same directory as the ffname, ++ * "dir/name" -> "dir/.name.un~" */ + mch_memmove(p + 1, p, STRLEN(p) + 1); + *p = '.'; + STRCAT(p, ".un~"); ++ #endif + } + else + { +*** ../vim-7.4.196/src/version.c 2014-03-12 15:50:18.472736205 +0100 +--- src/version.c 2014-03-12 15:54:26.712740008 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 197, + /**/ + +-- +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/patches/source/vim/patches/7.4.198 b/patches/source/vim/patches/7.4.198 new file mode 100644 index 000000000..f204c2e04 --- /dev/null +++ b/patches/source/vim/patches/7.4.198 @@ -0,0 +1,103 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.198 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.198 +Problem: Can't build Vim with Perl when -Dusethreads is not specified for + building Perl, and building Vim with --enable-perlinterp=dynamic. +Solution: Adjust #ifdefs. (Yasuhiro Matsumoto) +Files: src/if_perl.xs + + +*** ../vim-7.4.197/src/if_perl.xs 2013-12-14 11:50:28.000000000 +0100 +--- src/if_perl.xs 2014-03-12 17:05:07.832804995 +0100 +*************** +*** 138,143 **** +--- 138,145 ---- + #endif + typedef int XSINIT_t; + typedef int XSUBADDR_t; ++ #endif ++ #ifndef USE_ITHREADS + typedef int perl_key; + #endif + +*************** +*** 264,270 **** + # define Perl_Iscopestack_ix_ptr dll_Perl_Iscopestack_ix_ptr + # define Perl_Iunitcheckav_ptr dll_Perl_Iunitcheckav_ptr + # if (PERL_REVISION == 5) && (PERL_VERSION >= 14) +! # define PL_thr_key *dll_PL_thr_key + # endif + + /* +--- 266,274 ---- + # define Perl_Iscopestack_ix_ptr dll_Perl_Iscopestack_ix_ptr + # define Perl_Iunitcheckav_ptr dll_Perl_Iunitcheckav_ptr + # if (PERL_REVISION == 5) && (PERL_VERSION >= 14) +! # ifdef USE_ITHREADS +! # define PL_thr_key *dll_PL_thr_key +! # endif + # endif + + /* +*************** +*** 386,392 **** +--- 390,398 ---- + #endif + + #if (PERL_REVISION == 5) && (PERL_VERSION >= 14) ++ # ifdef USE_ITHREADS + static perl_key* dll_PL_thr_key; ++ # endif + #else + static GV** (*Perl_Idefgv_ptr)(register PerlInterpreter*); + static GV** (*Perl_Ierrgv_ptr)(register PerlInterpreter*); +*************** +*** 413,419 **** +--- 419,427 ---- + #ifdef PERL5101_OR_LATER + {"Perl_croak_xs_usage", (PERL_PROC*)&Perl_croak_xs_usage}, + #endif ++ #ifdef PERL_IMPLICIT_CONTEXT + {"Perl_croak_nocontext", (PERL_PROC*)&Perl_croak_nocontext}, ++ #endif + {"Perl_dowantarray", (PERL_PROC*)&Perl_dowantarray}, + {"Perl_free_tmps", (PERL_PROC*)&Perl_free_tmps}, + {"Perl_gv_stashpv", (PERL_PROC*)&Perl_gv_stashpv}, +*************** +*** 505,511 **** +--- 513,521 ---- + # endif + #endif + #if (PERL_REVISION == 5) && (PERL_VERSION >= 14) ++ # ifdef USE_ITHREADS + {"PL_thr_key", (PERL_PROC*)&dll_PL_thr_key}, ++ # endif + #else + {"Perl_Idefgv_ptr", (PERL_PROC*)&Perl_Idefgv_ptr}, + {"Perl_Ierrgv_ptr", (PERL_PROC*)&Perl_Ierrgv_ptr}, +*** ../vim-7.4.197/src/version.c 2014-03-12 16:51:35.060792541 +0100 +--- src/version.c 2014-03-12 17:06:27.660806218 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 198, + /**/ + +-- +Dogs must have a permit signed by the mayor in order to congregate in groups +of three or more on private property. + [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/patches/source/vim/patches/7.4.199 b/patches/source/vim/patches/7.4.199 new file mode 100644 index 000000000..d421df0af --- /dev/null +++ b/patches/source/vim/patches/7.4.199 @@ -0,0 +1,106 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.199 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.199 +Problem: (issue 197) ]P doesn't paste over Visual selection. +Solution: Handle Visual mode specifically. (Christian Brabandt) +Files: src/normal.c + + +*** ../vim-7.4.198/src/normal.c 2014-02-23 23:38:58.824760280 +0100 +--- src/normal.c 2014-03-12 17:33:28.184831049 +0100 +*************** +*** 6751,6760 **** + { + if (!checkclearop(cap->oap)) + { + prep_redo_cmd(cap); +! do_put(cap->oap->regname, +! (cap->cmdchar == ']' && cap->nchar == 'p') ? FORWARD : BACKWARD, +! cap->count1, PUT_FIXINDENT); + } + } + +--- 6751,6808 ---- + { + if (!checkclearop(cap->oap)) + { ++ int dir = (cap->cmdchar == ']' && cap->nchar == 'p') ++ ? FORWARD : BACKWARD; ++ int regname = cap->oap->regname; ++ #ifdef FEAT_VISUAL ++ int was_visual = VIsual_active; ++ int line_count = curbuf->b_ml.ml_line_count; ++ pos_T start, end; ++ ++ if (VIsual_active) ++ { ++ start = ltoreq(VIsual, curwin->w_cursor) ++ ? VIsual : curwin->w_cursor; ++ end = equalpos(start,VIsual) ? curwin->w_cursor : VIsual; ++ curwin->w_cursor = (dir == BACKWARD ? start : end); ++ } ++ #endif ++ # ifdef FEAT_CLIPBOARD ++ adjust_clip_reg(®name); ++ # endif + prep_redo_cmd(cap); +! +! do_put(regname, dir, cap->count1, PUT_FIXINDENT); +! #ifdef FEAT_VISUAL +! if (was_visual) +! { +! VIsual = start; +! curwin->w_cursor = end; +! if (dir == BACKWARD) +! { +! /* adjust lines */ +! VIsual.lnum += curbuf->b_ml.ml_line_count - line_count; +! curwin->w_cursor.lnum += +! curbuf->b_ml.ml_line_count - line_count; +! } +! +! VIsual_active = TRUE; +! if (VIsual_mode == 'V') +! { +! /* delete visually selected lines */ +! cap->cmdchar = 'd'; +! cap->nchar = NUL; +! cap->oap->regname = regname; +! nv_operator(cap); +! do_pending_operator(cap, 0, FALSE); +! } +! if (VIsual_active) +! { +! end_visual_mode(); +! redraw_later(SOME_VALID); +! } +! } +! #endif + } + } + +*** ../vim-7.4.198/src/version.c 2014-03-12 17:08:01.508807656 +0100 +--- src/version.c 2014-03-12 17:30:36.908828425 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 199, + /**/ + +-- +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/patches/source/vim/patches/7.4.200 b/patches/source/vim/patches/7.4.200 new file mode 100644 index 000000000..be3dfb38e --- /dev/null +++ b/patches/source/vim/patches/7.4.200 @@ -0,0 +1,68 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.200 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.200 +Problem: Too many #ifdefs in the code. +Solution: Enable FEAT_VISUAL always, await any complaints +Files: src/feature.h + + +*** ../vim-7.4.199/src/feature.h 2014-02-23 22:52:33.372764715 +0100 +--- src/feature.h 2014-03-12 17:48:24.396844782 +0100 +*************** +*** 211,228 **** + #endif + + /* +! * +visual Visual mode. + * +visualextra Extra features for Visual mode (mostly block operators). + */ +! #ifdef FEAT_SMALL +! # define FEAT_VISUAL +! # ifdef FEAT_NORMAL +! # define FEAT_VISUALEXTRA +! # endif +! #else +! # ifdef FEAT_CLIPBOARD +! # undef FEAT_CLIPBOARD /* can't use clipboard without Visual mode */ +! # endif + #endif + + /* +--- 211,222 ---- + #endif + + /* +! * +visual Visual mode - now always included. + * +visualextra Extra features for Visual mode (mostly block operators). + */ +! #define FEAT_VISUAL +! #ifdef FEAT_NORMAL +! # define FEAT_VISUALEXTRA + #endif + + /* +*** ../vim-7.4.199/src/version.c 2014-03-12 17:41:59.128838878 +0100 +--- src/version.c 2014-03-12 17:52:28.080848516 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 200, + /**/ + +-- +It is illegal to take more than three sips of beer at a time while standing. + [real standing law in Texas, 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/patches/source/vim/patches/7.4.201 b/patches/source/vim/patches/7.4.201 new file mode 100644 index 000000000..9bed2b5cf --- /dev/null +++ b/patches/source/vim/patches/7.4.201 @@ -0,0 +1,273 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.201 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.201 +Problem: 'lispwords' is a global option. +Solution: Make 'lispwords' global-local. (Sung Pae) +Files: runtime/doc/options.txt, runtime/optwin.vim, src/buffer.c, + src/misc1.c, src/option.c, src/option.h, src/structs.h, + src/testdir/test100.in, src/testdir/test100.ok + + +*** ../vim-7.4.200/runtime/doc/options.txt 2014-02-23 23:38:58.820760280 +0100 +--- runtime/doc/options.txt 2014-03-12 18:20:30.748874299 +0100 +*************** +*** 4629,4635 **** + + *'lispwords'* *'lw'* + 'lispwords' 'lw' string (default is very long) +! global + {not in Vi} + {not available when compiled without the |+lispindent| + feature} +--- 4629,4635 ---- + + *'lispwords'* *'lw'* + 'lispwords' 'lw' string (default is very long) +! global or local to buffer |global-local| + {not in Vi} + {not available when compiled without the |+lispindent| + feature} +*** ../vim-7.4.200/runtime/optwin.vim 2013-06-29 14:32:06.000000000 +0200 +--- runtime/optwin.vim 2014-03-12 18:20:30.748874299 +0100 +*************** +*** 855,861 **** + call append("$", "\t(local to buffer)") + call <SID>BinOptionL("lisp") + call append("$", "lispwords\twords that change how lisp indenting works") +! call <SID>OptionG("lw", &lw) + endif + + +--- 855,861 ---- + call append("$", "\t(local to buffer)") + call <SID>BinOptionL("lisp") + call append("$", "lispwords\twords that change how lisp indenting works") +! call <SID>OptionL("lw", &lw) + endif + + +*** ../vim-7.4.200/src/buffer.c 2014-01-10 16:43:09.000000000 +0100 +--- src/buffer.c 2014-03-12 18:20:30.752874299 +0100 +*************** +*** 1978,1983 **** +--- 1978,1986 ---- + #endif + buf->b_p_ar = -1; + buf->b_p_ul = NO_LOCAL_UNDOLEVEL; ++ #ifdef FEAT_LISP ++ clear_string_option(&buf->b_p_lw); ++ #endif + } + + /* +*** ../vim-7.4.200/src/misc1.c 2013-11-06 04:01:31.000000000 +0100 +--- src/misc1.c 2014-03-12 18:20:30.752874299 +0100 +*************** +*** 8879,8885 **** + { + char_u buf[LSIZE]; + int len; +! char_u *word = p_lispwords; + + while (*word != NUL) + { +--- 8879,8885 ---- + { + char_u buf[LSIZE]; + int len; +! char_u *word = *curbuf->b_p_lw != NUL ? curbuf->b_p_lw : p_lispwords; + + while (*word != NUL) + { +*** ../vim-7.4.200/src/option.c 2014-01-14 16:54:53.000000000 +0100 +--- src/option.c 2014-03-12 18:20:30.752874299 +0100 +*************** +*** 134,139 **** +--- 134,140 ---- + #define PV_KP OPT_BOTH(OPT_BUF(BV_KP)) + #ifdef FEAT_LISP + # define PV_LISP OPT_BUF(BV_LISP) ++ # define PV_LW OPT_BOTH(OPT_BUF(BV_LW)) + #endif + #define PV_MA OPT_BUF(BV_MA) + #define PV_ML OPT_BUF(BV_ML) +*************** +*** 1718,1724 **** + {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, + {"lispwords", "lw", P_STRING|P_VI_DEF|P_COMMA|P_NODUP, + #ifdef FEAT_LISP +! (char_u *)&p_lispwords, PV_NONE, + {(char_u *)LISPWORD_VALUE, (char_u *)0L} + #else + (char_u *)NULL, PV_NONE, +--- 1719,1725 ---- + {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, + {"lispwords", "lw", P_STRING|P_VI_DEF|P_COMMA|P_NODUP, + #ifdef FEAT_LISP +! (char_u *)&p_lispwords, PV_LW, + {(char_u *)LISPWORD_VALUE, (char_u *)0L} + #else + (char_u *)NULL, PV_NONE, +*************** +*** 5412,5417 **** +--- 5413,5421 ---- + check_string_option(&buf->b_p_dict); + check_string_option(&buf->b_p_tsr); + #endif ++ #ifdef FEAT_LISP ++ check_string_option(&buf->b_p_lw); ++ #endif + } + + /* +*************** +*** 9879,9884 **** +--- 9883,9893 ---- + case PV_UL: + buf->b_p_ul = NO_LOCAL_UNDOLEVEL; + break; ++ #ifdef FEAT_LISP ++ case PV_LW: ++ clear_string_option(&buf->b_p_lw); ++ break; ++ #endif + } + } + +*************** +*** 9928,9933 **** +--- 9937,9945 ---- + case PV_STL: return (char_u *)&(curwin->w_p_stl); + #endif + case PV_UL: return (char_u *)&(curbuf->b_p_ul); ++ #ifdef FEAT_LISP ++ case PV_LW: return (char_u *)&(curbuf->b_p_lw); ++ #endif + } + return NULL; /* "cannot happen" */ + } +*************** +*** 9994,9999 **** +--- 10006,10015 ---- + #endif + case PV_UL: return curbuf->b_p_ul != NO_LOCAL_UNDOLEVEL + ? (char_u *)&(curbuf->b_p_ul) : p->var; ++ #ifdef FEAT_LISP ++ case PV_LW: return *curbuf->b_p_lw != NUL ++ ? (char_u *)&(curbuf->b_p_lw) : p->var; ++ #endif + + #ifdef FEAT_ARABIC + case PV_ARAB: return (char_u *)&(curwin->w_p_arab); +*************** +*** 10567,10572 **** +--- 10583,10591 ---- + #ifdef FEAT_PERSISTENT_UNDO + buf->b_p_udf = p_udf; + #endif ++ #ifdef FEAT_LISP ++ buf->b_p_lw = empty_option; ++ #endif + + /* + * Don't copy the options set by ex_help(), use the saved values, +*** ../vim-7.4.200/src/option.h 2014-01-10 15:32:17.000000000 +0100 +--- src/option.h 2014-03-12 18:20:30.752874299 +0100 +*************** +*** 990,995 **** +--- 990,996 ---- + , BV_KP + #ifdef FEAT_LISP + , BV_LISP ++ , BV_LW + #endif + , BV_MA + , BV_ML +*** ../vim-7.4.200/src/structs.h 2014-02-23 22:52:33.372764715 +0100 +--- src/structs.h 2014-03-12 18:20:30.752874299 +0100 +*************** +*** 1641,1646 **** +--- 1641,1649 ---- + #ifdef FEAT_PERSISTENT_UNDO + int b_p_udf; /* 'undofile' */ + #endif ++ #ifdef FEAT_LISP ++ char_u *b_p_lw; /* 'lispwords' local value */ ++ #endif + + /* end of buffer options */ + +*** ../vim-7.4.200/src/testdir/test100.in 2013-11-07 03:25:51.000000000 +0100 +--- src/testdir/test100.in 2014-03-12 18:25:27.792878851 +0100 +*************** +*** 1,4 **** +! Tests for 'undolevel' setting being global-local + + STARTTEST + :so small.vim +--- 1,4 ---- +! Tests for 'undolevel' and 'lispwords' settings being global-local + + STARTTEST + :so small.vim +*************** +*** 37,42 **** +--- 37,50 ---- + :call UndoLevel() + :%w >> test.out + :"sleep 10 ++ :" ++ :" Testing 'lispwords' ++ :" ++ :setglobal lispwords=foo,bar,baz ++ :setlocal lispwords-=foo | setlocal lispwords+=quux ++ :redir >> test.out | echon "\nTesting 'lispwords' local value" | setglobal lispwords? | setlocal lispwords? | echo &lispwords . "\n" | redir end ++ :setlocal lispwords< ++ :redir >> test.out | echon "\nTesting 'lispwords' value reset" | setglobal lispwords? | setlocal lispwords? | echo &lispwords . "\n" | redir end + :qa! + ENDTEST + +*** ../vim-7.4.200/src/testdir/test100.ok 2013-11-07 03:25:51.000000000 +0100 +--- src/testdir/test100.ok 2014-03-12 18:25:27.792878851 +0100 +*************** +*** 39,41 **** +--- 39,51 ---- + + undolevels=50 global + undolevels=-123456 local ++ ++ Testing 'lispwords' local value ++ lispwords=foo,bar,baz ++ lispwords=bar,baz,quux ++ bar,baz,quux ++ ++ Testing 'lispwords' value reset ++ lispwords=foo,bar,baz ++ lispwords=foo,bar,baz ++ foo,bar,baz +*** ../vim-7.4.200/src/version.c 2014-03-12 17:56:42.960852421 +0100 +--- src/version.c 2014-03-12 18:19:13.720873119 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 201, + /**/ + +-- +Lawmakers made it obligatory for everybody to take at least one bath +each week -- on Saturday night. + [real standing law in Vermont, 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/patches/source/vim/patches/7.4.202 b/patches/source/vim/patches/7.4.202 new file mode 100644 index 000000000..5c50d8780 --- /dev/null +++ b/patches/source/vim/patches/7.4.202 @@ -0,0 +1,281 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.202 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.202 +Problem: MS-Windows: non-ASCII font names don't work. +Solution: Convert between the current code page and 'encoding'. (Ken Takata) +Files: src/gui_w48.c, src/os_mswin.c, src/proto/winclip.pro, + src/winclip.c + + +*** ../vim-7.4.201/src/gui_w48.c 2013-09-22 15:43:34.000000000 +0200 +--- src/gui_w48.c 2014-03-12 19:18:14.264927370 +0100 +*************** +*** 3069,3083 **** + char *p; + char *res; + char *charset_name; + + charset_name = charset_id2name((int)lf.lfCharSet); +! res = alloc((unsigned)(strlen(lf.lfFaceName) + 20 + + (charset_name == NULL ? 0 : strlen(charset_name) + 2))); + if (res != NULL) + { + p = res; + /* make a normal font string out of the lf thing:*/ +! sprintf((char *)p, "%s:h%d", lf.lfFaceName, pixels_to_points( + lf.lfHeight < 0 ? -lf.lfHeight : lf.lfHeight, TRUE)); + while (*p) + { +--- 3069,3094 ---- + char *p; + char *res; + char *charset_name; ++ char *font_name = lf.lfFaceName; + + charset_name = charset_id2name((int)lf.lfCharSet); +! #ifdef FEAT_MBYTE +! /* Convert a font name from the current codepage to 'encoding'. +! * TODO: Use Wide APIs (including LOGFONTW) instead of ANSI APIs. */ +! if (enc_codepage >= 0 && (int)GetACP() != enc_codepage) +! { +! int len; +! acp_to_enc(lf.lfFaceName, strlen(lf.lfFaceName), +! (char_u **)&font_name, &len); +! } +! #endif +! res = alloc((unsigned)(strlen(font_name) + 20 + + (charset_name == NULL ? 0 : strlen(charset_name) + 2))); + if (res != NULL) + { + p = res; + /* make a normal font string out of the lf thing:*/ +! sprintf((char *)p, "%s:h%d", font_name, pixels_to_points( + lf.lfHeight < 0 ? -lf.lfHeight : lf.lfHeight, TRUE)); + while (*p) + { +*************** +*** 3102,3107 **** +--- 3113,3122 ---- + } + } + ++ #ifdef FEAT_MBYTE ++ if (font_name != lf.lfFaceName) ++ vim_free(font_name); ++ #endif + return res; + } + +*** ../vim-7.4.201/src/os_mswin.c 2014-02-11 17:05:57.278217857 +0100 +--- src/os_mswin.c 2014-03-12 19:18:14.264927370 +0100 +*************** +*** 2867,2878 **** +--- 2867,2893 ---- + { + char_u *p; + int i; ++ int ret = FAIL; + static LOGFONT *lastlf = NULL; ++ #ifdef FEAT_MBYTE ++ char_u *acpname = NULL; ++ #endif + + *lf = s_lfDefault; + if (name == NULL) + return OK; + ++ #ifdef FEAT_MBYTE ++ /* Convert 'name' from 'encoding' to the current codepage, because ++ * lf->lfFaceName uses the current codepage. ++ * TODO: Use Wide APIs instead of ANSI APIs. */ ++ if (enc_codepage >= 0 && (int)GetACP() != enc_codepage) ++ { ++ int len; ++ enc_to_acp(name, strlen(name), &acpname, &len); ++ name = acpname; ++ } ++ #endif + if (STRCMP(name, "*") == 0) + { + #if defined(FEAT_GUI_W32) +*************** +*** 2887,2896 **** + cf.lpLogFont = lf; + cf.nFontType = 0 ; //REGULAR_FONTTYPE; + if (ChooseFont(&cf)) +! goto theend; +! #else +! return FAIL; + #endif + } + + /* +--- 2902,2910 ---- + cf.lpLogFont = lf; + cf.nFontType = 0 ; //REGULAR_FONTTYPE; + if (ChooseFont(&cf)) +! ret = OK; + #endif ++ goto theend; + } + + /* +*************** +*** 2899,2905 **** + for (p = name; *p && *p != ':'; p++) + { + if (p - name + 1 > LF_FACESIZE) +! return FAIL; /* Name too long */ + lf->lfFaceName[p - name] = *p; + } + if (p != name) +--- 2913,2919 ---- + for (p = name; *p && *p != ':'; p++) + { + if (p - name + 1 > LF_FACESIZE) +! goto theend; /* Name too long */ + lf->lfFaceName[p - name] = *p; + } + if (p != name) +*************** +*** 2927,2933 **** + did_replace = TRUE; + } + if (!did_replace || init_logfont(lf) == FAIL) +! return FAIL; + } + + while (*p == ':') +--- 2941,2947 ---- + did_replace = TRUE; + } + if (!did_replace || init_logfont(lf) == FAIL) +! goto theend; + } + + while (*p == ':') +*************** +*** 2988,3012 **** + p[-1], name); + EMSG(IObuff); + } +! return FAIL; + } + while (*p == ':') + p++; + } + +- #if defined(FEAT_GUI_W32) + theend: +- #endif + /* ron: init lastlf */ +! if (printer_dc == NULL) + { + vim_free(lastlf); + lastlf = (LOGFONT *)alloc(sizeof(LOGFONT)); + if (lastlf != NULL) + mch_memmove(lastlf, lf, sizeof(LOGFONT)); + } + +! return OK; + } + + #endif /* defined(FEAT_GUI) || defined(FEAT_PRINTER) */ +--- 3002,3028 ---- + p[-1], name); + EMSG(IObuff); + } +! goto theend; + } + while (*p == ':') + p++; + } ++ ret = OK; + + theend: + /* ron: init lastlf */ +! if (ret == OK && printer_dc == NULL) + { + vim_free(lastlf); + lastlf = (LOGFONT *)alloc(sizeof(LOGFONT)); + if (lastlf != NULL) + mch_memmove(lastlf, lf, sizeof(LOGFONT)); + } ++ #ifdef FEAT_MBYTE ++ vim_free(acpname); ++ #endif + +! return ret; + } + + #endif /* defined(FEAT_GUI) || defined(FEAT_PRINTER) */ +*** ../vim-7.4.201/src/proto/winclip.pro 2013-08-10 13:37:39.000000000 +0200 +--- src/proto/winclip.pro 2014-03-12 19:18:14.264927370 +0100 +*************** +*** 11,14 **** +--- 11,15 ---- + short_u *enc_to_utf16 __ARGS((char_u *str, int *lenp)); + char_u *utf16_to_enc __ARGS((short_u *str, int *lenp)); + void acp_to_enc __ARGS((char_u *str, int str_size, char_u **out, int *outlen)); ++ void enc_to_acp __ARGS((char_u *str, int str_size, char_u **out, int *outlen)); + /* vim: set ft=c : */ +*** ../vim-7.4.201/src/winclip.c 2013-07-01 21:05:53.000000000 +0200 +--- src/winclip.c 2014-03-12 19:18:14.264927370 +0100 +*************** +*** 797,800 **** +--- 797,825 ---- + vim_free(widestr); + } + } ++ ++ /* ++ * Convert from 'encoding' to the active codepage. ++ * Input is "str[str_size]". ++ * The result is in allocated memory: "out[outlen]". With terminating NUL. ++ */ ++ void ++ enc_to_acp(str, str_size, out, outlen) ++ char_u *str; ++ int str_size; ++ char_u **out; ++ int *outlen; ++ ++ { ++ LPWSTR widestr; ++ int len = str_size; ++ ++ widestr = (WCHAR *)enc_to_utf16(str, &len); ++ if (widestr != NULL) ++ { ++ WideCharToMultiByte_alloc(GetACP(), 0, widestr, len, ++ (LPSTR *)out, outlen, 0, 0); ++ vim_free(widestr); ++ } ++ } + #endif +*** ../vim-7.4.201/src/version.c 2014-03-12 18:55:52.104906804 +0100 +--- src/version.c 2014-03-12 19:19:01.388928092 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 202, + /**/ + +-- +<Beeth> Girls are like internet domain names, + the ones I like are already taken. +<honx> Well, you can stil get one from a strange country :-P + + /// 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/patches/source/vim/patches/7.4.203 b/patches/source/vim/patches/7.4.203 new file mode 100644 index 000000000..d5cb84ae2 --- /dev/null +++ b/patches/source/vim/patches/7.4.203 @@ -0,0 +1,203 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.203 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.203 +Problem: Parsing 'errorformat' is not correct. +Solution: Reset "multiignore" at the start of a multi-line message. (Lcd) +Files: src/quickfix.c, 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/testdir/test106.in, + src/testdir/test106.ok + + +*** ../vim-7.4.202/src/quickfix.c 2013-07-01 21:16:44.000000000 +0200 +--- src/quickfix.c 2014-03-12 19:35:22.016943118 +0100 +*************** +*** 751,757 **** +--- 751,760 ---- + fmt_start = fmt_ptr; + + if (vim_strchr((char_u *)"AEWI", idx) != NULL) ++ { + multiline = TRUE; /* start of a multi-line message */ ++ multiignore = FALSE; /* reset continuation */ ++ } + else if (vim_strchr((char_u *)"CZ", idx) != NULL) + { /* continuation of multi-line msg */ + if (qfprev == NULL) +*** ../vim-7.4.202/src/testdir/Make_amiga.mak 2014-02-23 23:38:58.808760280 +0100 +--- src/testdir/Make_amiga.mak 2014-03-12 19:32:32.192940516 +0100 +*************** +*** 35,41 **** + 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 \ +! test104.out test105.out + + .SUFFIXES: .in .out + +--- 35,41 ---- + 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 \ +! test104.out test105.out test106.out + + .SUFFIXES: .in .out + +*************** +*** 157,159 **** +--- 157,160 ---- + test103.out: test103.in + test104.out: test104.in + test105.out: test105.in ++ test106.out: test106.in +*** ../vim-7.4.202/src/testdir/Make_dos.mak 2014-02-23 23:38:58.808760280 +0100 +--- src/testdir/Make_dos.mak 2014-03-12 19:32:40.100940637 +0100 +*************** +*** 34,40 **** + 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 test104.out \ +! test105.out + + SCRIPTS32 = test50.out test70.out + +--- 34,40 ---- + 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 test104.out \ +! test105.out test106.out + + SCRIPTS32 = test50.out test70.out + +*** ../vim-7.4.202/src/testdir/Make_ming.mak 2014-02-23 23:38:58.812760280 +0100 +--- src/testdir/Make_ming.mak 2014-03-12 19:32:44.948940712 +0100 +*************** +*** 54,60 **** + 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 test104.out \ +! test105.out + + SCRIPTS32 = test50.out test70.out + +--- 54,60 ---- + 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 test104.out \ +! test105.out test106.out + + SCRIPTS32 = test50.out test70.out + +*** ../vim-7.4.202/src/testdir/Make_os2.mak 2014-02-23 23:38:58.812760280 +0100 +--- src/testdir/Make_os2.mak 2014-03-12 19:32:48.112940760 +0100 +*************** +*** 36,42 **** + 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 test104.out \ +! test105.out + + .SUFFIXES: .in .out + +--- 36,42 ---- + 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 test104.out \ +! test105.out test106.out + + .SUFFIXES: .in .out + +*** ../vim-7.4.202/src/testdir/Make_vms.mms 2014-03-12 16:51:35.060792541 +0100 +--- src/testdir/Make_vms.mms 2014-03-12 19:32:51.836940817 +0100 +*************** +*** 95,101 **** + test90.out test91.out test92.out test93.out test94.out \ + test95.out test96.out test98.out test99.out \ + test100.out test101.out test103.out test104.out \ +! test105.out + + # Known problems: + # test17: ? +--- 95,101 ---- + test90.out test91.out test92.out test93.out test94.out \ + test95.out test96.out test98.out test99.out \ + test100.out test101.out test103.out test104.out \ +! test105.out test106.out + + # Known problems: + # test17: ? +*** ../vim-7.4.202/src/testdir/Makefile 2014-03-12 15:50:18.472736205 +0100 +--- src/testdir/Makefile 2014-03-12 19:32:13.884940236 +0100 +*************** +*** 31,37 **** + 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 \ +! test104.out test105.out + + SCRIPTS_GUI = test16.out + +--- 31,37 ---- + 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 \ +! test104.out test105.out test106.out + + SCRIPTS_GUI = test16.out + +*** ../vim-7.4.202/src/testdir/test106.in 2014-03-12 19:40:59.584948291 +0100 +--- src/testdir/test106.in 2014-03-12 19:33:30.332941407 +0100 +*************** +*** 0 **** +--- 1,16 ---- ++ Tests for errorformat. vim: set ft=vim ts=8 : ++ ++ STARTTEST ++ :so small.vim ++ :if !has('quickfix') | e! test.ok | wq! test.out | endif ++ :set efm=%EEEE%m,%WWWW%m,%+CCCC%.%#,%-GGGG%.%# ++ :cgetexpr ['WWWW', 'EEEE', 'CCCC'] ++ :$put =strtrans(string(map(getqflist(), '[v:val.text, v:val.valid]'))) ++ :cgetexpr ['WWWW', 'GGGG', 'EEEE', 'CCCC'] ++ :$put =strtrans(string(map(getqflist(), '[v:val.text, v:val.valid]'))) ++ :cgetexpr ['WWWW', 'GGGG', 'ZZZZ', 'EEEE', 'CCCC', 'YYYY'] ++ :$put =strtrans(string(map(getqflist(), '[v:val.text, v:val.valid]'))) ++ :/^Results/,$wq! test.out ++ ENDTEST ++ ++ Results of test106: +*** ../vim-7.4.202/src/testdir/test106.ok 2014-03-12 19:40:59.592948291 +0100 +--- src/testdir/test106.ok 2014-03-12 19:33:50.496941716 +0100 +*************** +*** 0 **** +--- 1,4 ---- ++ Results of test106: ++ [['W', 1], ['E^@CCCC', 1]] ++ [['W', 1], ['E^@CCCC', 1]] ++ [['W', 1], ['ZZZZ', 0], ['E^@CCCC', 1], ['YYYY', 0]] +*** ../vim-7.4.202/src/version.c 2014-03-12 19:24:32.508933166 +0100 +--- src/version.c 2014-03-12 19:39:34.344946985 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 203, + /**/ + +-- +"I know that there are people who don't love their fellow man, +and I hate those people!" - Tom Lehrer + + /// 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/patches/source/vim/patches/7.4.204 b/patches/source/vim/patches/7.4.204 new file mode 100644 index 000000000..c6b491e0b --- /dev/null +++ b/patches/source/vim/patches/7.4.204 @@ -0,0 +1,113 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.204 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.204 +Problem: A mapping where the second byte is 0x80 doesn't work. +Solution: Unescape before checking for incomplete multi-byte char. (Nobuhiro + Takasaki) +Files: src/getchar.c, src/testdir/test75.in, src/testdir/test75.ok + + +*** ../vim-7.4.203/src/getchar.c 2014-02-15 16:17:02.213903042 +0100 +--- src/getchar.c 2014-03-12 20:06:17.944971557 +0100 +*************** +*** 2206,2215 **** + #ifdef FEAT_MBYTE + /* Don't allow mapping the first byte(s) of a + * multi-byte char. Happens when mapping +! * <M-a> and then changing 'encoding'. */ +! if (has_mbyte && MB_BYTE2LEN(c1) +! > (*mb_ptr2len)(mp->m_keys)) +! mlen = 0; + #endif + /* + * Check an entry whether it matches. +--- 2206,2221 ---- + #ifdef FEAT_MBYTE + /* Don't allow mapping the first byte(s) of a + * multi-byte char. Happens when mapping +! * <M-a> and then changing 'encoding'. Beware +! * that 0x80 is escaped. */ +! { +! char_u *p1 = mp->m_keys; +! char_u *p2 = mb_unescape(&p1); +! +! if (has_mbyte && p2 != NULL +! && MB_BYTE2LEN(c1) > MB_PTR2LEN(p2)) +! mlen = 0; +! } + #endif + /* + * Check an entry whether it matches. +*** ../vim-7.4.203/src/testdir/test75.in 2013-11-02 04:19:10.000000000 +0100 +--- src/testdir/test75.in 2014-03-12 20:02:45.932968308 +0100 +*************** +*** 1,8 **** +--- 1,11 ---- + Tests for maparg(). ++ Also test utf8 map with a 0x80 byte. + + STARTTEST + :so small.vim ++ :so mbyte.vim + :set cpo-=< ++ :set encoding=utf8 + :" Test maparg() with a string result + :map foo<C-V> is<F4>foo + :vnoremap <script> <buffer> <expr> <silent> bar isbar +*************** +*** 17,22 **** +--- 20,39 ---- + :map abc y<S-char-114>y + :call append('$', maparg('abc')) + :" ++ Go:" ++ :" Outside of the range, minimum ++ :inoremap <Char-0x1040> a ++ :call feedkeys("a\u1040\<Esc>") ++ :" Inside of the range, minimum ++ :inoremap <Char-0x103f> b ++ :call feedkeys("a\u103f\<Esc>") ++ :" Inside of the range, maximum ++ :inoremap <Char-0xf03f> c ++ :call feedkeys("a\uf03f\<Esc>") ++ :" Outside of the range, maximum ++ :inoremap <Char-0xf040> d ++ :call feedkeys("a\uf040\<Esc>") ++ :" + :/^eof/+1,$w! test.out + :qa! + ENDTEST +*** ../vim-7.4.203/src/testdir/test75.ok 2013-06-29 13:50:08.000000000 +0200 +--- src/testdir/test75.ok 2014-03-12 20:02:49.780968367 +0100 +*************** +*** 4,6 **** +--- 4,7 ---- + {'silent': 0, 'noremap': 0, 'lhs': 'foo', 'mode': ' ', 'nowait': 1, 'expr': 0, 'sid': 0, 'rhs': 'bar', 'buffer': 1} + xrx + yRy ++ abcd +*** ../vim-7.4.203/src/version.c 2014-03-12 19:41:37.100948866 +0100 +--- src/version.c 2014-03-12 20:06:43.684971951 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 204, + /**/ + +-- +If you only have a hammer, you tend to see every problem as a nail. +If you only have MS-Windows, you tend to solve every problem by rebooting. + + /// 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/patches/source/vim/patches/7.4.205 b/patches/source/vim/patches/7.4.205 new file mode 100644 index 000000000..1f4fcf4b9 --- /dev/null +++ b/patches/source/vim/patches/7.4.205 @@ -0,0 +1,113 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.205 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.205 +Problem: ":mksession" writes command to move to second argument while it + does not exist. When it does exist the order might be wrong. +Solution: Use ":argadd" for each argument instead of using ":args" with a + list of names. (Nobuhiro Takasaki) +Files: src/ex_docmd.c + + +*** ../vim-7.4.204/src/ex_docmd.c 2014-02-05 22:46:49.058587842 +0100 +--- src/ex_docmd.c 2014-03-12 21:08:35.361028825 +0100 +*************** +*** 10381,10387 **** + } + + /* the global argument list */ +! if (ses_arglist(fd, "args", &global_alist.al_ga, + !(ssop_flags & SSOP_CURDIR), &ssop_flags) == FAIL) + return FAIL; + +--- 10381,10387 ---- + } + + /* the global argument list */ +! if (ses_arglist(fd, "argglobal", &global_alist.al_ga, + !(ssop_flags & SSOP_CURDIR), &ssop_flags) == FAIL) + return FAIL; + +*************** +*** 10955,10963 **** + char_u *buf = NULL; + char_u *s; + +! if (gap->ga_len == 0) +! return put_line(fd, "silent! argdel *"); +! if (fputs(cmd, fd) < 0) + return FAIL; + for (i = 0; i < gap->ga_len; ++i) + { +--- 10955,10963 ---- + char_u *buf = NULL; + char_u *s; + +! if (fputs(cmd, fd) < 0 || put_eol(fd) == FAIL) +! return FAIL; +! if (put_line(fd, "silent! argdel *") == FAIL) + return FAIL; + for (i = 0; i < gap->ga_len; ++i) + { +*************** +*** 10974,10980 **** + s = buf; + } + } +! if (fputs(" ", fd) < 0 || ses_put_fname(fd, s, flagp) == FAIL) + { + vim_free(buf); + return FAIL; +--- 10974,10982 ---- + s = buf; + } + } +! if (fputs("argadd ", fd) < 0 +! || ses_put_fname(fd, s, flagp) == FAIL +! || put_eol(fd) == FAIL) + { + vim_free(buf); + return FAIL; +*************** +*** 10982,10988 **** + vim_free(buf); + } + } +! return put_eol(fd); + } + + /* +--- 10984,10990 ---- + vim_free(buf); + } + } +! return OK; + } + + /* +*** ../vim-7.4.204/src/version.c 2014-03-12 20:17:47.752982126 +0100 +--- src/version.c 2014-03-12 21:09:16.273029451 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 205, + /**/ + +-- +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/patches/source/vim/patches/7.4.206 b/patches/source/vim/patches/7.4.206 new file mode 100644 index 000000000..d251135aa --- /dev/null +++ b/patches/source/vim/patches/7.4.206 @@ -0,0 +1,72 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.206 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.206 +Problem: Compiler warnings on 64 bit Windows. +Solution: Add type casts. (Mike Williams) +Files: src/gui_w48.c, src/os_mswin.c + + +*** ../vim-7.4.205/src/gui_w48.c 2014-03-12 19:24:32.504933166 +0100 +--- src/gui_w48.c 2014-03-19 12:32:15.129821412 +0100 +*************** +*** 3078,3084 **** + if (enc_codepage >= 0 && (int)GetACP() != enc_codepage) + { + int len; +! acp_to_enc(lf.lfFaceName, strlen(lf.lfFaceName), + (char_u **)&font_name, &len); + } + #endif +--- 3078,3084 ---- + if (enc_codepage >= 0 && (int)GetACP() != enc_codepage) + { + int len; +! acp_to_enc(lf.lfFaceName, (int)strlen(lf.lfFaceName), + (char_u **)&font_name, &len); + } + #endif +*** ../vim-7.4.205/src/os_mswin.c 2014-03-12 19:24:32.504933166 +0100 +--- src/os_mswin.c 2014-03-19 12:32:15.129821412 +0100 +*************** +*** 2884,2890 **** + if (enc_codepage >= 0 && (int)GetACP() != enc_codepage) + { + int len; +! enc_to_acp(name, strlen(name), &acpname, &len); + name = acpname; + } + #endif +--- 2884,2890 ---- + if (enc_codepage >= 0 && (int)GetACP() != enc_codepage) + { + int len; +! enc_to_acp(name, (int)strlen(name), &acpname, &len); + name = acpname; + } + #endif +*** ../vim-7.4.205/src/version.c 2014-03-12 21:28:09.485046816 +0100 +--- src/version.c 2014-03-19 12:33:16.253822349 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 206, + /**/ + +-- +We apologise again for the fault in the subtitles. Those responsible for +sacking the people who have just been sacked have been sacked. + "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/patches/source/vim/patches/7.4.207 b/patches/source/vim/patches/7.4.207 new file mode 100644 index 000000000..895aa7284 --- /dev/null +++ b/patches/source/vim/patches/7.4.207 @@ -0,0 +1,176 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.207 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.207 +Problem: The cursor report sequence is sometimes not recognized and results + in entering replace mode. +Solution: Also check for the cursor report when not asked for. +Files: src/term.c + + +*** ../vim-7.4.206/src/term.c 2013-09-29 16:27:42.000000000 +0200 +--- src/term.c 2014-03-19 13:30:23.589874866 +0100 +*************** +*** 3379,3385 **** + out_str(buf); + out_str(T_U7); + u7_status = U7_SENT; +! term_windgoto(0, 0); + out_str((char_u *)" "); + term_windgoto(0, 0); + /* check for the characters now, otherwise they might be eaten by +--- 3379,3386 ---- + out_str(buf); + out_str(T_U7); + u7_status = U7_SENT; +! out_flush(); +! term_windgoto(1, 0); + out_str((char_u *)" "); + term_windgoto(0, 0); + /* check for the characters now, otherwise they might be eaten by +*************** +*** 4185,4208 **** + || (tp[0] == CSI && len >= 2)) + && (VIM_ISDIGIT(*p) || *p == '>' || *p == '?')) + { + j = 0; + extra = 0; + for (i = 2 + (tp[0] != CSI); i < len + && !(tp[i] >= '{' && tp[i] <= '~') + && !ASCII_ISALPHA(tp[i]); ++i) + if (tp[i] == ';' && ++j == 1) + extra = i + 1; + if (i == len) + { + LOG_TR("Not enough characters for CRV"); + return -1; + } +- + #ifdef FEAT_MBYTE +! /* Eat it when it has 2 arguments and ends in 'R'. Ignore it +! * when u7_status is not "sent", <S-F3> sends something +! * similar. */ +! if (j == 1 && tp[i] == 'R' && u7_status == U7_SENT) + { + char *aw = NULL; + +--- 4186,4223 ---- + || (tp[0] == CSI && len >= 2)) + && (VIM_ISDIGIT(*p) || *p == '>' || *p == '?')) + { ++ #ifdef FEAT_MBYTE ++ int col; ++ int row_char; ++ #endif + j = 0; + extra = 0; + for (i = 2 + (tp[0] != CSI); i < len + && !(tp[i] >= '{' && tp[i] <= '~') + && !ASCII_ISALPHA(tp[i]); ++i) + if (tp[i] == ';' && ++j == 1) ++ { + extra = i + 1; ++ #ifdef FEAT_MBYTE ++ row_char = tp[i - 1]; ++ #endif ++ } + if (i == len) + { + LOG_TR("Not enough characters for CRV"); + return -1; + } + #ifdef FEAT_MBYTE +! if (extra > 0) +! col = atoi((char *)tp + extra); +! else +! col = 0; +! +! /* Eat it when it has 2 arguments and ends in 'R'. Also when +! * u7_status is not "sent", it may be from a previous Vim that +! * just exited. But not for <S-F3>, it sends something +! * similar, check for row and column to make sense. */ +! if (j == 1 && tp[i] == 'R' && row_char == '2' && col >= 2) + { + char *aw = NULL; + +*************** +*** 4211,4228 **** + # ifdef FEAT_AUTOCMD + did_cursorhold = TRUE; + # endif +! if (extra > 0) +! extra = atoi((char *)tp + extra); +! if (extra == 2) + aw = "single"; +! else if (extra == 3) + aw = "double"; + if (aw != NULL && STRCMP(aw, p_ambw) != 0) + { + /* Setting the option causes a screen redraw. Do that + * right away if possible, keeping any messages. */ + set_option_value((char_u *)"ambw", 0L, (char_u *)aw, 0); +! #ifdef DEBUG_TERMRESPONSE + { + char buf[100]; + int r = redraw_asap(CLEAR); +--- 4226,4241 ---- + # ifdef FEAT_AUTOCMD + did_cursorhold = TRUE; + # endif +! if (col == 2) + aw = "single"; +! else if (col == 3) + aw = "double"; + if (aw != NULL && STRCMP(aw, p_ambw) != 0) + { + /* Setting the option causes a screen redraw. Do that + * right away if possible, keeping any messages. */ + set_option_value((char_u *)"ambw", 0L, (char_u *)aw, 0); +! # ifdef DEBUG_TERMRESPONSE + { + char buf[100]; + int r = redraw_asap(CLEAR); +*************** +*** 4231,4239 **** + r); + log_tr(buf); + } +! #else + redraw_asap(CLEAR); +! #endif + } + key_name[0] = (int)KS_EXTRA; + key_name[1] = (int)KE_IGNORE; +--- 4244,4252 ---- + r); + log_tr(buf); + } +! # else + redraw_asap(CLEAR); +! # endif + } + key_name[0] = (int)KS_EXTRA; + key_name[1] = (int)KE_IGNORE; +*** ../vim-7.4.206/src/version.c 2014-03-19 12:37:18.537826062 +0100 +--- src/version.c 2014-03-19 12:55:42.249842974 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 207, + /**/ + +-- +How come wrong numbers are never busy? + + /// 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/patches/source/vim/patches/7.4.208 b/patches/source/vim/patches/7.4.208 new file mode 100644 index 000000000..7ca0a4d02 --- /dev/null +++ b/patches/source/vim/patches/7.4.208 @@ -0,0 +1,36 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.208 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.208 +Problem: Mercurial picks up some files that are not distributed. +Solution: Add patterns to the ignore list. (Cade Forester) +Files: .hgignore + +Note: This patch was made empty, because .hgignore is not part of the +distributed files. + + +*** ../vim-7.4.207/src/version.c 2014-03-19 14:01:53.153903819 +0100 +--- src/version.c 2014-03-19 17:28:04.890093390 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 208, + /**/ + +-- +It might look like I'm doing nothing, but at the cellular level +I'm really quite busy. + + /// 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/patches/source/vim/patches/7.4.209 b/patches/source/vim/patches/7.4.209 new file mode 100644 index 000000000..9791716ec --- /dev/null +++ b/patches/source/vim/patches/7.4.209 @@ -0,0 +1,63 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.209 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.209 +Problem: When repeating a filter command "%" and "#" are expanded. +Solution: Escape the command when storing for redo. (Christian Brabandt) +Files: src/ex_cmds.c + + +*** ../vim-7.4.208/src/ex_cmds.c 2014-02-22 22:27:20.768904692 +0100 +--- src/ex_cmds.c 2014-03-19 17:40:01.138104365 +0100 +*************** +*** 1012,1018 **** + + if (bangredo) /* put cmd in redo buffer for ! command */ + { +! AppendToRedobuffLit(prevcmd, -1); + AppendToRedobuff((char_u *)"\n"); + bangredo = FALSE; + } +--- 1012,1029 ---- + + if (bangredo) /* put cmd in redo buffer for ! command */ + { +! /* If % or # appears in the command, it must have been escaped. +! * Reescape them, so that redoing them does not substitute them by the +! * buffername. */ +! char_u *cmd = vim_strsave_escaped(prevcmd, (char_u *)"%#"); +! +! if (cmd != NULL) +! { +! AppendToRedobuffLit(cmd, -1); +! vim_free(cmd); +! } +! else +! AppendToRedobuffLit(prevcmd, -1); + AppendToRedobuff((char_u *)"\n"); + bangredo = FALSE; + } +*** ../vim-7.4.208/src/version.c 2014-03-19 17:32:32.454097490 +0100 +--- src/version.c 2014-03-19 17:40:24.810104728 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 209, + /**/ + +-- +System administrators are just like women: You can't live with them and you +can't live without 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/patches/source/vim/patches/7.4.210 b/patches/source/vim/patches/7.4.210 new file mode 100644 index 000000000..a96431c7a --- /dev/null +++ b/patches/source/vim/patches/7.4.210 @@ -0,0 +1,133 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.210 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.210 +Problem: Visual block mode plus virtual edit doesn't work well with tabs. + (Liang Li) +Solution: Take coladd into account. (Christian Brabandt) +Files: src/ops.c, src/testdir/test39.in, src/testdir/test39.ok + + +*** ../vim-7.4.209/src/ops.c 2014-02-22 23:03:48.716901208 +0100 +--- src/ops.c 2014-03-19 18:33:54.118153904 +0100 +*************** +*** 2646,2652 **** + if (oap->start.lnum == curbuf->b_op_start_orig.lnum && !bd.is_MAX) + { + if (oap->op_type == OP_INSERT +! && oap->start.col != curbuf->b_op_start_orig.col) + { + oap->start.col = curbuf->b_op_start_orig.col; + pre_textlen -= getviscol2(oap->start.col, oap->start.coladd) +--- 2646,2660 ---- + if (oap->start.lnum == curbuf->b_op_start_orig.lnum && !bd.is_MAX) + { + if (oap->op_type == OP_INSERT +! && oap->start.col +! #ifdef FEAT_VIRTUALEDIT +! + oap->start.coladd +! #endif +! != curbuf->b_op_start_orig.col +! #ifdef FEAT_VIRTUALEDIT +! + curbuf->b_op_start_orig.coladd +! #endif +! ) + { + oap->start.col = curbuf->b_op_start_orig.col; + pre_textlen -= getviscol2(oap->start.col, oap->start.coladd) +*************** +*** 2654,2660 **** + oap->start_vcol = getviscol2(oap->start.col, oap->start.coladd); + } + else if (oap->op_type == OP_APPEND +! && oap->end.col >= curbuf->b_op_start_orig.col) + { + oap->start.col = curbuf->b_op_start_orig.col; + /* reset pre_textlen to the value of OP_INSERT */ +--- 2662,2676 ---- + oap->start_vcol = getviscol2(oap->start.col, oap->start.coladd); + } + else if (oap->op_type == OP_APPEND +! && oap->end.col +! #ifdef FEAT_VIRTUALEDIT +! + oap->end.coladd +! #endif +! >= curbuf->b_op_start_orig.col +! #ifdef FEAT_VIRTUALEDIT +! + curbuf->b_op_start_orig.coladd +! #endif +! ) + { + oap->start.col = curbuf->b_op_start_orig.col; + /* reset pre_textlen to the value of OP_INSERT */ +*** ../vim-7.4.209/src/testdir/test39.in 2014-01-14 13:18:53.000000000 +0100 +--- src/testdir/test39.in 2014-03-19 18:35:31.382155394 +0100 +*************** +*** 35,40 **** +--- 35,46 ---- + /^C23$/ + :exe ":norm! l\<C-V>j$hhAab\<Esc>" + :.,/^$/w >> test.out ++ :" Test for Visual block insert when virtualedit=all ++ :set ve=all ++ :/\t\tline ++ :exe ":norm! 07l\<C-V>jjIx\<Esc>" ++ :set ve= ++ :.,/^$/w >> test.out + :" gUe must uppercase a whole word, also when changes to SS + Gothe youtueuu endYpk0wgUe + :" gUfx must uppercase until x, inclusive. +*************** +*** 62,67 **** +--- 68,77 ---- + :qa! + ENDTEST + ++ line1 ++ line2 ++ line3 ++ + aaaaaa + bbbbbb + cccccc +*** ../vim-7.4.209/src/testdir/test39.ok 2014-01-14 13:18:53.000000000 +0100 +--- src/testdir/test39.ok 2014-03-19 18:34:18.206154273 +0100 +*************** +*** 17,22 **** +--- 17,26 ---- + C23ab + 456ab7 + ++ x line1 ++ x line2 ++ x line3 ++ + the YOUTUSSEUU end + - yOUSSTUSSEXu - + THE YOUTUSSEUU END +*** ../vim-7.4.209/src/version.c 2014-03-19 17:41:20.390105580 +0100 +--- src/version.c 2014-03-19 18:27:19.746147861 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 210, + /**/ + +-- +SUPERIMPOSE "England AD 787". After a few more seconds we hear hoofbeats in +the distance. They come slowly closer. Then out of the mist comes KING +ARTHUR followed by a SERVANT who is banging two half coconuts together. + "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/patches/source/vim/patches/7.4.211 b/patches/source/vim/patches/7.4.211 new file mode 100644 index 000000000..783855c74 --- /dev/null +++ b/patches/source/vim/patches/7.4.211 @@ -0,0 +1,68 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.211 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.211 +Problem: ":lu" is an abbreviation for ":lua", but it should be ":lunmap". + (ZyX) +Solution: Move "lunmap" to above "lua". +Files: src/ex_cmds.h + + +*** ../vim-7.4.210/src/ex_cmds.h 2013-11-09 05:30:18.000000000 +0100 +--- src/ex_cmds.h 2014-03-22 13:28:01.277844383 +0100 +*************** +*** 573,586 **** + RANGE|NOTADR|COUNT|TRLBAR|BANG), + EX(CMD_ltag, "ltag", ex_tag, + NOTADR|TRLBAR|BANG|WORD1), + EX(CMD_lua, "lua", ex_lua, + RANGE|EXTRA|NEEDARG|CMDWIN), + EX(CMD_luado, "luado", ex_luado, + RANGE|DFLALL|EXTRA|NEEDARG|CMDWIN), + EX(CMD_luafile, "luafile", ex_luafile, + RANGE|FILE1|NEEDARG|CMDWIN), +- EX(CMD_lunmap, "lunmap", ex_unmap, +- EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), + EX(CMD_lvimgrep, "lvimgrep", ex_vimgrep, + RANGE|NOTADR|BANG|NEEDARG|EXTRA|NOTRLCOM|TRLBAR|XFILE), + EX(CMD_lvimgrepadd, "lvimgrepadd", ex_vimgrep, +--- 573,586 ---- + RANGE|NOTADR|COUNT|TRLBAR|BANG), + EX(CMD_ltag, "ltag", ex_tag, + NOTADR|TRLBAR|BANG|WORD1), ++ EX(CMD_lunmap, "lunmap", ex_unmap, ++ EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), + EX(CMD_lua, "lua", ex_lua, + RANGE|EXTRA|NEEDARG|CMDWIN), + EX(CMD_luado, "luado", ex_luado, + RANGE|DFLALL|EXTRA|NEEDARG|CMDWIN), + EX(CMD_luafile, "luafile", ex_luafile, + RANGE|FILE1|NEEDARG|CMDWIN), + EX(CMD_lvimgrep, "lvimgrep", ex_vimgrep, + RANGE|NOTADR|BANG|NEEDARG|EXTRA|NOTRLCOM|TRLBAR|XFILE), + EX(CMD_lvimgrepadd, "lvimgrepadd", ex_vimgrep, +*** ../vim-7.4.210/src/version.c 2014-03-19 18:57:27.730175565 +0100 +--- src/version.c 2014-03-22 13:28:47.421845090 +0100 +*************** +*** 740,741 **** +--- 740,743 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 211, + /**/ + +-- +"I've been teaching myself to play the piano for about 5 years and now write +most of my songs on it, mainly because I can never find any paper." + Jeff Lynne, ELO's greatest hits + + /// 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/patches/source/vim/patches/7.4.212 b/patches/source/vim/patches/7.4.212 new file mode 100644 index 000000000..6bc98eb38 --- /dev/null +++ b/patches/source/vim/patches/7.4.212 @@ -0,0 +1,5720 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.212 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.212 (after 7.4.200) +Problem: Now that the +visual feature is always enabled the #ifdefs for it + are not useful. +Solution: Remove the checks for FEAT_VISUAL. +Files: src/buffer.c, src/charset.c, src/edit.c, src/eval.c, + src/ex_cmds.c, src/ex_docmd.c, src/fold.c, src/getchar.c, + src/gui.c, src/gui_mac.c, src/gui_w48.c, src/main.c, src/mark.c, + src/menu.c, src/misc2.c, src/move.c, src/netbeans.c, src/normal.c, + src/ops.c, src/option.c, src/os_msdos.c, src/os_qnx.c, + src/quickfix.c, src/regexp.c, src/regexp_nfa.c, src/screen.c, + src/search.c, src/spell.c, src/syntax.c, src/term.c, src/ui.c, + src/undo.c, src/version.c, src/window.c, src/feature.h, + src/globals.h, src/option.h, src/os_win32.h, src/structs.h + + +*** ../vim-7.4.211/src/buffer.c 2014-03-12 18:55:52.100906804 +0100 +--- src/buffer.c 2014-03-23 13:01:39.843144050 +0100 +*************** +*** 1432,1441 **** + curwin->w_alt_fnum = curbuf->b_fnum; /* remember alternate file */ + buflist_altfpos(curwin); /* remember curpos */ + +- #ifdef FEAT_VISUAL + /* Don't restart Select mode after switching to another buffer. */ + VIsual_reselect = FALSE; +- #endif + + /* close_windows() or apply_autocmds() may change curbuf */ + prevbuf = curbuf; +--- 1432,1439 ---- +*** ../vim-7.4.211/src/charset.c 2013-02-06 16:20:01.000000000 +0100 +--- src/charset.c 2014-03-23 13:02:19.467144657 +0100 +*************** +*** 1380,1389 **** + && (State & NORMAL) + && !wp->w_p_list + && !virtual_active() +! #ifdef FEAT_VISUAL +! && !(VIsual_active +! && (*p_sel == 'e' || ltoreq(*pos, VIsual))) +! #endif + ) + *cursor = vcol + incr - 1; /* cursor at end */ + else +--- 1380,1386 ---- + && (State & NORMAL) + && !wp->w_p_list + && !virtual_active() +! && !(VIsual_active && (*p_sel == 'e' || ltoreq(*pos, VIsual))) + ) + *cursor = vcol + incr - 1; /* cursor at end */ + else +*************** +*** 1463,1469 **** + } + #endif + +- #if defined(FEAT_VISUAL) || defined(PROTO) + /* + * Get the leftmost and rightmost virtual column of pos1 and pos2. + * Used for Visual block mode. +--- 1460,1465 ---- +*************** +*** 1500,1506 **** + else + *right = to1; + } +- #endif + + /* + * skipwhite: skip over ' ' and '\t'. +--- 1496,1501 ---- +*** ../vim-7.4.211/src/edit.c 2014-02-22 23:03:48.712901208 +0100 +--- src/edit.c 2014-03-23 13:03:11.951145462 +0100 +*************** +*** 220,228 **** + #ifdef FEAT_RIGHTLEFT + static void ins_ctrl_ __ARGS((void)); + #endif +- #ifdef FEAT_VISUAL + static int ins_start_select __ARGS((int c)); +- #endif + static void ins_insert __ARGS((int replaceState)); + static void ins_ctrl_o __ARGS((void)); + static void ins_shift __ARGS((int c, int lastc)); +--- 220,226 ---- +*************** +*** 932,938 **** + } + #endif + +- #ifdef FEAT_VISUAL + /* + * If 'keymodel' contains "startsel", may start selection. If it + * does, a CTRL-O and c will be stuffed, we need to get these +--- 930,935 ---- +*************** +*** 940,946 **** + */ + if (ins_start_select(c)) + continue; +- #endif + + /* + * The big switch to handle a character in insert mode. +--- 937,942 ---- +*************** +*** 6900,6906 **** + else if (cc != NUL) + ++curwin->w_cursor.col; /* put cursor back on the NUL */ + +- #ifdef FEAT_VISUAL + /* <C-S-Right> may have started Visual mode, adjust the position for + * deleted characters. */ + if (VIsual_active && VIsual.lnum == curwin->w_cursor.lnum) +--- 6896,6901 ---- +*************** +*** 6910,6921 **** + if (VIsual.col > len) + { + VIsual.col = len; +! # ifdef FEAT_VIRTUALEDIT + VIsual.coladd = 0; +! # endif + } + } +- #endif + } + } + did_ai = FALSE; +--- 6905,6915 ---- + if (VIsual.col > len) + { + VIsual.col = len; +! #ifdef FEAT_VIRTUALEDIT + VIsual.coladd = 0; +! #endif + } + } + } + } + did_ai = FALSE; +*************** +*** 8112,8120 **** + int need_redraw = FALSE; + int regname; + int literally = 0; +- #ifdef FEAT_VISUAL + int vis_active = VIsual_active; +- #endif + + /* + * If we are going to wait for a character, show a '"'. +--- 8106,8112 ---- +*************** +*** 8218,8228 **** + if (need_redraw || stuff_empty()) + edit_unputchar(); + +- #ifdef FEAT_VISUAL + /* Disallow starting Visual mode here, would get a weird mode. */ + if (!vis_active && VIsual_active) + end_visual_mode(); +- #endif + } + + /* +--- 8210,8218 ---- +*************** +*** 8419,8429 **** + #endif + ) + && (restart_edit == NUL +! || (gchar_cursor() == NUL +! #ifdef FEAT_VISUAL +! && !VIsual_active +! #endif +! )) + #ifdef FEAT_RIGHTLEFT + && !revins_on + #endif +--- 8409,8415 ---- + #endif + ) + && (restart_edit == NUL +! || (gchar_cursor() == NUL && !VIsual_active)) + #ifdef FEAT_RIGHTLEFT + && !revins_on + #endif +*************** +*** 8525,8531 **** + } + #endif + +- #ifdef FEAT_VISUAL + /* + * If 'keymodel' contains "startsel", may start selection. + * Returns TRUE when a CTRL-O and other keys stuffed. +--- 8511,8516 ---- +*************** +*** 8581,8587 **** + } + return FALSE; + } +- #endif + + /* + * <Insert> key in Insert mode: toggle insert/replace mode. +--- 8566,8571 ---- +*** ../vim-7.4.211/src/eval.c 2014-02-24 03:31:55.816738026 +0100 +--- src/eval.c 2014-03-23 13:03:56.419146143 +0100 +*************** +*** 11833,11844 **** + { + case MLINE: buf[0] = 'V'; break; + case MCHAR: buf[0] = 'v'; break; +- #ifdef FEAT_VISUAL + case MBLOCK: + buf[0] = Ctrl_V; + sprintf((char *)buf + 1, "%ld", reglen + 1); + break; +- #endif + } + rettv->v_type = VAR_STRING; + rettv->vval.v_string = vim_strsave(buf); +--- 11833,11842 ---- +*************** +*** 12552,12560 **** + #ifdef FEAT_VIRTUALEDIT + "virtualedit", + #endif +- #ifdef FEAT_VISUAL + "visual", +- #endif + #ifdef FEAT_VISUALEXTRA + "visualextra", + #endif +--- 12550,12556 ---- +*************** +*** 14397,14403 **** + buf[1] = NUL; + buf[2] = NUL; + +- #ifdef FEAT_VISUAL + if (VIsual_active) + { + if (VIsual_select) +--- 14393,14398 ---- +*************** +*** 14405,14413 **** + else + buf[0] = VIsual_mode; + } +! else +! #endif +! if (State == HITRETURN || State == ASKMORE || State == SETWSIZE + || State == CONFIRM) + { + buf[0] = 'r'; +--- 14400,14406 ---- + else + buf[0] = VIsual_mode; + } +! else if (State == HITRETURN || State == ASKMORE || State == SETWSIZE + || State == CONFIRM) + { + buf[0] = 'r'; +*************** +*** 16756,16762 **** + case 'V': case 'l': /* line-wise selection */ + yank_type = MLINE; + break; +- #ifdef FEAT_VISUAL + case 'b': case Ctrl_V: /* block-wise selection */ + yank_type = MBLOCK; + if (VIM_ISDIGIT(stropt[1])) +--- 16749,16754 ---- +*************** +*** 16766,16772 **** + --stropt; + } + break; +- #endif + } + } + +--- 16758,16763 ---- +*************** +*** 18769,18775 **** + typval_T *argvars UNUSED; + typval_T *rettv UNUSED; + { +- #ifdef FEAT_VISUAL + char_u str[2]; + + rettv->v_type = VAR_STRING; +--- 18760,18765 ---- +*************** +*** 18780,18786 **** + /* A non-zero number or non-empty string argument: reset mode. */ + if (non_zero_arg(&argvars[0])) + curbuf->b_visual_mode_eval = NUL; +- #endif + } + + /* +--- 18770,18775 ---- +*************** +*** 19154,19167 **** + return NULL; + if (name[0] == '.') /* cursor */ + return &curwin->w_cursor; +- #ifdef FEAT_VISUAL + if (name[0] == 'v' && name[1] == NUL) /* Visual start */ + { + if (VIsual_active) + return &VIsual; + return &curwin->w_cursor; + } +- #endif + if (name[0] == '\'') /* mark */ + { + pp = getmark_buf_fnum(curbuf, name[1], FALSE, fnum); +--- 19143,19154 ---- +*** ../vim-7.4.211/src/ex_cmds.c 2014-03-19 17:41:20.390105580 +0100 +--- src/ex_cmds.c 2014-03-23 13:04:09.359146341 +0100 +*************** +*** 3274,3286 **** + goto theend; + } + +- #ifdef FEAT_VISUAL + /* + * End Visual mode before switching to another buffer, so the text can be + * copied into the GUI selection buffer. + */ + reset_VIsual(); +- #endif + + #ifdef FEAT_AUTOCMD + if ((command != NULL || newlnum > (linenr_T)0) +--- 3274,3284 ---- +*** ../vim-7.4.211/src/ex_docmd.c 2014-03-12 21:28:09.481046816 +0100 +--- src/ex_docmd.c 2014-03-23 13:04:47.975146933 +0100 +*************** +*** 8577,8586 **** + beginline(BL_SOL | BL_FIX); + } + +- #if defined(FEAT_VISUAL) + if (VIsual_active) + end_visual_mode(); +- #endif + + switch (eap->cmdidx) + { +--- 8577,8584 ---- +*************** +*** 8991,9001 **** + RedrawingDisabled = 0; + p_lz = FALSE; + update_topline(); +! update_screen(eap->forceit ? CLEAR : +! #ifdef FEAT_VISUAL +! VIsual_active ? INVERTED : +! #endif +! 0); + #ifdef FEAT_TITLE + if (need_maketitle) + maketitle(); +--- 8989,8995 ---- + RedrawingDisabled = 0; + p_lz = FALSE; + update_topline(); +! update_screen(eap->forceit ? CLEAR : VIsual_active ? INVERTED : 0); + #ifdef FEAT_TITLE + if (need_maketitle) + maketitle(); +*************** +*** 9030,9040 **** + status_redraw_all(); + else + status_redraw_curbuf(); +! update_screen( +! # ifdef FEAT_VISUAL +! VIsual_active ? INVERTED : +! # endif +! 0); + RedrawingDisabled = r; + p_lz = p; + out_flush(); +--- 9024,9030 ---- + status_redraw_all(); + else + status_redraw_curbuf(); +! update_screen(VIsual_active ? INVERTED : 0); + RedrawingDisabled = r; + p_lz = p; + out_flush(); +*** ../vim-7.4.211/src/fold.c 2013-11-05 07:12:59.000000000 +0100 +--- src/fold.c 2014-03-23 13:05:14.775147344 +0100 +*************** +*** 430,440 **** + } + if (done == DONE_NOTHING) + EMSG(_(e_nofold)); +- #ifdef FEAT_VISUAL + /* Force a redraw to remove the Visual highlighting. */ + if (had_visual) + redraw_curbuf_later(INVERTED); +- #endif + } + + /* openFold() {{{2 */ +--- 430,438 ---- +*************** +*** 807,817 **** + if (!did_one) + { + EMSG(_(e_nofold)); +- #ifdef FEAT_VISUAL + /* Force a redraw to remove the Visual highlighting. */ + if (had_visual) + redraw_curbuf_later(INVERTED); +- #endif + } + else + /* Deleting markers may make cursor column invalid. */ +--- 805,813 ---- +*************** +*** 1065,1071 **** + } + + /* foldAdjustVisual() {{{2 */ +- #ifdef FEAT_VISUAL + /* + * Adjust the Visual area to include any fold at the start or end completely. + */ +--- 1061,1066 ---- +*************** +*** 1103,1109 **** + #endif + } + } +- #endif + + /* cursor_foldstart() {{{2 */ + /* +--- 1098,1103 ---- +*** ../vim-7.4.211/src/getchar.c 2014-03-12 20:17:47.748982126 +0100 +--- src/getchar.c 2014-03-23 13:05:45.383147813 +0100 +*************** +*** 870,876 **** + c = read_redo(FALSE, old_redo); + } + +- #ifdef FEAT_VISUAL + if (c == 'v') /* redo Visual */ + { + VIsual = curwin->w_cursor; +--- 870,875 ---- +*************** +*** 880,886 **** + redo_VIsual_busy = TRUE; + c = read_redo(FALSE, old_redo); + } +- #endif + + /* try to enter the count (in place of a previous count) */ + if (count) +--- 879,884 ---- +*************** +*** 1162,1168 **** + return typebuf.tb_maplen == 0; + } + +- #if defined(FEAT_VISUAL) || defined(PROTO) + /* + * Return the number of characters that are mapped (or not typed). + */ +--- 1160,1165 ---- +*************** +*** 1171,1177 **** + { + return typebuf.tb_maplen; + } +- #endif + + /* + * remove "len" characters from typebuf.tb_buf[typebuf.tb_off + offset] +--- 1168,1173 ---- +*************** +*** 2443,2449 **** + idx = get_menu_index(current_menu, local_State); + if (idx != MENU_INDEX_INVALID) + { +- # ifdef FEAT_VISUAL + /* + * In Select mode and a Visual mode menu + * is used: Switch to Visual mode +--- 2439,2444 ---- +*************** +*** 2457,2463 **** + (void)ins_typebuf(K_SELECT_STRING, + REMAP_NONE, 0, TRUE, FALSE); + } +- # endif + ins_typebuf(current_menu->strings[idx], + current_menu->noremap[idx], + 0, TRUE, +--- 2452,2457 ---- +*************** +*** 2516,2522 **** + break; + } + +- #ifdef FEAT_VISUAL + /* + * In Select mode and a Visual mode mapping is used: + * Switch to Visual mode temporarily. Append K_SELECT +--- 2510,2515 ---- +*************** +*** 2529,2535 **** + (void)ins_typebuf(K_SELECT_STRING, REMAP_NONE, + 0, TRUE, FALSE); + } +- #endif + + #ifdef FEAT_EVAL + /* Copy the values from *mp that are used, because +--- 2522,2527 ---- +*** ../vim-7.4.211/src/gui.c 2013-06-30 17:41:48.000000000 +0200 +--- src/gui.c 2014-03-23 13:05:57.623148000 +0100 +*************** +*** 3132,3142 **** + */ + if (!mouse_has(checkfor) || checkfor == MOUSE_COMMAND) + { +- #ifdef FEAT_VISUAL + /* Don't do modeless selection in Visual mode. */ + if (checkfor != MOUSE_NONEF && VIsual_active && (State & NORMAL)) + return; +- #endif + + /* + * When 'mousemodel' is "popup", shift-left is translated to right. +--- 3132,3140 ---- +*** ../vim-7.4.211/src/gui_mac.c 2013-05-06 04:06:04.000000000 +0200 +--- src/gui_mac.c 2014-03-23 13:06:30.143148498 +0100 +*************** +*** 1068,1078 **** + } + */ + +- +- #ifdef FEAT_VISUAL + reset_VIsual(); +- #endif +- + fnames = new_fnames_from_AEDesc(&theList, &numFiles, &error); + + if (error) +--- 1068,1074 ---- +*************** +*** 1142,1148 **** + + /* Update the screen display */ + update_screen(NOT_VALID); +! #ifdef FEAT_VISUAL + /* Select the text if possible */ + if (gotPosition) + { +--- 1138,1144 ---- + + /* Update the screen display */ + update_screen(NOT_VALID); +! + /* Select the text if possible */ + if (gotPosition) + { +*************** +*** 1160,1166 **** + VIsual.col = 0; + } + } +! #endif + setcursor(); + out_flush(); + +--- 1156,1162 ---- + VIsual.col = 0; + } + } +! + setcursor(); + out_flush(); + +*** ../vim-7.4.211/src/gui_w48.c 2014-03-19 12:37:18.537826062 +0100 +--- src/gui_w48.c 2014-03-23 13:06:44.959148725 +0100 +*************** +*** 3708,3716 **** + DragQueryPoint(hDrop, &pt); + MapWindowPoints(s_hwnd, s_textArea, &pt, 1); + +- # ifdef FEAT_VISUAL + reset_VIsual(); +- # endif + + fnames = (char_u **)alloc(cFiles * sizeof(char_u *)); + +--- 3708,3714 ---- +*** ../vim-7.4.211/src/main.c 2014-01-14 12:57:00.000000000 +0100 +--- src/main.c 2014-03-23 13:07:21.771149289 +0100 +*************** +*** 1057,1065 **** + if (!cmdwin && !noexmode && SETJMP(x_jump_env)) + { + State = NORMAL; +- # ifdef FEAT_VISUAL + VIsual_active = FALSE; +- # endif + got_int = TRUE; + need_wait_return = FALSE; + global_busy = FALSE; +--- 1057,1063 ---- +*************** +*** 1096,1106 **** + check_timestamps(FALSE); + if (need_wait_return) /* if wait_return still needed ... */ + wait_return(FALSE); /* ... call it now */ +! if (need_start_insertmode && goto_im() +! #ifdef FEAT_VISUAL +! && !VIsual_active +! #endif +! ) + { + need_start_insertmode = FALSE; + stuffReadbuff((char_u *)"i"); /* start insert mode next */ +--- 1094,1100 ---- + check_timestamps(FALSE); + if (need_wait_return) /* if wait_return still needed ... */ + wait_return(FALSE); /* ... call it now */ +! if (need_start_insertmode && goto_im() && !VIsual_active) + { + need_start_insertmode = FALSE; + stuffReadbuff((char_u *)"i"); /* start insert mode next */ +*************** +*** 1202,1208 **** + diff_need_scrollbind = FALSE; + } + #endif +! #if defined(FEAT_FOLDING) && defined(FEAT_VISUAL) + /* Include a closed fold completely in the Visual area. */ + foldAdjustVisual(); + #endif +--- 1196,1202 ---- + diff_need_scrollbind = FALSE; + } + #endif +! #if defined(FEAT_FOLDING) + /* Include a closed fold completely in the Visual area. */ + foldAdjustVisual(); + #endif +*************** +*** 1228,1239 **** + update_topline(); + validate_cursor(); + +- #ifdef FEAT_VISUAL + if (VIsual_active) + update_curbuf(INVERTED);/* update inverted part */ +! else +! #endif +! if (must_redraw) + update_screen(0); + else if (redraw_cmdline || clear_cmdline) + showmode(); +--- 1222,1230 ---- + update_topline(); + validate_cursor(); + + if (VIsual_active) + update_curbuf(INVERTED);/* update inverted part */ +! else if (must_redraw) + update_screen(0); + else if (redraw_cmdline || clear_cmdline) + showmode(); +*** ../vim-7.4.211/src/mark.c 2013-11-03 00:20:46.000000000 +0100 +--- src/mark.c 2014-03-23 13:08:03.011149921 +0100 +*************** +*** 98,104 **** + return OK; + } + +- #ifdef FEAT_VISUAL + if (c == '<' || c == '>') + { + if (c == '<') +--- 98,103 ---- +*************** +*** 110,116 **** + curbuf->b_visual.vi_mode = 'v'; + return OK; + } +- #endif + + #ifndef EBCDIC + if (c > 'z') /* some islower() and isupper() cannot handle +--- 109,114 ---- +*************** +*** 340,348 **** + int *fnum; + { + pos_T *posp; +- #ifdef FEAT_VISUAL + pos_T *startp, *endp; +- #endif + static pos_T pos_copy; + + posp = NULL; +--- 338,344 ---- +*************** +*** 403,409 **** + curwin->w_cursor = pos; + listcmd_busy = slcb; + } +- #ifdef FEAT_VISUAL + else if (c == '<' || c == '>') /* start/end of visual area */ + { + startp = &buf->b_visual.vi_start; +--- 399,404 ---- +*************** +*** 428,434 **** + #endif + } + } +- #endif + else if (ASCII_ISLOWER(c)) /* normal named mark */ + { + posp = &(buf->b_namedm[c - 'a']); +--- 423,428 ---- +*************** +*** 757,766 **** + show_one_mark(']', arg, &curbuf->b_op_end, NULL, TRUE); + show_one_mark('^', arg, &curbuf->b_last_insert, NULL, TRUE); + show_one_mark('.', arg, &curbuf->b_last_change, NULL, TRUE); +- #ifdef FEAT_VISUAL + show_one_mark('<', arg, &curbuf->b_visual.vi_start, NULL, TRUE); + show_one_mark('>', arg, &curbuf->b_visual.vi_end, NULL, TRUE); +- #endif + show_one_mark(-1, arg, NULL, NULL, FALSE); + } + +--- 751,758 ---- +*************** +*** 892,901 **** + case '.': curbuf->b_last_change.lnum = 0; break; + case '[': curbuf->b_op_start.lnum = 0; break; + case ']': curbuf->b_op_end.lnum = 0; break; +- #ifdef FEAT_VISUAL + case '<': curbuf->b_visual.vi_start.lnum = 0; break; + case '>': curbuf->b_visual.vi_end.lnum = 0; break; +- #endif + case ' ': break; + default: EMSG2(_(e_invarg2), p); + return; +--- 884,891 ---- +*************** +*** 1085,1095 **** + one_adjust_nodel(&(curbuf->b_changelist[i].lnum)); + #endif + +- #ifdef FEAT_VISUAL + /* Visual area */ + one_adjust_nodel(&(curbuf->b_visual.vi_start.lnum)); + one_adjust_nodel(&(curbuf->b_visual.vi_end.lnum)); +- #endif + + #ifdef FEAT_QUICKFIX + /* quickfix marks */ +--- 1075,1083 ---- +*************** +*** 1136,1149 **** + if (win->w_tagstack[i].fmark.fnum == fnum) + one_adjust_nodel(&(win->w_tagstack[i].fmark.mark.lnum)); + +- #ifdef FEAT_VISUAL + /* the displayed Visual area */ + if (win->w_old_cursor_lnum != 0) + { + one_adjust_nodel(&(win->w_old_cursor_lnum)); + one_adjust_nodel(&(win->w_old_visual_lnum)); + } +- #endif + + /* topline and cursor position for windows with the same buffer + * other than the current window */ +--- 1124,1135 ---- +*************** +*** 1260,1270 **** + col_adjust(&(curbuf->b_changelist[i])); + #endif + +- #ifdef FEAT_VISUAL + /* Visual area */ + col_adjust(&(curbuf->b_visual.vi_start)); + col_adjust(&(curbuf->b_visual.vi_end)); +- #endif + + /* previous context mark */ + col_adjust(&(curwin->w_pcmark)); +--- 1246,1254 ---- +*** ../vim-7.4.211/src/menu.c 2011-04-11 15:17:21.000000000 +0200 +--- src/menu.c 2014-03-23 13:08:19.091150168 +0100 +*************** +*** 1640,1646 **** + idx = MENU_INDEX_INSERT; + else if (state & CMDLINE) + idx = MENU_INDEX_CMDLINE; +- #ifdef FEAT_VISUAL + else if (VIsual_active) + { + if (VIsual_select) +--- 1640,1645 ---- +*************** +*** 1648,1654 **** + else + idx = MENU_INDEX_VISUAL; + } +- #endif + else if (state == HITRETURN || state == ASKMORE) + idx = MENU_INDEX_CMDLINE; + else if (finish_op) +--- 1647,1652 ---- +*************** +*** 1811,1824 **** + static int + get_menu_mode() + { +- #ifdef FEAT_VISUAL + if (VIsual_active) + { + if (VIsual_select) + return MENU_INDEX_SELECT; + return MENU_INDEX_VISUAL; + } +- #endif + if (State & INSERT) + return MENU_INDEX_INSERT; + if ((State & CMDLINE) || State == ASKMORE || State == HITRETURN) +--- 1809,1820 ---- +*** ../vim-7.4.211/src/misc2.c 2014-02-23 23:38:58.824760280 +0100 +--- src/misc2.c 2014-03-23 13:08:56.927150748 +0100 +*************** +*** 31,39 **** + if (virtual_op != MAYBE) + return virtual_op; + return (ve_flags == VE_ALL +- # ifdef FEAT_VISUAL + || ((ve_flags & VE_BLOCK) && VIsual_active && VIsual_mode == Ctrl_V) +- # endif + || ((ve_flags & VE_INSERT) && (State & INSERT))); + } + +--- 31,37 ---- +*************** +*** 149,157 **** + + one_more = (State & INSERT) + || restart_edit != NUL +- #ifdef FEAT_VISUAL + || (VIsual_active && *p_sel != 'o') +- #endif + #ifdef FEAT_VIRTUALEDIT + || ((ve_flags & VE_ONEMORE) && wcol < MAXCOL) + #endif +--- 147,153 ---- +*************** +*** 570,578 **** + * - in Visual mode and 'selection' isn't "old" + * - 'virtualedit' is set */ + if ((State & INSERT) || restart_edit +- #ifdef FEAT_VISUAL + || (VIsual_active && *p_sel != 'o') +- #endif + #ifdef FEAT_VIRTUALEDIT + || (ve_flags & VE_ONEMORE) + #endif +--- 566,572 ---- +*************** +*** 627,635 **** + adjust_cursor_col() + { + if (curwin->w_cursor.col > 0 +- # ifdef FEAT_VISUAL + && (!VIsual_active || *p_sel == 'o') +- # endif + && gchar_cursor() == NUL) + --curwin->w_cursor.col; + } +--- 621,627 ---- +*************** +*** 3290,3306 **** + { + if (State & NORMAL) + { +- #ifdef FEAT_VISUAL + if (VIsual_active) + { + if (VIsual_select) + return SELECTMODE; + return VISUAL; + } +! else +! #endif +! if (finish_op) +! return OP_PENDING; + } + return State; + } +--- 3282,3295 ---- + { + if (State & NORMAL) + { + if (VIsual_active) + { + if (VIsual_select) + return SELECTMODE; + return VISUAL; + } +! else if (finish_op) +! return OP_PENDING; + } + return State; + } +*************** +*** 3738,3744 **** + } + if (finish_op) + return SHAPE_IDX_O; +- #ifdef FEAT_VISUAL + if (VIsual_active) + { + if (*p_sel == 'e') +--- 3727,3732 ---- +*************** +*** 3746,3752 **** + else + return SHAPE_IDX_V; + } +- #endif + return SHAPE_IDX_N; + } + #endif +--- 3734,3739 ---- +*** ../vim-7.4.211/src/move.c 2014-02-11 18:58:05.102320947 +0100 +--- src/move.c 2014-03-23 13:09:16.535151048 +0100 +*************** +*** 2857,2873 **** + win_T *old_curwin = curwin; + buf_T *old_curbuf = curbuf; + int restart_edit_save; +- # ifdef FEAT_VISUAL + int old_VIsual_select = VIsual_select; + int old_VIsual_active = VIsual_active; +- # endif + + /* + * loop through the cursorbound windows + */ +- # ifdef FEAT_VISUAL + VIsual_select = VIsual_active = 0; +- # endif + for (curwin = firstwin; curwin; curwin = curwin->w_next) + { + curbuf = curwin->w_buffer; +--- 2857,2869 ---- +*************** +*** 2916,2925 **** + /* + * reset current-window + */ +- # ifdef FEAT_VISUAL + VIsual_select = old_VIsual_select; + VIsual_active = old_VIsual_active; +- # endif + curwin = old_curwin; + curbuf = old_curbuf; + } +--- 2912,2919 ---- +*** ../vim-7.4.211/src/netbeans.c 2012-06-20 19:56:18.000000000 +0200 +--- src/netbeans.c 2014-03-23 13:09:29.163151241 +0100 +*************** +*** 2232,2242 **** + + nb_set_curbuf(buf->bufp); + +- #ifdef FEAT_VISUAL + /* Don't want Visual mode now. */ + if (VIsual_active) + end_visual_mode(); +- #endif + #ifdef NBDEBUG + s = args; + #endif +--- 2232,2240 ---- +*** ../vim-7.4.211/src/normal.c 2014-03-12 17:41:59.128838878 +0100 +--- src/normal.c 2014-03-23 15:07:40.435259900 +0100 +*************** +*** 14,20 **** + + #include "vim.h" + +- #ifdef FEAT_VISUAL + /* + * The Visual area is remembered for reselection. + */ +--- 14,19 ---- +*************** +*** 24,30 **** + static int VIsual_mode_orig = NUL; /* saved Visual mode */ + + static int restart_VIsual_select = 0; +- #endif + + #ifdef FEAT_EVAL + static void set_vcount_ca __ARGS((cmdarg_T *cap, int *set_prevcount)); +--- 23,28 ---- +*************** +*** 37,43 **** + static int find_command __ARGS((int cmdchar)); + static void op_colon __ARGS((oparg_T *oap)); + static void op_function __ARGS((oparg_T *oap)); +! #if defined(FEAT_MOUSE) && defined(FEAT_VISUAL) + static void find_start_of_word __ARGS((pos_T *)); + static void find_end_of_word __ARGS((pos_T *)); + static int get_mouse_class __ARGS((char_u *p)); +--- 35,41 ---- + static int find_command __ARGS((int cmdchar)); + static void op_colon __ARGS((oparg_T *oap)); + static void op_function __ARGS((oparg_T *oap)); +! #if defined(FEAT_MOUSE) + static void find_start_of_word __ARGS((pos_T *)); + static void find_end_of_word __ARGS((pos_T *)); + static int get_mouse_class __ARGS((char_u *p)); +*************** +*** 48,56 **** + static int checkclearopq __ARGS((oparg_T *oap)); + static void clearop __ARGS((oparg_T *oap)); + static void clearopbeep __ARGS((oparg_T *oap)); +- #ifdef FEAT_VISUAL + static void unshift_special __ARGS((cmdarg_T *cap)); +- #endif + #ifdef FEAT_CMDL_INFO + static void del_from_showcmd __ARGS((int)); + #endif +--- 46,52 ---- +*************** +*** 117,141 **** + #ifdef FEAT_VREPLACE + static void nv_vreplace __ARGS((cmdarg_T *cap)); + #endif +- #ifdef FEAT_VISUAL + static void v_swap_corners __ARGS((int cmdchar)); +- #endif + static void nv_replace __ARGS((cmdarg_T *cap)); + static void n_swapchar __ARGS((cmdarg_T *cap)); + static void nv_cursormark __ARGS((cmdarg_T *cap, int flag, pos_T *pos)); +- #ifdef FEAT_VISUAL + static void v_visop __ARGS((cmdarg_T *cap)); +- #endif + static void nv_subst __ARGS((cmdarg_T *cap)); + static void nv_abbrev __ARGS((cmdarg_T *cap)); + static void nv_optrans __ARGS((cmdarg_T *cap)); + static void nv_gomark __ARGS((cmdarg_T *cap)); + static void nv_pcmark __ARGS((cmdarg_T *cap)); + static void nv_regname __ARGS((cmdarg_T *cap)); +- #ifdef FEAT_VISUAL + static void nv_visual __ARGS((cmdarg_T *cap)); + static void n_start_visual_mode __ARGS((int c)); +- #endif + static void nv_window __ARGS((cmdarg_T *cap)); + static void nv_suspend __ARGS((cmdarg_T *cap)); + static void nv_g_cmd __ARGS((cmdarg_T *cap)); +--- 113,131 ---- +*************** +*** 155,165 **** + static void nv_wordcmd __ARGS((cmdarg_T *cap)); + static void nv_beginline __ARGS((cmdarg_T *cap)); + static void adjust_cursor __ARGS((oparg_T *oap)); +- #ifdef FEAT_VISUAL + static void adjust_for_sel __ARGS((cmdarg_T *cap)); + static int unadjust_for_sel __ARGS((void)); + static void nv_select __ARGS((cmdarg_T *cap)); +- #endif + static void nv_goto __ARGS((cmdarg_T *cap)); + static void nv_normal __ARGS((cmdarg_T *cap)); + static void nv_esc __ARGS((cmdarg_T *oap)); +--- 145,153 ---- +*************** +*** 248,271 **** + {Ctrl_N, nv_down, NV_STS, FALSE}, + {Ctrl_O, nv_ctrlo, 0, 0}, + {Ctrl_P, nv_up, NV_STS, FALSE}, +- #ifdef FEAT_VISUAL + {Ctrl_Q, nv_visual, 0, FALSE}, +- #else +- {Ctrl_Q, nv_ignore, 0, 0}, +- #endif + {Ctrl_R, nv_redo, 0, 0}, + {Ctrl_S, nv_ignore, 0, 0}, + {Ctrl_T, nv_tagpop, NV_NCW, 0}, + {Ctrl_U, nv_halfpage, 0, 0}, +- #ifdef FEAT_VISUAL + {Ctrl_V, nv_visual, 0, FALSE}, + {'V', nv_visual, 0, FALSE}, + {'v', nv_visual, 0, FALSE}, +- #else +- {Ctrl_V, nv_error, 0, 0}, +- {'V', nv_error, 0, 0}, +- {'v', nv_error, 0, 0}, +- #endif + {Ctrl_W, nv_window, 0, 0}, + {Ctrl_X, nv_addsub, 0, 0}, + {Ctrl_Y, nv_scroll_line, 0, FALSE}, +--- 236,249 ---- +*************** +*** 427,435 **** + {K_HELP, nv_help, NV_NCW, 0}, + {K_F1, nv_help, NV_NCW, 0}, + {K_XF1, nv_help, NV_NCW, 0}, +- #ifdef FEAT_VISUAL + {K_SELECT, nv_select, 0, 0}, +- #endif + #ifdef FEAT_GUI + {K_VER_SCROLLBAR, nv_ver_scrollbar, 0, 0}, + {K_HOR_SCROLLBAR, nv_hor_scrollbar, 0, 0}, +--- 405,411 ---- +*************** +*** 579,589 **** + #ifdef FEAT_CMDL_INFO + int need_flushbuf; /* need to call out_flush() */ + #endif +- #ifdef FEAT_VISUAL + pos_T old_pos; /* cursor position before command */ + int mapped_len; + static int old_mapped_len = 0; +- #endif + int idx; + #ifdef FEAT_EVAL + int set_prevcount = FALSE; +--- 555,563 ---- +*************** +*** 643,651 **** + } + #endif + +- #ifdef FEAT_VISUAL + mapped_len = typebuf_maplen(); +- #endif + + State = NORMAL_BUSY; + #ifdef USE_ON_FLY_SCROLL +--- 617,623 ---- +*************** +*** 666,672 **** + c = safe_vgetc(); + LANGMAP_ADJUST(c, TRUE); + +- #ifdef FEAT_VISUAL + /* + * If a mapping was started in Visual or Select mode, remember the length + * of the mapping. This is used below to not return to Insert mode for as +--- 638,643 ---- +*************** +*** 677,688 **** + else if (old_mapped_len + || (VIsual_active && mapped_len == 0 && typebuf_maplen() > 0)) + old_mapped_len = typebuf_maplen(); +- #endif + + if (c == NUL) + c = K_ZERO; + +- #ifdef FEAT_VISUAL + /* + * In Select mode, typed text replaces the selection. + */ +--- 648,657 ---- +*************** +*** 703,718 **** + msg_nowait = TRUE; /* don't delay going to insert mode */ + old_mapped_len = 0; /* do go to Insert mode */ + } +- #endif + + #ifdef FEAT_CMDL_INFO + need_flushbuf = add_to_showcmd(c); + #endif + + getcount: +- #ifdef FEAT_VISUAL + if (!(VIsual_active && VIsual_select)) +- #endif + { + /* + * Handle a count before a command and compute ca.count0. +--- 672,684 ---- +*************** +*** 856,862 **** + goto normal_end; + #endif + +- #ifdef FEAT_VISUAL + /* + * In Visual/Select mode, a few keys are handled in a special way. + */ +--- 822,827 ---- +*************** +*** 892,898 **** + } + } + } +- #endif + + #ifdef FEAT_RIGHTLEFT + if (curwin->w_p_rl && KeyTyped && !KeyStuffed +--- 857,862 ---- +*************** +*** 930,940 **** + && !Recording + && !Exec_reg) + || ((ca.cmdchar == 'a' || ca.cmdchar == 'i') +! && (oap->op_type != OP_NOP +! #ifdef FEAT_VISUAL +! || VIsual_active +! #endif +! )))) + { + int *cp; + int repl = FALSE; /* get character for replace mode */ +--- 894,900 ---- + && !Recording + && !Exec_reg) + || ((ca.cmdchar == 'a' || ca.cmdchar == 'i') +! && (oap->op_type != OP_NOP || VIsual_active)))) + { + int *cp; + int repl = FALSE; /* get character for replace mode */ +*************** +*** 1168,1174 **** + msg_col = 0; + } + +- #ifdef FEAT_VISUAL + old_pos = curwin->w_cursor; /* remember where cursor was */ + + /* When 'keymodel' contains "startsel" some keys start Select/Visual +--- 1128,1133 ---- +*************** +*** 1188,1194 **** + mod_mask &= ~MOD_MASK_SHIFT; + } + } +- #endif + + /* + * Execute the command! +--- 1147,1152 ---- +*************** +*** 1220,1231 **** + #endif + } + +- #ifdef FEAT_VISUAL + /* Get the length of mapped chars again after typing a count, second + * character or "z333<cr>". */ + if (old_mapped_len > 0) + old_mapped_len = typebuf_maplen(); +- #endif + + /* + * If an operation is pending, handle it... +--- 1178,1187 ---- +*************** +*** 1247,1257 **** + if ( ((p_smd + && msg_silent == 0 + && (restart_edit != 0 +- #ifdef FEAT_VISUAL + || (VIsual_active + && old_pos.lnum == curwin->w_cursor.lnum + && old_pos.col == curwin->w_cursor.col) +- #endif + ) + && (clear_cmdline + || redraw_cmdline) +--- 1203,1211 ---- +*************** +*** 1259,1267 **** + && !msg_nowait + && KeyTyped) + || (restart_edit != 0 +- #ifdef FEAT_VISUAL + && !VIsual_active +- #endif + && (msg_scroll + || emsg_on_display))) + && oap->regname == 0 +--- 1213,1219 ---- +*************** +*** 1368,1403 **** + * May switch from Visual to Select mode after CTRL-O command. + */ + if ( oap->op_type == OP_NOP +- #ifdef FEAT_VISUAL + && ((restart_edit != 0 && !VIsual_active && old_mapped_len == 0) + || restart_VIsual_select == 1) +- #else +- && restart_edit != 0 +- #endif + && !(ca.retval & CA_COMMAND_BUSY) + && stuff_empty() + && oap->regname == 0) + { +- #ifdef FEAT_VISUAL + if (restart_VIsual_select == 1) + { + VIsual_select = TRUE; + showmode(); + restart_VIsual_select = 0; + } +! #endif +! if (restart_edit != 0 +! #ifdef FEAT_VISUAL +! && !VIsual_active && old_mapped_len == 0 +! #endif +! ) + (void)edit(restart_edit, FALSE, 1L); + } + +- #ifdef FEAT_VISUAL + if (restart_VIsual_select == 2) + restart_VIsual_select = 1; +- #endif + + /* Save count before an operator for next time. */ + opcount = ca.opcount; +--- 1320,1343 ---- + * May switch from Visual to Select mode after CTRL-O command. + */ + if ( oap->op_type == OP_NOP + && ((restart_edit != 0 && !VIsual_active && old_mapped_len == 0) + || restart_VIsual_select == 1) + && !(ca.retval & CA_COMMAND_BUSY) + && stuff_empty() + && oap->regname == 0) + { + if (restart_VIsual_select == 1) + { + VIsual_select = TRUE; + showmode(); + restart_VIsual_select = 0; + } +! if (restart_edit != 0 && !VIsual_active && old_mapped_len == 0) + (void)edit(restart_edit, FALSE, 1L); + } + + if (restart_VIsual_select == 2) + restart_VIsual_select = 1; + + /* Save count before an operator for next time. */ + opcount = ca.opcount; +*************** +*** 1437,1451 **** + int empty_region_error; + int restart_edit_save; + +- #ifdef FEAT_VISUAL + /* The visual area is remembered for redo */ + static int redo_VIsual_mode = NUL; /* 'v', 'V', or Ctrl-V */ + static linenr_T redo_VIsual_line_count; /* number of lines */ + static colnr_T redo_VIsual_vcol; /* number of cols or end column */ + static long redo_VIsual_count; /* count for Visual operator */ +! # ifdef FEAT_VIRTUALEDIT + int include_line_break = FALSE; +- # endif + #endif + + #if defined(FEAT_CLIPBOARD) +--- 1377,1389 ---- + int empty_region_error; + int restart_edit_save; + + /* The visual area is remembered for redo */ + static int redo_VIsual_mode = NUL; /* 'v', 'V', or Ctrl-V */ + static linenr_T redo_VIsual_line_count; /* number of lines */ + static colnr_T redo_VIsual_vcol; /* number of cols or end column */ + static long redo_VIsual_count; /* count for Visual operator */ +! #ifdef FEAT_VIRTUALEDIT + int include_line_break = FALSE; + #endif + + #if defined(FEAT_CLIPBOARD) +*************** +*** 1459,1468 **** + if ((clip_star.available || clip_plus.available) + && oap->op_type != OP_NOP + && !gui_yank +- # ifdef FEAT_VISUAL + && VIsual_active + && !redo_VIsual_busy +- # endif + && oap->regname == 0) + clip_auto_select(); + #endif +--- 1397,1404 ---- +*************** +*** 1471,1483 **** + /* + * If an operation is pending, handle it... + */ +! if ((finish_op +! #ifdef FEAT_VISUAL +! || VIsual_active +! #endif +! ) && oap->op_type != OP_NOP) + { +- #ifdef FEAT_VISUAL + oap->is_VIsual = VIsual_active; + if (oap->motion_force == 'V') + oap->motion_type = MLINE; +--- 1407,1414 ---- + /* + * If an operation is pending, handle it... + */ +! if ((finish_op || VIsual_active) && oap->op_type != OP_NOP) + { + oap->is_VIsual = VIsual_active; + if (oap->motion_force == 'V') + oap->motion_type = MLINE; +*************** +*** 1501,1517 **** + VIsual_select = FALSE; + VIsual_reselect = FALSE; + } +- #endif + + /* Only redo yank when 'y' flag is in 'cpoptions'. */ + /* Never redo "zf" (define fold). */ + if ((vim_strchr(p_cpo, CPO_YANK) != NULL || oap->op_type != OP_YANK) +- #ifdef FEAT_VISUAL + && ((!VIsual_active || oap->motion_force) + /* Also redo Operator-pending Visual mode mappings */ + || (VIsual_active && cap->cmdchar == ':' + && oap->op_type != OP_COLON)) +- #endif + && cap->cmdchar != 'D' + #ifdef FEAT_FOLDING + && oap->op_type != OP_FOLD +--- 1432,1445 ---- +*************** +*** 1554,1560 **** + } + } + +- #ifdef FEAT_VISUAL + if (redo_VIsual_busy) + { + /* Redo of an operation on a Visual area. Use the same size from +--- 1482,1487 ---- +*************** +*** 1639,1645 **** + if (VIsual_mode == 'V') + oap->start.col = 0; + } +- #endif /* FEAT_VISUAL */ + + /* + * Set oap->start to the first position of the operated text, oap->end +--- 1566,1571 ---- +*************** +*** 1690,1696 **** + virtual_op = virtual_active(); + #endif + +- #ifdef FEAT_VISUAL + if (VIsual_active || redo_VIsual_busy) + { + if (VIsual_mode == Ctrl_V) /* block mode */ +--- 1616,1621 ---- +*************** +*** 1826,1834 **** + { + oap->motion_type = MCHAR; + if (VIsual_mode != Ctrl_V && *ml_get_pos(&(oap->end)) == NUL +! # ifdef FEAT_VIRTUALEDIT + && (include_line_break || !virtual_op) +! # endif + ) + { + oap->inclusive = FALSE; +--- 1751,1759 ---- + { + oap->motion_type = MCHAR; + if (VIsual_mode != Ctrl_V && *ml_get_pos(&(oap->end)) == NUL +! #ifdef FEAT_VIRTUALEDIT + && (include_line_break || !virtual_op) +! #endif + ) + { + oap->inclusive = FALSE; +*************** +*** 1840,1848 **** + { + ++oap->end.lnum; + oap->end.col = 0; +! # ifdef FEAT_VIRTUALEDIT + oap->end.coladd = 0; +! # endif + ++oap->line_count; + } + else +--- 1765,1773 ---- + { + ++oap->end.lnum; + oap->end.col = 0; +! #ifdef FEAT_VIRTUALEDIT + oap->end.coladd = 0; +! #endif + ++oap->line_count; + } + else +*************** +*** 1868,1877 **** + if (!gui_yank) + { + VIsual_active = FALSE; +! # ifdef FEAT_MOUSE + setmouse(); + mouse_dragging = 0; +! # endif + if (mode_displayed) + clear_cmdline = TRUE; /* unshow visual mode later */ + #ifdef FEAT_CMDL_INFO +--- 1793,1802 ---- + if (!gui_yank) + { + VIsual_active = FALSE; +! #ifdef FEAT_MOUSE + setmouse(); + mouse_dragging = 0; +! #endif + if (mode_displayed) + clear_cmdline = TRUE; /* unshow visual mode later */ + #ifdef FEAT_CMDL_INFO +*************** +*** 1886,1892 **** + redraw_curbuf_later(INVERTED); + } + } +- #endif + + #ifdef FEAT_MBYTE + /* Include the trailing byte of a multi-byte char. */ +--- 1811,1816 ---- +*************** +*** 1921,1936 **** + empty_region_error = (oap->empty + && vim_strchr(p_cpo, CPO_EMPTYREGION) != NULL); + +- #ifdef FEAT_VISUAL + /* Force a redraw when operating on an empty Visual region, when + * 'modifiable is off or creating a fold. */ + if (oap->is_VIsual && (oap->empty || !curbuf->b_p_ma +! # ifdef FEAT_FOLDING + || oap->op_type == OP_FOLD +! # endif + )) + redraw_curbuf_later(INVERTED); +- #endif + + /* + * If the end of an operator is in column one while oap->motion_type +--- 1845,1858 ---- + empty_region_error = (oap->empty + && vim_strchr(p_cpo, CPO_EMPTYREGION) != NULL); + + /* Force a redraw when operating on an empty Visual region, when + * 'modifiable is off or creating a fold. */ + if (oap->is_VIsual && (oap->empty || !curbuf->b_p_ma +! #ifdef FEAT_FOLDING + || oap->op_type == OP_FOLD +! #endif + )) + redraw_curbuf_later(INVERTED); + + /* + * If the end of an operator is in column one while oap->motion_type +*************** +*** 1943,1952 **** + && oap->inclusive == FALSE + && !(cap->retval & CA_NO_ADJ_OP_END) + && oap->end.col == 0 +- #ifdef FEAT_VISUAL + && (!oap->is_VIsual || *p_sel == 'o') + && !oap->block_mode +- #endif + && oap->line_count > 1) + { + oap->end_adjusted = TRUE; /* remember that we did this */ +--- 1865,1872 ---- +*************** +*** 1971,1981 **** + { + case OP_LSHIFT: + case OP_RSHIFT: +! op_shift(oap, TRUE, +! #ifdef FEAT_VISUAL +! oap->is_VIsual ? (int)cap->count1 : +! #endif +! 1); + auto_format(FALSE, TRUE); + break; + +--- 1891,1897 ---- + { + case OP_LSHIFT: + case OP_RSHIFT: +! op_shift(oap, TRUE, oap->is_VIsual ? (int)cap->count1 : 1); + auto_format(FALSE, TRUE); + break; + +*************** +*** 1988,2002 **** + beep_flush(); + else + { +! (void)do_join(oap->line_count, oap->op_type == OP_JOIN, TRUE, TRUE); + auto_format(FALSE, TRUE); + } + break; + + case OP_DELETE: +- #ifdef FEAT_VISUAL + VIsual_reselect = FALSE; /* don't reselect now */ +- #endif + if (empty_region_error) + { + vim_beep(); +--- 1904,1917 ---- + beep_flush(); + else + { +! (void)do_join(oap->line_count, oap->op_type == OP_JOIN, +! TRUE, TRUE); + auto_format(FALSE, TRUE); + } + break; + + case OP_DELETE: + VIsual_reselect = FALSE; /* don't reselect now */ + if (empty_region_error) + { + vim_beep(); +*************** +*** 2026,2034 **** + break; + + case OP_CHANGE: +- #ifdef FEAT_VISUAL + VIsual_reselect = FALSE; /* don't reselect now */ +- #endif + if (empty_region_error) + { + vim_beep(); +--- 1941,1947 ---- +*************** +*** 2126,2134 **** + + case OP_INSERT: + case OP_APPEND: +- #ifdef FEAT_VISUAL + VIsual_reselect = FALSE; /* don't reselect now */ +- #endif + #ifdef FEAT_VISUALEXTRA + if (empty_region_error) + { +--- 2039,2045 ---- +*************** +*** 2158,2166 **** + break; + + case OP_REPLACE: +- #ifdef FEAT_VISUAL + VIsual_reselect = FALSE; /* don't reselect now */ +- #endif + #ifdef FEAT_VISUALEXTRA + if (empty_region_error) + #endif +--- 2069,2075 ---- +*************** +*** 2220,2228 **** + { + curwin->w_cursor = old_cursor; + } +- #ifdef FEAT_VISUAL + oap->block_mode = FALSE; +- #endif + clearop(oap); + } + } +--- 2129,2135 ---- +*************** +*** 2235,2245 **** + oparg_T *oap; + { + stuffcharReadbuff(':'); +- #ifdef FEAT_VISUAL + if (oap->is_VIsual) + stuffReadbuff((char_u *)"'<,'>"); + else +- #endif + { + /* + * Make the range look nice, so it can be repeated. +--- 2142,2150 ---- +*************** +*** 2404,2417 **** + pos_T save_cursor; + #endif + win_T *old_curwin = curwin; +- #ifdef FEAT_VISUAL + static pos_T orig_cursor; + colnr_T leftcol, rightcol; + pos_T end_visual; + int diff; + int old_active = VIsual_active; + int old_mode = VIsual_mode; +- #endif + int regname; + + #if defined(FEAT_FOLDING) +--- 2309,2320 ---- +*************** +*** 2432,2446 **** + if (!gui.in_use) + #endif + { +- #ifdef FEAT_VISUAL + if (VIsual_active) + { + if (!mouse_has(MOUSE_VISUAL)) + return FALSE; + } +! else +! #endif +! if (State == NORMAL && !mouse_has(MOUSE_NORMAL)) + return FALSE; + } + +--- 2335,2346 ---- + if (!gui.in_use) + #endif + { + if (VIsual_active) + { + if (!mouse_has(MOUSE_VISUAL)) + return FALSE; + } +! else if (State == NORMAL && !mouse_has(MOUSE_NORMAL)) + return FALSE; + } + +*************** +*** 2509,2522 **** + } + } + +- #ifndef FEAT_VISUAL +- /* +- * ALT is only used for starting/extending Visual mode. +- */ +- if ((mod_mask & MOD_MASK_ALT)) +- return FALSE; +- #endif +- + /* + * CTRL right mouse button does CTRL-T + */ +--- 2409,2414 ---- +*************** +*** 2586,2592 **** + return FALSE; + } + +- #ifdef FEAT_VISUAL + /* + * If visual was active, yank the highlighted text and put it + * before the mouse pointer position. +--- 2478,2483 ---- +*************** +*** 2607,2613 **** + do_always = TRUE; /* ignore 'mouse' setting next time */ + return FALSE; + } +- #endif + /* + * The rest is below jump_to_mouse() + */ +--- 2498,2503 ---- +*************** +*** 2761,2767 **** + { + /* First set the cursor position before showing the popup + * menu. */ +- #ifdef FEAT_VISUAL + if (VIsual_active) + { + pos_T m_pos; +--- 2651,2656 ---- +*************** +*** 2800,2815 **** + } + else + jump_flags = MOUSE_MAY_STOP_VIS; +- #endif + } + if (jump_flags) + { + jump_flags = jump_to_mouse(jump_flags, NULL, which_button); +! update_curbuf( +! #ifdef FEAT_VISUAL +! VIsual_active ? INVERTED : +! #endif +! VALID); + setcursor(); + out_flush(); /* Update before showing popup menu */ + } +--- 2689,2699 ---- + } + else + jump_flags = MOUSE_MAY_STOP_VIS; + } + if (jump_flags) + { + jump_flags = jump_to_mouse(jump_flags, NULL, which_button); +! update_curbuf(VIsual_active ? INVERTED : VALID); + setcursor(); + out_flush(); /* Update before showing popup menu */ + } +*************** +*** 2832,2838 **** + } + } + +- #ifdef FEAT_VISUAL + if ((State & (NORMAL | INSERT)) + && !(mod_mask & (MOD_MASK_SHIFT | MOD_MASK_CTRL))) + { +--- 2716,2721 ---- +*************** +*** 2872,2878 **** + jump_flags |= MOUSE_MAY_VIS; + } + } +- #endif + + /* + * If an operator is pending, ignore all drags and releases until the +--- 2755,2760 ---- +*************** +*** 2941,2947 **** + } + #endif + +- #ifdef FEAT_VISUAL + /* Set global flag that we are extending the Visual area with mouse + * dragging; temporarily minimize 'scrolloff'. */ + if (VIsual_active && is_drag && p_so) +--- 2823,2828 ---- +*************** +*** 3040,3046 **** + */ + else if ((State & INSERT) && VIsual_active) + stuffcharReadbuff(Ctrl_O); +- #endif + + /* + * Middle mouse click: Put text before cursor. +--- 2921,2926 ---- +*************** +*** 3118,3128 **** + */ + else if ((mod_mask & MOD_MASK_SHIFT)) + { +! if (State & INSERT +! #ifdef FEAT_VISUAL +! || (VIsual_active && VIsual_select) +! #endif +! ) + stuffcharReadbuff(Ctrl_O); + if (which_button == MOUSE_LEFT) + stuffcharReadbuff('*'); +--- 2998,3004 ---- + */ + else if ((mod_mask & MOD_MASK_SHIFT)) + { +! if ((State & INSERT) || (VIsual_active && VIsual_select)) + stuffcharReadbuff(Ctrl_O); + if (which_button == MOUSE_LEFT) + stuffcharReadbuff('*'); +*************** +*** 3153,3159 **** + # endif + } + #endif +- #ifdef FEAT_VISUAL + else if ((mod_mask & MOD_MASK_MULTI_CLICK) && (State & (NORMAL | INSERT)) + && mouse_has(MOUSE_VISUAL)) + { +--- 3029,3034 ---- +*************** +*** 3267,3278 **** + || (VIsual_active && p_smd && msg_silent == 0 + && (!old_active || VIsual_mode != old_mode))) + redraw_cmdline = TRUE; +- #endif + + return moved; + } + +- #ifdef FEAT_VISUAL + /* + * Move "pos" back to the start of the word it's in. + */ +--- 3142,3151 ---- +*************** +*** 3372,3381 **** + return 1; + return c; + } +- #endif /* FEAT_VISUAL */ + #endif /* FEAT_MOUSE */ + +- #if defined(FEAT_VISUAL) || defined(PROTO) + /* + * Check if highlighting for visual mode is possible, give a warning message + * if not. +--- 3245,3252 ---- +*************** +*** 3468,3474 **** + VIsual_reselect = FALSE; + } + } +- #endif /* FEAT_VISUAL */ + + #if defined(FEAT_BEVAL) + static int find_is_eval_item __ARGS((char_u *ptr, int *colp, int *nbp, int dir)); +--- 3339,3344 ---- +*************** +*** 3802,3812 **** + checkclearopq(oap) + oparg_T *oap; + { +! if (oap->op_type == OP_NOP +! #ifdef FEAT_VISUAL +! && !VIsual_active +! #endif +! ) + return FALSE; + clearopbeep(oap); + return TRUE; +--- 3672,3678 ---- + checkclearopq(oap) + oparg_T *oap; + { +! if (oap->op_type == OP_NOP && !VIsual_active) + return FALSE; + clearopbeep(oap); + return TRUE; +*************** +*** 3830,3836 **** + beep_flush(); + } + +- #ifdef FEAT_VISUAL + /* + * Remove the shift modifier from a special key. + */ +--- 3696,3701 ---- +*************** +*** 3849,3866 **** + } + cap->cmdchar = simplify_key(cap->cmdchar, &mod_mask); + } +- #endif + + #if defined(FEAT_CMDL_INFO) || defined(PROTO) + /* + * Routines for displaying a partly typed command + */ + +! #ifdef FEAT_VISUAL /* need room for size of Visual area */ +! # define SHOWCMD_BUFLEN SHOWCMD_COLS + 1 + 30 +! #else +! # define SHOWCMD_BUFLEN SHOWCMD_COLS + 1 +! #endif + static char_u showcmd_buf[SHOWCMD_BUFLEN]; + static char_u old_showcmd_buf[SHOWCMD_BUFLEN]; /* For push_showcmd() */ + static int showcmd_is_clear = TRUE; +--- 3714,3726 ---- + } + cap->cmdchar = simplify_key(cap->cmdchar, &mod_mask); + } + + #if defined(FEAT_CMDL_INFO) || defined(PROTO) + /* + * Routines for displaying a partly typed command + */ + +! #define SHOWCMD_BUFLEN SHOWCMD_COLS + 1 + 30 + static char_u showcmd_buf[SHOWCMD_BUFLEN]; + static char_u old_showcmd_buf[SHOWCMD_BUFLEN]; /* For push_showcmd() */ + static int showcmd_is_clear = TRUE; +*************** +*** 3874,3880 **** + if (!p_sc) + return; + +- #ifdef FEAT_VISUAL + if (VIsual_active && !char_avail()) + { + int cursor_bot = lt(VIsual, curwin->w_cursor); +--- 3734,3739 ---- +*************** +*** 3960,3966 **** + showcmd_visual = TRUE; + } + else +- #endif + { + showcmd_buf[0] = NUL; + showcmd_visual = FALSE; +--- 3819,3824 ---- +*************** +*** 4203,4212 **** + int want_hor; + win_T *old_curwin = curwin; + buf_T *old_curbuf = curbuf; +- #ifdef FEAT_VISUAL + int old_VIsual_select = VIsual_select; + int old_VIsual_active = VIsual_active; +- #endif + colnr_T tgt_leftcol = curwin->w_leftcol; + long topline; + long y; +--- 4061,4068 ---- +*************** +*** 4223,4231 **** + /* + * loop through the scrollbound windows and scroll accordingly + */ +- #ifdef FEAT_VISUAL + VIsual_select = VIsual_active = 0; +- #endif + for (curwin = firstwin; curwin; curwin = curwin->w_next) + { + curbuf = curwin->w_buffer; +--- 4079,4085 ---- +*************** +*** 4280,4289 **** + /* + * reset current-window + */ +- #ifdef FEAT_VISUAL + VIsual_select = old_VIsual_select; + VIsual_active = old_VIsual_active; +- #endif + curwin = old_curwin; + curbuf = old_curbuf; + } +--- 4134,4141 ---- +*************** +*** 5239,5249 **** + + if (checkclearop(cap->oap)) + break; +- # ifdef FEAT_VISUAL + if (VIsual_active && get_visual_text(cap, &ptr, &len) + == FAIL) + return; +- # endif + if (ptr == NULL) + { + pos_T pos = curwin->w_cursor; +--- 5091,5099 ---- +*************** +*** 5411,5422 **** + /* + * Ignore 'Q' in Visual mode, just give a beep. + */ +- #ifdef FEAT_VISUAL + if (VIsual_active) + vim_beep(); +! else +! #endif +! if (!checkclearop(cap->oap)) + do_exmode(FALSE); + } + +--- 5261,5269 ---- + /* + * Ignore 'Q' in Visual mode, just give a beep. + */ + if (VIsual_active) + vim_beep(); +! else if (!checkclearop(cap->oap)) + do_exmode(FALSE); + } + +*************** +*** 5430,5440 **** + int old_p_im; + int cmd_result; + +- #ifdef FEAT_VISUAL + if (VIsual_active) + nv_operator(cap); + else +- #endif + { + if (cap->oap->op_type != OP_NOP) + { +--- 5277,5285 ---- +*************** +*** 5494,5508 **** + nv_ctrlg(cap) + cmdarg_T *cap; + { +- #ifdef FEAT_VISUAL + if (VIsual_active) /* toggle Selection/Visual mode */ + { + VIsual_select = !VIsual_select; + showmode(); + } +! else +! #endif +! if (!checkclearop(cap->oap)) + /* print full name if count given or :cd used */ + fileinfo((int)cap->count0, FALSE, TRUE); + } +--- 5339,5350 ---- + nv_ctrlg(cap) + cmdarg_T *cap; + { + if (VIsual_active) /* toggle Selection/Visual mode */ + { + VIsual_select = !VIsual_select; + showmode(); + } +! else if (!checkclearop(cap->oap)) + /* print full name if count given or :cd used */ + fileinfo((int)cap->count0, FALSE, TRUE); + } +*************** +*** 5514,5527 **** + nv_ctrlh(cap) + cmdarg_T *cap; + { +- #ifdef FEAT_VISUAL + if (VIsual_active && VIsual_select) + { + cap->cmdchar = 'x'; /* BS key behaves like 'x' in Select mode */ + v_visop(cap); + } + else +- #endif + nv_left(cap); + } + +--- 5356,5367 ---- +*************** +*** 5558,5564 **** + nv_ctrlo(cap) + cmdarg_T *cap; + { +- #ifdef FEAT_VISUAL + if (VIsual_active && VIsual_select) + { + VIsual_select = FALSE; +--- 5398,5403 ---- +*************** +*** 5566,5572 **** + restart_VIsual_select = 2; /* restart Select mode later */ + } + else +- #endif + { + cap->count1 = -cap->count1; + nv_pcmark(cap); +--- 5405,5410 ---- +*************** +*** 5675,5684 **** + */ + if (cmdchar == ']' || cmdchar == Ctrl_RSB || cmdchar == 'K') + { +- #ifdef FEAT_VISUAL + if (VIsual_active && get_visual_text(cap, &ptr, &n) == FAIL) + return; +- #endif + if (checkclearopq(cap->oap)) + return; + } +--- 5513,5520 ---- +*************** +*** 5872,5878 **** + vim_free(buf); + } + +- #if defined(FEAT_VISUAL) || defined(PROTO) + /* + * Get visually selected text, within one line only. + * Returns FAIL if more than one line selected. +--- 5708,5713 ---- +*************** +*** 5917,5923 **** + reset_VIsual_and_resel(); + return OK; + } +- #endif + + /* + * CTRL-T: backwards in tag stack +--- 5752,5757 ---- +*************** +*** 6040,6050 **** + cmdarg_T *cap; + { + long n; +! #ifdef FEAT_VISUAL +! int PAST_LINE; +! #else +! # define PAST_LINE 0 +! #endif + + if (mod_mask & (MOD_MASK_SHIFT | MOD_MASK_CTRL)) + { +--- 5874,5880 ---- + cmdarg_T *cap; + { + long n; +! int past_line; + + if (mod_mask & (MOD_MASK_SHIFT | MOD_MASK_CTRL)) + { +*************** +*** 6057,6081 **** + + cap->oap->motion_type = MCHAR; + cap->oap->inclusive = FALSE; +! #ifdef FEAT_VISUAL +! PAST_LINE = (VIsual_active && *p_sel != 'o'); + +! # ifdef FEAT_VIRTUALEDIT + /* +! * In virtual mode, there's no such thing as "PAST_LINE", as lines are +! * (theoretically) infinitely long. + */ + if (virtual_active()) +! PAST_LINE = 0; +! # endif + #endif + + for (n = cap->count1; n > 0; --n) + { +! if ((!PAST_LINE && oneright() == FAIL) +! #ifdef FEAT_VISUAL +! || (PAST_LINE && *ml_get_cursor() == NUL) +! #endif + ) + { + /* +--- 5887,5907 ---- + + cap->oap->motion_type = MCHAR; + cap->oap->inclusive = FALSE; +! past_line = (VIsual_active && *p_sel != 'o'); + +! #ifdef FEAT_VIRTUALEDIT + /* +! * In virtual edit mode, there's no such thing as "past_line", as lines +! * are (theoretically) infinitely long. + */ + if (virtual_active()) +! past_line = 0; + #endif + + for (n = cap->count1; n > 0; --n) + { +! if ((!past_line && oneright() == FAIL) +! || (past_line && *ml_get_cursor() == NUL) + ) + { + /* +*************** +*** 6123,6148 **** + } + break; + } +! #ifdef FEAT_VISUAL +! else if (PAST_LINE) + { + curwin->w_set_curswant = TRUE; +! # ifdef FEAT_VIRTUALEDIT + if (virtual_active()) + oneright(); + else +! # endif + { +! # ifdef FEAT_MBYTE + if (has_mbyte) + curwin->w_cursor.col += + (*mb_ptr2len)(ml_get_cursor()); + else +! # endif + ++curwin->w_cursor.col; + } + } +- #endif + } + #ifdef FEAT_FOLDING + if (n != cap->count1 && (fdo_flags & FDO_HOR) && KeyTyped +--- 5949,5972 ---- + } + break; + } +! else if (past_line) + { + curwin->w_set_curswant = TRUE; +! #ifdef FEAT_VIRTUALEDIT + if (virtual_active()) + oneright(); + else +! #endif + { +! #ifdef FEAT_MBYTE + if (has_mbyte) + curwin->w_cursor.col += + (*mb_ptr2len)(ml_get_cursor()); + else +! #endif + ++curwin->w_cursor.col; + } + } + } + #ifdef FEAT_FOLDING + if (n != cap->count1 && (fdo_flags & FDO_HOR) && KeyTyped +*************** +*** 6503,6511 **** + else + curwin->w_cursor.coladd = 0; + #endif +- #ifdef FEAT_VISUAL + adjust_for_sel(cap); +- #endif + #ifdef FEAT_FOLDING + if ((fdo_flags & FDO_HOR) && KeyTyped && cap->oap->op_type == OP_NOP) + foldOpenCursor(); +--- 6327,6333 ---- +*************** +*** 6754,6760 **** + int dir = (cap->cmdchar == ']' && cap->nchar == 'p') + ? FORWARD : BACKWARD; + int regname = cap->oap->regname; +- #ifdef FEAT_VISUAL + int was_visual = VIsual_active; + int line_count = curbuf->b_ml.ml_line_count; + pos_T start, end; +--- 6576,6581 ---- +*************** +*** 6766,6779 **** + end = equalpos(start,VIsual) ? curwin->w_cursor : VIsual; + curwin->w_cursor = (dir == BACKWARD ? start : end); + } +- #endif + # ifdef FEAT_CLIPBOARD + adjust_clip_reg(®name); + # endif + prep_redo_cmd(cap); + + do_put(regname, dir, cap->count1, PUT_FIXINDENT); +- #ifdef FEAT_VISUAL + if (was_visual) + { + VIsual = start; +--- 6587,6598 ---- +*************** +*** 6802,6808 **** + redraw_later(SOME_VALID); + } + } +- #endif + } + } + +--- 6621,6626 ---- +*************** +*** 6936,6944 **** + #ifdef FEAT_VIRTUALEDIT + curwin->w_cursor.coladd = 0; + #endif +- #ifdef FEAT_VISUAL + adjust_for_sel(cap); +- #endif + } + } + #ifdef FEAT_FOLDING +--- 6754,6760 ---- +*************** +*** 7027,7037 **** + nv_undo(cap) + cmdarg_T *cap; + { +! if (cap->oap->op_type == OP_LOWER +! #ifdef FEAT_VISUAL +! || VIsual_active +! #endif +! ) + { + /* translate "<Visual>u" to "<Visual>gu" and "guu" to "gugu" */ + cap->cmdchar = 'g'; +--- 6843,6849 ---- + nv_undo(cap) + cmdarg_T *cap; + { +! if (cap->oap->op_type == OP_LOWER || VIsual_active) + { + /* translate "<Visual>u" to "<Visual>gu" and "guu" to "gugu" */ + cap->cmdchar = 'g'; +*************** +*** 7089,7095 **** + return; + } + +- #ifdef FEAT_VISUAL + /* Visual mode "r" */ + if (VIsual_active) + { +--- 6901,6906 ---- +*************** +*** 7105,7111 **** + nv_operator(cap); + return; + } +- #endif + + #ifdef FEAT_VIRTUALEDIT + /* Break tabs, etc. */ +--- 6916,6921 ---- +*************** +*** 7273,7279 **** + } + } + +- #ifdef FEAT_VISUAL + /* + * 'o': Exchange start and end of Visual area. + * 'O': same, but in block mode exchange left and right corners. +--- 7083,7088 ---- +*************** +*** 7326,7332 **** + curwin->w_set_curswant = TRUE; + } + } +- #endif /* FEAT_VISUAL */ + + /* + * "R" (cap->arg is FALSE) and "gR" (cap->arg is TRUE). +--- 7135,7140 ---- +*************** +*** 7335,7341 **** + nv_Replace(cap) + cmdarg_T *cap; + { +- #ifdef FEAT_VISUAL + if (VIsual_active) /* "R" is replace lines */ + { + cap->cmdchar = 'c'; +--- 7143,7148 ---- +*************** +*** 7344,7352 **** + VIsual_mode = 'V'; + nv_operator(cap); + } +! else +! #endif +! if (!checkclearopq(cap->oap)) + { + if (!curbuf->b_p_ma) + EMSG(_(e_modifiable)); +--- 7151,7157 ---- + VIsual_mode = 'V'; + nv_operator(cap); + } +! else if (!checkclearopq(cap->oap)) + { + if (!curbuf->b_p_ma) + EMSG(_(e_modifiable)); +*************** +*** 7369,7384 **** + nv_vreplace(cap) + cmdarg_T *cap; + { +- # ifdef FEAT_VISUAL + if (VIsual_active) + { + cap->cmdchar = 'r'; + cap->nchar = cap->extra_char; + nv_replace(cap); /* Do same as "r" in Visual mode for now */ + } +! else +! # endif +! if (!checkclearopq(cap->oap)) + { + if (!curbuf->b_p_ma) + EMSG(_(e_modifiable)); +--- 7174,7186 ---- + nv_vreplace(cap) + cmdarg_T *cap; + { + if (VIsual_active) + { + cap->cmdchar = 'r'; + cap->nchar = cap->extra_char; + nv_replace(cap); /* Do same as "r" in Visual mode for now */ + } +! else if (!checkclearopq(cap->oap)) + { + if (!curbuf->b_p_ma) + EMSG(_(e_modifiable)); +*************** +*** 7525,7531 **** + curwin->w_set_curswant = TRUE; + } + +- #ifdef FEAT_VISUAL + /* + * Handle commands that are operators in Visual mode. + */ +--- 7327,7332 ---- +*************** +*** 7550,7556 **** + cap->cmdchar = *(vim_strchr(trans, cap->cmdchar) + 1); + nv_operator(cap); + } +- #endif + + /* + * "s" and "S" commands. +--- 7351,7356 ---- +*************** +*** 7559,7565 **** + nv_subst(cap) + cmdarg_T *cap; + { +- #ifdef FEAT_VISUAL + if (VIsual_active) /* "vs" and "vS" are the same as "vc" */ + { + if (cap->cmdchar == 'S') +--- 7359,7364 ---- +*************** +*** 7571,7577 **** + nv_operator(cap); + } + else +- #endif + nv_optrans(cap); + } + +--- 7370,7375 ---- +*************** +*** 7585,7596 **** + if (cap->cmdchar == K_DEL || cap->cmdchar == K_KDEL) + cap->cmdchar = 'x'; /* DEL key behaves like 'x' */ + +- #ifdef FEAT_VISUAL + /* in Visual mode these commands are operators */ + if (VIsual_active) + v_visop(cap); + else +- #endif + nv_optrans(cap); + } + +--- 7383,7392 ---- +*************** +*** 7758,7764 **** + clearopbeep(cap->oap); + } + +- #ifdef FEAT_VISUAL + /* + * Handle "v", "V" and "CTRL-V" commands. + * Also for "gh", "gH" and "g^H" commands: Always start Select mode, cap->arg +--- 7554,7559 ---- +*************** +*** 7950,7956 **** + } + } + +- #endif /* FEAT_VISUAL */ + + /* + * CTRL-W: Window commands +--- 7745,7750 ---- +*************** +*** 7975,7984 **** + cmdarg_T *cap; + { + clearop(cap->oap); +- #ifdef FEAT_VISUAL + if (VIsual_active) + end_visual_mode(); /* stop Visual mode */ +- #endif + do_cmdline_cmd((char_u *)"st"); + } + +--- 7769,7776 ---- +*************** +*** 7990,7998 **** + cmdarg_T *cap; + { + oparg_T *oap = cap->oap; +- #ifdef FEAT_VISUAL + pos_T tpos; +- #endif + int i; + int flag = FALSE; + +--- 7782,7788 ---- +*************** +*** 8025,8031 **** + do_cmdline_cmd((char_u *)"%s//~/&"); + break; + +- #ifdef FEAT_VISUAL + /* + * "gv": Reselect the previous Visual area. If Visual already active, + * exchange previous and current Visual area. +--- 7815,7820 ---- +*************** +*** 8126,8132 **** + cap->arg = TRUE; + nv_visual(cap); + break; +- #endif /* FEAT_VISUAL */ + + /* "gn", "gN" visually select next/previous search match + * "gn" selects next match +--- 7915,7920 ---- +*************** +*** 8134,8142 **** + */ + case 'N': + case 'n': +- #ifdef FEAT_VISUAL + if (!current_search(cap->count1, cap->nchar == 'n')) +- #endif + clearopbeep(oap); + break; + +--- 7922,7928 ---- +*************** +*** 8258,8266 **** + && vim_iswhite(ptr[curwin->w_cursor.col])) + --curwin->w_cursor.col; + curwin->w_set_curswant = TRUE; +- #ifdef FEAT_VISUAL + adjust_for_sel(cap); +- #endif + } + break; + +--- 8044,8050 ---- +*************** +*** 8657,8667 **** + cmdarg_T *cap; + { + /* In Visual mode and typing "gUU" triggers an operator */ +! if (cap->oap->op_type == OP_UPPER +! #ifdef FEAT_VISUAL +! || VIsual_active +! #endif +! ) + { + /* translate "gUU" to "gUgU" */ + cap->cmdchar = 'g'; +--- 8441,8447 ---- + cmdarg_T *cap; + { + /* In Visual mode and typing "gUU" triggers an operator */ +! if (cap->oap->op_type == OP_UPPER || VIsual_active) + { + /* translate "gUU" to "gUgU" */ + cap->cmdchar = 'g'; +*************** +*** 8683,8693 **** + nv_tilde(cap) + cmdarg_T *cap; + { +! if (!p_to +! #ifdef FEAT_VISUAL +! && !VIsual_active +! #endif +! && cap->oap->op_type != OP_TILDE) + n_swapchar(cap); + else + nv_operator(cap); +--- 8463,8469 ---- + nv_tilde(cap) + cmdarg_T *cap; + { +! if (!p_to && !VIsual_active && cap->oap->op_type != OP_TILDE) + n_swapchar(cap); + else + nv_operator(cap); +*************** +*** 8906,8914 **** + clearopbeep(cap->oap); + else + { +- #ifdef FEAT_VISUAL + adjust_for_sel(cap); +- #endif + #ifdef FEAT_FOLDING + if ((fdo_flags & FDO_HOR) && KeyTyped && cap->oap->op_type == OP_NOP) + foldOpenCursor(); +--- 8682,8688 ---- +*************** +*** 8931,8939 **** + * - 'virtualedit' is not "all" and not "onemore". + */ + if (curwin->w_cursor.col > 0 && gchar_cursor() == NUL +- #ifdef FEAT_VISUAL + && (!VIsual_active || *p_sel == 'o') +- #endif + #ifdef FEAT_VIRTUALEDIT + && !virtual_active() && (ve_flags & VE_ONEMORE) == 0 + #endif +--- 8705,8711 ---- +*************** +*** 8968,8974 **** + one-character line). */ + } + +- #ifdef FEAT_VISUAL + /* + * In exclusive Visual mode, may include the last character. + */ +--- 8740,8745 ---- +*************** +*** 8979,8989 **** + if (VIsual_active && cap->oap->inclusive && *p_sel == 'e' + && gchar_cursor() != NUL && lt(VIsual, curwin->w_cursor)) + { +! # ifdef FEAT_MBYTE + if (has_mbyte) + inc_cursor(); + else +! # endif + ++curwin->w_cursor.col; + cap->oap->inclusive = FALSE; + } +--- 8750,8760 ---- + if (VIsual_active && cap->oap->inclusive && *p_sel == 'e' + && gchar_cursor() != NUL && lt(VIsual, curwin->w_cursor)) + { +! #ifdef FEAT_MBYTE + if (has_mbyte) + inc_cursor(); + else +! #endif + ++curwin->w_cursor.col; + cap->oap->inclusive = FALSE; + } +*************** +*** 9044,9050 **** + } + } + +- #endif + + /* + * "G", "gg", CTRL-END, CTRL-HOME. +--- 8815,8820 ---- +*************** +*** 9095,9107 **** + if (cmdwin_type != 0) + cmdwin_result = Ctrl_C; + #endif +- #ifdef FEAT_VISUAL + if (VIsual_active) + { + end_visual_mode(); /* stop Visual */ + redraw_curbuf_later(INVERTED); + } +- #endif + /* CTRL-\ CTRL-G restarts Insert mode when 'insertmode' is set. */ + if (cap->nchar == Ctrl_G && p_im) + restart_edit = 'a'; +--- 8865,8875 ---- +*************** +*** 9132,9140 **** + #ifdef FEAT_CMDWIN + && cmdwin_type == 0 + #endif +- #ifdef FEAT_VISUAL + && !VIsual_active +- #endif + && no_reason) + MSG(_("Type :quit<Enter> to exit Vim")); + +--- 8900,8906 ---- +*************** +*** 9152,9158 **** + #endif + } + +- #ifdef FEAT_VISUAL + if (VIsual_active) + { + end_visual_mode(); /* stop Visual */ +--- 8918,8923 ---- +*************** +*** 9160,9169 **** + curwin->w_set_curswant = TRUE; + redraw_curbuf_later(INVERTED); + } +! else +! #endif +! if (no_reason) +! vim_beep(); + clearop(cap->oap); + + /* A CTRL-C is often used at the start of a menu. When 'insertmode' is +--- 8925,8932 ---- + curwin->w_set_curswant = TRUE; + redraw_curbuf_later(INVERTED); + } +! else if (no_reason) +! vim_beep(); + clearop(cap->oap); + + /* A CTRL-C is often used at the start of a menu. When 'insertmode' is +*************** +*** 9187,9206 **** + if (cap->cmdchar == K_INS || cap->cmdchar == K_KINS) + cap->cmdchar = 'i'; + +- #ifdef FEAT_VISUAL + /* in Visual mode "A" and "I" are an operator */ + if (VIsual_active && (cap->cmdchar == 'A' || cap->cmdchar == 'I')) + v_visop(cap); + + /* in Visual mode and after an operator "a" and "i" are for text objects */ +! else +! #endif +! if ((cap->cmdchar == 'a' || cap->cmdchar == 'i') +! && (cap->oap->op_type != OP_NOP +! #ifdef FEAT_VISUAL +! || VIsual_active +! #endif +! )) + { + #ifdef FEAT_TEXTOBJ + nv_object(cap); +--- 8950,8962 ---- + if (cap->cmdchar == K_INS || cap->cmdchar == K_KINS) + cap->cmdchar = 'i'; + + /* in Visual mode "A" and "I" are an operator */ + if (VIsual_active && (cap->cmdchar == 'A' || cap->cmdchar == 'I')) + v_visop(cap); + + /* in Visual mode and after an operator "a" and "i" are for text objects */ +! else if ((cap->cmdchar == 'a' || cap->cmdchar == 'i') +! && (cap->oap->op_type != OP_NOP || VIsual_active)) + { + #ifdef FEAT_TEXTOBJ + nv_object(cap); +*************** +*** 9467,9478 **** + nv_join(cap) + cmdarg_T *cap; + { +- #ifdef FEAT_VISUAL + if (VIsual_active) /* join the visual lines */ + nv_operator(cap); +! else +! #endif +! if (!checkclearop(cap->oap)) + { + if (cap->count0 <= 1) + cap->count0 = 2; /* default for join is two lines! */ +--- 9223,9231 ---- + nv_join(cap) + cmdarg_T *cap; + { + if (VIsual_active) /* join the visual lines */ + nv_operator(cap); +! else if (!checkclearop(cap->oap)) + { + if (cap->count0 <= 1) + cap->count0 = 2; /* default for join is two lines! */ +*************** +*** 9495,9506 **** + nv_put(cap) + cmdarg_T *cap; + { +- #ifdef FEAT_VISUAL + int regname = 0; + void *reg1 = NULL, *reg2 = NULL; + int empty = FALSE; + int was_visual = FALSE; +- #endif + int dir; + int flags = 0; + +--- 9248,9257 ---- +*************** +*** 9526,9532 **** + if (cap->cmdchar == 'g') + flags |= PUT_CURSEND; + +- #ifdef FEAT_VISUAL + if (VIsual_active) + { + /* Putting in Visual mode: The put text replaces the selected +--- 9277,9282 ---- +*************** +*** 9536,9549 **** + */ + was_visual = TRUE; + regname = cap->oap->regname; +! # ifdef FEAT_CLIPBOARD + adjust_clip_reg(®name); +! # endif + if (regname == 0 || regname == '"' + || VIM_ISDIGIT(regname) || regname == '-' +! # ifdef FEAT_CLIPBOARD + || (clip_unnamed && (regname == '*' || regname == '+')) +! # endif + + ) + { +--- 9286,9299 ---- + */ + was_visual = TRUE; + regname = cap->oap->regname; +! #ifdef FEAT_CLIPBOARD + adjust_clip_reg(®name); +! #endif + if (regname == 0 || regname == '"' + || VIM_ISDIGIT(regname) || regname == '-' +! #ifdef FEAT_CLIPBOARD + || (clip_unnamed && (regname == '*' || regname == '+')) +! #endif + + ) + { +*************** +*** 9591,9600 **** + /* May have been reset in do_put(). */ + VIsual_active = TRUE; + } +- #endif + do_put(cap->oap->regname, dir, cap->count1, flags); + +- #ifdef FEAT_VISUAL + /* If a register was saved, put it back now. */ + if (reg2 != NULL) + put_register(regname, reg2); +--- 9341,9348 ---- +*************** +*** 9621,9627 **** + coladvance((colnr_T)MAXCOL); + } + } +- #endif + auto_format(FALSE, TRUE); + } + } +--- 9369,9374 ---- +*************** +*** 9642,9652 **** + } + else + #endif +- #ifdef FEAT_VISUAL + if (VIsual_active) /* switch start and end of visual */ + v_swap_corners(cap->cmdchar); + else +- #endif + n_opencmd(cap); + } + +--- 9389,9397 ---- +*** ../vim-7.4.211/src/ops.c 2014-03-19 18:57:27.730175565 +0100 +--- src/ops.c 2014-03-23 15:08:16.095260447 +0100 +*************** +*** 57,65 **** + char_u **y_array; /* pointer to array of line pointers */ + linenr_T y_size; /* number of lines in y_array */ + char_u y_type; /* MLINE, MCHAR or MBLOCK */ +- #ifdef FEAT_VISUAL + colnr_T y_width; /* only set if y_type == MBLOCK */ +- #endif + } y_regs[NUM_REGISTERS]; + + static struct yankreg *y_current; /* ptr to current yankreg */ +--- 57,63 ---- +*************** +*** 107,123 **** + static int yank_copy_line __ARGS((struct block_def *bd, long y_idx)); + #ifdef FEAT_CLIPBOARD + static void copy_yank_reg __ARGS((struct yankreg *reg)); +- # if defined(FEAT_VISUAL) || defined(FEAT_EVAL) + static void may_set_selection __ARGS((void)); +- # endif + #endif + static void dis_msg __ARGS((char_u *p, int skip_esc)); + #if defined(FEAT_COMMENTS) || defined(PROTO) + static char_u *skip_comment __ARGS((char_u *line, int process, int include_space, int *is_comment)); + #endif +- #ifdef FEAT_VISUAL + static void block_prep __ARGS((oparg_T *oap, struct block_def *, linenr_T, int)); +- #endif + #if defined(FEAT_CLIPBOARD) || defined(FEAT_EVAL) + static void str_to_reg __ARGS((struct yankreg *y_ptr, int type, char_u *str, long len, long blocklen)); + #endif +--- 105,117 ---- +*************** +*** 187,193 **** + return i; + } + +- #if defined(FEAT_VISUAL) || defined(PROTO) + /* + * Return TRUE if operator "op" always works on whole lines. + */ +--- 181,186 ---- +*************** +*** 197,203 **** + { + return opchars[op][2]; + } +- #endif + + /* + * Get first operator command character. +--- 190,195 ---- +*************** +*** 232,249 **** + long i; + int first_char; + char_u *s; +- #ifdef FEAT_VISUAL + int block_col = 0; +- #endif + + if (u_save((linenr_T)(oap->start.lnum - 1), + (linenr_T)(oap->end.lnum + 1)) == FAIL) + return; + +- #ifdef FEAT_VISUAL + if (oap->block_mode) + block_col = curwin->w_cursor.col; +- #endif + + for (i = oap->line_count; --i >= 0; ) + { +--- 224,237 ---- +*************** +*** 272,286 **** + foldOpenCursor(); + #endif + +- #ifdef FEAT_VISUAL + if (oap->block_mode) + { + curwin->w_cursor.lnum = oap->start.lnum; + curwin->w_cursor.col = block_col; + } +! else +! #endif +! if (curs_top) /* put cursor on first line, for ">>" */ + { + curwin->w_cursor.lnum = oap->start.lnum; + beginline(BL_SOL | BL_FIX); /* shift_line() may have set cursor.col */ +--- 260,271 ---- + foldOpenCursor(); + #endif + + if (oap->block_mode) + { + curwin->w_cursor.lnum = oap->start.lnum; + curwin->w_cursor.col = block_col; + } +! else if (curs_top) /* put cursor on first line, for ">>" */ + { + curwin->w_cursor.lnum = oap->start.lnum; + beginline(BL_SOL | BL_FIX); /* shift_line() may have set cursor.col */ +*************** +*** 733,746 **** + * there is no change still need to remove the Visual highlighting. */ + if (last_changed != 0) + changed_lines(first_changed, 0, +- #ifdef FEAT_VISUAL + oap->is_VIsual ? start_lnum + oap->line_count : +- #endif + last_changed + 1, 0L); +- #ifdef FEAT_VISUAL + else if (oap->is_VIsual) + redraw_curbuf_later(INVERTED); +- #endif + + if (oap->line_count > p_report) + { +--- 718,727 ---- +*************** +*** 948,954 **** + } + #endif + +- #if defined(FEAT_VISUAL) || defined(PROTO) + /* + * Obtain the contents of a "normal" register. The register is made empty. + * The returned pointer has allocated memory, use put_register() later. +--- 929,934 ---- +*************** +*** 1016,1025 **** + *y_current = *(struct yankreg *)reg; + vim_free(reg); + +! # ifdef FEAT_CLIPBOARD + /* Send text written to clipboard register to the clipboard. */ + may_set_selection(); +! # endif + } + + void +--- 996,1005 ---- + *y_current = *(struct yankreg *)reg; + vim_free(reg); + +! #ifdef FEAT_CLIPBOARD + /* Send text written to clipboard register to the clipboard. */ + may_set_selection(); +! #endif + } + + void +*************** +*** 1034,1040 **** + vim_free(reg); + *y_current = tmp; + } +- #endif + + #if defined(FEAT_MOUSE) || defined(PROTO) + /* +--- 1014,1019 ---- +*************** +*** 1634,1643 **** + int n; + linenr_T lnum; + char_u *ptr; +- #ifdef FEAT_VISUAL + char_u *newp, *oldp; + struct block_def bd; +- #endif + linenr_T old_lcount = curbuf->b_ml.ml_line_count; + int did_yank = FALSE; + int orig_regname = oap->regname; +--- 1613,1620 ---- +*************** +*** 1670,1679 **** + * delete linewise. Don't do this for the change command or Visual mode. + */ + if ( oap->motion_type == MCHAR +- #ifdef FEAT_VISUAL + && !oap->is_VIsual + && !oap->block_mode +- #endif + && oap->line_count > 1 + && oap->motion_force == NUL + && oap->op_type == OP_DELETE) +--- 1647,1654 ---- +*************** +*** 1787,1793 **** + } + } + +- #ifdef FEAT_VISUAL + /* + * block mode delete + */ +--- 1762,1767 ---- +*************** +*** 1838,1846 **** + oap->end.lnum + 1, 0L); + oap->line_count = 0; /* no lines deleted */ + } +! else +! #endif +! if (oap->motion_type == MLINE) + { + if (oap->op_type == OP_CHANGE) + { +--- 1812,1818 ---- + oap->end.lnum + 1, 0L); + oap->line_count = 0; /* no lines deleted */ + } +! else if (oap->motion_type == MLINE) + { + if (oap->op_type == OP_CHANGE) + { +*************** +*** 1924,1936 **** + return FAIL; + + /* if 'cpoptions' contains '$', display '$' at end of change */ +! if ( vim_strchr(p_cpo, CPO_DOLLAR) != NULL + && oap->op_type == OP_CHANGE + && oap->end.lnum == curwin->w_cursor.lnum +! #ifdef FEAT_VISUAL +! && !oap->is_VIsual +! #endif +! ) + display_dollar(oap->end.col - !oap->inclusive); + + n = oap->end.col - oap->start.col + 1 - !oap->inclusive; +--- 1896,1905 ---- + return FAIL; + + /* if 'cpoptions' contains '$', display '$' at end of change */ +! if ( vim_strchr(p_cpo, CPO_DOLLAR) != NULL + && oap->op_type == OP_CHANGE + && oap->end.lnum == curwin->w_cursor.lnum +! && !oap->is_VIsual) + display_dollar(oap->end.col - !oap->inclusive); + + n = oap->end.col - oap->start.col + 1 - !oap->inclusive; +*************** +*** 1967,1977 **** + } + else + { +! (void)del_bytes((long)n, !virtual_op, oap->op_type == OP_DELETE +! #ifdef FEAT_VISUAL +! && !oap->is_VIsual +! #endif +! ); + } + } + else /* delete characters between lines */ +--- 1936,1943 ---- + } + else + { +! (void)del_bytes((long)n, !virtual_op, +! oap->op_type == OP_DELETE && !oap->is_VIsual); + } + } + else /* delete characters between lines */ +*************** +*** 2008,2018 **** + { + /* delete from start of line until op_end */ + curwin->w_cursor.col = 0; +! (void)del_bytes((long)n, !virtual_op, oap->op_type == OP_DELETE +! #ifdef FEAT_VISUAL +! && !oap->is_VIsual +! #endif +! ); + curwin->w_cursor = curpos; /* restore curwin->w_cursor */ + } + if (curwin->w_cursor.lnum < curbuf->b_ml.ml_line_count) +--- 1974,1981 ---- + { + /* delete from start of line until op_end */ + curwin->w_cursor.col = 0; +! (void)del_bytes((long)n, !virtual_op, +! oap->op_type == OP_DELETE && !oap->is_VIsual); + curwin->w_cursor = curpos; /* restore curwin->w_cursor */ + } + if (curwin->w_cursor.lnum < curbuf->b_ml.ml_line_count) +*************** +*** 2025,2038 **** + #ifdef FEAT_VIRTUALEDIT + setmarks: + #endif +- #ifdef FEAT_VISUAL + if (oap->block_mode) + { + curbuf->b_op_end.lnum = oap->end.lnum; + curbuf->b_op_end.col = oap->start.col; + } + else +- #endif + curbuf->b_op_end = oap->start; + curbuf->b_op_start = oap->start; + +--- 1988,1999 ---- +*************** +*** 2318,2326 **** + oparg_T *oap; + { + pos_T pos; +- #ifdef FEAT_VISUAL + struct block_def bd; +- #endif + int did_change = FALSE; + + if (u_save((linenr_T)(oap->start.lnum - 1), +--- 2279,2285 ---- +*************** +*** 2328,2334 **** + return; + + pos = oap->start; +- #ifdef FEAT_VISUAL + if (oap->block_mode) /* Visual block mode */ + { + for (; pos.lnum <= oap->end.lnum; ++pos.lnum) +--- 2287,2292 ---- +*************** +*** 2340,2346 **** + one_change = swapchars(oap->op_type, &pos, bd.textlen); + did_change |= one_change; + +! # ifdef FEAT_NETBEANS_INTG + if (netbeans_active() && one_change) + { + char_u *ptr = ml_get_buf(curbuf, pos.lnum, FALSE); +--- 2298,2304 ---- + one_change = swapchars(oap->op_type, &pos, bd.textlen); + did_change |= one_change; + +! #ifdef FEAT_NETBEANS_INTG + if (netbeans_active() && one_change) + { + char_u *ptr = ml_get_buf(curbuf, pos.lnum, FALSE); +*************** +*** 2350,2362 **** + netbeans_inserted(curbuf, pos.lnum, bd.textcol, + &ptr[bd.textcol], bd.textlen); + } +! # endif + } + if (did_change) + changed_lines(oap->start.lnum, 0, oap->end.lnum + 1, 0L); + } + else /* not block mode */ +- #endif + { + if (oap->motion_type == MLINE) + { +--- 2308,2319 ---- + netbeans_inserted(curbuf, pos.lnum, bd.textcol, + &ptr[bd.textcol], bd.textlen); + } +! #endif + } + if (did_change) + changed_lines(oap->start.lnum, 0, oap->end.lnum + 1, 0L); + } + else /* not block mode */ + { + if (oap->motion_type == MLINE) + { +*************** +*** 2412,2422 **** + } + } + +- #ifdef FEAT_VISUAL + if (!did_change && oap->is_VIsual) + /* No change: need to remove the Visual selection */ + redraw_curbuf_later(INVERTED); +- #endif + + /* + * Set '[ and '] marks. +--- 2369,2377 ---- +*************** +*** 3018,3027 **** + if ( oap->motion_type == MCHAR + && oap->start.col == 0 + && !oap->inclusive +- #ifdef FEAT_VISUAL + && (!oap->is_VIsual || *p_sel == 'o') + && !oap->block_mode +- #endif + && oap->end.col == 0 + && yanklines > 1) + { +--- 2973,2980 ---- +*************** +*** 3032,3040 **** + + y_current->y_size = yanklines; + y_current->y_type = yanktype; /* set the yank register type */ +- #ifdef FEAT_VISUAL + y_current->y_width = 0; +- #endif + y_current->y_array = (char_u **)lalloc_clear((long_u)(sizeof(char_u *) * + yanklines), TRUE); + +--- 2985,2991 ---- +*************** +*** 3047,3053 **** + y_idx = 0; + lnum = oap->start.lnum; + +- #ifdef FEAT_VISUAL + if (oap->block_mode) + { + /* Visual block mode */ +--- 2998,3003 ---- +*************** +*** 3057,3075 **** + if (curwin->w_curswant == MAXCOL && y_current->y_width > 0) + y_current->y_width--; + } +- #endif + + for ( ; lnum <= yankendlnum; lnum++, y_idx++) + { + switch (y_current->y_type) + { +- #ifdef FEAT_VISUAL + case MBLOCK: + block_prep(oap, &bd, lnum, FALSE); + if (yank_copy_line(&bd, y_idx) == FAIL) + goto fail; + break; +- #endif + + case MLINE: + if ((y_current->y_array[y_idx] = +--- 3007,3022 ---- +*************** +*** 3206,3214 **** + if (mess) /* Display message about yank? */ + { + if (yanktype == MCHAR +- #ifdef FEAT_VISUAL + && !oap->block_mode +- #endif + && yanklines == 1) + yanklines = 0; + /* Some versions of Vi use ">=" here, some don't... */ +--- 3153,3159 ---- +*************** +*** 3218,3234 **** + update_topline_redraw(); + if (yanklines == 1) + { +- #ifdef FEAT_VISUAL + if (oap->block_mode) + MSG(_("block of 1 line yanked")); + else +- #endif + MSG(_("1 line yanked")); + } +- #ifdef FEAT_VISUAL + else if (oap->block_mode) + smsg((char_u *)_("block of %ld lines yanked"), yanklines); +- #endif + else + smsg((char_u *)_("%ld lines yanked"), yanklines); + } +--- 3163,3175 ---- +*************** +*** 3239,3249 **** + */ + curbuf->b_op_start = oap->start; + curbuf->b_op_end = oap->end; +! if (yanktype == MLINE +! #ifdef FEAT_VISUAL +! && !oap->block_mode +! #endif +! ) + { + curbuf->b_op_start.col = 0; + curbuf->b_op_end.col = MAXCOL; +--- 3180,3186 ---- + */ + curbuf->b_op_start = oap->start; + curbuf->b_op_end = oap->end; +! if (yanktype == MLINE && !oap->block_mode) + { + curbuf->b_op_start.col = 0; + curbuf->b_op_end.col = MAXCOL; +*************** +*** 3380,3386 **** + long i; /* index in y_array[] */ + int y_type; + long y_size; +- #ifdef FEAT_VISUAL + int oldlen; + long y_width = 0; + colnr_T vcol; +--- 3317,3322 ---- +*************** +*** 3388,3394 **** + int incr = 0; + long j; + struct block_def bd; +- #endif + char_u **y_array = NULL; + long nr_lines = 0; + pos_T new_cursor; +--- 3324,3329 ---- +*************** +*** 3497,3510 **** + get_yank_register(regname, FALSE); + + y_type = y_current->y_type; +- #ifdef FEAT_VISUAL + y_width = y_current->y_width; +- #endif + y_size = y_current->y_size; + y_array = y_current->y_array; + } + +- #ifdef FEAT_VISUAL + if (y_type == MLINE) + { + if (flags & PUT_LINE_SPLIT) +--- 3432,3442 ---- +*************** +*** 3535,3541 **** + curbuf->b_op_start = curwin->w_cursor; /* default for '[ mark */ + curbuf->b_op_end = curwin->w_cursor; /* default for '] mark */ + } +- #endif + + if (flags & PUT_LINE) /* :put command or "p" in Visual line mode. */ + y_type = MLINE; +--- 3467,3472 ---- +*************** +*** 3547,3553 **** + goto end; + } + +- #ifdef FEAT_VISUAL + if (y_type == MBLOCK) + { + lnum = curwin->w_cursor.lnum + y_size + 1; +--- 3478,3483 ---- +*************** +*** 3556,3564 **** + if (u_save(curwin->w_cursor.lnum - 1, lnum) == FAIL) + goto end; + } +! else +! #endif +! if (y_type == MLINE) + { + lnum = curwin->w_cursor.lnum; + #ifdef FEAT_FOLDING +--- 3486,3492 ---- + if (u_save(curwin->w_cursor.lnum - 1, lnum) == FAIL) + goto end; + } +! else if (y_type == MLINE) + { + lnum = curwin->w_cursor.lnum; + #ifdef FEAT_FOLDING +*************** +*** 3610,3616 **** + lnum = curwin->w_cursor.lnum; + col = curwin->w_cursor.col; + +- #ifdef FEAT_VISUAL + /* + * Block mode + */ +--- 3538,3543 ---- +*************** +*** 3792,3798 **** + curwin->w_cursor.lnum = lnum; + } + else +- #endif + { + /* + * Character or Line mode +--- 3719,3724 ---- +*************** +*** 3866,3882 **** + curwin->w_cursor.col += (colnr_T)(totlen - 1); + } + } +- #ifdef FEAT_VISUAL + if (VIsual_active) + lnum++; +! #endif +! } while ( +! #ifdef FEAT_VISUAL +! VIsual_active && lnum <= curbuf->b_visual.vi_end.lnum +! #else +! FALSE /* stop after 1 paste */ +! #endif +! ); + + curbuf->b_op_end = curwin->w_cursor; + /* For "CTRL-O p" in Insert mode, put cursor after last char */ +--- 3792,3800 ---- + curwin->w_cursor.col += (colnr_T)(totlen - 1); + } + } + if (VIsual_active) + lnum++; +! } while (VIsual_active && lnum <= curbuf->b_visual.vi_end.lnum); + + curbuf->b_op_end = curwin->w_cursor; + /* For "CTRL-O p" in Insert mode, put cursor after last char */ +*************** +*** 4038,4046 **** + 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(); +--- 3956,3962 ---- +*************** +*** 4729,4739 **** + return; + curwin->w_cursor = oap->start; + +- #ifdef FEAT_VISUAL + if (oap->is_VIsual) + /* When there is no change: need to remove the Visual selection */ + redraw_curbuf_later(INVERTED); +- #endif + + /* Set '[ mark at the start of the formatted area */ + curbuf->b_op_start = oap->start; +--- 4645,4653 ---- +*************** +*** 4765,4771 **** + saved_cursor.lnum = 0; + } + +- #ifdef FEAT_VISUAL + if (oap->is_VIsual) + { + win_T *wp; +--- 4679,4684 ---- +*************** +*** 4783,4789 **** + } + } + } +- #endif + } + + #if defined(FEAT_EVAL) || defined(PROTO) +--- 4696,4701 ---- +*************** +*** 4794,4804 **** + op_formatexpr(oap) + oparg_T *oap; + { +- # ifdef FEAT_VISUAL + if (oap->is_VIsual) + /* When there is no change: need to remove the Visual selection */ + redraw_curbuf_later(INVERTED); +- # endif + + if (fex_format(oap->start.lnum, oap->line_count, NUL) != 0) + /* As documented: when 'formatexpr' returns non-zero fall back to +--- 4706,4714 ---- +*************** +*** 5238,5244 **** + return FALSE; + } + +- #ifdef FEAT_VISUAL + /* + * prepare a few things for block mode yank/delete/tilde + * +--- 5148,5153 ---- +*************** +*** 5397,5403 **** + bdp->textcol = (colnr_T) (pstart - line); + bdp->textstart = pstart; + } +- #endif /* FEAT_VISUAL */ + + #ifdef FEAT_RIGHTLEFT + static void reverse_line __ARGS((char_u *s)); +--- 5306,5311 ---- +*************** +*** 5748,5766 **** + str = skipwhite(skiptowhite(str)); + if (STRNCMP(str, "CHAR", 4) == 0) + y_current->y_type = MCHAR; +- #ifdef FEAT_VISUAL + else if (STRNCMP(str, "BLOCK", 5) == 0) + y_current->y_type = MBLOCK; +- #endif + else + y_current->y_type = MLINE; + /* get the block width; if it's missing we get a zero, which is OK */ + str = skipwhite(skiptowhite(str)); +- #ifdef FEAT_VISUAL + y_current->y_width = getdigits(&str); +- #else +- (void)getdigits(&str); +- #endif + } + + while (!(eof = viminfo_readline(virp)) +--- 5656,5668 ---- +*************** +*** 5868,5878 **** + case MCHAR: + type = (char_u *)"CHAR"; + break; +- #ifdef FEAT_VISUAL + case MBLOCK: + type = (char_u *)"BLOCK"; + break; +- #endif + default: + sprintf((char *)IObuff, _("E574: Unknown register type %d"), + y_regs[i].y_type); +--- 5770,5778 ---- +*************** +*** 5886,5898 **** + fprintf(fp, "\"%c", c); + if (c == execreg_lastc) + fprintf(fp, "@"); +! fprintf(fp, "\t%s\t%d\n", type, +! #ifdef FEAT_VISUAL +! (int)y_regs[i].y_width +! #else +! 0 +! #endif +! ); + + /* If max_num_lines < 0, then we save ALL the lines in the register */ + if (max_num_lines > 0 && num_lines > max_num_lines) +--- 5786,5792 ---- + fprintf(fp, "\"%c", c); + if (c == execreg_lastc) + fprintf(fp, "@"); +! fprintf(fp, "\t%s\t%d\n", type, (int)y_regs[i].y_width); + + /* If max_num_lines < 0, then we save ALL the lines in the register */ + if (max_num_lines > 0 && num_lines > max_num_lines) +*************** +*** 6039,6048 **** + { + struct yankreg *old_y_previous, *old_y_current; + pos_T old_cursor; +- #ifdef FEAT_VISUAL + pos_T old_visual; + int old_visual_mode; +- #endif + colnr_T old_curswant; + int old_set_curswant; + pos_T old_op_start, old_op_end; +--- 5933,5940 ---- +*************** +*** 6063,6072 **** + old_set_curswant = curwin->w_set_curswant; + old_op_start = curbuf->b_op_start; + old_op_end = curbuf->b_op_end; +- #ifdef FEAT_VISUAL + old_visual = VIsual; + old_visual_mode = VIsual_mode; +- #endif + clear_oparg(&oa); + oa.regname = (cbd == &clip_plus ? '+' : '*'); + oa.op_type = OP_YANK; +--- 5955,5962 ---- +*************** +*** 6084,6093 **** + curwin->w_set_curswant = old_set_curswant; + curbuf->b_op_start = old_op_start; + curbuf->b_op_end = old_op_end; +- #ifdef FEAT_VISUAL + VIsual = old_visual; + VIsual_mode = old_visual_mode; +- #endif + } + else + { +--- 5974,5981 ---- +*************** +*** 6190,6196 **** + } + + +- # if defined(FEAT_VISUAL) || defined(FEAT_EVAL) + /* + * If we have written to a clipboard register, send the text to the clipboard. + */ +--- 6078,6083 ---- +*************** +*** 6208,6214 **** + clip_gen_set_selection(&clip_plus); + } + } +- # endif + + #endif /* FEAT_CLIPBOARD || PROTO */ + +--- 6095,6100 ---- +*************** +*** 6273,6282 **** + + if (y_current->y_array != NULL) + { +- #ifdef FEAT_VISUAL + if (reglen != NULL && y_current->y_type == MBLOCK) + *reglen = y_current->y_width; +- #endif + return y_current->y_type; + } + return MAUTO; +--- 6159,6166 ---- +*************** +*** 6454,6464 **** + get_yank_register(name, TRUE); + if (!y_append && !must_append) + free_yank_all(); +- #ifndef FEAT_VISUAL +- /* Just in case - make sure we don't use MBLOCK */ +- if (yank_type == MBLOCK) +- yank_type = MAUTO; +- #endif + str_to_reg(y_current, yank_type, str, len, block_len); + + # ifdef FEAT_CLIPBOARD +--- 6338,6343 ---- +*************** +*** 6496,6504 **** + int append = FALSE; /* append to last line in register */ + char_u *s; + char_u **pp; +- #ifdef FEAT_VISUAL + long maxlen; +- #endif + + if (y_ptr->y_array == NULL) /* NULL means empty register */ + y_ptr->y_size = 0; +--- 6375,6381 ---- +*************** +*** 6539,6547 **** + pp[lnum] = y_ptr->y_array[lnum]; + vim_free(y_ptr->y_array); + y_ptr->y_array = pp; +- #ifdef FEAT_VISUAL + maxlen = 0; +- #endif + + /* + * Find the end of each line and save it into the array. +--- 6416,6422 ---- +*************** +*** 6552,6561 **** + if (str[i] == '\n') + break; + i -= start; /* i is now length of line */ +- #ifdef FEAT_VISUAL + if (i > maxlen) + maxlen = i; +- #endif + if (append) + { + --lnum; +--- 6427,6434 ---- +*************** +*** 6585,6596 **** + } + y_ptr->y_type = type; + y_ptr->y_size = lnum; +- # ifdef FEAT_VISUAL + if (type == MBLOCK) + y_ptr->y_width = (blocklen < 0 ? maxlen - 1 : blocklen); + else + y_ptr->y_width = 0; +- # endif + } + #endif /* FEAT_CLIPBOARD || FEAT_EVAL || PROTO */ + +--- 6458,6467 ---- +*************** +*** 6684,6695 **** + long word_count_cursor = 0; + int eol_size; + long last_check = 100000L; +- #ifdef FEAT_VISUAL + long line_count_selected = 0; + pos_T min_pos, max_pos; + oparg_T oparg; + struct block_def bd; +- #endif + + /* + * Compute the length of the file in characters. +--- 6555,6564 ---- +*************** +*** 6705,6711 **** + else + eol_size = 1; + +- #ifdef FEAT_VISUAL + if (VIsual_active) + { + if (lt(VIsual, curwin->w_cursor)) +--- 6574,6579 ---- +*************** +*** 6749,6755 **** + } + line_count_selected = max_pos.lnum - min_pos.lnum + 1; + } +- #endif + + for (lnum = 1; lnum <= curbuf->b_ml.ml_line_count; ++lnum) + { +--- 6617,6622 ---- +*************** +*** 6762,6768 **** + last_check = byte_count + 100000L; + } + +- #ifdef FEAT_VISUAL + /* Do extra processing for VIsual mode. */ + if (VIsual_active + && lnum >= min_pos.lnum && lnum <= max_pos.lnum) +--- 6629,6634 ---- +*************** +*** 6773,6785 **** + switch (VIsual_mode) + { + case Ctrl_V: +! # ifdef FEAT_VIRTUALEDIT + virtual_op = virtual_active(); +! # endif + block_prep(&oparg, &bd, lnum, 0); +! # ifdef FEAT_VIRTUALEDIT + virtual_op = MAYBE; +! # endif + s = bd.textstart; + len = (long)bd.textlen; + break; +--- 6639,6651 ---- + switch (VIsual_mode) + { + case Ctrl_V: +! #ifdef FEAT_VIRTUALEDIT + virtual_op = virtual_active(); +! #endif + block_prep(&oparg, &bd, lnum, 0); +! #ifdef FEAT_VIRTUALEDIT + virtual_op = MAYBE; +! #endif + s = bd.textstart; + len = (long)bd.textlen; + break; +*************** +*** 6811,6817 **** + } + } + else +- #endif + { + /* In non-visual mode, check for the line the cursor is on */ + if (lnum == curwin->w_cursor.lnum) +--- 6677,6682 ---- +*************** +*** 6833,6839 **** + if (!curbuf->b_p_eol && curbuf->b_p_bin) + byte_count -= eol_size; + +- #ifdef FEAT_VISUAL + if (VIsual_active) + { + if (VIsual_mode == Ctrl_V && curwin->w_curswant < MAXCOL) +--- 6698,6703 ---- +*************** +*** 6864,6870 **** + byte_count_cursor, byte_count); + } + else +- #endif + { + p = ml_get_curline(); + validate_virtcol(); +--- 6728,6733 ---- +*** ../vim-7.4.211/src/option.c 2014-03-12 18:55:52.100906804 +0100 +--- src/option.c 2014-03-23 13:28:12.359168452 +0100 +*************** +*** 1629,1639 **** + #endif + SCRIPTID_INIT}, + {"keymodel", "km", P_STRING|P_VI_DEF|P_COMMA|P_NODUP, +- #ifdef FEAT_VISUAL + (char_u *)&p_km, PV_NONE, +- #else +- (char_u *)NULL, PV_NONE, +- #endif + {(char_u *)"", (char_u *)0L} SCRIPTID_INIT}, + {"keywordprg", "kp", P_STRING|P_EXPAND|P_VI_DEF|P_SECURE, + (char_u *)&p_kp, PV_KP, +--- 1629,1635 ---- +*************** +*** 2190,2208 **** + (char_u *)&p_secure, PV_NONE, + {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, + {"selection", "sel", P_STRING|P_VI_DEF, +- #ifdef FEAT_VISUAL + (char_u *)&p_sel, PV_NONE, +- #else +- (char_u *)NULL, PV_NONE, +- #endif + {(char_u *)"inclusive", (char_u *)0L} + SCRIPTID_INIT}, + {"selectmode", "slm", P_STRING|P_VI_DEF|P_COMMA|P_NODUP, +- #ifdef FEAT_VISUAL + (char_u *)&p_slm, PV_NONE, +- #else +- (char_u *)NULL, PV_NONE, +- #endif + {(char_u *)"", (char_u *)0L} SCRIPTID_INIT}, + {"sessionoptions", "ssop", P_STRING|P_VI_DEF|P_COMMA|P_NODUP, + #ifdef FEAT_SESSION +--- 2186,2196 ---- +*************** +*** 2979,2991 **** + static char *(p_wak_values[]) = {"yes", "menu", "no", NULL}; + #endif + static char *(p_mousem_values[]) = {"extend", "popup", "popup_setpos", "mac", NULL}; +- #ifdef FEAT_VISUAL + static char *(p_sel_values[]) = {"inclusive", "exclusive", "old", NULL}; + static char *(p_slm_values[]) = {"mouse", "key", "cmd", NULL}; +- #endif +- #ifdef FEAT_VISUAL + static char *(p_km_values[]) = {"startsel", "stopsel", NULL}; +- #endif + #ifdef FEAT_BROWSE + static char *(p_bsdir_values[]) = {"current", "last", "buffer", NULL}; + #endif +--- 2967,2975 ---- +*************** +*** 6578,6584 **** + } + #endif + +- #ifdef FEAT_VISUAL + /* 'selection' */ + else if (varp == &p_sel) + { +--- 6562,6567 ---- +*************** +*** 6593,6599 **** + if (check_opt_strings(p_slm, p_slm_values, TRUE) != OK) + errmsg = e_invarg; + } +- #endif + + #ifdef FEAT_BROWSE + /* 'browsedir' */ +--- 6576,6581 ---- +*************** +*** 6605,6611 **** + } + #endif + +- #ifdef FEAT_VISUAL + /* 'keymodel' */ + else if (varp == &p_km) + { +--- 6587,6592 ---- +*************** +*** 6617,6623 **** + km_startsel = (vim_strchr(p_km, 'a') != NULL); + } + } +- #endif + + /* 'mousemodel' */ + else if (varp == &p_mousem) +--- 6598,6603 ---- +*** ../vim-7.4.211/src/os_msdos.c 2013-05-06 04:06:04.000000000 +0200 +--- src/os_msdos.c 2014-03-23 13:28:24.855168644 +0100 +*************** +*** 2270,2278 **** + default: + case 'L': type = MLINE; break; + case 'C': type = MCHAR; break; +- #ifdef FEAT_VISUAL + case 'B': type = MBLOCK; break; +- #endif + } + } + +--- 2270,2276 ---- +*************** +*** 2799,2807 **** + default: + case MLINE: clip_sel_type = "L"; break; + case MCHAR: clip_sel_type = "C"; break; +- #ifdef FEAT_VISUAL + case MBLOCK: clip_sel_type = "B"; break; +- #endif + } + + movedata( +--- 2797,2803 ---- +*** ../vim-7.4.211/src/os_qnx.c 2011-09-21 19:48:08.000000000 +0200 +--- src/os_qnx.c 2014-03-23 13:28:38.815168858 +0100 +*************** +*** 78,86 **** + default: /* fallthrough to line type */ + case 'L': type = MLINE; break; + case 'C': type = MCHAR; break; +- #ifdef FEAT_VISUAL + case 'B': type = MBLOCK; break; +- #endif + } + is_type_set = TRUE; + } +--- 78,84 ---- +*************** +*** 143,151 **** + default: /* fallthrough to MLINE */ + case MLINE: *vim_clip = 'L'; break; + case MCHAR: *vim_clip = 'C'; break; +- #ifdef FEAT_VISUAL + case MBLOCK: *vim_clip = 'B'; break; +- #endif + } + + vim_strncpy(text_clip, str, len); +--- 141,147 ---- +*** ../vim-7.4.211/src/quickfix.c 2014-03-12 19:41:37.096948866 +0100 +--- src/quickfix.c 2014-03-23 13:28:50.907169043 +0100 +*************** +*** 2347,2355 **** + else + height = QF_WINHEIGHT; + +- #ifdef FEAT_VISUAL + reset_VIsual_and_resel(); /* stop Visual mode */ +- #endif + #ifdef FEAT_GUI + need_mouse_correct = TRUE; + #endif +--- 2347,2353 ---- +*** ../vim-7.4.211/src/regexp.c 2013-11-21 17:12:55.000000000 +0100 +--- src/regexp.c 2014-03-23 13:29:14.495169404 +0100 +*************** +*** 4179,4187 **** + - (*mb_head_off)(regline, reginput - 1), reg_buf); + return -1; + } +- + #endif +! #ifdef FEAT_VISUAL + static int reg_match_visual __ARGS((void)); + + /* +--- 4179,4186 ---- + - (*mb_head_off)(regline, reginput - 1), reg_buf); + return -1; + } + #endif +! + static int reg_match_visual __ARGS((void)); + + /* +*************** +*** 4258,4264 **** + } + return TRUE; + } +- #endif + + #define ADVANCE_REGINPUT() mb_ptr_adv(reginput) + +--- 4257,4262 ---- +*************** +*** 4440,4448 **** + break; + + case RE_VISUAL: +- #ifdef FEAT_VISUAL + if (!reg_match_visual()) +- #endif + status = RA_NOMATCH; + break; + +--- 4438,4444 ---- +*** ../vim-7.4.211/src/regexp_nfa.c 2013-11-28 14:20:11.000000000 +0100 +--- src/regexp_nfa.c 2014-03-23 13:29:31.367169663 +0100 +*************** +*** 6403,6416 **** + break; + + case NFA_VISUAL: +- #ifdef FEAT_VISUAL + result = reg_match_visual(); + if (result) + { + add_here = TRUE; + add_state = t->state->out; + } +- #endif + break; + + case NFA_MOPEN1: +--- 6403,6414 ---- +*** ../vim-7.4.211/src/screen.c 2013-12-11 15:51:54.000000000 +0100 +--- src/screen.c 2014-03-23 13:32:10.787172106 +0100 +*************** +*** 446,453 **** + #endif + } + +- #if defined(FEAT_RUBY) || defined(FEAT_PERL) || defined(FEAT_VISUAL) || \ +- (defined(FEAT_CLIPBOARD) && defined(FEAT_X11)) || defined(PROTO) + /* + * update all windows that are editing the current buffer + */ +--- 446,451 ---- +*************** +*** 458,464 **** + redraw_curbuf_later(type); + update_screen(type); + } +- #endif + + /* + * update_screen() +--- 456,461 ---- +*************** +*** 596,609 **** + && curwin->w_botfill == curwin->w_old_botfill + #endif + && curwin->w_topline == curwin->w_lines[0].wl_lnum) +- #ifdef FEAT_VISUAL + || (type == INVERTED + && VIsual_active + && curwin->w_old_cursor_lnum == curwin->w_cursor.lnum + && curwin->w_old_visual_mode == VIsual_mode + && (curwin->w_valid & VALID_VIRTCOL) + && curwin->w_old_curswant == curwin->w_curswant) +- #endif + )) + curwin->w_redr_type = type; + +--- 593,604 ---- +*************** +*** 1030,1039 **** + updating. 0 when no mid area updating. */ + int bot_start = 999;/* first row of the bot area that needs + updating. 999 when no bot area updating */ +- #ifdef FEAT_VISUAL + int scrolled_down = FALSE; /* TRUE when scrolled down when + w_topline got smaller a bit */ +- #endif + #ifdef FEAT_SEARCH_EXTRA + matchitem_T *cur; /* points to the match list */ + int top_to_mod = FALSE; /* redraw above mod_top */ +--- 1025,1032 ---- +*************** +*** 1354,1362 **** + /* Need to update rows that are new, stop at the + * first one that scrolled down. */ + top_end = i; +- #ifdef FEAT_VISUAL + scrolled_down = TRUE; +- #endif + + /* Move the entries that were scrolled, disable + * the entries for the lines to be redrawn. */ +--- 1347,1353 ---- +*************** +*** 1513,1519 **** + type = NOT_VALID; + } + +- #ifdef FEAT_VISUAL + /* check if we are updating or removing the inverted part */ + if ((VIsual_active && buf == curwin->w_buffer) + || (wp->w_old_cursor_lnum != 0 && type != NOT_VALID)) +--- 1504,1509 ---- +*************** +*** 1708,1714 **** + wp->w_old_visual_lnum = 0; + wp->w_old_visual_col = 0; + } +- #endif /* FEAT_VISUAL */ + + #if defined(FEAT_SYN_HL) || defined(FEAT_SEARCH_EXTRA) + /* reset got_int, otherwise regexp won't work */ +--- 1698,1703 ---- +*************** +*** 2670,2676 **** + * 6. set highlighting for the Visual area an other text. + * If all folded lines are in the Visual area, highlight the line. + */ +- #ifdef FEAT_VISUAL + if (VIsual_active && wp->w_buffer == curwin->w_buffer) + { + if (ltoreq(curwin->w_cursor, VIsual)) +--- 2659,2664 ---- +*************** +*** 2718,2724 **** + } + } + } +- #endif + + #ifdef FEAT_SYN_HL + /* Show 'cursorcolumn' in the fold line. */ +--- 2706,2711 ---- +*************** +*** 2876,2885 **** + int fromcol, tocol; /* start/end of inverting */ + int fromcol_prev = -2; /* start of inverting after cursor */ + int noinvcur = FALSE; /* don't invert the cursor */ +- #ifdef FEAT_VISUAL + pos_T *top, *bot; + int lnum_in_visual_area = FALSE; +- #endif + pos_T pos; + long v; + +--- 2863,2870 ---- +*************** +*** 3090,3096 **** + */ + fromcol = -10; + tocol = MAXCOL; +- #ifdef FEAT_VISUAL + if (VIsual_active && wp->w_buffer == curwin->w_buffer) + { + /* Visual is after curwin->w_cursor */ +--- 3075,3080 ---- +*************** +*** 3183,3191 **** + /* + * handle 'incsearch' and ":s///c" highlighting + */ +! else +! #endif /* FEAT_VISUAL */ +! if (highlight_match + && wp == curwin + && lnum >= curwin->w_cursor.lnum + && lnum <= curwin->w_cursor.lnum + search_match_lines) +--- 3167,3173 ---- + /* + * handle 'incsearch' and ":s///c" highlighting + */ +! else if (highlight_match + && wp == curwin + && lnum >= curwin->w_cursor.lnum + && lnum <= curwin->w_cursor.lnum + search_match_lines) +*************** +*** 3324,3330 **** + mb_ptr_adv(ptr); + } + +- #if defined(FEAT_SYN_HL) || defined(FEAT_VIRTUALEDIT) || defined(FEAT_VISUAL) + /* When: + * - 'cuc' is set, or + * - 'colorcolumn' is set, or +--- 3306,3311 ---- +*************** +*** 3333,3359 **** + * the end of the line may be before the start of the displayed part. + */ + if (vcol < v && ( +! # ifdef FEAT_SYN_HL +! wp->w_p_cuc +! || draw_color_col +! # if defined(FEAT_VIRTUALEDIT) || defined(FEAT_VISUAL) +! || +! # endif +! # endif +! # ifdef FEAT_VIRTUALEDIT +! virtual_active() +! # ifdef FEAT_VISUAL +! || +! # endif +! # endif +! # ifdef FEAT_VISUAL +! (VIsual_active && wp->w_buffer == curwin->w_buffer) +! # endif +! )) + { + vcol = v; + } +- #endif + + /* Handle a character that's not completely on the screen: Put ptr at + * that character but skip the first few screen characters. */ +--- 3314,3329 ---- + * the end of the line may be before the start of the displayed part. + */ + if (vcol < v && ( +! #ifdef FEAT_SYN_HL +! wp->w_p_cuc || draw_color_col || +! #endif +! #ifdef FEAT_VIRTUALEDIT +! virtual_active() || +! #endif +! (VIsual_active && wp->w_buffer == curwin->w_buffer))) + { + vcol = v; + } + + /* Handle a character that's not completely on the screen: Put ptr at + * that character but skip the first few screen characters. */ +*************** +*** 4500,4508 **** + && ((wp->w_p_list && lcs_eol > 0) + || ((fromcol >= 0 || fromcol_prev >= 0) + && tocol > vcol +- #ifdef FEAT_VISUAL + && VIsual_mode != Ctrl_V +- #endif + && ( + # ifdef FEAT_RIGHTLEFT + wp->w_p_rl ? (col >= 0) : +--- 4470,4476 ---- +*************** +*** 4854,4864 **** + #endif + if (lcs_eol == lcs_eol_one + && ((area_attr != 0 && vcol == fromcol +- #ifdef FEAT_VISUAL + && (VIsual_mode != Ctrl_V + || lnum == VIsual.lnum + || lnum == curwin->w_cursor.lnum) +- #endif + && c == NUL) + #ifdef FEAT_SEARCH_EXTRA + /* highlight 'hlsearch' match at end of line */ +--- 4822,4830 ---- +*************** +*** 9659,9668 **** + do_mode = ((p_smd && msg_silent == 0) + && ((State & INSERT) + || restart_edit +! #ifdef FEAT_VISUAL +! || VIsual_active +! #endif +! )); + if (do_mode || Recording) + { + /* +--- 9625,9631 ---- + do_mode = ((p_smd && msg_silent == 0) + && ((State & INSERT) + || restart_edit +! || VIsual_active)); + if (do_mode || Recording) + { + /* +*************** +*** 9790,9796 **** + if ((State & INSERT) && p_paste) + MSG_PUTS_ATTR(_(" (paste)"), attr); + +- #ifdef FEAT_VISUAL + if (VIsual_active) + { + char *p; +--- 9753,9758 ---- +*************** +*** 9810,9816 **** + } + MSG_PUTS_ATTR(_(p), attr); + } +- #endif + MSG_PUTS_ATTR(" --", attr); + } + +--- 9772,9777 ---- +*************** +*** 9839,9849 **** + msg_clr_cmdline(); + + #ifdef FEAT_CMDL_INFO +- # ifdef FEAT_VISUAL + /* In Visual mode the size of the selected area must be redrawn. */ + if (VIsual_active) + clear_showcmd(); +- # endif + + /* If the last window has no status line, the ruler is after the mode + * message and must be redrawn */ +--- 9800,9808 ---- +*** ../vim-7.4.211/src/search.c 2014-01-14 21:31:30.000000000 +0100 +--- src/search.c 2014-03-23 13:34:46.351174489 +0100 +*************** +*** 506,512 **** + #endif + + /* +! * lowest level search function. + * Search for 'count'th occurrence of pattern 'pat' in direction 'dir'. + * Start at position 'pos' and return the found position in 'pos'. + * +--- 506,512 ---- + #endif + + /* +! * Lowest level search function. + * Search for 'count'th occurrence of pattern 'pat' in direction 'dir'. + * Start at position 'pos' and return the found position in 'pos'. + * +*************** +*** 3198,3204 **** + cls_bigword = bigword; + clearpos(&start_pos); + +- #ifdef FEAT_VISUAL + /* Correct cursor when 'selection' is exclusive */ + if (VIsual_active && *p_sel == 'e' && lt(VIsual, curwin->w_cursor)) + dec_cursor(); +--- 3198,3203 ---- +*************** +*** 3208,3214 **** + * character, select the word and/or white space under the cursor. + */ + if (!VIsual_active || equalpos(curwin->w_cursor, VIsual)) +- #endif + { + /* + * Go to start of current word or white space. +--- 3207,3212 ---- +*************** +*** 3245,3251 **** + include_white = TRUE; + } + +- #ifdef FEAT_VISUAL + if (VIsual_active) + { + /* should do something when inclusive == FALSE ! */ +--- 3243,3248 ---- +*************** +*** 3253,3259 **** + redraw_curbuf_later(INVERTED); /* update the inversion */ + } + else +- #endif + { + oap->start = start_pos; + oap->motion_type = MCHAR; +--- 3250,3255 ---- +*************** +*** 3267,3273 **** + while (count > 0) + { + inclusive = TRUE; +- #ifdef FEAT_VISUAL + if (VIsual_active && lt(curwin->w_cursor, VIsual)) + { + /* +--- 3263,3268 ---- +*************** +*** 3288,3294 **** + } + } + else +- #endif + { + /* + * Move cursor forward one word and/or white area. +--- 3283,3288 ---- +*************** +*** 3334,3351 **** + back_in_line(); + if (cls() == 0 && curwin->w_cursor.col > 0) + { +- #ifdef FEAT_VISUAL + if (VIsual_active) + VIsual = curwin->w_cursor; + else +- #endif + oap->start = curwin->w_cursor; + } + } + curwin->w_cursor = pos; /* put cursor back at end */ + } + +- #ifdef FEAT_VISUAL + if (VIsual_active) + { + if (*p_sel == 'e' && inclusive && ltoreq(VIsual, curwin->w_cursor)) +--- 3328,3342 ---- +*************** +*** 3357,3363 **** + } + } + else +- #endif + oap->inclusive = inclusive; + + return OK; +--- 3348,3353 ---- +*************** +*** 3384,3390 **** + pos = start_pos; + findsent(FORWARD, 1L); /* Find start of next sentence. */ + +- #ifdef FEAT_VISUAL + /* + * When the Visual area is bigger than one character: Extend it. + */ +--- 3374,3379 ---- +*************** +*** 3471,3477 **** + } + return OK; + } +- #endif + + /* + * If the cursor started on a blank, check if it is just before the start +--- 3460,3465 ---- +*************** +*** 3521,3527 **** + find_first_blank(&start_pos); + } + +- #ifdef FEAT_VISUAL + if (VIsual_active) + { + /* Avoid getting stuck with "is" on a single space before a sentence. */ +--- 3509,3514 ---- +*************** +*** 3534,3540 **** + redraw_curbuf_later(INVERTED); /* update the inversion */ + } + else +- #endif + { + /* include a newline after the sentence, if there is one */ + if (incl(&curwin->w_cursor) == -1) +--- 3521,3526 ---- +*************** +*** 3574,3582 **** + /* + * If we start on '(', '{', ')', '}', etc., use the whole block inclusive. + */ +- #ifdef FEAT_VISUAL + if (!VIsual_active || equalpos(VIsual, curwin->w_cursor)) +- #endif + { + setpcmark(); + if (what == '{') /* ignore indent */ +--- 3560,3566 ---- +*************** +*** 3587,3593 **** + /* cursor on '(' or '{', move cursor just after it */ + ++curwin->w_cursor.col; + } +- #ifdef FEAT_VISUAL + else if (lt(VIsual, curwin->w_cursor)) + { + old_start = VIsual; +--- 3571,3576 ---- +*************** +*** 3595,3601 **** + } + else + old_end = VIsual; +- #endif + + /* + * Search backwards for unclosed '(', '{', etc.. +--- 3578,3583 ---- +*************** +*** 3641,3647 **** + if (decl(&curwin->w_cursor) != 0) + break; + } +- #ifdef FEAT_VISUAL + /* + * In Visual mode, when the resulting area is not bigger than what we + * started with, extend it to the next block, and then exclude again. +--- 3623,3628 ---- +*************** +*** 3666,3676 **** + curwin->w_cursor = *end_pos; + } + else +- #endif + break; + } + +- #ifdef FEAT_VISUAL + if (VIsual_active) + { + if (*p_sel == 'e') +--- 3647,3655 ---- +*************** +*** 3683,3689 **** + showmode(); + } + else +- #endif + { + oap->start = start_pos; + oap->motion_type = MCHAR; +--- 3662,3667 ---- +*************** +*** 3807,3823 **** + old_pos = curwin->w_cursor; + old_end = curwin->w_cursor; /* remember where we started */ + old_start = old_end; +- #ifdef FEAT_VISUAL + if (!VIsual_active || *p_sel == 'e') +- #endif + decl(&old_end); /* old_end is inclusive */ + + /* + * If we start on "<aaa>" select that block. + */ +- #ifdef FEAT_VISUAL + if (!VIsual_active || equalpos(VIsual, curwin->w_cursor)) +- #endif + { + setpcmark(); + +--- 3785,3797 ---- +*************** +*** 3843,3849 **** + old_end = curwin->w_cursor; + } + } +- #ifdef FEAT_VISUAL + else if (lt(VIsual, curwin->w_cursor)) + { + old_start = VIsual; +--- 3817,3822 ---- +*************** +*** 3851,3857 **** + } + else + old_end = VIsual; +- #endif + + again: + /* +--- 3824,3829 ---- +*************** +*** 3951,3957 **** + } + } + +- #ifdef FEAT_VISUAL + if (VIsual_active) + { + /* If the end is before the start there is no text between tags, select +--- 3923,3928 ---- +*************** +*** 3966,3972 **** + showmode(); + } + else +- #endif + { + oap->start = start_pos; + oap->motion_type = MCHAR; +--- 3937,3942 ---- +*************** +*** 4010,4016 **** + + start_lnum = curwin->w_cursor.lnum; + +- #ifdef FEAT_VISUAL + /* + * When visual area is more than one line: extend it. + */ +--- 3980,3985 ---- +*************** +*** 4064,4070 **** + curwin->w_cursor.col = 0; + return retval; + } +- #endif + + /* + * First move back to the start_lnum of the paragraph or white lines +--- 4033,4038 ---- +*************** +*** 4136,4142 **** + while (start_lnum > 1 && linewhite(start_lnum - 1)) + --start_lnum; + +- #ifdef FEAT_VISUAL + if (VIsual_active) + { + /* Problem: when doing "Vipipip" nothing happens in a single white +--- 4104,4109 ---- +*************** +*** 4149,4155 **** + showmode(); + } + else +- #endif + { + oap->start.lnum = start_lnum; + oap->start.col = 0; +--- 4116,4121 ---- +*************** +*** 4247,4253 **** + int col_end; + int col_start = curwin->w_cursor.col; + int inclusive = FALSE; +- #ifdef FEAT_VISUAL + int vis_empty = TRUE; /* Visual selection <= 1 char */ + int vis_bef_curs = FALSE; /* Visual starts before cursor */ + int inside_quotes = FALSE; /* Looks like "i'" done before */ +--- 4213,4218 ---- +*************** +*** 4331,4347 **** + } + } + else +- #endif + +! if (line[col_start] == quotechar +! #ifdef FEAT_VISUAL +! || !vis_empty +! #endif +! ) + { + int first_col = col_start; + +- #ifdef FEAT_VISUAL + if (!vis_empty) + { + if (vis_bef_curs) +--- 4296,4306 ---- + } + } + else + +! if (line[col_start] == quotechar || !vis_empty) + { + int first_col = col_start; + + if (!vis_empty) + { + if (vis_bef_curs) +*************** +*** 4349,4355 **** + else + first_col = find_prev_quote(line, col_start, quotechar, NULL); + } +! #endif + /* The cursor is on a quote, we don't know if it's the opening or + * closing quote. Search from the start of the line to find out. + * Also do this when there is a Visual area, a' may leave the cursor +--- 4308,4314 ---- + else + first_col = find_prev_quote(line, col_start, quotechar, NULL); + } +! + /* The cursor is on a quote, we don't know if it's the opening or + * closing quote. Search from the start of the line to find out. + * Also do this when there is a Visual area, a' may leave the cursor +*************** +*** 4406,4419 **** + + /* Set start position. After vi" another i" must include the ". + * For v2i" include the quotes. */ +! if (!include && count < 2 +! #ifdef FEAT_VISUAL +! && (vis_empty || !inside_quotes) +! #endif +! ) + ++col_start; + curwin->w_cursor.col = col_start; +- #ifdef FEAT_VISUAL + if (VIsual_active) + { + /* Set the start of the Visual area when the Visual area was empty, we +--- 4365,4373 ---- + + /* Set start position. After vi" another i" must include the ". + * For v2i" include the quotes. */ +! if (!include && count < 2 && (vis_empty || !inside_quotes)) + ++col_start; + curwin->w_cursor.col = col_start; + if (VIsual_active) + { + /* Set the start of the Visual area when the Visual area was empty, we +*************** +*** 4433,4439 **** + } + } + else +- #endif + { + oap->start = curwin->w_cursor; + oap->motion_type = MCHAR; +--- 4387,4392 ---- +*************** +*** 4441,4454 **** + + /* Set end position. */ + curwin->w_cursor.col = col_end; +! if ((include || count > 1 +! #ifdef FEAT_VISUAL +! /* After vi" another i" must include the ". */ + || (!vis_empty && inside_quotes) +- #endif + ) && inc_cursor() == 2) + inclusive = TRUE; +- #ifdef FEAT_VISUAL + if (VIsual_active) + { + if (vis_empty || vis_bef_curs) +--- 4394,4403 ---- + + /* Set end position. */ + curwin->w_cursor.col = col_end; +! if ((include || count > 1 /* After vi" another i" must include the ". */ + || (!vis_empty && inside_quotes) + ) && inc_cursor() == 2) + inclusive = TRUE; + if (VIsual_active) + { + if (vis_empty || vis_bef_curs) +*************** +*** 4480,4486 **** + } + } + else +- #endif + { + /* Set inclusive and other oap's flags. */ + oap->inclusive = inclusive; +--- 4429,4434 ---- +*************** +*** 4491,4497 **** + + #endif /* FEAT_TEXTOBJ */ + +- #if defined(FEAT_VISUAL) || defined(PROTO) + static int is_one_char __ARGS((char_u *pattern)); + + /* +--- 4439,4444 ---- +*************** +*** 4690,4696 **** + vim_regfree(regmatch.regprog); + return result; + } +- #endif /* FEAT_VISUAL */ + + #if defined(FEAT_LISP) || defined(FEAT_CINDENT) || defined(FEAT_TEXTOBJ) \ + || defined(PROTO) +--- 4637,4642 ---- +*** ../vim-7.4.211/src/spell.c 2014-03-08 16:13:39.123462070 +0100 +--- src/spell.c 2014-03-23 13:35:15.195174931 +0100 +*************** +*** 10191,10197 **** + if (no_spell_checking(curwin)) + return; + +- #ifdef FEAT_VISUAL + if (VIsual_active) + { + /* Use the Visually selected text as the bad word. But reject +--- 10191,10196 ---- +*************** +*** 10209,10218 **** + ++badlen; + end_visual_mode(); + } +! else +! #endif +! /* Find the start of the badly spelled word. */ +! if (spell_move_to(curwin, FORWARD, TRUE, TRUE, NULL) == 0 + || curwin->w_cursor.col > prev_cursor.col) + { + /* No bad word or it starts after the cursor: use the word under the +--- 10208,10215 ---- + ++badlen; + end_visual_mode(); + } +! /* Find the start of the badly spelled word. */ +! else if (spell_move_to(curwin, FORWARD, TRUE, TRUE, NULL) == 0 + || curwin->w_cursor.col > prev_cursor.col) + { + /* No bad word or it starts after the cursor: use the word under the +*** ../vim-7.4.211/src/syntax.c 2013-11-28 18:53:47.000000000 +0100 +--- src/syntax.c 2014-03-23 13:35:30.379175164 +0100 +*************** +*** 6837,6846 **** + CENT("SignColumn term=standout ctermbg=Grey ctermfg=DarkBlue", + "SignColumn term=standout ctermbg=Grey ctermfg=DarkBlue guibg=Grey guifg=DarkBlue"), + #endif +- #ifdef FEAT_VISUAL + CENT("Visual term=reverse", + "Visual term=reverse guibg=LightGrey"), +- #endif + #ifdef FEAT_DIFF + CENT("DiffAdd term=bold ctermbg=LightBlue", + "DiffAdd term=bold ctermbg=LightBlue guibg=LightBlue"), +--- 6837,6844 ---- +*************** +*** 6927,6936 **** + CENT("SignColumn term=standout ctermbg=DarkGrey ctermfg=Cyan", + "SignColumn term=standout ctermbg=DarkGrey ctermfg=Cyan guibg=Grey guifg=Cyan"), + #endif +- #ifdef FEAT_VISUAL + CENT("Visual term=reverse", + "Visual term=reverse guibg=DarkGrey"), +- #endif + #ifdef FEAT_DIFF + CENT("DiffAdd term=bold ctermbg=DarkBlue", + "DiffAdd term=bold ctermbg=DarkBlue guibg=DarkBlue"), +--- 6925,6932 ---- +*** ../vim-7.4.211/src/term.c 2014-03-19 14:01:53.153903819 +0100 +--- src/term.c 2014-03-23 13:35:43.519175365 +0100 +*************** +*** 3456,3467 **** + return; + } + +- # ifdef FEAT_VISUAL + if (VIsual_active) + checkfor = MOUSE_VISUAL; +! else +! # endif +! if (State == HITRETURN || State == ASKMORE || State == SETWSIZE) + checkfor = MOUSE_RETURN; + else if (State & INSERT) + checkfor = MOUSE_INSERT; +--- 3456,3464 ---- + return; + } + + if (VIsual_active) + checkfor = MOUSE_VISUAL; +! else if (State == HITRETURN || State == ASKMORE || State == SETWSIZE) + checkfor = MOUSE_RETURN; + else if (State & INSERT) + checkfor = MOUSE_INSERT; +*** ../vim-7.4.211/src/ui.c 2013-07-13 20:57:08.000000000 +0200 +--- src/ui.c 2014-03-23 13:36:15.459175855 +0100 +*************** +*** 2610,2622 **** + if (on_sep_line) + return IN_SEP_LINE; + #endif +- #ifdef FEAT_VISUAL + if (flags & MOUSE_MAY_STOP_VIS) + { + end_visual_mode(); + redraw_curbuf_later(INVERTED); /* delete the inversion */ + } +- #endif + #if defined(FEAT_CMDWIN) && defined(FEAT_CLIPBOARD) + /* Continue a modeless selection in another window. */ + if (cmdwin_type != 0 && row < W_WINROW(curwin)) +--- 2610,2620 ---- +*************** +*** 2686,2717 **** + } + #endif + +- #ifdef FEAT_VISUAL + /* Before jumping to another buffer, or moving the cursor for a left + * click, stop Visual mode. */ + if (VIsual_active + && (wp->w_buffer != curwin->w_buffer + || (!on_status_line +! # ifdef FEAT_VERTSPLIT + && !on_sep_line +! # endif +! # ifdef FEAT_FOLDING + && ( +! # ifdef FEAT_RIGHTLEFT + wp->w_p_rl ? col < W_WIDTH(wp) - wp->w_p_fdc : +! # endif + col >= wp->w_p_fdc +! # ifdef FEAT_CMDWIN + + (cmdwin_type == 0 && wp == curwin ? 0 : 1) +- # endif +- ) + # endif + && (flags & MOUSE_MAY_STOP_VIS)))) + { + end_visual_mode(); + redraw_curbuf_later(INVERTED); /* delete the inversion */ + } +- #endif + #ifdef FEAT_CMDWIN + if (cmdwin_type != 0 && wp != curwin) + { +--- 2684,2713 ---- + } + #endif + + /* Before jumping to another buffer, or moving the cursor for a left + * click, stop Visual mode. */ + if (VIsual_active + && (wp->w_buffer != curwin->w_buffer + || (!on_status_line +! #ifdef FEAT_VERTSPLIT + && !on_sep_line +! #endif +! #ifdef FEAT_FOLDING + && ( +! # ifdef FEAT_RIGHTLEFT + wp->w_p_rl ? col < W_WIDTH(wp) - wp->w_p_fdc : +! # endif + col >= wp->w_p_fdc +! # ifdef FEAT_CMDWIN + + (cmdwin_type == 0 && wp == curwin ? 0 : 1) + # endif ++ ) ++ #endif + && (flags & MOUSE_MAY_STOP_VIS)))) + { + end_visual_mode(); + redraw_curbuf_later(INVERTED); /* delete the inversion */ + } + #ifdef FEAT_CMDWIN + if (cmdwin_type != 0 && wp != curwin) + { +*************** +*** 2801,2814 **** + #endif + else /* keep_window_focus must be TRUE */ + { +- #ifdef FEAT_VISUAL + /* before moving the cursor for a left click, stop Visual mode */ + if (flags & MOUSE_MAY_STOP_VIS) + { + end_visual_mode(); + redraw_curbuf_later(INVERTED); /* delete the inversion */ + } +- #endif + + #if defined(FEAT_CMDWIN) && defined(FEAT_CLIPBOARD) + /* Continue a modeless selection in another window. */ +--- 2797,2808 ---- +*************** +*** 2933,2939 **** + if (mouse_comp_pos(curwin, &row, &col, &curwin->w_cursor.lnum)) + mouse_past_bottom = TRUE; + +- #ifdef FEAT_VISUAL + /* Start Visual mode before coladvance(), for when 'sel' != "old" */ + if ((flags & MOUSE_MAY_VIS) && !VIsual_active) + { +--- 2927,2932 ---- +*************** +*** 2947,2953 **** + if (p_smd && msg_silent == 0) + redraw_cmdline = TRUE; /* show visual mode later */ + } +- #endif + + curwin->w_curswant = col; + curwin->w_set_curswant = FALSE; /* May still have been TRUE */ +--- 2940,2945 ---- +*** ../vim-7.4.211/src/undo.c 2014-03-12 16:51:35.060792541 +0100 +--- src/undo.c 2014-03-23 13:37:05.435176620 +0100 +*************** +*** 532,540 **** + + /* save named marks and Visual marks for undo */ + mch_memmove(uhp->uh_namedm, curbuf->b_namedm, sizeof(pos_T) * NMARKS); +- #ifdef FEAT_VISUAL + uhp->uh_visual = curbuf->b_visual; +- #endif + + curbuf->b_u_newhead = uhp; + if (curbuf->b_u_oldhead == NULL) +--- 532,538 ---- +*************** +*** 1014,1029 **** + /* 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); + + /* Optional fields. */ +--- 1012,1018 ---- +*************** +*** 1082,1095 **** + uhp->uh_flags = get2c(fp); + 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); + + /* Optional fields. */ +--- 1071,1077 ---- +*************** +*** 2406,2414 **** + int old_flags; + int new_flags; + pos_T namedm[NMARKS]; +- #ifdef FEAT_VISUAL + visualinfo_T visualinfo; +- #endif + int empty_buffer; /* buffer became empty */ + u_header_T *curhead = curbuf->b_u_curhead; + +--- 2388,2394 ---- +*************** +*** 2430,2438 **** + * save marks before undo/redo + */ + mch_memmove(namedm, curbuf->b_namedm, sizeof(pos_T) * NMARKS); +- #ifdef FEAT_VISUAL + visualinfo = curbuf->b_visual; +- #endif + curbuf->b_op_start.lnum = curbuf->b_ml.ml_line_count; + curbuf->b_op_start.col = 0; + curbuf->b_op_end.lnum = 0; +--- 2410,2416 ---- +*************** +*** 2602,2614 **** + curbuf->b_namedm[i] = curhead->uh_namedm[i]; + curhead->uh_namedm[i] = namedm[i]; + } +- #ifdef FEAT_VISUAL + if (curhead->uh_visual.vi_start.lnum != 0) + { + curbuf->b_visual = curhead->uh_visual; + curhead->uh_visual = visualinfo; + } +- #endif + + /* + * If the cursor is only off by one line, put it at the same position as +--- 2580,2590 ---- +*** ../vim-7.4.211/src/version.c 2014-03-22 13:29:57.693846167 +0100 +--- src/version.c 2014-03-23 15:01:49.719254526 +0100 +*************** +*** 642,656 **** + #else + "-virtualedit", + #endif +- #ifdef FEAT_VISUAL + "+visual", +! # ifdef FEAT_VISUALEXTRA + "+visualextra", +- # else +- "-visualextra", +- # endif + #else +! "-visual", + #endif + #ifdef FEAT_VIMINFO + "+viminfo", +--- 642,652 ---- + #else + "-virtualedit", + #endif + "+visual", +! #ifdef FEAT_VISUALEXTRA + "+visualextra", + #else +! "-visualextra", + #endif + #ifdef FEAT_VIMINFO + "+viminfo", +*** ../vim-7.4.211/src/window.c 2014-01-10 15:53:09.000000000 +0100 +--- src/window.c 2014-03-23 13:38:17.767177729 +0100 +*************** +*** 130,138 **** + case Ctrl_S: + case 's': + CHECK_CMDWIN +- #ifdef FEAT_VISUAL + reset_VIsual_and_resel(); /* stop Visual mode */ +- #endif + #ifdef FEAT_QUICKFIX + /* When splitting the quickfix window open a new buffer in it, + * don't replicate the quickfix buffer. */ +--- 130,136 ---- +*************** +*** 150,158 **** + case Ctrl_V: + case 'v': + CHECK_CMDWIN +- # ifdef FEAT_VISUAL + reset_VIsual_and_resel(); /* stop Visual mode */ +- # endif + # ifdef FEAT_QUICKFIX + /* When splitting the quickfix window open a new buffer in it, + * don't replicate the quickfix buffer. */ +--- 148,154 ---- +*************** +*** 170,178 **** + case Ctrl_HAT: + case '^': + CHECK_CMDWIN +- #ifdef FEAT_VISUAL + reset_VIsual_and_resel(); /* stop Visual mode */ +- #endif + STRCPY(cbuf, "split #"); + if (Prenum) + vim_snprintf((char *)cbuf + 7, sizeof(cbuf) - 7, +--- 166,172 ---- +*************** +*** 184,192 **** + case Ctrl_N: + case 'n': + CHECK_CMDWIN +- #ifdef FEAT_VISUAL + reset_VIsual_and_resel(); /* stop Visual mode */ +- #endif + #ifdef FEAT_QUICKFIX + newwindow: + #endif +--- 178,184 ---- +*************** +*** 206,223 **** + /* quit current window */ + case Ctrl_Q: + case 'q': +- #ifdef FEAT_VISUAL + reset_VIsual_and_resel(); /* stop Visual mode */ +- #endif + do_cmdline_cmd((char_u *)"quit"); + break; + + /* close current window */ + case Ctrl_C: + case 'c': +- #ifdef FEAT_VISUAL + reset_VIsual_and_resel(); /* stop Visual mode */ +- #endif + do_cmdline_cmd((char_u *)"close"); + break; + +--- 198,211 ---- +*************** +*** 226,234 **** + case Ctrl_Z: + case 'z': + CHECK_CMDWIN +- #ifdef FEAT_VISUAL + reset_VIsual_and_resel(); /* stop Visual mode */ +- #endif + do_cmdline_cmd((char_u *)"pclose"); + break; + +--- 214,220 ---- +*************** +*** 248,256 **** + case Ctrl_O: + case 'o': + CHECK_CMDWIN +- #ifdef FEAT_VISUAL + reset_VIsual_and_resel(); /* stop Visual mode */ +- #endif + do_cmdline_cmd((char_u *)"only"); + break; + +--- 234,240 ---- +*************** +*** 399,416 **** + case Ctrl_R: + case 'r': + CHECK_CMDWIN +- #ifdef FEAT_VISUAL + reset_VIsual_and_resel(); /* stop Visual mode */ +- #endif + win_rotate(FALSE, (int)Prenum1); /* downwards */ + break; + + /* rotate windows upwards */ + case 'R': + CHECK_CMDWIN +- #ifdef FEAT_VISUAL + reset_VIsual_and_resel(); /* stop Visual mode */ +- #endif + win_rotate(TRUE, (int)Prenum1); /* upwards */ + break; + +--- 383,396 ---- +*************** +*** 499,507 **** + case ']': + case Ctrl_RSB: + CHECK_CMDWIN +- #ifdef FEAT_VISUAL + reset_VIsual_and_resel(); /* stop Visual mode */ +- #endif + if (Prenum) + postponed_split = Prenum; + else +--- 479,485 ---- +*************** +*** 612,620 **** + #endif + case ']': + case Ctrl_RSB: +- #ifdef FEAT_VISUAL + reset_VIsual_and_resel(); /* stop Visual mode */ +- #endif + if (Prenum) + postponed_split = Prenum; + else +--- 590,596 ---- +*************** +*** 3726,3734 **** + { + tabpage_T *tp = curtab; + +- #ifdef FEAT_VISUAL + reset_VIsual_and_resel(); /* stop Visual mode */ +- #endif + #ifdef FEAT_AUTOCMD + if (trigger_leave_autocmds) + { +--- 3702,3708 ---- +*************** +*** 4029,4040 **** + return; + #endif + +- #ifdef FEAT_VISUAL + if (wp->w_buffer != curbuf) + reset_VIsual_and_resel(); + else if (VIsual_active) + wp->w_cursor = curwin->w_cursor; +- #endif + + #ifdef FEAT_GUI + need_mouse_correct = TRUE; +--- 4003,4012 ---- +*************** +*** 6037,6043 **** + long count; + linenr_T *file_lnum; + { +- # ifdef FEAT_VISUAL + if (VIsual_active) + { + int len; +--- 6009,6014 ---- +*************** +*** 6048,6054 **** + return find_file_name_in_path(ptr, len, + FNAME_MESS|FNAME_EXP|FNAME_REL, count, curbuf->b_ffname); + } +- # endif + return file_name_at_cursor(FNAME_MESS|FNAME_HYP|FNAME_EXP|FNAME_REL, count, + file_lnum); + +--- 6019,6024 ---- +*** ../vim-7.4.211/src/feature.h 2014-03-12 17:56:42.960852421 +0100 +--- src/feature.h 2014-03-23 13:39:02.003178407 +0100 +*************** +*** 214,220 **** + * +visual Visual mode - now always included. + * +visualextra Extra features for Visual mode (mostly block operators). + */ +- #define FEAT_VISUAL + #ifdef FEAT_NORMAL + # define FEAT_VISUALEXTRA + #endif +--- 214,219 ---- +*************** +*** 1138,1150 **** + #ifdef FEAT_GUI + # ifndef FEAT_CLIPBOARD + # define FEAT_CLIPBOARD +- # ifndef FEAT_VISUAL +- # define FEAT_VISUAL +- # endif + # endif + #endif + +! #if defined(FEAT_NORMAL) && defined(FEAT_VISUAL) \ + && (defined(UNIX) || defined(VMS)) \ + && defined(WANT_X11) && defined(HAVE_X11) + # define FEAT_XCLIPBOARD +--- 1137,1146 ---- + #ifdef FEAT_GUI + # ifndef FEAT_CLIPBOARD + # define FEAT_CLIPBOARD + # endif + #endif + +! #if defined(FEAT_NORMAL) \ + && (defined(UNIX) || defined(VMS)) \ + && defined(WANT_X11) && defined(HAVE_X11) + # define FEAT_XCLIPBOARD +*** ../vim-7.4.211/src/globals.h 2014-02-22 23:03:48.712901208 +0100 +--- src/globals.h 2014-03-23 13:39:17.407178643 +0100 +*************** +*** 662,668 **** + /* set to TRUE when "-s" commandline argument + * used for ex */ + +- #ifdef FEAT_VISUAL + EXTERN pos_T VIsual; /* start position of active Visual selection */ + EXTERN int VIsual_active INIT(= FALSE); + /* whether Visual mode is active */ +--- 662,667 ---- +*************** +*** 677,683 **** + + EXTERN int redo_VIsual_busy INIT(= FALSE); + /* TRUE when redoing Visual */ +- #endif + + #ifdef FEAT_MOUSE + /* +--- 676,681 ---- +*************** +*** 1178,1188 **** + EXTERN int fill_diff INIT(= '-'); + #endif + +- #ifdef FEAT_VISUAL + /* Whether 'keymodel' contains "stopsel" and "startsel". */ + EXTERN int km_stopsel INIT(= FALSE); + EXTERN int km_startsel INIT(= FALSE); +- #endif + + #ifdef FEAT_CMDWIN + EXTERN int cedit_key INIT(= -1); /* key value of 'cedit' option */ +--- 1176,1184 ---- +*** ../vim-7.4.211/src/option.h 2014-03-12 18:55:52.104906804 +0100 +--- src/option.h 2014-03-23 13:39:30.991178851 +0100 +*************** +*** 572,580 **** + EXTERN char_u *p_isp; /* 'isprint' */ + EXTERN int p_js; /* 'joinspaces' */ + EXTERN char_u *p_kp; /* 'keywordprg' */ +- #ifdef FEAT_VISUAL + EXTERN char_u *p_km; /* 'keymodel' */ +- #endif + #ifdef FEAT_LANGMAP + EXTERN char_u *p_langmap; /* 'langmap'*/ + #endif +--- 572,578 ---- +*************** +*** 681,690 **** + #endif + EXTERN char_u *p_sections; /* 'sections' */ + EXTERN int p_secure; /* 'secure' */ +- #ifdef FEAT_VISUAL + EXTERN char_u *p_sel; /* 'selection' */ + EXTERN char_u *p_slm; /* 'selectmode' */ +- #endif + #ifdef FEAT_SESSION + EXTERN char_u *p_ssop; /* 'sessionoptions' */ + EXTERN unsigned ssop_flags; +--- 679,686 ---- +*** ../vim-7.4.211/src/os_win32.h 2013-09-25 19:13:32.000000000 +0200 +--- src/os_win32.h 2014-03-23 13:39:49.819179139 +0100 +*************** +*** 68,74 **** + #endif + + #define USE_FNAME_CASE /* adjust case of file names */ +! #if !defined(FEAT_CLIPBOARD) && defined(FEAT_VISUAL) && defined(FEAT_MOUSE) + # define FEAT_CLIPBOARD /* include clipboard support */ + #endif + #if defined(__DATE__) && defined(__TIME__) +--- 68,74 ---- + #endif + + #define USE_FNAME_CASE /* adjust case of file names */ +! #if !defined(FEAT_CLIPBOARD) && defined(FEAT_MOUSE) + # define FEAT_CLIPBOARD /* include clipboard support */ + #endif + #if defined(__DATE__) && defined(__TIME__) +*** ../vim-7.4.211/src/structs.h 2014-03-12 18:55:52.104906804 +0100 +--- src/structs.h 2014-03-23 13:40:19.175179589 +0100 +*************** +*** 346,354 **** + #endif + int uh_flags; /* see below */ + pos_T uh_namedm[NMARKS]; /* marks before undo/after redo */ +- #ifdef FEAT_VISUAL + visualinfo_T uh_visual; /* Visual areas before undo/after redo */ +- #endif + time_t uh_time; /* timestamp when the change was made */ + long uh_save_nr; /* set when the file was saved after the + changes in this block */ +--- 346,352 ---- +*************** +*** 1406,1417 **** + + pos_T b_namedm[NMARKS]; /* current named marks (mark.c) */ + +- #ifdef FEAT_VISUAL + /* These variables are set when VIsual_active becomes FALSE */ + visualinfo_T b_visual; +! # ifdef FEAT_EVAL + int b_visual_mode_eval; /* b_visual.vi_mode for visualmode() */ +- # endif + #endif + + pos_T b_last_cursor; /* cursor position when last unloading this +--- 1404,1413 ---- + + pos_T b_namedm[NMARKS]; /* current named marks (mark.c) */ + + /* These variables are set when VIsual_active becomes FALSE */ + visualinfo_T b_visual; +! #ifdef FEAT_EVAL + int b_visual_mode_eval; /* b_visual.vi_mode for visualmode() */ + #endif + + pos_T b_last_cursor; /* cursor position when last unloading this +*************** +*** 1980,1986 **** + time through cursupdate() to the + current virtual column */ + +- #ifdef FEAT_VISUAL + /* + * the next six are used to update the visual part + */ +--- 1976,1981 ---- +*************** +*** 1991,1997 **** + linenr_T w_old_visual_lnum; /* last known start of visual part */ + colnr_T w_old_visual_col; /* last known start of visual part */ + colnr_T w_old_curswant; /* last known value of Curswant */ +- #endif + + /* + * "w_topline", "w_leftcol" and "w_skipcol" specify the offsets for +--- 1986,1991 ---- +*************** +*** 2293,2302 **** + (inclusive) */ + int empty; /* op_start and op_end the same (only used by + do_change()) */ +- #ifdef FEAT_VISUAL + int is_VIsual; /* operator on Visual area */ + int block_mode; /* current operator is Visual block mode */ +- #endif + colnr_T start_vcol; /* start col for block mode operator */ + colnr_T end_vcol; /* end col for block mode operator */ + #ifdef FEAT_AUTOCMD +--- 2287,2294 ---- +*** ../vim-7.4.211/src/version.c 2014-03-22 13:29:57.693846167 +0100 +--- src/version.c 2014-03-23 15:01:49.719254526 +0100 +*************** +*** 740,741 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 212, + /**/ + +-- +If all you have is a hammer, everything looks like a nail. +When your hammer is C++, everything begins to look like a thumb. + -- Steve Hoflich, comp.lang.c++ + + /// 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/patches/source/vim/patches/7.4.213 b/patches/source/vim/patches/7.4.213 new file mode 100644 index 000000000..1d0f55ce0 --- /dev/null +++ b/patches/source/vim/patches/7.4.213 @@ -0,0 +1,211 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.213 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.213 +Problem: It's not possible to open a new buffer without creating a swap + file. +Solution: Add the ":noswapfile" modifier. (Christian Brabandt) +Files: runtime/doc/recover.txt, src/ex_cmds.h, src/ex_docmd.c, + src/memline.c, src/structs.h + + +*** ../vim-7.4.212/runtime/doc/recover.txt 2013-08-10 13:25:00.000000000 +0200 +--- runtime/doc/recover.txt 2014-03-23 16:01:59.655309841 +0100 +*************** +*** 81,87 **** + 'maxmemtot'. And when making a change to a read-only file, the swap file is + created anyway. + +! The 'swapfile' option can be reset to avoid creating a swapfile. + + + Detecting an existing swap file ~ +--- 81,94 ---- + 'maxmemtot'. And when making a change to a read-only file, the swap file is + created anyway. + +! The 'swapfile' option can be reset to avoid creating a swapfile. And the +! |:noswapfile| modifier can be used to not create a swapfile for a new buffer. +! +! :noswap[file] {command} *:noswap* *:noswapfile* +! Execute {command}. If it contains a command that loads a new +! buffer, it will be loaded without creating a swapfile and the +! 'swapfile' option will be reset. If a buffer already had a +! swapfile it is not removed and 'swapfile' is not reset. + + + Detecting an existing swap file ~ +*** ../vim-7.4.212/src/ex_cmds.h 2014-03-22 13:29:57.693846167 +0100 +--- src/ex_cmds.h 2014-03-23 15:36:42.399286592 +0100 +*************** +*** 655,660 **** +--- 655,662 ---- + EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), + EX(CMD_noremenu, "noremenu", ex_menu, + RANGE|NOTADR|ZEROR|BANG|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN), ++ EX(CMD_noswapfile, "noswapfile", ex_wrongmodifier, ++ NEEDARG|EXTRA|NOTRLCOM), + EX(CMD_normal, "normal", ex_normal, + RANGE|BANG|EXTRA|NEEDARG|NOTRLCOM|USECTRLV|SBOXOK|CMDWIN), + EX(CMD_number, "number", ex_print, +*** ../vim-7.4.212/src/ex_docmd.c 2014-03-23 15:12:29.919264336 +0100 +--- src/ex_docmd.c 2014-03-23 15:44:42.335293946 +0100 +*************** +*** 1874,1891 **** + #endif + continue; + +! case 'n': if (!checkforcmd(&ea.cmd, "noautocmd", 3)) +! break; +! #ifdef FEAT_AUTOCMD +! if (cmdmod.save_ei == NULL) + { +! /* Set 'eventignore' to "all". Restore the +! * existing option value later. */ +! cmdmod.save_ei = vim_strsave(p_ei); +! set_string_option_direct((char_u *)"ei", -1, + (char_u *)"all", OPT_FREE, SID_NONE); +! } + #endif + continue; + + case 'r': if (!checkforcmd(&ea.cmd, "rightbelow", 6)) +--- 1874,1896 ---- + #endif + continue; + +! case 'n': if (checkforcmd(&ea.cmd, "noautocmd", 3)) + { +! #ifdef FEAT_AUTOCMD +! if (cmdmod.save_ei == NULL) +! { +! /* Set 'eventignore' to "all". Restore the +! * existing option value later. */ +! cmdmod.save_ei = vim_strsave(p_ei); +! set_string_option_direct((char_u *)"ei", -1, + (char_u *)"all", OPT_FREE, SID_NONE); +! } + #endif ++ continue; ++ } ++ if (!checkforcmd(&ea.cmd, "noswapfile", 6)) ++ break; ++ cmdmod.noswapfile = TRUE; + continue; + + case 'r': if (!checkforcmd(&ea.cmd, "rightbelow", 6)) +*************** +*** 2596,2601 **** +--- 2601,2608 ---- + case CMD_lua: + case CMD_match: + case CMD_mzscheme: ++ case CMD_noautocmd: ++ case CMD_noswapfile: + case CMD_perl: + case CMD_psearch: + case CMD_python: +*************** +*** 3099,3104 **** +--- 3106,3112 ---- + {"leftabove", 5, FALSE}, + {"lockmarks", 3, FALSE}, + {"noautocmd", 3, FALSE}, ++ {"noswapfile", 3, FALSE}, + {"rightbelow", 6, FALSE}, + {"sandbox", 3, FALSE}, + {"silent", 3, FALSE}, +*************** +*** 3611,3616 **** +--- 3619,3626 ---- + case CMD_keeppatterns: + case CMD_leftabove: + case CMD_lockmarks: ++ case CMD_noautocmd: ++ case CMD_noswapfile: + case CMD_rightbelow: + case CMD_sandbox: + case CMD_silent: +*** ../vim-7.4.212/src/memline.c 2014-02-11 15:23:27.942123631 +0100 +--- src/memline.c 2014-03-23 15:48:05.679297062 +0100 +*************** +*** 289,294 **** +--- 289,297 ---- + buf->b_ml.ml_chunksize = NULL; + #endif + ++ if (cmdmod.noswapfile) ++ buf->b_p_swf = FALSE; ++ + /* + * When 'updatecount' is non-zero swap file may be opened later. + */ +*************** +*** 606,612 **** + * When 'updatecount' is 0 and 'noswapfile' there is no swap file. + * For help files we will make a swap file now. + */ +! if (p_uc != 0) + ml_open_file(buf); /* create a swap file */ + return; + } +--- 609,615 ---- + * When 'updatecount' is 0 and 'noswapfile' there is no swap file. + * For help files we will make a swap file now. + */ +! if (p_uc != 0 && !cmdmod.noswapfile) + ml_open_file(buf); /* create a swap file */ + return; + } +*************** +*** 719,725 **** + char_u *dirp; + + mfp = buf->b_ml.ml_mfp; +! if (mfp == NULL || mfp->mf_fd >= 0 || !buf->b_p_swf) + return; /* nothing to do */ + + #ifdef FEAT_SPELL +--- 722,728 ---- + char_u *dirp; + + mfp = buf->b_ml.ml_mfp; +! if (mfp == NULL || mfp->mf_fd >= 0 || !buf->b_p_swf || cmdmod.noswapfile) + return; /* nothing to do */ + + #ifdef FEAT_SPELL +*** ../vim-7.4.212/src/structs.h 2014-03-23 15:12:29.943264337 +0100 +--- src/structs.h 2014-03-23 15:36:42.407286592 +0100 +*************** +*** 545,550 **** +--- 545,551 ---- + int keepjumps; /* TRUE when ":keepjumps" was used */ + int lockmarks; /* TRUE when ":lockmarks" was used */ + int keeppatterns; /* TRUE when ":keeppatterns" was used */ ++ int noswapfile; /* TRUE when ":noswapfile" was used */ + # ifdef FEAT_AUTOCMD + char_u *save_ei; /* saved value of 'eventignore' */ + # endif +*** ../vim-7.4.212/src/version.c 2014-03-23 15:12:29.943264337 +0100 +--- src/version.c 2014-03-23 16:02:16.519310100 +0100 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 213, + /**/ + +-- +Looking at Perl through Lisp glasses, Perl looks atrocious. + + /// 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/patches/source/vim/patches/7.4.214 b/patches/source/vim/patches/7.4.214 new file mode 100644 index 000000000..bdce8be6e --- /dev/null +++ b/patches/source/vim/patches/7.4.214 @@ -0,0 +1,50 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.214 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.214 +Problem: Compilation problems on HP_nonStop (Tandem). +Solution: Add #defines. (Joachim Schmitz) +Files: src/vim.h + + +*** ../vim-7.4.213/src/vim.h 2014-02-23 22:52:33.352764716 +0100 +--- src/vim.h 2014-03-24 17:25:40.328710672 +0100 +*************** +*** 77,82 **** +--- 77,86 ---- + # endif + # include <floss.h> + # define ROOT_UID 65535 ++ # define OLDXAW ++ # if (_TANDEM_ARCH_ == 2 && __H_Series_RVU >= 621) ++ # define SA_ONSTACK_COMPATIBILITY ++ # endif + #else + # define ROOT_UID 0 + #endif +*** ../vim-7.4.213/src/version.c 2014-03-23 16:03:56.171311627 +0100 +--- src/version.c 2014-03-24 17:26:50.976711754 +0100 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 214, + /**/ + +-- +ARTHUR: You are indeed brave Sir knight, but the fight is mine. +BLACK KNIGHT: Had enough? +ARTHUR: You stupid bastard. You havn't got any arms left. + "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/patches/source/vim/patches/7.4.215 b/patches/source/vim/patches/7.4.215 new file mode 100644 index 000000000..ff65a627e --- /dev/null +++ b/patches/source/vim/patches/7.4.215 @@ -0,0 +1,87 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.215 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.215 +Problem: Inconsistency: ":sp foo" does not reload "foo", unless "foo" is + the current buffer. (Liang Li) +Solution: Do not reload the current buffer on a split command. +Files: runtime/doc/windows.txt, src/ex_docmd.c + + +*** ../vim-7.4.214/runtime/doc/windows.txt 2013-08-10 13:25:08.000000000 +0200 +--- runtime/doc/windows.txt 2014-03-25 12:34:51.989767212 +0100 +*************** +*** 132,144 **** + CTRL-W s *CTRL-W_s* + CTRL-W S *CTRL-W_S* + CTRL-W CTRL-S *CTRL-W_CTRL-S* +! :[N]sp[lit] [++opt] [+cmd] *:sp* *:split* + Split current window in two. The result is two viewports on +! the same file. Make new window N high (default is to use half +! the height of the current window). Reduces the current window +! height to create room (and others, if the 'equalalways' option +! is set, 'eadirection' isn't "hor", and one of them is higher +! than the current or the new window). + Note: CTRL-S does not work on all terminals and might block + further input, use CTRL-Q to get going again. + Also see |++opt| and |+cmd|. +--- 132,151 ---- + CTRL-W s *CTRL-W_s* + CTRL-W S *CTRL-W_S* + CTRL-W CTRL-S *CTRL-W_CTRL-S* +! :[N]sp[lit] [++opt] [+cmd] [file] *:sp* *:split* + Split current window in two. The result is two viewports on +! the same file. +! +! Make the new window N high (default is to use half the height +! of the current window). Reduces the current window height to +! create room (and others, if the 'equalalways' option is set, +! 'eadirection' isn't "hor", and one of them is higher than the +! current or the new window). +! +! If [file] is given it will be edited in the new window. If it +! is not loaded in any buffer, it will be read. Else the new +! window will use the already loaded buffer. +! + Note: CTRL-S does not work on all terminals and might block + further input, use CTRL-Q to get going again. + Also see |++opt| and |+cmd|. +*** ../vim-7.4.214/src/ex_docmd.c 2014-03-23 16:03:56.167311626 +0100 +--- src/ex_docmd.c 2014-03-25 12:57:13.737787771 +0100 +*************** +*** 7938,7943 **** +--- 7938,7945 ---- + ? ECMD_ONE : eap->do_ecmd_lnum, + (P_HID(curbuf) ? ECMD_HIDE : 0) + + (eap->forceit ? ECMD_FORCEIT : 0) ++ /* after a split we can use an existing buffer */ ++ + (old_curwin != NULL ? ECMD_OLDBUF : 0) + #ifdef FEAT_LISTCMDS + + (eap->cmdidx == CMD_badd ? ECMD_ADDBUF : 0 ) + #endif +*** ../vim-7.4.214/src/version.c 2014-03-24 19:43:56.604837795 +0100 +--- src/version.c 2014-03-25 12:30:13.137762939 +0100 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 215, + /**/ + +-- +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/patches/source/vim/patches/7.4.216 b/patches/source/vim/patches/7.4.216 new file mode 100644 index 000000000..ebf78d1d6 --- /dev/null +++ b/patches/source/vim/patches/7.4.216 @@ -0,0 +1,73 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.216 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.216 +Problem: Compiler warnings. (Tony Mechelynck) +Solution: Initialize variables, add #ifdef. +Files: src/term.c, src/os_unix.h + + +*** ../vim-7.4.215/src/term.c 2014-03-23 15:12:29.939264336 +0100 +--- src/term.c 2014-03-25 13:39:10.821826340 +0100 +*************** +*** 4185,4191 **** + { + #ifdef FEAT_MBYTE + int col; +! int row_char; + #endif + j = 0; + extra = 0; +--- 4185,4191 ---- + { + #ifdef FEAT_MBYTE + int col; +! int row_char = NUL; + #endif + j = 0; + extra = 0; +*** ../vim-7.4.215/src/os_unix.h 2014-03-12 16:51:35.060792541 +0100 +--- src/os_unix.h 2014-03-25 13:42:35.141829471 +0100 +*************** +*** 565,571 **** + # endif + #endif + +! #define HAVE_DUP /* have dup() */ + #define HAVE_ST_MODE /* have stat.st_mode */ + + /* We have three kinds of ACL support. */ +--- 565,573 ---- + # endif + #endif + +! #ifndef HAVE_DUP +! # define HAVE_DUP /* have dup() */ +! #endif + #define HAVE_ST_MODE /* have stat.st_mode */ + + /* We have three kinds of ACL support. */ +*** ../vim-7.4.215/src/version.c 2014-03-25 13:03:44.937793766 +0100 +--- src/version.c 2014-03-25 13:40:36.969827660 +0100 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 216, + /**/ + +-- +Hacker: Someone skilled in computer programming (good guy). +Cracker: A hacker that uses his skills to crack software (bad guy). + + /// 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/patches/source/vim/patches/7.4.217 b/patches/source/vim/patches/7.4.217 new file mode 100644 index 000000000..9af78571f --- /dev/null +++ b/patches/source/vim/patches/7.4.217 @@ -0,0 +1,85 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.217 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.217 +Problem: When src/auto/configure was updated, "make clean" would run + configure pointlessly. +Solution: Do not run configure for "make clean" and "make distclean" when + the make program supports $MAKECMDGOALS. (Ken Takata) +Files: src/Makefile + + +*** ../vim-7.4.216/src/Makefile 2014-02-05 12:36:36.622026833 +0100 +--- src/Makefile 2014-03-25 15:31:10.629929307 +0100 +*************** +*** 546,551 **** +--- 546,552 ---- + # again. + #CC = cc + #CC = gcc ++ #CC = clang + + # COMPILER FLAGS - change as you please. Either before running {{{1 + # configure or afterwards. For examples see below. +*************** +*** 1666,1672 **** + ! grep -x -F 'ac_cv_env_CFLAGS_value=$(CFLAGS)' auto/config.cache > /dev/null; then \ + rm auto/config.cache; \ + fi +! GUI_INC_LOC="$(GUI_INC_LOC)" GUI_LIB_LOC="$(GUI_LIB_LOC)" \ + CC="$(CC)" CPPFLAGS="$(CPPFLAGS)" CFLAGS="$(CFLAGS)" \ + LDFLAGS="$(LDFLAGS)" $(CONF_SHELL) srcdir="$(srcdir)" \ + ./configure $(CONF_OPT_GUI) $(CONF_OPT_X) $(CONF_OPT_XSMP) \ +--- 1667,1674 ---- + ! grep -x -F 'ac_cv_env_CFLAGS_value=$(CFLAGS)' auto/config.cache > /dev/null; then \ + rm auto/config.cache; \ + fi +! if test "X$(MAKECMDGOALS)" != "Xclean" -a "X$(MAKECMDGOALS)" != "Xdistclean"; then \ +! GUI_INC_LOC="$(GUI_INC_LOC)" GUI_LIB_LOC="$(GUI_LIB_LOC)" \ + CC="$(CC)" CPPFLAGS="$(CPPFLAGS)" CFLAGS="$(CFLAGS)" \ + LDFLAGS="$(LDFLAGS)" $(CONF_SHELL) srcdir="$(srcdir)" \ + ./configure $(CONF_OPT_GUI) $(CONF_OPT_X) $(CONF_OPT_XSMP) \ +*************** +*** 1679,1685 **** + $(CONF_OPT_COMPBY) $(CONF_OPT_ACL) $(CONF_OPT_NETBEANS) \ + $(CONF_ARGS) $(CONF_OPT_MZSCHEME) $(CONF_OPT_PLTHOME) \ + $(CONF_OPT_LUA) $(CONF_OPT_LUA_PREFIX) \ +! $(CONF_OPT_SYSMOUSE) + + # Use "make reconfig" to rerun configure without cached values. + # When config.h changes, most things will be recompiled automatically. +--- 1681,1688 ---- + $(CONF_OPT_COMPBY) $(CONF_OPT_ACL) $(CONF_OPT_NETBEANS) \ + $(CONF_ARGS) $(CONF_OPT_MZSCHEME) $(CONF_OPT_PLTHOME) \ + $(CONF_OPT_LUA) $(CONF_OPT_LUA_PREFIX) \ +! $(CONF_OPT_SYSMOUSE); \ +! fi + + # Use "make reconfig" to rerun configure without cached values. + # When config.h changes, most things will be recompiled automatically. +*** ../vim-7.4.216/src/version.c 2014-03-25 13:46:22.841832960 +0100 +--- src/version.c 2014-03-25 15:32:30.813930536 +0100 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 217, + /**/ + +-- +CRONE: Who sent you? +ARTHUR: The Knights Who Say GNU! +CRONE: Aaaagh! (she looks around in rear) No! We have no licenses here. + "Monty Python and the Holy editor wars" PYTHON (MONTY) SOFTWARE 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/patches/source/vim/patches/7.4.218 b/patches/source/vim/patches/7.4.218 new file mode 100644 index 000000000..b878cb7b4 --- /dev/null +++ b/patches/source/vim/patches/7.4.218 @@ -0,0 +1,578 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.218 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.218 +Problem: It's not easy to remove duplicates from a list. +Solution: Add the uniq() function. (LCD) +Files: runtime/doc/change.txt, runtime/doc/eval.txt, + runtime/doc/usr_41.txt, runtime/doc/version7.txt, src/eval.c, + src/testdir/test55.in, src/testdir/test55.ok + + +*** ../vim-7.4.217/runtime/doc/change.txt 2013-09-22 15:23:38.000000000 +0200 +--- runtime/doc/change.txt 2014-03-25 17:32:29.510040841 +0100 +*************** +*** 1645,1651 **** + 7. Sorting text *sorting* + + Vim has a sorting function and a sorting command. The sorting function can be +! found here: |sort()|. + + *:sor* *:sort* + :[range]sor[t][!] [i][u][r][n][x][o] [/{pattern}/] +--- 1650,1656 ---- + 7. Sorting text *sorting* + + Vim has a sorting function and a sorting command. The sorting function can be +! found here: |sort()|, |uniq()|. + + *:sor* *:sort* + :[range]sor[t][!] [i][u][r][n][x][o] [/{pattern}/] +*** ../vim-7.4.217/runtime/doc/eval.txt 2014-02-23 23:38:58.820760280 +0100 +--- runtime/doc/eval.txt 2014-03-25 17:47:18.750054467 +0100 +*************** +*** 326,331 **** +--- 327,333 ---- + Changing the order of items in a list: > + :call sort(list) " sort a list alphabetically + :call reverse(list) " reverse the order of items ++ :call uniq(sort(list)) " sort and remove duplicates + + + For loop ~ +*************** +*** 1518,1523 **** +--- 1520,1526 ---- + startup. These are the files that Vim remembers marks for. + The length of the List is limited by the ' argument of the + 'viminfo' option (default is 100). ++ When the |viminfo| file is not used the List is empty. + Also see |:oldfiles| and |c_#<|. + The List can be modified, but this has no effect on what is + stored in the |viminfo| file later. If you use values other +*************** +*** 2003,2008 **** +--- 2006,2013 ---- + type( {name}) Number type of variable {name} + undofile( {name}) String undo file name for {name} + undotree() List undo file tree ++ uniq( {list} [, {func} [, {dict}]]) ++ List remove adjacent duplicates from a list + values( {dict}) List values in {dict} + virtcol( {expr}) Number screen column of cursor or mark + visualmode( [expr]) String last visual mode used +*************** +*** 5474,5493 **** + + + sort({list} [, {func} [, {dict}]]) *sort()* *E702* +! Sort the items in {list} in-place. Returns {list}. If you +! want a list to remain unmodified make a copy first: > + :let sortedlist = sort(copy(mylist)) + < Uses the string representation of each item to sort on. + Numbers sort after Strings, |Lists| after Numbers. + For sorting text in the current buffer use |:sort|. + When {func} is given and it is one then case is ignored. +- {dict} is for functions with the "dict" attribute. It will be +- used to set the local variable "self". |Dictionary-function| + When {func} is a |Funcref| or a function name, this function + is called to compare items. The function is invoked with two + items as argument and must return zero if they are equal, 1 or + bigger if the first one sorts after the second one, -1 or + smaller if the first one sorts before the second one. + Example: > + func MyCompare(i1, i2) + return a:i1 == a:i2 ? 0 : a:i1 > a:i2 ? 1 : -1 +--- 5491,5516 ---- + + + sort({list} [, {func} [, {dict}]]) *sort()* *E702* +! Sort the items in {list} in-place. Returns {list}. +! +! If you want a list to remain unmodified make a copy first: > + :let sortedlist = sort(copy(mylist)) + < Uses the string representation of each item to sort on. + Numbers sort after Strings, |Lists| after Numbers. + For sorting text in the current buffer use |:sort|. ++ + When {func} is given and it is one then case is ignored. + When {func} is a |Funcref| or a function name, this function + is called to compare items. The function is invoked with two + items as argument and must return zero if they are equal, 1 or + bigger if the first one sorts after the second one, -1 or + smaller if the first one sorts before the second one. ++ ++ {dict} is for functions with the "dict" attribute. It will be ++ used to set the local variable "self". |Dictionary-function| ++ ++ Also see |uniq()|. ++ + Example: > + func MyCompare(i1, i2) + return a:i1 == a:i2 ? 0 : a:i1 > a:i2 ? 1 : -1 +*************** +*** 6155,6160 **** +--- 6178,6191 ---- + blocks. Each item may again have an "alt" + item. + ++ uniq({list} [, {func} [, {dict}]]) *uniq()* *E882* ++ Remove second and succeeding copies of repeated adjacent ++ {list} items in-place. Returns {list}. If you want a list ++ to remain unmodified make a copy first: > ++ :let newlist = uniq(copy(mylist)) ++ < The default compare function uses the string representation of ++ each item. For the use of {func} and {dict} see |sort()|. ++ + values({dict}) *values()* + Return a |List| with all the values of {dict}. The |List| is + in arbitrary order. +*** ../vim-7.4.217/runtime/doc/usr_41.txt 2013-08-10 13:25:05.000000000 +0200 +--- runtime/doc/usr_41.txt 2014-03-25 17:32:29.518040841 +0100 +*************** +*** 1,4 **** +! *usr_41.txt* For Vim version 7.4. Last change: 2013 Feb 20 + + VIM USER MANUAL - by Bram Moolenaar + +--- 1,4 ---- +! *usr_41.txt* For Vim version 7.4. Last change: 2014 Jan 10 + + VIM USER MANUAL - by Bram Moolenaar + +*************** +*** 595,607 **** + matchlist() like matchstr() and also return submatches + stridx() first index of a short string in a long string + strridx() last index of a short string in a long string +! strlen() length of a string + substitute() substitute a pattern match with a string + submatch() get a specific match in ":s" and substitute() + strpart() get part of a string + expand() expand special keywords + iconv() convert text from one encoding to another + byteidx() byte index of a character in a string + repeat() repeat a string multiple times + eval() evaluate a string expression + +--- 595,611 ---- + matchlist() like matchstr() and also return submatches + stridx() first index of a short string in a long string + strridx() last index of a short string in a long string +! strlen() length of a string in bytes +! strchars() length of a string in characters +! strwidth() size of string when displayed +! strdisplaywidth() size of string when displayed, deals with tabs + substitute() substitute a pattern match with a string + submatch() get a specific match in ":s" and substitute() + strpart() get part of a string + expand() expand special keywords + iconv() convert text from one encoding to another + byteidx() byte index of a character in a string ++ byteidxcomp() like byteidx() but count composing characters + repeat() repeat a string multiple times + eval() evaluate a string expression + +*************** +*** 619,624 **** +--- 623,629 ---- + map() change each List item + sort() sort a List + reverse() reverse the order of a List ++ uniq() remove copies of repeated adjacent items + split() split a String into a List + join() join List items into a String + range() return a List with a sequence of numbers +*************** +*** 656,661 **** +--- 661,669 ---- + ceil() round up + floor() round down + trunc() remove value after decimal point ++ fmod() remainder of division ++ exp() exponential ++ log() natural logarithm (logarithm to base e) + log10() logarithm to base 10 + pow() value of x to the exponent y + sqrt() square root +*************** +*** 675,680 **** +--- 683,689 ---- + invert() bitwise invert + or() bitwise OR + xor() bitwise XOR ++ sha256() SHA-256 hash + + Variables: *var-functions* + type() type of a variable +*************** +*** 697,707 **** +--- 706,720 ---- + wincol() window column number of the cursor + winline() window line number of the cursor + cursor() position the cursor at a line/column ++ screencol() get screen column of the cursor ++ screenrow() get screen row of the cursor + getpos() get position of cursor, mark, etc. + setpos() set position of cursor, mark, etc. + byte2line() get line number at a specific byte count + line2byte() byte count at a specific line + diff_filler() get the number of filler lines above a line ++ screenattr() get attribute at a screen line/row ++ screenchar() get character code at a screen line/row + + Working with text in the current buffer: *text-functions* + getline() get a line or list of lines from the buffer +*************** +*** 883,896 **** +--- 896,917 ---- + libcall() call a function in an external library + libcallnr() idem, returning a number + ++ undofile() get the name of the undo file ++ undotree() return the state of the undo tree ++ + getreg() get contents of a register + getregtype() get type of a register + setreg() set contents and type of a register + ++ shiftwidth() effective value of 'shiftwidth' ++ + taglist() get list of matching tags + tagfiles() get a list of tags files + ++ luaeval() evaluate Lua expression + mzeval() evaluate |MzScheme| expression ++ py3eval() evaluate Python expression (|+python3|) ++ pyeval() evaluate Python expression (|+python|) + + ============================================================================== + *41.7* Defining a function +*** ../vim-7.4.217/runtime/doc/version7.txt 2013-08-10 14:23:06.000000000 +0200 +--- runtime/doc/version7.txt 2014-03-25 17:32:29.518040841 +0100 +*************** +*** 942,947 **** +--- 942,948 ---- + |tagfiles()| List with tags file names + |taglist()| get list of matching tags (Yegappan Lakshmanan) + |tr()| translate characters (Ron Aaron) ++ |uniq()| remove copies of repeated adjacent list items + |values()| get List of Dictionary values + |winnr()| takes an argument: what window to use + |winrestview()| restore the view of the current window +*** ../vim-7.4.217/src/eval.c 2014-03-23 15:12:29.915264336 +0100 +--- src/eval.c 2014-03-25 17:52:09.554058923 +0100 +*************** +*** 744,749 **** +--- 744,750 ---- + static void f_type __ARGS((typval_T *argvars, typval_T *rettv)); + static void f_undofile __ARGS((typval_T *argvars, typval_T *rettv)); + static void f_undotree __ARGS((typval_T *argvars, typval_T *rettv)); ++ static void f_uniq __ARGS((typval_T *argvars, typval_T *rettv)); + static void f_values __ARGS((typval_T *argvars, typval_T *rettv)); + static void f_virtcol __ARGS((typval_T *argvars, typval_T *rettv)); + static void f_visualmode __ARGS((typval_T *argvars, typval_T *rettv)); +*************** +*** 8150,8155 **** +--- 8151,8157 ---- + {"type", 1, 1, f_type}, + {"undofile", 1, 1, f_undofile}, + {"undotree", 0, 0, f_undotree}, ++ {"uniq", 1, 3, f_uniq}, + {"values", 1, 1, f_values}, + {"virtcol", 1, 1, f_virtcol}, + {"visualmode", 0, 1, f_visualmode}, +*************** +*** 17023,17032 **** + static char_u *item_compare_func; + static dict_T *item_compare_selfdict; + static int item_compare_func_err; + #define ITEM_COMPARE_FAIL 999 + + /* +! * Compare functions for f_sort() below. + */ + static int + #ifdef __BORLANDC__ +--- 17025,17035 ---- + static char_u *item_compare_func; + static dict_T *item_compare_selfdict; + static int item_compare_func_err; ++ static void do_sort_uniq __ARGS((typval_T *argvars, typval_T *rettv, int sort)); + #define ITEM_COMPARE_FAIL 999 + + /* +! * Compare functions for f_sort() and f_uniq() below. + */ + static int + #ifdef __BORLANDC__ +*************** +*** 17100,17108 **** + * "sort({list})" function + */ + static void +! f_sort(argvars, rettv) + typval_T *argvars; + typval_T *rettv; + { + list_T *l; + listitem_T *li; +--- 17103,17112 ---- + * "sort({list})" function + */ + static void +! do_sort_uniq(argvars, rettv, sort) + typval_T *argvars; + typval_T *rettv; ++ int sort; + { + list_T *l; + listitem_T *li; +*************** +*** 17111,17122 **** + long i; + + if (argvars[0].v_type != VAR_LIST) +! EMSG2(_(e_listarg), "sort()"); + else + { + l = argvars[0].vval.v_list; + if (l == NULL || tv_check_lock(l->lv_lock, +! (char_u *)_("sort() argument"))) + return; + rettv->vval.v_list = l; + rettv->v_type = VAR_LIST; +--- 17115,17126 ---- + long i; + + if (argvars[0].v_type != VAR_LIST) +! EMSG2(_(e_listarg), sort ? "sort()" : "uniq()"); + else + { + l = argvars[0].vval.v_list; + if (l == NULL || tv_check_lock(l->lv_lock, +! (char_u *)(sort ? _("sort() argument") : _("uniq() argument")))) + return; + rettv->vval.v_list = l; + rettv->v_type = VAR_LIST; +*************** +*** 17163,17191 **** + ptrs = (listitem_T **)alloc((int)(len * sizeof(listitem_T *))); + if (ptrs == NULL) + return; +- i = 0; +- for (li = l->lv_first; li != NULL; li = li->li_next) +- ptrs[i++] = li; + +! item_compare_func_err = FALSE; +! /* test the compare function */ +! if (item_compare_func != NULL +! && item_compare2((void *)&ptrs[0], (void *)&ptrs[1]) + == ITEM_COMPARE_FAIL) +! EMSG(_("E702: Sort compare function failed")); + else + { +! /* Sort the array with item pointers. */ +! qsort((void *)ptrs, (size_t)len, sizeof(listitem_T *), +! item_compare_func == NULL ? item_compare : item_compare2); + + if (!item_compare_func_err) + { +! /* Clear the List and append the items in the sorted order. */ +! l->lv_first = l->lv_last = l->lv_idx_item = NULL; +! l->lv_len = 0; +! for (i = 0; i < len; ++i) +! list_append(l, ptrs[i]); + } + } + +--- 17167,17238 ---- + ptrs = (listitem_T **)alloc((int)(len * sizeof(listitem_T *))); + if (ptrs == NULL) + return; + +! i = 0; +! if (sort) +! { +! /* sort(): ptrs will be the list to sort */ +! for (li = l->lv_first; li != NULL; li = li->li_next) +! ptrs[i++] = li; +! +! item_compare_func_err = FALSE; +! /* test the compare function */ +! if (item_compare_func != NULL +! && item_compare2((void *)&ptrs[0], (void *)&ptrs[1]) + == ITEM_COMPARE_FAIL) +! EMSG(_("E702: Sort compare function failed")); +! else +! { +! /* Sort the array with item pointers. */ +! qsort((void *)ptrs, (size_t)len, sizeof(listitem_T *), +! item_compare_func == NULL ? item_compare : item_compare2); +! +! if (!item_compare_func_err) +! { +! /* Clear the List and append the items in sorted order. */ +! l->lv_first = l->lv_last = l->lv_idx_item = NULL; +! l->lv_len = 0; +! for (i = 0; i < len; ++i) +! list_append(l, ptrs[i]); +! } +! } +! } + else + { +! int (*item_compare_func_ptr)__ARGS((const void *, const void *)); +! +! /* f_uniq(): ptrs will be a stack of items to remove */ +! item_compare_func_err = FALSE; +! item_compare_func_ptr = item_compare_func +! ? item_compare2 : item_compare; +! +! for (li = l->lv_first; li != NULL && li->li_next != NULL; +! li = li->li_next) +! { +! if (item_compare_func_ptr((void *)&li, (void *)&li->li_next) +! == 0) +! ptrs[i++] = li; +! if (item_compare_func_err) +! { +! EMSG(_("E882: Uniq compare function failed")); +! break; +! } +! } + + if (!item_compare_func_err) + { +! while (--i >= 0) +! { +! li = ptrs[i]->li_next; +! ptrs[i]->li_next = li->li_next; +! if (li->li_next != NULL) +! li->li_next->li_prev = ptrs[i]; +! else +! l->lv_last = ptrs[i]; +! list_fix_watch(l, li); +! listitem_free(li); +! l->lv_len--; +! } + } + } + +*************** +*** 17194,17199 **** +--- 17241,17268 ---- + } + + /* ++ * "sort({list})" function ++ */ ++ static void ++ f_sort(argvars, rettv) ++ typval_T *argvars; ++ typval_T *rettv; ++ { ++ do_sort_uniq(argvars, rettv, TRUE); ++ } ++ ++ /* ++ * "uniq({list})" function ++ */ ++ static void ++ f_uniq(argvars, rettv) ++ typval_T *argvars; ++ typval_T *rettv; ++ { ++ do_sort_uniq(argvars, rettv, FALSE); ++ } ++ ++ /* + * "soundfold({word})" function + */ + static void +*** ../vim-7.4.217/src/testdir/test55.in 2014-01-14 15:24:24.000000000 +0100 +--- src/testdir/test55.in 2014-03-25 17:32:29.522040841 +0100 +*************** +*** 323,335 **** + : $put ='caught ' . v:exception + :endtry + :" +! :" reverse() and sort() +! :let l = ['-0', 'A11', 2, 'xaaa', 4, 'foo', 'foo6', [0, 1, 2], 'x8'] + :$put =string(reverse(l)) + :$put =string(reverse(reverse(l))) + :$put =string(sort(l)) + :$put =string(reverse(sort(l))) + :$put =string(sort(reverse(sort(l)))) + :" + :" splitting a string to a List + :$put =string(split(' aa bb ')) +--- 323,337 ---- + : $put ='caught ' . v:exception + :endtry + :" +! :" reverse(), sort(), uniq() +! :let l = ['-0', 'A11', 2, 2, 'xaaa', 4, 'foo', 'foo6', 'foo', [0, 1, 2], 'x8', [0, 1, 2], 1.5] +! :$put =string(uniq(copy(l))) + :$put =string(reverse(l)) + :$put =string(reverse(reverse(l))) + :$put =string(sort(l)) + :$put =string(reverse(sort(l))) + :$put =string(sort(reverse(sort(l)))) ++ :$put =string(uniq(sort(l))) + :" + :" splitting a string to a List + :$put =string(split(' aa bb ')) +*** ../vim-7.4.217/src/testdir/test55.ok 2014-01-14 15:24:24.000000000 +0100 +--- src/testdir/test55.ok 2014-03-25 17:32:29.522040841 +0100 +*************** +*** 94,104 **** + caught a:000[2] + caught a:000[3] + [1, 2, [3, 9, 5, 6], {'a': 12, '5': 8}] +! ['x8', [0, 1, 2], 'foo6', 'foo', 4, 'xaaa', 2, 'A11', '-0'] +! ['x8', [0, 1, 2], 'foo6', 'foo', 4, 'xaaa', 2, 'A11', '-0'] +! ['-0', 'A11', 'foo', 'foo6', 'x8', 'xaaa', 2, 4, [0, 1, 2]] +! [[0, 1, 2], 4, 2, 'xaaa', 'x8', 'foo6', 'foo', 'A11', '-0'] +! ['-0', 'A11', 'foo', 'foo6', 'x8', 'xaaa', 2, 4, [0, 1, 2]] + ['aa', 'bb'] + ['aa', 'bb'] + ['', 'aa', 'bb', ''] +--- 94,106 ---- + caught a:000[2] + caught a:000[3] + [1, 2, [3, 9, 5, 6], {'a': 12, '5': 8}] +! ['-0', 'A11', 2, 'xaaa', 4, 'foo', 'foo6', 'foo', [0, 1, 2], 'x8', [0, 1, 2], 1.5] +! [1.5, [0, 1, 2], 'x8', [0, 1, 2], 'foo', 'foo6', 'foo', 4, 'xaaa', 2, 2, 'A11', '-0'] +! [1.5, [0, 1, 2], 'x8', [0, 1, 2], 'foo', 'foo6', 'foo', 4, 'xaaa', 2, 2, 'A11', '-0'] +! ['-0', 'A11', 'foo', 'foo', 'foo6', 'x8', 'xaaa', 1.5, 2, 2, 4, [0, 1, 2], [0, 1, 2]] +! [[0, 1, 2], [0, 1, 2], 4, 2, 2, 1.5, 'xaaa', 'x8', 'foo6', 'foo', 'foo', 'A11', '-0'] +! ['-0', 'A11', 'foo', 'foo', 'foo6', 'x8', 'xaaa', 1.5, 2, 2, 4, [0, 1, 2], [0, 1, 2]] +! ['-0', 'A11', 'foo', 'foo6', 'x8', 'xaaa', 1.5, 2, 4, [0, 1, 2]] + ['aa', 'bb'] + ['aa', 'bb'] + ['', 'aa', 'bb', ''] +*** ../vim-7.4.217/src/version.c 2014-03-25 18:05:45.242071421 +0100 +--- src/version.c 2014-03-25 17:34:51.918043023 +0100 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 218, + /**/ + +-- +Never under any circumstances take a sleeping pill +and a laxative on the same night. + + /// 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/patches/source/vim/patches/7.4.219 b/patches/source/vim/patches/7.4.219 new file mode 100644 index 000000000..69a517782 --- /dev/null +++ b/patches/source/vim/patches/7.4.219 @@ -0,0 +1,100 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.219 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.219 +Problem: When 'relativenumber' or 'cursorline' are set the window is + redrawn much to often. (Patrick Hemmer, Dominique Pelle) +Solution: Check the VALID_CROW flag instead of VALID_WROW. +Files: src/move.c + + +*** ../vim-7.4.218/src/move.c 2014-03-23 15:12:29.927264336 +0100 +--- src/move.c 2014-03-27 11:59:28.524382473 +0100 +*************** +*** 772,777 **** +--- 772,791 ---- + } + } + ++ /* Redraw when w_cline_row changes and 'relativenumber' or 'cursorline' is ++ * set. */ ++ if ((curwin->w_p_rnu ++ #ifdef FEAT_SYN_HL ++ || curwin->w_p_cul ++ #endif ++ ) ++ && (curwin->w_valid & VALID_CROW) == 0 ++ # ifdef FEAT_INS_EXPAND ++ && !pum_visible() ++ # endif ++ ) ++ redraw_later(SOME_VALID); ++ + wp->w_valid |= VALID_CROW|VALID_CHEIGHT; + + /* validate botline too, if update_screen doesn't do it */ +*************** +*** 1172,1193 **** + if (prev_skipcol != curwin->w_skipcol) + redraw_later(NOT_VALID); + +- /* Redraw when w_row changes and 'relativenumber' is set */ +- if (((curwin->w_valid & VALID_WROW) == 0 && (curwin->w_p_rnu + #ifdef FEAT_SYN_HL +! /* or when w_row changes and 'cursorline' is set. */ +! || curwin->w_p_cul +! #endif +! )) +! #ifdef FEAT_SYN_HL +! /* or when w_virtcol changes and 'cursorcolumn' is set */ +! || (curwin->w_p_cuc && (curwin->w_valid & VALID_VIRTCOL) == 0) +! #endif +! ) + # ifdef FEAT_INS_EXPAND +! if (!pum_visible()) + # endif +! redraw_later(SOME_VALID); + + curwin->w_valid |= VALID_WCOL|VALID_WROW|VALID_VIRTCOL; + } +--- 1186,1200 ---- + if (prev_skipcol != curwin->w_skipcol) + redraw_later(NOT_VALID); + + #ifdef FEAT_SYN_HL +! /* Redraw when w_virtcol changes and 'cursorcolumn' is set */ +! if (curwin->w_p_cuc && (curwin->w_valid & VALID_VIRTCOL) == 0 + # ifdef FEAT_INS_EXPAND +! && !pum_visible() + # endif +! ) +! redraw_later(SOME_VALID); +! #endif + + curwin->w_valid |= VALID_WCOL|VALID_WROW|VALID_VIRTCOL; + } +*** ../vim-7.4.218/src/version.c 2014-03-25 18:23:27.062087691 +0100 +--- src/version.c 2014-03-27 12:11:15.276393302 +0100 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 219, + /**/ + +-- +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/patches/source/vim/patches/7.4.220 b/patches/source/vim/patches/7.4.220 new file mode 100644 index 000000000..6df81d80f --- /dev/null +++ b/patches/source/vim/patches/7.4.220 @@ -0,0 +1,106 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.220 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.220 +Problem: Test 105 does not work in a shadow dir. (James McCoy) +Solution: Omit "src/" from the checked path. +Files: src/testdir/test105.in, src/testdir/test105.ok + + +*** ../vim-7.4.219/src/testdir/test105.in 2014-02-23 23:38:58.812760280 +0100 +--- src/testdir/test105.in 2014-03-27 12:31:45.052412146 +0100 +*************** +*** 7,13 **** + :set shellslash + :let tab="\t" + :command -nargs=1 Put :let expr=<q-args> | $put =expr.tab.strtrans(string(eval(expr))) +! :let $HOME=fnamemodify('.', ':p:h:h:h') + :Put fnamemodify('.', ':p' )[-1:] + :Put fnamemodify('.', ':p:h' )[-1:] + :Put fnamemodify('test.out', ':p' )[-1:] +--- 7,13 ---- + :set shellslash + :let tab="\t" + :command -nargs=1 Put :let expr=<q-args> | $put =expr.tab.strtrans(string(eval(expr))) +! :let $HOME=fnamemodify('.', ':p:h:h') + :Put fnamemodify('.', ':p' )[-1:] + :Put fnamemodify('.', ':p:h' )[-1:] + :Put fnamemodify('test.out', ':p' )[-1:] +*************** +*** 23,29 **** + :Put fnamemodify('abc.fb2.tar.gz', ':r' ) + :Put fnamemodify('abc.fb2.tar.gz', ':r:r' ) + :Put fnamemodify('abc.fb2.tar.gz', ':r:r:r' ) +! :Put substitute(fnamemodify('abc.fb2.tar.gz', ':p:r:r'), '.*\(src/testdir/.*\)', '\1', '') + :Put fnamemodify('abc.fb2.tar.gz', ':e' ) + :Put fnamemodify('abc.fb2.tar.gz', ':e:e' ) + :Put fnamemodify('abc.fb2.tar.gz', ':e:e:e' ) +--- 23,29 ---- + :Put fnamemodify('abc.fb2.tar.gz', ':r' ) + :Put fnamemodify('abc.fb2.tar.gz', ':r:r' ) + :Put fnamemodify('abc.fb2.tar.gz', ':r:r:r' ) +! :Put substitute(fnamemodify('abc.fb2.tar.gz', ':p:r:r'), '.*\(testdir/.*\)', '\1', '') + :Put fnamemodify('abc.fb2.tar.gz', ':e' ) + :Put fnamemodify('abc.fb2.tar.gz', ':e:e' ) + :Put fnamemodify('abc.fb2.tar.gz', ':e:e:e' ) +*** ../vim-7.4.219/src/testdir/test105.ok 2014-02-23 23:38:58.812760280 +0100 +--- src/testdir/test105.ok 2014-03-27 12:31:40.732412080 +0100 +*************** +*** 3,10 **** + fnamemodify('test.out', ':p' )[-1:] 't' + fnamemodify('test.out', ':.' ) 'test.out' + fnamemodify('../testdir/a', ':.' ) 'a' +! fnamemodify('test.out', ':~' ) '~/src/testdir/test.out' +! fnamemodify('../testdir/a', ':~' ) '~/src/testdir/a' + fnamemodify('../testdir/a', ':t' ) 'a' + fnamemodify('.', ':p:t' ) '' + fnamemodify('test.out', ':p:t' ) 'test.out' +--- 3,10 ---- + fnamemodify('test.out', ':p' )[-1:] 't' + fnamemodify('test.out', ':.' ) 'test.out' + fnamemodify('../testdir/a', ':.' ) 'a' +! fnamemodify('test.out', ':~' ) '~/testdir/test.out' +! fnamemodify('../testdir/a', ':~' ) '~/testdir/a' + fnamemodify('../testdir/a', ':t' ) 'a' + fnamemodify('.', ':p:t' ) '' + fnamemodify('test.out', ':p:t' ) 'test.out' +*************** +*** 13,19 **** + fnamemodify('abc.fb2.tar.gz', ':r' ) 'abc.fb2.tar' + fnamemodify('abc.fb2.tar.gz', ':r:r' ) 'abc.fb2' + fnamemodify('abc.fb2.tar.gz', ':r:r:r' ) 'abc' +! substitute(fnamemodify('abc.fb2.tar.gz', ':p:r:r'), '.*\(src/testdir/.*\)', '\1', '') 'src/testdir/abc.fb2' + fnamemodify('abc.fb2.tar.gz', ':e' ) 'gz' + fnamemodify('abc.fb2.tar.gz', ':e:e' ) 'tar.gz' + fnamemodify('abc.fb2.tar.gz', ':e:e:e' ) 'fb2.tar.gz' +--- 13,19 ---- + fnamemodify('abc.fb2.tar.gz', ':r' ) 'abc.fb2.tar' + fnamemodify('abc.fb2.tar.gz', ':r:r' ) 'abc.fb2' + fnamemodify('abc.fb2.tar.gz', ':r:r:r' ) 'abc' +! substitute(fnamemodify('abc.fb2.tar.gz', ':p:r:r'), '.*\(testdir/.*\)', '\1', '') 'testdir/abc.fb2' + fnamemodify('abc.fb2.tar.gz', ':e' ) 'gz' + fnamemodify('abc.fb2.tar.gz', ':e:e' ) 'tar.gz' + fnamemodify('abc.fb2.tar.gz', ':e:e:e' ) 'fb2.tar.gz' +*** ../vim-7.4.219/src/version.c 2014-03-27 12:11:43.888393741 +0100 +--- src/version.c 2014-03-27 12:32:56.320413238 +0100 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 220, + /**/ + +-- +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/patches/source/vim/patches/7.4.221 b/patches/source/vim/patches/7.4.221 new file mode 100644 index 000000000..4162a24e5 --- /dev/null +++ b/patches/source/vim/patches/7.4.221 @@ -0,0 +1,62 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.221 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.221 +Problem: Quickfix doesn't resize on ":copen 20". (issue 199) +Solution: Resize the window when requested. (Christian Brabandt) +Files: src/quickfix.c + + +*** ../vim-7.4.220/src/quickfix.c 2014-03-23 15:12:29.931264336 +0100 +--- src/quickfix.c 2014-03-27 16:56:25.316655478 +0100 +*************** +*** 2358,2364 **** +--- 2358,2379 ---- + win = qf_find_win(qi); + + if (win != NULL && cmdmod.tab == 0) ++ { + win_goto(win); ++ if (eap->addr_count != 0) ++ { ++ #ifdef FEAT_VERTSPLIT ++ if (cmdmod.split & WSP_VERT) ++ { ++ if (height != W_WIDTH(win)) ++ win_setwidth(height); ++ } ++ else ++ #endif ++ if (height != win->w_height) ++ win_setheight(height); ++ } ++ } + else + { + qf_buf = qf_find_buf(qi); +*** ../vim-7.4.220/src/version.c 2014-03-27 12:40:26.188420131 +0100 +--- src/version.c 2014-03-27 16:54:38.864653847 +0100 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 221, + /**/ + +-- +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/patches/source/vim/patches/7.4.222 b/patches/source/vim/patches/7.4.222 new file mode 100644 index 000000000..79f04f666 --- /dev/null +++ b/patches/source/vim/patches/7.4.222 @@ -0,0 +1,83 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.222 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.222 +Problem: The Ruby directory is constructed from parts. +Solution: Use 'rubyarchhdrdir' if it exists. (James McCoy) +Files: src/configure.in, src/auto/configure + + +*** ../vim-7.4.221/src/configure.in 2014-02-23 22:52:33.356764716 +0100 +--- src/configure.in 2014-03-27 17:13:09.624670867 +0100 +*************** +*** 1692,1700 **** + if test "X$rubyhdrdir" != "X"; then + AC_MSG_RESULT($rubyhdrdir) + RUBY_CFLAGS="-I$rubyhdrdir" +! rubyarch=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig::CONFIG[['arch']]"` +! if test -d "$rubyhdrdir/$rubyarch"; then +! RUBY_CFLAGS="$RUBY_CFLAGS -I$rubyhdrdir/$rubyarch" + fi + rubyversion=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig::CONFIG[['ruby_version']].gsub(/\./, '')[[0,2]]"` + if test "X$rubyversion" = "X"; then +--- 1692,1700 ---- + if test "X$rubyhdrdir" != "X"; then + AC_MSG_RESULT($rubyhdrdir) + RUBY_CFLAGS="-I$rubyhdrdir" +! rubyarchdir=`$vi_cv_path_ruby -r rbconfig -e "print ($ruby_rbconfig::CONFIG.has_key? 'rubyarchhdrdir') ? $ruby_rbconfig::CONFIG[['rubyarchhdrdir']] : '$rubyhdrdir/'+$ruby_rbconfig::CONFIG[['arch']]"` +! if test -d "$rubyarchdir"; then +! RUBY_CFLAGS="$RUBY_CFLAGS -I$rubyarchdir" + fi + rubyversion=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig::CONFIG[['ruby_version']].gsub(/\./, '')[[0,2]]"` + if test "X$rubyversion" = "X"; then +*** ../vim-7.4.221/src/auto/configure 2014-02-23 22:52:33.364764715 +0100 +--- src/auto/configure 2014-03-27 17:14:25.256672026 +0100 +*************** +*** 6777,6785 **** + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $rubyhdrdir" >&5 + $as_echo "$rubyhdrdir" >&6; } + RUBY_CFLAGS="-I$rubyhdrdir" +! rubyarch=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig::CONFIG['arch']"` +! if test -d "$rubyhdrdir/$rubyarch"; then +! RUBY_CFLAGS="$RUBY_CFLAGS -I$rubyhdrdir/$rubyarch" + fi + rubyversion=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig::CONFIG['ruby_version'].gsub(/\./, '')[0,2]"` + if test "X$rubyversion" = "X"; then +--- 6777,6785 ---- + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $rubyhdrdir" >&5 + $as_echo "$rubyhdrdir" >&6; } + RUBY_CFLAGS="-I$rubyhdrdir" +! rubyarchdir=`$vi_cv_path_ruby -r rbconfig -e "print ($ruby_rbconfig::CONFIG.has_key? 'rubyarchhdrdir') ? $ruby_rbconfig::CONFIG['rubyarchhdrdir'] : '$rubyhdrdir/'+$ruby_rbconfig::CONFIG['arch']"` +! if test -d "$rubyarchdir"; then +! RUBY_CFLAGS="$RUBY_CFLAGS -I$rubyarchdir" + fi + rubyversion=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig::CONFIG['ruby_version'].gsub(/\./, '')[0,2]"` + if test "X$rubyversion" = "X"; then +*** ../vim-7.4.221/src/version.c 2014-03-27 17:02:22.084660944 +0100 +--- src/version.c 2014-03-27 17:13:29.220671167 +0100 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 222, + /**/ + +-- +Engineers are always delighted to share wisdom, even in areas in which they +have no experience whatsoever. Their logic provides them with inherent +insight into any field of expertise. This can be a problem when dealing with +the illogical people who believe that knowledge can only be derived through +experience. + (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/patches/source/vim/patches/7.4.223 b/patches/source/vim/patches/7.4.223 new file mode 100644 index 000000000..c7e447a2a --- /dev/null +++ b/patches/source/vim/patches/7.4.223 @@ -0,0 +1,6557 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.223 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.223 +Problem: Still using an older autoconf version. +Solution: Switch to autoconf 2.69. +Files: src/Makefile, src/configure.in, src/auto/configure + + +*** ../vim-7.4.222/src/Makefile 2014-03-25 15:34:44.993932592 +0100 +--- src/Makefile 2014-03-27 17:37:32.864693288 +0100 +*************** +*** 586,591 **** +--- 586,594 ---- + # as root: sysctl -w vm.max_proc_mmap=30000 + #EXTRA_LIBS = /usr/local/lib/libefence.a + ++ # Autoconf binary. ++ AUTOCONF = autoconf ++ + # PURIFY - remove the # to use the "purify" program (hoi Nia++!) + #PURIFY = purify + +*************** +*** 1713,1719 **** + # - Uses ">config.log" instead of "./config.log". + autoconf: + if test ! -f configure.save; then mv configure configure.save; fi +! autoconf + sed -e 's+>config.log+>auto/config.log+' -e 's+\./config.log+auto/config.log+' configure > auto/configure + chmod 755 auto/configure + mv -f configure.save configure +--- 1716,1722 ---- + # - Uses ">config.log" instead of "./config.log". + autoconf: + if test ! -f configure.save; then mv configure configure.save; fi +! $(AUTOCONF) + sed -e 's+>config.log+>auto/config.log+' -e 's+\./config.log+auto/config.log+' configure > auto/configure + chmod 755 auto/configure + mv -f configure.save configure +*** ../vim-7.4.222/src/configure.in 2014-03-27 17:19:05.860676325 +0100 +--- src/configure.in 2014-03-27 17:31:39.412687872 +0100 +*************** +*** 1397,1403 **** + ldflags_save=$LDFLAGS + dnl -ldl must go first to make this work on Archlinux (Roland Puntaier) + LDFLAGS="-ldl $LDFLAGS" +! AC_RUN_IFELSE([ + #include <dlfcn.h> + /* If this program fails, then RTLD_GLOBAL is needed. + * RTLD_GLOBAL will be used and then it is not possible to +--- 1397,1403 ---- + ldflags_save=$LDFLAGS + dnl -ldl must go first to make this work on Archlinux (Roland Puntaier) + LDFLAGS="-ldl $LDFLAGS" +! AC_RUN_IFELSE([AC_LANG_SOURCE([ + #include <dlfcn.h> + /* If this program fails, then RTLD_GLOBAL is needed. + * RTLD_GLOBAL will be used and then it is not possible to +*************** +*** 1430,1436 **** + if (no_rtl_global_needed_for("${python_INSTSONAME}", "${vi_cv_path_python_pfx}")) + not_needed = 1; + return !not_needed; +! }], + [AC_MSG_RESULT(yes);AC_DEFINE(PY_NO_RTLD_GLOBAL)], [AC_MSG_RESULT(no)]) + + CFLAGS=$cflags_save +--- 1430,1436 ---- + if (no_rtl_global_needed_for("${python_INSTSONAME}", "${vi_cv_path_python_pfx}")) + not_needed = 1; + return !not_needed; +! }])], + [AC_MSG_RESULT(yes);AC_DEFINE(PY_NO_RTLD_GLOBAL)], [AC_MSG_RESULT(no)]) + + CFLAGS=$cflags_save +*************** +*** 1442,1448 **** + ldflags_save=$LDFLAGS + dnl -ldl must go first to make this work on Archlinux (Roland Puntaier) + LDFLAGS="-ldl $LDFLAGS" +! AC_RUN_IFELSE([ + #include <dlfcn.h> + #include <wchar.h> + /* If this program fails, then RTLD_GLOBAL is needed. +--- 1442,1448 ---- + ldflags_save=$LDFLAGS + dnl -ldl must go first to make this work on Archlinux (Roland Puntaier) + LDFLAGS="-ldl $LDFLAGS" +! AC_RUN_IFELSE([AC_LANG_SOURCE([ + #include <dlfcn.h> + #include <wchar.h> + /* If this program fails, then RTLD_GLOBAL is needed. +*************** +*** 1476,1482 **** + if (no_rtl_global_needed_for("${python3_INSTSONAME}", L"${vi_cv_path_python3_pfx}")) + not_needed = 1; + return !not_needed; +! }], + [AC_MSG_RESULT(yes);AC_DEFINE(PY3_NO_RTLD_GLOBAL)], [AC_MSG_RESULT(no)]) + + CFLAGS=$cflags_save +--- 1476,1482 ---- + if (no_rtl_global_needed_for("${python3_INSTSONAME}", L"${vi_cv_path_python3_pfx}")) + not_needed = 1; + return !not_needed; +! }])], + [AC_MSG_RESULT(yes);AC_DEFINE(PY3_NO_RTLD_GLOBAL)], [AC_MSG_RESULT(no)]) + + CFLAGS=$cflags_save +*************** +*** 2737,2743 **** + + AC_CACHE_CHECK([whether toupper is broken], [vim_cv_toupper_broken], + [ +! AC_RUN_IFELSE([[ + #include "confdefs.h" + #include <ctype.h> + #if STDC_HEADERS +--- 2737,2743 ---- + + AC_CACHE_CHECK([whether toupper is broken], [vim_cv_toupper_broken], + [ +! AC_RUN_IFELSE([AC_LANG_SOURCE([[ + #include "confdefs.h" + #include <ctype.h> + #if STDC_HEADERS +*************** +*** 2745,2751 **** + # include <stddef.h> + #endif + main() { exit(toupper('A') == 'A' && tolower('z') == 'z'); } +! ]],[ + vim_cv_toupper_broken=yes + ],[ + vim_cv_toupper_broken=no +--- 2745,2751 ---- + # include <stddef.h> + #endif + main() { exit(toupper('A') == 'A' && tolower('z') == 'z'); } +! ]])],[ + vim_cv_toupper_broken=yes + ],[ + vim_cv_toupper_broken=no +*************** +*** 2993,2999 **** + + AC_CACHE_CHECK([whether we talk terminfo], [vim_cv_terminfo], + [ +! AC_RUN_IFELSE([[ + #include "confdefs.h" + #ifdef HAVE_TERMCAP_H + # include <termcap.h> +--- 2993,2999 ---- + + AC_CACHE_CHECK([whether we talk terminfo], [vim_cv_terminfo], + [ +! AC_RUN_IFELSE([AC_LANG_SOURCE([[ + #include "confdefs.h" + #ifdef HAVE_TERMCAP_H + # include <termcap.h> +*************** +*** 3007,3013 **** + #endif + main() + {char *s; s=(char *)tgoto("%p1%d", 0, 1); exit(!strcmp(s==0 ? "" : s, "1")); } +! ]],[ + vim_cv_terminfo=no + ],[ + vim_cv_terminfo=yes +--- 3007,3013 ---- + #endif + main() + {char *s; s=(char *)tgoto("%p1%d", 0, 1); exit(!strcmp(s==0 ? "" : s, "1")); } +! ]])],[ + vim_cv_terminfo=no + ],[ + vim_cv_terminfo=yes +*************** +*** 3023,3029 **** + if test "x$olibs" != "x$LIBS"; then + AC_CACHE_CHECK([what tgetent() returns for an unknown terminal], [vim_cv_tgent], + [ +! AC_RUN_IFELSE([[ + #include "confdefs.h" + #ifdef HAVE_TERMCAP_H + # include <termcap.h> +--- 3023,3029 ---- + if test "x$olibs" != "x$LIBS"; then + AC_CACHE_CHECK([what tgetent() returns for an unknown terminal], [vim_cv_tgent], + [ +! AC_RUN_IFELSE([AC_LANG_SOURCE([[ + #include "confdefs.h" + #ifdef HAVE_TERMCAP_H + # include <termcap.h> +*************** +*** 3034,3040 **** + #endif + main() + {char s[10000]; int res = tgetent(s, "thisterminaldoesnotexist"); exit(res != 0); } +! ]],[ + vim_cv_tgent=zero + ],[ + vim_cv_tgent=non-zero +--- 3034,3040 ---- + #endif + main() + {char s[10000]; int res = tgetent(s, "thisterminaldoesnotexist"); exit(res != 0); } +! ]])],[ + vim_cv_tgent=zero + ],[ + vim_cv_tgent=non-zero +*************** +*** 3158,3164 **** + rm -f conftest_grp + AC_CACHE_CHECK([default tty permissions/group], [vim_cv_tty_group], + [ +! AC_RUN_IFELSE([[ + #include "confdefs.h" + #include <sys/types.h> + #if STDC_HEADERS +--- 3158,3164 ---- + rm -f conftest_grp + AC_CACHE_CHECK([default tty permissions/group], [vim_cv_tty_group], + [ +! AC_RUN_IFELSE([AC_LANG_SOURCE([[ + #include "confdefs.h" + #include <sys/types.h> + #if STDC_HEADERS +*************** +*** 3194,3200 **** + fclose(fp); + exit(0); + } +! ]],[ + if test -f conftest_grp; then + vim_cv_tty_group=`cat conftest_grp` + if test "x$vim_cv_tty_mode" = "x" ; then +--- 3194,3200 ---- + fclose(fp); + exit(0); + } +! ]])],[ + if test -f conftest_grp; then + vim_cv_tty_group=`cat conftest_grp` + if test "x$vim_cv_tty_mode" = "x" ; then +*************** +*** 3252,3258 **** + dnl system("sh -c pwd") + AC_CACHE_CHECK([getcwd implementation is broken], [vim_cv_getcwd_broken], + [ +! AC_RUN_IFELSE([[ + #include "confdefs.h" + #ifdef HAVE_UNISTD_H + #include <unistd.h> +--- 3252,3258 ---- + dnl system("sh -c pwd") + AC_CACHE_CHECK([getcwd implementation is broken], [vim_cv_getcwd_broken], + [ +! AC_RUN_IFELSE([AC_LANG_SOURCE([[ + #include "confdefs.h" + #ifdef HAVE_UNISTD_H + #include <unistd.h> +*************** +*** 3265,3271 **** + environ = dagger; + return getcwd(buffer, 500) ? 0 : 1; + } +! ]],[ + vim_cv_getcwd_broken=no + ],[ + vim_cv_getcwd_broken=yes +--- 3265,3271 ---- + environ = dagger; + return getcwd(buffer, 500) ? 0 : 1; + } +! ]])],[ + vim_cv_getcwd_broken=no + ],[ + vim_cv_getcwd_broken=yes +*************** +*** 3308,3314 **** + + AC_CACHE_CHECK([whether stat() ignores a trailing slash], [vim_cv_stat_ignores_slash], + [ +! AC_RUN_IFELSE([[ + #include "confdefs.h" + #if STDC_HEADERS + # include <stdlib.h> +--- 3308,3314 ---- + + AC_CACHE_CHECK([whether stat() ignores a trailing slash], [vim_cv_stat_ignores_slash], + [ +! AC_RUN_IFELSE([AC_LANG_SOURCE([[ + #include "confdefs.h" + #if STDC_HEADERS + # include <stdlib.h> +*************** +*** 3317,3323 **** + #include <sys/types.h> + #include <sys/stat.h> + main() {struct stat st; exit(stat("configure/", &st) != 0); } +! ]],[ + vim_cv_stat_ignores_slash=yes + ],[ + vim_cv_stat_ignores_slash=no +--- 3317,3323 ---- + #include <sys/types.h> + #include <sys/stat.h> + main() {struct stat st; exit(stat("configure/", &st) != 0); } +! ]])],[ + vim_cv_stat_ignores_slash=yes + ],[ + vim_cv_stat_ignores_slash=no +*************** +*** 3631,3637 **** + + AC_CACHE_CHECK([whether memmove handles overlaps],[vim_cv_memmove_handles_overlap], + [ +! AC_RUN_IFELSE([[#define mch_memmove(s,d,l) memmove(d,s,l) $bcopy_test_prog]], + [ + vim_cv_memmove_handles_overlap=yes + ],[ +--- 3631,3637 ---- + + AC_CACHE_CHECK([whether memmove handles overlaps],[vim_cv_memmove_handles_overlap], + [ +! AC_RUN_IFELSE([AC_LANG_SOURCE([[#define mch_memmove(s,d,l) memmove(d,s,l) $bcopy_test_prog]])], + [ + vim_cv_memmove_handles_overlap=yes + ],[ +*************** +*** 3646,3652 **** + else + AC_CACHE_CHECK([whether bcopy handles overlaps],[vim_cv_bcopy_handles_overlap], + [ +! AC_RUN_IFELSE([[#define mch_bcopy(s,d,l) bcopy(d,s,l) $bcopy_test_prog]], + [ + vim_cv_bcopy_handles_overlap=yes + ],[ +--- 3646,3652 ---- + else + AC_CACHE_CHECK([whether bcopy handles overlaps],[vim_cv_bcopy_handles_overlap], + [ +! AC_RUN_IFELSE([AC_LANG_SOURCE([[#define mch_bcopy(s,d,l) bcopy(d,s,l) $bcopy_test_prog]])], + [ + vim_cv_bcopy_handles_overlap=yes + ],[ +*************** +*** 3661,3667 **** + else + AC_CACHE_CHECK([whether memcpy handles overlaps],[vim_cv_memcpy_handles_overlap], + [ +! AC_RUN_IFELSE([[#define mch_memcpy(s,d,l) memcpy(d,s,l) $bcopy_test_prog]], + [ + vim_cv_memcpy_handles_overlap=yes + ],[ +--- 3661,3667 ---- + else + AC_CACHE_CHECK([whether memcpy handles overlaps],[vim_cv_memcpy_handles_overlap], + [ +! AC_RUN_IFELSE([AC_LANG_SOURCE([[#define mch_memcpy(s,d,l) memcpy(d,s,l) $bcopy_test_prog]])], + [ + vim_cv_memcpy_handles_overlap=yes + ],[ +*** ../vim-7.4.222/src/auto/configure 2014-03-27 17:19:05.868676325 +0100 +--- src/auto/configure 2014-03-27 17:35:39.660691553 +0100 +*************** +*** 1,11 **** + #! /bin/sh + # Guess values for system-dependent variables and create Makefiles. +! # Generated by GNU Autoconf 2.65. + # + # +! # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +! # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +! # Inc. + # + # + # This configure script is free software; the Free Software Foundation +--- 1,9 ---- + #! /bin/sh + # Guess values for system-dependent variables and create Makefiles. +! # Generated by GNU Autoconf 2.69. + # + # +! # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. + # + # + # This configure script is free software; the Free Software Foundation +*************** +*** 89,94 **** +--- 87,93 ---- + IFS=" "" $as_nl" + + # Find who we are. Look in the path if we contain no directory separator. ++ as_myself= + case $0 in #(( + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +*************** +*** 133,138 **** +--- 132,162 ---- + # CDPATH. + (unset CDPATH) >/dev/null 2>&1 && unset CDPATH + ++ # Use a proper internal environment variable to ensure we don't fall ++ # into an infinite loop, continuously re-executing ourselves. ++ if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then ++ _as_can_reexec=no; export _as_can_reexec; ++ # We cannot yet assume a decent shell, so we have to provide a ++ # neutralization value for shells without unset; and this also ++ # works around shells that cannot unset nonexistent variables. ++ # Preserve -v and -x to the replacement shell. ++ BASH_ENV=/dev/null ++ ENV=/dev/null ++ (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV ++ case $- in # (((( ++ *v*x* | *x*v* ) as_opts=-vx ;; ++ *v* ) as_opts=-v ;; ++ *x* ) as_opts=-x ;; ++ * ) as_opts= ;; ++ esac ++ exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} ++ # Admittedly, this is quite paranoid, since all the known shells bail ++ # out after a failed `exec'. ++ $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 ++ as_fn_exit 255 ++ fi ++ # We don't want this to propagate to other subprocesses. ++ { _as_can_reexec=; unset _as_can_reexec;} + if test "x$CONFIG_SHELL" = x; then + as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : + emulate sh +*************** +*** 166,172 **** + else + exitcode=1; echo positional parameters were not saved. + fi +! test x\$exitcode = x0 || exit 1" + as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO + as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO + eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && +--- 190,197 ---- + else + exitcode=1; echo positional parameters were not saved. + fi +! test x\$exitcode = x0 || exit 1 +! test -x / || exit 1" + as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO + as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO + eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && +*************** +*** 211,224 **** + + + if test "x$CONFIG_SHELL" != x; then : +! # We cannot yet assume a decent shell, so we have to provide a +! # neutralization value for shells without unset; and this also +! # works around shells that cannot unset nonexistent variables. +! BASH_ENV=/dev/null +! ENV=/dev/null +! (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +! export CONFIG_SHELL +! exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} + fi + + if test x$as_have_required = xno; then : +--- 236,260 ---- + + + if test "x$CONFIG_SHELL" != x; then : +! export CONFIG_SHELL +! # We cannot yet assume a decent shell, so we have to provide a +! # neutralization value for shells without unset; and this also +! # works around shells that cannot unset nonexistent variables. +! # Preserve -v and -x to the replacement shell. +! BASH_ENV=/dev/null +! ENV=/dev/null +! (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +! case $- in # (((( +! *v*x* | *x*v* ) as_opts=-vx ;; +! *v* ) as_opts=-v ;; +! *x* ) as_opts=-x ;; +! * ) as_opts= ;; +! esac +! exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +! # Admittedly, this is quite paranoid, since all the known shells bail +! # out after a failed `exec'. +! $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +! exit 255 + fi + + if test x$as_have_required = xno; then : +*************** +*** 316,325 **** + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" +! } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" + + + } # as_fn_mkdir_p + # as_fn_append VAR VALUE + # ---------------------- + # Append the text in VALUE to the end of the definition contained in VAR. Take +--- 352,369 ---- + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" +! } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" + + + } # as_fn_mkdir_p ++ ++ # as_fn_executable_p FILE ++ # ----------------------- ++ # Test if FILE is an executable regular file. ++ as_fn_executable_p () ++ { ++ test -f "$1" && test -x "$1" ++ } # as_fn_executable_p + # as_fn_append VAR VALUE + # ---------------------- + # Append the text in VALUE to the end of the definition contained in VAR. Take +*************** +*** 356,374 **** + fi # as_fn_arith + + +! # as_fn_error ERROR [LINENO LOG_FD] +! # --------------------------------- + # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are + # provided, also output the error to LOG_FD, referencing LINENO. Then exit the +! # script with status $?, using 1 if that was 0. + as_fn_error () + { +! as_status=$?; test $as_status -eq 0 && as_status=1 +! if test "$3"; then +! as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack +! $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 + fi +! $as_echo "$as_me: error: $1" >&2 + as_fn_exit $as_status + } # as_fn_error + +--- 400,418 ---- + fi # as_fn_arith + + +! # as_fn_error STATUS ERROR [LINENO LOG_FD] +! # ---------------------------------------- + # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are + # provided, also output the error to LOG_FD, referencing LINENO. Then exit the +! # script with STATUS, using 1 if that was 0. + as_fn_error () + { +! as_status=$1; test $as_status -eq 0 && as_status=1 +! if test "$4"; then +! as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack +! $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + fi +! $as_echo "$as_me: error: $2" >&2 + as_fn_exit $as_status + } # as_fn_error + +*************** +*** 441,446 **** +--- 485,494 ---- + chmod +x "$as_me.lineno" || + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + ++ # If we had to re-execute with $CONFIG_SHELL, we're ensured to have ++ # already done that, so ensure we don't try to do so again and fall ++ # in an infinite loop. This has already happened in practice. ++ _as_can_reexec=no; export _as_can_reexec + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensitive to this). +*************** +*** 475,490 **** + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. +! # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || +! as_ln_s='cp -p' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else +! as_ln_s='cp -p' + fi + else +! as_ln_s='cp -p' + fi + rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file + rmdir conf$$.dir 2>/dev/null +--- 523,538 ---- + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. +! # In both cases, we have to default to `cp -pR'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || +! as_ln_s='cp -pR' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else +! as_ln_s='cp -pR' + fi + else +! as_ln_s='cp -pR' + fi + rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file + rmdir conf$$.dir 2>/dev/null +*************** +*** 496,523 **** + as_mkdir_p=false + fi + +! if test -x / >/dev/null 2>&1; then +! as_test_x='test -x' +! else +! if ls -dL / >/dev/null 2>&1; then +! as_ls_L_option=L +! else +! as_ls_L_option= +! fi +! as_test_x=' +! eval sh -c '\'' +! if test -d "$1"; then +! test -d "$1/."; +! else +! case $1 in #( +! -*)set "./$1";; +! esac; +! case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( +! ???[sx]*):;;*)false;;esac;fi +! '\'' sh +! ' +! fi +! as_executable_p=$as_test_x + + # Sed expression to map a string onto a valid CPP name. + as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" +--- 544,551 ---- + as_mkdir_p=false + fi + +! as_test_x='test -x' +! as_executable_p=as_fn_executable_p + + # Sed expression to map a string onto a valid CPP name. + as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" +*************** +*** 530,536 **** + exec 6>&1 + + # Name of the host. +! # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, + # so uname gets run too. + ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` + +--- 558,564 ---- + exec 6>&1 + + # Name of the host. +! # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, + # so uname gets run too. + ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` + +*************** +*** 872,879 **** + fi + + case $ac_option in +! *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; +! *) ac_optarg=yes ;; + esac + + # Accept the important Cygnus configure options, so we can diagnose typos. +--- 900,908 ---- + fi + + case $ac_option in +! *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; +! *=) ac_optarg= ;; +! *) ac_optarg=yes ;; + esac + + # Accept the important Cygnus configure options, so we can diagnose typos. +*************** +*** 918,924 **** + ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && +! as_fn_error "invalid feature name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in +--- 947,953 ---- + ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && +! as_fn_error $? "invalid feature name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in +*************** +*** 944,950 **** + ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && +! as_fn_error "invalid feature name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in +--- 973,979 ---- + ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && +! as_fn_error $? "invalid feature name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in +*************** +*** 1148,1154 **** + ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && +! as_fn_error "invalid package name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in +--- 1177,1183 ---- + ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && +! as_fn_error $? "invalid package name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in +*************** +*** 1164,1170 **** + ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && +! as_fn_error "invalid package name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in +--- 1193,1199 ---- + ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && +! as_fn_error $? "invalid package name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in +*************** +*** 1194,1201 **** + | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) + x_libraries=$ac_optarg ;; + +! -*) as_fn_error "unrecognized option: \`$ac_option' +! Try \`$0 --help' for more information." + ;; + + *=*) +--- 1223,1230 ---- + | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) + x_libraries=$ac_optarg ;; + +! -*) as_fn_error $? "unrecognized option: \`$ac_option' +! Try \`$0 --help' for more information" + ;; + + *=*) +*************** +*** 1203,1209 **** + # Reject names that are not valid shell variable names. + case $ac_envvar in #( + '' | [0-9]* | *[!_$as_cr_alnum]* ) +! as_fn_error "invalid variable name: \`$ac_envvar'" ;; + esac + eval $ac_envvar=\$ac_optarg + export $ac_envvar ;; +--- 1232,1238 ---- + # Reject names that are not valid shell variable names. + case $ac_envvar in #( + '' | [0-9]* | *[!_$as_cr_alnum]* ) +! as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; + esac + eval $ac_envvar=\$ac_optarg + export $ac_envvar ;; +*************** +*** 1213,1219 **** + $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && + $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 +! : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} + ;; + + esac +--- 1242,1248 ---- + $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && + $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 +! : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" + ;; + + esac +*************** +*** 1221,1233 **** + + if test -n "$ac_prev"; then + ac_option=--`echo $ac_prev | sed 's/_/-/g'` +! as_fn_error "missing argument to $ac_option" + fi + + if test -n "$ac_unrecognized_opts"; then + case $enable_option_checking in + no) ;; +! fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;; + *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; + esac + fi +--- 1250,1262 ---- + + if test -n "$ac_prev"; then + ac_option=--`echo $ac_prev | sed 's/_/-/g'` +! as_fn_error $? "missing argument to $ac_option" + fi + + if test -n "$ac_unrecognized_opts"; then + case $enable_option_checking in + no) ;; +! fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; + *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; + esac + fi +*************** +*** 1250,1256 **** + [\\/$]* | ?:[\\/]* ) continue;; + NONE | '' ) case $ac_var in *prefix ) continue;; esac;; + esac +! as_fn_error "expected an absolute directory name for --$ac_var: $ac_val" + done + + # There might be people who depend on the old broken behavior: `$host' +--- 1279,1285 ---- + [\\/$]* | ?:[\\/]* ) continue;; + NONE | '' ) case $ac_var in *prefix ) continue;; esac;; + esac +! as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" + done + + # There might be people who depend on the old broken behavior: `$host' +*************** +*** 1264,1271 **** + if test "x$host_alias" != x; then + if test "x$build_alias" = x; then + cross_compiling=maybe +- $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. +- If a cross compiler is detected then cross compile mode will be used." >&2 + elif test "x$build_alias" != "x$host_alias"; then + cross_compiling=yes + fi +--- 1293,1298 ---- +*************** +*** 1280,1288 **** + ac_pwd=`pwd` && test -n "$ac_pwd" && + ac_ls_di=`ls -di .` && + ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || +! as_fn_error "working directory cannot be determined" + test "X$ac_ls_di" = "X$ac_pwd_ls_di" || +! as_fn_error "pwd does not report name of working directory" + + + # Find the source files, if location was not specified. +--- 1307,1315 ---- + ac_pwd=`pwd` && test -n "$ac_pwd" && + ac_ls_di=`ls -di .` && + ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || +! as_fn_error $? "working directory cannot be determined" + test "X$ac_ls_di" = "X$ac_pwd_ls_di" || +! as_fn_error $? "pwd does not report name of working directory" + + + # Find the source files, if location was not specified. +*************** +*** 1321,1331 **** + fi + if test ! -r "$srcdir/$ac_unique_file"; then + test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." +! as_fn_error "cannot find sources ($ac_unique_file) in $srcdir" + fi + ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" + ac_abs_confdir=`( +! cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg" + pwd)` + # When building in place, set srcdir=. + if test "$ac_abs_confdir" = "$ac_pwd"; then +--- 1348,1358 ---- + fi + if test ! -r "$srcdir/$ac_unique_file"; then + test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." +! as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" + fi + ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" + ac_abs_confdir=`( +! cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" + pwd)` + # When building in place, set srcdir=. + if test "$ac_abs_confdir" = "$ac_pwd"; then +*************** +*** 1365,1371 **** + --help=short display options specific to this package + --help=recursive display the short help of all the included packages + -V, --version display version information and exit +! -q, --quiet, --silent do not print \`checking...' messages + --cache-file=FILE cache test results in FILE [disabled] + -C, --config-cache alias for \`--cache-file=config.cache' + -n, --no-create do not create output files +--- 1392,1398 ---- + --help=short display options specific to this package + --help=recursive display the short help of all the included packages + -V, --version display version information and exit +! -q, --quiet, --silent do not print \`checking ...' messages + --cache-file=FILE cache test results in FILE [disabled] + -C, --config-cache alias for \`--cache-file=config.cache' + -n, --no-create do not create output files +*************** +*** 1563,1571 **** + if $ac_init_version; then + cat <<\_ACEOF + configure +! generated by GNU Autoconf 2.65 + +! Copyright (C) 2009 Free Software Foundation, Inc. + This configure script is free software; the Free Software Foundation + gives unlimited permission to copy, distribute and modify it. + _ACEOF +--- 1590,1598 ---- + if $ac_init_version; then + cat <<\_ACEOF + configure +! generated by GNU Autoconf 2.69 + +! Copyright (C) 2012 Free Software Foundation, Inc. + This configure script is free software; the Free Software Foundation + gives unlimited permission to copy, distribute and modify it. + _ACEOF +*************** +*** 1609,1615 **** + + ac_retval=1 + fi +! eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + as_fn_set_status $ac_retval + + } # ac_fn_c_try_compile +--- 1636,1642 ---- + + ac_retval=1 + fi +! eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + + } # ac_fn_c_try_compile +*************** +*** 1635,1641 **** + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 +! test $ac_status = 0; } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then : +--- 1662,1668 ---- + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 +! test $ac_status = 0; } > conftest.i && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then : +*************** +*** 1646,1652 **** + + ac_retval=1 + fi +! eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + as_fn_set_status $ac_retval + + } # ac_fn_c_try_cpp +--- 1673,1679 ---- + + ac_retval=1 + fi +! eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + + } # ac_fn_c_try_cpp +*************** +*** 1678,1684 **** + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || +! $as_test_x conftest$ac_exeext + }; then : + ac_retval=0 + else +--- 1705,1711 ---- + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || +! test -x conftest$ac_exeext + }; then : + ac_retval=0 + else +*************** +*** 1692,1698 **** + # interfere with the next link command; also delete a directory that is + # left behind by Apple's compiler. We do this before executing the actions. + rm -rf conftest.dSYM conftest_ipa8_conftest.oo +! eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + as_fn_set_status $ac_retval + + } # ac_fn_c_try_link +--- 1719,1725 ---- + # interfere with the next link command; also delete a directory that is + # left behind by Apple's compiler. We do this before executing the actions. + rm -rf conftest.dSYM conftest_ipa8_conftest.oo +! eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + + } # ac_fn_c_try_link +*************** +*** 1734,1740 **** + ac_retval=$ac_status + fi + rm -rf conftest.dSYM conftest_ipa8_conftest.oo +! eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + as_fn_set_status $ac_retval + + } # ac_fn_c_try_run +--- 1761,1767 ---- + ac_retval=$ac_status + fi + rm -rf conftest.dSYM conftest_ipa8_conftest.oo +! eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + + } # ac_fn_c_try_run +*************** +*** 1747,1756 **** + ac_fn_c_check_header_mongrel () + { + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack +! if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 + $as_echo_n "checking for $2... " >&6; } +! if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : + $as_echo_n "(cached) " >&6 + fi + eval ac_res=\$$3 +--- 1774,1783 ---- + ac_fn_c_check_header_mongrel () + { + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack +! if eval \${$3+:} false; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 + $as_echo_n "checking for $2... " >&6; } +! if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 + fi + eval ac_res=\$$3 +*************** +*** 1786,1792 **** + else + ac_header_preproc=no + fi +! rm -f conftest.err conftest.$ac_ext + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 + $as_echo "$ac_header_preproc" >&6; } + +--- 1813,1819 ---- + else + ac_header_preproc=no + fi +! rm -f conftest.err conftest.i conftest.$ac_ext + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 + $as_echo "$ac_header_preproc" >&6; } + +*************** +*** 1813,1819 **** + esac + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 + $as_echo_n "checking for $2... " >&6; } +! if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : + $as_echo_n "(cached) " >&6 + else + eval "$3=\$ac_header_compiler" +--- 1840,1846 ---- + esac + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 + $as_echo_n "checking for $2... " >&6; } +! if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 + else + eval "$3=\$ac_header_compiler" +*************** +*** 1822,1828 **** + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 + $as_echo "$ac_res" >&6; } + fi +! eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + + } # ac_fn_c_check_header_mongrel + +--- 1849,1855 ---- + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 + $as_echo "$ac_res" >&6; } + fi +! eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + + } # ac_fn_c_check_header_mongrel + +*************** +*** 1835,1841 **** + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 + $as_echo_n "checking for $2... " >&6; } +! if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : + $as_echo_n "(cached) " >&6 + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +--- 1862,1868 ---- + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 + $as_echo_n "checking for $2... " >&6; } +! if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +*************** +*** 1853,1859 **** + eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 + $as_echo "$ac_res" >&6; } +! eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + + } # ac_fn_c_check_header_compile + +--- 1880,1886 ---- + eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 + $as_echo "$ac_res" >&6; } +! eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + + } # ac_fn_c_check_header_compile + +*************** +*** 1865,1871 **** + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 + $as_echo_n "checking for $2... " >&6; } +! if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : + $as_echo_n "(cached) " >&6 + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +--- 1892,1898 ---- + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 + $as_echo_n "checking for $2... " >&6; } +! if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +*************** +*** 1920,1926 **** + eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 + $as_echo "$ac_res" >&6; } +! eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + + } # ac_fn_c_check_func + +--- 1947,1953 ---- + eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 + $as_echo "$ac_res" >&6; } +! eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + + } # ac_fn_c_check_func + +*************** +*** 1933,1939 **** + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 + $as_echo_n "checking for $2... " >&6; } +! if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : + $as_echo_n "(cached) " >&6 + else + eval "$3=no" +--- 1960,1966 ---- + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 + $as_echo_n "checking for $2... " >&6; } +! if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 + else + eval "$3=no" +*************** +*** 1974,1980 **** + eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 + $as_echo "$ac_res" >&6; } +! eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + + } # ac_fn_c_check_type + +--- 2001,2007 ---- + eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 + $as_echo "$ac_res" >&6; } +! eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + + } # ac_fn_c_check_type + +*************** +*** 1987,1993 **** + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5 + $as_echo_n "checking for uint$2_t... " >&6; } +! if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : + $as_echo_n "(cached) " >&6 + else + eval "$3=no" +--- 2014,2020 ---- + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5 + $as_echo_n "checking for uint$2_t... " >&6; } +! if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 + else + eval "$3=no" +*************** +*** 2002,2008 **** + main () + { + static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)]; +! test_array [0] = 0 + + ; + return 0; +--- 2029,2036 ---- + main () + { + static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)]; +! test_array [0] = 0; +! return test_array [0]; + + ; + return 0; +*************** +*** 2017,2024 **** + esac + fi + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +! eval as_val=\$$3 +! if test "x$as_val" = x""no; then : + + else + break +--- 2045,2051 ---- + esac + fi + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +! if eval test \"x\$"$3"\" = x"no"; then : + + else + break +*************** +*** 2028,2034 **** + eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 + $as_echo "$ac_res" >&6; } +! eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + + } # ac_fn_c_find_uintX_t + +--- 2055,2061 ---- + eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 + $as_echo "$ac_res" >&6; } +! eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + + } # ac_fn_c_find_uintX_t + +*************** +*** 2049,2055 **** + main () + { + static int test_array [1 - 2 * !(($2) >= 0)]; +! test_array [0] = 0 + + ; + return 0; +--- 2076,2083 ---- + main () + { + static int test_array [1 - 2 * !(($2) >= 0)]; +! test_array [0] = 0; +! return test_array [0]; + + ; + return 0; +*************** +*** 2065,2071 **** + main () + { + static int test_array [1 - 2 * !(($2) <= $ac_mid)]; +! test_array [0] = 0 + + ; + return 0; +--- 2093,2100 ---- + main () + { + static int test_array [1 - 2 * !(($2) <= $ac_mid)]; +! test_array [0] = 0; +! return test_array [0]; + + ; + return 0; +*************** +*** 2091,2097 **** + main () + { + static int test_array [1 - 2 * !(($2) < 0)]; +! test_array [0] = 0 + + ; + return 0; +--- 2120,2127 ---- + main () + { + static int test_array [1 - 2 * !(($2) < 0)]; +! test_array [0] = 0; +! return test_array [0]; + + ; + return 0; +*************** +*** 2107,2113 **** + main () + { + static int test_array [1 - 2 * !(($2) >= $ac_mid)]; +! test_array [0] = 0 + + ; + return 0; +--- 2137,2144 ---- + main () + { + static int test_array [1 - 2 * !(($2) >= $ac_mid)]; +! test_array [0] = 0; +! return test_array [0]; + + ; + return 0; +*************** +*** 2141,2147 **** + main () + { + static int test_array [1 - 2 * !(($2) <= $ac_mid)]; +! test_array [0] = 0 + + ; + return 0; +--- 2172,2179 ---- + main () + { + static int test_array [1 - 2 * !(($2) <= $ac_mid)]; +! test_array [0] = 0; +! return test_array [0]; + + ; + return 0; +*************** +*** 2205,2211 **** + rm -f conftest.val + + fi +! eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + as_fn_set_status $ac_retval + + } # ac_fn_c_compute_int +--- 2237,2243 ---- + rm -f conftest.val + + fi +! eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + + } # ac_fn_c_compute_int +*************** +*** 2214,2220 **** + running configure, to aid debugging if configure makes a mistake. + + It was created by $as_me, which was +! generated by GNU Autoconf 2.65. Invocation command line was + + $ $0 $@ + +--- 2246,2252 ---- + running configure, to aid debugging if configure makes a mistake. + + It was created by $as_me, which was +! generated by GNU Autoconf 2.69. Invocation command line was + + $ $0 $@ + +*************** +*** 2324,2334 **** + { + echo + +! cat <<\_ASBOX +! ## ---------------- ## + ## Cache variables. ## +! ## ---------------- ## +! _ASBOX + echo + # The following way of writing the cache mishandles newlines in values, + ( +--- 2356,2364 ---- + { + echo + +! $as_echo "## ---------------- ## + ## Cache variables. ## +! ## ---------------- ##" + echo + # The following way of writing the cache mishandles newlines in values, + ( +*************** +*** 2362,2372 **** + ) + echo + +! cat <<\_ASBOX +! ## ----------------- ## + ## Output variables. ## +! ## ----------------- ## +! _ASBOX + echo + for ac_var in $ac_subst_vars + do +--- 2392,2400 ---- + ) + echo + +! $as_echo "## ----------------- ## + ## Output variables. ## +! ## ----------------- ##" + echo + for ac_var in $ac_subst_vars + do +*************** +*** 2379,2389 **** + echo + + if test -n "$ac_subst_files"; then +! cat <<\_ASBOX +! ## ------------------- ## + ## File substitutions. ## +! ## ------------------- ## +! _ASBOX + echo + for ac_var in $ac_subst_files + do +--- 2407,2415 ---- + echo + + if test -n "$ac_subst_files"; then +! $as_echo "## ------------------- ## + ## File substitutions. ## +! ## ------------------- ##" + echo + for ac_var in $ac_subst_files + do +*************** +*** 2397,2407 **** + fi + + if test -s confdefs.h; then +! cat <<\_ASBOX +! ## ----------- ## + ## confdefs.h. ## +! ## ----------- ## +! _ASBOX + echo + cat confdefs.h + echo +--- 2423,2431 ---- + fi + + if test -s confdefs.h; then +! $as_echo "## ----------- ## + ## confdefs.h. ## +! ## ----------- ##" + echo + cat confdefs.h + echo +*************** +*** 2456,2462 **** + ac_site_file1=NONE + ac_site_file2=NONE + if test -n "$CONFIG_SITE"; then +! ac_site_file1=$CONFIG_SITE + elif test "x$prefix" != xNONE; then + ac_site_file1=$prefix/share/config.site + ac_site_file2=$prefix/etc/config.site +--- 2480,2491 ---- + ac_site_file1=NONE + ac_site_file2=NONE + if test -n "$CONFIG_SITE"; then +! # We do not want a PATH search for config.site. +! case $CONFIG_SITE in #(( +! -*) ac_site_file1=./$CONFIG_SITE;; +! */*) ac_site_file1=$CONFIG_SITE;; +! *) ac_site_file1=./$CONFIG_SITE;; +! esac + elif test "x$prefix" != xNONE; then + ac_site_file1=$prefix/share/config.site + ac_site_file2=$prefix/etc/config.site +*************** +*** 2471,2477 **** + { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 + $as_echo "$as_me: loading site script $ac_site_file" >&6;} + sed 's/^/| /' "$ac_site_file" >&5 +! . "$ac_site_file" + fi + done + +--- 2500,2510 ---- + { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 + $as_echo "$as_me: loading site script $ac_site_file" >&6;} + sed 's/^/| /' "$ac_site_file" >&5 +! . "$ac_site_file" \ +! || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +! $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +! as_fn_error $? "failed to load site script $ac_site_file +! See \`config.log' for more details" "$LINENO" 5; } + fi + done + +*************** +*** 2547,2553 **** + $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 + $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} +! as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 + fi + ## -------------------- ## + ## Main body of script. ## +--- 2580,2586 ---- + $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 + $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} +! as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 + fi + ## -------------------- ## + ## Main body of script. ## +*************** +*** 2569,2575 **** + $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } + set x ${MAKE-make} + ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` +! if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then : + $as_echo_n "(cached) " >&6 + else + cat >conftest.make <<\_ACEOF +--- 2602,2608 ---- + $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } + set x ${MAKE-make} + ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` +! if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : + $as_echo_n "(cached) " >&6 + else + cat >conftest.make <<\_ACEOF +*************** +*** 2577,2583 **** + all: + @echo '@@@%%%=$(MAKE)=@@@%%%' + _ACEOF +! # GNU make sometimes prints "make[1]: Entering...", which would confuse us. + case `${MAKE-make} -f conftest.make 2>/dev/null` in + *@@@%%%=?*=@@@%%%*) + eval ac_cv_prog_make_${ac_make}_set=yes;; +--- 2610,2616 ---- + all: + @echo '@@@%%%=$(MAKE)=@@@%%%' + _ACEOF +! # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. + case `${MAKE-make} -f conftest.make 2>/dev/null` in + *@@@%%%=?*=@@@%%%*) + eval ac_cv_prog_make_${ac_make}_set=yes;; +*************** +*** 2607,2613 **** + set dummy ${ac_tool_prefix}gcc; ac_word=$2 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 + $as_echo_n "checking for $ac_word... " >&6; } +! if test "${ac_cv_prog_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 + else + if test -n "$CC"; then +--- 2640,2646 ---- + set dummy ${ac_tool_prefix}gcc; ac_word=$2 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 + $as_echo_n "checking for $ac_word... " >&6; } +! if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 + else + if test -n "$CC"; then +*************** +*** 2619,2625 **** + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do +! if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="${ac_tool_prefix}gcc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 +--- 2652,2658 ---- + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do +! if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}gcc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 +*************** +*** 2647,2653 **** + set dummy gcc; ac_word=$2 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 + $as_echo_n "checking for $ac_word... " >&6; } +! if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 + else + if test -n "$ac_ct_CC"; then +--- 2680,2686 ---- + set dummy gcc; ac_word=$2 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 + $as_echo_n "checking for $ac_word... " >&6; } +! if ${ac_cv_prog_ac_ct_CC+:} false; then : + $as_echo_n "(cached) " >&6 + else + if test -n "$ac_ct_CC"; then +*************** +*** 2659,2665 **** + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do +! if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CC="gcc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 +--- 2692,2698 ---- + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do +! if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="gcc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 +*************** +*** 2700,2706 **** + set dummy ${ac_tool_prefix}cc; ac_word=$2 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 + $as_echo_n "checking for $ac_word... " >&6; } +! if test "${ac_cv_prog_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 + else + if test -n "$CC"; then +--- 2733,2739 ---- + set dummy ${ac_tool_prefix}cc; ac_word=$2 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 + $as_echo_n "checking for $ac_word... " >&6; } +! if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 + else + if test -n "$CC"; then +*************** +*** 2712,2718 **** + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do +! if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="${ac_tool_prefix}cc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 +--- 2745,2751 ---- + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do +! if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}cc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 +*************** +*** 2740,2746 **** + set dummy cc; ac_word=$2 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 + $as_echo_n "checking for $ac_word... " >&6; } +! if test "${ac_cv_prog_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 + else + if test -n "$CC"; then +--- 2773,2779 ---- + set dummy cc; ac_word=$2 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 + $as_echo_n "checking for $ac_word... " >&6; } +! if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 + else + if test -n "$CC"; then +*************** +*** 2753,2759 **** + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do +! if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue +--- 2786,2792 ---- + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do +! if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue +*************** +*** 2799,2805 **** + set dummy $ac_tool_prefix$ac_prog; ac_word=$2 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 + $as_echo_n "checking for $ac_word... " >&6; } +! if test "${ac_cv_prog_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 + else + if test -n "$CC"; then +--- 2832,2838 ---- + set dummy $ac_tool_prefix$ac_prog; ac_word=$2 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 + $as_echo_n "checking for $ac_word... " >&6; } +! if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 + else + if test -n "$CC"; then +*************** +*** 2811,2817 **** + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do +! if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 +--- 2844,2850 ---- + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do +! if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 +*************** +*** 2843,2849 **** + set dummy $ac_prog; ac_word=$2 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 + $as_echo_n "checking for $ac_word... " >&6; } +! if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 + else + if test -n "$ac_ct_CC"; then +--- 2876,2882 ---- + set dummy $ac_prog; ac_word=$2 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 + $as_echo_n "checking for $ac_word... " >&6; } +! if ${ac_cv_prog_ac_ct_CC+:} false; then : + $as_echo_n "(cached) " >&6 + else + if test -n "$ac_ct_CC"; then +*************** +*** 2855,2861 **** + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do +! if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CC="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 +--- 2888,2894 ---- + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do +! if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 +*************** +*** 2897,2904 **** + + test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 + $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +! as_fn_error "no acceptable C compiler found in \$PATH +! See \`config.log' for more details." "$LINENO" 5; } + + # Provide some information about the compiler. + $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 +--- 2930,2937 ---- + + test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 + $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +! as_fn_error $? "no acceptable C compiler found in \$PATH +! See \`config.log' for more details" "$LINENO" 5; } + + # Provide some information about the compiler. + $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 +*************** +*** 3012,3020 **** + + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 + $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +! { as_fn_set_status 77 +! as_fn_error "C compiler cannot create executables +! See \`config.log' for more details." "$LINENO" 5; }; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + $as_echo "yes" >&6; } +--- 3045,3052 ---- + + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 + $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +! as_fn_error 77 "C compiler cannot create executables +! See \`config.log' for more details" "$LINENO" 5; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + $as_echo "yes" >&6; } +*************** +*** 3056,3063 **** + else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 + $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +! as_fn_error "cannot compute suffix of executables: cannot compile and link +! See \`config.log' for more details." "$LINENO" 5; } + fi + rm -f conftest conftest$ac_cv_exeext + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 +--- 3088,3095 ---- + else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 + $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +! as_fn_error $? "cannot compute suffix of executables: cannot compile and link +! See \`config.log' for more details" "$LINENO" 5; } + fi + rm -f conftest conftest$ac_cv_exeext + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 +*************** +*** 3114,3122 **** + else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 + $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +! as_fn_error "cannot run C compiled programs. + If you meant to cross compile, use \`--host'. +! See \`config.log' for more details." "$LINENO" 5; } + fi + fi + fi +--- 3146,3154 ---- + else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 + $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +! as_fn_error $? "cannot run C compiled programs. + If you meant to cross compile, use \`--host'. +! See \`config.log' for more details" "$LINENO" 5; } + fi + fi + fi +*************** +*** 3127,3133 **** + ac_clean_files=$ac_clean_files_save + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 + $as_echo_n "checking for suffix of object files... " >&6; } +! if test "${ac_cv_objext+set}" = set; then : + $as_echo_n "(cached) " >&6 + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +--- 3159,3165 ---- + ac_clean_files=$ac_clean_files_save + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 + $as_echo_n "checking for suffix of object files... " >&6; } +! if ${ac_cv_objext+:} false; then : + $as_echo_n "(cached) " >&6 + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +*************** +*** 3167,3174 **** + + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 + $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +! as_fn_error "cannot compute suffix of object files: cannot compile +! See \`config.log' for more details." "$LINENO" 5; } + fi + rm -f conftest.$ac_cv_objext conftest.$ac_ext + fi +--- 3199,3206 ---- + + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 + $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +! as_fn_error $? "cannot compute suffix of object files: cannot compile +! See \`config.log' for more details" "$LINENO" 5; } + fi + rm -f conftest.$ac_cv_objext conftest.$ac_ext + fi +*************** +*** 3178,3184 **** + ac_objext=$OBJEXT + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 + $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } +! if test "${ac_cv_c_compiler_gnu+set}" = set; then : + $as_echo_n "(cached) " >&6 + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +--- 3210,3216 ---- + ac_objext=$OBJEXT + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 + $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } +! if ${ac_cv_c_compiler_gnu+:} false; then : + $as_echo_n "(cached) " >&6 + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +*************** +*** 3215,3221 **** + ac_save_CFLAGS=$CFLAGS + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 + $as_echo_n "checking whether $CC accepts -g... " >&6; } +! if test "${ac_cv_prog_cc_g+set}" = set; then : + $as_echo_n "(cached) " >&6 + else + ac_save_c_werror_flag=$ac_c_werror_flag +--- 3247,3253 ---- + ac_save_CFLAGS=$CFLAGS + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 + $as_echo_n "checking whether $CC accepts -g... " >&6; } +! if ${ac_cv_prog_cc_g+:} false; then : + $as_echo_n "(cached) " >&6 + else + ac_save_c_werror_flag=$ac_c_werror_flag +*************** +*** 3293,3299 **** + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 + $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } +! if test "${ac_cv_prog_cc_c89+set}" = set; then : + $as_echo_n "(cached) " >&6 + else + ac_cv_prog_cc_c89=no +--- 3325,3331 ---- + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 + $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } +! if ${ac_cv_prog_cc_c89+:} false; then : + $as_echo_n "(cached) " >&6 + else + ac_cv_prog_cc_c89=no +*************** +*** 3302,3309 **** + /* end confdefs.h. */ + #include <stdarg.h> + #include <stdio.h> +! #include <sys/types.h> +! #include <sys/stat.h> + /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ + struct buf { int x; }; + FILE * (*rcsopen) (struct buf *, struct stat *, int); +--- 3334,3340 ---- + /* end confdefs.h. */ + #include <stdarg.h> + #include <stdio.h> +! struct stat; + /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ + struct buf { int x; }; + FILE * (*rcsopen) (struct buf *, struct stat *, int); +*************** +*** 3399,3405 **** + CPP= + fi + if test -z "$CPP"; then +! if test "${ac_cv_prog_CPP+set}" = set; then : + $as_echo_n "(cached) " >&6 + else + # Double quotes because CPP needs to be expanded +--- 3430,3436 ---- + CPP= + fi + if test -z "$CPP"; then +! if ${ac_cv_prog_CPP+:} false; then : + $as_echo_n "(cached) " >&6 + else + # Double quotes because CPP needs to be expanded +*************** +*** 3429,3435 **** + # Broken: fails on valid input. + continue + fi +! rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. +--- 3460,3466 ---- + # Broken: fails on valid input. + continue + fi +! rm -f conftest.err conftest.i conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. +*************** +*** 3445,3455 **** + ac_preproc_ok=: + break + fi +! rm -f conftest.err conftest.$ac_ext + + done + # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +! rm -f conftest.err conftest.$ac_ext + if $ac_preproc_ok; then : + break + fi +--- 3476,3486 ---- + ac_preproc_ok=: + break + fi +! rm -f conftest.err conftest.i conftest.$ac_ext + + done + # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +! rm -f conftest.i conftest.err conftest.$ac_ext + if $ac_preproc_ok; then : + break + fi +*************** +*** 3488,3494 **** + # Broken: fails on valid input. + continue + fi +! rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. +--- 3519,3525 ---- + # Broken: fails on valid input. + continue + fi +! rm -f conftest.err conftest.i conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. +*************** +*** 3504,3521 **** + ac_preproc_ok=: + break + fi +! rm -f conftest.err conftest.$ac_ext + + done + # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +! rm -f conftest.err conftest.$ac_ext + if $ac_preproc_ok; then : + + else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 + $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +! as_fn_error "C preprocessor \"$CPP\" fails sanity check +! See \`config.log' for more details." "$LINENO" 5; } + fi + + ac_ext=c +--- 3535,3552 ---- + ac_preproc_ok=: + break + fi +! rm -f conftest.err conftest.i conftest.$ac_ext + + done + # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +! rm -f conftest.i conftest.err conftest.$ac_ext + if $ac_preproc_ok; then : + + else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 + $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +! as_fn_error $? "C preprocessor \"$CPP\" fails sanity check +! See \`config.log' for more details" "$LINENO" 5; } + fi + + ac_ext=c +*************** +*** 3527,3533 **** + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 + $as_echo_n "checking for grep that handles long lines and -e... " >&6; } +! if test "${ac_cv_path_GREP+set}" = set; then : + $as_echo_n "(cached) " >&6 + else + if test -z "$GREP"; then +--- 3558,3564 ---- + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 + $as_echo_n "checking for grep that handles long lines and -e... " >&6; } +! if ${ac_cv_path_GREP+:} false; then : + $as_echo_n "(cached) " >&6 + else + if test -z "$GREP"; then +*************** +*** 3541,3547 **** + for ac_prog in grep ggrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" +! { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue + # Check for GNU ac_path_GREP and select it if it is found. + # Check for GNU $ac_path_GREP + case `"$ac_path_GREP" --version 2>&1` in +--- 3572,3578 ---- + for ac_prog in grep ggrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" +! as_fn_executable_p "$ac_path_GREP" || continue + # Check for GNU ac_path_GREP and select it if it is found. + # Check for GNU $ac_path_GREP + case `"$ac_path_GREP" --version 2>&1` in +*************** +*** 3576,3582 **** + done + IFS=$as_save_IFS + if test -z "$ac_cv_path_GREP"; then +! as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi + else + ac_cv_path_GREP=$GREP +--- 3607,3613 ---- + done + IFS=$as_save_IFS + if test -z "$ac_cv_path_GREP"; then +! as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi + else + ac_cv_path_GREP=$GREP +*************** +*** 3590,3596 **** + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 + $as_echo_n "checking for egrep... " >&6; } +! if test "${ac_cv_path_EGREP+set}" = set; then : + $as_echo_n "(cached) " >&6 + else + if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 +--- 3621,3627 ---- + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 + $as_echo_n "checking for egrep... " >&6; } +! if ${ac_cv_path_EGREP+:} false; then : + $as_echo_n "(cached) " >&6 + else + if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 +*************** +*** 3607,3613 **** + for ac_prog in egrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" +! { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue + # Check for GNU ac_path_EGREP and select it if it is found. + # Check for GNU $ac_path_EGREP + case `"$ac_path_EGREP" --version 2>&1` in +--- 3638,3644 ---- + for ac_prog in egrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" +! as_fn_executable_p "$ac_path_EGREP" || continue + # Check for GNU ac_path_EGREP and select it if it is found. + # Check for GNU $ac_path_EGREP + case `"$ac_path_EGREP" --version 2>&1` in +*************** +*** 3642,3648 **** + done + IFS=$as_save_IFS + if test -z "$ac_cv_path_EGREP"; then +! as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi + else + ac_cv_path_EGREP=$EGREP +--- 3673,3679 ---- + done + IFS=$as_save_IFS + if test -z "$ac_cv_path_EGREP"; then +! as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi + else + ac_cv_path_EGREP=$EGREP +*************** +*** 3666,3672 **** + rm -f conftest* + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing strerror" >&5 + $as_echo_n "checking for library containing strerror... " >&6; } +! if test "${ac_cv_search_strerror+set}" = set; then : + $as_echo_n "(cached) " >&6 + else + ac_func_search_save_LIBS=$LIBS +--- 3697,3703 ---- + rm -f conftest* + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing strerror" >&5 + $as_echo_n "checking for library containing strerror... " >&6; } +! if ${ac_cv_search_strerror+:} false; then : + $as_echo_n "(cached) " >&6 + else + ac_func_search_save_LIBS=$LIBS +*************** +*** 3700,3710 **** + fi + rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext +! if test "${ac_cv_search_strerror+set}" = set; then : + break + fi + done +! if test "${ac_cv_search_strerror+set}" = set; then : + + else + ac_cv_search_strerror=no +--- 3731,3741 ---- + fi + rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext +! if ${ac_cv_search_strerror+:} false; then : + break + fi + done +! if ${ac_cv_search_strerror+:} false; then : + + else + ac_cv_search_strerror=no +*************** +*** 3725,3731 **** + set dummy $ac_prog; ac_word=$2 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 + $as_echo_n "checking for $ac_word... " >&6; } +! if test "${ac_cv_prog_AWK+set}" = set; then : + $as_echo_n "(cached) " >&6 + else + if test -n "$AWK"; then +--- 3756,3762 ---- + set dummy $ac_prog; ac_word=$2 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 + $as_echo_n "checking for $ac_word... " >&6; } +! if ${ac_cv_prog_AWK+:} false; then : + $as_echo_n "(cached) " >&6 + else + if test -n "$AWK"; then +*************** +*** 3737,3743 **** + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do +! if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_AWK="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 +--- 3768,3774 ---- + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do +! if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_AWK="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 +*************** +*** 3765,3771 **** + set dummy strip; ac_word=$2 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 + $as_echo_n "checking for $ac_word... " >&6; } +! if test "${ac_cv_prog_STRIP+set}" = set; then : + $as_echo_n "(cached) " >&6 + else + if test -n "$STRIP"; then +--- 3796,3802 ---- + set dummy strip; ac_word=$2 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 + $as_echo_n "checking for $ac_word... " >&6; } +! if ${ac_cv_prog_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 + else + if test -n "$STRIP"; then +*************** +*** 3777,3783 **** + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do +! if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_STRIP="strip" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 +--- 3808,3814 ---- + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do +! if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_STRIP="strip" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 +*************** +*** 3804,3810 **** + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 + $as_echo_n "checking for ANSI C header files... " >&6; } +! if test "${ac_cv_header_stdc+set}" = set; then : + $as_echo_n "(cached) " >&6 + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +--- 3835,3841 ---- + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 + $as_echo_n "checking for ANSI C header files... " >&6; } +! if ${ac_cv_header_stdc+:} false; then : + $as_echo_n "(cached) " >&6 + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +*************** +*** 3916,3922 **** + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5 + $as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; } +! if test "${ac_cv_header_sys_wait_h+set}" = set; then : + $as_echo_n "(cached) " >&6 + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +--- 3947,3953 ---- + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5 + $as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; } +! if ${ac_cv_header_sys_wait_h+:} false; then : + $as_echo_n "(cached) " >&6 + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +*************** +*** 4107,4113 **** + set dummy xcode-select; ac_word=$2 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 + $as_echo_n "checking for $ac_word... " >&6; } +! if test "${ac_cv_path_XCODE_SELECT+set}" = set; then : + $as_echo_n "(cached) " >&6 + else + case $XCODE_SELECT in +--- 4138,4144 ---- + set dummy xcode-select; ac_word=$2 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 + $as_echo_n "checking for $ac_word... " >&6; } +! if ${ac_cv_path_XCODE_SELECT+:} false; then : + $as_echo_n "(cached) " >&6 + else + case $XCODE_SELECT in +*************** +*** 4121,4127 **** + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do +! if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_XCODE_SELECT="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 +--- 4152,4158 ---- + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do +! if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_XCODE_SELECT="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 +*************** +*** 4230,4237 **** + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` + ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default + " +! eval as_val=\$$as_ac_Header +! if test "x$as_val" = x""yes; then : + cat >>confdefs.h <<_ACEOF + #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 + _ACEOF +--- 4261,4267 ---- + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` + ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default + " +! if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF + #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 + _ACEOF +*************** +*** 4242,4248 **** + + + 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,4278 ---- + + + 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" = xyes; then : + CARBON=yes + fi + +*************** +*** 4266,4272 **** + 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 +--- 4296,4302 ---- + 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" = xyes; then : + cat >>confdefs.h <<_ACEOF + #define HAVE_AVAILABILITYMACROS_H 1 + _ACEOF +*************** +*** 4296,4302 **** + have_local_include=yes + have_local_lib=yes + ;; +! *) as_fn_error "must pass path argument to --with-local-dir" "$LINENO" 5 ;; + esac + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $local_dir" >&5 + $as_echo "$local_dir" >&6; } +--- 4326,4332 ---- + have_local_include=yes + have_local_lib=yes + ;; +! *) as_fn_error $? "must pass path argument to --with-local-dir" "$LINENO" 5 ;; + esac + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $local_dir" >&5 + $as_echo "$local_dir" >&6; } +*************** +*** 4505,4511 **** + $as_echo "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_selinux_enabled in -lselinux" >&5 + $as_echo_n "checking for is_selinux_enabled in -lselinux... " >&6; } +! if test "${ac_cv_lib_selinux_is_selinux_enabled+set}" = set; then : + $as_echo_n "(cached) " >&6 + else + ac_check_lib_save_LIBS=$LIBS +--- 4535,4541 ---- + $as_echo "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_selinux_enabled in -lselinux" >&5 + $as_echo_n "checking for is_selinux_enabled in -lselinux... " >&6; } +! if ${ac_cv_lib_selinux_is_selinux_enabled+:} false; then : + $as_echo_n "(cached) " >&6 + else + ac_check_lib_save_LIBS=$LIBS +*************** +*** 4539,4545 **** + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_is_selinux_enabled" >&5 + $as_echo "$ac_cv_lib_selinux_is_selinux_enabled" >&6; } +! if test "x$ac_cv_lib_selinux_is_selinux_enabled" = x""yes; then : + LIBS="$LIBS -lselinux" + $as_echo "#define HAVE_SELINUX 1" >>confdefs.h + +--- 4569,4575 ---- + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_is_selinux_enabled" >&5 + $as_echo "$ac_cv_lib_selinux_is_selinux_enabled" >&6; } +! if test "x$ac_cv_lib_selinux_is_selinux_enabled" = xyes; then : + LIBS="$LIBS -lselinux" + $as_echo "#define HAVE_SELINUX 1" >>confdefs.h + +*************** +*** 4701,4707 **** + set dummy luajit; ac_word=$2 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 + $as_echo_n "checking for $ac_word... " >&6; } +! if test "${ac_cv_path_vi_cv_path_luajit+set}" = set; then : + $as_echo_n "(cached) " >&6 + else + case $vi_cv_path_luajit in +--- 4731,4737 ---- + set dummy luajit; ac_word=$2 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 + $as_echo_n "checking for $ac_word... " >&6; } +! if ${ac_cv_path_vi_cv_path_luajit+:} false; then : + $as_echo_n "(cached) " >&6 + else + case $vi_cv_path_luajit in +*************** +*** 4715,4721 **** + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do +! if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_vi_cv_path_luajit="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 +--- 4745,4751 ---- + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do +! if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_vi_cv_path_luajit="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 +*************** +*** 4740,4746 **** + if test "X$vi_cv_path_luajit" != "X"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking LuaJIT version" >&5 + $as_echo_n "checking LuaJIT version... " >&6; } +! 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/'` +--- 4770,4776 ---- + if test "X$vi_cv_path_luajit" != "X"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking LuaJIT version" >&5 + $as_echo_n "checking LuaJIT version... " >&6; } +! if ${vi_cv_version_luajit+:} false; 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/'` +*************** +*** 4749,4755 **** + $as_echo "$vi_cv_version_luajit" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking Lua version of LuaJIT" >&5 + $as_echo_n "checking Lua version of LuaJIT... " >&6; } +! if test "${vi_cv_version_lua_luajit+set}" = set; then : + $as_echo_n "(cached) " >&6 + else + vi_cv_version_lua_luajit=`${vi_cv_path_luajit} -e "print(_VERSION)" | sed 's/.* //'` +--- 4779,4785 ---- + $as_echo "$vi_cv_version_luajit" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking Lua version of LuaJIT" >&5 + $as_echo_n "checking Lua version of LuaJIT... " >&6; } +! if ${vi_cv_version_lua_luajit+:} false; then : + $as_echo_n "(cached) " >&6 + else + vi_cv_version_lua_luajit=`${vi_cv_path_luajit} -e "print(_VERSION)" | sed 's/.* //'` +*************** +*** 4764,4770 **** + set dummy lua; ac_word=$2 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 + $as_echo_n "checking for $ac_word... " >&6; } +! if test "${ac_cv_path_vi_cv_path_plain_lua+set}" = set; then : + $as_echo_n "(cached) " >&6 + else + case $vi_cv_path_plain_lua in +--- 4794,4800 ---- + set dummy lua; ac_word=$2 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 + $as_echo_n "checking for $ac_word... " >&6; } +! if ${ac_cv_path_vi_cv_path_plain_lua+:} false; then : + $as_echo_n "(cached) " >&6 + else + case $vi_cv_path_plain_lua in +*************** +*** 4778,4784 **** + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do +! if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_vi_cv_path_plain_lua="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 +--- 4808,4814 ---- + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do +! if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_vi_cv_path_plain_lua="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 +*************** +*** 4803,4809 **** + if test "X$vi_cv_path_plain_lua" != "X"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking Lua version" >&5 + $as_echo_n "checking Lua version... " >&6; } +! if test "${vi_cv_version_plain_lua+set}" = set; then : + $as_echo_n "(cached) " >&6 + else + vi_cv_version_plain_lua=`${vi_cv_path_plain_lua} -e "print(_VERSION)" | sed 's/.* //'` +--- 4833,4839 ---- + if test "X$vi_cv_path_plain_lua" != "X"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking Lua version" >&5 + $as_echo_n "checking Lua version... " >&6; } +! if ${vi_cv_version_plain_lua+:} false; then : + $as_echo_n "(cached) " >&6 + else + vi_cv_version_plain_lua=`${vi_cv_path_plain_lua} -e "print(_VERSION)" | sed 's/.* //'` +*************** +*** 4963,4969 **** + fi + fi + if test "$fail_if_missing" = "yes" -a "$lua_ok" != "yes"; then +! as_fn_error "could not configure lua" "$LINENO" 5 + fi + + +--- 4993,4999 ---- + fi + fi + if test "$fail_if_missing" = "yes" -a "$lua_ok" != "yes"; then +! as_fn_error $? "could not configure lua" "$LINENO" 5 + fi + + +*************** +*** 5017,5023 **** + set dummy mzscheme; ac_word=$2 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 + $as_echo_n "checking for $ac_word... " >&6; } +! if test "${ac_cv_path_vi_cv_path_mzscheme+set}" = set; then : + $as_echo_n "(cached) " >&6 + else + case $vi_cv_path_mzscheme in +--- 5047,5053 ---- + set dummy mzscheme; ac_word=$2 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 + $as_echo_n "checking for $ac_word... " >&6; } +! if ${ac_cv_path_vi_cv_path_mzscheme+:} false; then : + $as_echo_n "(cached) " >&6 + else + case $vi_cv_path_mzscheme in +*************** +*** 5031,5037 **** + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do +! if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_vi_cv_path_mzscheme="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 +--- 5061,5067 ---- + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do +! if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_vi_cv_path_mzscheme="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 +*************** +*** 5064,5070 **** + if test "X$vi_cv_path_mzscheme" != "X"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking MzScheme install prefix" >&5 + $as_echo_n "checking MzScheme install prefix... " >&6; } +! if test "${vi_cv_path_mzscheme_pfx+set}" = set; then : + $as_echo_n "(cached) " >&6 + else + echo "(display (simplify-path \ +--- 5094,5100 ---- + if test "X$vi_cv_path_mzscheme" != "X"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking MzScheme install prefix" >&5 + $as_echo_n "checking MzScheme install prefix... " >&6; } +! if ${vi_cv_path_mzscheme_pfx+:} false; then : + $as_echo_n "(cached) " >&6 + else + echo "(display (simplify-path \ +*************** +*** 5226,5232 **** + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ffi_type_void in -lffi" >&5 + $as_echo_n "checking for ffi_type_void in -lffi... " >&6; } +! if test "${ac_cv_lib_ffi_ffi_type_void+set}" = set; then : + $as_echo_n "(cached) " >&6 + else + ac_check_lib_save_LIBS=$LIBS +--- 5256,5262 ---- + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ffi_type_void in -lffi" >&5 + $as_echo_n "checking for ffi_type_void in -lffi... " >&6; } +! if ${ac_cv_lib_ffi_ffi_type_void+:} false; then : + $as_echo_n "(cached) " >&6 + else + ac_check_lib_save_LIBS=$LIBS +*************** +*** 5260,5266 **** + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ffi_ffi_type_void" >&5 + $as_echo "$ac_cv_lib_ffi_ffi_type_void" >&6; } +! if test "x$ac_cv_lib_ffi_ffi_type_void" = x""yes; then : + MZSCHEME_LIBS="$MZSCHEME_LIBS -lffi" + fi + +--- 5290,5296 ---- + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ffi_ffi_type_void" >&5 + $as_echo "$ac_cv_lib_ffi_ffi_type_void" >&6; } +! if test "x$ac_cv_lib_ffi_ffi_type_void" = xyes; then : + MZSCHEME_LIBS="$MZSCHEME_LIBS -lffi" + fi + +*************** +*** 5336,5342 **** + set dummy perl; ac_word=$2 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 + $as_echo_n "checking for $ac_word... " >&6; } +! if test "${ac_cv_path_vi_cv_path_perl+set}" = set; then : + $as_echo_n "(cached) " >&6 + else + case $vi_cv_path_perl in +--- 5366,5372 ---- + set dummy perl; ac_word=$2 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 + $as_echo_n "checking for $ac_word... " >&6; } +! if ${ac_cv_path_vi_cv_path_perl+:} false; then : + $as_echo_n "(cached) " >&6 + else + case $vi_cv_path_perl in +*************** +*** 5350,5356 **** + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do +! if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_vi_cv_path_perl="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 +--- 5380,5386 ---- + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do +! if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_vi_cv_path_perl="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 +*************** +*** 5498,5504 **** + fi + + if test "$fail_if_missing" = "yes" -a "$perl_ok" != "yes"; then +! as_fn_error "could not configure perl" "$LINENO" 5 + fi + fi + +--- 5528,5534 ---- + fi + + if test "$fail_if_missing" = "yes" -a "$perl_ok" != "yes"; then +! as_fn_error $? "could not configure perl" "$LINENO" 5 + fi + fi + +*************** +*** 5526,5532 **** + set dummy $ac_prog; ac_word=$2 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 + $as_echo_n "checking for $ac_word... " >&6; } +! if test "${ac_cv_path_vi_cv_path_python+set}" = set; then : + $as_echo_n "(cached) " >&6 + else + case $vi_cv_path_python in +--- 5556,5562 ---- + set dummy $ac_prog; ac_word=$2 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 + $as_echo_n "checking for $ac_word... " >&6; } +! if ${ac_cv_path_vi_cv_path_python+:} false; then : + $as_echo_n "(cached) " >&6 + else + case $vi_cv_path_python in +*************** +*** 5540,5546 **** + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do +! if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_vi_cv_path_python="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 +--- 5570,5576 ---- + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do +! if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_vi_cv_path_python="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 +*************** +*** 5569,5575 **** + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python version" >&5 + $as_echo_n "checking Python version... " >&6; } +! if test "${vi_cv_var_python_version+set}" = set; then : + $as_echo_n "(cached) " >&6 + else + vi_cv_var_python_version=` +--- 5599,5605 ---- + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python version" >&5 + $as_echo_n "checking Python version... " >&6; } +! if ${vi_cv_var_python_version+:} false; then : + $as_echo_n "(cached) " >&6 + else + vi_cv_var_python_version=` +*************** +*** 5589,5595 **** + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python's install prefix" >&5 + $as_echo_n "checking Python's install prefix... " >&6; } +! if test "${vi_cv_path_python_pfx+set}" = set; then : + $as_echo_n "(cached) " >&6 + else + vi_cv_path_python_pfx=` +--- 5619,5625 ---- + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python's install prefix" >&5 + $as_echo_n "checking Python's install prefix... " >&6; } +! if ${vi_cv_path_python_pfx+:} false; then : + $as_echo_n "(cached) " >&6 + else + vi_cv_path_python_pfx=` +*************** +*** 5601,5607 **** + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python's execution prefix" >&5 + $as_echo_n "checking Python's execution prefix... " >&6; } +! if test "${vi_cv_path_python_epfx+set}" = set; then : + $as_echo_n "(cached) " >&6 + else + vi_cv_path_python_epfx=` +--- 5631,5637 ---- + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python's execution prefix" >&5 + $as_echo_n "checking Python's execution prefix... " >&6; } +! if ${vi_cv_path_python_epfx+:} false; then : + $as_echo_n "(cached) " >&6 + else + vi_cv_path_python_epfx=` +*************** +*** 5612,5618 **** + $as_echo "$vi_cv_path_python_epfx" >&6; } + + +! if test "${vi_cv_path_pythonpath+set}" = set; then : + $as_echo_n "(cached) " >&6 + else + vi_cv_path_pythonpath=` +--- 5642,5648 ---- + $as_echo "$vi_cv_path_python_epfx" >&6; } + + +! if ${vi_cv_path_pythonpath+:} false; then : + $as_echo_n "(cached) " >&6 + else + vi_cv_path_pythonpath=` +*************** +*** 5632,5638 **** + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python's configuration directory" >&5 + $as_echo_n "checking Python's configuration directory... " >&6; } +! if test "${vi_cv_path_python_conf+set}" = set; then : + $as_echo_n "(cached) " >&6 + else + +--- 5662,5668 ---- + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python's configuration directory" >&5 + $as_echo_n "checking Python's configuration directory... " >&6; } +! if ${vi_cv_path_python_conf+:} false; then : + $as_echo_n "(cached) " >&6 + else + +*************** +*** 5662,5668 **** + $as_echo "can't find it!" >&6; } + else + +! if test "${vi_cv_path_python_plibs+set}" = set; then : + $as_echo_n "(cached) " >&6 + else + +--- 5692,5698 ---- + $as_echo "can't find it!" >&6; } + else + +! if ${vi_cv_path_python_plibs+:} false; then : + $as_echo_n "(cached) " >&6 + else + +*************** +*** 5803,5809 **** + fi + + if test "$fail_if_missing" = "yes" -a "$python_ok" != "yes"; then +! as_fn_error "could not configure python" "$LINENO" 5 + fi + fi + +--- 5833,5839 ---- + fi + + if test "$fail_if_missing" = "yes" -a "$python_ok" != "yes"; then +! as_fn_error $? "could not configure python" "$LINENO" 5 + fi + fi + +*************** +*** 5833,5839 **** + set dummy $ac_prog; ac_word=$2 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 + $as_echo_n "checking for $ac_word... " >&6; } +! if test "${ac_cv_path_vi_cv_path_python3+set}" = set; then : + $as_echo_n "(cached) " >&6 + else + case $vi_cv_path_python3 in +--- 5863,5869 ---- + set dummy $ac_prog; ac_word=$2 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 + $as_echo_n "checking for $ac_word... " >&6; } +! if ${ac_cv_path_vi_cv_path_python3+:} false; then : + $as_echo_n "(cached) " >&6 + else + case $vi_cv_path_python3 in +*************** +*** 5847,5853 **** + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do +! if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_vi_cv_path_python3="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 +--- 5877,5883 ---- + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do +! if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_vi_cv_path_python3="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 +*************** +*** 5876,5882 **** + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python version" >&5 + $as_echo_n "checking Python version... " >&6; } +! if test "${vi_cv_var_python3_version+set}" = set; then : + $as_echo_n "(cached) " >&6 + else + vi_cv_var_python3_version=` +--- 5906,5912 ---- + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python version" >&5 + $as_echo_n "checking Python version... " >&6; } +! if ${vi_cv_var_python3_version+:} false; then : + $as_echo_n "(cached) " >&6 + else + vi_cv_var_python3_version=` +*************** +*** 5896,5902 **** + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python's abiflags" >&5 + $as_echo_n "checking Python's abiflags... " >&6; } +! if test "${vi_cv_var_python3_abiflags+set}" = set; then : + $as_echo_n "(cached) " >&6 + else + +--- 5926,5932 ---- + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python's abiflags" >&5 + $as_echo_n "checking Python's abiflags... " >&6; } +! if ${vi_cv_var_python3_abiflags+:} false; then : + $as_echo_n "(cached) " >&6 + else + +*************** +*** 5913,5919 **** + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python's install prefix" >&5 + $as_echo_n "checking Python's install prefix... " >&6; } +! if test "${vi_cv_path_python3_pfx+set}" = set; then : + $as_echo_n "(cached) " >&6 + else + vi_cv_path_python3_pfx=` +--- 5943,5949 ---- + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python's install prefix" >&5 + $as_echo_n "checking Python's install prefix... " >&6; } +! if ${vi_cv_path_python3_pfx+:} false; then : + $as_echo_n "(cached) " >&6 + else + vi_cv_path_python3_pfx=` +*************** +*** 5925,5931 **** + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python's execution prefix" >&5 + $as_echo_n "checking Python's execution prefix... " >&6; } +! if test "${vi_cv_path_python3_epfx+set}" = set; then : + $as_echo_n "(cached) " >&6 + else + vi_cv_path_python3_epfx=` +--- 5955,5961 ---- + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python's execution prefix" >&5 + $as_echo_n "checking Python's execution prefix... " >&6; } +! if ${vi_cv_path_python3_epfx+:} false; then : + $as_echo_n "(cached) " >&6 + else + vi_cv_path_python3_epfx=` +*************** +*** 5936,5942 **** + $as_echo "$vi_cv_path_python3_epfx" >&6; } + + +! if test "${vi_cv_path_python3path+set}" = set; then : + $as_echo_n "(cached) " >&6 + else + vi_cv_path_python3path=` +--- 5966,5972 ---- + $as_echo "$vi_cv_path_python3_epfx" >&6; } + + +! if ${vi_cv_path_python3path+:} false; then : + $as_echo_n "(cached) " >&6 + else + vi_cv_path_python3path=` +*************** +*** 5956,5962 **** + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python's configuration directory" >&5 + $as_echo_n "checking Python's configuration directory... " >&6; } +! if test "${vi_cv_path_python3_conf+set}" = set; then : + $as_echo_n "(cached) " >&6 + else + +--- 5986,5992 ---- + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python's configuration directory" >&5 + $as_echo_n "checking Python's configuration directory... " >&6; } +! if ${vi_cv_path_python3_conf+:} false; then : + $as_echo_n "(cached) " >&6 + else + +*************** +*** 5987,5993 **** + $as_echo "can't find it!" >&6; } + else + +! if test "${vi_cv_path_python3_plibs+set}" = set; then : + $as_echo_n "(cached) " >&6 + else + +--- 6017,6023 ---- + $as_echo "can't find it!" >&6; } + else + +! if ${vi_cv_path_python3_plibs+:} false; then : + $as_echo_n "(cached) " >&6 + else + +*************** +*** 6114,6120 **** + fi + fi + if test "$fail_if_missing" = "yes" -a "$python3_ok" != "yes"; then +! as_fn_error "could not configure python3" "$LINENO" 5 + fi + fi + +--- 6144,6150 ---- + fi + fi + if test "$fail_if_missing" = "yes" -a "$python3_ok" != "yes"; then +! as_fn_error $? "could not configure python3" "$LINENO" 5 + fi + fi + +*************** +*** 6138,6145 **** + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 + $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +! as_fn_error "cannot run test program while cross compiling +! See \`config.log' for more details." "$LINENO" 5; } + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +--- 6168,6175 ---- + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 + $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +! as_fn_error $? "cannot run test program while cross compiling +! See \`config.log' for more details" "$LINENO" 5; } + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +*************** +*** 6203,6210 **** + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 + $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +! as_fn_error "cannot run test program while cross compiling +! See \`config.log' for more details." "$LINENO" 5; } + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +--- 6233,6240 ---- + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 + $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +! as_fn_error $? "cannot run test program while cross compiling +! See \`config.log' for more details" "$LINENO" 5; } + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +*************** +*** 6378,6384 **** + set dummy $tclsh_name; ac_word=$2 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 + $as_echo_n "checking for $ac_word... " >&6; } +! if test "${ac_cv_path_vi_cv_path_tcl+set}" = set; then : + $as_echo_n "(cached) " >&6 + else + case $vi_cv_path_tcl in +--- 6408,6414 ---- + set dummy $tclsh_name; ac_word=$2 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 + $as_echo_n "checking for $ac_word... " >&6; } +! if ${ac_cv_path_vi_cv_path_tcl+:} false; then : + $as_echo_n "(cached) " >&6 + else + case $vi_cv_path_tcl in +*************** +*** 6392,6398 **** + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do +! if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_vi_cv_path_tcl="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 +--- 6422,6428 ---- + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do +! if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_vi_cv_path_tcl="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 +*************** +*** 6422,6428 **** + set dummy $tclsh_name; ac_word=$2 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 + $as_echo_n "checking for $ac_word... " >&6; } +! if test "${ac_cv_path_vi_cv_path_tcl+set}" = set; then : + $as_echo_n "(cached) " >&6 + else + case $vi_cv_path_tcl in +--- 6452,6458 ---- + set dummy $tclsh_name; ac_word=$2 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 + $as_echo_n "checking for $ac_word... " >&6; } +! if ${ac_cv_path_vi_cv_path_tcl+:} false; then : + $as_echo_n "(cached) " >&6 + else + case $vi_cv_path_tcl in +*************** +*** 6436,6442 **** + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do +! if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_vi_cv_path_tcl="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 +--- 6466,6472 ---- + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do +! if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_vi_cv_path_tcl="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 +*************** +*** 6465,6471 **** + set dummy $tclsh_name; ac_word=$2 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 + $as_echo_n "checking for $ac_word... " >&6; } +! if test "${ac_cv_path_vi_cv_path_tcl+set}" = set; then : + $as_echo_n "(cached) " >&6 + else + case $vi_cv_path_tcl in +--- 6495,6501 ---- + set dummy $tclsh_name; ac_word=$2 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 + $as_echo_n "checking for $ac_word... " >&6; } +! if ${ac_cv_path_vi_cv_path_tcl+:} false; then : + $as_echo_n "(cached) " >&6 + else + case $vi_cv_path_tcl in +*************** +*** 6479,6485 **** + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do +! if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_vi_cv_path_tcl="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 +--- 6509,6515 ---- + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do +! if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_vi_cv_path_tcl="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 +*************** +*** 6508,6514 **** + set dummy $tclsh_name; ac_word=$2 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 + $as_echo_n "checking for $ac_word... " >&6; } +! if test "${ac_cv_path_vi_cv_path_tcl+set}" = set; then : + $as_echo_n "(cached) " >&6 + else + case $vi_cv_path_tcl in +--- 6538,6544 ---- + set dummy $tclsh_name; ac_word=$2 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 + $as_echo_n "checking for $ac_word... " >&6; } +! if ${ac_cv_path_vi_cv_path_tcl+:} false; then : + $as_echo_n "(cached) " >&6 + else + case $vi_cv_path_tcl in +*************** +*** 6522,6528 **** + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do +! if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_vi_cv_path_tcl="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 +--- 6552,6558 ---- + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do +! if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_vi_cv_path_tcl="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 +*************** +*** 6551,6557 **** + set dummy $tclsh_name; ac_word=$2 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 + $as_echo_n "checking for $ac_word... " >&6; } +! if test "${ac_cv_path_vi_cv_path_tcl+set}" = set; then : + $as_echo_n "(cached) " >&6 + else + case $vi_cv_path_tcl in +--- 6581,6587 ---- + set dummy $tclsh_name; ac_word=$2 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 + $as_echo_n "checking for $ac_word... " >&6; } +! if ${ac_cv_path_vi_cv_path_tcl+:} false; then : + $as_echo_n "(cached) " >&6 + else + case $vi_cv_path_tcl in +*************** +*** 6565,6571 **** + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do +! if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_vi_cv_path_tcl="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 +--- 6595,6601 ---- + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do +! if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_vi_cv_path_tcl="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 +*************** +*** 6682,6688 **** + fi + fi + if test "$fail_if_missing" = "yes" -a -z "$TCL_SRC"; then +! as_fn_error "could not configure Tcl" "$LINENO" 5 + fi + fi + +--- 6712,6718 ---- + fi + fi + if test "$fail_if_missing" = "yes" -a -z "$TCL_SRC"; then +! as_fn_error $? "could not configure Tcl" "$LINENO" 5 + fi + fi + +*************** +*** 6720,6726 **** + set dummy $RUBY_CMD; ac_word=$2 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 + $as_echo_n "checking for $ac_word... " >&6; } +! if test "${ac_cv_path_vi_cv_path_ruby+set}" = set; then : + $as_echo_n "(cached) " >&6 + else + case $vi_cv_path_ruby in +--- 6750,6756 ---- + set dummy $RUBY_CMD; ac_word=$2 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 + $as_echo_n "checking for $ac_word... " >&6; } +! if ${ac_cv_path_vi_cv_path_ruby+:} false; then : + $as_echo_n "(cached) " >&6 + else + case $vi_cv_path_ruby in +*************** +*** 6734,6740 **** + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do +! if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_vi_cv_path_ruby="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 +--- 6764,6770 ---- + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do +! if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_vi_cv_path_ruby="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 +*************** +*** 6836,6842 **** + fi + + if test "$fail_if_missing" = "yes" -a -z "$RUBY_OBJ"; then +! as_fn_error "could not configure Ruby" "$LINENO" 5 + fi + fi + +--- 6866,6872 ---- + fi + + if test "$fail_if_missing" = "yes" -a -z "$RUBY_OBJ"; then +! as_fn_error $? "could not configure Ruby" "$LINENO" 5 + fi + fi + +*************** +*** 6898,6904 **** + $as_echo "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5 + $as_echo_n "checking for socket in -lsocket... " >&6; } +! if test "${ac_cv_lib_socket_socket+set}" = set; then : + $as_echo_n "(cached) " >&6 + else + ac_check_lib_save_LIBS=$LIBS +--- 6928,6934 ---- + $as_echo "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5 + $as_echo_n "checking for socket in -lsocket... " >&6; } +! if ${ac_cv_lib_socket_socket+:} false; then : + $as_echo_n "(cached) " >&6 + else + ac_check_lib_save_LIBS=$LIBS +*************** +*** 6932,6938 **** + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5 + $as_echo "$ac_cv_lib_socket_socket" >&6; } +! if test "x$ac_cv_lib_socket_socket" = x""yes; then : + cat >>confdefs.h <<_ACEOF + #define HAVE_LIBSOCKET 1 + _ACEOF +--- 6962,6968 ---- + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5 + $as_echo "$ac_cv_lib_socket_socket" >&6; } +! if test "x$ac_cv_lib_socket_socket" = xyes; then : + cat >>confdefs.h <<_ACEOF + #define HAVE_LIBSOCKET 1 + _ACEOF +*************** +*** 6943,6949 **** + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5 + $as_echo_n "checking for gethostbyname in -lnsl... " >&6; } +! if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then : + $as_echo_n "(cached) " >&6 + else + ac_check_lib_save_LIBS=$LIBS +--- 6973,6979 ---- + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5 + $as_echo_n "checking for gethostbyname in -lnsl... " >&6; } +! if ${ac_cv_lib_nsl_gethostbyname+:} false; then : + $as_echo_n "(cached) " >&6 + else + ac_check_lib_save_LIBS=$LIBS +*************** +*** 6977,6983 **** + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5 + $as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; } +! if test "x$ac_cv_lib_nsl_gethostbyname" = x""yes; then : + cat >>confdefs.h <<_ACEOF + #define HAVE_LIBNSL 1 + _ACEOF +--- 7007,7013 ---- + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5 + $as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; } +! if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then : + cat >>confdefs.h <<_ACEOF + #define HAVE_LIBNSL 1 + _ACEOF +*************** +*** 7127,7133 **** + set dummy xmkmf; ac_word=$2 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 + $as_echo_n "checking for $ac_word... " >&6; } +! if test "${ac_cv_path_xmkmfpath+set}" = set; then : + $as_echo_n "(cached) " >&6 + else + case $xmkmfpath in +--- 7157,7163 ---- + set dummy xmkmf; ac_word=$2 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 + $as_echo_n "checking for $ac_word... " >&6; } +! if ${ac_cv_path_xmkmfpath+:} false; then : + $as_echo_n "(cached) " >&6 + else + case $xmkmfpath in +*************** +*** 7141,7147 **** + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do +! if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_xmkmfpath="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 +--- 7171,7177 ---- + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do +! if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_xmkmfpath="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 +*************** +*** 7179,7186 **** + have_x=disabled + else + case $x_includes,$x_libraries in #( +! *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #( +! *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then : + $as_echo_n "(cached) " >&6 + else + # One or both of the vars are not set, and there is no cached value. +--- 7209,7216 ---- + have_x=disabled + else + case $x_includes,$x_libraries in #( +! *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #( +! *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then : + $as_echo_n "(cached) " >&6 + else + # One or both of the vars are not set, and there is no cached value. +*************** +*** 7197,7203 **** + @echo libdir='${LIBDIR}' + _ACEOF + if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then +! # GNU make sometimes prints "make[1]: Entering...", which would confuse us. + for ac_var in incroot usrlibdir libdir; do + eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`" + done +--- 7227,7233 ---- + @echo libdir='${LIBDIR}' + _ACEOF + if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then +! # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. + for ac_var in incroot usrlibdir libdir; do + eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`" + done +*************** +*** 7283,7289 **** + fi + done + fi +! rm -f conftest.err conftest.$ac_ext + fi # $ac_x_includes = no + + if test "$ac_x_libraries" = no; then +--- 7313,7319 ---- + fi + done + fi +! rm -f conftest.err conftest.i conftest.$ac_ext + fi # $ac_x_includes = no + + if test "$ac_x_libraries" = no; then +*************** +*** 7457,7463 **** + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5 + $as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; } +! if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then : + $as_echo_n "(cached) " >&6 + else + ac_check_lib_save_LIBS=$LIBS +--- 7487,7493 ---- + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5 + $as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; } +! if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then : + $as_echo_n "(cached) " >&6 + else + ac_check_lib_save_LIBS=$LIBS +*************** +*** 7491,7504 **** + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5 + $as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; } +! if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then : + X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet" + fi + + if test $ac_cv_lib_dnet_dnet_ntoa = no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5 + $as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; } +! if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then : + $as_echo_n "(cached) " >&6 + else + ac_check_lib_save_LIBS=$LIBS +--- 7521,7534 ---- + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5 + $as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; } +! if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then : + X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet" + fi + + if test $ac_cv_lib_dnet_dnet_ntoa = no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5 + $as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; } +! if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then : + $as_echo_n "(cached) " >&6 + else + ac_check_lib_save_LIBS=$LIBS +*************** +*** 7532,7538 **** + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5 + $as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; } +! if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = x""yes; then : + X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub" + fi + +--- 7562,7568 ---- + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5 + $as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; } +! if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then : + X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub" + fi + +*************** +*** 7551,7564 **** + # The functions gethostbyname, getservbyname, and inet_addr are + # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking. + ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname" +! if test "x$ac_cv_func_gethostbyname" = x""yes; then : + + fi + + if test $ac_cv_func_gethostbyname = no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5 + $as_echo_n "checking for gethostbyname in -lnsl... " >&6; } +! if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then : + $as_echo_n "(cached) " >&6 + else + ac_check_lib_save_LIBS=$LIBS +--- 7581,7594 ---- + # The functions gethostbyname, getservbyname, and inet_addr are + # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking. + ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname" +! if test "x$ac_cv_func_gethostbyname" = xyes; then : + + fi + + if test $ac_cv_func_gethostbyname = no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5 + $as_echo_n "checking for gethostbyname in -lnsl... " >&6; } +! if ${ac_cv_lib_nsl_gethostbyname+:} false; then : + $as_echo_n "(cached) " >&6 + else + ac_check_lib_save_LIBS=$LIBS +*************** +*** 7592,7605 **** + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5 + $as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; } +! if test "x$ac_cv_lib_nsl_gethostbyname" = x""yes; then : + X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl" + fi + + if test $ac_cv_lib_nsl_gethostbyname = no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5 + $as_echo_n "checking for gethostbyname in -lbsd... " >&6; } +! if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then : + $as_echo_n "(cached) " >&6 + else + ac_check_lib_save_LIBS=$LIBS +--- 7622,7635 ---- + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5 + $as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; } +! if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then : + X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl" + fi + + if test $ac_cv_lib_nsl_gethostbyname = no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5 + $as_echo_n "checking for gethostbyname in -lbsd... " >&6; } +! if ${ac_cv_lib_bsd_gethostbyname+:} false; then : + $as_echo_n "(cached) " >&6 + else + ac_check_lib_save_LIBS=$LIBS +*************** +*** 7633,7639 **** + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5 + $as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; } +! if test "x$ac_cv_lib_bsd_gethostbyname" = x""yes; then : + X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd" + fi + +--- 7663,7669 ---- + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5 + $as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; } +! if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then : + X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd" + fi + +*************** +*** 7648,7661 **** + # must be given before -lnsl if both are needed. We assume that + # if connect needs -lnsl, so does gethostbyname. + ac_fn_c_check_func "$LINENO" "connect" "ac_cv_func_connect" +! if test "x$ac_cv_func_connect" = x""yes; then : + + fi + + if test $ac_cv_func_connect = no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5 + $as_echo_n "checking for connect in -lsocket... " >&6; } +! if test "${ac_cv_lib_socket_connect+set}" = set; then : + $as_echo_n "(cached) " >&6 + else + ac_check_lib_save_LIBS=$LIBS +--- 7678,7691 ---- + # must be given before -lnsl if both are needed. We assume that + # if connect needs -lnsl, so does gethostbyname. + ac_fn_c_check_func "$LINENO" "connect" "ac_cv_func_connect" +! if test "x$ac_cv_func_connect" = xyes; then : + + fi + + if test $ac_cv_func_connect = no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5 + $as_echo_n "checking for connect in -lsocket... " >&6; } +! if ${ac_cv_lib_socket_connect+:} false; then : + $as_echo_n "(cached) " >&6 + else + ac_check_lib_save_LIBS=$LIBS +*************** +*** 7689,7695 **** + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5 + $as_echo "$ac_cv_lib_socket_connect" >&6; } +! if test "x$ac_cv_lib_socket_connect" = x""yes; then : + X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS" + fi + +--- 7719,7725 ---- + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5 + $as_echo "$ac_cv_lib_socket_connect" >&6; } +! if test "x$ac_cv_lib_socket_connect" = xyes; then : + X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS" + fi + +*************** +*** 7697,7710 **** + + # Guillermo Gomez says -lposix is necessary on A/UX. + ac_fn_c_check_func "$LINENO" "remove" "ac_cv_func_remove" +! if test "x$ac_cv_func_remove" = x""yes; then : + + fi + + if test $ac_cv_func_remove = no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5 + $as_echo_n "checking for remove in -lposix... " >&6; } +! if test "${ac_cv_lib_posix_remove+set}" = set; then : + $as_echo_n "(cached) " >&6 + else + ac_check_lib_save_LIBS=$LIBS +--- 7727,7740 ---- + + # Guillermo Gomez says -lposix is necessary on A/UX. + ac_fn_c_check_func "$LINENO" "remove" "ac_cv_func_remove" +! if test "x$ac_cv_func_remove" = xyes; then : + + fi + + if test $ac_cv_func_remove = no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5 + $as_echo_n "checking for remove in -lposix... " >&6; } +! if ${ac_cv_lib_posix_remove+:} false; then : + $as_echo_n "(cached) " >&6 + else + ac_check_lib_save_LIBS=$LIBS +*************** +*** 7738,7744 **** + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5 + $as_echo "$ac_cv_lib_posix_remove" >&6; } +! if test "x$ac_cv_lib_posix_remove" = x""yes; then : + X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix" + fi + +--- 7768,7774 ---- + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5 + $as_echo "$ac_cv_lib_posix_remove" >&6; } +! if test "x$ac_cv_lib_posix_remove" = xyes; then : + X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix" + fi + +*************** +*** 7746,7759 **** + + # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. + ac_fn_c_check_func "$LINENO" "shmat" "ac_cv_func_shmat" +! if test "x$ac_cv_func_shmat" = x""yes; then : + + fi + + if test $ac_cv_func_shmat = no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5 + $as_echo_n "checking for shmat in -lipc... " >&6; } +! if test "${ac_cv_lib_ipc_shmat+set}" = set; then : + $as_echo_n "(cached) " >&6 + else + ac_check_lib_save_LIBS=$LIBS +--- 7776,7789 ---- + + # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. + ac_fn_c_check_func "$LINENO" "shmat" "ac_cv_func_shmat" +! if test "x$ac_cv_func_shmat" = xyes; then : + + fi + + if test $ac_cv_func_shmat = no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5 + $as_echo_n "checking for shmat in -lipc... " >&6; } +! if ${ac_cv_lib_ipc_shmat+:} false; then : + $as_echo_n "(cached) " >&6 + else + ac_check_lib_save_LIBS=$LIBS +*************** +*** 7787,7793 **** + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5 + $as_echo "$ac_cv_lib_ipc_shmat" >&6; } +! if test "x$ac_cv_lib_ipc_shmat" = x""yes; then : + X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc" + fi + +--- 7817,7823 ---- + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5 + $as_echo "$ac_cv_lib_ipc_shmat" >&6; } +! if test "x$ac_cv_lib_ipc_shmat" = xyes; then : + X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc" + fi + +*************** +*** 7805,7811 **** + # John Interrante, Karl Berry + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5 + $as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; } +! if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then : + $as_echo_n "(cached) " >&6 + else + ac_check_lib_save_LIBS=$LIBS +--- 7835,7841 ---- + # John Interrante, Karl Berry + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5 + $as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; } +! if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then : + $as_echo_n "(cached) " >&6 + else + ac_check_lib_save_LIBS=$LIBS +*************** +*** 7839,7845 **** + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5 + $as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; } +! if test "x$ac_cv_lib_ICE_IceConnectionNumber" = x""yes; then : + X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE" + fi + +--- 7869,7875 ---- + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5 + $as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; } +! if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then : + X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE" + fi + +*************** +*** 7917,7923 **** + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _XdmcpAuthDoIt in -lXdmcp" >&5 + $as_echo_n "checking for _XdmcpAuthDoIt in -lXdmcp... " >&6; } +! if test "${ac_cv_lib_Xdmcp__XdmcpAuthDoIt+set}" = set; then : + $as_echo_n "(cached) " >&6 + else + ac_check_lib_save_LIBS=$LIBS +--- 7947,7953 ---- + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _XdmcpAuthDoIt in -lXdmcp" >&5 + $as_echo_n "checking for _XdmcpAuthDoIt in -lXdmcp... " >&6; } +! if ${ac_cv_lib_Xdmcp__XdmcpAuthDoIt+:} false; then : + $as_echo_n "(cached) " >&6 + else + ac_check_lib_save_LIBS=$LIBS +*************** +*** 7951,7964 **** + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xdmcp__XdmcpAuthDoIt" >&5 + $as_echo "$ac_cv_lib_Xdmcp__XdmcpAuthDoIt" >&6; } +! if test "x$ac_cv_lib_Xdmcp__XdmcpAuthDoIt" = x""yes; then : + X_EXTRA_LIBS="$X_EXTRA_LIBS -lXdmcp" + fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceOpenConnection in -lICE" >&5 + $as_echo_n "checking for IceOpenConnection in -lICE... " >&6; } +! if test "${ac_cv_lib_ICE_IceOpenConnection+set}" = set; then : + $as_echo_n "(cached) " >&6 + else + ac_check_lib_save_LIBS=$LIBS +--- 7981,7994 ---- + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xdmcp__XdmcpAuthDoIt" >&5 + $as_echo "$ac_cv_lib_Xdmcp__XdmcpAuthDoIt" >&6; } +! if test "x$ac_cv_lib_Xdmcp__XdmcpAuthDoIt" = xyes; then : + X_EXTRA_LIBS="$X_EXTRA_LIBS -lXdmcp" + fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceOpenConnection in -lICE" >&5 + $as_echo_n "checking for IceOpenConnection in -lICE... " >&6; } +! if ${ac_cv_lib_ICE_IceOpenConnection+:} false; then : + $as_echo_n "(cached) " >&6 + else + ac_check_lib_save_LIBS=$LIBS +*************** +*** 7992,7998 **** + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceOpenConnection" >&5 + $as_echo "$ac_cv_lib_ICE_IceOpenConnection" >&6; } +! if test "x$ac_cv_lib_ICE_IceOpenConnection" = x""yes; then : + X_EXTRA_LIBS="$X_EXTRA_LIBS -lSM -lICE" + fi + +--- 8022,8028 ---- + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceOpenConnection" >&5 + $as_echo "$ac_cv_lib_ICE_IceOpenConnection" >&6; } +! if test "x$ac_cv_lib_ICE_IceOpenConnection" = xyes; then : + X_EXTRA_LIBS="$X_EXTRA_LIBS -lSM -lICE" + fi + +*************** +*** 8000,8006 **** + LDFLAGS="$X_LIBS $ac_save_LDFLAGS" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmCreatePixmapFromData in -lXpm" >&5 + $as_echo_n "checking for XpmCreatePixmapFromData in -lXpm... " >&6; } +! if test "${ac_cv_lib_Xpm_XpmCreatePixmapFromData+set}" = set; then : + $as_echo_n "(cached) " >&6 + else + ac_check_lib_save_LIBS=$LIBS +--- 8030,8036 ---- + LDFLAGS="$X_LIBS $ac_save_LDFLAGS" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmCreatePixmapFromData in -lXpm" >&5 + $as_echo_n "checking for XpmCreatePixmapFromData in -lXpm... " >&6; } +! if ${ac_cv_lib_Xpm_XpmCreatePixmapFromData+:} false; then : + $as_echo_n "(cached) " >&6 + else + ac_check_lib_save_LIBS=$LIBS +*************** +*** 8034,8040 **** + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xpm_XpmCreatePixmapFromData" >&5 + $as_echo "$ac_cv_lib_Xpm_XpmCreatePixmapFromData" >&6; } +! if test "x$ac_cv_lib_Xpm_XpmCreatePixmapFromData" = x""yes; then : + X_PRE_LIBS="$X_PRE_LIBS -lXpm" + fi + +--- 8064,8070 ---- + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xpm_XpmCreatePixmapFromData" >&5 + $as_echo "$ac_cv_lib_Xpm_XpmCreatePixmapFromData" >&6; } +! if test "x$ac_cv_lib_Xpm_XpmCreatePixmapFromData" = xyes; then : + X_PRE_LIBS="$X_PRE_LIBS -lXpm" + fi + +*************** +*** 8092,8102 **** + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t is 2 bytes" >&5 + $as_echo_n "checking size of wchar_t is 2 bytes... " >&6; } +! if test "${ac_cv_small_wchar_t+set}" = set; then : + $as_echo_n "(cached) " >&6 + else + if test "$cross_compiling" = yes; then : +! as_fn_error "failed to compile test program" "$LINENO" 5 + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +--- 8122,8132 ---- + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t is 2 bytes" >&5 + $as_echo_n "checking size of wchar_t is 2 bytes... " >&6; } +! if ${ac_cv_small_wchar_t+:} false; then : + $as_echo_n "(cached) " >&6 + else + if test "$cross_compiling" = yes; then : +! as_fn_error $? "failed to compile test program" "$LINENO" 5 + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +*************** +*** 8395,8401 **** + set dummy pkg-config; ac_word=$2 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 + $as_echo_n "checking for $ac_word... " >&6; } +! if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : + $as_echo_n "(cached) " >&6 + else + case $PKG_CONFIG in +--- 8425,8431 ---- + set dummy pkg-config; ac_word=$2 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 + $as_echo_n "checking for $ac_word... " >&6; } +! if ${ac_cv_path_PKG_CONFIG+:} false; then : + $as_echo_n "(cached) " >&6 + else + case $PKG_CONFIG in +*************** +*** 8409,8415 **** + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do +! if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 +--- 8439,8445 ---- + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do +! if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 +*************** +*** 8634,8640 **** + { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 + $as_echo "not found" >&6; } + if test "x" = xfail; then +! as_fn_error "Could not find libgnomeui-2.0 via pkg-config" "$LINENO" 5 + fi + fi + } +--- 8664,8670 ---- + { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 + $as_echo "not found" >&6; } + if test "x" = xfail; then +! as_fn_error $? "Could not find libgnomeui-2.0 via pkg-config" "$LINENO" 5 + fi + fi + } +*************** +*** 8827,8833 **** + LDFLAGS="$X_LIBS $LDFLAGS" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XShapeQueryExtension in -lXext" >&5 + $as_echo_n "checking for XShapeQueryExtension in -lXext... " >&6; } +! if test "${ac_cv_lib_Xext_XShapeQueryExtension+set}" = set; then : + $as_echo_n "(cached) " >&6 + else + ac_check_lib_save_LIBS=$LIBS +--- 8857,8863 ---- + LDFLAGS="$X_LIBS $LDFLAGS" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XShapeQueryExtension in -lXext" >&5 + $as_echo_n "checking for XShapeQueryExtension in -lXext... " >&6; } +! if ${ac_cv_lib_Xext_XShapeQueryExtension+:} false; then : + $as_echo_n "(cached) " >&6 + else + ac_check_lib_save_LIBS=$LIBS +*************** +*** 8861,8873 **** + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xext_XShapeQueryExtension" >&5 + $as_echo "$ac_cv_lib_Xext_XShapeQueryExtension" >&6; } +! if test "x$ac_cv_lib_Xext_XShapeQueryExtension" = x""yes; then : + GUI_X_LIBS="-lXext" + fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wslen in -lw" >&5 + $as_echo_n "checking for wslen in -lw... " >&6; } +! if test "${ac_cv_lib_w_wslen+set}" = set; then : + $as_echo_n "(cached) " >&6 + else + ac_check_lib_save_LIBS=$LIBS +--- 8891,8903 ---- + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xext_XShapeQueryExtension" >&5 + $as_echo "$ac_cv_lib_Xext_XShapeQueryExtension" >&6; } +! if test "x$ac_cv_lib_Xext_XShapeQueryExtension" = xyes; then : + GUI_X_LIBS="-lXext" + fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wslen in -lw" >&5 + $as_echo_n "checking for wslen in -lw... " >&6; } +! if ${ac_cv_lib_w_wslen+:} false; then : + $as_echo_n "(cached) " >&6 + else + ac_check_lib_save_LIBS=$LIBS +*************** +*** 8901,8913 **** + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_w_wslen" >&5 + $as_echo "$ac_cv_lib_w_wslen" >&6; } +! if test "x$ac_cv_lib_w_wslen" = x""yes; then : + X_EXTRA_LIBS="$X_EXTRA_LIBS -lw" + fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlsym in -ldl" >&5 + $as_echo_n "checking for dlsym in -ldl... " >&6; } +! if test "${ac_cv_lib_dl_dlsym+set}" = set; then : + $as_echo_n "(cached) " >&6 + else + ac_check_lib_save_LIBS=$LIBS +--- 8931,8943 ---- + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_w_wslen" >&5 + $as_echo "$ac_cv_lib_w_wslen" >&6; } +! if test "x$ac_cv_lib_w_wslen" = xyes; then : + X_EXTRA_LIBS="$X_EXTRA_LIBS -lw" + fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlsym in -ldl" >&5 + $as_echo_n "checking for dlsym in -ldl... " >&6; } +! if ${ac_cv_lib_dl_dlsym+:} false; then : + $as_echo_n "(cached) " >&6 + else + ac_check_lib_save_LIBS=$LIBS +*************** +*** 8941,8953 **** + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlsym" >&5 + $as_echo "$ac_cv_lib_dl_dlsym" >&6; } +! if test "x$ac_cv_lib_dl_dlsym" = x""yes; then : + X_EXTRA_LIBS="$X_EXTRA_LIBS -ldl" + fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XmuCreateStippledPixmap in -lXmu" >&5 + $as_echo_n "checking for XmuCreateStippledPixmap in -lXmu... " >&6; } +! if test "${ac_cv_lib_Xmu_XmuCreateStippledPixmap+set}" = set; then : + $as_echo_n "(cached) " >&6 + else + ac_check_lib_save_LIBS=$LIBS +--- 8971,8983 ---- + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlsym" >&5 + $as_echo "$ac_cv_lib_dl_dlsym" >&6; } +! if test "x$ac_cv_lib_dl_dlsym" = xyes; then : + X_EXTRA_LIBS="$X_EXTRA_LIBS -ldl" + fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XmuCreateStippledPixmap in -lXmu" >&5 + $as_echo_n "checking for XmuCreateStippledPixmap in -lXmu... " >&6; } +! if ${ac_cv_lib_Xmu_XmuCreateStippledPixmap+:} false; then : + $as_echo_n "(cached) " >&6 + else + ac_check_lib_save_LIBS=$LIBS +*************** +*** 8981,8994 **** + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xmu_XmuCreateStippledPixmap" >&5 + $as_echo "$ac_cv_lib_Xmu_XmuCreateStippledPixmap" >&6; } +! if test "x$ac_cv_lib_Xmu_XmuCreateStippledPixmap" = x""yes; then : + GUI_X_LIBS="-lXmu $GUI_X_LIBS" + fi + + if test -z "$SKIP_MOTIF"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpEndJob in -lXp" >&5 + $as_echo_n "checking for XpEndJob in -lXp... " >&6; } +! if test "${ac_cv_lib_Xp_XpEndJob+set}" = set; then : + $as_echo_n "(cached) " >&6 + else + ac_check_lib_save_LIBS=$LIBS +--- 9011,9024 ---- + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xmu_XmuCreateStippledPixmap" >&5 + $as_echo "$ac_cv_lib_Xmu_XmuCreateStippledPixmap" >&6; } +! if test "x$ac_cv_lib_Xmu_XmuCreateStippledPixmap" = xyes; then : + GUI_X_LIBS="-lXmu $GUI_X_LIBS" + fi + + if test -z "$SKIP_MOTIF"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpEndJob in -lXp" >&5 + $as_echo_n "checking for XpEndJob in -lXp... " >&6; } +! if ${ac_cv_lib_Xp_XpEndJob+:} false; then : + $as_echo_n "(cached) " >&6 + else + ac_check_lib_save_LIBS=$LIBS +*************** +*** 9022,9028 **** + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xp_XpEndJob" >&5 + $as_echo "$ac_cv_lib_Xp_XpEndJob" >&6; } +! if test "x$ac_cv_lib_Xp_XpEndJob" = x""yes; then : + GUI_X_LIBS="-lXp $GUI_X_LIBS" + fi + +--- 9052,9058 ---- + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xp_XpEndJob" >&5 + $as_echo "$ac_cv_lib_Xp_XpEndJob" >&6; } +! if test "x$ac_cv_lib_Xp_XpEndJob" = xyes; then : + GUI_X_LIBS="-lXp $GUI_X_LIBS" + fi + +*************** +*** 9061,9067 **** + for ac_header in X11/SM/SMlib.h + do : + ac_fn_c_check_header_mongrel "$LINENO" "X11/SM/SMlib.h" "ac_cv_header_X11_SM_SMlib_h" "$ac_includes_default" +! if test "x$ac_cv_header_X11_SM_SMlib_h" = x""yes; then : + cat >>confdefs.h <<_ACEOF + #define HAVE_X11_SM_SMLIB_H 1 + _ACEOF +--- 9091,9097 ---- + for ac_header in X11/SM/SMlib.h + do : + ac_fn_c_check_header_mongrel "$LINENO" "X11/SM/SMlib.h" "ac_cv_header_X11_SM_SMlib_h" "$ac_includes_default" +! if test "x$ac_cv_header_X11_SM_SMlib_h" = xyes; then : + cat >>confdefs.h <<_ACEOF + #define HAVE_X11_SM_SMLIB_H 1 + _ACEOF +*************** +*** 9081,9088 **** + do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` + ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +! eval as_val=\$$as_ac_Header +! if test "x$as_val" = x""yes; then : + cat >>confdefs.h <<_ACEOF + #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 + _ACEOF +--- 9111,9117 ---- + do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` + ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +! if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF + #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 + _ACEOF +*************** +*** 9164,9171 **** + do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` + ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +! eval as_val=\$$as_ac_Header +! if test "x$as_val" = x""yes; then : + cat >>confdefs.h <<_ACEOF + #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 + _ACEOF +--- 9193,9199 ---- + do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` + ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +! if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF + #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 + _ACEOF +*************** +*** 9233,9239 **** + + + if test "$enable_workshop" = "yes" -a -n "$SKIP_MOTIF"; then +! as_fn_error "cannot use workshop without Motif" "$LINENO" 5 + fi + + if test "$enable_xim" = "yes"; then +--- 9261,9267 ---- + + + if test "$enable_workshop" = "yes" -a -n "$SKIP_MOTIF"; then +! as_fn_error $? "cannot use workshop without Motif" "$LINENO" 5 + fi + + if test "$enable_xim" = "yes"; then +*************** +*** 9287,9299 **** + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether toupper is broken" >&5 + $as_echo_n "checking whether toupper is broken... " >&6; } +! if test "${vim_cv_toupper_broken+set}" = set; then : + $as_echo_n "(cached) " >&6 + else + + if test "$cross_compiling" = yes; then : + +! as_fn_error "cross-compiling: please set 'vim_cv_toupper_broken'" "$LINENO" 5 + + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +--- 9315,9327 ---- + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether toupper is broken" >&5 + $as_echo_n "checking whether toupper is broken... " >&6; } +! if ${vim_cv_toupper_broken+:} false; then : + $as_echo_n "(cached) " >&6 + else + + if test "$cross_compiling" = yes; then : + +! as_fn_error $? "cross-compiling: please set 'vim_cv_toupper_broken'" "$LINENO" 5 + + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +*************** +*** 9377,9383 **** + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + ac_fn_c_check_header_mongrel "$LINENO" "elf.h" "ac_cv_header_elf_h" "$ac_includes_default" +! if test "x$ac_cv_header_elf_h" = x""yes; then : + HAS_ELF=1 + fi + +--- 9405,9411 ---- + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + ac_fn_c_check_header_mongrel "$LINENO" "elf.h" "ac_cv_header_elf_h" "$ac_includes_default" +! if test "x$ac_cv_header_elf_h" = xyes; then : + HAS_ELF=1 + fi + +*************** +*** 9385,9391 **** + if test "$HAS_ELF" = 1; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lelf" >&5 + $as_echo_n "checking for main in -lelf... " >&6; } +! if test "${ac_cv_lib_elf_main+set}" = set; then : + $as_echo_n "(cached) " >&6 + else + ac_check_lib_save_LIBS=$LIBS +--- 9413,9419 ---- + if test "$HAS_ELF" = 1; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lelf" >&5 + $as_echo_n "checking for main in -lelf... " >&6; } +! if ${ac_cv_lib_elf_main+:} false; then : + $as_echo_n "(cached) " >&6 + else + ac_check_lib_save_LIBS=$LIBS +*************** +*** 9413,9419 **** + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_elf_main" >&5 + $as_echo "$ac_cv_lib_elf_main" >&6; } +! if test "x$ac_cv_lib_elf_main" = x""yes; then : + cat >>confdefs.h <<_ACEOF + #define HAVE_LIBELF 1 + _ACEOF +--- 9441,9447 ---- + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_elf_main" >&5 + $as_echo "$ac_cv_lib_elf_main" >&6; } +! if test "x$ac_cv_lib_elf_main" = xyes; then : + cat >>confdefs.h <<_ACEOF + #define HAVE_LIBELF 1 + _ACEOF +*************** +*** 9429,9435 **** + as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5 + $as_echo_n "checking for $ac_hdr that defines DIR... " >&6; } +! if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then : + $as_echo_n "(cached) " >&6 + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +--- 9457,9463 ---- + as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5 + $as_echo_n "checking for $ac_hdr that defines DIR... " >&6; } +! if eval \${$as_ac_Header+:} false; then : + $as_echo_n "(cached) " >&6 + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +*************** +*** 9456,9463 **** + eval ac_res=\$$as_ac_Header + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 + $as_echo "$ac_res" >&6; } +! eval as_val=\$$as_ac_Header +! if test "x$as_val" = x""yes; then : + cat >>confdefs.h <<_ACEOF + #define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1 + _ACEOF +--- 9484,9490 ---- + eval ac_res=\$$as_ac_Header + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 + $as_echo "$ac_res" >&6; } +! if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF + #define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1 + _ACEOF +*************** +*** 9470,9476 **** + if test $ac_header_dirent = dirent.h; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 + $as_echo_n "checking for library containing opendir... " >&6; } +! if test "${ac_cv_search_opendir+set}" = set; then : + $as_echo_n "(cached) " >&6 + else + ac_func_search_save_LIBS=$LIBS +--- 9497,9503 ---- + if test $ac_header_dirent = dirent.h; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 + $as_echo_n "checking for library containing opendir... " >&6; } +! if ${ac_cv_search_opendir+:} false; then : + $as_echo_n "(cached) " >&6 + else + ac_func_search_save_LIBS=$LIBS +*************** +*** 9504,9514 **** + fi + rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext +! if test "${ac_cv_search_opendir+set}" = set; then : + break + fi + done +! if test "${ac_cv_search_opendir+set}" = set; then : + + else + ac_cv_search_opendir=no +--- 9531,9541 ---- + fi + rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext +! if ${ac_cv_search_opendir+:} false; then : + break + fi + done +! if ${ac_cv_search_opendir+:} false; then : + + else + ac_cv_search_opendir=no +*************** +*** 9527,9533 **** + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 + $as_echo_n "checking for library containing opendir... " >&6; } +! if test "${ac_cv_search_opendir+set}" = set; then : + $as_echo_n "(cached) " >&6 + else + ac_func_search_save_LIBS=$LIBS +--- 9554,9560 ---- + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 + $as_echo_n "checking for library containing opendir... " >&6; } +! if ${ac_cv_search_opendir+:} false; then : + $as_echo_n "(cached) " >&6 + else + ac_func_search_save_LIBS=$LIBS +*************** +*** 9561,9571 **** + fi + rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext +! if test "${ac_cv_search_opendir+set}" = set; then : + break + fi + done +! if test "${ac_cv_search_opendir+set}" = set; then : + + else + ac_cv_search_opendir=no +--- 9588,9598 ---- + fi + rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext +! if ${ac_cv_search_opendir+:} false; then : + break + fi + done +! if ${ac_cv_search_opendir+:} false; then : + + else + ac_cv_search_opendir=no +*************** +*** 9625,9632 **** + do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` + ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +! eval as_val=\$$as_ac_Header +! if test "x$as_val" = x""yes; then : + cat >>confdefs.h <<_ACEOF + #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 + _ACEOF +--- 9652,9658 ---- + do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` + ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +! if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF + #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 + _ACEOF +*************** +*** 9642,9648 **** + # include <sys/stream.h> + #endif + " +! if test "x$ac_cv_header_sys_ptem_h" = x""yes; then : + cat >>confdefs.h <<_ACEOF + #define HAVE_SYS_PTEM_H 1 + _ACEOF +--- 9668,9674 ---- + # include <sys/stream.h> + #endif + " +! if test "x$ac_cv_header_sys_ptem_h" = xyes; then : + cat >>confdefs.h <<_ACEOF + #define HAVE_SYS_PTEM_H 1 + _ACEOF +*************** +*** 9658,9664 **** + # include <sys/param.h> + #endif + " +! if test "x$ac_cv_header_sys_sysctl_h" = x""yes; then : + cat >>confdefs.h <<_ACEOF + #define HAVE_SYS_SYSCTL_H 1 + _ACEOF +--- 9684,9690 ---- + # include <sys/param.h> + #endif + " +! if test "x$ac_cv_header_sys_sysctl_h" = xyes; then : + cat >>confdefs.h <<_ACEOF + #define HAVE_SYS_SYSCTL_H 1 + _ACEOF +*************** +*** 9698,9704 **** + for ac_header in strings.h + do : + ac_fn_c_check_header_mongrel "$LINENO" "strings.h" "ac_cv_header_strings_h" "$ac_includes_default" +! if test "x$ac_cv_header_strings_h" = x""yes; then : + cat >>confdefs.h <<_ACEOF + #define HAVE_STRINGS_H 1 + _ACEOF +--- 9724,9730 ---- + for ac_header in strings.h + do : + ac_fn_c_check_header_mongrel "$LINENO" "strings.h" "ac_cv_header_strings_h" "$ac_includes_default" +! if test "x$ac_cv_header_strings_h" = xyes; then : + cat >>confdefs.h <<_ACEOF + #define HAVE_STRINGS_H 1 + _ACEOF +*************** +*** 9757,9763 **** + if test $ac_cv_c_compiler_gnu = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC needs -traditional" >&5 + $as_echo_n "checking whether $CC needs -traditional... " >&6; } +! if test "${ac_cv_prog_gcc_traditional+set}" = set; then : + $as_echo_n "(cached) " >&6 + else + ac_pattern="Autoconf.*'x'" +--- 9783,9789 ---- + if test $ac_cv_c_compiler_gnu = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC needs -traditional" >&5 + $as_echo_n "checking whether $CC needs -traditional... " >&6; } +! if ${ac_cv_prog_gcc_traditional+:} false; then : + $as_echo_n "(cached) " >&6 + else + ac_pattern="Autoconf.*'x'" +*************** +*** 9798,9804 **** + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 + $as_echo_n "checking for an ANSI C-conforming const... " >&6; } +! if test "${ac_cv_c_const+set}" = set; then : + $as_echo_n "(cached) " >&6 + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +--- 9824,9830 ---- + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 + $as_echo_n "checking for an ANSI C-conforming const... " >&6; } +! if ${ac_cv_c_const+:} false; then : + $as_echo_n "(cached) " >&6 + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +*************** +*** 9807,9817 **** + int + main () + { +! /* FIXME: Include the comments suggested by Paul. */ + #ifndef __cplusplus +! /* Ultrix mips cc rejects this. */ + typedef int charset[2]; +! const charset cs; + /* SunOS 4.1.1 cc rejects this. */ + char const *const *pcpcc; + char **ppc; +--- 9833,9843 ---- + int + main () + { +! + #ifndef __cplusplus +! /* Ultrix mips cc rejects this sort of thing. */ + typedef int charset[2]; +! const charset cs = { 0, 0 }; + /* SunOS 4.1.1 cc rejects this. */ + char const *const *pcpcc; + char **ppc; +*************** +*** 9828,9835 **** + ++pcpcc; + ppc = (char**) pcpcc; + pcpcc = (char const *const *) ppc; +! { /* SCO 3.2v4 cc rejects this. */ +! char *t; + char const *s = 0 ? (char *) 0 : (char const *) 0; + + *t++ = 0; +--- 9854,9862 ---- + ++pcpcc; + ppc = (char**) pcpcc; + pcpcc = (char const *const *) ppc; +! { /* SCO 3.2v4 cc rejects this sort of thing. */ +! char tx; +! char *t = &tx; + char const *s = 0 ? (char *) 0 : (char const *) 0; + + *t++ = 0; +*************** +*** 9845,9854 **** + iptr p = 0; + ++p; + } +! { /* AIX XL C 1.02.0.0 rejects this saying + "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ +! struct s { int j; const int *ap[3]; }; +! struct s *b; b->j = 5; + } + { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ + const int foo = 10; +--- 9872,9881 ---- + iptr p = 0; + ++p; + } +! { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying + "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ +! struct s { int j; const int *ap[3]; } bx; +! struct s *b = &bx; b->j = 5; + } + { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ + const int foo = 10; +*************** +*** 9878,9884 **** + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5 + $as_echo_n "checking for working volatile... " >&6; } +! if test "${ac_cv_c_volatile+set}" = set; then : + $as_echo_n "(cached) " >&6 + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +--- 9905,9911 ---- + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5 + $as_echo_n "checking for working volatile... " >&6; } +! if ${ac_cv_c_volatile+:} false; then : + $as_echo_n "(cached) " >&6 + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +*************** +*** 9911,9917 **** + fi + + ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default" +! if test "x$ac_cv_type_mode_t" = x""yes; then : + + else + +--- 9938,9944 ---- + fi + + ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default" +! if test "x$ac_cv_type_mode_t" = xyes; then : + + else + +*************** +*** 9922,9928 **** + fi + + ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default" +! if test "x$ac_cv_type_off_t" = x""yes; then : + + else + +--- 9949,9955 ---- + fi + + ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default" +! if test "x$ac_cv_type_off_t" = xyes; then : + + else + +*************** +*** 9933,9939 **** + fi + + ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" +! if test "x$ac_cv_type_pid_t" = x""yes; then : + + else + +--- 9960,9966 ---- + fi + + ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" +! if test "x$ac_cv_type_pid_t" = xyes; then : + + else + +*************** +*** 9944,9950 **** + fi + + ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" +! if test "x$ac_cv_type_size_t" = x""yes; then : + + else + +--- 9971,9977 ---- + fi + + ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" +! if test "x$ac_cv_type_size_t" = xyes; then : + + else + +*************** +*** 9956,9962 **** + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5 + $as_echo_n "checking for uid_t in sys/types.h... " >&6; } +! if test "${ac_cv_type_uid_t+set}" = set; then : + $as_echo_n "(cached) " >&6 + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +--- 9983,9989 ---- + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5 + $as_echo_n "checking for uid_t in sys/types.h... " >&6; } +! if ${ac_cv_type_uid_t+:} false; then : + $as_echo_n "(cached) " >&6 + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +*************** +*** 10001,10007 **** + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5 + $as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; } +! if test "${ac_cv_header_time+set}" = set; then : + $as_echo_n "(cached) " >&6 + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +--- 10028,10034 ---- + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5 + $as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; } +! if ${ac_cv_header_time+:} false; then : + $as_echo_n "(cached) " >&6 + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +*************** +*** 10035,10041 **** + fi + + ac_fn_c_check_type "$LINENO" "ino_t" "ac_cv_type_ino_t" "$ac_includes_default" +! if test "x$ac_cv_type_ino_t" = x""yes; then : + + else + +--- 10062,10068 ---- + fi + + ac_fn_c_check_type "$LINENO" "ino_t" "ac_cv_type_ino_t" "$ac_includes_default" +! if test "x$ac_cv_type_ino_t" = xyes; then : + + else + +*************** +*** 10046,10052 **** + fi + + ac_fn_c_check_type "$LINENO" "dev_t" "ac_cv_type_dev_t" "$ac_includes_default" +! if test "x$ac_cv_type_dev_t" = x""yes; then : + + else + +--- 10073,10079 ---- + fi + + ac_fn_c_check_type "$LINENO" "dev_t" "ac_cv_type_dev_t" "$ac_includes_default" +! if test "x$ac_cv_type_dev_t" = xyes; then : + + else + +*************** +*** 10058,10064 **** + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 + $as_echo_n "checking whether byte ordering is bigendian... " >&6; } +! if test "${ac_cv_c_bigendian+set}" = set; then : + $as_echo_n "(cached) " >&6 + else + ac_cv_c_bigendian=unknown +--- 10085,10091 ---- + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 + $as_echo_n "checking whether byte ordering is bigendian... " >&6; } +! if ${ac_cv_c_bigendian+:} false; then : + $as_echo_n "(cached) " >&6 + else + ac_cv_c_bigendian=unknown +*************** +*** 10276,10282 **** + + ;; #( + *) +! as_fn_error "unknown endianness + presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; + esac + +--- 10303,10309 ---- + + ;; #( + *) +! as_fn_error $? "unknown endianness + presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; + esac + +*************** +*** 10412,10418 **** + { $as_echo "$as_me:${as_lineno-$LINENO}: result: OK" >&5 + $as_echo "OK" >&6; } + else +! as_fn_error "FAILED" "$LINENO" 5 + fi + rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +--- 10439,10445 ---- + { $as_echo "$as_me:${as_lineno-$LINENO}: result: OK" >&5 + $as_echo "OK" >&6; } + else +! as_fn_error $? "FAILED" "$LINENO" 5 + fi + rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +*************** +*** 10428,10434 **** + as_ac_Lib=`$as_echo "ac_cv_lib_${libname}''_tgetent" | $as_tr_sh` + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent in -l${libname}" >&5 + $as_echo_n "checking for tgetent in -l${libname}... " >&6; } +! if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then : + $as_echo_n "(cached) " >&6 + else + ac_check_lib_save_LIBS=$LIBS +--- 10455,10461 ---- + as_ac_Lib=`$as_echo "ac_cv_lib_${libname}''_tgetent" | $as_tr_sh` + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent in -l${libname}" >&5 + $as_echo_n "checking for tgetent in -l${libname}... " >&6; } +! if eval \${$as_ac_Lib+:} false; then : + $as_echo_n "(cached) " >&6 + else + ac_check_lib_save_LIBS=$LIBS +*************** +*** 10463,10470 **** + eval ac_res=\$$as_ac_Lib + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 + $as_echo "$ac_res" >&6; } +! eval as_val=\$$as_ac_Lib +! if test "x$as_val" = x""yes; then : + cat >>confdefs.h <<_ACEOF + #define `$as_echo "HAVE_LIB${libname}" | $as_tr_cpp` 1 + _ACEOF +--- 10490,10496 ---- + eval ac_res=\$$as_ac_Lib + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 + $as_echo "$ac_res" >&6; } +! if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF + #define `$as_echo "HAVE_LIB${libname}" | $as_tr_cpp` 1 + _ACEOF +*************** +*** 10530,10536 **** + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + $as_echo "yes" >&6; } + else +! as_fn_error "NOT FOUND! + You need to install a terminal library; for example ncurses. + Or specify the name of the library with --with-tlib." "$LINENO" 5 + fi +--- 10556,10562 ---- + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + $as_echo "yes" >&6; } + else +! as_fn_error $? "NOT FOUND! + You need to install a terminal library; for example ncurses. + Or specify the name of the library with --with-tlib." "$LINENO" 5 + fi +*************** +*** 10540,10552 **** + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we talk terminfo" >&5 + $as_echo_n "checking whether we talk terminfo... " >&6; } +! if test "${vim_cv_terminfo+set}" = set; then : + $as_echo_n "(cached) " >&6 + else + + if test "$cross_compiling" = yes; then : + +! as_fn_error "cross-compiling: please set 'vim_cv_terminfo'" "$LINENO" 5 + + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +--- 10566,10578 ---- + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we talk terminfo" >&5 + $as_echo_n "checking whether we talk terminfo... " >&6; } +! if ${vim_cv_terminfo+:} false; then : + $as_echo_n "(cached) " >&6 + else + + if test "$cross_compiling" = yes; then : + +! as_fn_error $? "cross-compiling: please set 'vim_cv_terminfo'" "$LINENO" 5 + + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +*************** +*** 10593,10605 **** + if test "x$olibs" != "x$LIBS"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking what tgetent() returns for an unknown terminal" >&5 + $as_echo_n "checking what tgetent() returns for an unknown terminal... " >&6; } +! if test "${vim_cv_tgent+set}" = set; then : + $as_echo_n "(cached) " >&6 + else + + if test "$cross_compiling" = yes; then : + +! as_fn_error "failed to compile test program." "$LINENO" 5 + + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +--- 10619,10631 ---- + if test "x$olibs" != "x$LIBS"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking what tgetent() returns for an unknown terminal" >&5 + $as_echo_n "checking what tgetent() returns for an unknown terminal... " >&6; } +! if ${vim_cv_tgent+:} false; then : + $as_echo_n "(cached) " >&6 + else + + if test "$cross_compiling" = yes; then : + +! as_fn_error $? "failed to compile test program." "$LINENO" 5 + + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +*************** +*** 10894,10906 **** + rm -f conftest_grp + { $as_echo "$as_me:${as_lineno-$LINENO}: checking default tty permissions/group" >&5 + $as_echo_n "checking default tty permissions/group... " >&6; } +! if test "${vim_cv_tty_group+set}" = set; then : + $as_echo_n "(cached) " >&6 + else + + if test "$cross_compiling" = yes; then : + +! as_fn_error "cross-compiling: please set 'vim_cv_tty_group' and 'vim_cv_tty_mode'" "$LINENO" 5 + + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +--- 10920,10932 ---- + rm -f conftest_grp + { $as_echo "$as_me:${as_lineno-$LINENO}: checking default tty permissions/group" >&5 + $as_echo_n "checking default tty permissions/group... " >&6; } +! if ${vim_cv_tty_group+:} false; then : + $as_echo_n "(cached) " >&6 + else + + if test "$cross_compiling" = yes; then : + +! as_fn_error $? "cross-compiling: please set 'vim_cv_tty_group' and 'vim_cv_tty_mode'" "$LINENO" 5 + + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +*************** +*** 10981,10987 **** + _ACEOF + + if test "x$vim_cv_tty_mode" = "x" ; then +! as_fn_error "It seems you're cross compiling and have 'vim_cv_tty_group' set, please also set the environment variable 'vim_cv_tty_mode' to the correct mode (probably 0620)" "$LINENO" 5 + else + $as_echo "#define PTYMODE 0620" >>confdefs.h + +--- 11007,11013 ---- + _ACEOF + + if test "x$vim_cv_tty_mode" = "x" ; then +! as_fn_error $? "It seems you're cross compiling and have 'vim_cv_tty_group' set, please also set the environment variable 'vim_cv_tty_mode' to the correct mode (probably 0620)" "$LINENO" 5 + else + $as_echo "#define PTYMODE 0620" >>confdefs.h + +*************** +*** 10991,10997 **** + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5 + $as_echo_n "checking return type of signal handlers... " >&6; } +! if test "${ac_cv_type_signal+set}" = set; then : + $as_echo_n "(cached) " >&6 + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +--- 11017,11023 ---- + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5 + $as_echo_n "checking return type of signal handlers... " >&6; } +! if ${ac_cv_type_signal+:} false; then : + $as_echo_n "(cached) " >&6 + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +*************** +*** 11064,11076 **** + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking getcwd implementation is broken" >&5 + $as_echo_n "checking getcwd implementation is broken... " >&6; } +! if test "${vim_cv_getcwd_broken+set}" = set; then : + $as_echo_n "(cached) " >&6 + else + + if test "$cross_compiling" = yes; then : + +! as_fn_error "cross-compiling: please set 'vim_cv_getcwd_broken'" "$LINENO" 5 + + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +--- 11090,11102 ---- + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking getcwd implementation is broken" >&5 + $as_echo_n "checking getcwd implementation is broken... " >&6; } +! if ${vim_cv_getcwd_broken+:} false; then : + $as_echo_n "(cached) " >&6 + else + + if test "$cross_compiling" = yes; then : + +! as_fn_error $? "cross-compiling: please set 'vim_cv_getcwd_broken'" "$LINENO" 5 + + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +*************** +*** 11123,11130 **** + do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` + ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +! eval as_val=\$$as_ac_var +! if test "x$as_val" = x""yes; then : + cat >>confdefs.h <<_ACEOF + #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 + _ACEOF +--- 11149,11155 ---- + do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` + ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +! if eval test \"x\$"$as_ac_var"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF + #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 + _ACEOF +*************** +*** 11134,11140 **** + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5 + $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; } +! if test "${ac_cv_sys_largefile_source+set}" = set; then : + $as_echo_n "(cached) " >&6 + else + while :; do +--- 11159,11165 ---- + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5 + $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; } +! if ${ac_cv_sys_largefile_source+:} false; then : + $as_echo_n "(cached) " >&6 + else + while :; do +*************** +*** 11210,11216 **** + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 + $as_echo_n "checking for special C compiler options needed for large files... " >&6; } +! if test "${ac_cv_sys_largefile_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 + else + ac_cv_sys_largefile_CC=no +--- 11235,11241 ---- + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 + $as_echo_n "checking for special C compiler options needed for large files... " >&6; } +! if ${ac_cv_sys_largefile_CC+:} false; then : + $as_echo_n "(cached) " >&6 + else + ac_cv_sys_largefile_CC=no +*************** +*** 11261,11267 **** + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 + $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } +! if test "${ac_cv_sys_file_offset_bits+set}" = set; then : + $as_echo_n "(cached) " >&6 + else + while :; do +--- 11286,11292 ---- + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 + $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } +! if ${ac_cv_sys_file_offset_bits+:} false; then : + $as_echo_n "(cached) " >&6 + else + while :; do +*************** +*** 11330,11336 **** + if test $ac_cv_sys_file_offset_bits = unknown; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 + $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } +! if test "${ac_cv_sys_large_files+set}" = set; then : + $as_echo_n "(cached) " >&6 + else + while :; do +--- 11355,11361 ---- + if test $ac_cv_sys_file_offset_bits = unknown; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 + $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } +! if ${ac_cv_sys_large_files+:} false; then : + $as_echo_n "(cached) " >&6 + else + while :; do +*************** +*** 11397,11402 **** +--- 11422,11429 ---- + esac + rm -rf conftest* + fi ++ ++ + fi + + +*************** +*** 11430,11442 **** + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat() ignores a trailing slash" >&5 + $as_echo_n "checking whether stat() ignores a trailing slash... " >&6; } +! if test "${vim_cv_stat_ignores_slash+set}" = set; then : + $as_echo_n "(cached) " >&6 + else + + if test "$cross_compiling" = yes; then : + +! as_fn_error "cross-compiling: please set 'vim_cv_stat_ignores_slash'" "$LINENO" 5 + + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +--- 11457,11469 ---- + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat() ignores a trailing slash" >&5 + $as_echo_n "checking whether stat() ignores a trailing slash... " >&6; } +! if ${vim_cv_stat_ignores_slash+:} false; then : + $as_echo_n "(cached) " >&6 + else + + if test "$cross_compiling" = yes; then : + +! as_fn_error $? "cross-compiling: please set 'vim_cv_stat_ignores_slash'" "$LINENO" 5 + + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +*************** +*** 11560,11566 **** + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for strtod in -lm" >&5 + $as_echo_n "checking for strtod in -lm... " >&6; } +! if test "${ac_cv_lib_m_strtod+set}" = set; then : + $as_echo_n "(cached) " >&6 + else + ac_check_lib_save_LIBS=$LIBS +--- 11587,11593 ---- + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for strtod in -lm" >&5 + $as_echo_n "checking for strtod in -lm... " >&6; } +! if ${ac_cv_lib_m_strtod+:} false; then : + $as_echo_n "(cached) " >&6 + else + ac_check_lib_save_LIBS=$LIBS +*************** +*** 11594,11600 **** + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_strtod" >&5 + $as_echo "$ac_cv_lib_m_strtod" >&6; } +! if test "x$ac_cv_lib_m_strtod" = x""yes; then : + cat >>confdefs.h <<_ACEOF + #define HAVE_LIBM 1 + _ACEOF +--- 11621,11627 ---- + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_strtod" >&5 + $as_echo "$ac_cv_lib_m_strtod" >&6; } +! if test "x$ac_cv_lib_m_strtod" = xyes; then : + cat >>confdefs.h <<_ACEOF + #define HAVE_LIBM 1 + _ACEOF +*************** +*** 11660,11666 **** + $as_echo "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for acl_get_file in -lposix1e" >&5 + $as_echo_n "checking for acl_get_file in -lposix1e... " >&6; } +! if test "${ac_cv_lib_posix1e_acl_get_file+set}" = set; then : + $as_echo_n "(cached) " >&6 + else + ac_check_lib_save_LIBS=$LIBS +--- 11687,11693 ---- + $as_echo "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for acl_get_file in -lposix1e" >&5 + $as_echo_n "checking for acl_get_file in -lposix1e... " >&6; } +! if ${ac_cv_lib_posix1e_acl_get_file+:} false; then : + $as_echo_n "(cached) " >&6 + else + ac_check_lib_save_LIBS=$LIBS +*************** +*** 11694,11705 **** + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix1e_acl_get_file" >&5 + $as_echo "$ac_cv_lib_posix1e_acl_get_file" >&6; } +! if test "x$ac_cv_lib_posix1e_acl_get_file" = x""yes; then : + LIBS="$LIBS -lposix1e" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for acl_get_file in -lacl" >&5 + $as_echo_n "checking for acl_get_file in -lacl... " >&6; } +! if test "${ac_cv_lib_acl_acl_get_file+set}" = set; then : + $as_echo_n "(cached) " >&6 + else + ac_check_lib_save_LIBS=$LIBS +--- 11721,11732 ---- + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix1e_acl_get_file" >&5 + $as_echo "$ac_cv_lib_posix1e_acl_get_file" >&6; } +! if test "x$ac_cv_lib_posix1e_acl_get_file" = xyes; then : + LIBS="$LIBS -lposix1e" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for acl_get_file in -lacl" >&5 + $as_echo_n "checking for acl_get_file in -lacl... " >&6; } +! if ${ac_cv_lib_acl_acl_get_file+:} false; then : + $as_echo_n "(cached) " >&6 + else + ac_check_lib_save_LIBS=$LIBS +*************** +*** 11733,11743 **** + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_acl_acl_get_file" >&5 + $as_echo "$ac_cv_lib_acl_acl_get_file" >&6; } +! if test "x$ac_cv_lib_acl_acl_get_file" = x""yes; then : + LIBS="$LIBS -lacl" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgetxattr in -lattr" >&5 + $as_echo_n "checking for fgetxattr in -lattr... " >&6; } +! if test "${ac_cv_lib_attr_fgetxattr+set}" = set; then : + $as_echo_n "(cached) " >&6 + else + ac_check_lib_save_LIBS=$LIBS +--- 11760,11770 ---- + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_acl_acl_get_file" >&5 + $as_echo "$ac_cv_lib_acl_acl_get_file" >&6; } +! if test "x$ac_cv_lib_acl_acl_get_file" = xyes; then : + LIBS="$LIBS -lacl" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgetxattr in -lattr" >&5 + $as_echo_n "checking for fgetxattr in -lattr... " >&6; } +! if ${ac_cv_lib_attr_fgetxattr+:} false; then : + $as_echo_n "(cached) " >&6 + else + ac_check_lib_save_LIBS=$LIBS +*************** +*** 11771,11777 **** + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_attr_fgetxattr" >&5 + $as_echo "$ac_cv_lib_attr_fgetxattr" >&6; } +! if test "x$ac_cv_lib_attr_fgetxattr" = x""yes; then : + LIBS="$LIBS -lattr" + fi + +--- 11798,11804 ---- + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_attr_fgetxattr" >&5 + $as_echo "$ac_cv_lib_attr_fgetxattr" >&6; } +! if test "x$ac_cv_lib_attr_fgetxattr" = xyes; then : + LIBS="$LIBS -lattr" + fi + +*************** +*** 11813,11819 **** + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for acl_get in -lsec" >&5 + $as_echo_n "checking for acl_get in -lsec... " >&6; } +! if test "${ac_cv_lib_sec_acl_get+set}" = set; then : + $as_echo_n "(cached) " >&6 + else + ac_check_lib_save_LIBS=$LIBS +--- 11840,11846 ---- + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for acl_get in -lsec" >&5 + $as_echo_n "checking for acl_get in -lsec... " >&6; } +! if ${ac_cv_lib_sec_acl_get+:} false; then : + $as_echo_n "(cached) " >&6 + else + ac_check_lib_save_LIBS=$LIBS +*************** +*** 11847,11853 **** + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sec_acl_get" >&5 + $as_echo "$ac_cv_lib_sec_acl_get" >&6; } +! if test "x$ac_cv_lib_sec_acl_get" = x""yes; then : + LIBS="$LIBS -lsec"; $as_echo "#define HAVE_SOLARIS_ZFS_ACL 1" >>confdefs.h + + else +--- 11874,11880 ---- + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sec_acl_get" >&5 + $as_echo "$ac_cv_lib_sec_acl_get" >&6; } +! if test "x$ac_cv_lib_sec_acl_get" = xyes; then : + LIBS="$LIBS -lsec"; $as_echo "#define HAVE_SOLARIS_ZFS_ACL 1" >>confdefs.h + + else +*************** +*** 11943,11949 **** + $as_echo "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gpm" >&5 + $as_echo_n "checking for gpm... " >&6; } +! if test "${vi_cv_have_gpm+set}" = set; then : + $as_echo_n "(cached) " >&6 + else + olibs="$LIBS" ; LIBS="-lgpm" +--- 11970,11976 ---- + $as_echo "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gpm" >&5 + $as_echo_n "checking for gpm... " >&6; } +! if ${vi_cv_have_gpm+:} false; then : + $as_echo_n "(cached) " >&6 + else + olibs="$LIBS" ; LIBS="-lgpm" +*************** +*** 11996,12002 **** + $as_echo "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysmouse" >&5 + $as_echo_n "checking for sysmouse... " >&6; } +! if test "${vi_cv_have_sysmouse+set}" = set; then : + $as_echo_n "(cached) " >&6 + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +--- 12023,12029 ---- + $as_echo "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysmouse" >&5 + $as_echo_n "checking for sysmouse... " >&6; } +! if ${vi_cv_have_sysmouse+:} false; then : + $as_echo_n "(cached) " >&6 + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +*************** +*** 12202,12208 **** + # This bug is HP SR number 8606223364. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5 + $as_echo_n "checking size of int... " >&6; } +! if test "${ac_cv_sizeof_int+set}" = set; then : + $as_echo_n "(cached) " >&6 + else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"; then : +--- 12229,12235 ---- + # This bug is HP SR number 8606223364. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5 + $as_echo_n "checking size of int... " >&6; } +! if ${ac_cv_sizeof_int+:} false; then : + $as_echo_n "(cached) " >&6 + else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"; then : +*************** +*** 12211,12219 **** + if test "$ac_cv_type_int" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 + $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +! { as_fn_set_status 77 +! as_fn_error "cannot compute sizeof (int) +! See \`config.log' for more details." "$LINENO" 5; }; } + else + ac_cv_sizeof_int=0 + fi +--- 12238,12245 ---- + if test "$ac_cv_type_int" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 + $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +! as_fn_error 77 "cannot compute sizeof (int) +! See \`config.log' for more details" "$LINENO" 5; } + else + ac_cv_sizeof_int=0 + fi +*************** +*** 12236,12242 **** + # This bug is HP SR number 8606223364. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5 + $as_echo_n "checking size of long... " >&6; } +! if test "${ac_cv_sizeof_long+set}" = set; then : + $as_echo_n "(cached) " >&6 + else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then : +--- 12262,12268 ---- + # This bug is HP SR number 8606223364. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5 + $as_echo_n "checking size of long... " >&6; } +! if ${ac_cv_sizeof_long+:} false; then : + $as_echo_n "(cached) " >&6 + else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then : +*************** +*** 12245,12253 **** + if test "$ac_cv_type_long" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 + $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +! { as_fn_set_status 77 +! as_fn_error "cannot compute sizeof (long) +! See \`config.log' for more details." "$LINENO" 5; }; } + else + ac_cv_sizeof_long=0 + fi +--- 12271,12278 ---- + if test "$ac_cv_type_long" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 + $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +! as_fn_error 77 "cannot compute sizeof (long) +! See \`config.log' for more details" "$LINENO" 5; } + else + ac_cv_sizeof_long=0 + fi +*************** +*** 12270,12276 **** + # This bug is HP SR number 8606223364. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5 + $as_echo_n "checking size of time_t... " >&6; } +! if test "${ac_cv_sizeof_time_t+set}" = set; then : + $as_echo_n "(cached) " >&6 + else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "$ac_includes_default"; then : +--- 12295,12301 ---- + # This bug is HP SR number 8606223364. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5 + $as_echo_n "checking size of time_t... " >&6; } +! if ${ac_cv_sizeof_time_t+:} false; then : + $as_echo_n "(cached) " >&6 + else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "$ac_includes_default"; then : +*************** +*** 12279,12287 **** + if test "$ac_cv_type_time_t" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 + $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +! { as_fn_set_status 77 +! as_fn_error "cannot compute sizeof (time_t) +! See \`config.log' for more details." "$LINENO" 5; }; } + else + ac_cv_sizeof_time_t=0 + fi +--- 12304,12311 ---- + if test "$ac_cv_type_time_t" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 + $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +! as_fn_error 77 "cannot compute sizeof (time_t) +! See \`config.log' for more details" "$LINENO" 5; } + else + ac_cv_sizeof_time_t=0 + fi +*************** +*** 12304,12310 **** + # This bug is HP SR number 8606223364. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5 + $as_echo_n "checking size of off_t... " >&6; } +! if test "${ac_cv_sizeof_off_t+set}" = set; then : + $as_echo_n "(cached) " >&6 + else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "$ac_includes_default"; then : +--- 12328,12334 ---- + # This bug is HP SR number 8606223364. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5 + $as_echo_n "checking size of off_t... " >&6; } +! if ${ac_cv_sizeof_off_t+:} false; then : + $as_echo_n "(cached) " >&6 + else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "$ac_includes_default"; then : +*************** +*** 12313,12321 **** + if test "$ac_cv_type_off_t" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 + $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +! { as_fn_set_status 77 +! as_fn_error "cannot compute sizeof (off_t) +! See \`config.log' for more details." "$LINENO" 5; }; } + else + ac_cv_sizeof_off_t=0 + fi +--- 12337,12344 ---- + if test "$ac_cv_type_off_t" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 + $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +! as_fn_error 77 "cannot compute sizeof (off_t) +! See \`config.log' for more details" "$LINENO" 5; } + else + ac_cv_sizeof_off_t=0 + fi +*************** +*** 12368,12374 **** + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 + $as_echo "ok" >&6; } + else +! as_fn_error "WRONG! uint32_t not defined correctly." "$LINENO" 5 + fi + rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +--- 12391,12397 ---- + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 + $as_echo "ok" >&6; } + else +! as_fn_error $? "WRONG! uint32_t not defined correctly." "$LINENO" 5 + fi + rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +*************** +*** 12400,12412 **** + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmove handles overlaps" >&5 + $as_echo_n "checking whether memmove handles overlaps... " >&6; } +! if test "${vim_cv_memmove_handles_overlap+set}" = set; then : + $as_echo_n "(cached) " >&6 + else + + if test "$cross_compiling" = yes; then : + +! as_fn_error "cross-compiling: please set 'vim_cv_memmove_handles_overlap'" "$LINENO" 5 + + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +--- 12423,12435 ---- + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmove handles overlaps" >&5 + $as_echo_n "checking whether memmove handles overlaps... " >&6; } +! if ${vim_cv_memmove_handles_overlap+:} false; then : + $as_echo_n "(cached) " >&6 + else + + if test "$cross_compiling" = yes; then : + +! as_fn_error $? "cross-compiling: please set 'vim_cv_memmove_handles_overlap'" "$LINENO" 5 + + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +*************** +*** 12437,12449 **** + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether bcopy handles overlaps" >&5 + $as_echo_n "checking whether bcopy handles overlaps... " >&6; } +! if test "${vim_cv_bcopy_handles_overlap+set}" = set; then : + $as_echo_n "(cached) " >&6 + else + + if test "$cross_compiling" = yes; then : + +! as_fn_error "cross-compiling: please set 'vim_cv_bcopy_handles_overlap'" "$LINENO" 5 + + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +--- 12460,12472 ---- + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether bcopy handles overlaps" >&5 + $as_echo_n "checking whether bcopy handles overlaps... " >&6; } +! if ${vim_cv_bcopy_handles_overlap+:} false; then : + $as_echo_n "(cached) " >&6 + else + + if test "$cross_compiling" = yes; then : + +! as_fn_error $? "cross-compiling: please set 'vim_cv_bcopy_handles_overlap'" "$LINENO" 5 + + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +*************** +*** 12474,12486 **** + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memcpy handles overlaps" >&5 + $as_echo_n "checking whether memcpy handles overlaps... " >&6; } +! if test "${vim_cv_memcpy_handles_overlap+set}" = set; then : + $as_echo_n "(cached) " >&6 + else + + if test "$cross_compiling" = yes; then : + +! as_fn_error "cross-compiling: please set 'vim_cv_memcpy_handles_overlap'" "$LINENO" 5 + + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +--- 12497,12509 ---- + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memcpy handles overlaps" >&5 + $as_echo_n "checking whether memcpy handles overlaps... " >&6; } +! if ${vim_cv_memcpy_handles_overlap+:} false; then : + $as_echo_n "(cached) " >&6 + else + + if test "$cross_compiling" = yes; then : + +! as_fn_error $? "cross-compiling: please set 'vim_cv_memcpy_handles_overlap'" "$LINENO" 5 + + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +*************** +*** 12575,12581 **** + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _xpg4_setrunelocale in -lxpg4" >&5 + $as_echo_n "checking for _xpg4_setrunelocale in -lxpg4... " >&6; } +! if test "${ac_cv_lib_xpg4__xpg4_setrunelocale+set}" = set; then : + $as_echo_n "(cached) " >&6 + else + ac_check_lib_save_LIBS=$LIBS +--- 12598,12604 ---- + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _xpg4_setrunelocale in -lxpg4" >&5 + $as_echo_n "checking for _xpg4_setrunelocale in -lxpg4... " >&6; } +! if ${ac_cv_lib_xpg4__xpg4_setrunelocale+:} false; then : + $as_echo_n "(cached) " >&6 + else + ac_check_lib_save_LIBS=$LIBS +*************** +*** 12609,12615 **** + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xpg4__xpg4_setrunelocale" >&5 + $as_echo "$ac_cv_lib_xpg4__xpg4_setrunelocale" >&6; } +! if test "x$ac_cv_lib_xpg4__xpg4_setrunelocale" = x""yes; then : + LIBS="$LIBS -lxpg4" + fi + +--- 12632,12638 ---- + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xpg4__xpg4_setrunelocale" >&5 + $as_echo "$ac_cv_lib_xpg4__xpg4_setrunelocale" >&6; } +! if test "x$ac_cv_lib_xpg4__xpg4_setrunelocale" = xyes; then : + LIBS="$LIBS -lxpg4" + fi + +*************** +*** 12671,12677 **** + set dummy msgfmt; ac_word=$2 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 + $as_echo_n "checking for $ac_word... " >&6; } +! if test "${ac_cv_prog_MSGFMT+set}" = set; then : + $as_echo_n "(cached) " >&6 + else + if test -n "$MSGFMT"; then +--- 12694,12700 ---- + set dummy msgfmt; ac_word=$2 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 + $as_echo_n "checking for $ac_word... " >&6; } +! if ${ac_cv_prog_MSGFMT+:} false; then : + $as_echo_n "(cached) " >&6 + else + if test -n "$MSGFMT"; then +*************** +*** 12683,12689 **** + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do +! if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_MSGFMT="msgfmt" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 +--- 12706,12712 ---- + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do +! if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_MSGFMT="msgfmt" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 +*************** +*** 12764,12770 **** + for ac_func in bind_textdomain_codeset + do : + ac_fn_c_check_func "$LINENO" "bind_textdomain_codeset" "ac_cv_func_bind_textdomain_codeset" +! if test "x$ac_cv_func_bind_textdomain_codeset" = x""yes; then : + cat >>confdefs.h <<_ACEOF + #define HAVE_BIND_TEXTDOMAIN_CODESET 1 + _ACEOF +--- 12787,12793 ---- + for ac_func in bind_textdomain_codeset + do : + ac_fn_c_check_func "$LINENO" "bind_textdomain_codeset" "ac_cv_func_bind_textdomain_codeset" +! if test "x$ac_cv_func_bind_textdomain_codeset" = xyes; then : + cat >>confdefs.h <<_ACEOF + #define HAVE_BIND_TEXTDOMAIN_CODESET 1 + _ACEOF +*************** +*** 12807,12817 **** + fi + + ac_fn_c_check_header_mongrel "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default" +! if test "x$ac_cv_header_dlfcn_h" = x""yes; then : + DLL=dlfcn.h + else + ac_fn_c_check_header_mongrel "$LINENO" "dl.h" "ac_cv_header_dl_h" "$ac_includes_default" +! if test "x$ac_cv_header_dl_h" = x""yes; then : + DLL=dl.h + fi + +--- 12830,12840 ---- + fi + + ac_fn_c_check_header_mongrel "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default" +! if test "x$ac_cv_header_dlfcn_h" = xyes; then : + DLL=dlfcn.h + else + ac_fn_c_check_header_mongrel "$LINENO" "dl.h" "ac_cv_header_dl_h" "$ac_includes_default" +! if test "x$ac_cv_header_dl_h" = xyes; then : + DLL=dl.h + fi + +*************** +*** 13008,13014 **** + for ac_header in setjmp.h + do : + ac_fn_c_check_header_mongrel "$LINENO" "setjmp.h" "ac_cv_header_setjmp_h" "$ac_includes_default" +! if test "x$ac_cv_header_setjmp_h" = x""yes; then : + cat >>confdefs.h <<_ACEOF + #define HAVE_SETJMP_H 1 + _ACEOF +--- 13031,13037 ---- + for ac_header in setjmp.h + do : + ac_fn_c_check_header_mongrel "$LINENO" "setjmp.h" "ac_cv_header_setjmp_h" "$ac_includes_default" +! if test "x$ac_cv_header_setjmp_h" = xyes; then : + cat >>confdefs.h <<_ACEOF + #define HAVE_SETJMP_H 1 + _ACEOF +*************** +*** 13159,13168 **** + :end' >>confcache + if diff "$cache_file" confcache >/dev/null 2>&1; then :; else + if test -w "$cache_file"; then +! test "x$cache_file" != "x/dev/null" && + { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 + $as_echo "$as_me: updating cache $cache_file" >&6;} +! cat confcache >$cache_file + else + { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 + $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} +--- 13182,13202 ---- + :end' >>confcache + if diff "$cache_file" confcache >/dev/null 2>&1; then :; else + if test -w "$cache_file"; then +! if test "x$cache_file" != "x/dev/null"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 + $as_echo "$as_me: updating cache $cache_file" >&6;} +! if test ! -f "$cache_file" || test -h "$cache_file"; then +! cat confcache >"$cache_file" +! else +! case $cache_file in #( +! */* | ?:*) +! mv -f confcache "$cache_file"$$ && +! mv -f "$cache_file"$$ "$cache_file" ;; #( +! *) +! mv -f confcache "$cache_file" ;; +! esac +! fi +! fi + else + { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 + $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} +*************** +*** 13178,13183 **** +--- 13212,13218 ---- + + ac_libobjs= + ac_ltlibobjs= ++ U= + for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue + # 1. Remove the extension, and $U if already installed. + ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' +*************** +*** 13194,13200 **** + + + +! : ${CONFIG_STATUS=./config.status} + ac_write_fail=0 + ac_clean_files_save=$ac_clean_files + ac_clean_files="$ac_clean_files $CONFIG_STATUS" +--- 13229,13235 ---- + + + +! : "${CONFIG_STATUS=./config.status}" + ac_write_fail=0 + ac_clean_files_save=$ac_clean_files + ac_clean_files="$ac_clean_files $CONFIG_STATUS" +*************** +*** 13295,13300 **** +--- 13330,13336 ---- + IFS=" "" $as_nl" + + # Find who we are. Look in the path if we contain no directory separator. ++ as_myself= + case $0 in #(( + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +*************** +*** 13340,13358 **** + (unset CDPATH) >/dev/null 2>&1 && unset CDPATH + + +! # as_fn_error ERROR [LINENO LOG_FD] +! # --------------------------------- + # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are + # provided, also output the error to LOG_FD, referencing LINENO. Then exit the +! # script with status $?, using 1 if that was 0. + as_fn_error () + { +! as_status=$?; test $as_status -eq 0 && as_status=1 +! if test "$3"; then +! as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack +! $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 + fi +! $as_echo "$as_me: error: $1" >&2 + as_fn_exit $as_status + } # as_fn_error + +--- 13376,13394 ---- + (unset CDPATH) >/dev/null 2>&1 && unset CDPATH + + +! # as_fn_error STATUS ERROR [LINENO LOG_FD] +! # ---------------------------------------- + # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are + # provided, also output the error to LOG_FD, referencing LINENO. Then exit the +! # script with STATUS, using 1 if that was 0. + as_fn_error () + { +! as_status=$1; test $as_status -eq 0 && as_status=1 +! if test "$4"; then +! as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack +! $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + fi +! $as_echo "$as_me: error: $2" >&2 + as_fn_exit $as_status + } # as_fn_error + +*************** +*** 13490,13505 **** + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. +! # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || +! as_ln_s='cp -p' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else +! as_ln_s='cp -p' + fi + else +! as_ln_s='cp -p' + fi + rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file + rmdir conf$$.dir 2>/dev/null +--- 13526,13541 ---- + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. +! # In both cases, we have to default to `cp -pR'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || +! as_ln_s='cp -pR' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else +! as_ln_s='cp -pR' + fi + else +! as_ln_s='cp -pR' + fi + rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file + rmdir conf$$.dir 2>/dev/null +*************** +*** 13548,13554 **** + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" +! } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" + + + } # as_fn_mkdir_p +--- 13584,13590 ---- + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" +! } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" + + + } # as_fn_mkdir_p +*************** +*** 13559,13586 **** + as_mkdir_p=false + fi + +! if test -x / >/dev/null 2>&1; then +! as_test_x='test -x' +! else +! if ls -dL / >/dev/null 2>&1; then +! as_ls_L_option=L +! else +! as_ls_L_option= +! fi +! as_test_x=' +! eval sh -c '\'' +! if test -d "$1"; then +! test -d "$1/."; +! else +! case $1 in #( +! -*)set "./$1";; +! esac; +! case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( +! ???[sx]*):;;*)false;;esac;fi +! '\'' sh +! ' +! fi +! as_executable_p=$as_test_x + + # Sed expression to map a string onto a valid CPP name. + as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" +--- 13595,13610 ---- + as_mkdir_p=false + fi + +! +! # as_fn_executable_p FILE +! # ----------------------- +! # Test if FILE is an executable regular file. +! as_fn_executable_p () +! { +! test -f "$1" && test -x "$1" +! } # as_fn_executable_p +! as_test_x='test -x' +! as_executable_p=as_fn_executable_p + + # Sed expression to map a string onto a valid CPP name. + as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" +*************** +*** 13602,13608 **** + # values after options handling. + ac_log=" + This file was extended by $as_me, which was +! generated by GNU Autoconf 2.65. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES + CONFIG_HEADERS = $CONFIG_HEADERS +--- 13626,13632 ---- + # values after options handling. + ac_log=" + This file was extended by $as_me, which was +! generated by GNU Autoconf 2.69. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES + CONFIG_HEADERS = $CONFIG_HEADERS +*************** +*** 13664,13673 **** + ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" + ac_cs_version="\\ + config.status +! configured by $0, generated by GNU Autoconf 2.65, + with options \\"\$ac_cs_config\\" + +! Copyright (C) 2009 Free Software Foundation, Inc. + This config.status script is free software; the Free Software Foundation + gives unlimited permission to copy, distribute and modify it." + +--- 13688,13697 ---- + ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" + ac_cs_version="\\ + config.status +! configured by $0, generated by GNU Autoconf 2.69, + with options \\"\$ac_cs_config\\" + +! Copyright (C) 2012 Free Software Foundation, Inc. + This config.status script is free software; the Free Software Foundation + gives unlimited permission to copy, distribute and modify it." + +*************** +*** 13683,13693 **** + while test $# != 0 + do + case $1 in +! --*=*) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` + ac_shift=: + ;; + *) + ac_option=$1 + ac_optarg=$2 +--- 13707,13722 ---- + while test $# != 0 + do + case $1 in +! --*=?*) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` + ac_shift=: + ;; ++ --*=) ++ ac_option=`expr "X$1" : 'X\([^=]*\)='` ++ ac_optarg= ++ ac_shift=: ++ ;; + *) + ac_option=$1 + ac_optarg=$2 +*************** +*** 13709,13714 **** +--- 13738,13744 ---- + $ac_shift + case $ac_optarg in + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; ++ '') as_fn_error $? "missing file argument" ;; + esac + as_fn_append CONFIG_FILES " '$ac_optarg'" + ac_need_defaults=false;; +*************** +*** 13721,13727 **** + ac_need_defaults=false;; + --he | --h) + # Conflict between --help and --header +! as_fn_error "ambiguous option: \`$1' + Try \`$0 --help' for more information.";; + --help | --hel | -h ) + $as_echo "$ac_cs_usage"; exit ;; +--- 13751,13757 ---- + ac_need_defaults=false;; + --he | --h) + # Conflict between --help and --header +! as_fn_error $? "ambiguous option: \`$1' + Try \`$0 --help' for more information.";; + --help | --hel | -h ) + $as_echo "$ac_cs_usage"; exit ;; +*************** +*** 13730,13736 **** + ac_cs_silent=: ;; + + # This is an error. +! -*) as_fn_error "unrecognized option: \`$1' + Try \`$0 --help' for more information." ;; + + *) as_fn_append ac_config_targets " $1" +--- 13760,13766 ---- + ac_cs_silent=: ;; + + # This is an error. +! -*) as_fn_error $? "unrecognized option: \`$1' + Try \`$0 --help' for more information." ;; + + *) as_fn_append ac_config_targets " $1" +*************** +*** 13750,13756 **** + _ACEOF + cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + if \$ac_cs_recheck; then +! set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + shift + \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 + CONFIG_SHELL='$SHELL' +--- 13780,13786 ---- + _ACEOF + cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + if \$ac_cs_recheck; then +! set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + shift + \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 + CONFIG_SHELL='$SHELL' +*************** +*** 13782,13788 **** + "auto/config.h") CONFIG_HEADERS="$CONFIG_HEADERS auto/config.h:config.h.in" ;; + "auto/config.mk") CONFIG_FILES="$CONFIG_FILES auto/config.mk:config.mk.in" ;; + +! *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;; + esac + done + +--- 13812,13818 ---- + "auto/config.h") CONFIG_HEADERS="$CONFIG_HEADERS auto/config.h:config.h.in" ;; + "auto/config.mk") CONFIG_FILES="$CONFIG_FILES auto/config.mk:config.mk.in" ;; + +! *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; + esac + done + +*************** +*** 13804,13812 **** + # after its creation but before its name has been assigned to `$tmp'. + $debug || + { +! tmp= + trap 'exit_status=$? +! { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status + ' 0 + trap 'as_fn_exit 1' 1 2 13 15 + } +--- 13834,13843 ---- + # after its creation but before its name has been assigned to `$tmp'. + $debug || + { +! tmp= ac_tmp= + trap 'exit_status=$? +! : "${ac_tmp:=$tmp}" +! { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status + ' 0 + trap 'as_fn_exit 1' 1 2 13 15 + } +*************** +*** 13814,13825 **** + + { + tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && +! test -n "$tmp" && test -d "$tmp" + } || + { + tmp=./conf$$-$RANDOM + (umask 077 && mkdir "$tmp") +! } || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5 + + # Set up the scripts for CONFIG_FILES section. + # No need to generate them if there are no CONFIG_FILES. +--- 13845,13857 ---- + + { + tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && +! test -d "$tmp" + } || + { + tmp=./conf$$-$RANDOM + (umask 077 && mkdir "$tmp") +! } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 +! ac_tmp=$tmp + + # Set up the scripts for CONFIG_FILES section. + # No need to generate them if there are no CONFIG_FILES. +*************** +*** 13836,13847 **** + fi + ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null` + if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then +! ac_cs_awk_cr='\r' + else + ac_cs_awk_cr=$ac_cr + fi + +! echo 'BEGIN {' >"$tmp/subs1.awk" && + _ACEOF + + +--- 13868,13879 ---- + fi + ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null` + if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then +! ac_cs_awk_cr='\\r' + else + ac_cs_awk_cr=$ac_cr + fi + +! echo 'BEGIN {' >"$ac_tmp/subs1.awk" && + _ACEOF + + +*************** +*** 13850,13867 **** + echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && + echo "_ACEOF" + } >conf$$subs.sh || +! as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 +! ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` + ac_delim='%!_!# ' + for ac_last_try in false false false false false :; do + . ./conf$$subs.sh || +! as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 + + ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` + if test $ac_delim_n = $ac_delim_num; then + break + elif $ac_last_try; then +! as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +--- 13882,13899 ---- + echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && + echo "_ACEOF" + } >conf$$subs.sh || +! as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 +! ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` + ac_delim='%!_!# ' + for ac_last_try in false false false false false :; do + . ./conf$$subs.sh || +! as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 + + ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` + if test $ac_delim_n = $ac_delim_num; then + break + elif $ac_last_try; then +! as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +*************** +*** 13869,13875 **** + rm -f conf$$subs.sh + + cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +! cat >>"\$tmp/subs1.awk" <<\\_ACAWK && + _ACEOF + sed -n ' + h +--- 13901,13907 ---- + rm -f conf$$subs.sh + + cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +! cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && + _ACEOF + sed -n ' + h +*************** +*** 13917,13923 **** + rm -f conf$$subs.awk + cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + _ACAWK +! cat >>"\$tmp/subs1.awk" <<_ACAWK && + for (key in S) S_is_set[key] = 1 + FS = "" + +--- 13949,13955 ---- + rm -f conf$$subs.awk + cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + _ACAWK +! cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && + for (key in S) S_is_set[key] = 1 + FS = "" + +*************** +*** 13949,13969 **** + sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" + else + cat +! fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ +! || as_fn_error "could not setup config files machinery" "$LINENO" 5 + _ACEOF + +! # VPATH may cause trouble with some makes, so we remove $(srcdir), +! # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and + # trailing colons and then remove the whole line if VPATH becomes empty + # (actually we leave an empty line to preserve line numbers). + if test "x$srcdir" = x.; then +! ac_vpsub='/^[ ]*VPATH[ ]*=/{ +! s/:*\$(srcdir):*/:/ +! s/:*\${srcdir}:*/:/ +! s/:*@srcdir@:*/:/ +! s/^\([^=]*=[ ]*\):*/\1/ + s/:*$// + s/^[^=]*=[ ]*$// + }' + fi +--- 13981,14009 ---- + sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" + else + cat +! fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ +! || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 + _ACEOF + +! # VPATH may cause trouble with some makes, so we remove sole $(srcdir), +! # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and + # trailing colons and then remove the whole line if VPATH becomes empty + # (actually we leave an empty line to preserve line numbers). + if test "x$srcdir" = x.; then +! ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ +! h +! s/// +! s/^/:/ +! s/[ ]*$/:/ +! s/:\$(srcdir):/:/g +! s/:\${srcdir}:/:/g +! s/:@srcdir@:/:/g +! s/^:*// + s/:*$// ++ x ++ s/\(=[ ]*\).*/\1/ ++ G ++ s/\n// + s/^[^=]*=[ ]*$// + }' + fi +*************** +*** 13975,13981 **** + # No need to generate them if there are no CONFIG_HEADERS. + # This happens for instance with `./config.status Makefile'. + if test -n "$CONFIG_HEADERS"; then +! cat >"$tmp/defines.awk" <<\_ACAWK || + BEGIN { + _ACEOF + +--- 14015,14021 ---- + # No need to generate them if there are no CONFIG_HEADERS. + # This happens for instance with `./config.status Makefile'. + if test -n "$CONFIG_HEADERS"; then +! cat >"$ac_tmp/defines.awk" <<\_ACAWK || + BEGIN { + _ACEOF + +*************** +*** 13987,13997 **** + # handling of long lines. + ac_delim='%!_!# ' + for ac_last_try in false false :; do +! ac_t=`sed -n "/$ac_delim/p" confdefs.h` +! if test -z "$ac_t"; then + break + elif $ac_last_try; then +! as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5 + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +--- 14027,14037 ---- + # handling of long lines. + ac_delim='%!_!# ' + for ac_last_try in false false :; do +! ac_tt=`sed -n "/$ac_delim/p" confdefs.h` +! if test -z "$ac_tt"; then + break + elif $ac_last_try; then +! as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +*************** +*** 14076,14082 **** + _ACAWK + _ACEOF + cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +! as_fn_error "could not setup config headers machinery" "$LINENO" 5 + fi # test -n "$CONFIG_HEADERS" + + +--- 14116,14122 ---- + _ACAWK + _ACEOF + cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +! as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 + fi # test -n "$CONFIG_HEADERS" + + +*************** +*** 14089,14095 **** + esac + case $ac_mode$ac_tag in + :[FHL]*:*);; +! :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;; + :[FH]-) ac_tag=-:-;; + :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; + esac +--- 14129,14135 ---- + esac + case $ac_mode$ac_tag in + :[FHL]*:*);; +! :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; + :[FH]-) ac_tag=-:-;; + :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; + esac +*************** +*** 14108,14114 **** + for ac_f + do + case $ac_f in +! -) ac_f="$tmp/stdin";; + *) # Look for the file first in the build tree, then in the source tree + # (if the path is not absolute). The absolute path cannot be DOS-style, + # because $ac_f cannot contain `:'. +--- 14148,14154 ---- + for ac_f + do + case $ac_f in +! -) ac_f="$ac_tmp/stdin";; + *) # Look for the file first in the build tree, then in the source tree + # (if the path is not absolute). The absolute path cannot be DOS-style, + # because $ac_f cannot contain `:'. +*************** +*** 14117,14123 **** + [\\/$]*) false;; + *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; + esac || +! as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;; + esac + case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac + as_fn_append ac_file_inputs " '$ac_f'" +--- 14157,14163 ---- + [\\/$]*) false;; + *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; + esac || +! as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; + esac + case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac + as_fn_append ac_file_inputs " '$ac_f'" +*************** +*** 14143,14150 **** + esac + + case $ac_tag in +! *:-:* | *:-) cat >"$tmp/stdin" \ +! || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; + esac + ;; + esac +--- 14183,14190 ---- + esac + + case $ac_tag in +! *:-:* | *:-) cat >"$ac_tmp/stdin" \ +! || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; + esac + ;; + esac +*************** +*** 14269,14291 **** + s&@abs_top_builddir@&$ac_abs_top_builddir&;t t + $ac_datarootdir_hack + " +! eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ +! || as_fn_error "could not create $ac_file" "$LINENO" 5 + + test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && +! { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && +! { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' +! which seems to be undefined. Please make sure it is defined." >&5 + $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +! which seems to be undefined. Please make sure it is defined." >&2;} + +! rm -f "$tmp/stdin" + case $ac_file in +! -) cat "$tmp/out" && rm -f "$tmp/out";; +! *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; + esac \ +! || as_fn_error "could not create $ac_file" "$LINENO" 5 + ;; + :H) + # +--- 14309,14332 ---- + s&@abs_top_builddir@&$ac_abs_top_builddir&;t t + $ac_datarootdir_hack + " +! eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ +! >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + + test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && +! { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && +! { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ +! "$ac_tmp/out"`; test -z "$ac_out"; } && + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' +! which seems to be undefined. Please make sure it is defined" >&5 + $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +! which seems to be undefined. Please make sure it is defined" >&2;} + +! rm -f "$ac_tmp/stdin" + case $ac_file in +! -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; +! *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; + esac \ +! || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + ;; + :H) + # +*************** +*** 14294,14314 **** + if test x"$ac_file" != x-; then + { + $as_echo "/* $configure_input */" \ +! && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" +! } >"$tmp/config.h" \ +! || as_fn_error "could not create $ac_file" "$LINENO" 5 +! if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then + { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 + $as_echo "$as_me: $ac_file is unchanged" >&6;} + else + rm -f "$ac_file" +! mv "$tmp/config.h" "$ac_file" \ +! || as_fn_error "could not create $ac_file" "$LINENO" 5 + fi + else + $as_echo "/* $configure_input */" \ +! && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ +! || as_fn_error "could not create -" "$LINENO" 5 + fi + ;; + +--- 14335,14355 ---- + if test x"$ac_file" != x-; then + { + $as_echo "/* $configure_input */" \ +! && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" +! } >"$ac_tmp/config.h" \ +! || as_fn_error $? "could not create $ac_file" "$LINENO" 5 +! if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then + { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 + $as_echo "$as_me: $ac_file is unchanged" >&6;} + else + rm -f "$ac_file" +! mv "$ac_tmp/config.h" "$ac_file" \ +! || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + fi + else + $as_echo "/* $configure_input */" \ +! && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ +! || as_fn_error $? "could not create -" "$LINENO" 5 + fi + ;; + +*************** +*** 14323,14329 **** + ac_clean_files=$ac_clean_files_save + + test $ac_write_fail = 0 || +! as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5 + + + # configure is writing to config.log, and then calls config.status. +--- 14364,14370 ---- + ac_clean_files=$ac_clean_files_save + + test $ac_write_fail = 0 || +! as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 + + + # configure is writing to config.log, and then calls config.status. +*************** +*** 14344,14350 **** + exec 5>>auto/config.log + # Use ||, not &&, to avoid exiting from the if with $? = 1, which + # would make configure fail if this is the last instruction. +! $ac_cs_success || as_fn_exit $? + fi + if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 +--- 14385,14391 ---- + exec 5>>auto/config.log + # Use ||, not &&, to avoid exiting from the if with $? = 1, which + # would make configure fail if this is the last instruction. +! $ac_cs_success || as_fn_exit 1 + fi + if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 +*** ../vim-7.4.222/src/version.c 2014-03-27 17:19:05.868676325 +0100 +--- src/version.c 2014-03-27 17:37:52.608693590 +0100 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 223, + /**/ + +-- +For humans, honesty is a matter of degree. Engineers are always honest in +matters of technology and human relationships. That's why it's a good idea +to keep engineers away from customers, romantic interests, and other people +who can't handle the truth. + (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/patches/source/vim/patches/7.4.224 b/patches/source/vim/patches/7.4.224 new file mode 100644 index 000000000..977cd82cd --- /dev/null +++ b/patches/source/vim/patches/7.4.224 @@ -0,0 +1,210 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.224 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.224 +Problem: /usr/bin/grep on Solaris does not support -F. +Solution: Add configure check to find a good grep. (Danek Duvall) +Files: src/configure.in, src/auto/configure + + +*** ../vim-7.4.223/src/configure.in 2014-03-27 17:40:53.384696360 +0100 +--- src/configure.in 2014-03-27 18:49:24.900759361 +0100 +*************** +*** 14,19 **** +--- 14,20 ---- + AC_PROG_CC dnl required by almost everything + AC_PROG_CPP dnl required by header file checks + AC_PROGRAM_EGREP dnl required by AC_EGREP_CPP ++ AC_PROG_FGREP dnl finds working grep -F + AC_ISC_POSIX dnl required by AC_C_CROSS + AC_PROG_AWK dnl required for "make html" in ../doc + +*************** +*** 936,942 **** + PERL_CFLAGS=`echo "$perlcppflags" | sed -e 's/-pipe //' -e 's/-W[[^ ]]*//'` + fi + if test "X$perlldflags" != "X"; then +! if test "X`echo \"$LDFLAGS\" | grep -F -e \"$perlldflags\"`" = "X"; then + LDFLAGS="$perlldflags $LDFLAGS" + fi + fi +--- 937,943 ---- + PERL_CFLAGS=`echo "$perlcppflags" | sed -e 's/-pipe //' -e 's/-W[[^ ]]*//'` + fi + if test "X$perlldflags" != "X"; then +! if test "X`echo \"$LDFLAGS\" | $FGREP -e \"$perlldflags\"`" = "X"; then + LDFLAGS="$perlldflags $LDFLAGS" + fi + fi +*************** +*** 1727,1733 **** + dnl configure, so strip these flags first (if present) + rubyldflags=`echo "$rubyldflags" | sed -e 's/-arch\ ppc//' -e 's/-arch\ i386//' -e 's/-arch\ x86_64//'` + if test "X$rubyldflags" != "X"; then +! if test "X`echo \"$LDFLAGS\" | grep -F -e \"$rubyldflags\"`" = "X"; then + LDFLAGS="$rubyldflags $LDFLAGS" + fi + fi +--- 1728,1734 ---- + dnl configure, so strip these flags first (if present) + rubyldflags=`echo "$rubyldflags" | sed -e 's/-arch\ ppc//' -e 's/-arch\ i386//' -e 's/-arch\ x86_64//'` + if test "X$rubyldflags" != "X"; then +! if test "X`echo \"$LDFLAGS\" | $FGREP -e \"$rubyldflags\"`" = "X"; then + LDFLAGS="$rubyldflags $LDFLAGS" + fi + fi +*** ../vim-7.4.223/src/auto/configure 2014-03-27 17:40:53.396696361 +0100 +--- src/auto/configure 2014-03-27 18:49:34.356759506 +0100 +*************** +*** 719,724 **** +--- 719,725 ---- + CPP_MM + STRIP + AWK ++ FGREP + EGREP + GREP + CPP +*************** +*** 3695,3701 **** + + fi + rm -f conftest* +! { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing strerror" >&5 + $as_echo_n "checking for library containing strerror... " >&6; } + if ${ac_cv_search_strerror+:} false; then : + $as_echo_n "(cached) " >&6 +--- 3696,3768 ---- + + fi + rm -f conftest* +! { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 +! $as_echo_n "checking for fgrep... " >&6; } +! if ${ac_cv_path_FGREP+:} false; then : +! $as_echo_n "(cached) " >&6 +! else +! if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 +! then ac_cv_path_FGREP="$GREP -F" +! else +! if test -z "$FGREP"; then +! ac_path_FGREP_found=false +! # Loop through the user's path and test for each of PROGNAME-LIST +! as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +! for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +! do +! IFS=$as_save_IFS +! test -z "$as_dir" && as_dir=. +! for ac_prog in fgrep; do +! for ac_exec_ext in '' $ac_executable_extensions; do +! ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" +! as_fn_executable_p "$ac_path_FGREP" || continue +! # Check for GNU ac_path_FGREP and select it if it is found. +! # Check for GNU $ac_path_FGREP +! case `"$ac_path_FGREP" --version 2>&1` in +! *GNU*) +! ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; +! *) +! ac_count=0 +! $as_echo_n 0123456789 >"conftest.in" +! while : +! do +! cat "conftest.in" "conftest.in" >"conftest.tmp" +! mv "conftest.tmp" "conftest.in" +! cp "conftest.in" "conftest.nl" +! $as_echo 'FGREP' >> "conftest.nl" +! "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break +! diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break +! as_fn_arith $ac_count + 1 && ac_count=$as_val +! if test $ac_count -gt ${ac_path_FGREP_max-0}; then +! # Best one so far, save it but keep looking for a better one +! ac_cv_path_FGREP="$ac_path_FGREP" +! ac_path_FGREP_max=$ac_count +! fi +! # 10*(2^10) chars as input seems more than enough +! test $ac_count -gt 10 && break +! done +! rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +! esac +! +! $ac_path_FGREP_found && break 3 +! done +! done +! done +! IFS=$as_save_IFS +! if test -z "$ac_cv_path_FGREP"; then +! as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 +! fi +! else +! ac_cv_path_FGREP=$FGREP +! fi +! +! fi +! fi +! { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 +! $as_echo "$ac_cv_path_FGREP" >&6; } +! FGREP="$ac_cv_path_FGREP" +! +! { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing strerror" >&5 + $as_echo_n "checking for library containing strerror... " >&6; } + if ${ac_cv_search_strerror+:} false; then : + $as_echo_n "(cached) " >&6 +*************** +*** 5480,5486 **** + PERL_CFLAGS=`echo "$perlcppflags" | sed -e 's/-pipe //' -e 's/-W[^ ]*//'` + fi + if test "X$perlldflags" != "X"; then +! if test "X`echo \"$LDFLAGS\" | grep -F -e \"$perlldflags\"`" = "X"; then + LDFLAGS="$perlldflags $LDFLAGS" + fi + fi +--- 5547,5553 ---- + PERL_CFLAGS=`echo "$perlcppflags" | sed -e 's/-pipe //' -e 's/-W[^ ]*//'` + fi + if test "X$perlldflags" != "X"; then +! if test "X`echo \"$LDFLAGS\" | $FGREP -e \"$perlldflags\"`" = "X"; then + LDFLAGS="$perlldflags $LDFLAGS" + fi + fi +*************** +*** 6838,6844 **** + if test "X$rubyldflags" != "X"; then + rubyldflags=`echo "$rubyldflags" | sed -e 's/-arch\ ppc//' -e 's/-arch\ i386//' -e 's/-arch\ x86_64//'` + if test "X$rubyldflags" != "X"; then +! if test "X`echo \"$LDFLAGS\" | grep -F -e \"$rubyldflags\"`" = "X"; then + LDFLAGS="$rubyldflags $LDFLAGS" + fi + fi +--- 6905,6911 ---- + if test "X$rubyldflags" != "X"; then + rubyldflags=`echo "$rubyldflags" | sed -e 's/-arch\ ppc//' -e 's/-arch\ i386//' -e 's/-arch\ x86_64//'` + if test "X$rubyldflags" != "X"; then +! if test "X`echo \"$LDFLAGS\" | $FGREP -e \"$rubyldflags\"`" = "X"; then + LDFLAGS="$rubyldflags $LDFLAGS" + fi + fi +*** ../vim-7.4.223/src/version.c 2014-03-27 17:40:53.396696361 +0100 +--- src/version.c 2014-03-27 18:48:59.488758971 +0100 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 224, + /**/ + +-- +Female engineers become irresistible at the age of consent and remain that +way until about thirty minutes after their clinical death. Longer if it's a +warm day. + (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/patches/source/vim/patches/7.4.225 b/patches/source/vim/patches/7.4.225 new file mode 100644 index 000000000..ba2207be5 --- /dev/null +++ b/patches/source/vim/patches/7.4.225 @@ -0,0 +1,83 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.225 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.225 +Problem: Dynamic Ruby doesn't work on Solaris. +Solution: Always use the stubs. (Danek Duvall, Yukihiro Nakadaira) +Files: src/if_ruby.c + + +*** ../vim-7.4.224/src/if_ruby.c 2014-02-23 22:52:33.352764716 +0100 +--- src/if_ruby.c 2014-03-27 18:56:37.428765988 +0100 +*************** +*** 88,95 **** + # define rb_int2big rb_int2big_stub + #endif + +! #if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 20 \ +! && VIM_SIZEOF_INT < VIM_SIZEOF_LONG + /* Ruby 2.0 defines a number of static functions which use rb_fix2int and + * rb_num2int if VIM_SIZEOF_INT < VIM_SIZEOF_LONG (64bit) */ + # define rb_fix2int rb_fix2int_stub +--- 88,94 ---- + # define rb_int2big rb_int2big_stub + #endif + +! #if defined(DYNAMIC_RUBY_VER) && VIM_SIZEOF_INT < VIM_SIZEOF_LONG + /* Ruby 2.0 defines a number of static functions which use rb_fix2int and + * rb_num2int if VIM_SIZEOF_INT < VIM_SIZEOF_LONG (64bit) */ + # define rb_fix2int rb_fix2int_stub +*************** +*** 203,210 **** + # define rb_inspect dll_rb_inspect + # define rb_int2inum dll_rb_int2inum + # if VIM_SIZEOF_INT < VIM_SIZEOF_LONG /* 64 bits only */ +- # define rb_fix2int dll_rb_fix2int +- # define rb_num2int dll_rb_num2int + # define rb_num2uint dll_rb_num2uint + # endif + # define rb_lastline_get dll_rb_lastline_get +--- 202,207 ---- +*************** +*** 392,399 **** + { + return dll_rb_int2big(x); + } +! # if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 20 \ +! && VIM_SIZEOF_INT < VIM_SIZEOF_LONG + long rb_fix2int_stub(VALUE x) + { + return dll_rb_fix2int(x); +--- 389,395 ---- + { + return dll_rb_int2big(x); + } +! # if defined(DYNAMIC_RUBY_VER) && VIM_SIZEOF_INT < VIM_SIZEOF_LONG + long rb_fix2int_stub(VALUE x) + { + return dll_rb_fix2int(x); +*** ../vim-7.4.224/src/version.c 2014-03-27 18:51:06.612760919 +0100 +--- src/version.c 2014-03-27 18:55:21.412764824 +0100 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 225, + /**/ + +-- +Engineers are widely recognized as superior marriage material: intelligent, +dependable, employed, honest, and handy around the house. + (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/patches/source/vim/patches/7.4.226 b/patches/source/vim/patches/7.4.226 new file mode 100644 index 000000000..7c00c3d09 --- /dev/null +++ b/patches/source/vim/patches/7.4.226 @@ -0,0 +1,136 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.226 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.226 (after 7.4.219) +Problem: Cursurline highlighting not redrawn when scrolling. (John + Marriott) +Solution: Check for required redraw in two places. +Files: src/move.c + + +*** ../vim-7.4.225/src/move.c 2014-03-27 12:11:43.888393741 +0100 +--- src/move.c 2014-03-28 21:45:56.958245561 +0100 +*************** +*** 20,25 **** +--- 20,26 ---- + #include "vim.h" + + static void comp_botline __ARGS((win_T *wp)); ++ static void redraw_for_cursorline __ARGS((win_T *wp)); + static int scrolljump_value __ARGS((void)); + static int check_top_offset __ARGS((void)); + static void curs_rows __ARGS((win_T *wp, int do_botline)); +*************** +*** 106,111 **** +--- 107,113 ---- + #ifdef FEAT_FOLDING + wp->w_cline_folded = folded; + #endif ++ redraw_for_cursorline(wp); + wp->w_valid |= (VALID_CROW|VALID_CHEIGHT); + } + if (done + n > wp->w_height) +*************** +*** 124,129 **** +--- 126,152 ---- + } + + /* ++ * Redraw when w_cline_row changes and 'relativenumber' or 'cursorline' is ++ * set. ++ */ ++ static void ++ redraw_for_cursorline(wp) ++ win_T *wp; ++ { ++ if ((wp->w_p_rnu ++ #ifdef FEAT_SYN_HL ++ || wp->w_p_cul ++ #endif ++ ) ++ && (wp->w_valid & VALID_CROW) == 0 ++ # ifdef FEAT_INS_EXPAND ++ && !pum_visible() ++ # endif ++ ) ++ redraw_win_later(wp, SOME_VALID); ++ } ++ ++ /* + * Update curwin->w_topline and redraw if necessary. + * Used to update the screen before printing a message. + */ +*************** +*** 772,791 **** + } + } + +! /* Redraw when w_cline_row changes and 'relativenumber' or 'cursorline' is +! * set. */ +! if ((curwin->w_p_rnu +! #ifdef FEAT_SYN_HL +! || curwin->w_p_cul +! #endif +! ) +! && (curwin->w_valid & VALID_CROW) == 0 +! # ifdef FEAT_INS_EXPAND +! && !pum_visible() +! # endif +! ) +! redraw_later(SOME_VALID); +! + wp->w_valid |= VALID_CROW|VALID_CHEIGHT; + + /* validate botline too, if update_screen doesn't do it */ +--- 795,801 ---- + } + } + +! redraw_for_cursorline(curwin); + wp->w_valid |= VALID_CROW|VALID_CHEIGHT; + + /* validate botline too, if update_screen doesn't do it */ +*************** +*** 2504,2511 **** + } + comp_botline(curwin); + curwin->w_cursor.lnum = curwin->w_botline - 1; +! curwin->w_valid &= ~(VALID_WCOL|VALID_CHEIGHT| +! VALID_WROW|VALID_CROW); + } + else + { +--- 2514,2521 ---- + } + comp_botline(curwin); + curwin->w_cursor.lnum = curwin->w_botline - 1; +! curwin->w_valid &= +! ~(VALID_WCOL|VALID_CHEIGHT|VALID_WROW|VALID_CROW); + } + else + { +*** ../vim-7.4.225/src/version.c 2014-03-27 19:08:52.008777244 +0100 +--- src/version.c 2014-03-28 21:48:45.330248141 +0100 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 226, + /**/ + +-- +Bad fashion can discourage normal people from interacting with the engineer +and talking about the cute things their children do. + (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/patches/source/vim/patches/7.4.227 b/patches/source/vim/patches/7.4.227 new file mode 100644 index 000000000..a7204bce4 --- /dev/null +++ b/patches/source/vim/patches/7.4.227 @@ -0,0 +1,87 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.227 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.227 (after 7.4.225) +Problem: Can't build with Ruby 1.8. +Solution: Do include a check for the Ruby version. (Ken Takata) +Files: src/if_ruby.c + + +*** ../vim-7.4.226/src/if_ruby.c 2014-03-27 19:08:52.004777244 +0100 +--- src/if_ruby.c 2014-03-28 21:54:06.414253061 +0100 +*************** +*** 88,95 **** + # define rb_int2big rb_int2big_stub + #endif + +! #if defined(DYNAMIC_RUBY_VER) && VIM_SIZEOF_INT < VIM_SIZEOF_LONG +! /* Ruby 2.0 defines a number of static functions which use rb_fix2int and + * rb_num2int if VIM_SIZEOF_INT < VIM_SIZEOF_LONG (64bit) */ + # define rb_fix2int rb_fix2int_stub + # define rb_num2int rb_num2int_stub +--- 88,96 ---- + # define rb_int2big rb_int2big_stub + #endif + +! #if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 19 \ +! && VIM_SIZEOF_INT < VIM_SIZEOF_LONG +! /* Ruby 1.9 defines a number of static functions which use rb_fix2int and + * rb_num2int if VIM_SIZEOF_INT < VIM_SIZEOF_LONG (64bit) */ + # define rb_fix2int rb_fix2int_stub + # define rb_num2int rb_num2int_stub +*************** +*** 202,207 **** +--- 203,212 ---- + # define rb_inspect dll_rb_inspect + # define rb_int2inum dll_rb_int2inum + # if VIM_SIZEOF_INT < VIM_SIZEOF_LONG /* 64 bits only */ ++ # if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER <= 18 ++ # define rb_fix2int dll_rb_fix2int ++ # define rb_num2int dll_rb_num2int ++ # endif + # define rb_num2uint dll_rb_num2uint + # endif + # define rb_lastline_get dll_rb_lastline_get +*************** +*** 389,395 **** + { + return dll_rb_int2big(x); + } +! # if defined(DYNAMIC_RUBY_VER) && VIM_SIZEOF_INT < VIM_SIZEOF_LONG + long rb_fix2int_stub(VALUE x) + { + return dll_rb_fix2int(x); +--- 394,401 ---- + { + return dll_rb_int2big(x); + } +! # if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 19 \ +! && VIM_SIZEOF_INT < VIM_SIZEOF_LONG + long rb_fix2int_stub(VALUE x) + { + return dll_rb_fix2int(x); +*** ../vim-7.4.226/src/version.c 2014-03-28 21:49:26.854248777 +0100 +--- src/version.c 2014-03-28 21:53:51.546252833 +0100 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 227, + /**/ + +-- +No engineer can take a shower without wondering if some sort of Teflon coating +would make showering unnecessary. + (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/patches/source/vim/patches/7.4.228 b/patches/source/vim/patches/7.4.228 new file mode 100644 index 000000000..0ce909c07 --- /dev/null +++ b/patches/source/vim/patches/7.4.228 @@ -0,0 +1,189 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.228 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.228 +Problem: Compiler warnings when building with Python 3.2. +Solution: Make type cast depend on Python version. (Ken Takata) +Files: src/if_py_both.h, src/if_python.c, src/if_python3.c + + +*** ../vim-7.4.227/src/if_py_both.h 2014-03-08 16:13:39.115462069 +0100 +--- src/if_py_both.h 2014-03-30 15:58:40.948518929 +0200 +*************** +*** 2328,2334 **** + { + 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); +--- 2328,2334 ---- + { + Py_ssize_t start, stop, step, slicelen; + +! if (PySlice_GetIndicesEx((PySliceObject_T *)idx, ListLength(self), + &start, &stop, &step, &slicelen) < 0) + return NULL; + return ListSlice(self, start, step, slicelen); +*************** +*** 2618,2624 **** + { + 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, +--- 2618,2624 ---- + { + Py_ssize_t start, stop, step, slicelen; + +! if (PySlice_GetIndicesEx((PySliceObject_T *)idx, ListLength(self), + &start, &stop, &step, &slicelen) < 0) + return -1; + return ListAssSlice(self, start, step, slicelen, +*** ../vim-7.4.227/src/if_python.c 2014-02-23 22:52:33.368764715 +0100 +--- src/if_python.c 2014-03-30 15:58:35.768518850 +0200 +*************** +*** 803,808 **** +--- 803,810 ---- + # define PY_STRSAVE(s) ((char_u *) py_memsave(s, STRLEN(s) + 1)) + #endif + ++ typedef PySliceObject PySliceObject_T; ++ + /* + * Include the code shared with if_python3.c + */ +*** ../vim-7.4.227/src/if_python3.c 2014-01-14 19:35:49.000000000 +0100 +--- src/if_python3.c 2014-03-30 15:59:24.752519600 +0200 +*************** +*** 100,105 **** +--- 100,115 ---- + #define PyIntArgFunc ssizeargfunc + #define PyIntObjArgProc ssizeobjargproc + ++ /* ++ * PySlice_GetIndicesEx(): first argument type changed from PySliceObject ++ * to PyObject in Python 3.2 or later. ++ */ ++ #if PY_VERSION_HEX >= 0x030200f0 ++ typedef PyObject PySliceObject_T; ++ #else ++ typedef PySliceObject PySliceObject_T; ++ #endif ++ + #if defined(DYNAMIC_PYTHON3) || defined(PROTO) + + # ifndef WIN3264 +*************** +*** 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); +--- 304,310 ---- + 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_T *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((PySliceObject *)idx, + (Py_ssize_t)((BufferObject *)(self))->buf->b_ml.ml_line_count, + &start, &stop, + &step, &slicelen) < 0) +--- 1200,1206 ---- + if (CheckBuffer((BufferObject *) self)) + return NULL; + +! if (PySlice_GetIndicesEx((PySliceObject_T *)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) +--- 1232,1238 ---- + if (CheckBuffer((BufferObject *) self)) + return -1; + +! if (PySlice_GetIndicesEx((PySliceObject_T *)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((PySliceObject *)idx, + ((RangeObject *)(self))->end-((RangeObject *)(self))->start+1, + &start, &stop, + &step, &slicelen) < 0) +--- 1316,1322 ---- + { + Py_ssize_t start, stop, step, slicelen; + +! if (PySlice_GetIndicesEx((PySliceObject_T *)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) +--- 1343,1349 ---- + { + Py_ssize_t start, stop, step, slicelen; + +! if (PySlice_GetIndicesEx((PySliceObject_T *)idx, + ((RangeObject *)(self))->end-((RangeObject *)(self))->start+1, + &start, &stop, + &step, &slicelen) < 0) +*** ../vim-7.4.227/src/version.c 2014-03-28 21:58:17.878256914 +0100 +--- src/version.c 2014-03-30 15:52:27.784513211 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 228, + /**/ + +-- +The average life of an organization chart is six months. You can safely +ignore any order from your boss that would take six months to complete. + (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/patches/source/vim/patches/7.4.229 b/patches/source/vim/patches/7.4.229 new file mode 100644 index 000000000..e77a98cfb --- /dev/null +++ b/patches/source/vim/patches/7.4.229 @@ -0,0 +1,141 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.229 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.229 +Problem: Using ":let" for listing variables and the second one is a curly + braces expression may fail. +Solution: Check for an "=" in a better way. (ZyX) +Files: src/eval.c, src/testdir/test104.in, src/testdir/test104.ok + + +*** ../vim-7.4.228/src/eval.c 2014-03-25 18:23:27.062087691 +0100 +--- src/eval.c 2014-03-30 16:46:24.464562806 +0200 +*************** +*** 1856,1863 **** + return; + if (argend > arg && argend[-1] == '.') /* for var.='str' */ + --argend; +! expr = vim_strchr(argend, '='); +! if (expr == NULL) + { + /* + * ":let" without "=": list variables +--- 1856,1864 ---- + return; + if (argend > arg && argend[-1] == '.') /* for var.='str' */ + --argend; +! expr = skipwhite(argend); +! if (*expr != '=' && !(vim_strchr((char_u *)"+-.", *expr) != NULL +! && expr[1] == '=')) + { + /* + * ":let" without "=": list variables +*************** +*** 1886,1897 **** + { + op[0] = '='; + op[1] = NUL; +! if (expr > argend) + { +! if (vim_strchr((char_u *)"+-.", expr[-1]) != NULL) +! op[0] = expr[-1]; /* +=, -= or .= */ + } +! expr = skipwhite(expr + 1); + + if (eap->skip) + ++emsg_skip; +--- 1887,1900 ---- + { + op[0] = '='; + op[1] = NUL; +! if (*expr != '=') + { +! if (vim_strchr((char_u *)"+-.", *expr) != NULL) +! op[0] = *expr; /* +=, -= or .= */ +! expr = skipwhite(expr + 2); + } +! else +! expr = skipwhite(expr + 1); + + if (eap->skip) + ++emsg_skip; +*** ../vim-7.4.228/src/testdir/test104.in 2014-02-05 22:25:29.982568243 +0100 +--- src/testdir/test104.in 2014-03-30 16:44:39.432561197 +0200 +*************** +*** 1,4 **** +! Tests for autoload. vim: set ft=vim ts=8 : + + STARTTEST + :so small.vim +--- 1,4 ---- +! Tests for :let. vim: set ft=vim ts=8 : + + STARTTEST + :so small.vim +*************** +*** 10,15 **** +--- 10,29 ---- + :catch + : $put ='FAIL: ' . v:exception + :endtry ++ :let a = 1 ++ :let b = 2 ++ :for letargs in ['a b', '{0 == 1 ? "a" : "b"}', '{0 == 1 ? "a" : "b"} a', 'a {0 == 1 ? "a" : "b"}'] ++ : try ++ : redir => messages ++ : execute 'let' letargs ++ : redir END ++ : $put ='OK:' ++ : $put =split(substitute(messages, '\n', '\0 ', 'g'), '\n') ++ : catch ++ : $put ='FAIL: ' . v:exception ++ : redir END ++ : endtry ++ :endfor + :/^Results/,$wq! test.out + ENDTEST + +*** ../vim-7.4.228/src/testdir/test104.ok 2014-02-05 22:25:29.982568243 +0100 +--- src/testdir/test104.ok 2014-03-30 16:44:39.432561197 +0200 +*************** +*** 1,2 **** +--- 1,13 ---- + Results of test104: + OK: function('tr') ++ OK: ++ a #1 ++ b #2 ++ OK: ++ b #2 ++ OK: ++ b #2 ++ a #1 ++ OK: ++ a #1 ++ b #2 +*** ../vim-7.4.228/src/version.c 2014-03-30 16:11:37.180530823 +0200 +--- src/version.c 2014-03-30 16:46:39.660563039 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 229, + /**/ + +-- +You have heard the saying that if you put a thousand monkeys in a room with a +thousand typewriters and waited long enough, eventually you would have a room +full of dead monkeys. + (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/patches/source/vim/patches/7.4.230 b/patches/source/vim/patches/7.4.230 new file mode 100644 index 000000000..933de67ea --- /dev/null +++ b/patches/source/vim/patches/7.4.230 @@ -0,0 +1,53 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.230 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.230 +Problem: Error when using ":options". +Solution: Fix the entry for 'lispwords'. (Kenichi Ito) +Files: runtime/optwin.vim + + +*** ../vim-7.4.229/runtime/optwin.vim 2014-03-12 18:55:52.100906804 +0100 +--- runtime/optwin.vim 2014-04-01 12:25:09.825159207 +0200 +*************** +*** 855,861 **** + call append("$", "\t(local to buffer)") + call <SID>BinOptionL("lisp") + call append("$", "lispwords\twords that change how lisp indenting works") +! call <SID>OptionL("lw", &lw) + endif + + +--- 855,861 ---- + call append("$", "\t(local to buffer)") + call <SID>BinOptionL("lisp") + call append("$", "lispwords\twords that change how lisp indenting works") +! call <SID>OptionL("lw") + endif + + +*** ../vim-7.4.229/src/version.c 2014-03-30 16:49:06.412565288 +0200 +--- src/version.c 2014-04-01 12:23:07.629160888 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 230, + /**/ + +-- +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/patches/source/vim/patches/7.4.231 b/patches/source/vim/patches/7.4.231 new file mode 100644 index 000000000..eb661441b --- /dev/null +++ b/patches/source/vim/patches/7.4.231 @@ -0,0 +1,267 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.231 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.231 +Problem: An error in ":options" is not caught by the tests. +Solution: Add a test for ":options". Set $VIMRUNTIME for the tests so that + it uses the current runtime files instead of the installed ones. +Files: src/Makefile, src/testdir/Makefile, src/testdir/test_options.in, + src/testdir/test_options.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 + + +*** ../vim-7.4.230/src/Makefile 2014-03-27 17:40:53.384696360 +0100 +--- src/Makefile 2014-04-01 13:49:14.025089820 +0200 +*************** +*** 1867,1873 **** + -if test $(VIMTARGET) != vim -a ! -r vim; then \ + ln -s $(VIMTARGET) vim; \ + fi +! cd testdir; $(MAKE) -f Makefile $(GUI_TESTTARGET) VIMPROG=../$(VIMTARGET) $(GUI_TESTARG) + $(MAKE) -f Makefile unittest + + unittesttargets: +--- 1867,1873 ---- + -if test $(VIMTARGET) != vim -a ! -r vim; then \ + ln -s $(VIMTARGET) vim; \ + fi +! cd testdir; $(MAKE) -f Makefile $(GUI_TESTTARGET) VIMPROG=../$(VIMTARGET) $(GUI_TESTARG) SCRIPTSOURCE=../$(SCRIPTSOURCE) + $(MAKE) -f Makefile unittest + + unittesttargets: +*************** +*** 1880,1885 **** +--- 1880,1886 ---- + + # Run individual test, assuming that Vim was already compiled. + test1 test2 test3 test4 test5 test6 test7 test8 test9 \ ++ test_options \ + 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 \ +*************** +*** 1890,1896 **** + 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: + cd testdir; $(MAKE) -f Makefile clean +--- 1891,1897 ---- + 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) $(GUI_TESTARG) SCRIPTSOURCE=../$(SCRIPTSOURCE) + + testclean: + cd testdir; $(MAKE) -f Makefile clean +*** ../vim-7.4.230/src/testdir/Makefile 2014-03-12 19:41:37.100948866 +0100 +--- src/testdir/Makefile 2014-04-01 13:48:07.593090734 +0200 +*************** +*** 3,8 **** +--- 3,9 ---- + # + + VIMPROG = ../vim ++ SCRIPTSOURCE = ../../runtime + + # Uncomment this line to use valgrind for memory leaks and extra warnings. + # The output goes into a file "valgrind.testN" +*************** +*** 31,37 **** + 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 \ +! test104.out test105.out test106.out + + SCRIPTS_GUI = test16.out + +--- 32,39 ---- + 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 \ +! test104.out test105.out test106.out \ +! test_options.out + + SCRIPTS_GUI = test16.out + +*************** +*** 53,59 **** + + RM_ON_RUN = test.out X* viminfo + RM_ON_START = tiny.vim small.vim mbyte.vim mzscheme.vim lua.vim test.ok +! RUN_VIM = $(VALGRIND) $(VIMPROG) -u unix.vim -U NONE --noplugin -s dotest.in + + clean: + -rm -rf *.out *.failed *.rej *.orig test.log $(RM_ON_RUN) $(RM_ON_START) valgrind.* +--- 55,61 ---- + + RM_ON_RUN = test.out X* viminfo + RM_ON_START = tiny.vim small.vim mbyte.vim mzscheme.vim lua.vim test.ok +! RUN_VIM = export VIMRUNTIME=$(SCRIPTSOURCE); $(VALGRIND) $(VIMPROG) -u unix.vim -U NONE --noplugin -s dotest.in + + clean: + -rm -rf *.out *.failed *.rej *.orig test.log $(RM_ON_RUN) $(RM_ON_START) valgrind.* +*** ../vim-7.4.230/src/testdir/test_options.in 2014-04-01 14:07:21.057074867 +0200 +--- src/testdir/test_options.in 2014-04-01 13:19:34.073114305 +0200 +*************** +*** 0 **** +--- 1,17 ---- ++ Test for ":options". ++ ++ STARTTEST ++ :so small.vim ++ :let caught = 'ok' ++ :try ++ :options ++ :catch ++ :let caught = v:throwpoint . "\n" . v:exception ++ :endtry ++ :buf 1 ++ :$put =caught ++ :/^result/,$w! test.out ++ :qa! ++ ENDTEST ++ ++ result +*** ../vim-7.4.230/src/testdir/test_options.ok 2014-04-01 14:07:21.065074867 +0200 +--- src/testdir/test_options.ok 2014-04-01 13:04:45.041126534 +0200 +*************** +*** 0 **** +--- 1,2 ---- ++ result ++ ok +*** ../vim-7.4.230/src/testdir/Make_amiga.mak 2014-03-12 19:41:37.096948866 +0100 +--- src/testdir/Make_amiga.mak 2014-04-01 13:13:31.561119292 +0200 +*************** +*** 35,41 **** + 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 \ +! test104.out test105.out test106.out + + .SUFFIXES: .in .out + +--- 35,42 ---- + 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 \ +! test104.out test105.out test106.out \ +! test_options.out + + .SUFFIXES: .in .out + +*************** +*** 158,160 **** +--- 159,162 ---- + test104.out: test104.in + test105.out: test105.in + test106.out: test106.in ++ test_options.out: test_options.in +*** ../vim-7.4.230/src/testdir/Make_dos.mak 2014-03-12 19:41:37.096948866 +0100 +--- src/testdir/Make_dos.mak 2014-04-01 13:14:07.909118792 +0200 +*************** +*** 34,40 **** + 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 test104.out \ +! test105.out test106.out + + SCRIPTS32 = test50.out test70.out + +--- 34,41 ---- + 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 test104.out \ +! test105.out test106.out \ +! test_options.out + + SCRIPTS32 = test50.out test70.out + +*** ../vim-7.4.230/src/testdir/Make_ming.mak 2014-03-12 19:41:37.096948866 +0100 +--- src/testdir/Make_ming.mak 2014-04-01 13:14:23.889118572 +0200 +*************** +*** 54,60 **** + 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 test104.out \ +! test105.out test106.out + + SCRIPTS32 = test50.out test70.out + +--- 54,61 ---- + 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 test104.out \ +! test105.out test106.out \ +! test_options.out + + SCRIPTS32 = test50.out test70.out + +*** ../vim-7.4.230/src/testdir/Make_os2.mak 2014-03-12 19:41:37.096948866 +0100 +--- src/testdir/Make_os2.mak 2014-04-01 13:14:34.377118428 +0200 +*************** +*** 36,42 **** + 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 test104.out \ +! test105.out test106.out + + .SUFFIXES: .in .out + +--- 36,43 ---- + 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 test104.out \ +! test105.out test106.out \ +! test_options.out + + .SUFFIXES: .in .out + +*** ../vim-7.4.230/src/testdir/Make_vms.mms 2014-03-12 19:41:37.096948866 +0100 +--- src/testdir/Make_vms.mms 2014-04-01 13:14:47.821118243 +0200 +*************** +*** 95,101 **** + test90.out test91.out test92.out test93.out test94.out \ + test95.out test96.out test98.out test99.out \ + test100.out test101.out test103.out test104.out \ +! test105.out test106.out + + # Known problems: + # test17: ? +--- 95,102 ---- + test90.out test91.out test92.out test93.out test94.out \ + test95.out test96.out test98.out test99.out \ + test100.out test101.out test103.out test104.out \ +! test105.out test106.out \ +! test_options.out + + # Known problems: + # test17: ? +*** ../vim-7.4.230/src/version.c 2014-04-01 12:26:40.245157964 +0200 +--- src/version.c 2014-04-01 13:14:57.549118109 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 231, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +11. You find yourself typing "com" after every period when using a word + processor.com + + /// 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/patches/source/vim/patches/7.4.232 b/patches/source/vim/patches/7.4.232 new file mode 100644 index 000000000..3e2dfe289 --- /dev/null +++ b/patches/source/vim/patches/7.4.232 @@ -0,0 +1,109 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.232 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.232 +Problem: ":%s/\n//" uses a lot of memory. (Aidan Marlin) +Solution: Turn this into a join command. (Christian Brabandt) +Files: src/ex_cmds.c, src/ex_docmd.c, src/proto/ex_docmd.pro + + +*** ../vim-7.4.231/src/ex_cmds.c 2014-03-23 15:12:29.919264336 +0100 +--- src/ex_cmds.c 2014-04-01 17:37:59.560901015 +0200 +*************** +*** 4420,4425 **** +--- 4420,4450 ---- + endcolumn = (curwin->w_curswant == MAXCOL); + } + ++ /* Recognize ":%s/\n//" and turn it into a join command, which is much ++ * more efficient. ++ * TODO: find a generic solution to make line-joining operations more ++ * efficient, avoid allocating a string that grows in size. ++ */ ++ if (STRCMP(pat, "\\n") == 0 && STRLEN(pat) == 2 ++ && *sub == NUL ++ && (*cmd == NUL || (cmd[1] == NUL && (*cmd == 'g' || *cmd == 'l' ++ || *cmd == 'p' || *cmd == '#')))) ++ { ++ curwin->w_cursor.lnum = eap->line1; ++ if (*cmd == 'l') ++ eap->flags = EXFLAG_LIST; ++ else if (*cmd == '#') ++ eap->flags = EXFLAG_NR; ++ else if (*cmd == 'p') ++ eap->flags = EXFLAG_PRINT; ++ ++ (void)do_join(eap->line2 - eap->line1 + 1, FALSE, TRUE, FALSE); ++ sub_nlines = sub_nsubs = eap->line2 - eap->line1 + 1; ++ (void)do_sub_msg(FALSE); ++ ex_may_print(eap); ++ return; ++ } ++ + /* + * Find trailing options. When '&' is used, keep old options. + */ +*** ../vim-7.4.231/src/ex_docmd.c 2014-03-25 13:03:44.937793766 +0100 +--- src/ex_docmd.c 2014-04-01 17:31:59.708905965 +0200 +*************** +*** 316,322 **** + static void ex_operators __ARGS((exarg_T *eap)); + static void ex_put __ARGS((exarg_T *eap)); + static void ex_copymove __ARGS((exarg_T *eap)); +- static void ex_may_print __ARGS((exarg_T *eap)); + static void ex_submagic __ARGS((exarg_T *eap)); + static void ex_join __ARGS((exarg_T *eap)); + static void ex_at __ARGS((exarg_T *eap)); +--- 316,321 ---- +*************** +*** 8683,8689 **** + /* + * Print the current line if flags were given to the Ex command. + */ +! static void + ex_may_print(eap) + exarg_T *eap; + { +--- 8682,8688 ---- + /* + * Print the current line if flags were given to the Ex command. + */ +! void + ex_may_print(eap) + exarg_T *eap; + { +*** ../vim-7.4.231/src/proto/ex_docmd.pro 2013-08-10 13:37:10.000000000 +0200 +--- src/proto/ex_docmd.pro 2014-04-01 17:31:59.708905965 +0200 +*************** +*** 54,57 **** +--- 54,58 ---- + int put_line __ARGS((FILE *fd, char *s)); + void dialog_msg __ARGS((char_u *buff, char *format, char_u *fname)); + char_u *get_behave_arg __ARGS((expand_T *xp, int idx)); ++ void ex_may_print __ARGS((exarg_T *eap)); + /* vim: set ft=c : */ +*** ../vim-7.4.231/src/version.c 2014-04-01 14:08:14.689074130 +0200 +--- src/version.c 2014-04-01 17:33:03.920905082 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 232, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +16. You step out of your room and realize that your parents have moved and + you don't have a clue when it happened. + + /// 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/patches/source/vim/patches/7.4.233 b/patches/source/vim/patches/7.4.233 new file mode 100644 index 000000000..0ae1bcab5 --- /dev/null +++ b/patches/source/vim/patches/7.4.233 @@ -0,0 +1,80 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.233 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.233 +Problem: Escaping special characters for using "%" with a shell command is + inconsistant, parenthesis are escaped but spaces are not. +Solution: Only escape "!". (Gary Johnson) +Files: src/ex_docmd.c + + +*** ../vim-7.4.232/src/ex_docmd.c 2014-04-01 17:49:40.140891378 +0200 +--- src/ex_docmd.c 2014-04-01 18:26:16.036861171 +0200 +*************** +*** 4580,4604 **** + + /* For a shell command a '!' must be escaped. */ + if ((eap->usefilter || eap->cmdidx == CMD_bang) +! && vim_strpbrk(repl, (char_u *)"!&;()<>") != NULL) + { + char_u *l; + +! l = vim_strsave_escaped(repl, (char_u *)"!&;()<>"); + if (l != NULL) + { + vim_free(repl); + repl = l; +- /* For a sh-like shell escape "!" another time. */ +- if (strstr((char *)p_sh, "sh") != NULL) +- { +- l = vim_strsave_escaped(repl, (char_u *)"!"); +- if (l != NULL) +- { +- vim_free(repl); +- repl = l; +- } +- } + } + } + +--- 4580,4594 ---- + + /* For a shell command a '!' must be escaped. */ + if ((eap->usefilter || eap->cmdidx == CMD_bang) +! && vim_strpbrk(repl, (char_u *)"!") != NULL) + { + char_u *l; + +! l = vim_strsave_escaped(repl, (char_u *)"!"); + if (l != NULL) + { + vim_free(repl); + repl = l; + } + } + +*** ../vim-7.4.232/src/version.c 2014-04-01 17:49:40.144891378 +0200 +--- src/version.c 2014-04-01 18:54:13.276838100 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 233, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +17. You turn on your intercom when leaving the room so you can hear if new + e-mail arrives. + + /// 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/patches/source/vim/patches/7.4.234 b/patches/source/vim/patches/7.4.234 new file mode 100644 index 000000000..d70b7a07a --- /dev/null +++ b/patches/source/vim/patches/7.4.234 @@ -0,0 +1,95 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.234 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.234 +Problem: Can't get the command that was used to start Vim. +Solution: Add v:progpath. (Viktor Kojouharov) +Files: runtime/doc/eval.txt, src/eval.c, src/main.c, src/vim.h + + +*** ../vim-7.4.233/runtime/doc/eval.txt 2014-03-25 18:23:27.054087691 +0100 +--- runtime/doc/eval.txt 2014-04-01 19:33:25.516805743 +0200 +*************** +*** 1557,1562 **** +--- 1558,1569 ---- + |evim| etc., or any other name you might symlink to Vim. + Read-only. + ++ *v:progpath* *progpath-variable* ++ v:progpath Contains the command with which Vim was invoked, including the ++ path. Useful if you want to message a Vim server using a ++ |--remote-expr|. ++ Read-only. ++ + *v:register* *register-variable* + v:register The name of the register in effect for the current normal mode + command (regardless of whether that command actually used a +*** ../vim-7.4.233/src/eval.c 2014-03-30 16:49:06.412565288 +0200 +--- src/eval.c 2014-04-01 19:34:13.164805087 +0200 +*************** +*** 361,366 **** +--- 361,367 ---- + {VV_NAME("hlsearch", VAR_NUMBER), 0}, + {VV_NAME("oldfiles", VAR_LIST), 0}, + {VV_NAME("windowid", VAR_NUMBER), VV_RO}, ++ {VV_NAME("progpath", VAR_STRING), VV_RO}, + }; + + /* shorthand */ +*** ../vim-7.4.233/src/main.c 2014-03-23 15:12:29.923264336 +0100 +--- src/main.c 2014-04-01 19:34:13.164805087 +0200 +*************** +*** 1602,1607 **** +--- 1602,1608 ---- + + #ifdef FEAT_EVAL + set_vim_var_string(VV_PROGNAME, initstr, -1); ++ set_vim_var_string(VV_PROGPATH, (char_u *)parmp->argv[0], -1); + #endif + + if (TOLOWER_ASC(initstr[0]) == 'r') +*** ../vim-7.4.233/src/vim.h 2014-03-24 19:43:56.600837795 +0100 +--- src/vim.h 2014-04-01 19:34:13.164805087 +0200 +*************** +*** 1880,1886 **** + #define VV_HLSEARCH 54 + #define VV_OLDFILES 55 + #define VV_WINDOWID 56 +! #define VV_LEN 57 /* number of v: vars */ + + #ifdef FEAT_CLIPBOARD + +--- 1880,1887 ---- + #define VV_HLSEARCH 54 + #define VV_OLDFILES 55 + #define VV_WINDOWID 56 +! #define VV_PROGPATH 57 +! #define VV_LEN 58 /* number of v: vars */ + + #ifdef FEAT_CLIPBOARD + +*** ../vim-7.4.233/src/version.c 2014-04-01 18:54:44.316837673 +0200 +--- src/version.c 2014-04-01 19:28:05.092810150 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 234, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +18. Your wife drapes a blond wig over your monitor to remind you of what she + looks like. + + /// 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/patches/source/vim/patches/7.4.235 b/patches/source/vim/patches/7.4.235 new file mode 100644 index 000000000..1f12ee7c1 --- /dev/null +++ b/patches/source/vim/patches/7.4.235 @@ -0,0 +1,552 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.235 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.235 +Problem: It is not easy to get the full path of a command. +Solution: Add the exepath() function. +Files: src/eval.c, src/misc1.c, src/os_amiga.c, src/os_msdos.c, + src/os_unix.c, src/os_vms.c, src/os_win32.c, + src/proto/os_amiga.pro, src/proto/os_msdos.pro, + src/proto/os_unix.pro, src/proto/os_win32.pro, + runtime/doc/eval.txt + + +*** ../vim-7.4.234/src/eval.c 2014-04-01 19:55:46.252787300 +0200 +--- src/eval.c 2014-04-01 20:18:39.212768414 +0200 +*************** +*** 514,519 **** +--- 514,520 ---- + static void f_eval __ARGS((typval_T *argvars, typval_T *rettv)); + static void f_eventhandler __ARGS((typval_T *argvars, typval_T *rettv)); + static void f_executable __ARGS((typval_T *argvars, typval_T *rettv)); ++ static void f_exepath __ARGS((typval_T *argvars, typval_T *rettv)); + static void f_exists __ARGS((typval_T *argvars, typval_T *rettv)); + #ifdef FEAT_FLOAT + static void f_exp __ARGS((typval_T *argvars, typval_T *rettv)); +*************** +*** 7920,7925 **** +--- 7921,7927 ---- + {"eval", 1, 1, f_eval}, + {"eventhandler", 0, 0, f_eventhandler}, + {"executable", 1, 1, f_executable}, ++ {"exepath", 1, 1, f_exepath}, + {"exists", 1, 1, f_exists}, + #ifdef FEAT_FLOAT + {"exp", 1, 1, f_exp}, +*************** +*** 10046,10052 **** + typval_T *argvars; + typval_T *rettv; + { +! rettv->vval.v_number = mch_can_exe(get_tv_string(&argvars[0])); + } + + /* +--- 10048,10069 ---- + typval_T *argvars; + typval_T *rettv; + { +! rettv->vval.v_number = mch_can_exe(get_tv_string(&argvars[0]), NULL); +! } +! +! /* +! * "exepath()" function +! */ +! static void +! f_exepath(argvars, rettv) +! typval_T *argvars; +! typval_T *rettv; +! { +! char_u *p = NULL; +! +! (void)mch_can_exe(get_tv_string(&argvars[0]), &p); +! rettv->v_type = VAR_STRING; +! rettv->vval.v_string = p; + } + + /* +*** ../vim-7.4.234/src/misc1.c 2014-03-12 18:55:52.100906804 +0100 +--- src/misc1.c 2014-04-01 20:01:08.752782864 +0200 +*************** +*** 10728,10734 **** + return; + + /* If the file isn't executable, may not add it. Do accept directories. */ +! if (!isdir && (flags & EW_EXEC) && !mch_can_exe(f)) + return; + + /* Make room for another item in the file list. */ +--- 10728,10734 ---- + return; + + /* If the file isn't executable, may not add it. Do accept directories. */ +! if (!isdir && (flags & EW_EXEC) && !mch_can_exe(f, NULL)) + return; + + /* Make room for another item in the file list. */ +*** ../vim-7.4.234/src/os_amiga.c 2013-05-06 04:06:04.000000000 +0200 +--- src/os_amiga.c 2014-04-01 20:19:50.804767429 +0200 +*************** +*** 884,891 **** + * Return -1 if unknown. + */ + int +! mch_can_exe(name) + char_u *name; + { + /* TODO */ + return -1; +--- 884,892 ---- + * Return -1 if unknown. + */ + int +! mch_can_exe(name, path) + char_u *name; ++ char_u **path; + { + /* TODO */ + return -1; +*** ../vim-7.4.234/src/os_msdos.c 2014-03-23 15:12:29.931264336 +0100 +--- src/os_msdos.c 2014-04-01 20:02:39.996781608 +0200 +*************** +*** 2945,2958 **** + * Return -1 if unknown. + */ + int +! mch_can_exe(name) + char_u *name; + { + char *p; + + p = searchpath(name); + if (p == NULL || mch_isdir(p)) + return FALSE; + return TRUE; + } + +--- 2945,2961 ---- + * Return -1 if unknown. + */ + int +! mch_can_exe(name, path) + char_u *name; ++ char_u **path; + { + char *p; + + p = searchpath(name); + if (p == NULL || mch_isdir(p)) + return FALSE; ++ if (path != NULL) ++ *path = vim_strsave(p); + return TRUE; + } + +*** ../vim-7.4.234/src/os_unix.c 2014-03-12 16:51:35.060792541 +0100 +--- src/os_unix.c 2014-04-01 20:46:21.304745550 +0200 +*************** +*** 2992,2999 **** + * Return -1 if unknown. + */ + int +! mch_can_exe(name) + char_u *name; + { + char_u *buf; + char_u *p, *e; +--- 2992,3000 ---- + * Return -1 if unknown. + */ + int +! mch_can_exe(name, path) + char_u *name; ++ char_u **path; + { + char_u *buf; + char_u *p, *e; +*************** +*** 3003,3009 **** + if (mch_isFullName(name) || (name[0] == '.' && (name[1] == '/' + || (name[1] == '.' && name[2] == '/')))) + { +! return executable_file(name); + } + + p = (char_u *)getenv("PATH"); +--- 3004,3021 ---- + if (mch_isFullName(name) || (name[0] == '.' && (name[1] == '/' + || (name[1] == '.' && name[2] == '/')))) + { +! if (executable_file(name)) +! { +! if (path != NULL) +! { +! if (name[0] == '.') +! *path = FullName_save(name, TRUE); +! else +! *path = vim_strsave(name); +! } +! return TRUE; +! } +! return FALSE; + } + + p = (char_u *)getenv("PATH"); +*************** +*** 3032,3038 **** +--- 3044,3059 ---- + STRCAT(buf, name); + retval = executable_file(buf); + if (retval == 1) ++ { ++ if (path != NULL) ++ { ++ if (buf[0] == '.') ++ *path = FullName_save(buf, TRUE); ++ else ++ *path = vim_strsave(buf); ++ } + break; ++ } + + if (*e != ':') + break; +*************** +*** 5592,5598 **** + continue; + + /* Skip files that are not executable if we check for that. */ +! if (!dir && (flags & EW_EXEC) && !mch_can_exe(p)) + continue; + + if (--files_free == 0) +--- 5613,5619 ---- + continue; + + /* Skip files that are not executable if we check for that. */ +! if (!dir && (flags & EW_EXEC) && !mch_can_exe(p, NULL)) + continue; + + if (--files_free == 0) +*************** +*** 6090,6096 **** + continue; + + /* Skip files that are not executable if we check for that. */ +! if (!dir && (flags & EW_EXEC) && !mch_can_exe((*file)[i])) + continue; + + p = alloc((unsigned)(STRLEN((*file)[i]) + 1 + dir)); +--- 6111,6117 ---- + continue; + + /* Skip files that are not executable if we check for that. */ +! if (!dir && (flags & EW_EXEC) && !mch_can_exe((*file)[i], NULL)) + continue; + + p = alloc((unsigned)(STRLEN((*file)[i]) + 1 + dir)); +*************** +*** 6317,6323 **** + + /* Reads gpm event and adds special keys to input buf. Returns length of + * generated key sequence. +! * This function is made after gui_send_mouse_event + */ + static int + mch_gpm_process() +--- 6338,6344 ---- + + /* Reads gpm event and adds special keys to input buf. Returns length of + * generated key sequence. +! * This function is styled after gui_send_mouse_event(). + */ + static int + mch_gpm_process() +*** ../vim-7.4.234/src/os_vms.c 2014-03-12 16:51:35.060792541 +0100 +--- src/os_vms.c 2014-04-01 20:05:52.960778954 +0200 +*************** +*** 483,489 **** + continue; + + /* Skip files that are not executable if we check for that. */ +! if (!dir && (flags & EW_EXEC) && !mch_can_exe(vms_fmatch[i])) + continue; + + /* allocate memory for pointers */ +--- 483,489 ---- + continue; + + /* Skip files that are not executable if we check for that. */ +! if (!dir && (flags & EW_EXEC) && !mch_can_exe(vms_fmatch[i], NULL)) + continue; + + /* allocate memory for pointers */ +*** ../vim-7.4.234/src/os_win32.c 2014-02-11 17:05:57.282217857 +0100 +--- src/os_win32.c 2014-04-01 20:26:07.432762248 +0200 +*************** +*** 1882,1888 **** + * TODO: Should somehow check if it's really executable. + */ + static int +! executable_exists(char *name) + { + char *dum; + char fname[_MAX_PATH]; +--- 1882,1888 ---- + * TODO: Should somehow check if it's really executable. + */ + static int +! executable_exists(char *name, char_u **path) + { + char *dum; + char fname[_MAX_PATH]; +*************** +*** 1905,1910 **** +--- 1905,1912 ---- + return FALSE; + if (GetFileAttributesW(fnamew) & FILE_ATTRIBUTE_DIRECTORY) + return FALSE; ++ if (path != NULL) ++ *path = utf16_to_enc(fnamew, NULL); + return TRUE; + } + /* Retry with non-wide function (for Windows 98). */ +*************** +*** 1915,1920 **** +--- 1917,1924 ---- + return FALSE; + if (mch_isdir(fname)) + return FALSE; ++ if (path != NULL) ++ *path = vim_strsave(fname); + return TRUE; + } + +*************** +*** 1996,2002 **** + vimrun_path = (char *)vim_strsave(vimrun_location); + s_dont_use_vimrun = FALSE; + } +! else if (executable_exists("vimrun.exe")) + s_dont_use_vimrun = FALSE; + + /* Don't give the warning for a missing vimrun.exe right now, but only +--- 2000,2006 ---- + vimrun_path = (char *)vim_strsave(vimrun_location); + s_dont_use_vimrun = FALSE; + } +! else if (executable_exists("vimrun.exe", NULL)) + s_dont_use_vimrun = FALSE; + + /* Don't give the warning for a missing vimrun.exe right now, but only +*************** +*** 2010,2016 **** + * If "finstr.exe" doesn't exist, use "grep -n" for 'grepprg'. + * Otherwise the default "findstr /n" is used. + */ +! if (!executable_exists("findstr.exe")) + set_option_value((char_u *)"grepprg", 0, (char_u *)"grep -n", 0); + + #ifdef FEAT_CLIPBOARD +--- 2014,2020 ---- + * If "finstr.exe" doesn't exist, use "grep -n" for 'grepprg'. + * Otherwise the default "findstr /n" is used. + */ +! if (!executable_exists("findstr.exe", NULL)) + set_option_value((char_u *)"grepprg", 0, (char_u *)"grep -n", 0); + + #ifdef FEAT_CLIPBOARD +*************** +*** 3330,3336 **** + * Return -1 if unknown. + */ + int +! mch_can_exe(char_u *name) + { + char_u buf[_MAX_PATH]; + int len = (int)STRLEN(name); +--- 3334,3340 ---- + * Return -1 if unknown. + */ + int +! mch_can_exe(char_u *name, char_u **path) + { + char_u buf[_MAX_PATH]; + int len = (int)STRLEN(name); +*************** +*** 3343,3349 **** + * this with a Unix-shell like 'shell'. */ + if (vim_strchr(gettail(name), '.') != NULL + || strstr((char *)gettail(p_sh), "sh") != NULL) +! if (executable_exists((char *)name)) + return TRUE; + + /* +--- 3347,3353 ---- + * this with a Unix-shell like 'shell'. */ + if (vim_strchr(gettail(name), '.') != NULL + || strstr((char *)gettail(p_sh), "sh") != NULL) +! if (executable_exists((char *)name, path)) + return TRUE; + + /* +*************** +*** 3365,3371 **** + } + else + copy_option_part(&p, buf + len, _MAX_PATH - len, ";"); +! if (executable_exists((char *)buf)) + return TRUE; + } + return FALSE; +--- 3369,3375 ---- + } + else + copy_option_part(&p, buf + len, _MAX_PATH - len, ";"); +! if (executable_exists((char *)buf, path)) + return TRUE; + } + return FALSE; +*** ../vim-7.4.234/src/proto/os_amiga.pro 2013-08-10 13:37:37.000000000 +0200 +--- src/proto/os_amiga.pro 2014-04-01 20:41:23.672749644 +0200 +*************** +*** 26,32 **** + void mch_hide __ARGS((char_u *name)); + int mch_isdir __ARGS((char_u *name)); + int mch_mkdir __ARGS((char_u *name)); +! int mch_can_exe __ARGS((char_u *name)); + int mch_nodetype __ARGS((char_u *name)); + void mch_early_init __ARGS((void)); + void mch_exit __ARGS((int r)); +--- 26,32 ---- + void mch_hide __ARGS((char_u *name)); + int mch_isdir __ARGS((char_u *name)); + int mch_mkdir __ARGS((char_u *name)); +! int mch_can_exe __ARGS((char_u *name, char_u **path)); + int mch_nodetype __ARGS((char_u *name)); + void mch_early_init __ARGS((void)); + void mch_exit __ARGS((int r)); +*** ../vim-7.4.234/src/proto/os_msdos.pro 2013-08-10 13:37:37.000000000 +0200 +--- src/proto/os_msdos.pro 2014-04-01 20:41:32.432749524 +0200 +*************** +*** 38,44 **** + int mch_setperm __ARGS((char_u *name, long perm)); + void mch_hide __ARGS((char_u *name)); + int mch_isdir __ARGS((char_u *name)); +! int mch_can_exe __ARGS((char_u *name)); + int mch_nodetype __ARGS((char_u *name)); + int mch_dirname __ARGS((char_u *buf, int len)); + int mch_remove __ARGS((char_u *name)); +--- 38,44 ---- + int mch_setperm __ARGS((char_u *name, long perm)); + void mch_hide __ARGS((char_u *name)); + int mch_isdir __ARGS((char_u *name)); +! int mch_can_exe __ARGS((char_u *name, char_u **path)); + int mch_nodetype __ARGS((char_u *name)); + int mch_dirname __ARGS((char_u *buf, int len)); + int mch_remove __ARGS((char_u *name)); +*** ../vim-7.4.234/src/proto/os_unix.pro 2013-08-10 13:37:23.000000000 +0200 +--- src/proto/os_unix.pro 2014-04-01 20:41:58.712749162 +0200 +*************** +*** 42,48 **** + void mch_free_acl __ARGS((vim_acl_T aclent)); + void mch_hide __ARGS((char_u *name)); + int mch_isdir __ARGS((char_u *name)); +! int mch_can_exe __ARGS((char_u *name)); + int mch_nodetype __ARGS((char_u *name)); + void mch_early_init __ARGS((void)); + void mch_free_mem __ARGS((void)); +--- 42,48 ---- + void mch_free_acl __ARGS((vim_acl_T aclent)); + void mch_hide __ARGS((char_u *name)); + int mch_isdir __ARGS((char_u *name)); +! int mch_can_exe __ARGS((char_u *name, char_u **path)); + int mch_nodetype __ARGS((char_u *name)); + void mch_early_init __ARGS((void)); + void mch_free_mem __ARGS((void)); +*** ../vim-7.4.234/src/proto/os_win32.pro 2013-08-10 13:37:38.000000000 +0200 +--- src/proto/os_win32.pro 2014-04-01 20:42:16.992748911 +0200 +*************** +*** 26,32 **** + int mch_is_linked __ARGS((char_u *fname)); + int win32_fileinfo __ARGS((char_u *fname, BY_HANDLE_FILE_INFORMATION *info)); + int mch_writable __ARGS((char_u *name)); +! int mch_can_exe __ARGS((char_u *name)); + int mch_nodetype __ARGS((char_u *name)); + vim_acl_T mch_get_acl __ARGS((char_u *fname)); + void mch_set_acl __ARGS((char_u *fname, vim_acl_T acl)); +--- 26,32 ---- + int mch_is_linked __ARGS((char_u *fname)); + int win32_fileinfo __ARGS((char_u *fname, BY_HANDLE_FILE_INFORMATION *info)); + int mch_writable __ARGS((char_u *name)); +! int mch_can_exe __ARGS((char_u *name, char_u **path)); + int mch_nodetype __ARGS((char_u *name)); + vim_acl_T mch_get_acl __ARGS((char_u *fname)); + void mch_set_acl __ARGS((char_u *fname, vim_acl_T acl)); +*** ../vim-7.4.234/runtime/doc/eval.txt 2014-04-01 19:55:46.244787300 +0200 +--- runtime/doc/eval.txt 2014-04-01 20:54:37.832738720 +0200 +*************** +*** 1561,1566 **** +--- 1562,1571 ---- + v:progpath Contains the command with which Vim was invoked, including the + path. Useful if you want to message a Vim server using a + |--remote-expr|. ++ To get the full path use: > ++ echo exepath(v:progpath) ++ < NOTE: This does not work when the command is a relative path ++ and the current directory has changed. + Read-only. + + *v:register* *register-variable* +*************** +*** 1761,1766 **** +--- 1766,1772 ---- + eval( {string}) any evaluate {string} into its value + eventhandler( ) Number TRUE if inside an event handler + executable( {expr}) Number 1 if executable {expr} exists ++ exepath( {expr}) String full path of the command {expr} + exists( {expr}) Number TRUE if {expr} exists + extend( {expr1}, {expr2} [, {expr3}]) + List/Dict insert items of {expr2} into {expr1} +*************** +*** 2705,2710 **** +--- 2711,2725 ---- + 0 does not exist + -1 not implemented on this system + ++ exepath({expr}) *exepath()* ++ If {expr} is an executable and is either an absolute path, a ++ relative path or found in $PATH, return the full path. ++ Note that the current directory is used when {expr} starts ++ with "./", which may be a problem for Vim: > ++ echo exepath(v:progpath) ++ < If {expr} cannot be found in $PATH or is not executable then ++ an empty string is returned. ++ + *exists()* + exists({expr}) The result is a Number, which is non-zero if {expr} is + defined, zero otherwise. The {expr} argument is a string, +*** ../vim-7.4.234/src/version.c 2014-04-01 19:55:46.252787300 +0200 +--- src/version.c 2014-04-01 20:00:44.108783203 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 235, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +19. All of your friends have an @ in their names. + + /// 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/patches/source/vim/patches/7.4.236 b/patches/source/vim/patches/7.4.236 new file mode 100644 index 000000000..927b0436d --- /dev/null +++ b/patches/source/vim/patches/7.4.236 @@ -0,0 +1,159 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.236 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.236 +Problem: It's not that easy to check the Vim patch version. +Solution: Make has("patch-7.4.123") work. (partly by Marc Weber) +Files: runtime/doc/eval.txt, src/eval.c, src/testdir/test60.in, + src/testdir/test60.ok + + +*** ../vim-7.4.235/runtime/doc/eval.txt 2014-04-01 21:00:45.440733663 +0200 +--- runtime/doc/eval.txt 2014-04-01 21:19:52.232717888 +0200 +*************** +*** 6395,6407 **** + Example: > + :if has("gui_running") + < *has-patch* +! 3. Included patches. First check |v:version| for the version of Vim. +! Then the "patch123" feature means that patch 123 has been included for +! this version. Example (checking version 6.2.148 or later): > + :if v:version > 602 || v:version == 602 && has("patch148") +! < Note that it's possible for patch 147 to be omitted even though 148 is + included. + + all_builtin_terms Compiled with all builtin terminals enabled. + amiga Amiga version of Vim. + arabic Compiled with Arabic support |Arabic|. +--- 6408,6430 ---- + Example: > + :if has("gui_running") + < *has-patch* +! 3. Included patches. The "patch123" feature means that patch 123 has been +! included. Note that this form does not check the version of Vim, you need +! to inspect |v:version| for that: +! Example (checking version 6.2.148 or later): > + :if v:version > 602 || v:version == 602 && has("patch148") +! < Note that it's possible for patch 147 to be omitted even though 148 is + included. + ++ 4. Beyond a certain patch level. The "patch-7.4.123" feature means that ++ the Vim version is 7.4 and patch 123 or later was included, or the Vim ++ version is later than 7.4. ++ The example above can be simplified to: > ++ :if has("patch-6.2.148") ++ < Note that this does not check if the patch was actually included, some ++ patches may have been skipped. That is unusual though. ++ ++ acl Compiled with |ACL| support. + all_builtin_terms Compiled with all builtin terminals enabled. + amiga Amiga version of Vim. + arabic Compiled with Arabic support |Arabic|. +*** ../vim-7.4.235/src/eval.c 2014-04-01 21:00:45.428733664 +0200 +--- src/eval.c 2014-04-01 21:50:59.084692208 +0200 +*************** +*** 12638,12644 **** + if (n == FALSE) + { + if (STRNICMP(name, "patch", 5) == 0) +! n = has_patch(atoi((char *)name + 5)); + else if (STRICMP(name, "vim_starting") == 0) + n = (starting != 0); + #ifdef FEAT_MBYTE +--- 12638,12664 ---- + if (n == FALSE) + { + if (STRNICMP(name, "patch", 5) == 0) +! { +! if (name[5] == '-' +! && STRLEN(name) > 11 +! && vim_isdigit(name[6]) +! && vim_isdigit(name[8]) +! && vim_isdigit(name[10])) +! { +! int major = atoi((char *)name + 6); +! int minor = atoi((char *)name + 8); +! int patch = atoi((char *)name + 10); +! +! /* Expect "patch-9.9.01234". */ +! n = (major < VIM_VERSION_MAJOR +! || (major == VIM_VERSION_MAJOR +! && (minor < VIM_VERSION_MINOR +! || (minor == VIM_VERSION_MINOR +! && patch <= highest_patch())))); +! } +! else +! n = has_patch(atoi((char *)name + 5)); +! } + else if (STRICMP(name, "vim_starting") == 0) + n = (starting != 0); + #ifdef FEAT_MBYTE +*** ../vim-7.4.235/src/testdir/test60.in 2014-01-14 15:24:24.000000000 +0100 +--- src/testdir/test60.in 2014-04-01 22:01:40.256683388 +0200 +*************** +*** 1,4 **** +! Tests for the exists() function. vim: set ft=vim ts=8 : + + STARTTEST + :so small.vim +--- 1,4 ---- +! Tests for the exists() and has() functions. vim: set ft=vim ts=8 sw=2 : + + STARTTEST + :so small.vim +*************** +*** 588,593 **** +--- 588,603 ---- + redir END + endfunction + :call TestExists() ++ :" ++ :function TestHas() ++ redir >> test.out ++ for pl in ['6.9.999', '7.1.999', '7.4.123', '9.1.0', '9.9.1'] ++ echo 'has patch ' . pl . ': ' . has('patch-' . pl) ++ endfor ++ redir END ++ endfunc ++ :call TestHas() ++ :" + :delfunc TestExists + :delfunc RunTest + :delfunc TestFuncArg +*** ../vim-7.4.235/src/testdir/test60.ok 2014-01-14 15:24:24.000000000 +0100 +--- src/testdir/test60.ok 2014-04-01 22:01:46.664683300 +0200 +*************** +*** 204,206 **** +--- 204,211 ---- + g:footest#x = 1 + footest#F() 0 + UndefFun() 0 ++ has patch 6.9.999: 1 ++ has patch 7.1.999: 1 ++ has patch 7.4.123: 1 ++ has patch 9.1.0: 0 ++ has patch 9.9.1: 0 +*** ../vim-7.4.235/src/version.c 2014-04-01 21:00:45.440733663 +0200 +--- src/version.c 2014-04-01 21:22:27.964715746 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 236, + /**/ + +-- +When a fly lands on the ceiling, does it do a half roll or +a half loop? + + /// 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/patches/source/vim/patches/7.4.237 b/patches/source/vim/patches/7.4.237 new file mode 100644 index 000000000..02f940502 --- /dev/null +++ b/patches/source/vim/patches/7.4.237 @@ -0,0 +1,127 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.237 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.237 (after 7.4.236) +Problem: When some patches was not included has("patch-7.4.123") may return + true falsely. +Solution: Check for the specific patch number. +Files: runtime/doc/eval.txt, src/eval.c + + +*** ../vim-7.4.236/runtime/doc/eval.txt 2014-04-01 22:08:51.008677463 +0200 +--- runtime/doc/eval.txt 2014-04-02 12:09:35.991983552 +0200 +*************** +*** 1681,1687 **** + is 501. Read-only. "version" also works, for backwards + compatibility. + Use |has()| to check if a certain patch was included, e.g.: > +! if has("patch123") + < Note that patch numbers are specific to the version, thus both + version 5.0 and 5.1 may have a patch 123, but these are + completely different. +--- 1682,1688 ---- + is 501. Read-only. "version" also works, for backwards + compatibility. + Use |has()| to check if a certain patch was included, e.g.: > +! if has("patch-7.4.123") + < Note that patch numbers are specific to the version, thus both + version 5.0 and 5.1 may have a patch 123, but these are + completely different. +*************** +*** 6397,6415 **** + < *has-patch* + 3. Included patches. The "patch123" feature means that patch 123 has been + included. Note that this form does not check the version of Vim, you need +! to inspect |v:version| for that: + Example (checking version 6.2.148 or later): > + :if v:version > 602 || v:version == 602 && has("patch148") + < Note that it's possible for patch 147 to be omitted even though 148 is + included. + +! 4. Beyond a certain patch level. The "patch-7.4.123" feature means that +! the Vim version is 7.4 and patch 123 or later was included, or the Vim +! version is later than 7.4. + The example above can be simplified to: > + :if has("patch-6.2.148") +! < Note that this does not check if the patch was actually included, some +! patches may have been skipped. That is unusual though. + + acl Compiled with |ACL| support. + all_builtin_terms Compiled with all builtin terminals enabled. +--- 6410,6428 ---- + < *has-patch* + 3. Included patches. The "patch123" feature means that patch 123 has been + included. Note that this form does not check the version of Vim, you need +! to inspect |v:version| for that. + Example (checking version 6.2.148 or later): > + :if v:version > 602 || v:version == 602 && has("patch148") + < Note that it's possible for patch 147 to be omitted even though 148 is + included. + +! 4. Beyond a certain version or at a certain version and including a specific +! patch. The "patch-7.4.123" feature means that the Vim version is 7.5 or +! later, or it is version 7.4 and patch 123 was included. + The example above can be simplified to: > + :if has("patch-6.2.148") +! < Note that it's possible for patch 147 to be omitted even though 148 is +! included. + + acl Compiled with |ACL| support. + all_builtin_terms Compiled with all builtin terminals enabled. +*** ../vim-7.4.236/src/eval.c 2014-04-01 22:08:51.016677463 +0200 +--- src/eval.c 2014-04-02 12:04:41.179987607 +0200 +*************** +*** 12647,12660 **** + { + int major = atoi((char *)name + 6); + int minor = atoi((char *)name + 8); +- int patch = atoi((char *)name + 10); + + /* Expect "patch-9.9.01234". */ + n = (major < VIM_VERSION_MAJOR + || (major == VIM_VERSION_MAJOR + && (minor < VIM_VERSION_MINOR + || (minor == VIM_VERSION_MINOR +! && patch <= highest_patch())))); + } + else + n = has_patch(atoi((char *)name + 5)); +--- 12647,12659 ---- + { + int major = atoi((char *)name + 6); + int minor = atoi((char *)name + 8); + + /* Expect "patch-9.9.01234". */ + n = (major < VIM_VERSION_MAJOR + || (major == VIM_VERSION_MAJOR + && (minor < VIM_VERSION_MINOR + || (minor == VIM_VERSION_MINOR +! && has_patch(atoi((char *)name + 10)))))); + } + else + n = has_patch(atoi((char *)name + 5)); +*** ../vim-7.4.236/src/version.c 2014-04-01 22:08:51.016677463 +0200 +--- src/version.c 2014-04-02 12:10:48.911982549 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 237, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +22. You've already visited all the links at Yahoo and you're halfway through + Lycos. + + /// 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/patches/source/vim/patches/7.4.238 b/patches/source/vim/patches/7.4.238 new file mode 100644 index 000000000..bec909841 --- /dev/null +++ b/patches/source/vim/patches/7.4.238 @@ -0,0 +1,505 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.238 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.238 +Problem: Vim does not support the smack library. +Solution: Add smack support (Jose Bollo) +Files: src/config.h.in, src/configure.in, src/fileio.c, src/memfile.c, + src/os_unix.c, src/undo.c, src/auto/configure + + +*** ../vim-7.4.237/src/config.h.in 2014-02-23 22:52:33.364764715 +0100 +--- src/config.h.in 2014-04-02 13:37:41.095910851 +0200 +*************** +*** 191,196 **** +--- 191,197 ---- + #undef HAVE_SIGSETJMP + #undef HAVE_SIGSTACK + #undef HAVE_SIGVEC ++ #undef HAVE_SMACK + #undef HAVE_STRCASECMP + #undef HAVE_STRERROR + #undef HAVE_STRFTIME +*** ../vim-7.4.237/src/configure.in 2014-03-27 18:51:06.604760919 +0100 +--- src/configure.in 2014-04-02 13:49:36.955901004 +0200 +*************** +*** 387,406 **** + AC_SUBST(QUOTESED) + + +! dnl Link with -lselinux for SELinux stuff; if not found +! AC_MSG_CHECKING(--disable-selinux argument) +! AC_ARG_ENABLE(selinux, +! [ --disable-selinux Don't check for SELinux support.], +! , enable_selinux="yes") +! if test "$enable_selinux" = "yes"; then + AC_MSG_RESULT(no) +! AC_CHECK_LIB(selinux, is_selinux_enabled, +! [LIBS="$LIBS -lselinux" +! AC_DEFINE(HAVE_SELINUX)]) + else + AC_MSG_RESULT(yes) + fi + + dnl Check user requested features. + + AC_MSG_CHECKING(--with-features argument) +--- 387,427 ---- + AC_SUBST(QUOTESED) + + +! dnl Link with -lsmack for Smack stuff; if not found +! AC_MSG_CHECKING(--disable-smack argument) +! AC_ARG_ENABLE(smack, +! [ --disable-smack Do not check for Smack support.], +! , enable_smack="yes") +! if test "$enable_smack" = "yes"; then +! AC_CHECK_HEADER([linux/xattr.h], true, enable_smack="no") +! fi +! if test "$enable_smack" = "yes"; then + AC_MSG_RESULT(no) +! AC_CHECK_LIB(attr, llistxattr, +! [LIBS="$LIBS -lattr" +! found_smack="yes" +! AC_DEFINE(HAVE_SMACK)]) + else + AC_MSG_RESULT(yes) + fi + ++ dnl When smack was found don't search for SELinux ++ if test "x$found_smack" = "x"; then ++ dnl Link with -lselinux for SELinux stuff; if not found ++ AC_MSG_CHECKING(--disable-selinux argument) ++ AC_ARG_ENABLE(selinux, ++ [ --disable-selinux Do not check for SELinux support.], ++ , enable_selinux="yes") ++ if test "$enable_selinux" = "yes"; then ++ AC_MSG_RESULT(no) ++ AC_CHECK_LIB(selinux, is_selinux_enabled, ++ [LIBS="$LIBS -lselinux" ++ AC_DEFINE(HAVE_SELINUX)]) ++ else ++ AC_MSG_RESULT(yes) ++ fi ++ fi ++ + dnl Check user requested features. + + AC_MSG_CHECKING(--with-features argument) +*** ../vim-7.4.237/src/fileio.c 2014-03-12 16:51:35.056792541 +0100 +--- src/fileio.c 2014-04-02 13:39:28.983909367 +0200 +*************** +*** 4030,4036 **** + ) + mch_setperm(backup, + (perm & 0707) | ((perm & 07) << 3)); +! # ifdef HAVE_SELINUX + mch_copy_sec(fname, backup); + # endif + #endif +--- 4030,4036 ---- + ) + mch_setperm(backup, + (perm & 0707) | ((perm & 07) << 3)); +! # if defined(HAVE_SELINUX) || defined(HAVE_SMACK) + mch_copy_sec(fname, backup); + # endif + #endif +*************** +*** 4069,4075 **** + #ifdef HAVE_ACL + mch_set_acl(backup, acl); + #endif +! #ifdef HAVE_SELINUX + mch_copy_sec(fname, backup); + #endif + break; +--- 4069,4075 ---- + #ifdef HAVE_ACL + mch_set_acl(backup, acl); + #endif +! #if defined(HAVE_SELINUX) || defined(HAVE_SMACK) + mch_copy_sec(fname, backup); + #endif + break; +*************** +*** 4718,4724 **** + } + #endif + +! #ifdef HAVE_SELINUX + /* Probably need to set the security context. */ + if (!backup_copy) + mch_copy_sec(backup, wfname); +--- 4718,4724 ---- + } + #endif + +! #if defined(HAVE_SELINUX) || defined(HAVE_SMACK) + /* Probably need to set the security context. */ + if (!backup_copy) + mch_copy_sec(backup, wfname); +*************** +*** 6707,6713 **** + mch_set_acl(to, acl); + mch_free_acl(acl); + #endif +! #ifdef HAVE_SELINUX + mch_copy_sec(from, to); + #endif + if (errmsg != NULL) +--- 6707,6713 ---- + mch_set_acl(to, acl); + mch_free_acl(acl); + #endif +! #if defined(HAVE_SELINUX) || defined(HAVE_SMACK) + mch_copy_sec(from, to); + #endif + if (errmsg != NULL) +*** ../vim-7.4.237/src/memfile.c 2013-05-23 22:22:22.000000000 +0200 +--- src/memfile.c 2014-04-02 13:37:41.103910851 +0200 +*************** +*** 1358,1364 **** + if (fdflags >= 0 && (fdflags & FD_CLOEXEC) == 0) + fcntl(mfp->mf_fd, F_SETFD, fdflags | FD_CLOEXEC); + #endif +! #ifdef HAVE_SELINUX + mch_copy_sec(fname, mfp->mf_fname); + #endif + mch_hide(mfp->mf_fname); /* try setting the 'hidden' flag */ +--- 1358,1364 ---- + if (fdflags >= 0 && (fdflags & FD_CLOEXEC) == 0) + fcntl(mfp->mf_fd, F_SETFD, fdflags | FD_CLOEXEC); + #endif +! #if defined(HAVE_SELINUX) || defined(HAVE_SMACK) + mch_copy_sec(fname, mfp->mf_fname); + #endif + mch_hide(mfp->mf_fname); /* try setting the 'hidden' flag */ +*** ../vim-7.4.237/src/os_unix.c 2014-04-01 21:00:45.436733663 +0200 +--- src/os_unix.c 2014-04-02 13:58:55.427893322 +0200 +*************** +*** 46,51 **** +--- 46,59 ---- + static int selinux_enabled = -1; + #endif + ++ #ifdef HAVE_SMACK ++ # include <attr/xattr.h> ++ # include <linux/xattr.h> ++ # ifndef SMACK_LABEL_LEN ++ # define SMACK_LABEL_LEN 1024 ++ # endif ++ #endif ++ + /* + * Use this prototype for select, some include files have a wrong prototype + */ +*************** +*** 2798,2803 **** +--- 2806,2895 ---- + } + #endif /* HAVE_SELINUX */ + ++ #if defined(HAVE_SMACK) && !defined(PROTO) ++ /* ++ * Copy security info from "from_file" to "to_file". ++ */ ++ void ++ mch_copy_sec(from_file, to_file) ++ char_u *from_file; ++ char_u *to_file; ++ { ++ static const char const *smack_copied_attributes[] = ++ { ++ XATTR_NAME_SMACK, ++ XATTR_NAME_SMACKEXEC, ++ XATTR_NAME_SMACKMMAP ++ }; ++ ++ char buffer[SMACK_LABEL_LEN]; ++ const char *name; ++ int index; ++ int ret; ++ ssize_t size; ++ ++ if (from_file == NULL) ++ return; ++ ++ for (index = 0 ; index < (int)(sizeof(smack_copied_attributes) ++ / sizeof(smack_copied_attributes)[0]) ; index++) ++ { ++ /* get the name of the attribute to copy */ ++ name = smack_copied_attributes[index]; ++ ++ /* get the value of the attribute in buffer */ ++ size = getxattr((char*)from_file, name, buffer, sizeof(buffer)); ++ if (size >= 0) ++ { ++ /* copy the attribute value of buffer */ ++ ret = setxattr((char*)to_file, name, buffer, (size_t)size, 0); ++ if (ret < 0) ++ { ++ MSG_PUTS(_("Could not set security context ")); ++ MSG_PUTS(name); ++ MSG_PUTS(_(" for ")); ++ msg_outtrans(to_file); ++ msg_putchar('\n'); ++ } ++ } ++ else ++ { ++ /* what reason of not having the attribute value? */ ++ switch (errno) ++ { ++ case ENOTSUP: ++ /* extended attributes aren't supported or enabled */ ++ /* should a message be echoed? not sure... */ ++ return; /* leave because it isn't usefull to continue */ ++ ++ case ERANGE: ++ default: ++ /* no enough size OR unexpected error */ ++ MSG_PUTS(_("Could not get security context ")); ++ MSG_PUTS(name); ++ MSG_PUTS(_(" for ")); ++ msg_outtrans(from_file); ++ MSG_PUTS(_(". Removing it!\n")); ++ /* FALLTHROUGH to remove the attribute */ ++ ++ case ENODATA: ++ /* no attribute of this name */ ++ ret = removexattr((char*)to_file, name); ++ if (ret < 0 && errno != ENODATA) ++ { ++ MSG_PUTS(_("Could not remove security context ")); ++ MSG_PUTS(name); ++ MSG_PUTS(_(" for ")); ++ msg_outtrans(to_file); ++ msg_putchar('\n'); ++ } ++ break; ++ } ++ } ++ } ++ } ++ #endif /* HAVE_SMACK */ ++ + /* + * Return a pointer to the ACL of file "fname" in allocated memory. + * Return NULL if the ACL is not available for whatever reason. +*** ../vim-7.4.237/src/undo.c 2014-03-23 15:12:29.943264337 +0100 +--- src/undo.c 2014-04-02 13:42:15.387907078 +0200 +*************** +*** 1455,1461 **** + # endif + ) + mch_setperm(file_name, (perm & 0707) | ((perm & 07) << 3)); +! # ifdef HAVE_SELINUX + if (buf->b_ffname != NULL) + mch_copy_sec(buf->b_ffname, file_name); + # endif +--- 1455,1461 ---- + # endif + ) + mch_setperm(file_name, (perm & 0707) | ((perm & 07) << 3)); +! # if defined(HAVE_SELINUX) || defined(HAVE_SMACK) + if (buf->b_ffname != NULL) + mch_copy_sec(buf->b_ffname, file_name); + # endif +*** ../vim-7.4.237/src/auto/configure 2014-03-27 18:51:06.612760919 +0100 +--- src/auto/configure 2014-04-02 13:50:11.375900531 +0200 +*************** +*** 782,787 **** +--- 782,788 ---- + with_view_name + with_global_runtime + with_modified_by ++ enable_smack + enable_selinux + with_features + with_compiledby +*************** +*** 1453,1459 **** + --enable-fail-if-missing Fail if dependencies on additional features + specified on the command line are missing. + --disable-darwin Disable Darwin (Mac OS X) support. +! --disable-selinux Don't check for SELinux support. + --disable-xsmp Disable XSMP session management + --disable-xsmp-interact Disable XSMP interaction + --enable-luainterp=OPTS Include Lua interpreter. default=no OPTS=no/yes/dynamic +--- 1454,1461 ---- + --enable-fail-if-missing Fail if dependencies on additional features + specified on the command line are missing. + --disable-darwin Disable Darwin (Mac OS X) support. +! --disable-smack Do not check for Smack support. +! --disable-selinux Do not check for SELinux support. + --disable-xsmp Disable XSMP session management + --disable-xsmp-interact Disable XSMP interaction + --enable-luainterp=OPTS Include Lua interpreter. default=no OPTS=no/yes/dynamic +*************** +*** 4588,4606 **** + + + +! { $as_echo "$as_me:${as_lineno-$LINENO}: checking --disable-selinux argument" >&5 + $as_echo_n "checking --disable-selinux argument... " >&6; } +! # Check whether --enable-selinux was given. + if test "${enable_selinux+set}" = set; then : + enableval=$enable_selinux; + else + enable_selinux="yes" + fi + +! if test "$enable_selinux" = "yes"; then +! { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + $as_echo "no" >&6; } +! { $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_selinux_enabled in -lselinux" >&5 + $as_echo_n "checking for is_selinux_enabled in -lselinux... " >&6; } + if ${ac_cv_lib_selinux_is_selinux_enabled+:} false; then : + $as_echo_n "(cached) " >&6 +--- 4590,4679 ---- + + + +! { $as_echo "$as_me:${as_lineno-$LINENO}: checking --disable-smack argument" >&5 +! $as_echo_n "checking --disable-smack argument... " >&6; } +! # Check whether --enable-smack was given. +! if test "${enable_smack+set}" = set; then : +! enableval=$enable_smack; +! else +! enable_smack="yes" +! fi +! +! if test "$enable_smack" = "yes"; then +! ac_fn_c_check_header_mongrel "$LINENO" "linux/xattr.h" "ac_cv_header_linux_xattr_h" "$ac_includes_default" +! if test "x$ac_cv_header_linux_xattr_h" = xyes; then : +! true +! else +! enable_smack="no" +! fi +! +! +! fi +! if test "$enable_smack" = "yes"; then +! { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +! $as_echo "no" >&6; } +! { $as_echo "$as_me:${as_lineno-$LINENO}: checking for llistxattr in -lattr" >&5 +! $as_echo_n "checking for llistxattr in -lattr... " >&6; } +! if ${ac_cv_lib_attr_llistxattr+:} false; then : +! $as_echo_n "(cached) " >&6 +! else +! ac_check_lib_save_LIBS=$LIBS +! LIBS="-lattr $LIBS" +! cat confdefs.h - <<_ACEOF >conftest.$ac_ext +! /* end confdefs.h. */ +! +! /* Override any GCC internal prototype to avoid an error. +! Use char because int might match the return type of a GCC +! builtin and then its argument prototype would still apply. */ +! #ifdef __cplusplus +! extern "C" +! #endif +! char llistxattr (); +! int +! main () +! { +! return llistxattr (); +! ; +! return 0; +! } +! _ACEOF +! if ac_fn_c_try_link "$LINENO"; then : +! ac_cv_lib_attr_llistxattr=yes +! else +! ac_cv_lib_attr_llistxattr=no +! fi +! rm -f core conftest.err conftest.$ac_objext \ +! conftest$ac_exeext conftest.$ac_ext +! LIBS=$ac_check_lib_save_LIBS +! fi +! { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_attr_llistxattr" >&5 +! $as_echo "$ac_cv_lib_attr_llistxattr" >&6; } +! if test "x$ac_cv_lib_attr_llistxattr" = xyes; then : +! LIBS="$LIBS -lattr" +! found_smack="yes" +! $as_echo "#define HAVE_SMACK 1" >>confdefs.h +! +! fi +! +! else +! { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +! $as_echo "yes" >&6; } +! fi +! +! if test "x$found_smack" = "x"; then +! { $as_echo "$as_me:${as_lineno-$LINENO}: checking --disable-selinux argument" >&5 + $as_echo_n "checking --disable-selinux argument... " >&6; } +! # Check whether --enable-selinux was given. + if test "${enable_selinux+set}" = set; then : + enableval=$enable_selinux; + else + enable_selinux="yes" + fi + +! if test "$enable_selinux" = "yes"; then +! { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + $as_echo "no" >&6; } +! { $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_selinux_enabled in -lselinux" >&5 + $as_echo_n "checking for is_selinux_enabled in -lselinux... " >&6; } + if ${ac_cv_lib_selinux_is_selinux_enabled+:} false; then : + $as_echo_n "(cached) " >&6 +*************** +*** 4638,4650 **** + $as_echo "$ac_cv_lib_selinux_is_selinux_enabled" >&6; } + if test "x$ac_cv_lib_selinux_is_selinux_enabled" = xyes; then : + LIBS="$LIBS -lselinux" +! $as_echo "#define HAVE_SELINUX 1" >>confdefs.h + + fi + +! else +! { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + $as_echo "yes" >&6; } + fi + + +--- 4711,4724 ---- + $as_echo "$ac_cv_lib_selinux_is_selinux_enabled" >&6; } + if test "x$ac_cv_lib_selinux_is_selinux_enabled" = xyes; then : + LIBS="$LIBS -lselinux" +! $as_echo "#define HAVE_SELINUX 1" >>confdefs.h + + fi + +! else +! { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + $as_echo "yes" >&6; } ++ fi + fi + + +*** ../vim-7.4.237/src/version.c 2014-04-02 12:12:04.163981514 +0200 +--- src/version.c 2014-04-02 13:38:22.511910282 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 238, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +25. You believe nothing looks sexier than a man in boxer shorts illuminated + only by a 17" inch svga monitor. + + /// 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/patches/source/vim/patches/7.4.239 b/patches/source/vim/patches/7.4.239 new file mode 100644 index 000000000..5943d69f9 --- /dev/null +++ b/patches/source/vim/patches/7.4.239 @@ -0,0 +1,55 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.239 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.239 +Problem: ":e +" does not position cursor at end of the file. +Solution: Check for "+" being the last character (ZyX) +Files: src/ex_docmd.c + + +*** ../vim-7.4.238/src/ex_docmd.c 2014-04-01 18:54:44.312837673 +0200 +--- src/ex_docmd.c 2014-04-02 14:18:02.247877546 +0200 +*************** +*** 4841,4847 **** + if (*arg == '+') /* +[command] */ + { + ++arg; +! if (vim_isspace(*arg)) + command = dollar_command; + else + { +--- 4841,4847 ---- + if (*arg == '+') /* +[command] */ + { + ++arg; +! if (vim_isspace(*arg) || *arg == NUL) + command = dollar_command; + else + { +*** ../vim-7.4.238/src/version.c 2014-04-02 14:05:34.003887839 +0200 +--- src/version.c 2014-04-02 14:17:40.923877840 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 239, + /**/ + +-- +Q: What is the difference betwee open-source and commercial software? +A: If you have a problem with commercial software you can call a phone + number and they will tell you it might be solved in a future version. + For open-source software there isn't a phone number to call, but you + get the solution within a 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/patches/source/vim/patches/7.4.240 b/patches/source/vim/patches/7.4.240 new file mode 100644 index 000000000..e51e2e620 --- /dev/null +++ b/patches/source/vim/patches/7.4.240 @@ -0,0 +1,57 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.240 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.240 +Problem: ":tjump" shows "\n" as "\\n". +Solution: Skip over "\" that escapes a backslash. (Gary Johnson) +Files: src/tag.c + + +*** ../vim-7.4.239/src/tag.c 2013-11-28 14:36:24.000000000 +0100 +--- src/tag.c 2014-04-02 17:14:27.087731943 +0200 +*************** +*** 741,748 **** + break; + msg_advance(15); + +! /* skip backslash used for escaping command char */ +! if (*p == '\\' && *(p + 1) == *tagp.command) + ++p; + + if (*p == TAB) +--- 741,750 ---- + break; + msg_advance(15); + +! /* skip backslash used for escaping a command char or +! * a backslash */ +! if (*p == '\\' && (*(p + 1) == *tagp.command +! || *(p + 1) == '\\')) + ++p; + + if (*p == TAB) +*** ../vim-7.4.239/src/version.c 2014-04-02 14:22:00.123874274 +0200 +--- src/version.c 2014-04-02 17:15:26.395731128 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 240, + /**/ + +-- +Anyone who is capable of getting themselves made President should on no +account be allowed to do the job. + -- Douglas Adams, "The Hitchhiker's Guide to the Galaxy" + + /// 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/patches/source/vim/patches/7.4.241 b/patches/source/vim/patches/7.4.241 new file mode 100644 index 000000000..c7805c4c2 --- /dev/null +++ b/patches/source/vim/patches/7.4.241 @@ -0,0 +1,386 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.241 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.241 +Problem: The string returned by submatch() does not distinguish between a + NL from a line break and a NL that stands for a NUL character. +Solution: Add a second argument to return a list. (ZyX) +Files: runtime/doc/eval.txt, src/eval.c, src/proto/regexp.pro, + src/regexp.c, src/testdir/test79.in, src/testdir/test79.ok, + src/testdir/test80.in, src/testdir/test80.ok + + +*** ../vim-7.4.240/runtime/doc/eval.txt 2014-04-02 12:12:04.151981514 +0200 +--- runtime/doc/eval.txt 2014-04-02 17:56:51.163696948 +0200 +*************** +*** 1989,1995 **** + Number last index of {needle} in {haystack} + strtrans( {expr}) String translate string to make it printable + strwidth( {expr}) Number display cell length of the String {expr} +! submatch( {nr}) String specific match in ":s" or substitute() + substitute( {expr}, {pat}, {sub}, {flags}) + String all {pat} in {expr} replaced with {sub} + synID( {lnum}, {col}, {trans}) Number syntax ID at {lnum} and {col} +--- 1990,1997 ---- + Number last index of {needle} in {haystack} + strtrans( {expr}) String translate string to make it printable + strwidth( {expr}) Number display cell length of the String {expr} +! submatch( {nr}[, {list}]) String or List +! specific match in ":s" or substitute() + substitute( {expr}, {pat}, {sub}, {flags}) + String all {pat} in {expr} replaced with {sub} + synID( {lnum}, {col}, {trans}) Number syntax ID at {lnum} and {col} +*************** +*** 5784,5795 **** + Ambiguous, this function's return value depends on 'ambiwidth'. + Also see |strlen()|, |strdisplaywidth()| and |strchars()|. + +! submatch({nr}) *submatch()* + Only for an expression in a |:substitute| command or + substitute() function. + Returns the {nr}'th submatch of the matched text. When {nr} + is 0 the whole matched text is returned. + Also see |sub-replace-expression|. + Example: > + :s/\d\+/\=submatch(0) + 1/ + < This finds the first number in the line and adds one to it. +--- 5798,5820 ---- + Ambiguous, this function's return value depends on 'ambiwidth'. + Also see |strlen()|, |strdisplaywidth()| and |strchars()|. + +! submatch({nr}[, {list}]) *submatch()* + Only for an expression in a |:substitute| command or + substitute() function. + Returns the {nr}'th submatch of the matched text. When {nr} + is 0 the whole matched text is returned. ++ Note that a NL in the string can stand for a line break of a ++ multi-line match or a NUL character in the text. + Also see |sub-replace-expression|. ++ ++ If {list} is present and non-zero then submatch() returns ++ a list of strings, similar to |getline()| with two arguments. ++ NL characters in the text represent NUL characters in the ++ text. ++ Only returns more than one item for |:substitute|, inside ++ |substitute()| this list will always contain one or zero ++ items, since there are no real line breaks. ++ + Example: > + :s/\d\+/\=submatch(0) + 1/ + < This finds the first number in the line and adds one to it. +*** ../vim-7.4.240/src/eval.c 2014-04-02 12:12:04.159981514 +0200 +--- src/eval.c 2014-04-02 18:16:33.011680690 +0200 +*************** +*** 8129,8135 **** + {"strridx", 2, 3, f_strridx}, + {"strtrans", 1, 1, f_strtrans}, + {"strwidth", 1, 1, f_strwidth}, +! {"submatch", 1, 1, f_submatch}, + {"substitute", 4, 4, f_substitute}, + {"synID", 3, 3, f_synID}, + {"synIDattr", 2, 3, f_synIDattr}, +--- 8129,8135 ---- + {"strridx", 2, 3, f_strridx}, + {"strtrans", 1, 1, f_strtrans}, + {"strwidth", 1, 1, f_strwidth}, +! {"submatch", 1, 2, f_submatch}, + {"substitute", 4, 4, f_substitute}, + {"synID", 3, 3, f_synID}, + {"synIDattr", 2, 3, f_synIDattr}, +*************** +*** 17890,17898 **** + typval_T *argvars; + typval_T *rettv; + { +! rettv->v_type = VAR_STRING; +! rettv->vval.v_string = +! reg_submatch((int)get_tv_number_chk(&argvars[0], NULL)); + } + + /* +--- 17890,17921 ---- + typval_T *argvars; + typval_T *rettv; + { +! int error = FALSE; +! char_u **match; +! char_u **s; +! listitem_T *li; +! int no; +! int retList = 0; +! +! no = (int)get_tv_number_chk(&argvars[0], &error); +! if (error) +! return; +! error = FALSE; +! if (argvars[1].v_type != VAR_UNKNOWN) +! retList = get_tv_number_chk(&argvars[1], &error); +! if (error) +! return; +! +! if (retList == 0) +! { +! rettv->v_type = VAR_STRING; +! rettv->vval.v_string = reg_submatch(no); +! } +! else +! { +! rettv->v_type = VAR_LIST; +! rettv->vval.v_list = reg_submatch_list(no); +! } + } + + /* +*** ../vim-7.4.240/src/proto/regexp.pro 2013-08-10 13:37:24.000000000 +0200 +--- src/proto/regexp.pro 2014-04-02 18:19:12.415678498 +0200 +*************** +*** 10,15 **** +--- 10,16 ---- + int vim_regsub __ARGS((regmatch_T *rmp, char_u *source, char_u *dest, int copy, int magic, int backslash)); + int vim_regsub_multi __ARGS((regmmatch_T *rmp, linenr_T lnum, char_u *source, char_u *dest, int copy, int magic, int backslash)); + char_u *reg_submatch __ARGS((int no)); ++ list_T *reg_submatch_list __ARGS((int no)); + regprog_T *vim_regcomp __ARGS((char_u *expr_arg, int re_flags)); + void vim_regfree __ARGS((regprog_T *prog)); + int vim_regexec __ARGS((regmatch_T *rmp, char_u *line, colnr_T col)); +*** ../vim-7.4.240/src/regexp.c 2014-03-23 15:12:29.931264336 +0100 +--- src/regexp.c 2014-04-02 18:59:34.431645181 +0200 +*************** +*** 7897,7902 **** +--- 7897,7981 ---- + + return retval; + } ++ ++ /* ++ * Used for the submatch() function with the optional non-zero argument: get ++ * the list of strings from the n'th submatch in allocated memory with NULs ++ * represented in NLs. ++ * Returns a list of allocated strings. Returns NULL when not in a ":s" ++ * command, for a non-existing submatch and for any error. ++ */ ++ list_T * ++ reg_submatch_list(no) ++ int no; ++ { ++ char_u *s; ++ linenr_T slnum; ++ linenr_T elnum; ++ colnr_T scol; ++ colnr_T ecol; ++ int i; ++ list_T *list; ++ int error = FALSE; ++ ++ if (!can_f_submatch || no < 0) ++ return NULL; ++ ++ if (submatch_match == NULL) ++ { ++ slnum = submatch_mmatch->startpos[no].lnum; ++ elnum = submatch_mmatch->endpos[no].lnum; ++ if (slnum < 0 || elnum < 0) ++ return NULL; ++ ++ scol = submatch_mmatch->startpos[no].col; ++ ecol = submatch_mmatch->endpos[no].col; ++ ++ list = list_alloc(); ++ if (list == NULL) ++ return NULL; ++ ++ s = reg_getline_submatch(slnum) + scol; ++ if (slnum == elnum) ++ { ++ if (list_append_string(list, s, ecol - scol) == FAIL) ++ error = TRUE; ++ } ++ else ++ { ++ if (list_append_string(list, s, -1) == FAIL) ++ error = TRUE; ++ for (i = 1; i < elnum - slnum; i++) ++ { ++ s = reg_getline_submatch(slnum + i); ++ if (list_append_string(list, s, -1) == FAIL) ++ error = TRUE; ++ } ++ s = reg_getline_submatch(elnum); ++ if (list_append_string(list, s, ecol) == FAIL) ++ error = TRUE; ++ } ++ } ++ else ++ { ++ s = submatch_match->startp[no]; ++ if (s == NULL || submatch_match->endp[no] == NULL) ++ return NULL; ++ list = list_alloc(); ++ if (list == NULL) ++ return NULL; ++ if (list_append_string(list, s, ++ (int)(submatch_match->endp[no] - s)) == FAIL) ++ error = TRUE; ++ } ++ ++ if (error) ++ { ++ list_free(list, TRUE); ++ return NULL; ++ } ++ return list; ++ } + #endif + + static regengine_T bt_regengine = +*** ../vim-7.4.240/src/testdir/test79.in 2013-04-13 11:16:38.000000000 +0200 +--- src/testdir/test79.in 2014-04-02 17:51:01.807701753 +0200 +*************** +*** 181,190 **** +--- 181,192 ---- + :set cpo& + /^TEST/ + j:s/A\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)/\=submatch(0) . submatch(9) . submatch(8) . submatch(7) . submatch(6) . submatch(5) . submatch(4) . submatch(3) . submatch(2) . submatch(1)/ ++ j:s/B\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)/\=string([submatch(0, 1), submatch(9, 1), submatch(8, 1), submatch(7, 1), submatch(6, 1), submatch(5, 1), submatch(4, 1), submatch(3, 1), submatch(2, 1), submatch(1, 1)])/ + ENDTEST + + TEST_5: + A123456789 ++ B123456789 + + STARTTEST + :set magic& +*************** +*** 209,214 **** +--- 211,219 ---- + /^TEST_7/ + j:s/A./\=submatch(0)/ + j:s/B./\=submatch(0)/ ++ j:s/C./\=strtrans(string(submatch(0, 1)))/ ++ j:s/D.\nD/\=strtrans(string(submatch(0, 1)))/ ++ j:s/E\_.\{-}E/\=strtrans(string(submatch(0, 1)))/ + /^Q$ + :s/Q[^\n]Q/\=submatch(0)."foobar"/ + :" Avoid :s error breaks dotest map on Windows. +*************** +*** 217,226 **** +--- 222,240 ---- + TEST_7: + A
A + B ++ C ++ D ++ D ++ E ++ ++ ++ ++ + Q + Q + + STARTTEST + :g/^STARTTEST/.,/^ENDTEST/d + :1;/^Results/,$wq! test.out ++ :call getchar() + ENDTEST +*** ../vim-7.4.240/src/testdir/test79.ok 2013-03-19 17:30:51.000000000 +0100 +--- src/testdir/test79.ok 2014-04-02 17:51:01.807701753 +0200 +*************** +*** 105,110 **** +--- 105,111 ---- + + TEST_5: + A123456789987654321 ++ [['B123456789'], ['9'], ['8'], ['7'], ['6'], ['5'], ['4'], ['3'], ['2'], ['1']] + + + TEST_6: +*************** +*** 119,124 **** +--- 120,128 ---- + A + B + B ++ ['C^@']C ++ ['D^@', 'D'] ++ ['E^@', '^@', '^@', '^@', '^@E'] + Q + Q + +*** ../vim-7.4.240/src/testdir/test80.in 2014-01-23 20:09:29.523869260 +0100 +--- src/testdir/test80.in 2014-04-02 17:52:14.059700759 +0200 +*************** +*** 117,122 **** +--- 117,123 ---- + :set cpo& + :$put =\"\n\nTEST_5:\" + :$put =substitute('A123456789', 'A\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)', '\=submatch(0) . submatch(9) . submatch(8) . submatch(7) . submatch(6) . submatch(5) . submatch(4) . submatch(3) . submatch(2) . submatch(1)', '') ++ :$put =substitute('A123456789', 'A\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)', '\=string([submatch(0, 1), submatch(9, 1), submatch(8, 1), submatch(7, 1), submatch(6, 1), submatch(5, 1), submatch(4, 1), submatch(3, 1), submatch(2, 1), submatch(1, 1)])', '') + /^TEST_6 + ENDTEST + +*************** +*** 142,147 **** +--- 143,149 ---- + :$put =\"\n\nTEST_7:\" + :$put =substitute('A
A', 'A.', '\=submatch(0)', '') + :$put =substitute(\"B\nB\", 'B.', '\=submatch(0)', '') ++ :$put =substitute(\"B\nB\", 'B.', '\=string(submatch(0, 1))', '') + :$put =substitute('-bb', '\zeb', 'a', 'g') + :$put =substitute('-bb', '\ze', 'c', 'g') + /^TEST_8 +*** ../vim-7.4.240/src/testdir/test80.ok 2014-01-23 20:09:29.523869260 +0100 +--- src/testdir/test80.ok 2014-04-02 17:52:44.111700346 +0200 +*************** +*** 90,95 **** +--- 90,96 ---- + + TEST_5: + A123456789987654321 ++ [['A123456789'], ['9'], ['8'], ['7'], ['6'], ['5'], ['4'], ['3'], ['2'], ['1']] + + + TEST_6: +*************** +*** 103,108 **** +--- 104,111 ---- + A
A + B + B ++ ['B ++ ']B + -abab + c-cbcbc + +*** ../vim-7.4.240/src/version.c 2014-04-02 17:18:59.051728202 +0200 +--- src/version.c 2014-04-02 17:37:44.639712719 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 241, + /**/ + +-- +Bypasses are devices that allow some people to dash from point A to +point B very fast while other people dash from point B to point A very +fast. People living at point C, being a point directly in between, are +often given to wonder what's so great about point A that so many people +from point B are so keen to get there and what's so great about point B +that so many people from point A are so keen to get there. They often +wish that people would just once and for all work out where the hell +they wanted to be. + -- Douglas Adams, "The Hitchhiker's Guide to the Galaxy" + + /// 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/patches/source/vim/patches/7.4.242 b/patches/source/vim/patches/7.4.242 new file mode 100644 index 000000000..507687832 --- /dev/null +++ b/patches/source/vim/patches/7.4.242 @@ -0,0 +1,520 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.242 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.242 +Problem: getreg() does not distinguish between a NL used for a line break + and a NL used for a NUL character. +Solution: Add another argument to return a list. (ZyX) +Files: runtime/doc/eval.txt, src/eval.c src/ops.c, src/proto/ops.pro, + src/vim.h, src/Makefile, src/testdir/test_eval.in, + src/testdir/test_eval.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 + + +*** ../vim-7.4.241/runtime/doc/eval.txt 2014-04-02 19:00:53.035644100 +0200 +--- runtime/doc/eval.txt 2014-04-02 19:15:31.847632011 +0200 +*************** +*** 1818,1824 **** + getpid() Number process ID of Vim + getpos( {expr}) List position of cursor, mark, etc. + getqflist() List list of quickfix items +! getreg( [{regname} [, 1]]) String contents of register + getregtype( [{regname}]) String type of register + gettabvar( {nr}, {varname} [, {def}]) + any variable {varname} in tab {nr} or {def} +--- 1819,1826 ---- + getpid() Number process ID of Vim + getpos( {expr}) List position of cursor, mark, etc. + getqflist() List list of quickfix items +! getreg( [{regname} [, 1 [, {list}]]]) +! String or List contents of register + getregtype( [{regname}]) String type of register + gettabvar( {nr}, {varname} [, {def}]) + any variable {varname} in tab {nr} or {def} +*************** +*** 3466,3472 **** + :endfor + + +! getreg([{regname} [, 1]]) *getreg()* + The result is a String, which is the contents of register + {regname}. Example: > + :let cliptext = getreg('*') +--- 3468,3474 ---- + :endfor + + +! getreg([{regname} [, 1 [, {list}]]]) *getreg()* + The result is a String, which is the contents of register + {regname}. Example: > + :let cliptext = getreg('*') +*************** +*** 3475,3480 **** +--- 3477,3487 ---- + getreg('=', 1) returns the expression itself, so that it can + be restored with |setreg()|. For other registers the extra + argument is ignored, thus you can always give it. ++ If {list} is present and non-zero result type is changed to ++ |List|. Each list item is one text line. Use it if you care ++ about zero bytes possibly present inside register: without ++ third argument both NLs and zero bytes are represented as NLs ++ (see |NL-used-for-Nul|). + If {regname} is not specified, |v:register| is used. + + +*** ../vim-7.4.241/src/eval.c 2014-04-02 19:00:53.043644100 +0200 +--- src/eval.c 2014-04-02 19:35:54.919615187 +0200 +*************** +*** 2458,2464 **** + p = get_tv_string_chk(tv); + if (p != NULL && op != NULL && *op == '.') + { +! s = get_reg_contents(*arg == '@' ? '"' : *arg, TRUE, TRUE); + if (s != NULL) + { + p = ptofree = concat_str(s, p); +--- 2458,2464 ---- + p = get_tv_string_chk(tv); + if (p != NULL && op != NULL && *op == '.') + { +! s = get_reg_contents(*arg == '@' ? '"' : *arg, GREG_EXPR_SRC); + if (s != NULL) + { + p = ptofree = concat_str(s, p); +*************** +*** 5121,5127 **** + if (evaluate) + { + rettv->v_type = VAR_STRING; +! rettv->vval.v_string = get_reg_contents(**arg, TRUE, TRUE); + } + if (**arg != NUL) + ++*arg; +--- 5121,5128 ---- + if (evaluate) + { + rettv->v_type = VAR_STRING; +! rettv->vval.v_string = get_reg_contents(**arg, +! GREG_EXPR_SRC); + } + if (**arg != NUL) + ++*arg; +*************** +*** 7970,7976 **** + {"getpid", 0, 0, f_getpid}, + {"getpos", 1, 1, f_getpos}, + {"getqflist", 0, 0, f_getqflist}, +! {"getreg", 0, 2, f_getreg}, + {"getregtype", 0, 1, f_getregtype}, + {"gettabvar", 2, 3, f_gettabvar}, + {"gettabwinvar", 3, 4, f_gettabwinvar}, +--- 7971,7977 ---- + {"getpid", 0, 0, f_getpid}, + {"getpos", 1, 1, f_getpos}, + {"getqflist", 0, 0, f_getqflist}, +! {"getreg", 0, 3, f_getreg}, + {"getregtype", 0, 1, f_getregtype}, + {"gettabvar", 2, 3, f_gettabvar}, + {"gettabwinvar", 3, 4, f_gettabwinvar}, +*************** +*** 11799,11804 **** +--- 11800,11806 ---- + char_u *strregname; + int regname; + int arg2 = FALSE; ++ int return_list = FALSE; + int error = FALSE; + + if (argvars[0].v_type != VAR_UNKNOWN) +*************** +*** 11806,11822 **** + strregname = get_tv_string_chk(&argvars[0]); + error = strregname == NULL; + if (argvars[1].v_type != VAR_UNKNOWN) + arg2 = get_tv_number_chk(&argvars[1], &error); + } + else + strregname = vimvars[VV_REG].vv_str; + regname = (strregname == NULL ? '"' : *strregname); + if (regname == 0) + regname = '"'; + +! rettv->v_type = VAR_STRING; +! rettv->vval.v_string = error ? NULL : +! get_reg_contents(regname, TRUE, arg2); + } + + /* +--- 11808,11841 ---- + strregname = get_tv_string_chk(&argvars[0]); + error = strregname == NULL; + if (argvars[1].v_type != VAR_UNKNOWN) ++ { + arg2 = get_tv_number_chk(&argvars[1], &error); ++ if (!error && argvars[2].v_type != VAR_UNKNOWN) ++ return_list = get_tv_number_chk(&argvars[2], &error); ++ } + } + else + strregname = vimvars[VV_REG].vv_str; ++ ++ if (error) ++ return; ++ + regname = (strregname == NULL ? '"' : *strregname); + if (regname == 0) + regname = '"'; + +! if (return_list) +! { +! rettv->v_type = VAR_LIST; +! rettv->vval.v_list = (list_T *)get_reg_contents(regname, +! (arg2 ? GREG_EXPR_SRC : 0) | GREG_LIST); +! } +! else +! { +! rettv->v_type = VAR_STRING; +! rettv->vval.v_string = get_reg_contents(regname, +! arg2 ? GREG_EXPR_SRC : 0); +! } + } + + /* +*************** +*** 17891,17899 **** + typval_T *rettv; + { + int error = FALSE; +- char_u **match; +- char_u **s; +- listitem_T *li; + int no; + int retList = 0; + +--- 17910,17915 ---- +*** ../vim-7.4.241/src/ops.c 2014-03-23 15:12:29.931264336 +0100 +--- src/ops.c 2014-04-02 19:36:08.831614995 +0200 +*************** +*** 6166,6181 **** + return MAUTO; + } + + /* + * Return the contents of a register as a single allocated string. + * Used for "@r" in expressions and for getreg(). + * Returns NULL for error. + */ + char_u * +! get_reg_contents(regname, allowexpr, expr_src) + int regname; +! int allowexpr; /* allow "=" register */ +! int expr_src; /* get expression for "=" register */ + { + long i; + char_u *retval; +--- 6166,6214 ---- + return MAUTO; + } + ++ static char_u *getreg_wrap_one_line __ARGS((char_u *s, int flags)); ++ ++ /* ++ * When "flags" has GREG_LIST return a list with text "s". ++ * Otherwise just return "s". ++ */ ++ static char_u * ++ getreg_wrap_one_line(s, flags) ++ char_u *s; ++ int flags; ++ { ++ if (flags & GREG_LIST) ++ { ++ list_T *list = list_alloc(); ++ ++ if (list != NULL) ++ { ++ if (list_append_string(list, NULL, -1) == FAIL) ++ { ++ list_free(list, TRUE); ++ return NULL; ++ } ++ list->lv_first->li_tv.vval.v_string = s; ++ } ++ return (char_u *)list; ++ } ++ return s; ++ } ++ + /* + * Return the contents of a register as a single allocated string. + * Used for "@r" in expressions and for getreg(). + * Returns NULL for error. ++ * Flags: ++ * GREG_NO_EXPR Do not allow expression register ++ * GREG_EXPR_SRC For the expression register: return expression itself, ++ * not the result of its evaluation. ++ * GREG_LIST Return a list of lines in place of a single string. + */ + char_u * +! get_reg_contents(regname, flags) + int regname; +! int flags; + { + long i; + char_u *retval; +*************** +*** 6185,6197 **** + /* Don't allow using an expression register inside an expression */ + if (regname == '=') + { +! if (allowexpr) +! { +! if (expr_src) +! return get_expr_line_src(); +! return get_expr_line(); +! } +! return NULL; + } + + if (regname == '@') /* "@@" is used for unnamed register */ +--- 6218,6228 ---- + /* Don't allow using an expression register inside an expression */ + if (regname == '=') + { +! if (flags & GREG_NO_EXPR) +! return NULL; +! if (flags & GREG_EXPR_SRC) +! return getreg_wrap_one_line(get_expr_line_src(), flags); +! return getreg_wrap_one_line(get_expr_line(), flags); + } + + if (regname == '@') /* "@@" is used for unnamed register */ +*************** +*** 6209,6223 **** + { + if (retval == NULL) + return NULL; +! if (!allocated) +! retval = vim_strsave(retval); +! return retval; + } + + get_yank_register(regname, FALSE); + if (y_current->y_array == NULL) + return NULL; + + /* + * Compute length of resulting string. + */ +--- 6240,6272 ---- + { + if (retval == NULL) + return NULL; +! if (allocated) +! return getreg_wrap_one_line(retval, flags); +! return getreg_wrap_one_line(vim_strsave(retval), flags); + } + + get_yank_register(regname, FALSE); + if (y_current->y_array == NULL) + return NULL; + ++ if (flags & GREG_LIST) ++ { ++ list_T *list = list_alloc(); ++ int error = FALSE; ++ ++ if (list == NULL) ++ return NULL; ++ for (i = 0; i < y_current->y_size; ++i) ++ if (list_append_string(list, y_current->y_array[i], -1) == FAIL) ++ error = TRUE; ++ if (error) ++ { ++ list_free(list, TRUE); ++ return NULL; ++ } ++ return (char_u *)list; ++ } ++ + /* + * Compute length of resulting string. + */ +*** ../vim-7.4.241/src/proto/ops.pro 2013-08-10 13:37:22.000000000 +0200 +--- src/proto/ops.pro 2014-04-02 19:17:22.407630490 +0200 +*************** +*** 53,59 **** + int clip_convert_selection __ARGS((char_u **str, long_u *len, VimClipboard *cbd)); + void dnd_yank_drag_data __ARGS((char_u *str, long len)); + char_u get_reg_type __ARGS((int regname, long *reglen)); +! char_u *get_reg_contents __ARGS((int regname, int allowexpr, int expr_src)); + void write_reg_contents __ARGS((int name, char_u *str, int maxlen, int must_append)); + void write_reg_contents_ex __ARGS((int name, char_u *str, int maxlen, int must_append, int yank_type, long block_len)); + void clear_oparg __ARGS((oparg_T *oap)); +--- 53,59 ---- + int clip_convert_selection __ARGS((char_u **str, long_u *len, VimClipboard *cbd)); + void dnd_yank_drag_data __ARGS((char_u *str, long len)); + char_u get_reg_type __ARGS((int regname, long *reglen)); +! char_u *get_reg_contents __ARGS((int regname, int flags)); + void write_reg_contents __ARGS((int name, char_u *str, int maxlen, int must_append)); + void write_reg_contents_ex __ARGS((int name, char_u *str, int maxlen, int must_append, int yank_type, long block_len)); + void clear_oparg __ARGS((oparg_T *oap)); +*** ../vim-7.4.241/src/vim.h 2014-04-01 19:55:46.252787300 +0200 +--- src/vim.h 2014-04-02 19:17:22.407630490 +0200 +*************** +*** 2259,2264 **** +--- 2259,2269 ---- + #define SREQ_WIN 1 /* Request window-local option */ + #define SREQ_BUF 2 /* Request buffer-local option */ + ++ /* Flags for get_reg_contents */ ++ #define GREG_NO_EXPR 1 /* Do not allow expression register */ ++ #define GREG_EXPR_SRC 2 /* Return expression itself for "=" register */ ++ #define GREG_LIST 4 /* Return list */ ++ + /* Character used as separated in autoload function/variable names. */ + #define AUTOLOAD_CHAR '#' + +*** ../vim-7.4.241/src/Makefile 2014-04-01 14:08:14.685074130 +0200 +--- src/Makefile 2014-04-02 19:42:21.931609863 +0200 +*************** +*** 1880,1885 **** +--- 1880,1886 ---- + + # Run individual test, assuming that Vim was already compiled. + test1 test2 test3 test4 test5 test6 test7 test8 test9 \ ++ test_eval \ + test_options \ + test10 test11 test12 test13 test14 test15 test16 test17 test18 test19 \ + test20 test21 test22 test23 test24 test25 test26 test27 test28 test29 \ +*** ../vim-7.4.241/src/testdir/test_eval.in 2014-04-02 19:51:32.391602291 +0200 +--- src/testdir/test_eval.in 2014-04-02 19:47:13.607605851 +0200 +*************** +*** 0 **** +--- 1,21 ---- ++ Test for various eval features. ++ ++ STARTTEST ++ :so small.vim ++ :" ++ :" test getreg() ++ /^one ++ "ay3j:$put =string(getreg('a')) ++ :$put =string(getreg('a', 1, 1)) ++ :" ++ :/^result/,$w! test.out ++ :qa! ++ ENDTEST ++ ++ one ++ two ++ three ++ four ++ five ++ ++ result +*** ../vim-7.4.241/src/testdir/test_eval.ok 2014-04-02 19:51:32.399602291 +0200 +--- src/testdir/test_eval.ok 2014-04-02 19:48:51.595604503 +0200 +*************** +*** 0 **** +--- 1,7 ---- ++ result ++ 'one ++ two ++ three ++ four ++ ' ++ ['one', 'two', 'three', 'four'] +*** ../vim-7.4.241/src/testdir/Make_amiga.mak 2014-04-01 14:08:14.685074130 +0200 +--- src/testdir/Make_amiga.mak 2014-04-02 19:41:24.331610655 +0200 +*************** +*** 36,41 **** +--- 36,42 ---- + test94.out test95.out test96.out test97.out test98.out \ + test99.out test100.out test101.out test102.out test103.out \ + test104.out test105.out test106.out \ ++ test_eval.out \ + test_options.out + + .SUFFIXES: .in .out +*************** +*** 159,162 **** +--- 160,164 ---- + test104.out: test104.in + test105.out: test105.in + test106.out: test106.in ++ test_eval.out: test_eval.in + test_options.out: test_options.in +*** ../vim-7.4.241/src/testdir/Make_dos.mak 2014-04-01 14:08:14.685074130 +0200 +--- src/testdir/Make_dos.mak 2014-04-02 19:41:34.419610516 +0200 +*************** +*** 35,40 **** +--- 35,41 ---- + test94.out test95.out test96.out test98.out test99.out \ + test100.out test101.out test102.out test103.out test104.out \ + test105.out test106.out \ ++ test_eval.out \ + test_options.out + + SCRIPTS32 = test50.out test70.out +*** ../vim-7.4.241/src/testdir/Make_ming.mak 2014-04-01 14:08:14.685074130 +0200 +--- src/testdir/Make_ming.mak 2014-04-02 19:41:43.131610397 +0200 +*************** +*** 55,60 **** +--- 55,61 ---- + test94.out test95.out test96.out test98.out test99.out \ + test100.out test101.out test102.out test103.out test104.out \ + test105.out test106.out \ ++ test_eval.out \ + test_options.out + + SCRIPTS32 = test50.out test70.out +*** ../vim-7.4.241/src/testdir/Make_os2.mak 2014-04-01 14:08:14.685074130 +0200 +--- src/testdir/Make_os2.mak 2014-04-02 19:41:50.659610293 +0200 +*************** +*** 37,42 **** +--- 37,43 ---- + test94.out test95.out test96.out test98.out test99.out \ + test100.out test101.out test102.out test103.out test104.out \ + test105.out test106.out \ ++ test_eval.out \ + test_options.out + + .SUFFIXES: .in .out +*** ../vim-7.4.241/src/testdir/Make_vms.mms 2014-04-01 14:08:14.689074130 +0200 +--- src/testdir/Make_vms.mms 2014-04-02 19:41:58.971610179 +0200 +*************** +*** 96,101 **** +--- 96,102 ---- + test95.out test96.out test98.out test99.out \ + test100.out test101.out test103.out test104.out \ + test105.out test106.out \ ++ test_eval.out \ + test_options.out + + # Known problems: +*** ../vim-7.4.241/src/version.c 2014-04-02 19:00:53.047644099 +0200 +--- src/version.c 2014-04-02 19:46:41.867606287 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 242, + /**/ + +-- +Don't Panic! + -- The Hitchhiker's Guide to the Galaxy + + /// 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/patches/source/vim/patches/7.4.243 b/patches/source/vim/patches/7.4.243 new file mode 100644 index 000000000..77eff1e69 --- /dev/null +++ b/patches/source/vim/patches/7.4.243 @@ -0,0 +1,1109 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.243 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.243 +Problem: Cannot use setreg() to add text that includes a NUL. +Solution: Make setreg() accept a list. +Files: runtime/doc/eval.txt, src/eval.c, src/ops.c, src/proto/ops.pro, + src/testdir/test_eval.in, src/testdir/test_eval.ok + + +*** ../vim-7.4.242/runtime/doc/eval.txt 2014-04-02 19:54:58.263599459 +0200 +--- runtime/doc/eval.txt 2014-04-02 22:06:58.855490505 +0200 +*************** +*** 5355,5360 **** +--- 5368,5375 ---- + *setreg()* + setreg({regname}, {value} [,{options}]) + Set the register {regname} to {value}. ++ {value} may be any value returned by |getreg()|, including ++ a |List|. + If {options} contains "a" or {regname} is upper case, + then the value is appended. + {options} can also contain a register type specification: +*************** +*** 5367,5376 **** + in the longest line (counting a <Tab> as 1 character). + + If {options} contains no register settings, then the default +! is to use character mode unless {value} ends in a <NL>. +! Setting the '=' register is not possible, but you can use > +! :let @= = var_expr +! < Returns zero for success, non-zero for failure. + + Examples: > + :call setreg(v:register, @*) +--- 5382,5396 ---- + in the longest line (counting a <Tab> as 1 character). + + If {options} contains no register settings, then the default +! is to use character mode unless {value} ends in a <NL> for +! string {value} and linewise mode for list {value}. Blockwise +! mode is never selected automatically. +! Returns zero for success, non-zero for failure. +! +! *E883* +! Note: you may not use |List| containing more then one item to +! set search and expression registers. Lists containing no +! items act like empty strings. + + Examples: > + :call setreg(v:register, @*) +*************** +*** 5378,5385 **** + :call setreg('a', "1\n2\n3", 'b5') + + < This example shows using the functions to save and restore a +! register. > +! :let var_a = getreg('a', 1) + :let var_amode = getregtype('a') + .... + :call setreg('a', var_a, var_amode) +--- 5398,5408 ---- + :call setreg('a', "1\n2\n3", 'b5') + + < This example shows using the functions to save and restore a +! register (note: you may not reliably restore register value +! without using the third argument to |getreg()| as without it +! newlines are represented as newlines AND Nul bytes are +! represented as newlines as well, see |NL-used-for-Nul|). > +! :let var_a = getreg('a', 1, 1) + :let var_amode = getregtype('a') + .... + :call setreg('a', var_a, var_amode) +*** ../vim-7.4.242/src/eval.c 2014-04-02 19:54:58.275599459 +0200 +--- src/eval.c 2014-04-02 22:09:25.279488491 +0200 +*************** +*** 16790,16797 **** + regname = *strregname; + if (regname == 0 || regname == '@') + regname = '"'; +- else if (regname == '=') +- return; + + if (argvars[2].v_type != VAR_UNKNOWN) + { +--- 16790,16795 ---- +*************** +*** 16822,16831 **** + } + } + +! strval = get_tv_string_chk(&argvars[1]); +! if (strval != NULL) + write_reg_contents_ex(regname, strval, -1, + append, yank_type, block_len); + rettv->vval.v_number = 0; + } + +--- 16820,16863 ---- + } + } + +! if (argvars[1].v_type == VAR_LIST) +! { +! char_u **lstval; +! char_u **curval; +! int len = argvars[1].vval.v_list->lv_len; +! listitem_T *li; +! +! lstval = (char_u **)alloc(sizeof(char_u *) * (len + 1)); +! if (lstval == NULL) +! return; +! curval = lstval; +! +! for (li = argvars[1].vval.v_list->lv_first; li != NULL; +! li = li->li_next) +! { +! /* TODO: this may use a static buffer several times. */ +! strval = get_tv_string_chk(&li->li_tv); +! if (strval == NULL) +! { +! vim_free(lstval); +! return; +! } +! *curval++ = strval; +! } +! *curval++ = NULL; +! +! write_reg_contents_lst(regname, lstval, -1, +! append, yank_type, block_len); +! vim_free(lstval); +! } +! else +! { +! strval = get_tv_string_chk(&argvars[1]); +! if (strval == NULL) +! return; + write_reg_contents_ex(regname, strval, -1, + append, yank_type, block_len); ++ } + rettv->vval.v_number = 0; + } + +*** ../vim-7.4.242/src/ops.c 2014-04-02 19:54:58.275599459 +0200 +--- src/ops.c 2014-04-02 22:06:46.499490675 +0200 +*************** +*** 113,119 **** + #endif + static void block_prep __ARGS((oparg_T *oap, struct block_def *, linenr_T, int)); + #if defined(FEAT_CLIPBOARD) || defined(FEAT_EVAL) +! static void str_to_reg __ARGS((struct yankreg *y_ptr, int type, char_u *str, long len, long blocklen)); + #endif + static int ends_in_white __ARGS((linenr_T lnum)); + #ifdef FEAT_COMMENTS +--- 113,119 ---- + #endif + static void block_prep __ARGS((oparg_T *oap, struct block_def *, linenr_T, int)); + #if defined(FEAT_CLIPBOARD) || defined(FEAT_EVAL) +! static void str_to_reg __ARGS((struct yankreg *y_ptr, int type, char_u *str, long len, long blocklen, int str_list)); + #endif + static int ends_in_white __ARGS((linenr_T lnum)); + #ifdef FEAT_COMMENTS +*************** +*** 6005,6011 **** + + clip_free_selection(cbd); + +! str_to_reg(y_ptr, type, str, len, 0L); + } + + /* +--- 6005,6011 ---- + + clip_free_selection(cbd); + +! str_to_reg(y_ptr, type, str, len, 0L, FALSE); + } + + /* +*************** +*** 6113,6119 **** + curr = y_current; + y_current = &y_regs[TILDE_REGISTER]; + free_yank_all(); +! str_to_reg(y_current, MCHAR, str, len, 0L); + y_current = curr; + } + #endif +--- 6113,6119 ---- + curr = y_current; + y_current = &y_regs[TILDE_REGISTER]; + free_yank_all(); +! str_to_reg(y_current, MCHAR, str, len, 0L, FALSE); + y_current = curr; + } + #endif +*************** +*** 6308,6313 **** +--- 6308,6354 ---- + return retval; + } + ++ static int ++ init_write_reg(name, old_y_previous, old_y_current, must_append, yank_type) ++ int name; ++ struct yankreg **old_y_previous; ++ struct yankreg **old_y_current; ++ int must_append; ++ int *yank_type UNUSED; ++ { ++ if (!valid_yank_reg(name, TRUE)) /* check for valid reg name */ ++ { ++ emsg_invreg(name); ++ return FAIL; ++ } ++ ++ /* Don't want to change the current (unnamed) register */ ++ *old_y_previous = y_previous; ++ *old_y_current = y_current; ++ ++ get_yank_register(name, TRUE); ++ if (!y_append && !must_append) ++ free_yank_all(); ++ return OK; ++ } ++ ++ static void ++ finish_write_reg(name, old_y_previous, old_y_current) ++ int name; ++ struct yankreg *old_y_previous; ++ struct yankreg *old_y_current; ++ { ++ # ifdef FEAT_CLIPBOARD ++ /* Send text of clipboard register to the clipboard. */ ++ may_set_selection(); ++ # endif ++ ++ /* ':let @" = "val"' should change the meaning of the "" register */ ++ if (name != '"') ++ y_previous = old_y_previous; ++ y_current = old_y_current; ++ } ++ + /* + * Store string "str" in register "name". + * "maxlen" is the maximum number of bytes to use, -1 for all bytes. +*************** +*** 6328,6333 **** +--- 6369,6419 ---- + } + + void ++ write_reg_contents_lst(name, strings, maxlen, must_append, yank_type, block_len) ++ int name; ++ char_u **strings; ++ int maxlen UNUSED; ++ int must_append; ++ int yank_type; ++ long block_len; ++ { ++ struct yankreg *old_y_previous, *old_y_current; ++ ++ if (name == '/' ++ #ifdef FEAT_EVAL ++ || name == '=' ++ #endif ++ ) ++ { ++ char_u *s; ++ ++ if (strings[0] == NULL) ++ s = (char_u *)""; ++ else if (strings[1] != NULL) ++ { ++ EMSG(_("E883: search pattern and expression register may not " ++ "contain two or more lines")); ++ return; ++ } ++ else ++ s = strings[0]; ++ write_reg_contents_ex(name, s, -1, must_append, yank_type, block_len); ++ return; ++ } ++ ++ if (name == '_') /* black hole: nothing to do */ ++ return; ++ ++ if (init_write_reg(name, &old_y_previous, &old_y_current, must_append, ++ &yank_type) == FAIL) ++ return; ++ ++ str_to_reg(y_current, yank_type, (char_u *) strings, -1, block_len, TRUE); ++ ++ finish_write_reg(name, old_y_previous, old_y_current); ++ } ++ ++ void + write_reg_contents_ex(name, str, maxlen, must_append, yank_type, block_len) + int name; + char_u *str; +*************** +*** 6364,6403 **** + s = concat_str(get_expr_line_src(), p); + vim_free(p); + p = s; +- + } + set_expr_line(p); + return; + } + #endif + +- if (!valid_yank_reg(name, TRUE)) /* check for valid reg name */ +- { +- emsg_invreg(name); +- return; +- } +- + if (name == '_') /* black hole: nothing to do */ + return; + +! /* Don't want to change the current (unnamed) register */ +! old_y_previous = y_previous; +! old_y_current = y_current; +! +! get_yank_register(name, TRUE); +! if (!y_append && !must_append) +! free_yank_all(); +! str_to_reg(y_current, yank_type, str, len, block_len); + +! # ifdef FEAT_CLIPBOARD +! /* Send text of clipboard register to the clipboard. */ +! may_set_selection(); +! # endif + +! /* ':let @" = "val"' should change the meaning of the "" register */ +! if (name != '"') +! y_previous = old_y_previous; +! y_current = old_y_current; + } + #endif /* FEAT_EVAL */ + +--- 6450,6471 ---- + s = concat_str(get_expr_line_src(), p); + vim_free(p); + p = s; + } + set_expr_line(p); + return; + } + #endif + + if (name == '_') /* black hole: nothing to do */ + return; + +! if (init_write_reg(name, &old_y_previous, &old_y_current, must_append, +! &yank_type) == FAIL) +! return; + +! str_to_reg(y_current, yank_type, str, len, block_len, FALSE); + +! finish_write_reg(name, old_y_previous, old_y_current); + } + #endif /* FEAT_EVAL */ + +*************** +*** 6407,6418 **** + * is appended. + */ + static void +! str_to_reg(y_ptr, yank_type, str, len, blocklen) + struct yankreg *y_ptr; /* pointer to yank register */ + int yank_type; /* MCHAR, MLINE, MBLOCK, MAUTO */ + char_u *str; /* string to put in register */ + long len; /* length of string */ + long blocklen; /* width of Visual block */ + { + int type; /* MCHAR, MLINE or MBLOCK */ + int lnum; +--- 6475,6487 ---- + * is appended. + */ + static void +! str_to_reg(y_ptr, yank_type, str, len, blocklen, str_list) + struct yankreg *y_ptr; /* pointer to yank register */ + int yank_type; /* MCHAR, MLINE, MBLOCK, MAUTO */ + char_u *str; /* string to put in register */ + long len; /* length of string */ + long blocklen; /* width of Visual block */ ++ int str_list; /* TRUE if str is char_u ** */ + { + int type; /* MCHAR, MLINE or MBLOCK */ + int lnum; +*************** +*** 6423,6428 **** +--- 6492,6498 ---- + int extraline = 0; /* extra line at the end */ + int append = FALSE; /* append to last line in register */ + char_u *s; ++ char_u **ss; + char_u **pp; + long maxlen; + +*************** +*** 6430,6436 **** + y_ptr->y_size = 0; + + if (yank_type == MAUTO) +! type = ((len > 0 && (str[len - 1] == NL || str[len - 1] == CAR)) + ? MLINE : MCHAR); + else + type = yank_type; +--- 6500,6507 ---- + y_ptr->y_size = 0; + + if (yank_type == MAUTO) +! type = ((str_list || (len > 0 && (str[len - 1] == NL +! || str[len - 1] == CAR))) + ? MLINE : MCHAR); + else + type = yank_type; +*************** +*** 6439,6456 **** + * Count the number of lines within the string + */ + newlines = 0; +! for (i = 0; i < len; i++) +! if (str[i] == '\n') +! ++newlines; +! if (type == MCHAR || len == 0 || str[len - 1] != '\n') + { +! extraline = 1; +! ++newlines; /* count extra newline at the end */ + } +! if (y_ptr->y_size > 0 && y_ptr->y_type == MCHAR) + { +! append = TRUE; +! --newlines; /* uncount newline when appending first line */ + } + + /* +--- 6510,6535 ---- + * Count the number of lines within the string + */ + newlines = 0; +! if (str_list) + { +! for (ss = (char_u **) str; *ss != NULL; ++ss) +! ++newlines; + } +! else + { +! for (i = 0; i < len; i++) +! if (str[i] == '\n') +! ++newlines; +! if (type == MCHAR || len == 0 || str[len - 1] != '\n') +! { +! extraline = 1; +! ++newlines; /* count extra newline at the end */ +! } +! if (y_ptr->y_size > 0 && y_ptr->y_type == MCHAR) +! { +! append = TRUE; +! --newlines; /* uncount newline when appending first line */ +! } + } + + /* +*************** +*** 6470,6509 **** + /* + * Find the end of each line and save it into the array. + */ +! for (start = 0; start < len + extraline; start += i + 1) + { +! for (i = start; i < len; ++i) /* find the end of the line */ +! if (str[i] == '\n') +! break; +! i -= start; /* i is now length of line */ +! if (i > maxlen) +! maxlen = i; +! if (append) + { +! --lnum; +! extra = (int)STRLEN(y_ptr->y_array[lnum]); + } +! else +! extra = 0; +! s = alloc((unsigned)(i + extra + 1)); +! if (s == NULL) +! break; +! if (extra) +! mch_memmove(s, y_ptr->y_array[lnum], (size_t)extra); +! if (append) +! vim_free(y_ptr->y_array[lnum]); +! if (i) +! mch_memmove(s + extra, str + start, (size_t)i); +! extra += i; +! s[extra] = NUL; +! y_ptr->y_array[lnum++] = s; +! while (--extra >= 0) +! { +! if (*s == NUL) +! *s = '\n'; /* replace NUL with newline */ +! ++s; + } +- append = FALSE; /* only first line is appended */ + } + y_ptr->y_type = type; + y_ptr->y_size = lnum; +--- 6549,6601 ---- + /* + * Find the end of each line and save it into the array. + */ +! if (str_list) + { +! for (ss = (char_u **) str; *ss != NULL; ++ss, ++lnum) + { +! i = STRLEN(*ss); +! pp[lnum] = vim_strnsave(*ss, i); +! if (i > maxlen) +! maxlen = i; + } +! } +! else +! { +! for (start = 0; start < len + extraline; start += i + 1) +! { +! for (i = start; i < len; ++i) /* find the end of the line */ +! if (str[i] == '\n') +! break; +! i -= start; /* i is now length of line */ +! if (i > maxlen) +! maxlen = i; +! if (append) +! { +! --lnum; +! extra = (int)STRLEN(y_ptr->y_array[lnum]); +! } +! else +! extra = 0; +! s = alloc((unsigned)(i + extra + 1)); +! if (s == NULL) +! break; +! if (extra) +! mch_memmove(s, y_ptr->y_array[lnum], (size_t)extra); +! if (append) +! vim_free(y_ptr->y_array[lnum]); +! if (i) +! mch_memmove(s + extra, str + start, (size_t)i); +! extra += i; +! s[extra] = NUL; +! y_ptr->y_array[lnum++] = s; +! while (--extra >= 0) +! { +! if (*s == NUL) +! *s = '\n'; /* replace NUL with newline */ +! ++s; +! } +! append = FALSE; /* only first line is appended */ + } + } + y_ptr->y_type = type; + y_ptr->y_size = lnum; +*** ../vim-7.4.242/src/proto/ops.pro 2014-04-02 19:54:58.275599459 +0200 +--- src/proto/ops.pro 2014-04-02 21:33:48.679517881 +0200 +*************** +*** 56,61 **** +--- 56,62 ---- + char_u *get_reg_contents __ARGS((int regname, int flags)); + void write_reg_contents __ARGS((int name, char_u *str, int maxlen, int must_append)); + void write_reg_contents_ex __ARGS((int name, char_u *str, int maxlen, int must_append, int yank_type, long block_len)); ++ void write_reg_contents_lst __ARGS((int name, char_u **strings, int maxlen, int must_append, int yank_type, long block_len)); + void clear_oparg __ARGS((oparg_T *oap)); + void cursor_pos_info __ARGS((void)); + /* vim: set ft=c : */ +*** ../vim-7.4.242/src/testdir/test_eval.in 2014-04-02 19:54:58.275599459 +0200 +--- src/testdir/test_eval.in 2014-04-02 21:35:26.683516533 +0200 +*************** +*** 1,21 **** +! Test for various eval features. + + STARTTEST + :so small.vim + :" +! :" test getreg() +! /^one +! "ay3j:$put =string(getreg('a')) +! :$put =string(getreg('a', 1, 1)) + :" +! :/^result/,$w! test.out +! :qa! + ENDTEST + +! one +! two +! three +! four +! five +! +! result +--- 1,150 ---- +! Test for various eval features. vim: set ft=vim : +! +! Note: system clipboard support is not tested. I do not think anybody will thank +! me for messing with clipboard. + + STARTTEST + :so small.vim ++ :set encoding=latin1 ++ :set noswapfile ++ :lang C ++ :fun AppendRegContents(reg) ++ call append('$', printf('%s: type %s; value: %s (%s), expr: %s (%s)', a:reg, getregtype(a:reg), getreg(a:reg), string(getreg(a:reg, 0, 1)), getreg(a:reg, 1), string(getreg(a:reg, 1, 1)))) ++ endfun ++ :command -nargs=? AR :call AppendRegContents(<q-args>) ++ :fun SetReg(...) ++ call call('setreg', a:000) ++ call append('$', printf('{{{2 setreg(%s)', string(a:000)[1:-2])) ++ call AppendRegContents(a:1) ++ if a:1 isnot# '=' ++ execute "silent normal! Go==\n==\e\"".a:1."P" ++ endif ++ endfun ++ :fun ErrExe(str) ++ call append('$', 'Executing '.a:str) ++ try ++ execute a:str ++ catch ++ $put =v:exception ++ endtry ++ endfun ++ :fun Test() ++ $put ='{{{1 let tests' ++ let @" = 'abc' ++ AR " ++ let @" = "abc\n" ++ AR " ++ let @" = "abc\<C-m>" ++ AR " ++ let @= = '"abc"' ++ AR = ++ ++ $put ='{{{1 Basic setreg tests' ++ call SetReg('a', 'abcA', 'c') ++ call SetReg('b', 'abcB', 'v') ++ call SetReg('c', 'abcC', 'l') ++ call SetReg('d', 'abcD', 'V') ++ call SetReg('e', 'abcE', 'b') ++ call SetReg('f', 'abcF', "\<C-v>") ++ call SetReg('g', 'abcG', 'b10') ++ call SetReg('h', 'abcH', "\<C-v>10") ++ call SetReg('I', 'abcI') ++ ++ $put ='{{{1 Appending single lines with setreg()' ++ call SetReg('A', 'abcAc', 'c') ++ call SetReg('A', 'abcAl', 'l') ++ call SetReg('A', 'abcAc2','c') ++ call SetReg('b', 'abcBc', 'ca') ++ call SetReg('b', 'abcBb', 'ba') ++ call SetReg('b', 'abcBc2','ca') ++ call SetReg('b', 'abcBb2','b50a') ++ ++ call SetReg('C', 'abcCl', 'l') ++ call SetReg('C', 'abcCc', 'c') ++ call SetReg('D', 'abcDb', 'b') ++ ++ call SetReg('E', 'abcEb', 'b') ++ call SetReg('E', 'abcEl', 'l') ++ call SetReg('F', 'abcFc', 'c') ++ ++ $put ='{{{1 Appending NL with setreg()' ++ call setreg('a', 'abcA2', 'c') ++ call setreg('b', 'abcB2', 'v') ++ call setreg('c', 'abcC2', 'l') ++ call setreg('d', 'abcD2', 'V') ++ call setreg('e', 'abcE2', 'b') ++ call setreg('f', 'abcF2', "\<C-v>") ++ call setreg('g', 'abcG2', 'b10') ++ call setreg('h', 'abcH2', "\<C-v>10") ++ call setreg('I', 'abcI2') ++ ++ call SetReg('A', "\n") ++ call SetReg('B', "\n", 'c') ++ call SetReg('C', "\n") ++ call SetReg('D', "\n", 'l') ++ call SetReg('E', "\n") ++ call SetReg('F', "\n", 'b') ++ ++ $put ='{{{1 Setting lists with setreg()' ++ call SetReg('a', ['abcA3'], 'c') ++ call SetReg('b', ['abcB3'], 'l') ++ call SetReg('c', ['abcC3'], 'b') ++ call SetReg('d', ['abcD3']) ++ ++ $put ='{{{1 Appending lists with setreg()' ++ call SetReg('A', ['abcA3c'], 'c') ++ call SetReg('b', ['abcB3l'], 'la') ++ call SetReg('C', ['abcC3b'], 'lb') ++ call SetReg('D', ['abcD32']) ++ ++ call SetReg('A', ['abcA32']) ++ call SetReg('B', ['abcB3c'], 'c') ++ call SetReg('C', ['abcC3l'], 'l') ++ call SetReg('D', ['abcD3b'], 'b') ++ ++ $put ='{{{1 Appending lists with NL with setreg()' ++ call SetReg('A', ["\n", 'abcA3l2'], 'l') ++ call SetReg('B', ["\n", 'abcB3c2'], 'c') ++ call SetReg('C', ["\n", 'abcC3b2'], 'b') ++ call SetReg('D', ["\n", 'abcD3b50'],'b50') ++ ++ $put ='{{{1 Setting lists with NLs with setreg()' ++ call SetReg('a', ['abcA4-0', "\n", "abcA4-2\n", "\nabcA4-3", "abcA4-4\nabcA4-4-2"]) ++ call SetReg('b', ['abcB4c-0', "\n", "abcB4c-2\n", "\nabcB4c-3", "abcB4c-4\nabcB4c-4-2"], 'c') ++ call SetReg('c', ['abcC4l-0', "\n", "abcC4l-2\n", "\nabcC4l-3", "abcC4l-4\nabcC4l-4-2"], 'l') ++ call SetReg('d', ['abcD4b-0', "\n", "abcD4b-2\n", "\nabcD4b-3", "abcD4b-4\nabcD4b-4-2"], 'b') ++ call SetReg('e', ['abcE4b10-0', "\n", "abcE4b10-2\n", "\nabcE4b10-3", "abcE4b10-4\nabcE4b10-4-2"], 'b10') ++ ++ $put ='{{{1 Search and expressions' ++ call SetReg('/', ['abc/']) ++ call SetReg('/', ["abc/\n"]) ++ call SetReg('=', ['"abc/"']) ++ call SetReg('=', ["\"abc/\n\""]) ++ ++ $put ='{{{1 Errors' ++ call ErrExe('call setreg()') ++ call ErrExe('call setreg(1)') ++ call ErrExe('call setreg(1, 2, 3, 4)') ++ call ErrExe('call setreg([], 2)') ++ call ErrExe('call setreg(1, {})') ++ call ErrExe('call setreg(1, 2, [])') ++ call ErrExe('call setreg("/", [1, 2])') ++ call ErrExe('call setreg("=", [1, 2])') ++ call ErrExe('call setreg(1, ["", "", [], ""])') ++ endfun + :" +! :call Test() + :" +! :delfunction SetReg +! :delfunction AppendRegContents +! :delfunction ErrExe +! :delfunction Test +! :delcommand AR +! :call garbagecollect(1) +! :" +! :/^start:/+1,$wq! test.out +! :" vim: et ts=4 isk-=\: fmr=???,??? +! :call getchar() + ENDTEST + +! start: +*** ../vim-7.4.242/src/testdir/test_eval.ok 2014-04-02 19:54:58.275599459 +0200 +--- src/testdir/test_eval.ok 2014-04-02 22:15:12.547483714 +0200 +*************** +*** 1,7 **** +! result +! 'one +! two +! three +! four +! ' +! ['one', 'two', 'three', 'four'] +--- 1,322 ---- +! {{{1 let tests +! ": type v; value: abc (['abc']), expr: abc (['abc']) +! ": type V; value: abc +! ": type V; value: abc
+! =: type v; value: abc (['abc']), expr: "abc" (['"abc"']) +! {{{1 Basic setreg tests +! {{{2 setreg('a', 'abcA', 'c') +! a: type v; value: abcA (['abcA']), expr: abcA (['abcA']) +! == +! =abcA= +! {{{2 setreg('b', 'abcB', 'v') +! b: type v; value: abcB (['abcB']), expr: abcB (['abcB']) +! == +! =abcB= +! {{{2 setreg('c', 'abcC', 'l') +! c: type V; value: abcC +! == +! abcC +! == +! {{{2 setreg('d', 'abcD', 'V') +! d: type V; value: abcD +! == +! abcD +! == +! {{{2 setreg('e', 'abcE', 'b') +! e: type 4; value: abcE (['abcE']), expr: abcE (['abcE']) +! == +! =abcE= +! {{{2 setreg('f', 'abcF', '') +! f: type 4; value: abcF (['abcF']), expr: abcF (['abcF']) +! == +! =abcF= +! {{{2 setreg('g', 'abcG', 'b10') +! g: type 10; value: abcG (['abcG']), expr: abcG (['abcG']) +! == +! =abcG = +! {{{2 setreg('h', 'abcH', '10') +! h: type 10; value: abcH (['abcH']), expr: abcH (['abcH']) +! == +! =abcH = +! {{{2 setreg('I', 'abcI') +! I: type v; value: abcI (['abcI']), expr: abcI (['abcI']) +! == +! =abcI= +! {{{1 Appending single lines with setreg() +! {{{2 setreg('A', 'abcAc', 'c') +! A: type v; value: abcAabcAc (['abcAabcAc']), expr: abcAabcAc (['abcAabcAc']) +! == +! =abcAabcAc= +! {{{2 setreg('A', 'abcAl', 'l') +! A: type V; value: abcAabcAcabcAl +! == +! abcAabcAcabcAl +! == +! {{{2 setreg('A', 'abcAc2', 'c') +! A: type v; value: abcAabcAcabcAl +! == +! =abcAabcAcabcAl +! abcAc2= +! {{{2 setreg('b', 'abcBc', 'ca') +! b: type v; value: abcBabcBc (['abcBabcBc']), expr: abcBabcBc (['abcBabcBc']) +! == +! =abcBabcBc= +! {{{2 setreg('b', 'abcBb', 'ba') +! b: type 5; value: abcBabcBcabcBb (['abcBabcBcabcBb']), expr: abcBabcBcabcBb (['abcBabcBcabcBb']) +! == +! =abcBabcBcabcBb= +! {{{2 setreg('b', 'abcBc2', 'ca') +! b: type v; value: abcBabcBcabcBb +! == +! =abcBabcBcabcBb +! abcBc2= +! {{{2 setreg('b', 'abcBb2', 'b50a') +! b: type 50; value: abcBabcBcabcBb +! == +! =abcBabcBcabcBb = +! abcBc2abcBb2 +! {{{2 setreg('C', 'abcCl', 'l') +! C: type V; value: abcC +! == +! abcC +! abcCl +! == +! {{{2 setreg('C', 'abcCc', 'c') +! C: type v; value: abcC +! == +! =abcC +! abcCl +! abcCc= +! {{{2 setreg('D', 'abcDb', 'b') +! D: type 5; value: abcD +! == +! =abcD = +! abcDb +! {{{2 setreg('E', 'abcEb', 'b') +! E: type 5; value: abcE +! == +! =abcE = +! abcEb +! {{{2 setreg('E', 'abcEl', 'l') +! E: type V; value: abcE +! == +! abcE +! abcEb +! abcEl +! == +! {{{2 setreg('F', 'abcFc', 'c') +! F: type v; value: abcF +! == +! =abcF +! abcFc= +! {{{1 Appending NL with setreg() +! {{{2 setreg('A', ' +! A: type V; value: abcA2 +! == +! abcA2 +! == +! {{{2 setreg('B', ' +! B: type v; value: abcB2 +! == +! =abcB2 +! = +! {{{2 setreg('C', ' +! C: type V; value: abcC2 +! == +! abcC2 +! +! == +! {{{2 setreg('D', ' +! D: type V; value: abcD2 +! == +! abcD2 +! +! == +! {{{2 setreg('E', ' +! E: type V; value: abcE2 +! == +! abcE2 +! +! == +! {{{2 setreg('F', ' +! F: type 0; value: abcF2 +! == +! =abcF2= +! +! {{{1 Setting lists with setreg() +! {{{2 setreg('a', ['abcA3'], 'c') +! a: type v; value: abcA3 (['abcA3']), expr: abcA3 (['abcA3']) +! == +! =abcA3= +! {{{2 setreg('b', ['abcB3'], 'l') +! b: type V; value: abcB3 +! == +! abcB3 +! == +! {{{2 setreg('c', ['abcC3'], 'b') +! c: type 5; value: abcC3 (['abcC3']), expr: abcC3 (['abcC3']) +! == +! =abcC3= +! {{{2 setreg('d', ['abcD3']) +! d: type V; value: abcD3 +! == +! abcD3 +! == +! {{{1 Appending lists with setreg() +! {{{2 setreg('A', ['abcA3c'], 'c') +! A: type v; value: abcA3 +! == +! =abcA3 +! abcA3c= +! {{{2 setreg('b', ['abcB3l'], 'la') +! b: type V; value: abcB3 +! == +! abcB3 +! abcB3l +! == +! {{{2 setreg('C', ['abcC3b'], 'lb') +! C: type 6; value: abcC3 +! == +! =abcC3 = +! abcC3b +! {{{2 setreg('D', ['abcD32']) +! D: type V; value: abcD3 +! == +! abcD3 +! abcD32 +! == +! {{{2 setreg('A', ['abcA32']) +! A: type V; value: abcA3 +! == +! abcA3 +! abcA3c +! abcA32 +! == +! {{{2 setreg('B', ['abcB3c'], 'c') +! B: type v; value: abcB3 +! == +! =abcB3 +! abcB3l +! abcB3c= +! {{{2 setreg('C', ['abcC3l'], 'l') +! C: type V; value: abcC3 +! == +! abcC3 +! abcC3b +! abcC3l +! == +! {{{2 setreg('D', ['abcD3b'], 'b') +! D: type 6; value: abcD3 +! == +! =abcD3 = +! abcD32 +! abcD3b +! {{{1 Appending lists with NL with setreg() +! {{{2 setreg('A', [' +! A: type V; value: abcA3 +! == +! abcA3 +! abcA3c +! abcA32 +! +! abcA3l2 +! == +! {{{2 setreg('B', [' +! B: type v; value: abcB3 +! == +! =abcB3 +! abcB3l +! abcB3c +! +! abcB3c2= +! {{{2 setreg('C', [' +! C: type 7; value: abcC3 +! == +! =abcC3 = +! abcC3b +! abcC3l +! +! abcC3b2 +! {{{2 setreg('D', [' +! D: type 50; value: abcD3 +! == +! =abcD3 = +! abcD32 +! abcD3b +! +! abcD3b50 +! {{{1 Setting lists with NLs with setreg() +! {{{2 setreg('a', ['abcA4-0', ' +! a: type V; value: abcA4-0 +! == +! abcA4-0 +! +! abcA4-2 +! +! abcA4-4 +! == +! {{{2 setreg('b', ['abcB4c-0', ' +! b: type v; value: abcB4c-0 +! == +! =abcB4c-0 +! +! abcB4c-2 +! +! abcB4c-4 +! {{{2 setreg('c', ['abcC4l-0', ' +! c: type V; value: abcC4l-0 +! == +! abcC4l-0 +! +! abcC4l-2 +! +! abcC4l-4 +! == +! {{{2 setreg('d', ['abcD4b-0', ' +! d: type 19; value: abcD4b-0 +! == +! =abcD4b-0 = +! +! abcD4b-2 +! +! abcD4b-4 +! {{{2 setreg('e', ['abcE4b10-0', ' +! e: type 10; value: abcE4b10-0 +! == +! =abcE4b10-0= +! +! abcE4b10-2 +! +! abcE4b10-4 +! {{{1 Search and expressions +! {{{2 setreg('/', ['abc/']) +! /: type v; value: abc/ (['abc/']), expr: abc/ (['abc/']) +! == +! =abc/= +! {{{2 setreg('/', ['abc/ +! /: type v; value: abc/ +! == +! =abc/ +! {{{2 setreg('=', ['"abc/"']) +! =: type v; value: abc/ (['abc/']), expr: "abc/" (['"abc/"']) +! {{{2 setreg('=', ['"abc/ +! =: type v; value: abc/ +! {{{1 Errors +! Executing call setreg() +! Vim(call):E119: Not enough arguments for function: setreg +! Executing call setreg(1) +! Vim(call):E119: Not enough arguments for function: setreg +! Executing call setreg(1, 2, 3, 4) +! Vim(call):E118: Too many arguments for function: setreg +! Executing call setreg([], 2) +! Vim(call):E730: using List as a String +! Executing call setreg(1, {}) +! Vim(call):E731: using Dictionary as a String +! Executing call setreg(1, 2, []) +! Vim(call):E730: using List as a String +! Executing call setreg("/", [1, 2]) +! Vim(call):E883: search pattern and expression register may not contain two or more lines +! Executing call setreg("=", [1, 2]) +! Vim(call):E883: search pattern and expression register may not contain two or more lines +! Executing call setreg(1, ["", "", [], ""]) +! Vim(call):E730: using List as a String +*** ../vim-7.4.242/src/version.c 2014-04-02 19:54:58.279599459 +0200 +--- src/version.c 2014-04-02 22:15:32.767483436 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 243, + /**/ + +-- +I have a drinking problem -- I don't have a drink! + + /// 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/patches/source/vim/patches/7.4.244 b/patches/source/vim/patches/7.4.244 new file mode 100644 index 000000000..448edfa50 --- /dev/null +++ b/patches/source/vim/patches/7.4.244 @@ -0,0 +1,60 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.244 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.244 (after 7.4.238) +Problem: The smack feature causes stray error messages. +Solution: Remove the error messages. +Files: src/os_unix.c + + +*** ../vim-7.4.243/src/os_unix.c 2014-04-02 14:05:33.999887839 +0200 +--- src/os_unix.c 2014-04-02 23:08:25.967439786 +0200 +*************** +*** 2875,2888 **** + case ENODATA: + /* no attribute of this name */ + ret = removexattr((char*)to_file, name); +! if (ret < 0 && errno != ENODATA) +! { +! MSG_PUTS(_("Could not remove security context ")); +! MSG_PUTS(name); +! MSG_PUTS(_(" for ")); +! msg_outtrans(to_file); +! msg_putchar('\n'); +! } + break; + } + } +--- 2875,2882 ---- + case ENODATA: + /* no attribute of this name */ + ret = removexattr((char*)to_file, name); +! /* Silently ignore errors, apparently this happens when +! * smack is not actually being used. */ + break; + } + } +*** ../vim-7.4.243/src/version.c 2014-04-02 22:17:00.007482236 +0200 +--- src/version.c 2014-04-02 23:07:36.067440472 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 244, + /**/ + +-- +How To Keep A Healthy Level Of Insanity: +2. Page yourself over the intercom. Don't disguise your voice. + + /// 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/patches/source/vim/patches/7.4.245 b/patches/source/vim/patches/7.4.245 new file mode 100644 index 000000000..83ca6a4fd --- /dev/null +++ b/patches/source/vim/patches/7.4.245 @@ -0,0 +1,52 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.245 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.245 +Problem: Crash for "vim -u NONE -N -c '&&'". +Solution: Check for the pattern to be NULL. (Dominique Pelle) +Files: src/ex_cmds.c + + +*** ../vim-7.4.244/src/ex_cmds.c 2014-04-01 17:49:40.136891378 +0200 +--- src/ex_cmds.c 2014-04-04 18:56:00.159939544 +0200 +*************** +*** 4425,4431 **** + * TODO: find a generic solution to make line-joining operations more + * efficient, avoid allocating a string that grows in size. + */ +! if (STRCMP(pat, "\\n") == 0 && STRLEN(pat) == 2 + && *sub == NUL + && (*cmd == NUL || (cmd[1] == NUL && (*cmd == 'g' || *cmd == 'l' + || *cmd == 'p' || *cmd == '#')))) +--- 4425,4431 ---- + * TODO: find a generic solution to make line-joining operations more + * efficient, avoid allocating a string that grows in size. + */ +! if (pat != NULL && STRCMP(pat, "\\n") == 0 + && *sub == NUL + && (*cmd == NUL || (cmd[1] == NUL && (*cmd == 'g' || *cmd == 'l' + || *cmd == 'p' || *cmd == '#')))) +*** ../vim-7.4.244/src/version.c 2014-04-02 23:09:23.003439001 +0200 +--- src/version.c 2014-04-04 18:52:21.519939067 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 245, + /**/ + +-- +One difference between a man and a machine is that a machine is quiet +when well oiled. + + /// 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/patches/source/vim/patches/7.4.246 b/patches/source/vim/patches/7.4.246 new file mode 100644 index 000000000..0ac7afa1f --- /dev/null +++ b/patches/source/vim/patches/7.4.246 @@ -0,0 +1,121 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.246 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.246 +Problem: Configure message for detecting smack are out of sequence. +Solution: Put the messages in the right place. (Kazunobu Kuriyama) +Files: src/configure.in, src/auto/configure + + +*** ../vim-7.4.245/src/configure.in 2014-04-02 14:05:33.999887839 +0200 +--- src/configure.in 2014-04-05 11:56:33.807099380 +0200 +*************** +*** 393,408 **** + [ --disable-smack Do not check for Smack support.], + , enable_smack="yes") + if test "$enable_smack" = "yes"; then + AC_CHECK_HEADER([linux/xattr.h], true, enable_smack="no") + fi + if test "$enable_smack" = "yes"; then +- AC_MSG_RESULT(no) + AC_CHECK_LIB(attr, llistxattr, + [LIBS="$LIBS -lattr" + found_smack="yes" + AC_DEFINE(HAVE_SMACK)]) +- else +- AC_MSG_RESULT(yes) + fi + + dnl When smack was found don't search for SELinux +--- 393,408 ---- + [ --disable-smack Do not check for Smack support.], + , enable_smack="yes") + if test "$enable_smack" = "yes"; then ++ AC_MSG_RESULT(no) + AC_CHECK_HEADER([linux/xattr.h], true, enable_smack="no") ++ else ++ AC_MSG_RESULT(yes) + fi + if test "$enable_smack" = "yes"; then + AC_CHECK_LIB(attr, llistxattr, + [LIBS="$LIBS -lattr" + found_smack="yes" + AC_DEFINE(HAVE_SMACK)]) + fi + + dnl When smack was found don't search for SELinux +*** ../vim-7.4.245/src/auto/configure 2014-04-02 14:05:34.003887839 +0200 +--- src/auto/configure 2014-04-05 11:56:37.123099387 +0200 +*************** +*** 4600,4605 **** +--- 4600,4607 ---- + fi + + if test "$enable_smack" = "yes"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++ $as_echo "no" >&6; } + ac_fn_c_check_header_mongrel "$LINENO" "linux/xattr.h" "ac_cv_header_linux_xattr_h" "$ac_includes_default" + if test "x$ac_cv_header_linux_xattr_h" = xyes; then : + true +*************** +*** 4608,4617 **** + fi + + + fi + if test "$enable_smack" = "yes"; then +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +- $as_echo "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for llistxattr in -lattr" >&5 + $as_echo_n "checking for llistxattr in -lattr... " >&6; } + if ${ac_cv_lib_attr_llistxattr+:} false; then : +--- 4610,4620 ---- + fi + + ++ else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 ++ $as_echo "yes" >&6; } + fi + if test "$enable_smack" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for llistxattr in -lattr" >&5 + $as_echo_n "checking for llistxattr in -lattr... " >&6; } + if ${ac_cv_lib_attr_llistxattr+:} false; then : +*************** +*** 4655,4663 **** + + fi + +- else +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +- $as_echo "yes" >&6; } + fi + + if test "x$found_smack" = "x"; then +--- 4658,4663 ---- +*** ../vim-7.4.245/src/version.c 2014-04-04 19:00:46.351940169 +0200 +--- src/version.c 2014-04-05 11:57:29.503099502 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 246, + /**/ + +-- +Apparently, 1 in 5 people in the world are Chinese. And there are 5 +people in my family, so it must be one of them. It's either my mum +or my dad. Or my older brother Colin. Or my younger brother +Ho-Cha-Chu. But I think it's Colin. + + /// 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/patches/source/vim/patches/7.4.247 b/patches/source/vim/patches/7.4.247 new file mode 100644 index 000000000..36006e17b --- /dev/null +++ b/patches/source/vim/patches/7.4.247 @@ -0,0 +1,227 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.247 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.247 +Problem: When passing input to system() there is no way to keep NUL and + NL characters separate. +Solution: Optionally use a list for the system() input. (ZyX) +Files: runtime/doc/eval.txt, src/eval.c + + +*** ../vim-7.4.246/runtime/doc/eval.txt 2014-04-02 22:16:59.995482236 +0200 +--- runtime/doc/eval.txt 2014-04-05 18:47:12.907153201 +0200 +*************** +*** 5951,5960 **** + + system({expr} [, {input}]) *system()* *E677* + Get the output of the shell command {expr}. +! When {input} is given, this string is written to a file and +! passed as stdin to the command. The string is written as-is, +! you need to take care of using the correct line separators +! yourself. Pipes are not used. + Note: Use |shellescape()| or |::S| with |expand()| or + |fnamemodify()| to escape special characters in a command + argument. Newlines in {expr} may cause the command to fail. +--- 5964,5980 ---- + + system({expr} [, {input}]) *system()* *E677* + Get the output of the shell command {expr}. +! +! When {input} is given and is a string this string is written +! to a file and passed as stdin to the command. The string is +! written as-is, you need to take care of using the correct line +! separators yourself. +! If {input} is given and is a |List| it is written to the file +! in a way |writefile()| does with {binary} set to "b" (i.e. +! with a newline between each list item with newlines inside +! list items converted to NULs). +! Pipes are not used. +! + Note: Use |shellescape()| or |::S| with |expand()| or + |fnamemodify()| to escape special characters in a command + argument. Newlines in {expr} may cause the command to fail. +*** ../vim-7.4.246/src/eval.c 2014-04-02 22:17:00.003482236 +0200 +--- src/eval.c 2014-04-05 18:47:50.971153284 +0200 +*************** +*** 836,841 **** +--- 836,842 ---- + static int searchpair_cmn __ARGS((typval_T *argvars, pos_T *match_pos)); + static int search_cmn __ARGS((typval_T *argvars, pos_T *match_pos, int *flagsp)); + static void setwinvar __ARGS((typval_T *argvars, typval_T *rettv, int off)); ++ static int write_list __ARGS((FILE *fd, list_T *list, int binary)); + + + #ifdef EBCDIC +*************** +*** 18267,18280 **** + EMSG2(_(e_notopen), infile); + goto done; + } +! p = get_tv_string_buf_chk(&argvars[1], buf); +! if (p == NULL) + { +! fclose(fd); +! goto done; /* type error; errmsg already given */ + } +- if (fwrite(p, STRLEN(p), 1, fd) != 1) +- err = TRUE; + if (fclose(fd) != 0) + err = TRUE; + if (err) +--- 18268,18289 ---- + EMSG2(_(e_notopen), infile); + goto done; + } +! if (argvars[1].v_type == VAR_LIST) + { +! if (write_list(fd, argvars[1].vval.v_list, TRUE) == FAIL) +! err = TRUE; +! } +! else +! { +! p = get_tv_string_buf_chk(&argvars[1], buf); +! if (p == NULL) +! { +! fclose(fd); +! goto done; /* type error; errmsg already given */ +! } +! if (fwrite(p, STRLEN(p), 1, fd) != 1) +! err = TRUE; + } + if (fclose(fd) != 0) + err = TRUE; + if (err) +*************** +*** 19173,19178 **** +--- 19182,19230 ---- + } + + /* ++ * Write list of strings to file ++ */ ++ static int ++ write_list(fd, list, binary) ++ FILE *fd; ++ list_T *list; ++ int binary; ++ { ++ listitem_T *li; ++ int c; ++ int ret = OK; ++ char_u *s; ++ ++ for (li = list->lv_first; li != NULL; li = li->li_next) ++ { ++ for (s = get_tv_string(&li->li_tv); *s != NUL; ++s) ++ { ++ if (*s == '\n') ++ c = putc(NUL, fd); ++ else ++ c = putc(*s, fd); ++ if (c == EOF) ++ { ++ ret = FAIL; ++ break; ++ } ++ } ++ if (!binary || li->li_next != NULL) ++ if (putc('\n', fd) == EOF) ++ { ++ ret = FAIL; ++ break; ++ } ++ if (ret == FAIL) ++ { ++ EMSG(_(e_write)); ++ break; ++ } ++ } ++ return ret; ++ } ++ ++ /* + * "writefile()" function + */ + static void +*************** +*** 19183,19192 **** + int binary = FALSE; + char_u *fname; + FILE *fd; +- listitem_T *li; +- char_u *s; + int ret = 0; +- int c; + + if (check_restricted() || check_secure()) + return; +--- 19235,19241 ---- +*************** +*** 19213,19245 **** + } + else + { +! for (li = argvars[0].vval.v_list->lv_first; li != NULL; +! li = li->li_next) +! { +! for (s = get_tv_string(&li->li_tv); *s != NUL; ++s) +! { +! if (*s == '\n') +! c = putc(NUL, fd); +! else +! c = putc(*s, fd); +! if (c == EOF) +! { +! ret = -1; +! break; +! } +! } +! if (!binary || li->li_next != NULL) +! if (putc('\n', fd) == EOF) +! { +! ret = -1; +! break; +! } +! if (ret < 0) +! { +! EMSG(_(e_write)); +! break; +! } +! } + fclose(fd); + } + +--- 19262,19269 ---- + } + else + { +! if (write_list(fd, argvars[0].vval.v_list, binary) == FAIL) +! ret = -1; + fclose(fd); + } + +*** ../vim-7.4.246/src/version.c 2014-04-05 12:02:20.751100138 +0200 +--- src/version.c 2014-04-05 18:49:24.411153488 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 247, + /**/ + +-- +Time is an illusion. Lunchtime doubly so. + -- Ford Prefect, in Douglas Adams' + "The Hitchhiker's Guide to the Galaxy" + + /// 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/patches/source/vim/patches/7.4.248 b/patches/source/vim/patches/7.4.248 new file mode 100644 index 000000000..b41f6cb06 --- /dev/null +++ b/patches/source/vim/patches/7.4.248 @@ -0,0 +1,515 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.248 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.248 +Problem: Cannot distinguish between NL and NUL in output of system(). +Solution: Add systemlist(). (ZyX) +Files: runtime/doc/eval.txt, src/eval.c, src/ex_cmds2.c, src/misc1.c, + src/proto/misc1.pro + + +*** ../vim-7.4.247/runtime/doc/eval.txt 2014-04-05 18:55:40.471154309 +0200 +--- runtime/doc/eval.txt 2014-04-05 19:03:05.419155281 +0200 +*************** +*** 2001,2006 **** +--- 2002,2008 ---- + synconcealed( {lnum}, {col}) List info about concealing + synstack( {lnum}, {col}) List stack of syntax IDs at {lnum} and {col} + system( {expr} [, {input}]) String output of shell command/filter {expr} ++ systemlist( {expr} [, {input}]) List output of shell command/filter {expr} + tabpagebuflist( [{arg}]) List list of buffer numbers in tab page + tabpagenr( [{arg}]) Number number of current or last tab page + tabpagewinnr( {tabarg}[, {arg}]) +*************** +*** 5950,5956 **** + valid positions. + + system({expr} [, {input}]) *system()* *E677* +! Get the output of the shell command {expr}. + + When {input} is given and is a string this string is written + to a file and passed as stdin to the command. The string is +--- 5964,5971 ---- + valid positions. + + system({expr} [, {input}]) *system()* *E677* +! Get the output of the shell command {expr} as a string. See +! |systemlist()| to get the output as a List. + + When {input} is given and is a string this string is written + to a file and passed as stdin to the command. The string is +*************** +*** 5998,6003 **** +--- 6013,6028 ---- + Use |:checktime| to force a check. + + ++ systemlist({expr} [, {input}]) *systemlist()* ++ Same as |system()|, but returns a |List| with lines (parts of ++ output separated by NL) with NULs transformed into NLs. Output ++ is the same as |readfile()| will output with {binary} argument ++ set to "b". ++ ++ Returns an empty string on error, so be careful not to run ++ into |E706|. ++ ++ + tabpagebuflist([{arg}]) *tabpagebuflist()* + The result is a |List|, where each item is the number of the + buffer associated with each window in the current tab page. +*** ../vim-7.4.247/src/eval.c 2014-04-05 18:55:40.479154309 +0200 +--- src/eval.c 2014-04-05 19:42:37.675160463 +0200 +*************** +*** 726,731 **** +--- 726,732 ---- + static void f_synstack __ARGS((typval_T *argvars, typval_T *rettv)); + static void f_synconcealed __ARGS((typval_T *argvars, typval_T *rettv)); + static void f_system __ARGS((typval_T *argvars, typval_T *rettv)); ++ static void f_systemlist __ARGS((typval_T *argvars, typval_T *rettv)); + static void f_tabpagebuflist __ARGS((typval_T *argvars, typval_T *rettv)); + static void f_tabpagenr __ARGS((typval_T *argvars, typval_T *rettv)); + static void f_tabpagewinnr __ARGS((typval_T *argvars, typval_T *rettv)); +*************** +*** 837,842 **** +--- 838,844 ---- + static int search_cmn __ARGS((typval_T *argvars, pos_T *match_pos, int *flagsp)); + static void setwinvar __ARGS((typval_T *argvars, typval_T *rettv, int off)); + static int write_list __ARGS((FILE *fd, list_T *list, int binary)); ++ static void get_cmd_output_as_rettv __ARGS((typval_T *argvars, typval_T *rettv, int retlist)); + + + #ifdef EBCDIC +*************** +*** 8139,8144 **** +--- 8141,8147 ---- + {"synconcealed", 2, 2, f_synconcealed}, + {"synstack", 2, 2, f_synstack}, + {"system", 1, 2, f_system}, ++ {"systemlist", 1, 2, f_systemlist}, + {"tabpagebuflist", 0, 1, f_tabpagebuflist}, + {"tabpagenr", 0, 1, f_tabpagenr}, + {"tabpagewinnr", 1, 2, f_tabpagewinnr}, +*************** +*** 18232,18244 **** + #endif + } + +- /* +- * "system()" function +- */ + static void +! f_system(argvars, rettv) + typval_T *argvars; + typval_T *rettv; + { + char_u *res = NULL; + char_u *p; +--- 18235,18245 ---- + #endif + } + + static void +! get_cmd_output_as_rettv(argvars, rettv, retlist) + typval_T *argvars; + typval_T *rettv; ++ int retlist; + { + char_u *res = NULL; + char_u *p; +*************** +*** 18246,18254 **** + char_u buf[NUMBUFLEN]; + int err = FALSE; + FILE *fd; + + if (check_restricted() || check_secure()) +! goto done; + + if (argvars[1].v_type != VAR_UNKNOWN) + { +--- 18247,18258 ---- + char_u buf[NUMBUFLEN]; + int err = FALSE; + FILE *fd; ++ list_T *list = NULL; + ++ rettv->v_type = VAR_STRING; ++ rettv->vval.v_string = NULL; + if (check_restricted() || check_secure()) +! goto errret; + + if (argvars[1].v_type != VAR_UNKNOWN) + { +*************** +*** 18259,18272 **** + if ((infile = vim_tempname('i')) == NULL) + { + EMSG(_(e_notmp)); +! goto done; + } + + fd = mch_fopen((char *)infile, WRITEBIN); + if (fd == NULL) + { + EMSG2(_(e_notopen), infile); +! goto done; + } + if (argvars[1].v_type == VAR_LIST) + { +--- 18263,18276 ---- + if ((infile = vim_tempname('i')) == NULL) + { + EMSG(_(e_notmp)); +! goto errret; + } + + fd = mch_fopen((char *)infile, WRITEBIN); + if (fd == NULL) + { + EMSG2(_(e_notopen), infile); +! goto errret; + } + if (argvars[1].v_type == VAR_LIST) + { +*************** +*** 18279,18285 **** + if (p == NULL) + { + fclose(fd); +! goto done; /* type error; errmsg already given */ + } + if (fwrite(p, STRLEN(p), 1, fd) != 1) + err = TRUE; +--- 18283,18289 ---- + if (p == NULL) + { + fclose(fd); +! goto errret; /* type error; errmsg already given */ + } + if (fwrite(p, STRLEN(p), 1, fd) != 1) + err = TRUE; +*************** +*** 18289,18340 **** + if (err) + { + EMSG(_("E677: Error writing temp file")); +! goto done; + } + } + +! res = get_cmd_output(get_tv_string(&argvars[0]), infile, +! SHELL_SILENT | SHELL_COOKED); +! +! #ifdef USE_CR +! /* translate <CR> into <NL> */ +! if (res != NULL) + { +! char_u *s; + +! for (s = res; *s; ++s) +! { +! if (*s == CAR) +! *s = NL; + } + } +! #else +! # ifdef USE_CRNL +! /* translate <CR><NL> into <NL> */ +! if (res != NULL) + { +! char_u *s, *d; + +! d = res; +! for (s = res; *s; ++s) + { +! if (s[0] == CAR && s[1] == NL) +! ++s; +! *d++ = *s; + } +- *d = NUL; +- } + # endif + #endif + +! done: + if (infile != NULL) + { + mch_remove(infile); + vim_free(infile); + } +! rettv->v_type = VAR_STRING; +! rettv->vval.v_string = res; + } + + /* +--- 18293,18420 ---- + if (err) + { + EMSG(_("E677: Error writing temp file")); +! goto errret; + } + } + +! if (retlist) + { +! int len; +! listitem_T *li; +! char_u *s = NULL; +! char_u *start; +! char_u *end; +! char_u *p; +! int i; +! +! res = get_cmd_output(get_tv_string(&argvars[0]), infile, +! SHELL_SILENT | SHELL_COOKED, &len); +! if (res == NULL) +! goto errret; +! +! list = list_alloc(); +! if (list == NULL) +! goto errret; +! +! for (i = 0; i < len; ++i) +! { +! start = res + i; +! for (end = start; i < len && *end != NL; ++end) +! ++i; + +! s = vim_strnsave(start, (int)(end - start)); +! if (s == NULL) +! goto errret; +! +! for (p = s, end = s + (end - start); p < end; ++p) +! if (*p == NUL) +! *p = NL; +! +! li = listitem_alloc(); +! if (li == NULL) +! { +! vim_free(s); +! goto errret; +! } +! li->li_tv.v_type = VAR_STRING; +! li->li_tv.vval.v_string = s; +! list_append(list, li); + } ++ ++ rettv->v_type = VAR_LIST; ++ rettv->vval.v_list = list; ++ list = NULL; + } +! else + { +! res = get_cmd_output(get_tv_string(&argvars[0]), infile, +! SHELL_SILENT | SHELL_COOKED, NULL); +! #ifdef USE_CR +! /* translate <CR> into <NL> */ +! if (res != NULL) +! { +! char_u *s; + +! for (s = res; *s; ++s) +! { +! if (*s == CAR) +! *s = NL; +! } +! } +! #else +! # ifdef USE_CRNL +! /* translate <CR><NL> into <NL> */ +! if (res != NULL) + { +! char_u *s, *d; +! +! d = res; +! for (s = res; *s; ++s) +! { +! if (s[0] == CAR && s[1] == NL) +! ++s; +! *d++ = *s; +! } +! *d = NUL; + } + # endif + #endif ++ rettv->vval.v_string = res; ++ res = NULL; ++ } + +! errret: + if (infile != NULL) + { + mch_remove(infile); + vim_free(infile); + } +! if (res != NULL) +! vim_free(res); +! if (list != NULL) +! list_free(list, TRUE); +! } +! +! /* +! * "system()" function +! */ +! static void +! f_system(argvars, rettv) +! typval_T *argvars; +! typval_T *rettv; +! { +! get_cmd_output_as_rettv(argvars, rettv, FALSE); +! } +! +! /* +! * "systemlist()" function +! */ +! static void +! f_systemlist(argvars, rettv) +! typval_T *argvars; +! typval_T *rettv; +! { +! get_cmd_output_as_rettv(argvars, rettv, TRUE); + } + + /* +*** ../vim-7.4.247/src/ex_cmds2.c 2013-11-09 03:31:45.000000000 +0100 +--- src/ex_cmds2.c 2014-04-05 19:20:25.023157552 +0200 +*************** +*** 4341,4347 **** + /* Find all available locales by running command "locale -a". If this + * doesn't work we won't have completion. */ + char_u *locale_a = get_cmd_output((char_u *)"locale -a", +! NULL, SHELL_SILENT); + if (locale_a == NULL) + return NULL; + ga_init2(&locales_ga, sizeof(char_u *), 20); +--- 4341,4347 ---- + /* Find all available locales by running command "locale -a". If this + * doesn't work we won't have completion. */ + char_u *locale_a = get_cmd_output((char_u *)"locale -a", +! NULL, SHELL_SILENT, NULL); + if (locale_a == NULL) + return NULL; + ga_init2(&locales_ga, sizeof(char_u *), 20); +*** ../vim-7.4.247/src/misc1.c 2014-04-01 21:00:45.436733663 +0200 +--- src/misc1.c 2014-04-05 19:21:36.603157708 +0200 +*************** +*** 10665,10671 **** + else + #endif + buffer = get_cmd_output(cmd, NULL, +! (flags & EW_SILENT) ? SHELL_SILENT : 0); + vim_free(cmd); + if (buffer == NULL) + return 0; +--- 10665,10671 ---- + else + #endif + buffer = get_cmd_output(cmd, NULL, +! (flags & EW_SILENT) ? SHELL_SILENT : 0, NULL); + vim_free(cmd); + if (buffer == NULL) + return 0; +*************** +*** 10765,10777 **** + + /* + * Get the stdout of an external command. + * Returns an allocated string, or NULL for error. + */ + char_u * +! get_cmd_output(cmd, infile, flags) + char_u *cmd; + char_u *infile; /* optional input file name */ + int flags; /* can be SHELL_SILENT */ + { + char_u *tempname; + char_u *command; +--- 10765,10780 ---- + + /* + * Get the stdout of an external command. ++ * If "ret_len" is NULL replace NUL characters with NL. When "ret_len" is not ++ * NULL store the length there. + * Returns an allocated string, or NULL for error. + */ + char_u * +! get_cmd_output(cmd, infile, flags, ret_len) + char_u *cmd; + char_u *infile; /* optional input file name */ + int flags; /* can be SHELL_SILENT */ ++ int *ret_len; + { + char_u *tempname; + char_u *command; +*************** +*** 10841,10847 **** + vim_free(buffer); + buffer = NULL; + } +! else + { + /* Change NUL into SOH, otherwise the string is truncated. */ + for (i = 0; i < len; ++i) +--- 10844,10850 ---- + vim_free(buffer); + buffer = NULL; + } +! else if (ret_len == NULL) + { + /* Change NUL into SOH, otherwise the string is truncated. */ + for (i = 0; i < len; ++i) +*************** +*** 10850,10855 **** +--- 10853,10860 ---- + + buffer[len] = NUL; /* make sure the buffer is terminated */ + } ++ else ++ *ret_len = len; + + done: + vim_free(tempname); +*** ../vim-7.4.247/src/proto/misc1.pro 2013-11-06 04:01:31.000000000 +0100 +--- src/proto/misc1.pro 2014-04-05 19:06:26.427155720 +0200 +*************** +*** 100,106 **** + void remove_duplicates __ARGS((garray_T *gap)); + int gen_expand_wildcards __ARGS((int num_pat, char_u **pat, int *num_file, char_u ***file, int flags)); + void addfile __ARGS((garray_T *gap, char_u *f, int flags)); +! char_u *get_cmd_output __ARGS((char_u *cmd, char_u *infile, int flags)); + void FreeWild __ARGS((int count, char_u **files)); + int goto_im __ARGS((void)); + /* vim: set ft=c : */ +--- 100,106 ---- + void remove_duplicates __ARGS((garray_T *gap)); + int gen_expand_wildcards __ARGS((int num_pat, char_u **pat, int *num_file, char_u ***file, int flags)); + void addfile __ARGS((garray_T *gap, char_u *f, int flags)); +! char_u *get_cmd_output __ARGS((char_u *cmd, char_u *infile, int flags, int *ret_len)); + void FreeWild __ARGS((int count, char_u **files)); + int goto_im __ARGS((void)); + /* vim: set ft=c : */ +*** ../vim-7.4.247/src/version.c 2014-04-05 18:55:40.479154309 +0200 +--- src/version.c 2014-04-05 19:07:12.447155821 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 248, + /**/ + +-- +Tips for aliens in New York: Land anywhere. Central Park, anywhere. +No one will care or indeed even notice. + -- Douglas Adams, "The Hitchhiker's Guide to the Galaxy" + + /// 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/patches/source/vim/patches/7.4.249 b/patches/source/vim/patches/7.4.249 Binary files differnew file mode 100644 index 000000000..9f290a29b --- /dev/null +++ b/patches/source/vim/patches/7.4.249 diff --git a/patches/source/vim/patches/7.4.250 b/patches/source/vim/patches/7.4.250 new file mode 100644 index 000000000..ff078aaab --- /dev/null +++ b/patches/source/vim/patches/7.4.250 @@ -0,0 +1,52 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.250 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.250 +Problem: Some test files missing from distribution. +Solution: Add pattern for newly added tests. +Files: Filelist + + +*** ../vim-7.4.249/Filelist 2014-01-23 14:26:18.815303381 +0100 +--- Filelist 2014-04-05 21:56:31.743178012 +0200 +*************** +*** 82,90 **** +--- 82,93 ---- + src/testdir/*.in \ + src/testdir/sautest/autoload/*.vim \ + src/testdir/test[0-9]*.ok \ ++ src/testdir/test[0-9]*a.ok \ ++ src/testdir/test_[a-z]*.ok \ + src/testdir/test49.vim \ + src/testdir/test60.vim \ + src/testdir/test83-tags? \ ++ src/testdir/test77a.com \ + src/testdir/python2/*.py \ + src/testdir/python3/*.py \ + src/testdir/pythonx/*.py \ +*** ../vim-7.4.249/src/version.c 2014-04-05 21:28:50.671174384 +0200 +--- src/version.c 2014-04-05 21:58:05.203178216 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 250, + /**/ + +-- +Give a man a computer program and you give him a headache, +but teach him to program computers and you give him the power +to create headaches for others for the rest of his life... + R. B. Forest + + /// 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/patches/source/vim/patches/7.4.251 b/patches/source/vim/patches/7.4.251 new file mode 100644 index 000000000..e841b80b1 --- /dev/null +++ b/patches/source/vim/patches/7.4.251 @@ -0,0 +1,164 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.251 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.251 +Problem: Crash when BufAdd autocommand wipes out the buffer. +Solution: Check for buffer to still be valid. Postpone freeing the buffer + structure. (Hirohito Higashi) +Files: src/buffer.c, src/ex_cmds.c, src/fileio.c, src/globals.h + + +*** ../vim-7.4.250/src/buffer.c 2014-03-23 15:12:29.907264336 +0100 +--- src/buffer.c 2014-04-06 19:55:53.563350929 +0200 +*************** +*** 676,683 **** + #endif + #ifdef FEAT_AUTOCMD + aubuflocal_remove(buf); + #endif +! vim_free(buf); + } + + /* +--- 676,691 ---- + #endif + #ifdef FEAT_AUTOCMD + aubuflocal_remove(buf); ++ if (autocmd_busy) ++ { ++ /* Do not free the buffer structure while autocommands are executing, ++ * it's still needed. Free it when autocmd_busy is reset. */ ++ buf->b_next = au_pending_free_buf; ++ au_pending_free_buf = buf; ++ } ++ else + #endif +! vim_free(buf); + } + + /* +*************** +*** 1681,1687 **** +--- 1689,1699 ---- + buf->b_p_bl = TRUE; + #ifdef FEAT_AUTOCMD + if (!(flags & BLN_DUMMY)) ++ { + apply_autocmds(EVENT_BUFADD, NULL, NULL, FALSE, buf); ++ if (!buf_valid(buf)) ++ return NULL; ++ } + #endif + } + return buf; +*************** +*** 1857,1864 **** +--- 1869,1882 ---- + if (!(flags & BLN_DUMMY)) + { + apply_autocmds(EVENT_BUFNEW, NULL, NULL, FALSE, buf); ++ if (!buf_valid(buf)) ++ return NULL; + if (flags & BLN_LISTED) ++ { + apply_autocmds(EVENT_BUFADD, NULL, NULL, FALSE, buf); ++ if (!buf_valid(buf)) ++ return NULL; ++ } + # ifdef FEAT_EVAL + if (aborting()) /* autocmds may abort script processing */ + return NULL; +*** ../vim-7.4.250/src/ex_cmds.c 2014-04-04 19:00:46.351940169 +0200 +--- src/ex_cmds.c 2014-04-06 20:41:37.899356924 +0200 +*************** +*** 3343,3348 **** +--- 3343,3354 ---- + #endif + buf = buflist_new(ffname, sfname, 0L, + BLN_CURBUF | ((flags & ECMD_SET_HELP) ? 0 : BLN_LISTED)); ++ #ifdef FEAT_AUTOCMD ++ /* autocommands may change curwin and curbuf */ ++ if (oldwin != NULL) ++ oldwin = curwin; ++ old_curbuf = curbuf; ++ #endif + } + if (buf == NULL) + goto theend; +*** ../vim-7.4.250/src/fileio.c 2014-04-02 14:05:33.999887839 +0200 +--- src/fileio.c 2014-04-06 20:34:24.063355976 +0200 +*************** +*** 9548,9560 **** + + /* + * When stopping to execute autocommands, restore the search patterns and +! * the redo buffer. + */ + if (!autocmd_busy) + { + restore_search_patterns(); + restoreRedobuff(); + did_filetype = FALSE; + } + + /* +--- 9548,9566 ---- + + /* + * When stopping to execute autocommands, restore the search patterns and +! * the redo buffer. Free buffers in the au_pending_free_buf list. + */ + if (!autocmd_busy) + { + restore_search_patterns(); + restoreRedobuff(); + did_filetype = FALSE; ++ while (au_pending_free_buf != NULL) ++ { ++ buf_T *b = au_pending_free_buf->b_next; ++ vim_free(au_pending_free_buf); ++ au_pending_free_buf = b; ++ } + } + + /* +*** ../vim-7.4.250/src/globals.h 2014-03-23 15:12:29.943264337 +0100 +--- src/globals.h 2014-04-06 20:32:58.339355789 +0200 +*************** +*** 386,391 **** +--- 386,396 ---- + /* When deleting the current buffer, another one must be loaded. If we know + * which one is preferred, au_new_curbuf is set to it */ + EXTERN buf_T *au_new_curbuf INIT(= NULL); ++ ++ /* When deleting the buffer and autocmd_busy is TRUE, do not free the buffer ++ * but link it in the list starting with au_pending_free_buf, using b_next. ++ * Free the buffer when autocmd_busy is set to FALSE. */ ++ EXTERN buf_T *au_pending_free_buf INIT(= NULL); + #endif + + #ifdef FEAT_MOUSE +*** ../vim-7.4.250/src/version.c 2014-04-05 21:59:35.939178415 +0200 +--- src/version.c 2014-04-06 19:52:46.887350521 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 251, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +37. You start looking for hot HTML addresses in public restrooms. + + /// 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/patches/source/vim/patches/7.4.252 b/patches/source/vim/patches/7.4.252 new file mode 100644 index 000000000..2c02849b3 --- /dev/null +++ b/patches/source/vim/patches/7.4.252 @@ -0,0 +1,47 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.252 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.252 +Problem: Critical error in GTK, removing timer twice. +Solution: Clear the timer after removing it. (James McCoy) +Files: src/gui_gtk_x11.c + + +*** ../vim-7.4.251/src/gui_gtk_x11.c 2013-06-30 17:42:13.000000000 +0200 +--- src/gui_gtk_x11.c 2014-04-06 21:04:57.595359981 +0200 +*************** +*** 732,738 **** +--- 732,741 ---- + gui_mch_start_blink(void) + { + if (blink_timer) ++ { + gtk_timeout_remove(blink_timer); ++ blink_timer = 0; ++ } + /* Only switch blinking on if none of the times is zero */ + if (blink_waittime && blink_ontime && blink_offtime && gui.in_focus) + { +*** ../vim-7.4.251/src/version.c 2014-04-06 20:45:40.127357453 +0200 +--- src/version.c 2014-04-06 21:06:25.543360173 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 252, + /**/ + +-- +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/patches/source/vim/patches/7.4.253 b/patches/source/vim/patches/7.4.253 new file mode 100644 index 000000000..dadc81bdc --- /dev/null +++ b/patches/source/vim/patches/7.4.253 @@ -0,0 +1,76 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.253 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.253 +Problem: Crash when using cpp syntax file with pattern using external + match. (Havard Garnes) +Solution: Discard match when end column is before start column. +Files: src/regexp.c, src/regexp_nfa.c + + +*** ../vim-7.4.252/src/regexp.c 2014-04-02 19:00:53.043644100 +0200 +--- src/regexp.c 2014-04-06 21:26:17.087362776 +0200 +*************** +*** 4146,4152 **** + { + /* Only accept single line matches. */ + if (reg_startzpos[i].lnum >= 0 +! && reg_endzpos[i].lnum == reg_startzpos[i].lnum) + re_extmatch_out->matches[i] = + vim_strnsave(reg_getline(reg_startzpos[i].lnum) + + reg_startzpos[i].col, +--- 4146,4153 ---- + { + /* Only accept single line matches. */ + if (reg_startzpos[i].lnum >= 0 +! && reg_endzpos[i].lnum == reg_startzpos[i].lnum +! && reg_endzpos[i].col >= reg_startzpos[i].col) + re_extmatch_out->matches[i] = + vim_strnsave(reg_getline(reg_startzpos[i].lnum) + + reg_startzpos[i].col, +*** ../vim-7.4.252/src/regexp_nfa.c 2014-03-23 15:12:29.935264336 +0100 +--- src/regexp_nfa.c 2014-04-06 21:16:57.111361553 +0200 +*************** +*** 6781,6788 **** + { + struct multipos *mpos = &subs.synt.list.multi[i]; + +! /* Only accept single line matches. */ +! if (mpos->start.lnum >= 0 && mpos->start.lnum == mpos->end.lnum) + re_extmatch_out->matches[i] = + vim_strnsave(reg_getline(mpos->start.lnum) + + mpos->start.col, +--- 6781,6790 ---- + { + struct multipos *mpos = &subs.synt.list.multi[i]; + +! /* Only accept single line matches that are valid. */ +! if (mpos->start.lnum >= 0 +! && mpos->start.lnum == mpos->end.lnum +! && mpos->end.col >= mpos->start.col) + re_extmatch_out->matches[i] = + vim_strnsave(reg_getline(mpos->start.lnum) + + mpos->start.col, +*** ../vim-7.4.252/src/version.c 2014-04-06 21:08:41.315360470 +0200 +--- src/version.c 2014-04-06 21:33:17.271363694 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 253, + /**/ + +-- +A day without sunshine is like, well, night. + + /// 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/patches/source/vim/patches/7.4.254 b/patches/source/vim/patches/7.4.254 new file mode 100644 index 000000000..a5085ba6b --- /dev/null +++ b/patches/source/vim/patches/7.4.254 @@ -0,0 +1,183 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.2 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.254 +Problem: Smack support detection is incomplete. +Solution: Check for attr/xattr.h and specific macro. +Files: src/configure.in, src/auto/configure + + +*** ../vim-7.4.253/src/configure.in 2014-04-05 12:02:20.747100138 +0200 +--- src/configure.in 2014-04-10 11:02:59.256035996 +0200 +*************** +*** 396,405 **** + AC_MSG_RESULT(no) + AC_CHECK_HEADER([linux/xattr.h], true, enable_smack="no") + else +! AC_MSG_RESULT(yes) + fi + if test "$enable_smack" = "yes"; then +! AC_CHECK_LIB(attr, llistxattr, + [LIBS="$LIBS -lattr" + found_smack="yes" + AC_DEFINE(HAVE_SMACK)]) +--- 396,414 ---- + AC_MSG_RESULT(no) + AC_CHECK_HEADER([linux/xattr.h], true, enable_smack="no") + else +! AC_MSG_RESULT(yes) + fi + if test "$enable_smack" = "yes"; then +! AC_CHECK_HEADER([attr/xattr.h], true, enable_smack="no") +! fi +! if test "$enable_smack" = "yes"; then +! AC_MSG_CHECKING(for XATTR_NAME_SMACKEXEC in linux/xattr.h) +! AC_EGREP_CPP(XATTR_NAME_SMACKEXEC, [#include <linux/xattr.h>], +! AC_MSG_RESULT(yes), +! AC_MSG_RESULT(no); enable_smack = "no") +! fi +! if test "$enable_smack" = "yes"; then +! AC_CHECK_LIB(attr, setxattr, + [LIBS="$LIBS -lattr" + found_smack="yes" + AC_DEFINE(HAVE_SMACK)]) +*** ../vim-7.4.253/src/auto/configure 2014-04-05 12:02:20.751100138 +0200 +--- src/auto/configure 2014-04-10 11:03:04.220036007 +0200 +*************** +*** 4611,4623 **** + + + else +! { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + $as_echo "yes" >&6; } + fi + if test "$enable_smack" = "yes"; then +! { $as_echo "$as_me:${as_lineno-$LINENO}: checking for llistxattr in -lattr" >&5 +! $as_echo_n "checking for llistxattr in -lattr... " >&6; } +! if ${ac_cv_lib_attr_llistxattr+:} false; then : + $as_echo_n "(cached) " >&6 + else + ac_check_lib_save_LIBS=$LIBS +--- 4611,4651 ---- + + + else +! { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + $as_echo "yes" >&6; } + fi + if test "$enable_smack" = "yes"; then +! ac_fn_c_check_header_mongrel "$LINENO" "attr/xattr.h" "ac_cv_header_attr_xattr_h" "$ac_includes_default" +! if test "x$ac_cv_header_attr_xattr_h" = xyes; then : +! true +! else +! enable_smack="no" +! fi +! +! +! fi +! if test "$enable_smack" = "yes"; then +! { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR_NAME_SMACKEXEC in linux/xattr.h" >&5 +! $as_echo_n "checking for XATTR_NAME_SMACKEXEC in linux/xattr.h... " >&6; } +! cat confdefs.h - <<_ACEOF >conftest.$ac_ext +! /* end confdefs.h. */ +! #include <linux/xattr.h> +! _ACEOF +! if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | +! $EGREP "XATTR_NAME_SMACKEXEC" >/dev/null 2>&1; then : +! { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +! $as_echo "yes" >&6; } +! else +! { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +! $as_echo "no" >&6; }; enable_smack = "no" +! fi +! rm -f conftest* +! +! fi +! if test "$enable_smack" = "yes"; then +! { $as_echo "$as_me:${as_lineno-$LINENO}: checking for setxattr in -lattr" >&5 +! $as_echo_n "checking for setxattr in -lattr... " >&6; } +! if ${ac_cv_lib_attr_setxattr+:} false; then : + $as_echo_n "(cached) " >&6 + else + ac_check_lib_save_LIBS=$LIBS +*************** +*** 4631,4657 **** + #ifdef __cplusplus + extern "C" + #endif +! char llistxattr (); + int + main () + { +! return llistxattr (); + ; + return 0; + } + _ACEOF + if ac_fn_c_try_link "$LINENO"; then : +! ac_cv_lib_attr_llistxattr=yes + else +! ac_cv_lib_attr_llistxattr=no + fi + rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LIBS=$ac_check_lib_save_LIBS + fi +! { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_attr_llistxattr" >&5 +! $as_echo "$ac_cv_lib_attr_llistxattr" >&6; } +! if test "x$ac_cv_lib_attr_llistxattr" = xyes; then : + LIBS="$LIBS -lattr" + found_smack="yes" + $as_echo "#define HAVE_SMACK 1" >>confdefs.h +--- 4659,4685 ---- + #ifdef __cplusplus + extern "C" + #endif +! char setxattr (); + int + main () + { +! return setxattr (); + ; + return 0; + } + _ACEOF + if ac_fn_c_try_link "$LINENO"; then : +! ac_cv_lib_attr_setxattr=yes + else +! ac_cv_lib_attr_setxattr=no + fi + rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LIBS=$ac_check_lib_save_LIBS + fi +! { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_attr_setxattr" >&5 +! $as_echo "$ac_cv_lib_attr_setxattr" >&6; } +! if test "x$ac_cv_lib_attr_setxattr" = xyes; then : + LIBS="$LIBS -lattr" + found_smack="yes" + $as_echo "#define HAVE_SMACK 1" >>confdefs.h +*** ../vim-7.4.253/src/version.c 2014-04-06 21:33:39.675363743 +0200 +--- src/version.c 2014-04-10 11:00:57.200035730 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 254, + /**/ + +-- +George: "I just got a new set of golf clubs for my wife!" + John: "Great trade!" + + /// 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/patches/source/vim/patches/7.4.255 b/patches/source/vim/patches/7.4.255 new file mode 100644 index 000000000..5741a5ee7 --- /dev/null +++ b/patches/source/vim/patches/7.4.255 @@ -0,0 +1,108 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.255 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.255 +Problem: Configure check for smack doesn't work with all shells. (David + Larson) +Solution: Remove spaces in set command. +Files: src/configure.in, src/auto/configure + + +*** ../vim-7.4.254/src/configure.in 2014-04-10 11:09:11.676036810 +0200 +--- src/configure.in 2014-04-10 19:53:38.884105545 +0200 +*************** +*** 405,411 **** + AC_MSG_CHECKING(for XATTR_NAME_SMACKEXEC in linux/xattr.h) + AC_EGREP_CPP(XATTR_NAME_SMACKEXEC, [#include <linux/xattr.h>], + AC_MSG_RESULT(yes), +! AC_MSG_RESULT(no); enable_smack = "no") + fi + if test "$enable_smack" = "yes"; then + AC_CHECK_LIB(attr, setxattr, +--- 405,411 ---- + AC_MSG_CHECKING(for XATTR_NAME_SMACKEXEC in linux/xattr.h) + AC_EGREP_CPP(XATTR_NAME_SMACKEXEC, [#include <linux/xattr.h>], + AC_MSG_RESULT(yes), +! AC_MSG_RESULT(no); enable_smack="no") + fi + if test "$enable_smack" = "yes"; then + AC_CHECK_LIB(attr, setxattr, +*************** +*** 2643,2649 **** + AC_MSG_CHECKING(for XIMText in X11/Xlib.h) + AC_EGREP_CPP(XIMText, [#include <X11/Xlib.h>], + AC_MSG_RESULT(yes), +! AC_MSG_RESULT(no; xim has been disabled); enable_xim = "no") + fi + CPPFLAGS=$cppflags_save + +--- 2643,2649 ---- + AC_MSG_CHECKING(for XIMText in X11/Xlib.h) + AC_EGREP_CPP(XIMText, [#include <X11/Xlib.h>], + AC_MSG_RESULT(yes), +! AC_MSG_RESULT(no; xim has been disabled); enable_xim="no") + fi + CPPFLAGS=$cppflags_save + +*** ../vim-7.4.254/src/auto/configure 2014-04-10 11:09:11.684036810 +0200 +--- src/auto/configure 2014-04-10 19:53:54.032105578 +0200 +*************** +*** 4637,4643 **** + $as_echo "yes" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +! $as_echo "no" >&6; }; enable_smack = "no" + fi + rm -f conftest* + +--- 4637,4643 ---- + $as_echo "yes" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +! $as_echo "no" >&6; }; enable_smack="no" + fi + rm -f conftest* + +*************** +*** 9303,9309 **** + $as_echo "yes" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no; xim has been disabled" >&5 +! $as_echo "no; xim has been disabled" >&6; }; enable_xim = "no" + fi + rm -f conftest* + +--- 9303,9309 ---- + $as_echo "yes" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no; xim has been disabled" >&5 +! $as_echo "no; xim has been disabled" >&6; }; enable_xim="no" + fi + rm -f conftest* + +*** ../vim-7.4.254/src/version.c 2014-04-10 11:09:11.684036810 +0200 +--- src/version.c 2014-04-10 19:56:55.272105974 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 255, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +40. You tell the cab driver you live at + http://123.elm.street/house/bluetrim.html +41. You actually try that 123.elm.street 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/patches/source/vim/patches/7.4.256 b/patches/source/vim/patches/7.4.256 new file mode 100644 index 000000000..ef2a859ac --- /dev/null +++ b/patches/source/vim/patches/7.4.256 @@ -0,0 +1,83 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.2 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.256 (after 7.4.248) +Problem: Using systemlist() may cause a crash and does not handle NUL + characters properly. +Solution: Increase the reference count, allocate memory by length. (Yasuhiro + Matsumoto) +Files: src/eval.c + + +*** ../vim-7.4.255/src/eval.c 2014-04-05 21:28:50.667174384 +0200 +--- src/eval.c 2014-04-11 10:10:22.112217827 +0200 +*************** +*** 18334,18349 **** + for (i = 0; i < len; ++i) + { + start = res + i; +! for (end = start; i < len && *end != NL; ++end) + ++i; + +! s = vim_strnsave(start, (int)(end - start)); + if (s == NULL) + goto errret; + +! for (p = s, end = s + (end - start); p < end; ++p) +! if (*p == NUL) +! *p = NL; + + li = listitem_alloc(); + if (li == NULL) +--- 18334,18350 ---- + for (i = 0; i < len; ++i) + { + start = res + i; +! while (i < len && res[i] != NL) + ++i; ++ end = res + i; + +! s = alloc((unsigned)(end - start + 1)); + if (s == NULL) + goto errret; + +! for (p = s; start < end; ++p, ++start) +! *p = *start == NUL ? NL : *start; +! *p = NUL; + + li = listitem_alloc(); + if (li == NULL) +*************** +*** 18356,18361 **** +--- 18357,18363 ---- + list_append(list, li); + } + ++ ++list->lv_refcount; + rettv->v_type = VAR_LIST; + rettv->vval.v_list = list; + list = NULL; +*** ../vim-7.4.255/src/version.c 2014-04-10 20:00:03.720106386 +0200 +--- src/version.c 2014-04-11 09:44:05.208214383 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 256, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +46. Your wife makes a new rule: "The computer cannot come to bed." + + /// 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/patches/source/vim/patches/7.4.257 b/patches/source/vim/patches/7.4.257 new file mode 100644 index 000000000..67974a873 --- /dev/null +++ b/patches/source/vim/patches/7.4.257 @@ -0,0 +1,64 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.257 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.257 +Problem: Compiler warning, possibly for mismatch in parameter name. +Solution: Rename the parameter in the declaration. +Files: src/ops.c + +*** ../vim-7.4.256/src/ops.c 2014-04-02 22:17:00.003482236 +0200 +--- src/ops.c 2014-04-12 12:23:59.308424067 +0200 +*************** +*** 113,119 **** + #endif + static void block_prep __ARGS((oparg_T *oap, struct block_def *, linenr_T, int)); + #if defined(FEAT_CLIPBOARD) || defined(FEAT_EVAL) +! static void str_to_reg __ARGS((struct yankreg *y_ptr, int type, char_u *str, long len, long blocklen, int str_list)); + #endif + static int ends_in_white __ARGS((linenr_T lnum)); + #ifdef FEAT_COMMENTS +--- 113,119 ---- + #endif + static void block_prep __ARGS((oparg_T *oap, struct block_def *, linenr_T, int)); + #if defined(FEAT_CLIPBOARD) || defined(FEAT_EVAL) +! static void str_to_reg __ARGS((struct yankreg *y_ptr, int yank_type, char_u *str, long len, long blocklen, int str_list)); + #endif + static int ends_in_white __ARGS((linenr_T lnum)); + #ifdef FEAT_COMMENTS +*** ../vim-7.4.256/src/version.c 2014-04-11 10:22:46.288219453 +0200 +--- src/version.c 2014-04-12 12:25:44.176424296 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 257, + /**/ + +-- +The real +trick is +this: to +keep the +lines as +short as +possible +and keep +the size +the same +yet free +from the +need for +hyphena- +Dammit!! (Matthew Winn) + + /// 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/patches/source/vim/patches/7.4.258 b/patches/source/vim/patches/7.4.258 new file mode 100644 index 000000000..d4233452c --- /dev/null +++ b/patches/source/vim/patches/7.4.258 @@ -0,0 +1,114 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.258 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.258 +Problem: Configure fails if $CC contains options. +Solution: Remove quotes around $CC. (Paul Barker) +Files: src/configure.in, src/auto/configure + + +*** ../vim-7.4.257/src/configure.in 2014-04-10 20:00:03.708106386 +0200 +--- src/configure.in 2014-04-12 13:00:51.332428899 +0200 +*************** +*** 46,55 **** + fi + if test "$GCC" = yes; then + dnl method that should work for nearly all versions +! gccversion=`"$CC" -dumpversion` + if test "x$gccversion" = "x"; then + dnl old method; fall-back for when -dumpversion doesn't work +! gccversion=`"$CC" --version | sed -e '2,$d' -e 's/darwin.//' -e 's/^[[^0-9]]*\([[0-9]]\.[[0-9.]]*\).*$/\1/g'` + fi + dnl version 4.0.1 was reported to cause trouble on Macintosh by Marcin Dalecki + if test "$gccversion" = "3.0.1" -o "$gccversion" = "3.0.2" -o "$gccversion" = "4.0.1"; then +--- 46,55 ---- + fi + if test "$GCC" = yes; then + dnl method that should work for nearly all versions +! gccversion=`$CC -dumpversion` + if test "x$gccversion" = "x"; then + dnl old method; fall-back for when -dumpversion doesn't work +! gccversion=`$CC --version | sed -e '2,$d' -e 's/darwin.//' -e 's/^[[^0-9]]*\([[0-9]]\.[[0-9.]]*\).*$/\1/g'` + fi + dnl version 4.0.1 was reported to cause trouble on Macintosh by Marcin Dalecki + if test "$gccversion" = "3.0.1" -o "$gccversion" = "3.0.2" -o "$gccversion" = "4.0.1"; then +*************** +*** 68,74 **** + 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'` +--- 68,74 ---- + 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'` +*** ../vim-7.4.257/src/auto/configure 2014-04-10 20:00:03.716106386 +0200 +--- src/auto/configure 2014-04-12 13:00:58.436428915 +0200 +*************** +*** 4074,4082 **** + test "$GCC" = yes && CFLAGS="-O2 -fno-strength-reduce -Wall" + fi + if test "$GCC" = yes; then +! gccversion=`"$CC" -dumpversion` + if test "x$gccversion" = "x"; then +! gccversion=`"$CC" --version | sed -e '2,$d' -e 's/darwin.//' -e 's/^[^0-9]*\([0-9]\.[0-9.]*\).*$/\1/g'` + fi + if test "$gccversion" = "3.0.1" -o "$gccversion" = "3.0.2" -o "$gccversion" = "4.0.1"; then + echo 'GCC [34].0.[12] has a bug in the optimizer, disabling "-O#"' +--- 4074,4082 ---- + test "$GCC" = yes && CFLAGS="-O2 -fno-strength-reduce -Wall" + fi + if test "$GCC" = yes; then +! gccversion=`$CC -dumpversion` + if test "x$gccversion" = "x"; then +! gccversion=`$CC --version | sed -e '2,$d' -e 's/darwin.//' -e 's/^[^0-9]*\([0-9]\.[0-9.]*\).*$/\1/g'` + fi + if test "$gccversion" = "3.0.1" -o "$gccversion" = "3.0.2" -o "$gccversion" = "4.0.1"; then + echo 'GCC [34].0.[12] has a bug in the optimizer, disabling "-O#"' +*************** +*** 4091,4097 **** + + { $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'` +--- 4091,4097 ---- + + { $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'` +*** ../vim-7.4.257/src/version.c 2014-04-12 12:26:25.856424387 +0200 +--- src/version.c 2014-04-12 13:05:09.372429463 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 258, + /**/ + +-- +Never go to the toilet in a paperless office. + + /// 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/patches/source/vim/patches/7.4.259 b/patches/source/vim/patches/7.4.259 new file mode 100644 index 000000000..e8f28b59e --- /dev/null +++ b/patches/source/vim/patches/7.4.259 @@ -0,0 +1,53 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.259 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.259 +Problem: Warning for misplaced "const". +Solution: Move the "const". (Yukihiro Nakadaira) +Files: src/os_unix.c + + +*** ../vim-7.4.258/src/os_unix.c 2014-04-02 23:09:23.003439001 +0200 +--- src/os_unix.c 2014-04-23 12:40:45.931386548 +0200 +*************** +*** 2815,2821 **** + char_u *from_file; + char_u *to_file; + { +! static const char const *smack_copied_attributes[] = + { + XATTR_NAME_SMACK, + XATTR_NAME_SMACKEXEC, +--- 2815,2821 ---- + char_u *from_file; + char_u *to_file; + { +! static const char * const smack_copied_attributes[] = + { + XATTR_NAME_SMACK, + XATTR_NAME_SMACKEXEC, +*** ../vim-7.4.258/src/version.c 2014-04-12 13:11:58.272430356 +0200 +--- src/version.c 2014-04-23 12:49:22.587374098 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 259, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +91. It's Saturday afternoon in the middle of May and you + are on computer. + + /// 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/patches/source/vim/patches/7.4.260 b/patches/source/vim/patches/7.4.260 new file mode 100644 index 000000000..2ac9669b6 --- /dev/null +++ b/patches/source/vim/patches/7.4.260 @@ -0,0 +1,281 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.260 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.260 +Problem: It is possible to define a function with a colon in the name. It + is possible to define a function with a lower case character if a + "#" appears after the name. +Solution: Disallow using a colon other than with "s:". Ignore "#" after the + name. +Files: runtime/doc/eval.txt, src/eval.c, src/testdir/test_eval.in, + src/testdir/test_eval.ok + + +*** ../vim-7.4.259/runtime/doc/eval.txt 2014-04-05 19:44:36.891160723 +0200 +--- runtime/doc/eval.txt 2014-04-23 17:19:57.914982886 +0200 +*************** +*** 123,128 **** +--- 123,129 ---- + :echo Fn() + < *E704* *E705* *E707* + A Funcref variable must start with a capital, "s:", "w:", "t:" or "b:". You ++ can use "g:" but the following name must still start with a capital. You + cannot have both a Funcref variable and a function with the same name. + + A special case is defining a function and directly assigning its Funcref to a +*************** +*** 6675,6680 **** +--- 6691,6698 ---- + and autocommands defined in the script. It is also possible to call the + function from a mapping defined in the script, but then |<SID>| must be used + instead of "s:" when the mapping is expanded outside of the script. ++ There are only script-local functions, no buffer-local or window-local ++ functions. + + *:fu* *:function* *E128* *E129* *E123* + :fu[nction] List all functions and their arguments. +*************** +*** 6698,6708 **** + < + See |:verbose-cmd| for more information. + +! *E124* *E125* *E853* + :fu[nction][!] {name}([arguments]) [range] [abort] [dict] + Define a new function by the name {name}. The name + must be made of alphanumeric characters and '_', and +! must start with a capital or "s:" (see above). + + {name} can also be a |Dictionary| entry that is a + |Funcref|: > +--- 6716,6727 ---- + < + See |:verbose-cmd| for more information. + +! *E124* *E125* *E853* *E884* + :fu[nction][!] {name}([arguments]) [range] [abort] [dict] + Define a new function by the name {name}. The name + must be made of alphanumeric characters and '_', and +! must start with a capital or "s:" (see above). Note +! that using "b:" or "g:" is not allowed. + + {name} can also be a |Dictionary| entry that is a + |Funcref|: > +*** ../vim-7.4.259/src/eval.c 2014-04-11 10:22:46.288219453 +0200 +--- src/eval.c 2014-04-23 17:37:23.890957682 +0200 +*************** +*** 808,814 **** + static void list_func_head __ARGS((ufunc_T *fp, int indent)); + static ufunc_T *find_func __ARGS((char_u *name)); + static int function_exists __ARGS((char_u *name)); +! static int builtin_function __ARGS((char_u *name)); + #ifdef FEAT_PROFILE + static void func_do_profile __ARGS((ufunc_T *fp)); + static void prof_sort_list __ARGS((FILE *fd, ufunc_T **sorttab, int st_len, char *title, int prefer_self)); +--- 808,814 ---- + static void list_func_head __ARGS((ufunc_T *fp, int indent)); + static ufunc_T *find_func __ARGS((char_u *name)); + static int function_exists __ARGS((char_u *name)); +! static int builtin_function __ARGS((char_u *name, int len)); + #ifdef FEAT_PROFILE + static void func_do_profile __ARGS((ufunc_T *fp)); + static void prof_sort_list __ARGS((FILE *fd, ufunc_T **sorttab, int st_len, char *title, int prefer_self)); +*************** +*** 8489,8495 **** + rettv->vval.v_number = 0; + error = ERROR_UNKNOWN; + +! if (!builtin_function(fname)) + { + /* + * User defined function. +--- 8489,8495 ---- + rettv->vval.v_number = 0; + error = ERROR_UNKNOWN; + +! if (!builtin_function(fname, -1)) + { + /* + * User defined function. +*************** +*** 21584,21589 **** +--- 21584,21590 ---- + * Get the function name. There are these situations: + * func normal function name + * "name" == func, "fudi.fd_dict" == NULL ++ * s:func script-local function name + * dict.func new dictionary entry + * "name" == NULL, "fudi.fd_dict" set, + * "fudi.fd_di" == NULL, "fudi.fd_newkey" == func +*************** +*** 22314,22324 **** + lead += (int)STRLEN(sid_buf); + } + } +! else if (!(flags & TFN_INT) && builtin_function(lv.ll_name)) + { +! EMSG2(_("E128: Function name must start with a capital or contain a colon: %s"), lv.ll_name); + goto theend; + } + name = alloc((unsigned)(len + lead + 1)); + if (name != NULL) + { +--- 22315,22338 ---- + lead += (int)STRLEN(sid_buf); + } + } +! else if (!(flags & TFN_INT) && builtin_function(lv.ll_name, len)) + { +! EMSG2(_("E128: Function name must start with a capital or \"s:\": %s"), +! lv.ll_name); + goto theend; + } ++ if (!skip) ++ { ++ char_u *cp = vim_strchr(lv.ll_name, ':'); ++ ++ if (cp != NULL && cp < end) ++ { ++ EMSG2(_("E884: Function name cannot contain a colon: %s"), ++ lv.ll_name); ++ goto theend; ++ } ++ } ++ + name = alloc((unsigned)(len + lead + 1)); + if (name != NULL) + { +*************** +*** 22331,22337 **** + STRCPY(name + 3, sid_buf); + } + mch_memmove(name + lead, lv.ll_name, (size_t)len); +! name[len + lead] = NUL; + } + *pp = end; + +--- 22345,22351 ---- + STRCPY(name + 3, sid_buf); + } + mch_memmove(name + lead, lv.ll_name, (size_t)len); +! name[lead + len] = NUL; + } + *pp = end; + +*************** +*** 22452,22458 **** + translated_function_exists(name) + char_u *name; + { +! if (builtin_function(name)) + return find_internal_func(name) >= 0; + return find_func(name) != NULL; + } +--- 22466,22472 ---- + translated_function_exists(name) + char_u *name; + { +! if (builtin_function(name, -1)) + return find_internal_func(name) >= 0; + return find_func(name) != NULL; + } +*************** +*** 22500,22513 **** + + /* + * Return TRUE if "name" looks like a builtin function name: starts with a +! * lower case letter and doesn't contain a ':' or AUTOLOAD_CHAR. + */ + static int +! builtin_function(name) + char_u *name; + { +! return ASCII_ISLOWER(name[0]) && vim_strchr(name, ':') == NULL +! && vim_strchr(name, AUTOLOAD_CHAR) == NULL; + } + + #if defined(FEAT_PROFILE) || defined(PROTO) +--- 22514,22533 ---- + + /* + * Return TRUE if "name" looks like a builtin function name: starts with a +! * lower case letter and doesn't contain AUTOLOAD_CHAR. +! * "len" is the length of "name", or -1 for NUL terminated. + */ + static int +! builtin_function(name, len) + char_u *name; ++ int len; + { +! char_u *p; +! +! if (!ASCII_ISLOWER(name[0])) +! return FALSE; +! p = vim_strchr(name, AUTOLOAD_CHAR); +! return p == NULL || (len > 0 && p > name + len); + } + + #if defined(FEAT_PROFILE) || defined(PROTO) +*** ../vim-7.4.259/src/testdir/test_eval.in 2014-04-05 21:28:50.667174384 +0200 +--- src/testdir/test_eval.in 2014-04-23 17:35:12.086960858 +0200 +*************** +*** 144,149 **** +--- 144,167 ---- + :delcommand AR + :call garbagecollect(1) + :" ++ :" function name includes a colon ++ :try ++ :func! g:test() ++ :echo "test" ++ :endfunc ++ :catch ++ :$put =v:exception ++ :endtry ++ :" ++ :" function name folowed by # ++ :try ++ :func! test2() "# ++ :echo "test2" ++ :endfunc ++ :catch ++ :$put =v:exception ++ :endtry ++ :" + :/^start:/+1,$wq! test.out + :" vim: et ts=4 isk-=\: fmr=???,??? + :call getchar() +*** ../vim-7.4.259/src/testdir/test_eval.ok 2014-04-05 21:28:50.667174384 +0200 +--- src/testdir/test_eval.ok 2014-04-23 17:36:34.602958870 +0200 +*************** +*** 335,337 **** +--- 335,339 ---- + Vim(call):E883: search pattern and expression register may not contain two or more lines + Executing call setreg(1, ["", "", [], ""]) + Vim(call):E730: using List as a String ++ Vim(function):E128: Function name must start with a capital or "s:": g:test() ++ Vim(function):E128: Function name must start with a capital or "s:": test2() "# +*** ../vim-7.4.259/src/version.c 2014-04-23 12:52:36.499369426 +0200 +--- src/version.c 2014-04-23 17:17:50.994985945 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 260, + /**/ + +-- +From "know your smileys": + ;-0 Can't find shift key + ,-9 Kann Umschalttaste nicht finden + + /// 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/patches/source/vim/patches/7.4.261 b/patches/source/vim/patches/7.4.261 new file mode 100644 index 000000000..a9ca118c1 --- /dev/null +++ b/patches/source/vim/patches/7.4.261 @@ -0,0 +1,106 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.261 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.261 +Problem: When updating the window involves a regexp pattern, an interactive + substitute to replace a "\n" with a line break fails. (Ingo + Karkat) +Solution: Set reg_line_lbr in vim_regsub() and vim_regsub_multi(). +Files: src/regexp.c, src/testdir/test79.in, src/testdir/test79.ok + + +*** ../vim-7.4.260/src/regexp.c 2014-04-06 21:33:39.671363743 +0200 +--- src/regexp.c 2014-04-23 18:40:37.094866280 +0200 +*************** +*** 7381,7386 **** +--- 7381,7387 ---- + reg_mmatch = NULL; + reg_maxline = 0; + reg_buf = curbuf; ++ reg_line_lbr = TRUE; + return vim_regsub_both(source, dest, copy, magic, backslash); + } + #endif +*************** +*** 7400,7405 **** +--- 7401,7407 ---- + reg_buf = curbuf; /* always works on the current buffer! */ + reg_firstlnum = lnum; + reg_maxline = curbuf->b_ml.ml_line_count - lnum; ++ reg_line_lbr = FALSE; + return vim_regsub_both(source, dest, copy, magic, backslash); + } + +*** ../vim-7.4.260/src/testdir/test79.in 2014-04-02 19:00:53.043644100 +0200 +--- src/testdir/test79.in 2014-04-23 18:36:29.158872254 +0200 +*************** +*** 1,6 **** +--- 1,7 ---- + Test for *sub-replace-special* and *sub-replace-expression* on :substitute. + Test for submatch() on :substitue. + Test for *:s%* on :substitute. ++ Test for :s replacing \n with line break. + + STARTTEST + :so small.vim +*************** +*** 234,239 **** +--- 235,254 ---- + Q + + STARTTEST ++ :function! TitleString() ++ let check = 'foo' =~ 'bar' ++ return "" ++ endfunction ++ :set titlestring=%{TitleString()} ++ :/^test_one/s/.*/\="foo\nbar"/ ++ :/^test_two/s/.*/\="foo\nbar"/c ++ y ++ ENDTEST ++ ++ test_one ++ test_two ++ ++ STARTTEST + :g/^STARTTEST/.,/^ENDTEST/d + :1;/^Results/,$wq! test.out + :call getchar() +*** ../vim-7.4.260/src/testdir/test79.ok 2014-04-02 19:00:53.043644100 +0200 +--- src/testdir/test79.ok 2014-04-23 18:35:30.650873664 +0200 +*************** +*** 126,128 **** +--- 126,134 ---- + Q + Q + ++ ++ foo ++ bar ++ foo ++ bar ++ +*** ../vim-7.4.260/src/version.c 2014-04-23 17:43:37.366948683 +0200 +--- src/version.c 2014-04-23 18:46:45.250857408 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 261, + /**/ + +-- +From "know your smileys": + !-| I-am-a-Cylon-Centurian-with-one-red-eye-bouncing-back-and-forth + + /// 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/patches/source/vim/patches/7.4.262 b/patches/source/vim/patches/7.4.262 new file mode 100644 index 000000000..ef29032e2 --- /dev/null +++ b/patches/source/vim/patches/7.4.262 @@ -0,0 +1,314 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.262 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.262 +Problem: Duplicate code in regexec(). +Solution: Add line_lbr flag to regexec_nl(). +Files: src/regexp.c, src/regexp_nfa.c, src/regexp.h + + +*** ../vim-7.4.261/src/regexp.c 2014-04-23 18:48:43.546854558 +0200 +--- src/regexp.c 2014-04-23 18:59:38.606838773 +0200 +*************** +*** 3709,3733 **** + /* TRUE if using multi-line regexp. */ + #define REG_MULTI (reg_match == NULL) + +! static int bt_regexec __ARGS((regmatch_T *rmp, char_u *line, colnr_T col)); + + /* + * Match a regexp against a string. + * "rmp->regprog" is a compiled regexp as returned by vim_regcomp(). + * Uses curbuf for line count and 'iskeyword'. + * + * Return TRUE if there is a match, FALSE if not. + */ + static int +! bt_regexec(rmp, line, col) + regmatch_T *rmp; + char_u *line; /* string to match against */ + colnr_T col; /* column to start looking for match */ + { + reg_match = rmp; + reg_mmatch = NULL; + reg_maxline = 0; +! reg_line_lbr = FALSE; + reg_buf = curbuf; + reg_win = NULL; + ireg_ic = rmp->rm_ic; +--- 3709,3736 ---- + /* TRUE if using multi-line regexp. */ + #define REG_MULTI (reg_match == NULL) + +! static int bt_regexec_nl __ARGS((regmatch_T *rmp, char_u *line, colnr_T col, int line_lbr)); +! + + /* + * Match a regexp against a string. + * "rmp->regprog" is a compiled regexp as returned by vim_regcomp(). + * Uses curbuf for line count and 'iskeyword'. ++ * if "line_lbr" is TRUE consider a "\n" in "line" to be a line break. + * + * Return TRUE if there is a match, FALSE if not. + */ + static int +! bt_regexec_nl(rmp, line, col, line_lbr) + regmatch_T *rmp; + char_u *line; /* string to match against */ + colnr_T col; /* column to start looking for match */ ++ int line_lbr; + { + reg_match = rmp; + reg_mmatch = NULL; + reg_maxline = 0; +! reg_line_lbr = line_lbr; + reg_buf = curbuf; + reg_win = NULL; + ireg_ic = rmp->rm_ic; +*************** +*** 3738,3772 **** + return (bt_regexec_both(line, col, NULL) != 0); + } + +- #if defined(FEAT_MODIFY_FNAME) || defined(FEAT_EVAL) \ +- || defined(FIND_REPLACE_DIALOG) || defined(PROTO) +- +- static int bt_regexec_nl __ARGS((regmatch_T *rmp, char_u *line, colnr_T col)); +- +- /* +- * Like vim_regexec(), but consider a "\n" in "line" to be a line break. +- */ +- static int +- bt_regexec_nl(rmp, line, col) +- regmatch_T *rmp; +- char_u *line; /* string to match against */ +- colnr_T col; /* column to start looking for match */ +- { +- reg_match = rmp; +- reg_mmatch = NULL; +- reg_maxline = 0; +- reg_line_lbr = TRUE; +- reg_buf = curbuf; +- reg_win = NULL; +- ireg_ic = rmp->rm_ic; +- #ifdef FEAT_MBYTE +- ireg_icombine = FALSE; +- #endif +- ireg_maxcol = 0; +- return (bt_regexec_both(line, col, NULL) != 0); +- } +- #endif +- + static long bt_regexec_multi __ARGS((regmmatch_T *rmp, win_T *win, buf_T *buf, linenr_T lnum, colnr_T col, proftime_T *tm)); + + /* +--- 3741,3746 ---- +*************** +*** 7985,7995 **** + { + bt_regcomp, + bt_regfree, +- bt_regexec, +- #if defined(FEAT_MODIFY_FNAME) || defined(FEAT_EVAL) \ +- || defined(FIND_REPLACE_DIALOG) || defined(PROTO) + bt_regexec_nl, +- #endif + bt_regexec_multi + #ifdef DEBUG + ,(char_u *)"" +--- 7959,7965 ---- +*************** +*** 8003,8013 **** + { + nfa_regcomp, + nfa_regfree, +- nfa_regexec, +- #if defined(FEAT_MODIFY_FNAME) || defined(FEAT_EVAL) \ +- || defined(FIND_REPLACE_DIALOG) || defined(PROTO) + nfa_regexec_nl, +- #endif + nfa_regexec_multi + #ifdef DEBUG + ,(char_u *)"" +--- 7973,7979 ---- +*************** +*** 8131,8137 **** + char_u *line; /* string to match against */ + colnr_T col; /* column to start looking for match */ + { +! return rmp->regprog->engine->regexec(rmp, line, col); + } + + #if defined(FEAT_MODIFY_FNAME) || defined(FEAT_EVAL) \ +--- 8097,8103 ---- + char_u *line; /* string to match against */ + colnr_T col; /* column to start looking for match */ + { +! return rmp->regprog->engine->regexec_nl(rmp, line, col, FALSE); + } + + #if defined(FEAT_MODIFY_FNAME) || defined(FEAT_EVAL) \ +*************** +*** 8145,8151 **** + char_u *line; + colnr_T col; + { +! return rmp->regprog->engine->regexec_nl(rmp, line, col); + } + #endif + +--- 8111,8117 ---- + char_u *line; + colnr_T col; + { +! return rmp->regprog->engine->regexec_nl(rmp, line, col, TRUE); + } + #endif + +*** ../vim-7.4.261/src/regexp_nfa.c 2014-04-06 21:33:39.675363743 +0200 +--- src/regexp_nfa.c 2014-04-23 19:00:44.354837189 +0200 +*************** +*** 311,317 **** + static long nfa_regexec_both __ARGS((char_u *line, colnr_T col)); + static regprog_T *nfa_regcomp __ARGS((char_u *expr, int re_flags)); + static void nfa_regfree __ARGS((regprog_T *prog)); +! static int nfa_regexec __ARGS((regmatch_T *rmp, char_u *line, colnr_T col)); + static long nfa_regexec_multi __ARGS((regmmatch_T *rmp, win_T *win, buf_T *buf, linenr_T lnum, colnr_T col, proftime_T *tm)); + static int match_follows __ARGS((nfa_state_T *startstate, int depth)); + static int failure_chance __ARGS((nfa_state_T *state, int depth)); +--- 311,317 ---- + static long nfa_regexec_both __ARGS((char_u *line, colnr_T col)); + static regprog_T *nfa_regcomp __ARGS((char_u *expr, int re_flags)); + static void nfa_regfree __ARGS((regprog_T *prog)); +! static int nfa_regexec_nl __ARGS((regmatch_T *rmp, char_u *line, colnr_T col, int line_lbr)); + static long nfa_regexec_multi __ARGS((regmmatch_T *rmp, win_T *win, buf_T *buf, linenr_T lnum, colnr_T col, proftime_T *tm)); + static int match_follows __ARGS((nfa_state_T *startstate, int depth)); + static int failure_chance __ARGS((nfa_state_T *state, int depth)); +*************** +*** 7060,7078 **** + * Match a regexp against a string. + * "rmp->regprog" is a compiled regexp as returned by nfa_regcomp(). + * Uses curbuf for line count and 'iskeyword'. + * + * Return TRUE if there is a match, FALSE if not. + */ + static int +! nfa_regexec(rmp, line, col) + regmatch_T *rmp; + char_u *line; /* string to match against */ + colnr_T col; /* column to start looking for match */ + { + reg_match = rmp; + reg_mmatch = NULL; + reg_maxline = 0; +! reg_line_lbr = FALSE; + reg_buf = curbuf; + reg_win = NULL; + ireg_ic = rmp->rm_ic; +--- 7060,7080 ---- + * Match a regexp against a string. + * "rmp->regprog" is a compiled regexp as returned by nfa_regcomp(). + * Uses curbuf for line count and 'iskeyword'. ++ * If "line_lbr" is TRUE consider a "\n" in "line" to be a line break. + * + * Return TRUE if there is a match, FALSE if not. + */ + static int +! nfa_regexec_nl(rmp, line, col, line_lbr) + regmatch_T *rmp; + char_u *line; /* string to match against */ + colnr_T col; /* column to start looking for match */ ++ int line_lbr; + { + reg_match = rmp; + reg_mmatch = NULL; + reg_maxline = 0; +! reg_line_lbr = line_lbr; + reg_buf = curbuf; + reg_win = NULL; + ireg_ic = rmp->rm_ic; +*************** +*** 7083,7117 **** + return (nfa_regexec_both(line, col) != 0); + } + +- #if defined(FEAT_MODIFY_FNAME) || defined(FEAT_EVAL) \ +- || defined(FIND_REPLACE_DIALOG) || defined(PROTO) +- +- static int nfa_regexec_nl __ARGS((regmatch_T *rmp, char_u *line, colnr_T col)); +- +- /* +- * Like nfa_regexec(), but consider a "\n" in "line" to be a line break. +- */ +- static int +- nfa_regexec_nl(rmp, line, col) +- regmatch_T *rmp; +- char_u *line; /* string to match against */ +- colnr_T col; /* column to start looking for match */ +- { +- reg_match = rmp; +- reg_mmatch = NULL; +- reg_maxline = 0; +- reg_line_lbr = TRUE; +- reg_buf = curbuf; +- reg_win = NULL; +- ireg_ic = rmp->rm_ic; +- #ifdef FEAT_MBYTE +- ireg_icombine = FALSE; +- #endif +- ireg_maxcol = 0; +- return (nfa_regexec_both(line, col) != 0); +- } +- #endif +- + + /* + * Match a regexp against multiple lines. +--- 7085,7090 ---- +*** ../vim-7.4.261/src/regexp.h 2013-06-11 10:53:14.000000000 +0200 +--- src/regexp.h 2014-04-23 18:58:18.614840701 +0200 +*************** +*** 149,159 **** + { + regprog_T *(*regcomp)(char_u*, int); + void (*regfree)(regprog_T *); +! int (*regexec)(regmatch_T*, char_u*, colnr_T); +! #if defined(FEAT_MODIFY_FNAME) || defined(FEAT_EVAL) \ +! || defined(FIND_REPLACE_DIALOG) || defined(PROTO) +! int (*regexec_nl)(regmatch_T*, char_u*, colnr_T); +! #endif + long (*regexec_multi)(regmmatch_T*, win_T*, buf_T*, linenr_T, colnr_T, proftime_T*); + #ifdef DEBUG + char_u *expr; +--- 149,155 ---- + { + regprog_T *(*regcomp)(char_u*, int); + void (*regfree)(regprog_T *); +! int (*regexec_nl)(regmatch_T*, char_u*, colnr_T, int); + long (*regexec_multi)(regmmatch_T*, win_T*, buf_T*, linenr_T, colnr_T, proftime_T*); + #ifdef DEBUG + char_u *expr; +*** ../vim-7.4.261/src/version.c 2014-04-23 18:48:43.546854558 +0200 +--- src/version.c 2014-04-23 18:52:20.102849340 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 262, + /**/ + +-- +From "know your smileys": + ~#:-( I just washed my hair, and I can't do nuthin' with it. + + /// 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/patches/source/vim/patches/7.4.263 b/patches/source/vim/patches/7.4.263 new file mode 100644 index 000000000..ee7fd1362 --- /dev/null +++ b/patches/source/vim/patches/7.4.263 @@ -0,0 +1,44 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.263 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.263 +Problem: GCC 4.8 compiler warning for hiding a declaration (Francois Gannaz) +Solution: Remove the second declaration. +Files: src/eval.c + + +*** ../vim-7.4.262/src/eval.c 2014-04-23 17:43:37.362948683 +0200 +--- src/eval.c 2014-04-23 19:34:46.678787977 +0200 +*************** +*** 18319,18325 **** + char_u *s = NULL; + char_u *start; + char_u *end; +- char_u *p; + int i; + + res = get_cmd_output(get_tv_string(&argvars[0]), infile, +--- 18319,18324 ---- +*** ../vim-7.4.262/src/version.c 2014-04-23 19:06:33.702828771 +0200 +--- src/version.c 2014-04-23 19:43:22.366775550 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 263, + /**/ + +-- +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/patches/source/vim/patches/7.4.264 b/patches/source/vim/patches/7.4.264 new file mode 100644 index 000000000..06776b880 --- /dev/null +++ b/patches/source/vim/patches/7.4.264 @@ -0,0 +1,176 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.264 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.264 (after 7.4.260) +Problem: Can't define a function starting with "g:". Can't assign a + funcref to a buffer-local variable. +Solution: Skip "g:" at the start of a function name. Don't check for colons + when assigning to a variable. +Files: src/eval.c, src/testdir/test_eval.in, src/testdir/test_eval.ok + + +*** ../vim-7.4.263/src/eval.c 2014-04-23 19:44:26.366774008 +0200 +--- src/eval.c 2014-04-23 20:40:16.738693276 +0200 +*************** +*** 21583,21589 **** + * Get the function name. There are these situations: + * func normal function name + * "name" == func, "fudi.fd_dict" == NULL +- * s:func script-local function name + * dict.func new dictionary entry + * "name" == NULL, "fudi.fd_dict" set, + * "fudi.fd_di" == NULL, "fudi.fd_newkey" == func +--- 21583,21588 ---- +*************** +*** 21593,21598 **** +--- 21592,21599 ---- + * dict.func existing dict entry that's not a Funcref + * "name" == NULL, "fudi.fd_dict" set, + * "fudi.fd_di" set, "fudi.fd_newkey" == NULL ++ * s:func script-local function name ++ * g:func global function name, same as "func" + */ + p = eap->arg; + name = trans_function_name(&p, eap->skip, 0, &fudi); +*************** +*** 22286,22292 **** + } + else + { +! if (lead == 2) /* skip over "s:" */ + lv.ll_name += 2; + len = (int)(end - lv.ll_name); + } +--- 22287,22294 ---- + } + else + { +! /* skip over "s:" and "g:" */ +! if (lead == 2 || (lv.ll_name[0] == 'g' && lv.ll_name[1] == ':')) + lv.ll_name += 2; + len = (int)(end - lv.ll_name); + } +*************** +*** 22317,22333 **** + else if (!(flags & TFN_INT) && builtin_function(lv.ll_name, len)) + { + EMSG2(_("E128: Function name must start with a capital or \"s:\": %s"), +! lv.ll_name); + goto theend; + } +! if (!skip) + { + char_u *cp = vim_strchr(lv.ll_name, ':'); + + if (cp != NULL && cp < end) + { +! EMSG2(_("E884: Function name cannot contain a colon: %s"), +! lv.ll_name); + goto theend; + } + } +--- 22319,22334 ---- + else if (!(flags & TFN_INT) && builtin_function(lv.ll_name, len)) + { + EMSG2(_("E128: Function name must start with a capital or \"s:\": %s"), +! start); + goto theend; + } +! if (!skip && !(flags & TFN_QUIET)) + { + char_u *cp = vim_strchr(lv.ll_name, ':'); + + if (cp != NULL && cp < end) + { +! EMSG2(_("E884: Function name cannot contain a colon: %s"), start); + goto theend; + } + } +*** ../vim-7.4.263/src/testdir/test_eval.in 2014-04-23 17:43:37.362948683 +0200 +--- src/testdir/test_eval.in 2014-04-23 20:36:50.494698246 +0200 +*************** +*** 144,150 **** + :delcommand AR + :call garbagecollect(1) + :" +! :" function name includes a colon + :try + :func! g:test() + :echo "test" +--- 144,150 ---- + :delcommand AR + :call garbagecollect(1) + :" +! :" function name not starting with capital + :try + :func! g:test() + :echo "test" +*************** +*** 153,158 **** +--- 153,167 ---- + :$put =v:exception + :endtry + :" ++ :" function name includes a colon ++ :try ++ :func! b:test() ++ :echo "test" ++ :endfunc ++ :catch ++ :$put =v:exception ++ :endtry ++ :" + :" function name folowed by # + :try + :func! test2() "# +*************** +*** 162,167 **** +--- 171,183 ---- + :$put =v:exception + :endtry + :" ++ :" function name starting with/without "g:", buffer-local funcref. ++ :function! g:Foo() ++ : $put ='called Foo()' ++ :endfunction ++ :let b:my_func = function('Foo') ++ :call b:my_func() ++ :" + :/^start:/+1,$wq! test.out + :" vim: et ts=4 isk-=\: fmr=???,??? + :call getchar() +*** ../vim-7.4.263/src/testdir/test_eval.ok 2014-04-23 17:43:37.362948683 +0200 +--- src/testdir/test_eval.ok 2014-04-23 20:37:45.526696920 +0200 +*************** +*** 336,339 **** +--- 336,341 ---- + Executing call setreg(1, ["", "", [], ""]) + Vim(call):E730: using List as a String + Vim(function):E128: Function name must start with a capital or "s:": g:test() ++ Vim(function):E128: Function name must start with a capital or "s:": b:test() + Vim(function):E128: Function name must start with a capital or "s:": test2() "# ++ called Foo() +*** ../vim-7.4.263/src/version.c 2014-04-23 19:44:26.370774008 +0200 +--- src/version.c 2014-04-23 20:27:17.614712050 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 264, + /**/ + +-- +In order for something to become clean, something else must become dirty; +but you can get everything dirty without getting anything clean. + + /// 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/patches/source/vim/patches/7.4.265 b/patches/source/vim/patches/7.4.265 new file mode 100644 index 000000000..da88bdb26 --- /dev/null +++ b/patches/source/vim/patches/7.4.265 @@ -0,0 +1,153 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.265 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.265 (after 7.4.260) +Problem: Can't call a global function with "g:" in an expression. +Solution: Skip the "g:" when looking up the function. +Files: src/eval.c, src/testdir/test_eval.in, src/testdir/test_eval.ok + + +*** ../vim-7.4.264/src/eval.c 2014-04-23 20:43:07.290689167 +0200 +--- src/eval.c 2014-04-24 17:06:38.884920215 +0200 +*************** +*** 8485,8517 **** + /* execute the function if no errors detected and executing */ + if (evaluate && error == ERROR_NONE) + { + rettv->v_type = VAR_NUMBER; /* default rettv is number zero */ + rettv->vval.v_number = 0; + error = ERROR_UNKNOWN; + +! if (!builtin_function(fname, -1)) + { + /* + * User defined function. + */ +! fp = find_func(fname); + + #ifdef FEAT_AUTOCMD + /* Trigger FuncUndefined event, may load the function. */ + if (fp == NULL + && apply_autocmds(EVENT_FUNCUNDEFINED, +! fname, fname, TRUE, NULL) + && !aborting()) + { + /* executed an autocommand, search for the function again */ +! fp = find_func(fname); + } + #endif + /* Try loading a package. */ +! if (fp == NULL && script_autoload(fname, TRUE) && !aborting()) + { + /* loaded a package, search for the function again */ +! fp = find_func(fname); + } + + if (fp != NULL) +--- 8485,8523 ---- + /* execute the function if no errors detected and executing */ + if (evaluate && error == ERROR_NONE) + { ++ char_u *rfname = fname; ++ ++ /* Ignore "g:" before a function name. */ ++ if (fname[0] == 'g' && fname[1] == ':') ++ rfname = fname + 2; ++ + rettv->v_type = VAR_NUMBER; /* default rettv is number zero */ + rettv->vval.v_number = 0; + error = ERROR_UNKNOWN; + +! if (!builtin_function(rfname, -1)) + { + /* + * User defined function. + */ +! fp = find_func(rfname); + + #ifdef FEAT_AUTOCMD + /* Trigger FuncUndefined event, may load the function. */ + if (fp == NULL + && apply_autocmds(EVENT_FUNCUNDEFINED, +! rfname, rfname, TRUE, NULL) + && !aborting()) + { + /* executed an autocommand, search for the function again */ +! fp = find_func(rfname); + } + #endif + /* Try loading a package. */ +! if (fp == NULL && script_autoload(rfname, TRUE) && !aborting()) + { + /* loaded a package, search for the function again */ +! fp = find_func(rfname); + } + + if (fp != NULL) +*** ../vim-7.4.264/src/testdir/test_eval.in 2014-04-23 20:43:07.290689167 +0200 +--- src/testdir/test_eval.in 2014-04-24 17:07:57.108918330 +0200 +*************** +*** 172,182 **** + :endtry + :" + :" function name starting with/without "g:", buffer-local funcref. +! :function! g:Foo() +! : $put ='called Foo()' + :endfunction + :let b:my_func = function('Foo') +! :call b:my_func() + :" + :/^start:/+1,$wq! test.out + :" vim: et ts=4 isk-=\: fmr=???,??? +--- 172,184 ---- + :endtry + :" + :" function name starting with/without "g:", buffer-local funcref. +! :function! g:Foo(n) +! : $put ='called Foo(' . a:n . ')' + :endfunction + :let b:my_func = function('Foo') +! :call b:my_func(1) +! :echo g:Foo(2) +! :echo Foo(3) + :" + :/^start:/+1,$wq! test.out + :" vim: et ts=4 isk-=\: fmr=???,??? +*** ../vim-7.4.264/src/testdir/test_eval.ok 2014-04-23 20:43:07.290689167 +0200 +--- src/testdir/test_eval.ok 2014-04-24 16:54:36.856937613 +0200 +*************** +*** 338,341 **** + Vim(function):E128: Function name must start with a capital or "s:": g:test() + Vim(function):E128: Function name must start with a capital or "s:": b:test() + Vim(function):E128: Function name must start with a capital or "s:": test2() "# +! called Foo() +--- 338,343 ---- + Vim(function):E128: Function name must start with a capital or "s:": g:test() + Vim(function):E128: Function name must start with a capital or "s:": b:test() + Vim(function):E128: Function name must start with a capital or "s:": test2() "# +! called Foo(1) +! called Foo(2) +! called Foo(3) +*** ../vim-7.4.264/src/version.c 2014-04-23 20:43:07.290689167 +0200 +--- src/version.c 2014-04-24 16:56:24.520935019 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 265, + /**/ + +-- +The sooner you fall behind, the more time you'll have to catch 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/patches/source/vim/patches/7.4.266 b/patches/source/vim/patches/7.4.266 new file mode 100644 index 000000000..23d56ac81 --- /dev/null +++ b/patches/source/vim/patches/7.4.266 @@ -0,0 +1,46 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.266 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.266 +Problem: Test 62 fails. +Solution: Set the language to C. (Christian Brabandt) +Files: src/testdir/test62.in + + +*** ../vim-7.4.265/src/testdir/test62.in 2013-07-14 13:37:12.000000000 +0200 +--- src/testdir/test62.in 2014-04-29 11:50:50.676058452 +0200 +*************** +*** 2,7 **** +--- 2,8 ---- + + STARTTEST + :so small.vim ++ :lang C + :" Simple test for opening and closing a tab page + :tabnew + :let nr = tabpagenr() +*** ../vim-7.4.265/src/version.c 2014-04-24 17:12:29.584911764 +0200 +--- src/version.c 2014-04-29 11:51:32.356057722 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 266, + /**/ + +-- +I AM THANKFUL... +...for a lawn that needs mowing, windows that need cleaning +and gutters that need fixing because it means I have a home. + + /// 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/patches/source/vim/patches/7.4.267 b/patches/source/vim/patches/7.4.267 new file mode 100644 index 000000000..376e9ee20 --- /dev/null +++ b/patches/source/vim/patches/7.4.267 @@ -0,0 +1,438 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.2 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.267 (after 7.4.178) +Problem: The '[ mark is in the wrong position after "gq". (Ingo Karkat) +Solution: Add the setmark argument to do_join(). (Christian Brabandt) +Files: 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/testdir/test_autoformat_join.in, + src/testdir/test_autoformat_join.ok, src/Makefile, src/edit.c, + src/ex_cmds.c, src/ex_docmd.c, src/normal.c, src/ops.c, + src/proto/ops.pro + + +*** ../vim-7.4.266/src/testdir/Make_amiga.mak 2014-04-02 19:54:58.275599459 +0200 +--- src/testdir/Make_amiga.mak 2014-04-29 12:02:34.144046123 +0200 +*************** +*** 36,41 **** +--- 36,42 ---- + test94.out test95.out test96.out test97.out test98.out \ + test99.out test100.out test101.out test102.out test103.out \ + test104.out test105.out test106.out \ ++ test_autoformat_join.out \ + test_eval.out \ + test_options.out + +*************** +*** 160,164 **** +--- 161,166 ---- + test104.out: test104.in + test105.out: test105.in + test106.out: test106.in ++ test_autoformat_join.out: test_autoformat_join.in + test_eval.out: test_eval.in + test_options.out: test_options.in +*** ../vim-7.4.266/src/testdir/Make_dos.mak 2014-04-02 19:54:58.275599459 +0200 +--- src/testdir/Make_dos.mak 2014-04-29 12:02:45.128045931 +0200 +*************** +*** 35,40 **** +--- 35,41 ---- + test94.out test95.out test96.out test98.out test99.out \ + test100.out test101.out test102.out test103.out test104.out \ + test105.out test106.out \ ++ test_autoformat_join.out \ + test_eval.out \ + test_options.out + +*** ../vim-7.4.266/src/testdir/Make_ming.mak 2014-04-02 19:54:58.275599459 +0200 +--- src/testdir/Make_ming.mak 2014-04-29 12:02:54.020045775 +0200 +*************** +*** 55,60 **** +--- 55,61 ---- + test94.out test95.out test96.out test98.out test99.out \ + test100.out test101.out test102.out test103.out test104.out \ + test105.out test106.out \ ++ test_autoformat_join.out \ + test_eval.out \ + test_options.out + +*** ../vim-7.4.266/src/testdir/Make_os2.mak 2014-04-02 19:54:58.275599459 +0200 +--- src/testdir/Make_os2.mak 2014-04-29 12:03:03.384045611 +0200 +*************** +*** 37,42 **** +--- 37,43 ---- + test94.out test95.out test96.out test98.out test99.out \ + test100.out test101.out test102.out test103.out test104.out \ + test105.out test106.out \ ++ test_autoformat_join.out \ + test_eval.out \ + test_options.out + +*** ../vim-7.4.266/src/testdir/Make_vms.mms 2014-04-02 19:54:58.275599459 +0200 +--- src/testdir/Make_vms.mms 2014-04-29 12:03:12.200045456 +0200 +*************** +*** 96,101 **** +--- 96,102 ---- + test95.out test96.out test98.out test99.out \ + test100.out test101.out test103.out test104.out \ + test105.out test106.out \ ++ test_autoformat_join.out \ + test_eval.out \ + test_options.out + +*** ../vim-7.4.266/src/testdir/Makefile 2014-04-01 14:08:14.685074130 +0200 +--- src/testdir/Makefile 2014-04-29 12:02:09.152046561 +0200 +*************** +*** 33,38 **** +--- 33,40 ---- + test94.out test95.out test96.out test97.out test98.out \ + test99.out test100.out test101.out test102.out test103.out \ + test104.out test105.out test106.out \ ++ test_autoformat_join.out \ ++ test_eval.out \ + test_options.out + + SCRIPTS_GUI = test16.out +*** ../vim-7.4.266/src/testdir/test_autoformat_join.in 2014-04-29 12:12:57.324035202 +0200 +--- src/testdir/test_autoformat_join.in 2014-04-29 12:00:35.360048205 +0200 +*************** +*** 0 **** +--- 1,23 ---- ++ Tests for setting the '[,'] marks when joining lines. ++ ++ STARTTEST ++ :so small.vim ++ :/^\t\t/ ++ 0gqj ++ :let a=string(getpos("'[")).'/'.string(getpos("']")) ++ :/^This line/;'}-join ++ :let b=string(getpos("'[")).'/'.string(getpos("']")) ++ :$put ='First test: Start/End '.string(a) ++ :$put ='Second test: Start/End '.string(b) ++ :/^\t\t/,$wq! test.out ++ ENDTEST ++ ++ ++ O sodales, ludite, vos qui ++ attamen consulite per voster honur. Tua pulchra facies me fay planszer milies ++ ++ This line. ++ Should be joined with the next line ++ and with this line ++ ++ Results: +*** ../vim-7.4.266/src/testdir/test_autoformat_join.ok 2014-04-29 12:12:57.332035201 +0200 +--- src/testdir/test_autoformat_join.ok 2014-04-29 12:00:35.360048205 +0200 +*************** +*** 0 **** +--- 1,8 ---- ++ O sodales, ludite, vos qui attamen consulite per voster honur. ++ Tua pulchra facies me fay planszer milies ++ ++ This line. Should be joined with the next line and with this line ++ ++ Results: ++ First test: Start/End '[0, 16, 1, 0]/[0, 17, 1, 0]' ++ Second test: Start/End '[0, 19, 11, 0]/[0, 19, 67, 0]' +*** ../vim-7.4.266/src/Makefile 2014-04-02 19:54:58.275599459 +0200 +--- src/Makefile 2014-04-29 12:03:48.600044818 +0200 +*************** +*** 1880,1885 **** +--- 1880,1886 ---- + + # Run individual test, assuming that Vim was already compiled. + test1 test2 test3 test4 test5 test6 test7 test8 test9 \ ++ test_autoformat_join \ + test_eval \ + test_options \ + test10 test11 test12 test13 test14 test15 test16 test17 test18 test19 \ +*** ../vim-7.4.266/src/edit.c 2014-03-23 15:12:29.915264336 +0100 +--- src/edit.c 2014-04-29 12:08:50.608039525 +0200 +*************** +*** 8685,8691 **** + { + temp = curwin->w_cursor.col; + if (!can_bs(BS_EOL) /* only if "eol" included */ +! || do_join(2, FALSE, TRUE, FALSE) == FAIL) + vim_beep(); + else + curwin->w_cursor.col = temp; +--- 8685,8691 ---- + { + temp = curwin->w_cursor.col; + if (!can_bs(BS_EOL) /* only if "eol" included */ +! || do_join(2, FALSE, TRUE, FALSE, FALSE) == FAIL) + vim_beep(); + else + curwin->w_cursor.col = temp; +*************** +*** 8866,8872 **** + ptr[len - 1] = NUL; + } + +! (void)do_join(2, FALSE, FALSE, FALSE); + if (temp == NUL && gchar_cursor() != NUL) + inc_cursor(); + } +--- 8866,8872 ---- + ptr[len - 1] = NUL; + } + +! (void)do_join(2, FALSE, FALSE, FALSE, FALSE); + if (temp == NUL && gchar_cursor() != NUL) + inc_cursor(); + } +*** ../vim-7.4.266/src/ex_cmds.c 2014-04-06 20:45:40.119357453 +0200 +--- src/ex_cmds.c 2014-04-29 12:08:50.612039525 +0200 +*************** +*** 4444,4450 **** + else if (*cmd == 'p') + eap->flags = EXFLAG_PRINT; + +! (void)do_join(eap->line2 - eap->line1 + 1, FALSE, TRUE, FALSE); + sub_nlines = sub_nsubs = eap->line2 - eap->line1 + 1; + (void)do_sub_msg(FALSE); + ex_may_print(eap); +--- 4444,4450 ---- + else if (*cmd == 'p') + eap->flags = EXFLAG_PRINT; + +! (void)do_join(eap->line2 - eap->line1 + 1, FALSE, TRUE, FALSE, TRUE); + sub_nlines = sub_nsubs = eap->line2 - eap->line1 + 1; + (void)do_sub_msg(FALSE); + ex_may_print(eap); +*** ../vim-7.4.266/src/ex_docmd.c 2014-04-02 14:22:00.119874274 +0200 +--- src/ex_docmd.c 2014-04-29 12:08:50.616039525 +0200 +*************** +*** 8717,8723 **** + } + ++eap->line2; + } +! (void)do_join(eap->line2 - eap->line1 + 1, !eap->forceit, TRUE, TRUE); + beginline(BL_WHITE | BL_FIX); + ex_may_print(eap); + } +--- 8717,8723 ---- + } + ++eap->line2; + } +! (void)do_join(eap->line2 - eap->line1 + 1, !eap->forceit, TRUE, TRUE, TRUE); + beginline(BL_WHITE | BL_FIX); + ex_may_print(eap); + } +*** ../vim-7.4.266/src/normal.c 2014-03-23 15:12:29.927264336 +0100 +--- src/normal.c 2014-04-29 12:08:50.616039525 +0200 +*************** +*** 812,818 **** + + if (text_locked() && (nv_cmds[idx].cmd_flags & NV_NCW)) + { +! /* This command is not allowed while editing a ccmdline: beep. */ + clearopbeep(oap); + text_locked_msg(); + goto normal_end; +--- 812,818 ---- + + if (text_locked() && (nv_cmds[idx].cmd_flags & NV_NCW)) + { +! /* This command is not allowed while editing a cmdline: beep. */ + clearopbeep(oap); + text_locked_msg(); + goto normal_end; +*************** +*** 1905,1911 **** + else + { + (void)do_join(oap->line_count, oap->op_type == OP_JOIN, +! TRUE, TRUE); + auto_format(FALSE, TRUE); + } + break; +--- 1905,1911 ---- + else + { + (void)do_join(oap->line_count, oap->op_type == OP_JOIN, +! TRUE, TRUE, TRUE); + auto_format(FALSE, TRUE); + } + break; +*************** +*** 9236,9242 **** + { + prep_redo(cap->oap->regname, cap->count0, + NUL, cap->cmdchar, NUL, NUL, cap->nchar); +! (void)do_join(cap->count0, cap->nchar == NUL, TRUE, TRUE); + } + } + } +--- 9236,9242 ---- + { + prep_redo(cap->oap->regname, cap->count0, + NUL, cap->cmdchar, NUL, NUL, cap->nchar); +! (void)do_join(cap->count0, cap->nchar == NUL, TRUE, TRUE, TRUE); + } + } + } +*** ../vim-7.4.266/src/ops.c 2014-04-12 12:26:25.856424387 +0200 +--- src/ops.c 2014-04-29 12:10:29.428037794 +0200 +*************** +*** 1979,1985 **** + curwin->w_cursor = curpos; /* restore curwin->w_cursor */ + } + if (curwin->w_cursor.lnum < curbuf->b_ml.ml_line_count) +! (void)do_join(2, FALSE, FALSE, FALSE); + } + } + +--- 1979,1985 ---- + curwin->w_cursor = curpos; /* restore curwin->w_cursor */ + } + if (curwin->w_cursor.lnum < curbuf->b_ml.ml_line_count) +! (void)do_join(2, FALSE, FALSE, FALSE, FALSE); + } + } + +*************** +*** 4323,4339 **** + /* + * Join 'count' lines (minimal 2) at cursor position. + * When "save_undo" is TRUE save lines for undo first. +! * Set "use_formatoptions" to FALSE when e.g. processing +! * backspace and comment leaders should not be removed. + * + * return FAIL for failure, OK otherwise + */ + int +! do_join(count, insert_space, save_undo, use_formatoptions) + long count; + int insert_space; + int save_undo; + int use_formatoptions UNUSED; + { + char_u *curr = NULL; + char_u *curr_start = NULL; +--- 4323,4342 ---- + /* + * Join 'count' lines (minimal 2) at cursor position. + * When "save_undo" is TRUE save lines for undo first. +! * Set "use_formatoptions" to FALSE when e.g. processing backspace and comment +! * leaders should not be removed. +! * When setmark is TRUE, sets the '[ and '] mark, else, the caller is expected +! * to set those marks. + * + * return FAIL for failure, OK otherwise + */ + int +! do_join(count, insert_space, save_undo, use_formatoptions, setmark) + long count; + int insert_space; + int save_undo; + int use_formatoptions UNUSED; ++ int setmark; + { + char_u *curr = NULL; + char_u *curr_start = NULL; +*************** +*** 4384,4390 **** + for (t = 0; t < count; ++t) + { + curr = curr_start = ml_get((linenr_T)(curwin->w_cursor.lnum + t)); +! if (t == 0) + { + /* Set the '[ mark. */ + curwin->w_buffer->b_op_start.lnum = curwin->w_cursor.lnum; +--- 4387,4393 ---- + for (t = 0; t < count; ++t) + { + curr = curr_start = ml_get((linenr_T)(curwin->w_cursor.lnum + t)); +! if (t == 0 && setmark) + { + /* Set the '[ mark. */ + curwin->w_buffer->b_op_start.lnum = curwin->w_cursor.lnum; +*************** +*** 4506,4514 **** + } + ml_replace(curwin->w_cursor.lnum, newp, FALSE); + +! /* Set the '] mark. */ +! curwin->w_buffer->b_op_end.lnum = curwin->w_cursor.lnum; +! curwin->w_buffer->b_op_end.col = (colnr_T)STRLEN(newp); + + /* Only report the change in the first line here, del_lines() will report + * the deleted line. */ +--- 4509,4520 ---- + } + ml_replace(curwin->w_cursor.lnum, newp, FALSE); + +! if (setmark) +! { +! /* Set the '] mark. */ +! curwin->w_buffer->b_op_end.lnum = curwin->w_cursor.lnum; +! curwin->w_buffer->b_op_end.col = (colnr_T)STRLEN(newp); +! } + + /* Only report the change in the first line here, del_lines() will report + * the deleted line. */ +*************** +*** 5009,5015 **** + } + } + curwin->w_cursor.lnum--; +! if (do_join(2, TRUE, FALSE, FALSE) == FAIL) + { + beep_flush(); + break; +--- 5015,5021 ---- + } + } + curwin->w_cursor.lnum--; +! if (do_join(2, TRUE, FALSE, FALSE, FALSE) == FAIL) + { + beep_flush(); + break; +*** ../vim-7.4.266/src/proto/ops.pro 2014-04-02 22:17:00.003482236 +0200 +--- src/proto/ops.pro 2014-04-29 12:08:50.620039525 +0200 +*************** +*** 37,43 **** + int preprocs_left __ARGS((void)); + int get_register_name __ARGS((int num)); + void ex_display __ARGS((exarg_T *eap)); +! int do_join __ARGS((long count, int insert_space, int save_undo, int use_formatoptions)); + void op_format __ARGS((oparg_T *oap, int keep_cursor)); + void op_formatexpr __ARGS((oparg_T *oap)); + int fex_format __ARGS((linenr_T lnum, long count, int c)); +--- 37,43 ---- + int preprocs_left __ARGS((void)); + int get_register_name __ARGS((int num)); + void ex_display __ARGS((exarg_T *eap)); +! int do_join __ARGS((long count, int insert_space, int save_undo, int use_formatoptions, int setmark)); + void op_format __ARGS((oparg_T *oap, int keep_cursor)); + void op_formatexpr __ARGS((oparg_T *oap)); + int fex_format __ARGS((linenr_T lnum, long count, int c)); +*** ../vim-7.4.266/src/version.c 2014-04-29 11:55:26.176053624 +0200 +--- src/version.c 2014-04-29 11:59:35.620049252 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 267, + /**/ + +-- +I AM THANKFUL... +...for all the complaining I hear about the government +because it means we have freedom of speech. + + /// 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/patches/source/vim/patches/7.4.268 b/patches/source/vim/patches/7.4.268 new file mode 100644 index 000000000..84ab15436 --- /dev/null +++ b/patches/source/vim/patches/7.4.268 @@ -0,0 +1,108 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.268 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.268 +Problem: Using exists() on a funcref for a script-local function does not + work. +Solution: Translate <SNR> to the special byte sequence. Add a test. +Files: src/eval.c, src/testdir/test_eval.in, src/testdir/test_eval.ok, + src/testdir/test_eval_func.vim, Filelist + + +*** ../vim-7.4.267/src/eval.c 2014-04-24 17:12:29.580911764 +0200 +--- src/eval.c 2014-04-29 13:49:26.759933737 +0200 +*************** +*** 22275,22280 **** +--- 22275,22288 ---- + { + name = vim_strsave(name); + *pp = end; ++ if (STRNCMP(name, "<SNR>", 5) == 0) ++ { ++ /* Change "<SNR>" to the byte sequence. */ ++ name[0] = K_SPECIAL; ++ name[1] = KS_EXTRA; ++ name[2] = (int)KE_SNR; ++ mch_memmove(name + 3, name + 5, STRLEN(name + 5) + 1); ++ } + goto theend; + } + +*** ../vim-7.4.267/src/testdir/test_eval.in 2014-04-24 17:12:29.584911764 +0200 +--- src/testdir/test_eval.in 2014-04-29 13:59:09.495923525 +0200 +*************** +*** 180,185 **** +--- 180,188 ---- + :echo g:Foo(2) + :echo Foo(3) + :" ++ :" script-local function used in Funcref must exist. ++ :so test_eval_func.vim ++ :" + :/^start:/+1,$wq! test.out + :" vim: et ts=4 isk-=\: fmr=???,??? + :call getchar() +*** ../vim-7.4.267/src/testdir/test_eval.ok 2014-04-24 17:12:29.584911764 +0200 +--- src/testdir/test_eval.ok 2014-04-29 13:59:39.551922998 +0200 +*************** +*** 341,343 **** +--- 341,347 ---- + called Foo(1) + called Foo(2) + called Foo(3) ++ s:Testje exists: 0 ++ func s:Testje exists: 1 ++ Bar exists: 1 ++ func Bar exists: 1 +*** ../vim-7.4.267/src/testdir/test_eval_func.vim 2014-04-29 14:02:08.415920389 +0200 +--- src/testdir/test_eval_func.vim 2014-04-29 13:57:34.503925189 +0200 +*************** +*** 0 **** +--- 1,10 ---- ++ " Vim script used in test_eval.in. Needed for script-local function. ++ ++ func! s:Testje() ++ return "foo" ++ endfunc ++ let Bar = function('s:Testje') ++ $put ='s:Testje exists: ' . exists('s:Testje') ++ $put ='func s:Testje exists: ' . exists('*s:Testje') ++ $put ='Bar exists: ' . exists('Bar') ++ $put ='func Bar exists: ' . exists('*Bar') +*** ../vim-7.4.267/Filelist 2014-04-05 21:59:35.939178415 +0200 +--- Filelist 2014-04-29 13:58:40.207924038 +0200 +*************** +*** 88,93 **** +--- 88,94 ---- + src/testdir/test60.vim \ + src/testdir/test83-tags? \ + src/testdir/test77a.com \ ++ src/testdir/test_*.vim \ + src/testdir/python2/*.py \ + src/testdir/python3/*.py \ + src/testdir/pythonx/*.py \ +*** ../vim-7.4.267/src/version.c 2014-04-29 12:15:22.860032651 +0200 +--- src/version.c 2014-04-29 13:47:32.935935732 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 268, + /**/ + +-- +I AM THANKFUL... +...for the piles of laundry and ironing because it means I +have plenty of clothes to wear. + + /// 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/patches/source/vim/patches/7.4.269 b/patches/source/vim/patches/7.4.269 new file mode 100644 index 000000000..80f29a486 --- /dev/null +++ b/patches/source/vim/patches/7.4.269 @@ -0,0 +1,213 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.269 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.269 +Problem: CTRL-U in Insert mode does not work after using a cursor key. + (Pine Wu) +Solution: Use the original insert start position. (Christian Brabandt) +Files: src/edit.c, src/testdir/test29.in, src/testdir/test29.ok + + +*** ../vim-7.4.268/src/edit.c 2014-04-29 12:15:22.852032651 +0200 +--- src/edit.c 2014-04-29 14:44:07.867876234 +0200 +*************** +*** 8760,8767 **** + ((curwin->w_cursor.lnum == 1 && curwin->w_cursor.col == 0) + || (!can_bs(BS_START) + && (arrow_used +! || (curwin->w_cursor.lnum == Insstart.lnum +! && curwin->w_cursor.col <= Insstart.col))) + || (!can_bs(BS_INDENT) && !arrow_used && ai_col > 0 + && curwin->w_cursor.col <= ai_col) + || (!can_bs(BS_EOL) && curwin->w_cursor.col == 0)))) +--- 8760,8767 ---- + ((curwin->w_cursor.lnum == 1 && curwin->w_cursor.col == 0) + || (!can_bs(BS_START) + && (arrow_used +! || (curwin->w_cursor.lnum == Insstart_orig.lnum +! && curwin->w_cursor.col <= Insstart_orig.col))) + || (!can_bs(BS_INDENT) && !arrow_used && ai_col > 0 + && curwin->w_cursor.col <= ai_col) + || (!can_bs(BS_EOL) && curwin->w_cursor.col == 0)))) +*************** +*** 8812,8819 **** + */ + if (curwin->w_cursor.col == 0) + { +! lnum = Insstart.lnum; +! if (curwin->w_cursor.lnum == Insstart.lnum + #ifdef FEAT_RIGHTLEFT + || revins_on + #endif +--- 8812,8819 ---- + */ + if (curwin->w_cursor.col == 0) + { +! lnum = Insstart_orig.lnum; +! if (curwin->w_cursor.lnum == lnum + #ifdef FEAT_RIGHTLEFT + || revins_on + #endif +*************** +*** 8822,8829 **** + if (u_save((linenr_T)(curwin->w_cursor.lnum - 2), + (linenr_T)(curwin->w_cursor.lnum + 1)) == FAIL) + return FALSE; +! --Insstart.lnum; +! Insstart.col = MAXCOL; + } + /* + * In replace mode: +--- 8822,8829 ---- + if (u_save((linenr_T)(curwin->w_cursor.lnum - 2), + (linenr_T)(curwin->w_cursor.lnum + 1)) == FAIL) + return FALSE; +! --Insstart_orig.lnum; +! Insstart_orig.col = MAXCOL; + } + /* + * In replace mode: +*************** +*** 8981,8989 **** + while (vcol < want_vcol) + { + /* Remember the first char we inserted */ +! if (curwin->w_cursor.lnum == Insstart.lnum +! && curwin->w_cursor.col < Insstart.col) +! Insstart.col = curwin->w_cursor.col; + + #ifdef FEAT_VREPLACE + if (State & VREPLACE_FLAG) +--- 8981,8989 ---- + while (vcol < want_vcol) + { + /* Remember the first char we inserted */ +! if (curwin->w_cursor.lnum == Insstart_orig.lnum +! && curwin->w_cursor.col < Insstart_orig.col) +! Insstart_orig.col = curwin->w_cursor.col; + + #ifdef FEAT_VREPLACE + if (State & VREPLACE_FLAG) +*************** +*** 9071,9078 **** + revins_on || + #endif + (curwin->w_cursor.col > mincol +! && (curwin->w_cursor.lnum != Insstart.lnum +! || curwin->w_cursor.col != Insstart.col))); + did_backspace = TRUE; + } + #ifdef FEAT_SMARTINDENT +--- 9071,9078 ---- + revins_on || + #endif + (curwin->w_cursor.col > mincol +! && (curwin->w_cursor.lnum != Insstart_orig.lnum +! || curwin->w_cursor.col != Insstart_orig.col))); + did_backspace = TRUE; + } + #ifdef FEAT_SMARTINDENT +*************** +*** 9090,9098 **** + AppendCharToRedobuff(c); + + /* If deleted before the insertion point, adjust it */ +! if (curwin->w_cursor.lnum == Insstart.lnum +! && curwin->w_cursor.col < Insstart.col) +! Insstart.col = curwin->w_cursor.col; + + /* vi behaviour: the cursor moves backward but the character that + * was there remains visible +--- 9090,9098 ---- + AppendCharToRedobuff(c); + + /* If deleted before the insertion point, adjust it */ +! if (curwin->w_cursor.lnum == Insstart_orig.lnum +! && curwin->w_cursor.col < Insstart_orig.col) +! Insstart_orig.col = curwin->w_cursor.col; + + /* vi behaviour: the cursor moves backward but the character that + * was there remains visible +*** ../vim-7.4.268/src/testdir/test29.in 2012-06-13 13:48:26.000000000 +0200 +--- src/testdir/test29.in 2014-04-29 14:31:23.619889628 +0200 +*************** +*** 102,107 **** +--- 102,135 ---- + } + + STARTTEST ++ :" Test with backspace set to the non-compatible setting ++ /^\d\+ this ++ :set cp bs=2 ++ Avim1 ++ Avim2u ++ :set cpo-=< ++ :inoremap <c-u> <left><c-u> ++ Avim3 ++ :iunmap <c-u> ++ Avim4 ++ :" Test with backspace set to the compatible setting ++ :set bs= ++ A vim5A ++ A vim6Azweiu ++ :inoremap <c-u> <left><c-u> ++ A vim7 ++ :set cp ++ ENDTEST ++ 1 this shouldn't be deleted ++ 2 this shouldn't be deleted ++ 3 this shouldn't be deleted ++ 4 this should be deleted ++ 5 this shouldn't be deleted ++ 6 this shouldn't be deleted ++ 7 this shouldn't be deleted ++ 8 this shouldn't be deleted (not touched yet) ++ ++ STARTTEST + /^{/+1 + :set comments=sO:*\ -,mO:*\ \ ,exO:*/ + :set comments+=s1:/*,mb:*,ex:*/,:// +*** ../vim-7.4.268/src/testdir/test29.ok 2012-06-13 13:48:26.000000000 +0200 +--- src/testdir/test29.ok 2014-04-29 14:31:23.623889628 +0200 +*************** +*** 62,67 **** +--- 62,76 ---- + action(); + } + ++ 1 this shouldn't be deleted ++ 2 this shouldn't be deleted ++ 3 this shouldn't be deleted ++ 4 this should be deleted3 ++ ++ 6 this shouldn't be deleted vim5 ++ 7 this shouldn't be deleted vim6 ++ 8 this shouldn't be deleted (not touched yet) vim7 ++ + + { + /* Make sure the previous comment leader is not removed. */ +*** ../vim-7.4.268/src/version.c 2014-04-29 14:02:42.547919791 +0200 +--- src/version.c 2014-04-29 14:42:09.083878315 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 269, + /**/ + +-- +From "know your smileys": + [:-) Frankenstein's monster + + /// 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/patches/source/vim/patches/7.4.270 b/patches/source/vim/patches/7.4.270 new file mode 100644 index 000000000..ce9fb70dd --- /dev/null +++ b/patches/source/vim/patches/7.4.270 @@ -0,0 +1,62 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.270 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.270 +Problem: Comparing pointers instead of the string they point to. +Solution: Use strcmp(). (Ken Takata) +Files: src/gui_gtk_x11.c + + +*** ../vim-7.4.269/src/gui_gtk_x11.c 2014-04-06 21:08:41.311360470 +0200 +--- src/gui_gtk_x11.c 2014-04-29 15:02:35.931856814 +0200 +*************** +*** 3142,3151 **** + gnome_program_init(VIMPACKAGE, VIM_VERSION_SHORT, + LIBGNOMEUI_MODULE, gui_argc, gui_argv, NULL); + # if defined(FEAT_FLOAT) && defined(LC_NUMERIC) +! /* Make sure strtod() uses a decimal point, not a comma. Gnome init +! * may change it. */ +! if (setlocale(LC_NUMERIC, NULL) != (char *) "C") +! setlocale(LC_NUMERIC, "C"); + # endif + } + #endif +--- 3142,3155 ---- + gnome_program_init(VIMPACKAGE, VIM_VERSION_SHORT, + LIBGNOMEUI_MODULE, gui_argc, gui_argv, NULL); + # if defined(FEAT_FLOAT) && defined(LC_NUMERIC) +! { +! char *p = setlocale(LC_NUMERIC, NULL); +! +! /* Make sure strtod() uses a decimal point, not a comma. Gnome +! * init may change it. */ +! if (p == NULL || strcmp(p, "C") != 0) +! setlocale(LC_NUMERIC, "C"); +! } + # endif + } + #endif +*** ../vim-7.4.269/src/version.c 2014-04-29 14:44:31.519875819 +0200 +--- src/version.c 2014-04-29 14:59:21.799860216 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 270, + /**/ + +-- +From "know your smileys": + :-| :-| Deja' vu! + + /// 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/patches/source/vim/patches/7.4.271 b/patches/source/vim/patches/7.4.271 new file mode 100644 index 000000000..c7f03ee7e --- /dev/null +++ b/patches/source/vim/patches/7.4.271 @@ -0,0 +1,52 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.271 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.271 +Problem: Compiler warning on 64 bit windows. +Solution: Add type cast. (Mike Williams) +Files: src/ops.c + + +*** ../vim-7.4.270/src/ops.c 2014-04-29 12:15:22.860032651 +0200 +--- src/ops.c 2014-04-29 15:54:23.055802359 +0200 +*************** +*** 6559,6565 **** + { + for (ss = (char_u **) str; *ss != NULL; ++ss, ++lnum) + { +! i = STRLEN(*ss); + pp[lnum] = vim_strnsave(*ss, i); + if (i > maxlen) + maxlen = i; +--- 6559,6565 ---- + { + for (ss = (char_u **) str; *ss != NULL; ++ss, ++lnum) + { +! i = (long)STRLEN(*ss); + pp[lnum] = vim_strnsave(*ss, i); + if (i > maxlen) + maxlen = i; +*** ../vim-7.4.270/src/version.c 2014-04-29 15:11:39.783847283 +0200 +--- src/version.c 2014-04-29 15:52:54.083803919 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 271, + /**/ + +-- +From "know your smileys": + :.-( Crying + + /// 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/patches/source/vim/patches/7.4.272 b/patches/source/vim/patches/7.4.272 new file mode 100644 index 000000000..e893a9625 --- /dev/null +++ b/patches/source/vim/patches/7.4.272 @@ -0,0 +1,148 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.272 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.272 +Problem: Using just "$" does not cause an error message. +Solution: Check for empty environment variable name. (Christian Brabandt) +Files: src/eval.c, src/testdir/test_eval.in, src/testdir/test_eval.ok + + +*** ../vim-7.4.271/src/eval.c 2014-04-29 14:02:42.543919791 +0200 +--- src/eval.c 2014-04-29 17:33:40.575697949 +0200 +*************** +*** 7798,7804 **** + * Get the value of an environment variable. + * "arg" is pointing to the '$'. It is advanced to after the name. + * If the environment variable was not set, silently assume it is empty. +! * Always return OK. + */ + static int + get_env_tv(arg, rettv, evaluate) +--- 7798,7804 ---- + * Get the value of an environment variable. + * "arg" is pointing to the '$'. It is advanced to after the name. + * If the environment variable was not set, silently assume it is empty. +! * Return FAIL if the name is invalid. + */ + static int + get_env_tv(arg, rettv, evaluate) +*************** +*** 7817,7848 **** + len = get_env_len(arg); + if (evaluate) + { +! if (len != 0) + { +! cc = name[len]; +! name[len] = NUL; +! /* first try vim_getenv(), fast for normal environment vars */ +! string = vim_getenv(name, &mustfree); +! if (string != NULL && *string != NUL) +! { +! if (!mustfree) +! string = vim_strsave(string); +! } +! else +! { +! if (mustfree) +! vim_free(string); + +! /* next try expanding things like $VIM and ${HOME} */ +! string = expand_env_save(name - 1); +! if (string != NULL && *string == '$') +! { +! vim_free(string); +! string = NULL; +! } + } +- name[len] = cc; + } + rettv->v_type = VAR_STRING; + rettv->vval.v_string = string; + } +--- 7817,7849 ---- + len = get_env_len(arg); + if (evaluate) + { +! if (len == 0) +! return FAIL; /* can't be an environment variable */ +! +! cc = name[len]; +! name[len] = NUL; +! /* first try vim_getenv(), fast for normal environment vars */ +! string = vim_getenv(name, &mustfree); +! if (string != NULL && *string != NUL) + { +! if (!mustfree) +! string = vim_strsave(string); +! } +! else +! { +! if (mustfree) +! vim_free(string); + +! /* next try expanding things like $VIM and ${HOME} */ +! string = expand_env_save(name - 1); +! if (string != NULL && *string == '$') +! { +! vim_free(string); +! string = NULL; + } + } ++ name[len] = cc; ++ + rettv->v_type = VAR_STRING; + rettv->vval.v_string = string; + } +*** ../vim-7.4.271/src/testdir/test_eval.in 2014-04-29 14:02:42.543919791 +0200 +--- src/testdir/test_eval.in 2014-04-29 17:35:27.243696080 +0200 +*************** +*** 183,188 **** +--- 183,195 ---- + :" script-local function used in Funcref must exist. + :so test_eval_func.vim + :" ++ :" Using $ instead of '$' must give an error ++ :try ++ : call append($, 'foobar') ++ :catch ++ :$put =v:exception ++ :endtry ++ :" + :/^start:/+1,$wq! test.out + :" vim: et ts=4 isk-=\: fmr=???,??? + :call getchar() +*** ../vim-7.4.271/src/testdir/test_eval.ok 2014-04-29 14:02:42.543919791 +0200 +--- src/testdir/test_eval.ok 2014-04-29 17:36:41.451694779 +0200 +*************** +*** 345,347 **** +--- 345,348 ---- + func s:Testje exists: 1 + Bar exists: 1 + func Bar exists: 1 ++ Vim(call):E116: Invalid arguments for function append +*** ../vim-7.4.271/src/version.c 2014-04-29 15:55:39.443801021 +0200 +--- src/version.c 2014-04-29 17:31:54.203699814 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 272, + /**/ + +-- +From "know your smileys": + C=}>;*{)) Drunk, devilish chef with a toupee in an updraft, + a mustache, and a double chin + + /// 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/patches/source/vim/patches/7.4.273 b/patches/source/vim/patches/7.4.273 new file mode 100644 index 000000000..2fe4d17a9 --- /dev/null +++ b/patches/source/vim/patches/7.4.273 @@ -0,0 +1,57 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.273 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.273 +Problem: "make autoconf" and "make reconfig" may first run configure and + then remove the output. +Solution: Add these targets to the exceptions. (Ken Takata) +Files: src/Makefile + + +*** ../vim-7.4.272/src/Makefile 2014-04-29 12:15:22.852032651 +0200 +--- src/Makefile 2014-04-29 19:58:23.611545773 +0200 +*************** +*** 1670,1676 **** + ! grep -x -F 'ac_cv_env_CFLAGS_value=$(CFLAGS)' auto/config.cache > /dev/null; then \ + rm auto/config.cache; \ + fi +! if test "X$(MAKECMDGOALS)" != "Xclean" -a "X$(MAKECMDGOALS)" != "Xdistclean"; then \ + GUI_INC_LOC="$(GUI_INC_LOC)" GUI_LIB_LOC="$(GUI_LIB_LOC)" \ + CC="$(CC)" CPPFLAGS="$(CPPFLAGS)" CFLAGS="$(CFLAGS)" \ + LDFLAGS="$(LDFLAGS)" $(CONF_SHELL) srcdir="$(srcdir)" \ +--- 1670,1679 ---- + ! grep -x -F 'ac_cv_env_CFLAGS_value=$(CFLAGS)' auto/config.cache > /dev/null; then \ + rm auto/config.cache; \ + fi +! if test "X$(MAKECMDGOALS)" != "Xclean" \ +! -a "X$(MAKECMDGOALS)" != "Xdistclean" \ +! -a "X$(MAKECMDGOALS)" != "Xautoconf" \ +! -a "X$(MAKECMDGOALS)" != "Xreconfig"; then \ + GUI_INC_LOC="$(GUI_INC_LOC)" GUI_LIB_LOC="$(GUI_LIB_LOC)" \ + CC="$(CC)" CPPFLAGS="$(CPPFLAGS)" CFLAGS="$(CFLAGS)" \ + LDFLAGS="$(LDFLAGS)" $(CONF_SHELL) srcdir="$(srcdir)" \ +*** ../vim-7.4.272/src/version.c 2014-04-29 17:41:18.351689927 +0200 +--- src/version.c 2014-04-29 19:59:21.895544751 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 273, + /**/ + +-- +From "know your smileys": + <|-) Chinese + <|-( Chinese and doesn't like these kind of jokes + + /// 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/patches/source/vim/patches/7.4.274 b/patches/source/vim/patches/7.4.274 new file mode 100644 index 000000000..186e09b9d --- /dev/null +++ b/patches/source/vim/patches/7.4.274 @@ -0,0 +1,46 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.274 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.274 +Problem: When doing ":update" just before running an external command that + changes the file, the timestamp may be unchanged and the file + is not reloaded. +Solution: Also check the file size. +Files: src/fileio.c + + +*** ../vim-7.4.273/src/fileio.c 2014-04-06 20:45:40.123357453 +0200 +--- src/fileio.c 2014-05-02 15:35:19.671279728 +0200 +*************** +*** 6897,6902 **** +--- 6897,6903 ---- + && buf->b_mtime != 0 + && ((stat_res = mch_stat((char *)buf->b_ffname, &st)) < 0 + || time_differs((long)st.st_mtime, buf->b_mtime) ++ || st.st_size != buf->b_orig_size + #ifdef HAVE_ST_MODE + || (int)st.st_mode != buf->b_orig_mode + #else +*** ../vim-7.4.273/src/version.c 2014-04-29 20:04:05.331539784 +0200 +--- src/version.c 2014-05-02 15:36:22.619278625 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 274, + /**/ + +-- +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/patches/source/vim/patches/7.4.275 b/patches/source/vim/patches/7.4.275 new file mode 100644 index 000000000..443fe185c --- /dev/null +++ b/patches/source/vim/patches/7.4.275 @@ -0,0 +1,56 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.275 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.275 +Problem: When changing the type of a sign that hasn't been placed ther is + no error message. +Solution: Add an error message. (Christian Brabandt) +Files: src/ex_cmds.c + + +*** ../vim-7.4.274/src/ex_cmds.c 2014-04-29 12:15:22.856032651 +0200 +--- src/ex_cmds.c 2014-05-07 14:38:31.293091622 +0200 +*************** +*** 7275,7281 **** + else + /* ":sign place {id} file={fname}": change sign type */ + lnum = buf_change_sign_type(buf, id, sp->sn_typenr); +! update_debug_sign(buf, lnum); + } + else + EMSG(_(e_invarg)); +--- 7275,7284 ---- + else + /* ":sign place {id} file={fname}": change sign type */ + lnum = buf_change_sign_type(buf, id, sp->sn_typenr); +! if (lnum > 0) +! update_debug_sign(buf, lnum); +! else +! EMSG2(_("E885: Not possible to change sign %s"), sign_name); + } + else + EMSG(_(e_invarg)); +*** ../vim-7.4.274/src/version.c 2014-05-02 15:46:10.731268318 +0200 +--- src/version.c 2014-05-07 14:18:32.581081129 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 275, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +117. You are more comfortable typing 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/patches/source/vim/patches/7.4.276 b/patches/source/vim/patches/7.4.276 new file mode 100644 index 000000000..ab4f310dc --- /dev/null +++ b/patches/source/vim/patches/7.4.276 @@ -0,0 +1,302 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.276 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.276 +Problem: The fish shell is not supported. +Solution: Use begin/end instead of () for fish. (Andy Russell) +Files: src/ex_cmds.c, src/misc1.c, src/option.c, src/proto/misc1.pro + + +*** ../vim-7.4.275/src/ex_cmds.c 2014-05-07 14:38:41.129091709 +0200 +--- src/ex_cmds.c 2014-05-07 15:09:57.797108136 +0200 +*************** +*** 1551,1558 **** + { + char_u *buf; + long_u len; + +! len = (long_u)STRLEN(cmd) + 3; /* "()" + NUL */ + if (itmp != NULL) + len += (long_u)STRLEN(itmp) + 9; /* " { < " + " } " */ + if (otmp != NULL) +--- 1551,1566 ---- + { + char_u *buf; + long_u len; ++ int is_fish_shell; + +! #if (defined(UNIX) && !defined(ARCHIE)) || defined(OS2) +! /* Account for fish's different syntax for subshells */ +! is_fish_shell = (fnamecmp(get_isolated_shell_name(), "fish") == 0); +! if (is_fish_shell) +! len = (long_u)STRLEN(cmd) + 13; /* "begin; " + "; end" + NUL */ +! else +! #endif +! len = (long_u)STRLEN(cmd) + 3; /* "()" + NUL */ + if (itmp != NULL) + len += (long_u)STRLEN(itmp) + 9; /* " { < " + " } " */ + if (otmp != NULL) +*************** +*** 1567,1573 **** + * redirecting input and/or output. + */ + if (itmp != NULL || otmp != NULL) +! vim_snprintf((char *)buf, len, "(%s)", (char *)cmd); + else + STRCPY(buf, cmd); + if (itmp != NULL) +--- 1575,1586 ---- + * redirecting input and/or output. + */ + if (itmp != NULL || otmp != NULL) +! { +! if (is_fish_shell) +! vim_snprintf((char *)buf, len, "begin; %s; end", (char *)cmd); +! else +! vim_snprintf((char *)buf, len, "(%s)", (char *)cmd); +! } + else + STRCPY(buf, cmd); + if (itmp != NULL) +*************** +*** 1577,1583 **** + } + #else + /* +! * for shells that don't understand braces around commands, at least allow + * the use of commands in a pipe. + */ + STRCPY(buf, cmd); +--- 1590,1596 ---- + } + #else + /* +! * For shells that don't understand braces around commands, at least allow + * the use of commands in a pipe. + */ + STRCPY(buf, cmd); +*************** +*** 4315,4321 **** + pos_T old_cursor = curwin->w_cursor; + int start_nsubs; + #ifdef FEAT_EVAL +! int save_ma = 0; + #endif + + cmd = eap->arg; +--- 4328,4334 ---- + pos_T old_cursor = curwin->w_cursor; + int start_nsubs; + #ifdef FEAT_EVAL +! int save_ma = 0; + #endif + + cmd = eap->arg; +*************** +*** 5986,5992 **** + "/\\\\?", "/\\\\z(\\\\)", "\\\\=", ":s\\\\=", + "\\[count]", "\\[quotex]", "\\[range]", + "\\[pattern]", "\\\\bar", "/\\\\%\\$", +! "s/\\\\\\~", "s/\\\\U", "s/\\\\L", + "s/\\\\1", "s/\\\\2", "s/\\\\3", "s/\\\\9"}; + int flags; + +--- 5999,6005 ---- + "/\\\\?", "/\\\\z(\\\\)", "\\\\=", ":s\\\\=", + "\\[count]", "\\[quotex]", "\\[range]", + "\\[pattern]", "\\\\bar", "/\\\\%\\$", +! "s/\\\\\\~", "s/\\\\U", "s/\\\\L", + "s/\\\\1", "s/\\\\2", "s/\\\\3", "s/\\\\9"}; + int flags; + +*************** +*** 6026,6032 **** + /* Replace: + * "[:...:]" with "\[:...:]" + * "[++...]" with "\[++...]" +! * "\{" with "\\{" -- matching "} \}" + */ + if ((arg[0] == '[' && (arg[1] == ':' + || (arg[1] == '+' && arg[2] == '+'))) +--- 6039,6045 ---- + /* Replace: + * "[:...:]" with "\[:...:]" + * "[++...]" with "\[++...]" +! * "\{" with "\\{" -- matching "} \}" + */ + if ((arg[0] == '[' && (arg[1] == ':' + || (arg[1] == '+' && arg[2] == '+'))) +*** ../vim-7.4.275/src/misc1.c 2014-04-05 19:44:36.903160723 +0200 +--- src/misc1.c 2014-05-07 15:04:25.921105231 +0200 +*************** +*** 1405,1411 **** + #ifdef FEAT_SMARTINDENT + if (did_si) + { +! int sw = (int)get_sw_value(curbuf); + + 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; +*************** +*** 10896,10898 **** +--- 10896,10936 ---- + { + return (p_im && stuff_empty() && typebuf_typed()); + } ++ ++ /* ++ * Returns the isolated name of the shell: ++ * - Skip beyond any path. E.g., "/usr/bin/csh -f" -> "csh -f". ++ * - Remove any argument. E.g., "csh -f" -> "csh". ++ * But don't allow a space in the path, so that this works: ++ * "/usr/bin/csh --rcfile ~/.cshrc" ++ * But don't do that for Windows, it's common to have a space in the path. ++ */ ++ char_u * ++ get_isolated_shell_name() ++ { ++ char_u *p; ++ ++ #ifdef WIN3264 ++ p = gettail(p_sh); ++ p = vim_strnsave(p, (int)(skiptowhite(p) - p)); ++ #else ++ p = skiptowhite(p_sh); ++ if (*p == NUL) ++ { ++ /* No white space, use the tail. */ ++ p = vim_strsave(gettail(p_sh)); ++ } ++ else ++ { ++ char_u *p1, *p2; ++ ++ /* Find the last path separator before the space. */ ++ p1 = p_sh; ++ for (p2 = p_sh; p2 < p; mb_ptr_adv(p2)) ++ if (vim_ispathsep(*p2)) ++ p1 = p2 + 1; ++ p = vim_strnsave(p1, (int)(p - p1)); ++ } ++ #endif ++ return p; ++ } +*** ../vim-7.4.275/src/option.c 2014-03-23 15:12:29.931264336 +0100 +--- src/option.c 2014-05-07 15:05:14.117105653 +0200 +*************** +*** 3804,3840 **** + else + do_sp = !(options[idx_sp].flags & P_WAS_SET); + #endif +! +! /* +! * Isolate the name of the shell: +! * - Skip beyond any path. E.g., "/usr/bin/csh -f" -> "csh -f". +! * - Remove any argument. E.g., "csh -f" -> "csh". +! * But don't allow a space in the path, so that this works: +! * "/usr/bin/csh --rcfile ~/.cshrc" +! * But don't do that for Windows, it's common to have a space in the path. +! */ +! #ifdef WIN3264 +! p = gettail(p_sh); +! p = vim_strnsave(p, (int)(skiptowhite(p) - p)); +! #else +! p = skiptowhite(p_sh); +! if (*p == NUL) +! { +! /* No white space, use the tail. */ +! p = vim_strsave(gettail(p_sh)); +! } +! else +! { +! char_u *p1, *p2; +! +! /* Find the last path separator before the space. */ +! p1 = p_sh; +! for (p2 = p_sh; p2 < p; mb_ptr_adv(p2)) +! if (vim_ispathsep(*p2)) +! p1 = p2 + 1; +! p = vim_strnsave(p1, (int)(p - p1)); +! } +! #endif + if (p != NULL) + { + /* +--- 3804,3810 ---- + else + do_sp = !(options[idx_sp].flags & P_WAS_SET); + #endif +! p = get_isolated_shell_name(); + if (p != NULL) + { + /* +*************** +*** 3875,3880 **** +--- 3845,3851 ---- + || fnamecmp(p, "zsh") == 0 + || fnamecmp(p, "zsh-beta") == 0 + || fnamecmp(p, "bash") == 0 ++ || fnamecmp(p, "fish") == 0 + # ifdef WIN3264 + || fnamecmp(p, "cmd") == 0 + || fnamecmp(p, "sh.exe") == 0 +*************** +*** 8858,8865 **** + * 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 +--- 8829,8836 ---- + * 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 +*** ../vim-7.4.275/src/proto/misc1.pro 2014-04-05 19:44:36.903160723 +0200 +--- src/proto/misc1.pro 2014-05-07 14:57:04.605101368 +0200 +*************** +*** 103,106 **** +--- 103,107 ---- + char_u *get_cmd_output __ARGS((char_u *cmd, char_u *infile, int flags, int *ret_len)); + void FreeWild __ARGS((int count, char_u **files)); + int goto_im __ARGS((void)); ++ char_u *get_isolated_shell_name __ARGS((void)); + /* vim: set ft=c : */ +*** ../vim-7.4.275/src/version.c 2014-05-07 14:38:41.129091709 +0200 +--- src/version.c 2014-05-07 14:58:59.769102376 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 276, + /**/ + +-- +Support your right to bare arms! Wear short sleeves! + + /// 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/patches/source/vim/patches/7.4.277 b/patches/source/vim/patches/7.4.277 new file mode 100644 index 000000000..1b569cb5e --- /dev/null +++ b/patches/source/vim/patches/7.4.277 @@ -0,0 +1,80 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.277 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.277 +Problem: Using ":sign unplace *" may leave the cursor in the wrong position + (Christian Brabandt) +Solution: Update the cursor position when removing all signs. +Files: src/buffer.c + + +*** ../vim-7.4.276/src/buffer.c 2014-04-06 20:45:40.115357453 +0200 +--- src/buffer.c 2014-05-07 16:30:13.117150289 +0200 +*************** +*** 5525,5530 **** +--- 5525,5534 ---- + return; + } + ++ /* ++ * For an existing, placed sign "markId" change the type to "typenr". ++ * Returns the line number of the sign, or zero if the sign is not found. ++ */ + linenr_T + buf_change_sign_type(buf, markId, typenr) + buf_T *buf; /* buffer to store sign in */ +*************** +*** 5693,5698 **** +--- 5697,5710 ---- + { + signlist_T *next; + ++ /* When deleting the last sign need to redraw the windows to remove the ++ * sign column. */ ++ if (buf->b_signlist != NULL) ++ { ++ redraw_buf_later(buf, NOT_VALID); ++ changed_cline_bef_curs(); ++ } ++ + while (buf->b_signlist != NULL) + { + next = buf->b_signlist->next; +*************** +*** 5711,5721 **** + + for (buf = firstbuf; buf != NULL; buf = buf->b_next) + if (buf->b_signlist != NULL) +- { +- /* Need to redraw the windows to remove the sign column. */ +- redraw_buf_later(buf, NOT_VALID); + buf_delete_signs(buf); +- } + } + + /* +--- 5723,5729 ---- +*** ../vim-7.4.276/src/version.c 2014-05-07 15:10:17.661108310 +0200 +--- src/version.c 2014-05-07 16:32:06.933151285 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 277, + /**/ + +-- +An actual excerpt from a classified section of a city newspaper: +"Illiterate? Write today for free help!" + + /// 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/patches/source/vim/patches/7.4.278 b/patches/source/vim/patches/7.4.278 new file mode 100644 index 000000000..5740fb84c --- /dev/null +++ b/patches/source/vim/patches/7.4.278 @@ -0,0 +1,183 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.278 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.278 +Problem: list_remove() conflicts with function defined in Sun header file. +Solution: Rename the function. (Richard Palo) +Files: src/eval.c, src/if_lua.c, src/if_py_both.h, src/proto/eval.pro + + +*** ../vim-7.4.277/src/eval.c 2014-04-29 17:41:18.351689927 +0200 +--- src/eval.c 2014-05-07 17:28:56.037181128 +0200 +*************** +*** 5998,6004 **** + list_T *l; + listitem_T *item; + { +! list_remove(l, item, item); + listitem_free(item); + } + +--- 5998,6004 ---- + list_T *l; + listitem_T *item; + { +! vimlist_remove(l, item, item); + listitem_free(item); + } + +*************** +*** 6577,6585 **** + /* + * Remove items "item" to "item2" from list "l". + * Does not free the listitem or the value! + */ + void +! list_remove(l, item, item2) + list_T *l; + listitem_T *item; + listitem_T *item2; +--- 6577,6587 ---- + /* + * Remove items "item" to "item2" from list "l". + * Does not free the listitem or the value! ++ * This used to be called list_remove, but that conflicts with a Sun header ++ * file. + */ + void +! vimlist_remove(l, item, item2) + list_T *l; + listitem_T *item; + listitem_T *item2; +*************** +*** 15435,15441 **** + if (argvars[2].v_type == VAR_UNKNOWN) + { + /* Remove one item, return its value. */ +! list_remove(l, item, item); + *rettv = item->li_tv; + vim_free(item); + } +--- 15437,15443 ---- + if (argvars[2].v_type == VAR_UNKNOWN) + { + /* Remove one item, return its value. */ +! vimlist_remove(l, item, item); + *rettv = item->li_tv; + vim_free(item); + } +*************** +*** 15461,15467 **** + EMSG(_(e_invrange)); + else + { +! list_remove(l, item, item2); + if (rettv_list_alloc(rettv) == OK) + { + l = rettv->vval.v_list; +--- 15463,15469 ---- + EMSG(_(e_invrange)); + else + { +! vimlist_remove(l, item, item2); + if (rettv_list_alloc(rettv) == OK) + { + l = rettv->vval.v_list; +*** ../vim-7.4.277/src/if_lua.c 2013-06-23 12:55:02.000000000 +0200 +--- src/if_lua.c 2014-05-07 17:29:08.913181240 +0200 +*************** +*** 734,740 **** + if (li == NULL) return 0; + if (lua_isnil(L, 3)) /* remove? */ + { +! list_remove(l, li, li); + clear_tv(&li->li_tv); + vim_free(li); + } +--- 734,740 ---- + if (li == NULL) return 0; + if (lua_isnil(L, 3)) /* remove? */ + { +! vimlist_remove(l, li, li); + clear_tv(&li->li_tv); + vim_free(li); + } +*** ../vim-7.4.277/src/if_py_both.h 2014-03-30 16:11:37.176530823 +0200 +--- src/if_py_both.h 2014-05-07 17:29:26.497181394 +0200 +*************** +*** 2494,2500 **** + if (numreplaced < slicelen) + { + lis[slicelen + numreplaced] = lis[numreplaced]->li_prev; +! list_remove(l, lis[numreplaced], lis[numreplaced]); + numreplaced++; + } + else +--- 2494,2500 ---- + if (numreplaced < slicelen) + { + lis[slicelen + numreplaced] = lis[numreplaced]->li_prev; +! vimlist_remove(l, lis[numreplaced], lis[numreplaced]); + numreplaced++; + } + else +*************** +*** 2570,2576 **** + if (obj == NULL) + { + li = list_find(l, (long) index); +! list_remove(l, li, li); + clear_tv(&li->li_tv); + vim_free(li); + return 0; +--- 2570,2576 ---- + if (obj == NULL) + { + li = list_find(l, (long) index); +! vimlist_remove(l, li, li); + clear_tv(&li->li_tv); + vim_free(li); + return 0; +*** ../vim-7.4.277/src/proto/eval.pro 2014-01-14 16:36:40.000000000 +0100 +--- src/proto/eval.pro 2014-05-07 17:30:02.517181710 +0200 +*************** +*** 59,65 **** + int list_append_dict __ARGS((list_T *list, dict_T *dict)); + 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)); +--- 59,65 ---- + int list_append_dict __ARGS((list_T *list, dict_T *dict)); + 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 vimlist_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)); +*** ../vim-7.4.277/src/version.c 2014-05-07 16:35:05.029152844 +0200 +--- src/version.c 2014-05-07 17:30:43.449182068 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 278, + /**/ + +-- +"Computers in the future may weigh no more than 1.5 tons." + Popular Mechanics, 1949 + + /// 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/patches/source/vim/patches/7.4.279 b/patches/source/vim/patches/7.4.279 new file mode 100644 index 000000000..6fb4c1b3a --- /dev/null +++ b/patches/source/vim/patches/7.4.279 @@ -0,0 +1,616 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.279 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.279 +Problem: globpath() returns a string, making it difficult to get a list of + matches. (Greg Novack) +Solution: Add an optional argument like with glob(). (Adnan Zafar) +Files: runtime/doc/eval.txt, src/eval.c, src/ex_getln.c, src/misc1.c, + src/misc2.c, src/proto/ex_getln.pro, src/proto/misc2.pro, + src/testdir/test97.in, src/testdir/test97.ok + + +*** ../vim-7.4.278/runtime/doc/eval.txt 2014-04-23 17:43:37.350948683 +0200 +--- runtime/doc/eval.txt 2014-05-07 17:38:03.045185916 +0200 +*************** +*** 1832,1838 **** + any variable {varname} in window {nr} + glob( {expr} [, {nosuf} [, {list}]]) + any expand file wildcards in {expr} +! globpath( {path}, {expr} [, {flag}]) + String do glob({expr}) for all dirs in {path} + has( {feature}) Number TRUE if feature {feature} supported + has_key( {dict}, {key}) Number TRUE if {dict} has entry {key} +--- 1832,1838 ---- + any variable {varname} in window {nr} + glob( {expr} [, {nosuf} [, {list}]]) + any expand file wildcards in {expr} +! globpath( {path}, {expr} [, {nosuf} [, {list}]]) + String do glob({expr}) for all dirs in {path} + has( {feature}) Number TRUE if feature {feature} supported + has_key( {dict}, {key}) Number TRUE if {dict} has entry {key} +*************** +*** 3570,3580 **** + See |expand()| for expanding special Vim variables. See + |system()| for getting the raw output of an external command. + +! globpath({path}, {expr} [, {flag}]) *globpath()* + Perform glob() on all directories in {path} and concatenate + the results. Example: > + :echo globpath(&rtp, "syntax/c.vim") +! < {path} is a comma-separated list of directory names. Each + directory name is prepended to {expr} and expanded like with + |glob()|. A path separator is inserted when needed. + To add a comma inside a directory name escape it with a +--- 3571,3582 ---- + See |expand()| for expanding special Vim variables. See + |system()| for getting the raw output of an external command. + +! globpath({path}, {expr} [, {nosuf} [, {list}]]) *globpath()* + Perform glob() on all directories in {path} and concatenate + the results. Example: > + :echo globpath(&rtp, "syntax/c.vim") +! < +! {path} is a comma-separated list of directory names. Each + directory name is prepended to {expr} and expanded like with + |glob()|. A path separator is inserted when needed. + To add a comma inside a directory name escape it with a +*************** +*** 3582,3592 **** + trailing backslash, remove it if you put a comma after it. + If the expansion fails for one of the directories, there is no + error message. +! Unless the optional {flag} argument is given and is non-zero, + the 'suffixes' and 'wildignore' options apply: Names matching + one of the patterns in 'wildignore' will be skipped and + 'suffixes' affect the ordering of matches. + + The "**" item can be used to search in a directory tree. + For example, to find all "README.txt" files in the directories + in 'runtimepath' and below: > +--- 3584,3602 ---- + trailing backslash, remove it if you put a comma after it. + If the expansion fails for one of the directories, there is no + error message. +! +! Unless the optional {nosuf} argument is given and is non-zero, + the 'suffixes' and 'wildignore' options apply: Names matching + one of the patterns in 'wildignore' will be skipped and + 'suffixes' affect the ordering of matches. + ++ When {list} is present and it is non-zero the result is a List ++ with all matching files. The advantage of using a List is, you ++ also get filenames containing newlines correctly. Otherwise ++ the result is a String and when there are several matches, ++ they are separated by <NL> characters. Example: > ++ :echo globpath(&rtp, "syntax/c.vim", 0, 1) ++ < + The "**" item can be used to search in a directory tree. + For example, to find all "README.txt" files in the directories + in 'runtimepath' and below: > +*** ../vim-7.4.278/src/eval.c 2014-05-07 17:31:32.473182497 +0200 +--- src/eval.c 2014-05-07 18:06:29.541200854 +0200 +*************** +*** 7985,7991 **** + {"getwinposy", 0, 0, f_getwinposy}, + {"getwinvar", 2, 3, f_getwinvar}, + {"glob", 1, 3, f_glob}, +! {"globpath", 2, 3, f_globpath}, + {"has", 1, 1, f_has}, + {"has_key", 2, 2, f_has_key}, + {"haslocaldir", 0, 0, f_haslocaldir}, +--- 7985,7991 ---- + {"getwinposy", 0, 0, f_getwinposy}, + {"getwinvar", 2, 3, f_getwinvar}, + {"glob", 1, 3, f_glob}, +! {"globpath", 2, 4, f_globpath}, + {"has", 1, 1, f_has}, + {"has_key", 2, 2, f_has_key}, + {"haslocaldir", 0, 0, f_haslocaldir}, +*************** +*** 12151,12168 **** + char_u buf1[NUMBUFLEN]; + char_u *file = get_tv_string_buf_chk(&argvars[1], buf1); + int error = FALSE; + + /* When the optional second argument is non-zero, don't remove matches + * for 'wildignore' and don't put matches for 'suffixes' at the end. */ +- if (argvars[2].v_type != VAR_UNKNOWN +- && get_tv_number_chk(&argvars[2], &error)) +- flags |= WILD_KEEP_ALL; + rettv->v_type = VAR_STRING; +! if (file == NULL || error) +! rettv->vval.v_string = NULL; + else +! rettv->vval.v_string = globpath(get_tv_string(&argvars[0]), file, +! flags); + } + + /* +--- 12151,12187 ---- + char_u buf1[NUMBUFLEN]; + char_u *file = get_tv_string_buf_chk(&argvars[1], buf1); + int error = FALSE; ++ garray_T ga; ++ int i; + + /* When the optional second argument is non-zero, don't remove matches + * for 'wildignore' and don't put matches for 'suffixes' at the end. */ + rettv->v_type = VAR_STRING; +! if (argvars[2].v_type != VAR_UNKNOWN) +! { +! if (get_tv_number_chk(&argvars[2], &error)) +! flags |= WILD_KEEP_ALL; +! if (argvars[3].v_type != VAR_UNKNOWN +! && get_tv_number_chk(&argvars[3], &error)) +! { +! rettv->v_type = VAR_LIST; +! rettv->vval.v_list = NULL; +! } +! } +! if (file != NULL && !error) +! { +! ga_init2(&ga, (int)sizeof(char_u *), 10); +! globpath(get_tv_string(&argvars[0]), file, &ga, flags); +! if (rettv->v_type == VAR_STRING) +! rettv->vval.v_string = ga_concat_strings(&ga, "\n"); +! else if (rettv_list_alloc(rettv) != FAIL) +! for (i = 0; i < ga.ga_len; ++i) +! list_append_string(rettv->vval.v_list, +! ((char_u **)(ga.ga_data))[i], -1); +! ga_clear_strings(&ga); +! } + else +! rettv->vval.v_string = NULL; + } + + /* +*** ../vim-7.4.278/src/ex_getln.c 2013-11-12 05:28:08.000000000 +0100 +--- src/ex_getln.c 2014-05-07 18:11:49.281203653 +0200 +*************** +*** 5095,5103 **** + char_u ***file; + char *dirnames[]; + { +- char_u *matches; + char_u *s; + char_u *e; + garray_T ga; + int i; + int pat_len; +--- 5095,5103 ---- + char_u ***file; + char *dirnames[]; + { + char_u *s; + char_u *e; ++ char_u *match; + garray_T ga; + int i; + int pat_len; +*************** +*** 5116,5148 **** + return FAIL; + } + sprintf((char *)s, "%s/%s*.vim", dirnames[i], pat); +! matches = globpath(p_rtp, s, 0); + vim_free(s); +! if (matches == NULL) +! continue; + +! for (s = matches; *s != NUL; s = e) + { +! e = vim_strchr(s, '\n'); +! if (e == NULL) +! e = s + STRLEN(s); +! if (ga_grow(&ga, 1) == FAIL) +! break; +! if (e - 4 > s && STRNICMP(e - 4, ".vim", 4) == 0) +! { +! for (s = e - 4; s > matches; mb_ptr_back(matches, s)) +! if (*s == '\n' || vim_ispathsep(*s)) +! break; +! ++s; +! ((char_u **)ga.ga_data)[ga.ga_len] = +! vim_strnsave(s, (int)(e - s - 4)); +! ++ga.ga_len; +! } +! if (*e != NUL) +! ++e; + } +- vim_free(matches); + } + if (ga.ga_len == 0) + return FAIL; + +--- 5116,5142 ---- + return FAIL; + } + sprintf((char *)s, "%s/%s*.vim", dirnames[i], pat); +! globpath(p_rtp, s, &ga, 0); + vim_free(s); +! } + +! for (i = 0; i < ga.ga_len; ++i) +! { +! match = ((char_u **)ga.ga_data)[i]; +! s = match; +! e = s + STRLEN(s); +! if (e - 4 > s && STRNICMP(e - 4, ".vim", 4) == 0) + { +! e -= 4; +! for (s = e; s > match; mb_ptr_back(match, s)) +! if (s < match || vim_ispathsep(*s)) +! break; +! ++s; +! *e = NUL; +! mch_memmove(match, s, e - s + 1); + } + } ++ + if (ga.ga_len == 0) + return FAIL; + +*************** +*** 5160,5192 **** + #if defined(FEAT_CMDL_COMPL) || defined(FEAT_EVAL) || defined(PROTO) + /* + * Expand "file" for all comma-separated directories in "path". +! * Returns an allocated string with all matches concatenated, separated by +! * newlines. Returns NULL for an error or no matches. + */ +! char_u * +! globpath(path, file, expand_options) + char_u *path; + char_u *file; + int expand_options; + { + expand_T xpc; + char_u *buf; +- garray_T ga; + int i; +- int len; + int num_p; + char_u **p; +- char_u *cur = NULL; + + buf = alloc(MAXPATHL); + if (buf == NULL) +! return NULL; + + ExpandInit(&xpc); + xpc.xp_context = EXPAND_FILES; + +- ga_init2(&ga, 1, 100); +- + /* Loop over all entries in {path}. */ + while (*path != NUL) + { +--- 5154,5181 ---- + #if defined(FEAT_CMDL_COMPL) || defined(FEAT_EVAL) || defined(PROTO) + /* + * Expand "file" for all comma-separated directories in "path". +! * Adds the matches to "ga". Caller must init "ga". + */ +! void +! globpath(path, file, ga, expand_options) + char_u *path; + char_u *file; ++ garray_T *ga; + int expand_options; + { + expand_T xpc; + char_u *buf; + int i; + int num_p; + char_u **p; + + buf = alloc(MAXPATHL); + if (buf == NULL) +! return; + + ExpandInit(&xpc); + xpc.xp_context = EXPAND_FILES; + + /* Loop over all entries in {path}. */ + while (*path != NUL) + { +*************** +*** 5207,5236 **** + WILD_SILENT|expand_options) != FAIL && num_p > 0) + { + ExpandEscape(&xpc, buf, num_p, p, WILD_SILENT|expand_options); +- for (len = 0, i = 0; i < num_p; ++i) +- len += (int)STRLEN(p[i]) + 1; + +! /* Concatenate new results to previous ones. */ +! if (ga_grow(&ga, len) == OK) + { +- cur = (char_u *)ga.ga_data + ga.ga_len; + for (i = 0; i < num_p; ++i) + { +! STRCPY(cur, p[i]); +! cur += STRLEN(p[i]); +! *cur++ = '\n'; + } +- ga.ga_len += len; + } + FreeWild(num_p, p); + } + } + } +- if (cur != NULL) +- *--cur = 0; /* Replace trailing newline with NUL */ + + vim_free(buf); +- return (char_u *)ga.ga_data; + } + + #endif +--- 5196,5218 ---- + WILD_SILENT|expand_options) != FAIL && num_p > 0) + { + ExpandEscape(&xpc, buf, num_p, p, WILD_SILENT|expand_options); + +! if (ga_grow(ga, num_p) == OK) + { + for (i = 0; i < num_p; ++i) + { +! ((char_u **)ga->ga_data)[ga->ga_len] = +! vim_strnsave(p[i], STRLEN(p[i])); +! ++ga->ga_len; + } + } ++ + FreeWild(num_p, p); + } + } + } + + vim_free(buf); + } + + #endif +*** ../vim-7.4.278/src/misc1.c 2014-05-07 15:10:17.657108310 +0200 +--- src/misc1.c 2014-05-07 17:46:30.269190356 +0200 +*************** +*** 10336,10344 **** + { + char_u *curdir; + garray_T path_ga; +- char_u *files = NULL; +- char_u *s; /* start */ +- char_u *e; /* end */ + char_u *paths = NULL; + + if ((curdir = alloc((unsigned)MAXPATHL)) == NULL) +--- 10336,10341 ---- +*************** +*** 10351,10387 **** + if (path_ga.ga_len == 0) + return 0; + +! paths = ga_concat_strings(&path_ga); + ga_clear_strings(&path_ga); + if (paths == NULL) + return 0; + +! files = globpath(paths, pattern, (flags & EW_ICASE) ? WILD_ICASE : 0); + vim_free(paths); +- if (files == NULL) +- return 0; +- +- /* Copy each path in files into gap */ +- s = e = files; +- while (*s != NUL) +- { +- while (*e != '\n' && *e != NUL) +- e++; +- if (*e == NUL) +- { +- addfile(gap, s, flags); +- break; +- } +- else +- { +- /* *e is '\n' */ +- *e = NUL; +- addfile(gap, s, flags); +- e++; +- s = e; +- } +- } +- vim_free(files); + + return gap->ga_len; + } +--- 10348,10360 ---- + if (path_ga.ga_len == 0) + return 0; + +! paths = ga_concat_strings(&path_ga, ","); + ga_clear_strings(&path_ga); + if (paths == NULL) + return 0; + +! globpath(paths, pattern, gap, (flags & EW_ICASE) ? WILD_ICASE : 0); + vim_free(paths); + + return gap->ga_len; + } +*** ../vim-7.4.278/src/misc2.c 2014-03-23 15:12:29.927264336 +0100 +--- src/misc2.c 2014-05-07 18:34:37.689215632 +0200 +*************** +*** 2087,2115 **** + + /* + * For a growing array that contains a list of strings: concatenate all the +! * strings with a separating comma. + * Returns NULL when out of memory. + */ + char_u * +! ga_concat_strings(gap) + garray_T *gap; + { + int i; + int len = 0; + char_u *s; + + for (i = 0; i < gap->ga_len; ++i) +! len += (int)STRLEN(((char_u **)(gap->ga_data))[i]) + 1; + + s = alloc(len + 1); + if (s != NULL) + { + *s = NUL; + for (i = 0; i < gap->ga_len; ++i) + { +! if (*s != NUL) +! STRCAT(s, ","); +! STRCAT(s, ((char_u **)(gap->ga_data))[i]); + } + } + return s; +--- 2087,2123 ---- + + /* + * For a growing array that contains a list of strings: concatenate all the +! * strings with a separating "sep". + * Returns NULL when out of memory. + */ + char_u * +! ga_concat_strings(gap, sep) + garray_T *gap; ++ char *sep; + { + int i; + int len = 0; ++ int sep_len = (int)STRLEN(sep); + char_u *s; ++ char_u *p; + + for (i = 0; i < gap->ga_len; ++i) +! len += (int)STRLEN(((char_u **)(gap->ga_data))[i]) + sep_len; + + s = alloc(len + 1); + if (s != NULL) + { + *s = NUL; ++ p = s; + for (i = 0; i < gap->ga_len; ++i) + { +! if (p != s) +! { +! STRCPY(p, sep); +! p += sep_len; +! } +! STRCPY(p, ((char_u **)(gap->ga_data))[i]); +! p += STRLEN(p); + } + } + return s; +*** ../vim-7.4.278/src/proto/ex_getln.pro 2013-08-10 13:37:11.000000000 +0200 +--- src/proto/ex_getln.pro 2014-05-07 17:52:42.457193614 +0200 +*************** +*** 32,38 **** + void set_cmd_context __ARGS((expand_T *xp, char_u *str, int len, int col)); + int expand_cmdline __ARGS((expand_T *xp, char_u *str, int col, int *matchcount, char_u ***matches)); + int ExpandGeneric __ARGS((expand_T *xp, regmatch_T *regmatch, int *num_file, char_u ***file, char_u *((*func)(expand_T *, int)), int escaped)); +! char_u *globpath __ARGS((char_u *path, char_u *file, int expand_options)); + void init_history __ARGS((void)); + int get_histtype __ARGS((char_u *name)); + void add_to_history __ARGS((int histype, char_u *new_entry, int in_map, int sep)); +--- 32,38 ---- + void set_cmd_context __ARGS((expand_T *xp, char_u *str, int len, int col)); + int expand_cmdline __ARGS((expand_T *xp, char_u *str, int col, int *matchcount, char_u ***matches)); + int ExpandGeneric __ARGS((expand_T *xp, regmatch_T *regmatch, int *num_file, char_u ***file, char_u *((*func)(expand_T *, int)), int escaped)); +! void globpath __ARGS((char_u *path, char_u *file, garray_T *ga, int expand_options)); + void init_history __ARGS((void)); + int get_histtype __ARGS((char_u *name)); + void add_to_history __ARGS((int histype, char_u *new_entry, int in_map, int sep)); +*** ../vim-7.4.278/src/proto/misc2.pro 2014-02-23 23:38:58.828760280 +0100 +--- src/proto/misc2.pro 2014-05-07 17:52:36.189193559 +0200 +*************** +*** 55,61 **** + void ga_init __ARGS((garray_T *gap)); + void ga_init2 __ARGS((garray_T *gap, int itemsize, int growsize)); + int ga_grow __ARGS((garray_T *gap, int n)); +! char_u *ga_concat_strings __ARGS((garray_T *gap)); + void ga_concat __ARGS((garray_T *gap, char_u *s)); + void ga_append __ARGS((garray_T *gap, int c)); + void append_ga_line __ARGS((garray_T *gap)); +--- 55,61 ---- + void ga_init __ARGS((garray_T *gap)); + void ga_init2 __ARGS((garray_T *gap, int itemsize, int growsize)); + int ga_grow __ARGS((garray_T *gap, int n)); +! char_u *ga_concat_strings __ARGS((garray_T *gap, char *sep)); + void ga_concat __ARGS((garray_T *gap, char_u *s)); + void ga_append __ARGS((garray_T *gap, int c)); + void append_ga_line __ARGS((garray_T *gap)); +*** ../vim-7.4.278/src/testdir/test97.in 2013-08-02 14:55:50.000000000 +0200 +--- src/testdir/test97.in 2014-05-07 18:27:59.213212144 +0200 +*************** +*** 5,16 **** + :so small.vim + :set shell=doesnotexist + :e test.out +! :put =glob('Xxx\{') +! :put =glob('Xxx\$') + :w! Xxx{ + :w! Xxx\$ +! :put =glob('Xxx\{') +! :put =glob('Xxx\$') + :w + :qa! + ENDTEST +--- 5,19 ---- + :so small.vim + :set shell=doesnotexist + :e test.out +! :$put =glob('Xxx\{') +! :$put =glob('Xxx\$') + :w! Xxx{ + :w! Xxx\$ +! :$put =glob('Xxx\{') +! :$put =glob('Xxx\$') +! :" +! :$put =string(globpath('sautest/autoload', '*.vim')) +! :$put =string(globpath('sautest/autoload', '*.vim', 0, 1)) + :w + :qa! + ENDTEST +*** ../vim-7.4.278/src/testdir/test97.ok 2013-07-03 16:14:50.000000000 +0200 +--- src/testdir/test97.ok 2014-05-07 18:28:01.985212168 +0200 +*************** +*** 3,5 **** +--- 3,8 ---- + + Xxx{ + Xxx$ ++ 'sautest/autoload/Test104.vim ++ sautest/autoload/footest.vim' ++ ['sautest/autoload/Test104.vim', 'sautest/autoload/footest.vim'] +*** ../vim-7.4.278/src/version.c 2014-05-07 17:31:32.473182497 +0200 +--- src/version.c 2014-05-07 17:35:06.253184368 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 279, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +121. You ask for e-mail adresses instead of telephone numbers. + + /// 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/patches/source/vim/patches/7.4.280 b/patches/source/vim/patches/7.4.280 new file mode 100644 index 000000000..6b392df0d --- /dev/null +++ b/patches/source/vim/patches/7.4.280 @@ -0,0 +1,125 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.280 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.280 +Problem: When using a session file the relative position of the cursor is + not restored if there is another tab. (Nobuhiro Takasaki) +Solution: Update w_wrow before calculating the fraction. +Files: src/window.c + + +*** ../vim-7.4.279/src/window.c 2014-03-23 15:12:29.943264337 +0100 +--- src/window.c 2014-05-07 20:18:55.237270409 +0200 +*************** +*** 5623,5629 **** + win_T *wp; + { + wp->w_fraction = ((long)wp->w_wrow * FRACTION_MULT +! + FRACTION_MULT / 2) / (long)wp->w_height; + } + + /* +--- 5623,5629 ---- + win_T *wp; + { + wp->w_fraction = ((long)wp->w_wrow * FRACTION_MULT +! + wp->w_height / 2) / (long)wp->w_height; + } + + /* +*************** +*** 5638,5643 **** +--- 5638,5644 ---- + { + linenr_T lnum; + int sline, line_size; ++ int prev_height = wp->w_height; + + /* Don't want a negative height. Happens when splitting a tiny window. + * Will equalize heights soon to fix it. */ +*************** +*** 5646,5653 **** + if (wp->w_height == height) + return; /* nothing to do */ + +! if (wp->w_wrow != wp->w_prev_fraction_row && wp->w_height > 0) +! set_fraction(wp); + + wp->w_height = height; + wp->w_skipcol = 0; +--- 5647,5659 ---- + if (wp->w_height == height) + return; /* nothing to do */ + +! if (wp->w_height > 0) +! { +! if (wp == curwin) +! validate_cursor(); /* w_wrow needs to be valid */ +! if (wp->w_wrow != wp->w_prev_fraction_row) +! set_fraction(wp); +! } + + wp->w_height = height; + wp->w_skipcol = 0; +*************** +*** 5667,5673 **** + lnum = wp->w_cursor.lnum; + if (lnum < 1) /* can happen when starting up */ + lnum = 1; +! wp->w_wrow = ((long)wp->w_fraction * (long)height - 1L) / FRACTION_MULT; + line_size = plines_win_col(wp, lnum, (long)(wp->w_cursor.col)) - 1; + sline = wp->w_wrow - line_size; + +--- 5673,5680 ---- + lnum = wp->w_cursor.lnum; + if (lnum < 1) /* can happen when starting up */ + lnum = 1; +! wp->w_wrow = ((long)wp->w_fraction * (long)height - 1L +! + FRACTION_MULT / 2) / FRACTION_MULT; + line_size = plines_win_col(wp, lnum, (long)(wp->w_cursor.col)) - 1; + sline = wp->w_wrow - line_size; + +*************** +*** 5757,5763 **** + update_topline(); + curs_columns(FALSE); /* validate w_wrow */ + } +! wp->w_prev_fraction_row = wp->w_wrow; + + win_comp_scroll(wp); + redraw_win_later(wp, SOME_VALID); +--- 5764,5771 ---- + update_topline(); + curs_columns(FALSE); /* validate w_wrow */ + } +! if (prev_height > 0) +! wp->w_prev_fraction_row = wp->w_wrow; + + win_comp_scroll(wp); + redraw_win_later(wp, SOME_VALID); +*** ../vim-7.4.279/src/version.c 2014-05-07 18:35:25.669216052 +0200 +--- src/version.c 2014-05-07 20:24:14.313273202 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 280, + /**/ + +-- +~ +~ +~ +".signature" 4 lines, 50 characters written + + /// 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/patches/source/vim/patches/7.4.281 b/patches/source/vim/patches/7.4.281 new file mode 100644 index 000000000..6c6765ab4 --- /dev/null +++ b/patches/source/vim/patches/7.4.281 @@ -0,0 +1,80 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.281 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.281 +Problem: When a session file has more than one tabpage and 'showtabline' is + one the positions may be slightly off. +Solution: Set 'showtabline' to two while positioning windows. +Files: src/ex_docmd.c + + +*** ../vim-7.4.280/src/ex_docmd.c 2014-04-29 12:15:22.856032651 +0200 +--- src/ex_docmd.c 2014-05-07 21:07:56.249296154 +0200 +*************** +*** 10290,10295 **** +--- 10290,10296 ---- + char_u *sname; + win_T *edited_win = NULL; + int tabnr; ++ int restore_stal = FALSE; + win_T *tab_firstwin; + frame_T *tab_topframe; + int cur_arg_idx = 0; +*************** +*** 10399,10404 **** +--- 10400,10418 ---- + #endif + + /* ++ * When there are two or more tabpages and 'showtabline' is 1 the tabline ++ * will be displayed when creating the next tab. That resizes the windows ++ * in the first tab, which may cause problems. Set 'showtabline' to 2 ++ * temporarily to avoid that. ++ */ ++ if (p_stal == 1 && first_tabpage->tp_next != NULL) ++ { ++ if (put_line(fd, "set stal=2") == FAIL) ++ return FAIL; ++ restore_stal = TRUE; ++ } ++ ++ /* + * May repeat putting Windows for each tab, when "tabpages" is in + * 'sessionoptions'. + * Don't use goto_tabpage(), it may change directory and trigger +*************** +*** 10548,10553 **** +--- 10562,10569 ---- + || put_eol(fd) == FAIL) + return FAIL; + } ++ if (restore_stal && put_line(fd, "set stal=1") == FAIL) ++ return FAIL; + + /* + * Wipe out an empty unnamed buffer we started in. +*** ../vim-7.4.280/src/version.c 2014-05-07 20:25:30.845273872 +0200 +--- src/version.c 2014-05-07 21:11:24.925297981 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 281, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +122. You ask if the Netaholics Anonymous t-shirt you ordered can be + sent to you via 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/patches/source/vim/patches/7.4.282 b/patches/source/vim/patches/7.4.282 new file mode 100644 index 000000000..5ee4e8d22 --- /dev/null +++ b/patches/source/vim/patches/7.4.282 @@ -0,0 +1,48 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.282 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.282 (after 7.4.279) +Problem: Test 97 fails on Mac. +Solution: Do not ignore case in file names. (Jun Takimoto) +Files: src/testdir/test97.in + + +*** ../vim-7.4.281/src/testdir/test97.in 2014-05-07 18:35:25.669216052 +0200 +--- src/testdir/test97.in 2014-05-08 11:42:37.701755565 +0200 +*************** +*** 3,9 **** +--- 3,12 ---- + + STARTTEST + :so small.vim ++ :" make sure glob() doesn't use the shell + :set shell=doesnotexist ++ :" consistent sorting of file names ++ :set nofileignorecase + :e test.out + :$put =glob('Xxx\{') + :$put =glob('Xxx\$') +*** ../vim-7.4.281/src/version.c 2014-05-07 21:14:42.913299714 +0200 +--- src/version.c 2014-05-08 11:46:04.825757378 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 282, + /**/ + +-- +Would you care for a drink? I mean, if it were, like, +disabled and you had to look after it? + + /// 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/patches/source/vim/patches/7.4.283 b/patches/source/vim/patches/7.4.283 new file mode 100644 index 000000000..213847035 --- /dev/null +++ b/patches/source/vim/patches/7.4.283 @@ -0,0 +1,56 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.283 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.283 (after 7.4.276) +Problem: Compiler warning about unused variable. (Charles Cooper) +Solution: Move the variable inside the #if block. +Files: src/ex_cmds.c + + +*** ../vim-7.4.282/src/ex_cmds.c 2014-05-07 15:10:17.657108310 +0200 +--- src/ex_cmds.c 2014-05-09 20:31:16.414789550 +0200 +*************** +*** 1551,1559 **** + { + char_u *buf; + long_u len; +- int is_fish_shell; + + #if (defined(UNIX) && !defined(ARCHIE)) || defined(OS2) + /* Account for fish's different syntax for subshells */ + is_fish_shell = (fnamecmp(get_isolated_shell_name(), "fish") == 0); + if (is_fish_shell) +--- 1551,1560 ---- + { + char_u *buf; + long_u len; + + #if (defined(UNIX) && !defined(ARCHIE)) || defined(OS2) ++ int is_fish_shell; ++ + /* Account for fish's different syntax for subshells */ + is_fish_shell = (fnamecmp(get_isolated_shell_name(), "fish") == 0); + if (is_fish_shell) +*** ../vim-7.4.282/src/version.c 2014-05-08 11:46:23.621757543 +0200 +--- src/version.c 2014-05-09 20:32:06.538789989 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 283, + /**/ + +-- +Don't drink and drive. You might hit a bump and spill your 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/patches/source/vim/patches/7.4.284 b/patches/source/vim/patches/7.4.284 new file mode 100644 index 000000000..0c9781eb9 --- /dev/null +++ b/patches/source/vim/patches/7.4.284 @@ -0,0 +1,53 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.284 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.284 +Problem: Setting 'langmap' in the modeline can cause trouble. E.g. mapping + ":" breaks many commands. (Jens-Wolfhard Schicke-Uffmann) +Solution: Disallow setting 'langmap' from the modeline. +Files: src/option.c + + +*** ../vim-7.4.283/src/option.c 2014-05-07 15:10:17.661108310 +0200 +--- src/option.c 2014-05-13 12:11:39.677552445 +0200 +*************** +*** 1652,1658 **** + #endif + #endif + (char_u *)0L} SCRIPTID_INIT}, +! {"langmap", "lmap", P_STRING|P_VI_DEF|P_COMMA|P_NODUP, + #ifdef FEAT_LANGMAP + (char_u *)&p_langmap, PV_NONE, + {(char_u *)"", /* unmatched } */ +--- 1652,1658 ---- + #endif + #endif + (char_u *)0L} SCRIPTID_INIT}, +! {"langmap", "lmap", P_STRING|P_VI_DEF|P_COMMA|P_NODUP|P_SECURE, + #ifdef FEAT_LANGMAP + (char_u *)&p_langmap, PV_NONE, + {(char_u *)"", /* unmatched } */ +*** ../vim-7.4.283/src/version.c 2014-05-09 20:33:01.102790466 +0200 +--- src/version.c 2014-05-13 12:12:21.273552809 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 284, + /**/ + +-- +We are the Borg of GNU GPL. We will assimilate your source code. +Resistance is futile. + + /// 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/patches/source/vim/patches/7.4.285 b/patches/source/vim/patches/7.4.285 new file mode 100644 index 000000000..2d3862dab --- /dev/null +++ b/patches/source/vim/patches/7.4.285 @@ -0,0 +1,49 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.285 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.285 +Problem: When 'relativenumber' is set and deleting lines or undoing that, + line numbers are not always updated. (Robert Arkwright) +Solution: (Christian Brabandt) +Files: src/misc1.c + + +*** ../vim-7.4.284/src/misc1.c 2014-05-07 18:35:25.669216052 +0200 +--- src/misc1.c 2014-05-13 12:41:56.357568348 +0200 +*************** +*** 3125,3130 **** +--- 3125,3133 ---- + if (hasAnyFolding(wp)) + set_topline(wp, wp->w_topline); + #endif ++ /* relative numbering may require updating more */ ++ if (wp->w_p_rnu) ++ redraw_win_later(wp, SOME_VALID); + } + } + +*** ../vim-7.4.284/src/version.c 2014-05-13 12:16:44.037555110 +0200 +--- src/version.c 2014-05-13 12:33:21.553563842 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 285, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +148. You find it easier to dial-up the National Weather Service + Weather/your_town/now.html than to simply look out the 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/patches/source/vim/patches/7.4.286 b/patches/source/vim/patches/7.4.286 new file mode 100644 index 000000000..9c60ec003 --- /dev/null +++ b/patches/source/vim/patches/7.4.286 @@ -0,0 +1,52 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.286 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.286 +Problem: Error messages are inconsistant. (ZyX) +Solution: Change "Lists" to "list". +Files: src/eval.c + + +*** ../vim-7.4.285/src/eval.c 2014-05-07 18:35:25.665216052 +0200 +--- src/eval.c 2014-05-13 13:37:47.349597682 +0200 +*************** +*** 4431,4437 **** + if (rettv->v_type != var2.v_type) + EMSG(_("E691: Can only compare List with List")); + else +! EMSG(_("E692: Invalid operation for Lists")); + clear_tv(rettv); + clear_tv(&var2); + return FAIL; +--- 4431,4437 ---- + if (rettv->v_type != var2.v_type) + EMSG(_("E691: Can only compare List with List")); + else +! EMSG(_("E692: Invalid operation for List")); + clear_tv(rettv); + clear_tv(&var2); + return FAIL; +*** ../vim-7.4.285/src/version.c 2014-05-13 12:44:19.897569605 +0200 +--- src/version.c 2014-05-13 13:31:23.393594321 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 286, + /**/ + +-- +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/patches/source/vim/patches/7.4.287 b/patches/source/vim/patches/7.4.287 new file mode 100644 index 000000000..1288981cc --- /dev/null +++ b/patches/source/vim/patches/7.4.287 @@ -0,0 +1,47 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.287 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.287 +Problem: Patches for .hgignore don't work, since the file is not in the + distribution. +Solution: Add .hgignore to the distribution. Will be effective with the + next version. +Files: Filelist + + +*** ../vim-7.4.286/Filelist 2014-04-29 14:02:42.547919791 +0200 +--- Filelist 2014-05-13 13:50:01.669604110 +0200 +*************** +*** 3,8 **** +--- 3,9 ---- + + # source files for all source archives + SRC_ALL = \ ++ .hgignore \ + src/README.txt \ + src/arabic.c \ + src/arabic.h \ +*** ../vim-7.4.286/src/version.c 2014-05-13 13:46:30.597602262 +0200 +--- src/version.c 2014-05-13 13:51:38.101604954 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 287, + /**/ + +-- +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/patches/source/vim/patches/7.4.288 b/patches/source/vim/patches/7.4.288 new file mode 100644 index 000000000..a1fd18204 --- /dev/null +++ b/patches/source/vim/patches/7.4.288 @@ -0,0 +1,46 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.288 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.288 +Problem: When 'spellfile' is set the screen is not redrawn. +Solution: Redraw when updating the spelling info. (Christian Brabandt) +Files: src/spell.c + + +*** ../vim-7.4.287/src/spell.c 2014-03-23 15:12:29.939264336 +0100 +--- src/spell.c 2014-05-13 14:01:59.165610391 +0200 +*************** +*** 4508,4513 **** +--- 4508,4514 ---- + theend: + vim_free(spl_copy); + recursive = FALSE; ++ redraw_win_later(wp, NOT_VALID); + return ret_msg; + } + +*** ../vim-7.4.287/src/version.c 2014-05-13 13:52:34.821605451 +0200 +--- src/version.c 2014-05-13 13:55:26.865606957 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 288, + /**/ + +-- +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/patches/source/vim/patches/7.4.289 b/patches/source/vim/patches/7.4.289 new file mode 100644 index 000000000..e62ce146a --- /dev/null +++ b/patches/source/vim/patches/7.4.289 @@ -0,0 +1,122 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.289 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.289 +Problem: Pattern with repeated backreference does not match with new regexp + engine. (Urtica Dioica) +Solution: Also check the end of a submatch when deciding to put a state in + the state list. +Files: src/testdir/test64.in, src/testdir/test64.ok, src/regexp_nfa.c + + +*** ../vim-7.4.288/src/testdir/test64.in 2013-11-21 17:12:55.000000000 +0100 +--- src/testdir/test64.in 2014-05-13 15:35:02.477659266 +0200 +*************** +*** 407,412 **** +--- 407,413 ---- + :call add(tl, [2, '^.*\.\(.*\)/.\+\(\1\)\@<=$', 'foo.bat/foo.bat', 'foo.bat/foo.bat', 'bat', 'bat']) + :call add(tl, [2, '\\\@<!\${\(\d\+\%(:.\{-}\)\?\\\@<!\)}', '2013-06-27${0}', '${0}', '0']) + :call add(tl, [2, '^\(a*\)\1$', 'aaaaaaaa', 'aaaaaaaa', 'aaaa']) ++ :call add(tl, [2, '^\(a\{-2,}\)\1\+$', 'aaaaaaaaa', 'aaaaaaaaa', 'aaa']) + :" + :"""" Look-behind with limit + :call add(tl, [2, '<\@<=span.', 'xxspanxx<spanyyy', 'spany']) +*** ../vim-7.4.288/src/testdir/test64.ok 2013-11-21 17:12:55.000000000 +0100 +--- src/testdir/test64.ok 2014-05-13 15:49:21.381666784 +0200 +*************** +*** 947,952 **** +--- 947,955 ---- + OK 0 - ^\(a*\)\1$ + OK 1 - ^\(a*\)\1$ + OK 2 - ^\(a*\)\1$ ++ OK 0 - ^\(a\{-2,}\)\1\+$ ++ OK 1 - ^\(a\{-2,}\)\1\+$ ++ OK 2 - ^\(a\{-2,}\)\1\+$ + OK 0 - <\@<=span. + OK 1 - <\@<=span. + OK 2 - <\@<=span. +*** ../vim-7.4.288/src/regexp_nfa.c 2014-04-23 19:06:33.702828771 +0200 +--- src/regexp_nfa.c 2014-05-13 15:49:15.065666729 +0200 +*************** +*** 3945,3950 **** +--- 3945,3951 ---- + + /* + * Return TRUE if "sub1" and "sub2" have the same start positions. ++ * When using back-references also check the end position. + */ + static int + sub_equal(sub1, sub2) +*************** +*** 3976,3981 **** +--- 3977,3999 ---- + if (s1 != -1 && sub1->list.multi[i].start.col + != sub2->list.multi[i].start.col) + return FALSE; ++ ++ if (nfa_has_backref) ++ { ++ if (i < sub1->in_use) ++ s1 = sub1->list.multi[i].end.lnum; ++ else ++ s1 = -1; ++ if (i < sub2->in_use) ++ s2 = sub2->list.multi[i].end.lnum; ++ else ++ s2 = -1; ++ if (s1 != s2) ++ return FALSE; ++ if (s1 != -1 && sub1->list.multi[i].end.col ++ != sub2->list.multi[i].end.col) ++ return FALSE; ++ } + } + } + else +*************** +*** 3992,3997 **** +--- 4010,4028 ---- + sp2 = NULL; + if (sp1 != sp2) + return FALSE; ++ if (nfa_has_backref) ++ { ++ if (i < sub1->in_use) ++ sp1 = sub1->list.line[i].end; ++ else ++ sp1 = NULL; ++ if (i < sub2->in_use) ++ sp2 = sub2->list.line[i].end; ++ else ++ sp2 = NULL; ++ if (sp1 != sp2) ++ return FALSE; ++ } + } + } + +*** ../vim-7.4.288/src/version.c 2014-05-13 14:03:36.425611242 +0200 +--- src/version.c 2014-05-13 15:51:52.009668103 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 289, + /**/ + +-- +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/patches/source/vim/patches/7.4.290 b/patches/source/vim/patches/7.4.290 new file mode 100644 index 000000000..e2e1e62bb --- /dev/null +++ b/patches/source/vim/patches/7.4.290 @@ -0,0 +1,156 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.290 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.290 +Problem: A non-greedy match followed by a branch is too greedy. (Ingo + Karkat) +Solution: Add NFA_MATCH when it is already in the state list if the position + differs. +Files: src/testdir/test64.in, src/testdir/test64.ok, src/regexp_nfa.c + + +*** ../vim-7.4.289/src/testdir/test64.in 2014-05-13 15:56:45.017670668 +0200 +--- src/testdir/test64.in 2014-05-13 16:15:57.213680754 +0200 +*************** +*** 238,244 **** + :call add(tl, [2, '\vx(.{-,8})yz(.*)','xayxayzxayzxayz','xayxayzxayzxayz','ayxa','xayzxayz']) + :call add(tl, [2, '\vx(.*)yz(.*)','xayxayzxayzxayz','xayxayzxayzxayz', 'ayxayzxayzxa','']) + :call add(tl, [2, '\v(a{1,2}){-2,3}','aaaaaaa','aaaa','aa']) +! :call add(tl, [2, '\v(a{-1,3})+','aa','aa','a']) + :" + :" Test Character classes + :call add(tl, [2, '\d\+e\d\d','test 10e23 fd','10e23']) +--- 238,248 ---- + :call add(tl, [2, '\vx(.{-,8})yz(.*)','xayxayzxayzxayz','xayxayzxayzxayz','ayxa','xayzxayz']) + :call add(tl, [2, '\vx(.*)yz(.*)','xayxayzxayzxayz','xayxayzxayzxayz', 'ayxayzxayzxa','']) + :call add(tl, [2, '\v(a{1,2}){-2,3}','aaaaaaa','aaaa','aa']) +! :call add(tl, [2, '\v(a{-1,3})+', 'aa', 'aa', 'a']) +! :call add(tl, [2, '^\s\{-}\zs\( x\|x$\)', ' x', ' x', ' x']) +! :call add(tl, [2, '^\s\{-}\zs\(x\| x$\)', ' x', ' x', ' x']) +! :call add(tl, [2, '^\s\{-}\ze\(x\| x$\)', ' x', '', ' x']) +! :call add(tl, [2, '^\(\s\{-}\)\(x\| x$\)', ' x', ' x', '', ' x']) + :" + :" Test Character classes + :call add(tl, [2, '\d\+e\d\d','test 10e23 fd','10e23']) +*************** +*** 462,476 **** + : try + : let l = matchlist(text, pat) + : catch +! : $put ='ERROR: pat: \"' . pat . '\", text: \"' . text . '\", caused an exception: \"' . v:exception . '\"' + : endtry + :" check the match itself + : if len(l) == 0 && len(t) > matchidx +! : $put ='ERROR: pat: \"' . pat . '\", text: \"' . text . '\", did not match, expected: \"' . t[matchidx] . '\"' + : elseif len(l) > 0 && len(t) == matchidx +! : $put ='ERROR: pat: \"' . pat . '\", text: \"' . text . '\", match: \"' . l[0] . '\", expected no match' + : elseif len(t) > matchidx && l[0] != t[matchidx] +! : $put ='ERROR: pat: \"' . pat . '\", text: \"' . text . '\", match: \"' . l[0] . '\", expected: \"' . t[matchidx] . '\"' + : else + : $put ='OK ' . engine . ' - ' . pat + : endif +--- 466,480 ---- + : try + : let l = matchlist(text, pat) + : catch +! : $put ='ERROR ' . engine . ': pat: \"' . pat . '\", text: \"' . text . '\", caused an exception: \"' . v:exception . '\"' + : endtry + :" check the match itself + : if len(l) == 0 && len(t) > matchidx +! : $put ='ERROR ' . engine . ': pat: \"' . pat . '\", text: \"' . text . '\", did not match, expected: \"' . t[matchidx] . '\"' + : elseif len(l) > 0 && len(t) == matchidx +! : $put ='ERROR ' . engine . ': pat: \"' . pat . '\", text: \"' . text . '\", match: \"' . l[0] . '\", expected no match' + : elseif len(t) > matchidx && l[0] != t[matchidx] +! : $put ='ERROR ' . engine . ': pat: \"' . pat . '\", text: \"' . text . '\", match: \"' . l[0] . '\", expected: \"' . t[matchidx] . '\"' + : else + : $put ='OK ' . engine . ' - ' . pat + : endif +*************** +*** 483,489 **** + : let e = t[matchidx + i] + : endif + : if l[i] != e +! : $put ='ERROR: pat: \"' . pat . '\", text: \"' . text . '\", submatch ' . i . ': \"' . l[i] . '\", expected: \"' . e . '\"' + : endif + : endfor + : unlet i +--- 487,493 ---- + : let e = t[matchidx + i] + : endif + : if l[i] != e +! : $put ='ERROR ' . engine . ': pat: \"' . pat . '\", text: \"' . text . '\", submatch ' . i . ': \"' . l[i] . '\", expected: \"' . e . '\"' + : endif + : endfor + : unlet i +*** ../vim-7.4.289/src/testdir/test64.ok 2014-05-13 15:56:45.017670668 +0200 +--- src/testdir/test64.ok 2014-05-13 16:39:35.077693166 +0200 +*************** +*** 533,538 **** +--- 533,550 ---- + OK 0 - \v(a{-1,3})+ + OK 1 - \v(a{-1,3})+ + OK 2 - \v(a{-1,3})+ ++ OK 0 - ^\s\{-}\zs\( x\|x$\) ++ OK 1 - ^\s\{-}\zs\( x\|x$\) ++ OK 2 - ^\s\{-}\zs\( x\|x$\) ++ OK 0 - ^\s\{-}\zs\(x\| x$\) ++ OK 1 - ^\s\{-}\zs\(x\| x$\) ++ OK 2 - ^\s\{-}\zs\(x\| x$\) ++ OK 0 - ^\s\{-}\ze\(x\| x$\) ++ OK 1 - ^\s\{-}\ze\(x\| x$\) ++ OK 2 - ^\s\{-}\ze\(x\| x$\) ++ OK 0 - ^\(\s\{-}\)\(x\| x$\) ++ OK 1 - ^\(\s\{-}\)\(x\| x$\) ++ OK 2 - ^\(\s\{-}\)\(x\| x$\) + OK 0 - \d\+e\d\d + OK 1 - \d\+e\d\d + OK 2 - \d\+e\d\d +*** ../vim-7.4.289/src/regexp_nfa.c 2014-05-13 15:56:45.021670668 +0200 +--- src/regexp_nfa.c 2014-05-13 16:37:58.481692320 +0200 +*************** +*** 4324,4331 **** + { + /* This state is already in the list, don't add it again, + * unless it is an MOPEN that is used for a backreference or +! * when there is a PIM. */ +! if (!nfa_has_backref && pim == NULL && !l->has_pim) + { + skip_add: + #ifdef ENABLE_LOG +--- 4324,4333 ---- + { + /* This state is already in the list, don't add it again, + * unless it is an MOPEN that is used for a backreference or +! * when there is a PIM. For NFA_MATCH check the position, +! * lower position is preferred. */ +! if (!nfa_has_backref && pim == NULL && !l->has_pim +! && state->c != NFA_MATCH) + { + skip_add: + #ifdef ENABLE_LOG +*** ../vim-7.4.289/src/version.c 2014-05-13 15:56:45.025670668 +0200 +--- src/version.c 2014-05-13 16:13:33.953679500 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 290, + /**/ + +-- +Although the scythe isn't pre-eminent among the weapons of war, anyone who +has been on the wrong end of, say, a peasants' revolt will know that in +skilled hands it is fearsome. + -- (Terry Pratchett, Mort) + + /// 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/patches/source/vim/patches/7.4.291 b/patches/source/vim/patches/7.4.291 new file mode 100644 index 000000000..c9da78121 --- /dev/null +++ b/patches/source/vim/patches/7.4.291 @@ -0,0 +1,56 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.291 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.291 +Problem: Compiler warning for int to pointer of different size when DEBUG + is defined. +Solution: use smsg() instead of EMSG3(). +Files: src/regexp.c + + +*** ../vim-7.4.290/src/regexp.c 2014-04-23 19:06:33.702828771 +0200 +--- src/regexp.c 2014-05-13 16:39:28.833693111 +0200 +*************** +*** 8022,8029 **** + regexp_engine = expr[4] - '0'; + expr += 5; + #ifdef DEBUG +! EMSG3("New regexp mode selected (%d): %s", regexp_engine, +! regname[newengine]); + #endif + } + else +--- 8022,8029 ---- + regexp_engine = expr[4] - '0'; + expr += 5; + #ifdef DEBUG +! smsg((char_u *)"New regexp mode selected (%d): %s", +! regexp_engine, regname[newengine]); + #endif + } + else +*** ../vim-7.4.290/src/version.c 2014-05-13 16:44:25.637695709 +0200 +--- src/version.c 2014-05-13 16:45:34.901696316 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 291, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +153. You find yourself staring at your "inbox" waiting for new e-mail + to arrive. + + /// 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/patches/source/vim/patches/7.4.292 b/patches/source/vim/patches/7.4.292 new file mode 100644 index 000000000..c35c61663 --- /dev/null +++ b/patches/source/vim/patches/7.4.292 @@ -0,0 +1,139 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.292 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.292 +Problem: Searching for "a" does not match accented "a" with new regexp + engine, does match with old engine. (David Bürgin) + "ca" does not match "ca" with accented "a" with either engine. +Solution: Change the old engine, check for following composing character + also for single-byte patterns. +Files: src/regexp.c, src/testdir/test95.in, src/testdir/test95.ok + + +*** ../vim-7.4.291/src/regexp.c 2014-05-13 16:46:25.693696760 +0200 +--- src/regexp.c 2014-05-13 17:45:50.977727970 +0200 +*************** +*** 4692,4722 **** + /* match empty string always works; happens when "~" is + * empty. */ + } +! else if (opnd[1] == NUL + #ifdef FEAT_MBYTE + && !(enc_utf8 && ireg_ic) + #endif + ) +! ++reginput; /* matched a single char */ +! else +! { +! len = (int)STRLEN(opnd); +! /* Need to match first byte again for multi-byte. */ +! if (cstrncmp(opnd, reginput, &len) != 0) +! status = RA_NOMATCH; + #ifdef FEAT_MBYTE + /* Check for following composing character. */ +! else if (enc_utf8 +! && UTF_COMPOSINGLIKE(reginput, reginput + len)) + { + /* raaron: This code makes a composing character get + * ignored, which is the correct behavior (sometimes) + * for voweled Hebrew texts. */ +! if (!ireg_icombine) +! status = RA_NOMATCH; + } + #endif +! else + reginput += len; + } + } +--- 4692,4728 ---- + /* match empty string always works; happens when "~" is + * empty. */ + } +! else +! { +! if (opnd[1] == NUL + #ifdef FEAT_MBYTE + && !(enc_utf8 && ireg_ic) + #endif + ) +! { +! len = 1; /* matched a single byte above */ +! } +! else +! { +! /* Need to match first byte again for multi-byte. */ +! len = (int)STRLEN(opnd); +! if (cstrncmp(opnd, reginput, &len) != 0) +! status = RA_NOMATCH; +! } + #ifdef FEAT_MBYTE + /* Check for following composing character. */ +! if (status != RA_NOMATCH +! && enc_utf8 +! && UTF_COMPOSINGLIKE(reginput, reginput + len) +! && !ireg_icombine) + { + /* raaron: This code makes a composing character get + * ignored, which is the correct behavior (sometimes) + * for voweled Hebrew texts. */ +! status = RA_NOMATCH; + } + #endif +! if (status != RA_NOMATCH) + reginput += len; + } + } +*** ../vim-7.4.291/src/testdir/test95.in 2013-07-21 16:53:52.000000000 +0200 +--- src/testdir/test95.in 2014-05-13 17:49:00.201729626 +0200 +*************** +*** 50,55 **** +--- 50,57 ---- + :call add(tl, [2, ".\u05b9", " y\u05bb\u05b9 x\u05b9 ", "y\u05bb\u05b9"]) + :call add(tl, [1, "\u05b9\u05bb", " y\u05b9 x\u05b9\u05bb ", "x\u05b9\u05bb"]) + :call add(tl, [2, ".\u05b9\u05bb", " y\u05bb x\u05b9\u05bb ", "x\u05b9\u05bb"]) ++ :call add(tl, [2, "a", "ca\u0300t"]) ++ :call add(tl, [2, "a\u0300", "ca\u0300t", "a\u0300"]) + + + :"""" Test \Z +*** ../vim-7.4.291/src/testdir/test95.ok 2013-07-21 17:01:22.000000000 +0200 +--- src/testdir/test95.ok 2014-05-13 17:49:46.709730033 +0200 +*************** +*** 67,72 **** +--- 67,78 ---- + OK 0 - .ֹֻ + OK 1 - .ֹֻ + OK 2 - .ֹֻ ++ OK 0 - a ++ OK 1 - a ++ OK 2 - a ++ OK 0 - à ++ OK 1 - à ++ OK 2 - à + OK 0 - ú\Z + OK 1 - ú\Z + OK 2 - ú\Z +*** ../vim-7.4.291/src/version.c 2014-05-13 16:46:25.693696760 +0200 +--- src/version.c 2014-05-13 18:00:22.149735596 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 292, + /**/ + +-- +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/patches/source/vim/patches/7.4.293 b/patches/source/vim/patches/7.4.293 new file mode 100644 index 000000000..5cc60a1ea --- /dev/null +++ b/patches/source/vim/patches/7.4.293 @@ -0,0 +1,301 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.293 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.293 +Problem: It is not possible to ignore composing characters at a specific + point in a pattern. +Solution: Add the %C item. +Files: src/regexp.c, src/regexp_nfa.c, src/testdir/test95.in, + src/testdir/test95.ok, runtime/doc/pattern.txt + + +*** ../vim-7.4.292/src/regexp.c 2014-05-13 18:03:55.729737466 +0200 +--- src/regexp.c 2014-05-13 18:27:08.725749659 +0200 +*************** +*** 244,249 **** +--- 244,250 ---- + + #define RE_MARK 207 /* mark cmp Match mark position */ + #define RE_VISUAL 208 /* Match Visual area */ ++ #define RE_COMPOSING 209 /* any composing characters */ + + /* + * Magic characters have a special meaning, they don't match literally. +*************** +*** 2208,2213 **** +--- 2209,2218 ---- + ret = regnode(RE_VISUAL); + break; + ++ case 'C': ++ ret = regnode(RE_COMPOSING); ++ break; ++ + /* \%[abc]: Emit as a list of branches, all ending at the last + * branch which matches nothing. */ + case '[': +*************** +*** 4710,4720 **** + status = RA_NOMATCH; + } + #ifdef FEAT_MBYTE +! /* Check for following composing character. */ + if (status != RA_NOMATCH + && enc_utf8 + && UTF_COMPOSINGLIKE(reginput, reginput + len) +! && !ireg_icombine) + { + /* raaron: This code makes a composing character get + * ignored, which is the correct behavior (sometimes) +--- 4715,4727 ---- + status = RA_NOMATCH; + } + #ifdef FEAT_MBYTE +! /* Check for following composing character, unless %C +! * follows (skips over all composing chars). */ + if (status != RA_NOMATCH + && enc_utf8 + && UTF_COMPOSINGLIKE(reginput, reginput + len) +! && !ireg_icombine +! && OP(next) != RE_COMPOSING) + { + /* raaron: This code makes a composing character get + * ignored, which is the correct behavior (sometimes) +*************** +*** 4791,4796 **** +--- 4798,4813 ---- + status = RA_NOMATCH; + break; + #endif ++ case RE_COMPOSING: ++ #ifdef FEAT_MBYTE ++ if (enc_utf8) ++ { ++ /* Skip composing characters. */ ++ while (utf_iscomposing(utf_ptr2char(reginput))) ++ mb_cptr_adv(reginput); ++ } ++ #endif ++ break; + + case NOTHING: + break; +*** ../vim-7.4.292/src/regexp_nfa.c 2014-05-13 16:44:25.633695709 +0200 +--- src/regexp_nfa.c 2014-05-13 19:25:58.285780556 +0200 +*************** +*** 81,86 **** +--- 81,87 ---- + NFA_COMPOSING, /* Next nodes in NFA are part of the + composing multibyte char */ + NFA_END_COMPOSING, /* End of a composing char in the NFA */ ++ NFA_ANY_COMPOSING, /* \%C: Any composing characters. */ + NFA_OPT_CHARS, /* \%[abc] */ + + /* The following are used only in the postfix form, not in the NFA */ +*************** +*** 1418,1423 **** +--- 1419,1428 ---- + EMIT(NFA_VISUAL); + break; + ++ case 'C': ++ EMIT(NFA_ANY_COMPOSING); ++ break; ++ + case '[': + { + int n; +*************** +*** 2429,2434 **** +--- 2434,2440 ---- + case NFA_MARK_LT: STRCPY(code, "NFA_MARK_LT "); break; + case NFA_CURSOR: STRCPY(code, "NFA_CURSOR "); break; + case NFA_VISUAL: STRCPY(code, "NFA_VISUAL "); break; ++ case NFA_ANY_COMPOSING: STRCPY(code, "NFA_ANY_COMPOSING "); break; + + case NFA_STAR: STRCPY(code, "NFA_STAR "); break; + case NFA_STAR_NONGREEDY: STRCPY(code, "NFA_STAR_NONGREEDY "); break; +*************** +*** 2967,2972 **** +--- 2973,2979 ---- + case NFA_NLOWER_IC: + case NFA_UPPER_IC: + case NFA_NUPPER_IC: ++ case NFA_ANY_COMPOSING: + /* possibly non-ascii */ + #ifdef FEAT_MBYTE + if (has_mbyte) +*************** +*** 4152,4157 **** +--- 4159,4165 ---- + continue; + + case NFA_ANY: ++ case NFA_ANY_COMPOSING: + case NFA_IDENT: + case NFA_SIDENT: + case NFA_KWORD: +*************** +*** 4395,4401 **** + switch (state->c) + { + case NFA_MATCH: +! nfa_match = TRUE; + break; + + case NFA_SPLIT: +--- 4403,4409 ---- + switch (state->c) + { + case NFA_MATCH: +! // nfa_match = TRUE; + break; + + case NFA_SPLIT: +*************** +*** 5151,5156 **** +--- 5159,5165 ---- + + case NFA_MATCH: + case NFA_MCLOSE: ++ case NFA_ANY_COMPOSING: + /* empty match works always */ + return 0; + +*************** +*** 5573,5578 **** +--- 5582,5593 ---- + { + case NFA_MATCH: + { ++ #ifdef FEAT_MBYTE ++ /* If the match ends before a composing characters and ++ * ireg_icombine is not set, that is not really a match. */ ++ if (enc_utf8 && !ireg_icombine && utf_iscomposing(curc)) ++ break; ++ #endif + nfa_match = TRUE; + copy_sub(&submatch->norm, &t->subs.norm); + #ifdef FEAT_SYN_HL +*************** +*** 6120,6125 **** +--- 6135,6157 ---- + } + break; + ++ case NFA_ANY_COMPOSING: ++ /* On a composing character skip over it. Otherwise do ++ * nothing. Always matches. */ ++ #ifdef FEAT_MBYTE ++ if (enc_utf8 && utf_iscomposing(curc)) ++ { ++ add_off = clen; ++ } ++ else ++ #endif ++ { ++ add_here = TRUE; ++ add_off = 0; ++ } ++ add_state = t->state->out; ++ break; ++ + /* + * Character classes like \a for alpha, \d for digit etc. + */ +*************** +*** 6484,6495 **** + if (!result && ireg_ic) + result = MB_TOLOWER(c) == MB_TOLOWER(curc); + #ifdef FEAT_MBYTE +! /* If there is a composing character which is not being +! * ignored there can be no match. Match with composing +! * character uses NFA_COMPOSING above. */ +! if (result && enc_utf8 && !ireg_icombine +! && clen != utf_char2len(curc)) +! result = FALSE; + #endif + ADD_STATE_IF_MATCH(t->state); + break; +--- 6516,6525 ---- + if (!result && ireg_ic) + result = MB_TOLOWER(c) == MB_TOLOWER(curc); + #ifdef FEAT_MBYTE +! /* If ireg_icombine is not set only skip over the character +! * itself. When it is set skip over composing characters. */ +! if (result && enc_utf8 && !ireg_icombine) +! clen = utf_char2len(curc); + #endif + ADD_STATE_IF_MATCH(t->state); + break; +diff: ../vim-7.4.292/src/testdir/test95.insrc/testdir/test95.ok,: No such file or directory +diff: src/testdir/test95.insrc/testdir/test95.ok,: No such file or directory +*** ../vim-7.4.292/runtime/doc/pattern.txt 2013-08-10 13:24:59.000000000 +0200 +--- runtime/doc/pattern.txt 2014-05-13 18:59:57.621766895 +0200 +*************** +*** 545,550 **** +--- 545,551 ---- + |/\%u| \%u \%u match specified multibyte character (eg \%u20ac) + |/\%U| \%U \%U match specified large multibyte character (eg + \%U12345678) ++ |/\%C| \%C \%C match any composing characters + + Example matches ~ + \<\I\i* or +*************** +*** 1207,1218 **** + 8. Composing characters *patterns-composing* + + */\Z* +! When "\Z" appears anywhere in the pattern, composing characters are ignored. +! Thus only the base characters need to match, the composing characters may be +! different and the number of composing characters may differ. Only relevant +! when 'encoding' is "utf-8". + Exception: If the pattern starts with one or more composing characters, these + must match. + + When a composing character appears at the start of the pattern of after an + item that doesn't include the composing character, a match is found at any +--- 1208,1225 ---- + 8. Composing characters *patterns-composing* + + */\Z* +! When "\Z" appears anywhere in the pattern, all composing characters are +! ignored. Thus only the base characters need to match, the composing +! characters may be different and the number of composing characters may differ. +! Only relevant when 'encoding' is "utf-8". + Exception: If the pattern starts with one or more composing characters, these + must match. ++ */\%C* ++ Use "\%C" to skip any composing characters. For example, the pattern "a" does ++ not match in "càt" (where the a has the composing character 0x0300), but ++ "a\%C" does. Note that this does not match "cát" (where the á is character ++ 0xe1, it does not have a compositing character). It does match "cat" (where ++ the a is just an a). + + When a composing character appears at the start of the pattern of after an + item that doesn't include the composing character, a match is found at any +*** ../vim-7.4.292/src/version.c 2014-05-13 18:03:55.729737466 +0200 +--- src/version.c 2014-05-13 18:28:45.885750510 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 293, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +155. You forget to eat because you're too busy 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/patches/source/vim/patches/7.4.294 b/patches/source/vim/patches/7.4.294 new file mode 100644 index 000000000..aa0201ceb --- /dev/null +++ b/patches/source/vim/patches/7.4.294 @@ -0,0 +1,125 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.294 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.294 (after 7.4.293) +Problem: Test files missing from patch. +Solution: Patch the test files. +Files: src/testdir/test95.in, src/testdir/test95.ok + + +*** ../vim-7.4.293/src/testdir/test95.in 2014-05-13 18:03:55.729737466 +0200 +--- src/testdir/test95.in 2014-05-13 19:16:24.433775533 +0200 +*************** +*** 51,57 **** +--- 51,61 ---- + :call add(tl, [1, "\u05b9\u05bb", " y\u05b9 x\u05b9\u05bb ", "x\u05b9\u05bb"]) + :call add(tl, [2, ".\u05b9\u05bb", " y\u05bb x\u05b9\u05bb ", "x\u05b9\u05bb"]) + :call add(tl, [2, "a", "ca\u0300t"]) ++ :call add(tl, [2, "ca", "ca\u0300t"]) + :call add(tl, [2, "a\u0300", "ca\u0300t", "a\u0300"]) ++ :call add(tl, [2, 'a\%C', "ca\u0300t", "a\u0300"]) ++ :call add(tl, [2, 'ca\%C', "ca\u0300t", "ca\u0300"]) ++ :call add(tl, [2, 'ca\%Ct', "ca\u0300t", "ca\u0300t"]) + + + :"""" Test \Z +*************** +*** 91,105 **** + : try + : let l = matchlist(text, pat) + : catch +! : $put ='ERROR: pat: \"' . pat . '\", text: \"' . text . '\", caused an exception: \"' . v:exception . '\"' + : endtry + :" check the match itself + : if len(l) == 0 && len(t) > matchidx +! : $put ='ERROR: pat: \"' . pat . '\", text: \"' . text . '\", did not match, expected: \"' . t[matchidx] . '\"' + : elseif len(l) > 0 && len(t) == matchidx +! : $put ='ERROR: pat: \"' . pat . '\", text: \"' . text . '\", match: \"' . l[0] . '\", expected no match' + : elseif len(t) > matchidx && l[0] != t[matchidx] +! : $put ='ERROR: pat: \"' . pat . '\", text: \"' . text . '\", match: \"' . l[0] . '\", expected: \"' . t[matchidx] . '\"' + : else + : $put ='OK ' . engine . ' - ' . pat + : endif +--- 95,109 ---- + : try + : let l = matchlist(text, pat) + : catch +! : $put ='ERROR ' . engine . ': pat: \"' . pat . '\", text: \"' . text . '\", caused an exception: \"' . v:exception . '\"' + : endtry + :" check the match itself + : if len(l) == 0 && len(t) > matchidx +! : $put ='ERROR ' . engine . ': pat: \"' . pat . '\", text: \"' . text . '\", did not match, expected: \"' . t[matchidx] . '\"' + : elseif len(l) > 0 && len(t) == matchidx +! : $put ='ERROR ' . engine . ': pat: \"' . pat . '\", text: \"' . text . '\", match: \"' . l[0] . '\", expected no match' + : elseif len(t) > matchidx && l[0] != t[matchidx] +! : $put ='ERROR ' . engine . ': pat: \"' . pat . '\", text: \"' . text . '\", match: \"' . l[0] . '\", expected: \"' . t[matchidx] . '\"' + : else + : $put ='OK ' . engine . ' - ' . pat + : endif +*************** +*** 112,118 **** + : let e = t[matchidx + i] + : endif + : if l[i] != e +! : $put ='ERROR: pat: \"' . pat . '\", text: \"' . text . '\", submatch ' . i . ': \"' . l[i] . '\", expected: \"' . e . '\"' + : endif + : endfor + : unlet i +--- 116,122 ---- + : let e = t[matchidx + i] + : endif + : if l[i] != e +! : $put ='ERROR ' . engine . ': pat: \"' . pat . '\", text: \"' . text . '\", submatch ' . i . ': \"' . l[i] . '\", expected: \"' . e . '\"' + : endif + : endfor + : unlet i +*** ../vim-7.4.293/src/testdir/test95.ok 2014-05-13 18:03:55.729737466 +0200 +--- src/testdir/test95.ok 2014-05-13 19:01:54.693767920 +0200 +*************** +*** 70,78 **** +--- 70,90 ---- + OK 0 - a + OK 1 - a + OK 2 - a ++ OK 0 - ca ++ OK 1 - ca ++ OK 2 - ca + OK 0 - à + OK 1 - à + OK 2 - à ++ OK 0 - a\%C ++ OK 1 - a\%C ++ OK 2 - a\%C ++ OK 0 - ca\%C ++ OK 1 - ca\%C ++ OK 2 - ca\%C ++ OK 0 - ca\%Ct ++ OK 1 - ca\%Ct ++ OK 2 - ca\%Ct + OK 0 - ú\Z + OK 1 - ú\Z + OK 2 - ú\Z +*** ../vim-7.4.293/src/version.c 2014-05-13 19:37:19.489786520 +0200 +--- src/version.c 2014-05-13 20:09:45.133803551 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 294, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +156. You forget your friend's name but not her e-mail 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/patches/source/vim/patches/7.4.295 b/patches/source/vim/patches/7.4.295 new file mode 100644 index 000000000..bb01d0a47 --- /dev/null +++ b/patches/source/vim/patches/7.4.295 @@ -0,0 +1,144 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.295 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.295 +Problem: Various typos, bad white space and unclear comments. +Solution: Fix typos. Improve white space. Update comments. +Files: src/testdir/test49.in, src/macros.h, src/screen.c, src/structs.h, + src/gui_gtk_x11.c, src/os_unix.c + + +*** ../vim-7.4.294/src/testdir/test49.in 2012-11-15 22:29:55.000000000 +0100 +--- src/testdir/test49.in 2013-11-08 01:06:23.000000000 +0100 +*************** +*** 1,7 **** + This is a test of the script language. + + If after adding a new test, the test output doesn't appear properly in +! test49.failed, try to add one ore more "G"s at the line ending in "test.out" + + STARTTEST + :so small.vim +--- 1,7 ---- + This is a test of the script language. + + If after adding a new test, the test output doesn't appear properly in +! test49.failed, try to add one or more "G"s at the line ending in "test.out" + + STARTTEST + :so small.vim +*** ../vim-7.4.294/src/macros.h 2013-06-12 17:07:32.000000000 +0200 +--- src/macros.h 2013-11-08 04:12:45.000000000 +0100 +*************** +*** 264,270 **** + # define mb_ptr_adv(p) p += has_mbyte ? (*mb_ptr2len)(p) : 1 + /* Advance multi-byte pointer, do not skip over composing chars. */ + # define mb_cptr_adv(p) p += enc_utf8 ? utf_ptr2len(p) : has_mbyte ? (*mb_ptr2len)(p) : 1 +! /* Backup multi-byte pointer. */ + # define mb_ptr_back(s, p) p -= has_mbyte ? ((*mb_head_off)(s, p - 1) + 1) : 1 + /* get length of multi-byte char, not including composing chars */ + # define mb_cptr2len(p) (enc_utf8 ? utf_ptr2len(p) : (*mb_ptr2len)(p)) +--- 264,270 ---- + # define mb_ptr_adv(p) p += has_mbyte ? (*mb_ptr2len)(p) : 1 + /* Advance multi-byte pointer, do not skip over composing chars. */ + # define mb_cptr_adv(p) p += enc_utf8 ? utf_ptr2len(p) : has_mbyte ? (*mb_ptr2len)(p) : 1 +! /* Backup multi-byte pointer. Only use with "p" > "s" ! */ + # define mb_ptr_back(s, p) p -= has_mbyte ? ((*mb_head_off)(s, p - 1) + 1) : 1 + /* get length of multi-byte char, not including composing chars */ + # define mb_cptr2len(p) (enc_utf8 ? utf_ptr2len(p) : (*mb_ptr2len)(p)) +*** ../vim-7.4.294/src/screen.c 2014-03-23 15:12:29.935264336 +0100 +--- src/screen.c 2014-03-27 11:34:36.128359605 +0100 +*************** +*** 2456,2463 **** + if (len > 0) + { + int w = number_width(wp); +! long num; +! char *fmt = "%*ld "; + + if (len > w + 1) + len = w + 1; +--- 2456,2463 ---- + if (len > 0) + { + int w = number_width(wp); +! long num; +! char *fmt = "%*ld "; + + if (len > w + 1) + len = w + 1; +*** ../vim-7.4.294/src/structs.h 2014-03-23 16:03:56.171311627 +0100 +--- src/structs.h 2014-04-24 15:00:59.053101897 +0200 +*************** +*** 572,578 **** + unsigned mf_page_size; /* number of bytes in a page */ + int mf_dirty; /* TRUE if there are dirty blocks */ + #ifdef FEAT_CRYPT +! buf_T *mf_buffer; /* bufer this memfile is for */ + char_u mf_seed[MF_SEED_LEN]; /* seed for encryption */ + + /* Values for key, method and seed used for reading data blocks when +--- 572,578 ---- + unsigned mf_page_size; /* number of bytes in a page */ + int mf_dirty; /* TRUE if there are dirty blocks */ + #ifdef FEAT_CRYPT +! buf_T *mf_buffer; /* buffer this memfile is for */ + char_u mf_seed[MF_SEED_LEN]; /* seed for encryption */ + + /* Values for key, method and seed used for reading data blocks when +*** ../vim-7.4.294/src/gui_gtk_x11.c 2014-04-29 15:11:39.783847283 +0200 +--- src/gui_gtk_x11.c 2014-05-07 20:27:54.545275130 +0200 +*************** +*** 2054,2059 **** +--- 2054,2060 ---- + + ssop_flags = save_ssop_flags; + g_free(mksession_cmdline); ++ + /* + * Reopen the file and append a command to restore v:this_session, + * as if this save never happened. This is to avoid conflicts with +*** ../vim-7.4.294/src/os_unix.c 2014-04-23 12:52:36.499369426 +0200 +--- src/os_unix.c 2014-05-13 13:02:56.329579378 +0200 +*************** +*** 3783,3789 **** + del_mouse_termcode(KS_URXVT_MOUSE); + # endif + # ifdef FEAT_MOUSE_SGR +! /* same as the dec mouse */ + if (use_xterm_mouse() == 4 + # ifdef FEAT_GUI + && !gui.in_use +--- 3783,3789 ---- + del_mouse_termcode(KS_URXVT_MOUSE); + # endif + # ifdef FEAT_MOUSE_SGR +! /* There is no conflict with xterm mouse */ + if (use_xterm_mouse() == 4 + # ifdef FEAT_GUI + && !gui.in_use +*** ../vim-7.4.294/src/version.c 2014-05-13 20:15:20.461806487 +0200 +--- src/version.c 2014-05-13 20:17:27.693807600 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 295, + /**/ + +-- +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/patches/source/vim/patches/7.4.296 b/patches/source/vim/patches/7.4.296 new file mode 100644 index 000000000..2004516d3 --- /dev/null +++ b/patches/source/vim/patches/7.4.296 @@ -0,0 +1,53 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.296 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.296 +Problem: Can't run tests on Solaris. +Solution: Change the way VIMRUNTIME is set. (Laurent Blume) +Files: src/testdir/Makefile + + +*** ../vim-7.4.295/src/testdir/Makefile 2014-04-29 12:15:22.852032651 +0200 +--- src/testdir/Makefile 2014-05-22 13:07:17.458599247 +0200 +*************** +*** 57,63 **** + + RM_ON_RUN = test.out X* viminfo + RM_ON_START = tiny.vim small.vim mbyte.vim mzscheme.vim lua.vim test.ok +! RUN_VIM = export VIMRUNTIME=$(SCRIPTSOURCE); $(VALGRIND) $(VIMPROG) -u unix.vim -U NONE --noplugin -s dotest.in + + clean: + -rm -rf *.out *.failed *.rej *.orig test.log $(RM_ON_RUN) $(RM_ON_START) valgrind.* +--- 57,63 ---- + + RM_ON_RUN = test.out X* viminfo + RM_ON_START = tiny.vim small.vim mbyte.vim mzscheme.vim lua.vim test.ok +! RUN_VIM = VIMRUNTIME=$(SCRIPTSOURCE); export VIMRUNTIME; $(VALGRIND) $(VIMPROG) -u unix.vim -U NONE --noplugin -s dotest.in + + clean: + -rm -rf *.out *.failed *.rej *.orig test.log $(RM_ON_RUN) $(RM_ON_START) valgrind.* +*** ../vim-7.4.295/src/version.c 2014-05-13 20:19:53.577808878 +0200 +--- src/version.c 2014-05-22 13:10:36.114595209 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 296, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +187. You promise yourself that you'll only stay online for another + 15 minutes...at least once every 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/patches/source/vim/patches/7.4.297 b/patches/source/vim/patches/7.4.297 new file mode 100644 index 000000000..ccfa6d6d0 --- /dev/null +++ b/patches/source/vim/patches/7.4.297 @@ -0,0 +1,76 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.297 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.297 +Problem: Memory leak from result of get_isolated_shell_name(). +Solution: Free the memory. (Dominique Pelle) +Files: src/ex_cmds.c, src/misc1.c + + +*** ../vim-7.4.296/src/ex_cmds.c 2014-05-09 20:33:01.098790466 +0200 +--- src/ex_cmds.c 2014-05-22 13:59:20.962535763 +0200 +*************** +*** 1554,1562 **** + + #if (defined(UNIX) && !defined(ARCHIE)) || defined(OS2) + int is_fish_shell; + + /* Account for fish's different syntax for subshells */ +! is_fish_shell = (fnamecmp(get_isolated_shell_name(), "fish") == 0); + if (is_fish_shell) + len = (long_u)STRLEN(cmd) + 13; /* "begin; " + "; end" + NUL */ + else +--- 1554,1564 ---- + + #if (defined(UNIX) && !defined(ARCHIE)) || defined(OS2) + int is_fish_shell; ++ char_u *shell_name = get_isolated_shell_name(); + + /* Account for fish's different syntax for subshells */ +! is_fish_shell = (fnamecmp(shell_name, "fish") == 0); +! vim_free(shell_name); + if (is_fish_shell) + len = (long_u)STRLEN(cmd) + 13; /* "begin; " + "; end" + NUL */ + else +*** ../vim-7.4.296/src/misc1.c 2014-05-13 12:44:19.897569605 +0200 +--- src/misc1.c 2014-05-22 13:58:52.254536347 +0200 +*************** +*** 10874,10880 **** + } + + /* +! * Returns the isolated name of the shell: + * - Skip beyond any path. E.g., "/usr/bin/csh -f" -> "csh -f". + * - Remove any argument. E.g., "csh -f" -> "csh". + * But don't allow a space in the path, so that this works: +--- 10874,10880 ---- + } + + /* +! * Returns the isolated name of the shell in allocated memory: + * - Skip beyond any path. E.g., "/usr/bin/csh -f" -> "csh -f". + * - Remove any argument. E.g., "csh -f" -> "csh". + * But don't allow a space in the path, so that this works: +*** ../vim-7.4.296/src/version.c 2014-05-22 13:12:25.650592983 +0200 +--- src/version.c 2014-05-22 13:57:37.346537869 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 297, + /**/ + +-- +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/patches/source/vim/patches/7.4.298 b/patches/source/vim/patches/7.4.298 new file mode 100644 index 000000000..59109024b --- /dev/null +++ b/patches/source/vim/patches/7.4.298 @@ -0,0 +1,52 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.298 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.298 +Problem: Can't have a funcref start with "t:". +Solution: Add "t" to the list of accepted names. (Yukihiro Nakadaira) +Files: src/eval.c + + +*** ../vim-7.4.297/src/eval.c 2014-05-13 13:46:30.593602262 +0200 +--- src/eval.c 2014-05-22 14:09:46.902523041 +0200 +*************** +*** 21064,21070 **** + char_u *name; /* points to start of variable name */ + int new_var; /* TRUE when creating the variable */ + { +! if (!(vim_strchr((char_u *)"wbs", name[0]) != NULL && name[1] == ':') + && !ASCII_ISUPPER((name[0] != NUL && name[1] == ':') + ? name[2] : name[0])) + { +--- 21064,21071 ---- + char_u *name; /* points to start of variable name */ + int new_var; /* TRUE when creating the variable */ + { +! /* Allow for w: b: s: and t:. */ +! if (!(vim_strchr((char_u *)"wbst", name[0]) != NULL && name[1] == ':') + && !ASCII_ISUPPER((name[0] != NUL && name[1] == ':') + ? name[2] : name[0])) + { +*** ../vim-7.4.297/src/version.c 2014-05-22 14:00:12.698534712 +0200 +--- src/version.c 2014-05-22 14:08:43.874524322 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 298, + /**/ + +-- +I'm in shape. Round IS a shape. + + /// 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/patches/source/vim/patches/7.4.299 b/patches/source/vim/patches/7.4.299 new file mode 100644 index 000000000..087cca6d1 --- /dev/null +++ b/patches/source/vim/patches/7.4.299 @@ -0,0 +1,458 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.299 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.299 +Problem: When running configure twice DYNAMIC_PYTHON_DLL may become empty. +Solution: Use AC_CACHE_VAL. (Ken Takata) +Files: src/configure.in, src/auto/configure + + +*** ../vim-7.4.298/src/configure.in 2014-04-12 13:11:58.260430356 +0200 +--- src/configure.in 2014-05-22 14:39:39.326486611 +0200 +*************** +*** 1132,1141 **** + vi_cv_path_python_plibs=`echo $vi_cv_path_python_plibs | sed s/-ltermcap//` + fi + ]) + +- if test "X$python_DLLLIBRARY" != "X"; then +- python_INSTSONAME="$python_DLLLIBRARY" +- fi + PYTHON_LIBS="${vi_cv_path_python_plibs}" + if test "${vi_cv_path_python_pfx}" = "${vi_cv_path_python_epfx}"; then + PYTHON_CFLAGS="-I${vi_cv_path_python_pfx}/include/python${vi_cv_var_python_version} -DPYTHON_HOME='\"${vi_cv_path_python_pfx}\"'" +--- 1132,1146 ---- + vi_cv_path_python_plibs=`echo $vi_cv_path_python_plibs | sed s/-ltermcap//` + fi + ]) ++ AC_CACHE_VAL(vi_cv_dll_name_python, ++ [ ++ if test "X$python_DLLLIBRARY" != "X"; then ++ vi_cv_dll_name_python="$python_DLLLIBRARY" ++ else ++ vi_cv_dll_name_python="$python_INSTSONAME" ++ fi ++ ]) + + PYTHON_LIBS="${vi_cv_path_python_plibs}" + if test "${vi_cv_path_python_pfx}" = "${vi_cv_path_python_epfx}"; then + PYTHON_CFLAGS="-I${vi_cv_path_python_pfx}/include/python${vi_cv_var_python_version} -DPYTHON_HOME='\"${vi_cv_path_python_pfx}\"'" +*************** +*** 1323,1341 **** + @echo "python3_DLLLIBRARY='$(DLLLIBRARY)'" + @echo "python3_INSTSONAME='$(INSTSONAME)'" + eof +! dnl -- delete the lines from make about Entering/Leaving directory +! eval "`cd ${PYTHON3_CONFDIR} && make -f "${tmp_mkf}" __ | sed '/ directory /d'`" +! rm -f -- "${tmp_mkf}" + vi_cv_path_python3_plibs="-L${PYTHON3_CONFDIR} -lpython${vi_cv_var_python3_version}${vi_cv_var_python3_abiflags}" +! vi_cv_path_python3_plibs="${vi_cv_path_python3_plibs} ${python3_BASEMODLIBS} ${python3_LIBS} ${python3_SYSLIBS}" +! dnl remove -ltermcap, it can conflict with an earlier -lncurses +! vi_cv_path_python3_plibs=`echo $vi_cv_path_python3_plibs | sed s/-ltermcap//` +! vi_cv_path_python3_plibs=`echo $vi_cv_path_python3_plibs | sed s/-lffi//` +! ]) +! +! if test "X$python3_DLLLIBRARY" != "X"; then +! python3_INSTSONAME="$python3_DLLLIBRARY" +! fi + PYTHON3_LIBS="${vi_cv_path_python3_plibs}" + if test "${vi_cv_path_python3_pfx}" = "${vi_cv_path_python3_epfx}"; then + PYTHON3_CFLAGS="-I${vi_cv_path_python3_pfx}/include/python${vi_cv_var_python3_version}${vi_cv_var_python3_abiflags} -DPYTHON3_HOME='L\"${vi_cv_path_python3_pfx}\"'" +--- 1328,1351 ---- + @echo "python3_DLLLIBRARY='$(DLLLIBRARY)'" + @echo "python3_INSTSONAME='$(INSTSONAME)'" + eof +! dnl -- delete the lines from make about Entering/Leaving directory +! eval "`cd ${PYTHON3_CONFDIR} && make -f "${tmp_mkf}" __ | sed '/ directory /d'`" +! rm -f -- "${tmp_mkf}" + vi_cv_path_python3_plibs="-L${PYTHON3_CONFDIR} -lpython${vi_cv_var_python3_version}${vi_cv_var_python3_abiflags}" +! vi_cv_path_python3_plibs="${vi_cv_path_python3_plibs} ${python3_BASEMODLIBS} ${python3_LIBS} ${python3_SYSLIBS}" +! dnl remove -ltermcap, it can conflict with an earlier -lncurses +! vi_cv_path_python3_plibs=`echo $vi_cv_path_python3_plibs | sed s/-ltermcap//` +! vi_cv_path_python3_plibs=`echo $vi_cv_path_python3_plibs | sed s/-lffi//` +! ]) +! AC_CACHE_VAL(vi_cv_dll_name_python3, +! [ +! if test "X$python3_DLLLIBRARY" != "X"; then +! vi_cv_dll_name_python3="$python3_DLLLIBRARY" +! else +! vi_cv_dll_name_python3="$python3_INSTSONAME" +! fi +! ]) +! + PYTHON3_LIBS="${vi_cv_path_python3_plibs}" + if test "${vi_cv_path_python3_pfx}" = "${vi_cv_path_python3_epfx}"; then + PYTHON3_CFLAGS="-I${vi_cv_path_python3_pfx}/include/python${vi_cv_var_python3_version}${vi_cv_var_python3_abiflags} -DPYTHON3_HOME='L\"${vi_cv_path_python3_pfx}\"'" +*************** +*** 1458,1464 **** + int main(int argc, char** argv) + { + int not_needed = 0; +! if (no_rtl_global_needed_for("${python_INSTSONAME}", "${vi_cv_path_python_pfx}")) + not_needed = 1; + return !not_needed; + }])], +--- 1468,1474 ---- + int main(int argc, char** argv) + { + int not_needed = 0; +! if (no_rtl_global_needed_for("${vi_cv_dll_name_python}", "${vi_cv_path_python_pfx}")) + not_needed = 1; + return !not_needed; + }])], +*************** +*** 1504,1510 **** + int main(int argc, char** argv) + { + int not_needed = 0; +! if (no_rtl_global_needed_for("${python3_INSTSONAME}", L"${vi_cv_path_python3_pfx}")) + not_needed = 1; + return !not_needed; + }])], +--- 1514,1520 ---- + int main(int argc, char** argv) + { + int not_needed = 0; +! if (no_rtl_global_needed_for("${vi_cv_dll_name_python3}", L"${vi_cv_path_python3_pfx}")) + not_needed = 1; + return !not_needed; + }])], +*************** +*** 1515,1531 **** + + PYTHON_SRC="if_python.c" + PYTHON_OBJ="objects/if_python.o" +! PYTHON_CFLAGS="$PYTHON_CFLAGS -DDYNAMIC_PYTHON_DLL=\\\"${python_INSTSONAME}\\\"" + PYTHON_LIBS= + PYTHON3_SRC="if_python3.c" + PYTHON3_OBJ="objects/if_python3.o" +! PYTHON3_CFLAGS="$PYTHON3_CFLAGS -DDYNAMIC_PYTHON3_DLL=\\\"${python3_INSTSONAME}\\\"" + PYTHON3_LIBS= + elif test "$python_ok" = yes && test "$enable_pythoninterp" = "dynamic"; then + AC_DEFINE(DYNAMIC_PYTHON) + PYTHON_SRC="if_python.c" + PYTHON_OBJ="objects/if_python.o" +! PYTHON_CFLAGS="$PYTHON_CFLAGS -DDYNAMIC_PYTHON_DLL=\\\"${python_INSTSONAME}\\\"" + PYTHON_LIBS= + elif test "$python_ok" = yes; then + dnl Check that adding -fPIE works. It may be needed when using a static +--- 1525,1541 ---- + + PYTHON_SRC="if_python.c" + PYTHON_OBJ="objects/if_python.o" +! PYTHON_CFLAGS="$PYTHON_CFLAGS -DDYNAMIC_PYTHON_DLL=\\\"${vi_cv_dll_name_python}\\\"" + PYTHON_LIBS= + PYTHON3_SRC="if_python3.c" + PYTHON3_OBJ="objects/if_python3.o" +! PYTHON3_CFLAGS="$PYTHON3_CFLAGS -DDYNAMIC_PYTHON3_DLL=\\\"${vi_cv_dll_name_python3}\\\"" + PYTHON3_LIBS= + elif test "$python_ok" = yes && test "$enable_pythoninterp" = "dynamic"; then + AC_DEFINE(DYNAMIC_PYTHON) + PYTHON_SRC="if_python.c" + PYTHON_OBJ="objects/if_python.o" +! PYTHON_CFLAGS="$PYTHON_CFLAGS -DDYNAMIC_PYTHON_DLL=\\\"${vi_cv_dll_name_python}\\\"" + PYTHON_LIBS= + elif test "$python_ok" = yes; then + dnl Check that adding -fPIE works. It may be needed when using a static +*************** +*** 1547,1553 **** + AC_DEFINE(DYNAMIC_PYTHON3) + PYTHON3_SRC="if_python3.c" + PYTHON3_OBJ="objects/if_python3.o" +! PYTHON3_CFLAGS="$PYTHON3_CFLAGS -DDYNAMIC_PYTHON3_DLL=\\\"${python3_INSTSONAME}\\\"" + PYTHON3_LIBS= + elif test "$python3_ok" = yes; then + dnl Check that adding -fPIE works. It may be needed when using a static +--- 1557,1563 ---- + AC_DEFINE(DYNAMIC_PYTHON3) + PYTHON3_SRC="if_python3.c" + PYTHON3_OBJ="objects/if_python3.o" +! PYTHON3_CFLAGS="$PYTHON3_CFLAGS -DDYNAMIC_PYTHON3_DLL=\\\"${vi_cv_dll_name_python3}\\\"" + PYTHON3_LIBS= + elif test "$python3_ok" = yes; then + dnl Check that adding -fPIE works. It may be needed when using a static +*** ../vim-7.4.298/src/auto/configure 2014-04-12 13:11:58.268430356 +0200 +--- src/auto/configure 2014-05-22 14:40:05.146486086 +0200 +*************** +*** 5893,5902 **** + + fi + + +- if test "X$python_DLLLIBRARY" != "X"; then +- python_INSTSONAME="$python_DLLLIBRARY" +- fi + PYTHON_LIBS="${vi_cv_path_python_plibs}" + if test "${vi_cv_path_python_pfx}" = "${vi_cv_path_python_epfx}"; then + PYTHON_CFLAGS="-I${vi_cv_path_python_pfx}/include/python${vi_cv_var_python_version} -DPYTHON_HOME='\"${vi_cv_path_python_pfx}\"'" +--- 5893,5911 ---- + + fi + ++ if ${vi_cv_dll_name_python+:} false; then : ++ $as_echo_n "(cached) " >&6 ++ else ++ ++ if test "X$python_DLLLIBRARY" != "X"; then ++ vi_cv_dll_name_python="$python_DLLLIBRARY" ++ else ++ vi_cv_dll_name_python="$python_INSTSONAME" ++ fi ++ ++ fi ++ + + PYTHON_LIBS="${vi_cv_path_python_plibs}" + if test "${vi_cv_path_python_pfx}" = "${vi_cv_path_python_epfx}"; then + PYTHON_CFLAGS="-I${vi_cv_path_python_pfx}/include/python${vi_cv_var_python_version} -DPYTHON_HOME='\"${vi_cv_path_python_pfx}\"'" +*************** +*** 6200,6218 **** + @echo "python3_DLLLIBRARY='$(DLLLIBRARY)'" + @echo "python3_INSTSONAME='$(INSTSONAME)'" + eof +! eval "`cd ${PYTHON3_CONFDIR} && make -f "${tmp_mkf}" __ | sed '/ directory /d'`" +! rm -f -- "${tmp_mkf}" + vi_cv_path_python3_plibs="-L${PYTHON3_CONFDIR} -lpython${vi_cv_var_python3_version}${vi_cv_var_python3_abiflags}" +! vi_cv_path_python3_plibs="${vi_cv_path_python3_plibs} ${python3_BASEMODLIBS} ${python3_LIBS} ${python3_SYSLIBS}" +! vi_cv_path_python3_plibs=`echo $vi_cv_path_python3_plibs | sed s/-ltermcap//` +! vi_cv_path_python3_plibs=`echo $vi_cv_path_python3_plibs | sed s/-lffi//` + + fi + + +- if test "X$python3_DLLLIBRARY" != "X"; then +- python3_INSTSONAME="$python3_DLLLIBRARY" +- fi + PYTHON3_LIBS="${vi_cv_path_python3_plibs}" + if test "${vi_cv_path_python3_pfx}" = "${vi_cv_path_python3_epfx}"; then + PYTHON3_CFLAGS="-I${vi_cv_path_python3_pfx}/include/python${vi_cv_var_python3_version}${vi_cv_var_python3_abiflags} -DPYTHON3_HOME='L\"${vi_cv_path_python3_pfx}\"'" +--- 6209,6236 ---- + @echo "python3_DLLLIBRARY='$(DLLLIBRARY)'" + @echo "python3_INSTSONAME='$(INSTSONAME)'" + eof +! eval "`cd ${PYTHON3_CONFDIR} && make -f "${tmp_mkf}" __ | sed '/ directory /d'`" +! rm -f -- "${tmp_mkf}" + vi_cv_path_python3_plibs="-L${PYTHON3_CONFDIR} -lpython${vi_cv_var_python3_version}${vi_cv_var_python3_abiflags}" +! vi_cv_path_python3_plibs="${vi_cv_path_python3_plibs} ${python3_BASEMODLIBS} ${python3_LIBS} ${python3_SYSLIBS}" +! vi_cv_path_python3_plibs=`echo $vi_cv_path_python3_plibs | sed s/-ltermcap//` +! vi_cv_path_python3_plibs=`echo $vi_cv_path_python3_plibs | sed s/-lffi//` +! +! fi +! +! if ${vi_cv_dll_name_python3+:} false; then : +! $as_echo_n "(cached) " >&6 +! else +! +! if test "X$python3_DLLLIBRARY" != "X"; then +! vi_cv_dll_name_python3="$python3_DLLLIBRARY" +! else +! vi_cv_dll_name_python3="$python3_INSTSONAME" +! fi + + fi + + + PYTHON3_LIBS="${vi_cv_path_python3_plibs}" + if test "${vi_cv_path_python3_pfx}" = "${vi_cv_path_python3_epfx}"; then + PYTHON3_CFLAGS="-I${vi_cv_path_python3_pfx}/include/python${vi_cv_var_python3_version}${vi_cv_var_python3_abiflags} -DPYTHON3_HOME='L\"${vi_cv_path_python3_pfx}\"'" +*************** +*** 6372,6378 **** + int main(int argc, char** argv) + { + int not_needed = 0; +! if (no_rtl_global_needed_for("${python_INSTSONAME}", "${vi_cv_path_python_pfx}")) + not_needed = 1; + return !not_needed; + } +--- 6390,6396 ---- + int main(int argc, char** argv) + { + int not_needed = 0; +! if (no_rtl_global_needed_for("${vi_cv_dll_name_python}", "${vi_cv_path_python_pfx}")) + not_needed = 1; + return !not_needed; + } +*************** +*** 6438,6444 **** + int main(int argc, char** argv) + { + int not_needed = 0; +! if (no_rtl_global_needed_for("${python3_INSTSONAME}", L"${vi_cv_path_python3_pfx}")) + not_needed = 1; + return !not_needed; + } +--- 6456,6462 ---- + int main(int argc, char** argv) + { + int not_needed = 0; +! if (no_rtl_global_needed_for("${vi_cv_dll_name_python3}", L"${vi_cv_path_python3_pfx}")) + not_needed = 1; + return !not_needed; + } +*************** +*** 6461,6478 **** + + PYTHON_SRC="if_python.c" + PYTHON_OBJ="objects/if_python.o" +! PYTHON_CFLAGS="$PYTHON_CFLAGS -DDYNAMIC_PYTHON_DLL=\\\"${python_INSTSONAME}\\\"" + PYTHON_LIBS= + PYTHON3_SRC="if_python3.c" + PYTHON3_OBJ="objects/if_python3.o" +! PYTHON3_CFLAGS="$PYTHON3_CFLAGS -DDYNAMIC_PYTHON3_DLL=\\\"${python3_INSTSONAME}\\\"" + PYTHON3_LIBS= + elif test "$python_ok" = yes && test "$enable_pythoninterp" = "dynamic"; then + $as_echo "#define DYNAMIC_PYTHON 1" >>confdefs.h + + PYTHON_SRC="if_python.c" + PYTHON_OBJ="objects/if_python.o" +! PYTHON_CFLAGS="$PYTHON_CFLAGS -DDYNAMIC_PYTHON_DLL=\\\"${python_INSTSONAME}\\\"" + PYTHON_LIBS= + elif test "$python_ok" = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -fPIE can be added for Python" >&5 +--- 6479,6496 ---- + + PYTHON_SRC="if_python.c" + PYTHON_OBJ="objects/if_python.o" +! PYTHON_CFLAGS="$PYTHON_CFLAGS -DDYNAMIC_PYTHON_DLL=\\\"${vi_cv_dll_name_python}\\\"" + PYTHON_LIBS= + PYTHON3_SRC="if_python3.c" + PYTHON3_OBJ="objects/if_python3.o" +! PYTHON3_CFLAGS="$PYTHON3_CFLAGS -DDYNAMIC_PYTHON3_DLL=\\\"${vi_cv_dll_name_python3}\\\"" + PYTHON3_LIBS= + elif test "$python_ok" = yes && test "$enable_pythoninterp" = "dynamic"; then + $as_echo "#define DYNAMIC_PYTHON 1" >>confdefs.h + + PYTHON_SRC="if_python.c" + PYTHON_OBJ="objects/if_python.o" +! PYTHON_CFLAGS="$PYTHON_CFLAGS -DDYNAMIC_PYTHON_DLL=\\\"${vi_cv_dll_name_python}\\\"" + PYTHON_LIBS= + elif test "$python_ok" = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -fPIE can be added for Python" >&5 +*************** +*** 6511,6517 **** + + PYTHON3_SRC="if_python3.c" + PYTHON3_OBJ="objects/if_python3.o" +! PYTHON3_CFLAGS="$PYTHON3_CFLAGS -DDYNAMIC_PYTHON3_DLL=\\\"${python3_INSTSONAME}\\\"" + PYTHON3_LIBS= + elif test "$python3_ok" = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -fPIE can be added for Python3" >&5 +--- 6529,6535 ---- + + PYTHON3_SRC="if_python3.c" + PYTHON3_OBJ="objects/if_python3.o" +! PYTHON3_CFLAGS="$PYTHON3_CFLAGS -DDYNAMIC_PYTHON3_DLL=\\\"${vi_cv_dll_name_python3}\\\"" + PYTHON3_LIBS= + elif test "$python3_ok" = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -fPIE can be added for Python3" >&5 +*************** +*** 11420,11426 **** + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +! #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +--- 11438,11444 ---- + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +! #define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +*************** +*** 11466,11472 **** + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +! #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +--- 11484,11490 ---- + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +! #define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +*************** +*** 11490,11496 **** + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +! #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +--- 11508,11514 ---- + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +! #define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +*************** +*** 11535,11541 **** + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +! #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +--- 11553,11559 ---- + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +! #define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +*************** +*** 11559,11565 **** + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +! #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +--- 11577,11583 ---- + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +! #define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +*** ../vim-7.4.298/src/version.c 2014-05-22 14:19:51.674510749 +0200 +--- src/version.c 2014-05-22 14:36:44.634490162 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 299, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +190. You quickly hand over your wallet, leather jacket, and car keys + during a mugging, then proceed to beat the crap out of your + assailant when he asks for your 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/patches/source/vim/patches/7.4.300 b/patches/source/vim/patches/7.4.300 new file mode 100644 index 000000000..308fd9340 --- /dev/null +++ b/patches/source/vim/patches/7.4.300 @@ -0,0 +1,62 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.300 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.300 +Problem: The way config.cache is removed doesn't always work. +Solution: Always remove config.cache. (Ken Takata) +Files: src/Makefile + + +*** ../vim-7.4.299/src/Makefile 2014-04-29 20:04:05.331539784 +0200 +--- src/Makefile 2014-05-22 14:48:23.034475967 +0200 +*************** +*** 1664,1675 **** + # auto/config.h isn't updated. The dependency on auto/config.mk should make + # sure configure is run when it's needed. + # + config auto/config.mk: auto/configure config.mk.in config.h.in +! if test -f auto/config.cache && \ +! grep '^ac_cv_env_CFLAGS_value=' auto/config.cache > /dev/null && \ +! ! grep -x -F 'ac_cv_env_CFLAGS_value=$(CFLAGS)' auto/config.cache > /dev/null; then \ +! rm auto/config.cache; \ +! fi + if test "X$(MAKECMDGOALS)" != "Xclean" \ + -a "X$(MAKECMDGOALS)" != "Xdistclean" \ + -a "X$(MAKECMDGOALS)" != "Xautoconf" \ +--- 1664,1674 ---- + # auto/config.h isn't updated. The dependency on auto/config.mk should make + # sure configure is run when it's needed. + # ++ # Remove the config.cache every time, once in a while it causes problems that ++ # are very hard to figure out. ++ # + config auto/config.mk: auto/configure config.mk.in config.h.in +! -rm -f auto/config.cache + if test "X$(MAKECMDGOALS)" != "Xclean" \ + -a "X$(MAKECMDGOALS)" != "Xdistclean" \ + -a "X$(MAKECMDGOALS)" != "Xautoconf" \ +*** ../vim-7.4.299/src/version.c 2014-05-22 14:44:08.098481148 +0200 +--- src/version.c 2014-05-22 14:51:36.022472045 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 300, + /**/ + + +-- +What is the difference between a professional and an amateur? +The ark was built by an amateur; professionals gave us the Titanic. + + /// 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/patches/source/vim/patches/7.4.301 b/patches/source/vim/patches/7.4.301 new file mode 100644 index 000000000..5870932c9 --- /dev/null +++ b/patches/source/vim/patches/7.4.301 @@ -0,0 +1,53 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.301 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.301 (after 7.4.280) +Problem: Still a scrolling problem when loading a session file. +Solution: Fix off-by-one mistake. (Nobuhiro Takasaki) +Files: src/window.c + + +*** ../vim-7.4.300/src/window.c 2014-05-07 20:25:30.845273872 +0200 +--- src/window.c 2014-05-22 15:11:58.786447193 +0200 +*************** +*** 5748,5754 **** + lnum++; + wp->w_wrow -= line_size + sline; + } +! else if (sline > 0) + { + /* First line of file reached, use that as topline. */ + lnum = 1; +--- 5748,5754 ---- + lnum++; + wp->w_wrow -= line_size + sline; + } +! else if (sline >= 0) + { + /* First line of file reached, use that as topline. */ + lnum = 1; +*** ../vim-7.4.300/src/version.c 2014-05-22 14:54:22.854468654 +0200 +--- src/version.c 2014-05-22 15:12:33.770446481 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 301, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +191. You rate eating establishments not by the quality of the food, + but by the availability of electrical outlets for your PowerBook. + + /// 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/patches/source/vim/patches/7.4.302 b/patches/source/vim/patches/7.4.302 new file mode 100644 index 000000000..3411f4d48 --- /dev/null +++ b/patches/source/vim/patches/7.4.302 @@ -0,0 +1,78 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.302 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.302 +Problem: Signs placed with 'foldcolumn' set don't show up after filler + lines. +Solution: Take filler lines into account. (Olaf Dabrunz) +Files: src/screen.c + + +*** ../vim-7.4.301/src/screen.c 2014-05-13 20:19:53.573808877 +0200 +--- src/screen.c 2014-05-22 15:27:11.966428633 +0200 +*************** +*** 3553,3563 **** + draw_state = WL_SIGN; + /* Show the sign column when there are any signs in this + * buffer or when using Netbeans. */ +! if (draw_signcolumn(wp) +! # ifdef FEAT_DIFF +! && filler_todo <= 0 +! # endif +! ) + { + int text_sign; + # ifdef FEAT_SIGN_ICONS +--- 3553,3559 ---- + draw_state = WL_SIGN; + /* Show the sign column when there are any signs in this + * buffer or when using Netbeans. */ +! if (draw_signcolumn(wp)) + { + int text_sign; + # ifdef FEAT_SIGN_ICONS +*************** +*** 3569,3575 **** + char_attr = hl_attr(HLF_SC); + n_extra = 2; + +! if (row == startrow) + { + text_sign = buf_getsigntype(wp->w_buffer, lnum, + SIGN_TEXT); +--- 3565,3575 ---- + char_attr = hl_attr(HLF_SC); + n_extra = 2; + +! if (row == startrow +! #ifdef FEAT_DIFF +! + filler_lines && filler_todo <= 0 +! #endif +! ) + { + text_sign = buf_getsigntype(wp->w_buffer, lnum, + SIGN_TEXT); +*** ../vim-7.4.301/src/version.c 2014-05-22 15:17:24.706440568 +0200 +--- src/version.c 2014-05-22 15:46:00.058405705 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 302, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +192. Your boss asks you to "go fer" coffee and you come up with 235 FTP sites. + + /// 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/patches/source/vim/patches/7.4.303 b/patches/source/vim/patches/7.4.303 new file mode 100644 index 000000000..8e49c6948 --- /dev/null +++ b/patches/source/vim/patches/7.4.303 @@ -0,0 +1,85 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.303 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.303 +Problem: When using double-width characters the text displayed on the + command line is sometimes truncated. +Solution: Reset the string lenght. (Nobuhiro Takasaki) +Files: src/screen.c + + +*** ../vim-7.4.302/src/screen.c 2014-05-22 15:51:00.734399594 +0200 +--- src/screen.c 2014-05-22 16:02:24.294385701 +0200 +*************** +*** 6916,6930 **** + * a NUL. + */ + void +! screen_puts_len(text, len, row, col, attr) + char_u *text; +! int len; + int row; + int col; + int attr; + { + unsigned off; + char_u *ptr = text; + int c; + #ifdef FEAT_MBYTE + unsigned max_off; +--- 6916,6931 ---- + * a NUL. + */ + void +! screen_puts_len(text, textlen, row, col, attr) + char_u *text; +! int textlen; + int row; + int col; + int attr; + { + unsigned off; + char_u *ptr = text; ++ int len = textlen; + int c; + #ifdef FEAT_MBYTE + unsigned max_off; +*************** +*** 7169,7175 **** +--- 7170,7180 ---- + col += mbyte_cells; + ptr += mbyte_blen; + if (clear_next_cell) ++ { ++ /* This only happens at the end, display one space next. */ + ptr = (char_u *)" "; ++ len = -1; ++ } + } + else + #endif +*** ../vim-7.4.302/src/version.c 2014-05-22 15:51:00.738399594 +0200 +--- src/version.c 2014-05-22 15:58:15.050390766 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 303, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +193. You ask your girlfriend to drive home so you can sit back with + your PDA and download the information to your 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/patches/source/vim/patches/7.4.304 b/patches/source/vim/patches/7.4.304 new file mode 100644 index 000000000..874d108ca --- /dev/null +++ b/patches/source/vim/patches/7.4.304 @@ -0,0 +1,45 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.304 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.304 +Problem: Cannot always use Python with Vim. +Solution: Add the manifest to the executable. (Jacques Germishuys) +Files: src/Make_mvc.mak + + +*** ../vim-7.4.303/src/Make_mvc.mak 2014-02-15 19:47:46.685882910 +0100 +--- src/Make_mvc.mak 2014-05-22 16:25:40.978357314 +0200 +*************** +*** 973,978 **** +--- 973,979 ---- + $(LUA_OBJ) $(MZSCHEME_OBJ) $(PERL_OBJ) $(PYTHON_OBJ) $(PYTHON3_OBJ) $(RUBY_OBJ) \ + $(TCL_OBJ) $(SNIFF_OBJ) $(CSCOPE_OBJ) $(NETBEANS_OBJ) \ + $(XPM_OBJ) $(OUTDIR)\version.obj $(LINKARGS2) ++ if exist $(VIM).exe.manifest mt.exe -nologo -manifest $(VIM).exe.manifest -updateresource:$(VIM).exe;1 + + $(VIM): $(VIM).exe + +*** ../vim-7.4.303/src/version.c 2014-05-22 16:05:16.342382204 +0200 +--- src/version.c 2014-05-22 16:20:07.534364091 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 304, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +194. Your business cards contain your e-mail and home page 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/patches/source/vim/patches/7.4.305.gz b/patches/source/vim/patches/7.4.305.gz Binary files differnew file mode 100644 index 000000000..3747e1e00 --- /dev/null +++ b/patches/source/vim/patches/7.4.305.gz diff --git a/patches/source/vim/patches/7.4.306 b/patches/source/vim/patches/7.4.306 new file mode 100644 index 000000000..756eb1829 --- /dev/null +++ b/patches/source/vim/patches/7.4.306 @@ -0,0 +1,84 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.306 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.306 +Problem: getchar(0) does not return Esc. +Solution: Do not wait for an Esc sequence to be complete. (Yasuhiro + Matsumoto) +Files: src/eval.c, src/getchar.c + + +*** ../vim-7.4.305/src/eval.c 2014-05-22 14:19:51.674510749 +0200 +--- src/eval.c 2014-05-22 18:59:34.038169656 +0200 +*************** +*** 11313,11325 **** + n = safe_vgetc(); + else if (get_tv_number_chk(&argvars[0], &error) == 1) + /* getchar(1): only check if char avail */ +! n = vpeekc(); +! else if (error || vpeekc() == NUL) + /* illegal argument or getchar(0) and no char avail: return zero */ + n = 0; + else + /* getchar(0) and char avail: return char */ + n = safe_vgetc(); + if (n == K_IGNORE) + continue; + break; +--- 11313,11326 ---- + n = safe_vgetc(); + else if (get_tv_number_chk(&argvars[0], &error) == 1) + /* getchar(1): only check if char avail */ +! n = vpeekc_any(); +! else if (error || vpeekc_any() == NUL) + /* illegal argument or getchar(0) and no char avail: return zero */ + n = 0; + else + /* getchar(0) and char avail: return char */ + n = safe_vgetc(); ++ + if (n == K_IGNORE) + continue; + break; +*** ../vim-7.4.305/src/getchar.c 2014-03-23 15:12:29.919264336 +0100 +--- src/getchar.c 2014-05-22 18:34:13.450200562 +0200 +*************** +*** 1883,1889 **** + } + #endif + +! #if defined(FEAT_INS_EXPAND) || defined(PROTO) + /* + * Check if any character is available, also half an escape sequence. + * Trick: when no typeahead found, but there is something in the typeahead +--- 1883,1889 ---- + } + #endif + +! #if defined(FEAT_INS_EXPAND) || defined(FEAT_EVAL) || defined(PROTO) + /* + * Check if any character is available, also half an escape sequence. + * Trick: when no typeahead found, but there is something in the typeahead +*** ../vim-7.4.305/src/version.c 2014-05-22 18:14:27.570224664 +0200 +--- src/version.c 2014-05-22 18:37:10.734196958 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 306, + /**/ + +-- +Press any key to continue, press any other key to quit. + + /// 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/patches/source/vim/patches/7.4.307 b/patches/source/vim/patches/7.4.307 new file mode 100644 index 000000000..8b0788171 --- /dev/null +++ b/patches/source/vim/patches/7.4.307 @@ -0,0 +1,147 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.307 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.307 (after 7.4.305) +Problem: Can't build without the +termresponse feature. +Solution: Add proper #ifdefs. +Files: src/os_unix.c, src/term.c + + +*** ../vim-7.4.306/src/os_unix.c 2014-05-22 18:14:27.570224664 +0200 +--- src/os_unix.c 2014-05-22 20:29:36.930059845 +0200 +*************** +*** 3743,3749 **** + /* Conflicts with xterm mouse: "\033[" and "\033[M". + * Also conflicts with the xterm termresponse, skip this if it was + * requested already. */ +! if (!use_xterm_mouse() && !did_request_esc_sequence() + # ifdef FEAT_GUI + && !gui.in_use + # endif +--- 3743,3752 ---- + /* Conflicts with xterm mouse: "\033[" and "\033[M". + * Also conflicts with the xterm termresponse, skip this if it was + * requested already. */ +! if (!use_xterm_mouse() +! # ifdef FEAT_TERMRESPONSE +! && !did_request_esc_sequence() +! # endif + # ifdef FEAT_GUI + && !gui.in_use + # endif +*************** +*** 3758,3764 **** + # endif + # ifdef FEAT_MOUSE_PTERM + /* same as the dec mouse */ +! if (!use_xterm_mouse() && !did_request_esc_sequence() + # ifdef FEAT_GUI + && !gui.in_use + # endif +--- 3761,3770 ---- + # endif + # ifdef FEAT_MOUSE_PTERM + /* same as the dec mouse */ +! if (!use_xterm_mouse() +! # ifdef FEAT_TERMRESPONSE +! && !did_request_esc_sequence() +! # endif + # ifdef FEAT_GUI + && !gui.in_use + # endif +*************** +*** 3773,3779 **** + # endif + # ifdef FEAT_MOUSE_URXVT + /* same as the dec mouse */ +! if (use_xterm_mouse() == 3 && !did_request_esc_sequence() + # ifdef FEAT_GUI + && !gui.in_use + # endif +--- 3779,3788 ---- + # endif + # ifdef FEAT_MOUSE_URXVT + /* same as the dec mouse */ +! if (use_xterm_mouse() == 3 +! # ifdef FEAT_TERMRESPONSE +! && !did_request_esc_sequence() +! # endif + # ifdef FEAT_GUI + && !gui.in_use + # endif +*** ../vim-7.4.306/src/term.c 2014-05-22 18:14:27.570224664 +0200 +--- src/term.c 2014-05-22 20:28:34.922061106 +0200 +*************** +*** 3311,3317 **** + } + } + +! #if defined(UNIX) || defined(PROTO) + /* + * Return TRUE when the xterm version was requested or anything else that + * would send an ESC sequence back to Vim. +--- 3311,3318 ---- + } + } + +! #if defined(FEAT_TERMRESPONSE) || defined(PROTO) +! # if defined(UNIX) || defined(PROTO) + /* + * Return TRUE when the xterm version was requested or anything else that + * would send an ESC sequence back to Vim. +*************** +*** 3327,3341 **** + if (u7_status == U7_GET) + u7_status = 0; + return crv_status == CRV_SENT || u7_status == U7_SENT +! # if defined(FEAT_TERMRESPONSE) +! || xt_index_out > xt_index_in +! # endif +! ; + } +! #endif + + +- #if defined(FEAT_TERMRESPONSE) || defined(PROTO) + /* + * Request version string (for xterm) when needed. + * Only do this after switching to raw mode, otherwise the result will be +--- 3328,3338 ---- + if (u7_status == U7_GET) + u7_status = 0; + return crv_status == CRV_SENT || u7_status == U7_SENT +! || xt_index_out > xt_index_in; + } +! # endif + + + /* + * Request version string (for xterm) when needed. + * Only do this after switching to raw mode, otherwise the result will be +*** ../vim-7.4.306/src/version.c 2014-05-22 18:59:54.510169240 +0200 +--- src/version.c 2014-05-22 21:20:36.665997658 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 307, + /**/ + +-- +Some of the well known MS-Windows errors: + ESLEEP Operator fell asleep + ENOERR No error yet + EDOLLAR OS too expensive + EWINDOWS MS-Windows loaded, system in danger + + /// 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/patches/source/vim/patches/7.4.308 b/patches/source/vim/patches/7.4.308 new file mode 100644 index 000000000..f3d6a3c52 --- /dev/null +++ b/patches/source/vim/patches/7.4.308 @@ -0,0 +1,47 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.308 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.308 +Problem: When using ":diffsplit" on an empty file the cursor is displayed + on the command line. +Solution: Limit the value of w_topfill. +Files: src/diff.c + + +*** ../vim-7.4.307/src/diff.c 2013-09-20 20:13:48.000000000 +0200 +--- src/diff.c 2014-05-28 11:30:11.724008432 +0200 +*************** +*** 622,627 **** +--- 622,628 ---- + wp->w_topfill = (n < 0 ? 0 : n); + else if (n > 0 && n > wp->w_topfill) + wp->w_topfill = n; ++ check_topfill(wp, FALSE); + } + } + } +*** ../vim-7.4.307/src/version.c 2014-05-22 21:22:15.361995652 +0200 +--- src/version.c 2014-05-28 11:34:01.064010440 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 308, + /**/ + +-- +msdn.microsoft.com: +ERROR_SUCCESS 0 (0x0) The operation completed successfully. +I have always suspected that for Microsoft success is an error. + + /// 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/patches/source/vim/patches/7.4.309 b/patches/source/vim/patches/7.4.309 new file mode 100644 index 000000000..82c9e0b2d --- /dev/null +++ b/patches/source/vim/patches/7.4.309 @@ -0,0 +1,88 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.309 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.309 +Problem: When increasing the size of the lower window, the upper window + jumps back to the top. (Ron Aaron) +Solution: Change setting the topline. (Nobuhiro Takasaki) +Files: src/window.c + + +*** ../vim-7.4.308/src/window.c 2014-05-22 15:17:24.706440568 +0200 +--- src/window.c 2014-05-28 13:24:40.308068558 +0200 +*************** +*** 5710,5717 **** + --wp->w_wrow; + } + } + } +! else + { + while (sline > 0 && lnum > 1) + { +--- 5710,5718 ---- + --wp->w_wrow; + } + } ++ set_topline(wp, lnum); + } +! else if (sline > 0) + { + while (sline > 0 && lnum > 1) + { +*************** +*** 5748,5761 **** + lnum++; + wp->w_wrow -= line_size + sline; + } +! else if (sline >= 0) + { + /* First line of file reached, use that as topline. */ + lnum = 1; + wp->w_wrow -= sline; + } + } +- set_topline(wp, lnum); + } + + if (wp == curwin) +--- 5749,5763 ---- + lnum++; + wp->w_wrow -= line_size + sline; + } +! else if (sline > 0) + { + /* First line of file reached, use that as topline. */ + lnum = 1; + wp->w_wrow -= sline; + } ++ ++ set_topline(wp, lnum); + } + } + + if (wp == curwin) +*** ../vim-7.4.308/src/version.c 2014-05-28 11:35:33.428011248 +0200 +--- src/version.c 2014-05-28 13:33:54.244073407 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 309, + /**/ + +-- +Don't be humble ... you're not that great. + -- Golda Meir + + /// 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/patches/source/vim/patches/7.4.310 b/patches/source/vim/patches/7.4.310 new file mode 100644 index 000000000..2d25f0f2f --- /dev/null +++ b/patches/source/vim/patches/7.4.310 @@ -0,0 +1,373 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.310 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.310 +Problem: getpos()/setpos() don't include curswant. +Solution: Add a fifth number when getting/setting the cursor. +Files: src/eval.c, src/testdir/test_eval.in, src/testdir/test_eval.ok, + runtime/doc/eval.txt + + +*** ../vim-7.4.309/src/eval.c 2014-05-22 18:59:54.506169240 +0200 +--- src/eval.c 2014-05-28 14:23:37.608099523 +0200 +*************** +*** 764,770 **** + static void f_writefile __ARGS((typval_T *argvars, typval_T *rettv)); + static void f_xor __ARGS((typval_T *argvars, typval_T *rettv)); + +! static int list2fpos __ARGS((typval_T *arg, pos_T *posp, int *fnump)); + static pos_T *var2fpos __ARGS((typval_T *varp, int dollar_lnum, int *fnum)); + static int get_env_len __ARGS((char_u **arg)); + static int get_id_len __ARGS((char_u **arg)); +--- 764,770 ---- + static void f_writefile __ARGS((typval_T *argvars, typval_T *rettv)); + static void f_xor __ARGS((typval_T *argvars, typval_T *rettv)); + +! static int list2fpos __ARGS((typval_T *arg, pos_T *posp, int *fnump, colnr_T *curswantp)); + static pos_T *var2fpos __ARGS((typval_T *varp, int dollar_lnum, int *fnum)); + static int get_env_len __ARGS((char_u **arg)); + static int get_id_len __ARGS((char_u **arg)); +*************** +*** 9799,9812 **** + if (argvars[1].v_type == VAR_UNKNOWN) + { + pos_T pos; + +! if (list2fpos(argvars, &pos, NULL) == FAIL) + return; + line = pos.lnum; + col = pos.col; + #ifdef FEAT_VIRTUALEDIT + coladd = pos.coladd; + #endif + } + else + { +--- 9799,9815 ---- + if (argvars[1].v_type == VAR_UNKNOWN) + { + pos_T pos; ++ colnr_T curswant = -1; + +! if (list2fpos(argvars, &pos, NULL, &curswant) == FAIL) + return; + line = pos.lnum; + col = pos.col; + #ifdef FEAT_VIRTUALEDIT + coladd = pos.coladd; + #endif ++ if (curswant >= 0) ++ curwin->w_curswant = curswant - 1; + } + else + { +*************** +*** 11770,11775 **** +--- 11773,11780 ---- + (fp != NULL) ? (varnumber_T)fp->coladd : + #endif + (varnumber_T)0); ++ if (fp == &curwin->w_cursor) ++ list_append_number(l, (varnumber_T)curwin->w_curswant + 1); + } + else + rettv->vval.v_number = FALSE; +*************** +*** 16751,16762 **** + pos_T pos; + int fnum; + char_u *name; + + rettv->vval.v_number = -1; + name = get_tv_string_chk(argvars); + if (name != NULL) + { +! if (list2fpos(&argvars[1], &pos, &fnum) == OK) + { + if (--pos.col < 0) + pos.col = 0; +--- 16756,16768 ---- + pos_T pos; + int fnum; + char_u *name; ++ colnr_T curswant = -1; + + rettv->vval.v_number = -1; + name = get_tv_string_chk(argvars); + if (name != NULL) + { +! if (list2fpos(&argvars[1], &pos, &fnum, &curswant) == OK) + { + if (--pos.col < 0) + pos.col = 0; +*************** +*** 16766,16771 **** +--- 16772,16779 ---- + if (fnum == curbuf->b_fnum) + { + curwin->w_cursor = pos; ++ if (curswant >= 0) ++ curwin->w_curswant = curswant - 1; + check_cursor(); + rettv->vval.v_number = 0; + } +*************** +*** 19532,19552 **** + * validity. + */ + static int +! list2fpos(arg, posp, fnump) + typval_T *arg; + pos_T *posp; + int *fnump; + { + list_T *l = arg->vval.v_list; + long i = 0; + long n; + +! /* List must be: [fnum, lnum, col, coladd], where "fnum" is only there +! * when "fnump" isn't NULL and "coladd" is optional. */ + if (arg->v_type != VAR_LIST + || l == NULL + || l->lv_len < (fnump == NULL ? 2 : 3) +! || l->lv_len > (fnump == NULL ? 3 : 4)) + return FAIL; + + if (fnump != NULL) +--- 19540,19561 ---- + * validity. + */ + static int +! list2fpos(arg, posp, fnump, curswantp) + typval_T *arg; + pos_T *posp; + int *fnump; ++ colnr_T *curswantp; + { + list_T *l = arg->vval.v_list; + long i = 0; + long n; + +! /* List must be: [fnum, lnum, col, coladd, curswant], where "fnum" is only +! * there when "fnump" isn't NULL; "coladd" and "curswant" are optional. */ + if (arg->v_type != VAR_LIST + || l == NULL + || l->lv_len < (fnump == NULL ? 2 : 3) +! || l->lv_len > (fnump == NULL ? 4 : 5)) + return FAIL; + + if (fnump != NULL) +*************** +*** 19570,19582 **** + posp->col = n; + + #ifdef FEAT_VIRTUALEDIT +! n = list_find_nr(l, i, NULL); + if (n < 0) + posp->coladd = 0; + else + posp->coladd = n; + #endif + + return OK; + } + +--- 19579,19594 ---- + posp->col = n; + + #ifdef FEAT_VIRTUALEDIT +! n = list_find_nr(l, i, NULL); /* off */ + if (n < 0) + posp->coladd = 0; + else + posp->coladd = n; + #endif + ++ if (curswantp != NULL) ++ *curswantp = list_find_nr(l, i + 1, NULL); /* curswant */ ++ + return OK; + } + +*** ../vim-7.4.309/src/testdir/test_eval.in 2014-04-29 17:41:18.351689927 +0200 +--- src/testdir/test_eval.in 2014-05-28 14:22:31.780098947 +0200 +*************** +*** 190,198 **** +--- 190,207 ---- + :$put =v:exception + :endtry + :" ++ :$put ='{{{1 setpos/getpos' ++ /^012345678 ++ 6l:let sp = getpos('.') ++ 0:call setpos('.', sp) ++ jyl:$put ++ :" + :/^start:/+1,$wq! test.out + :" vim: et ts=4 isk-=\: fmr=???,??? + :call getchar() + ENDTEST + ++ 012345678 ++ 012345678 ++ + start: +*** ../vim-7.4.309/src/testdir/test_eval.ok 2014-04-29 17:41:18.351689927 +0200 +--- src/testdir/test_eval.ok 2014-05-28 14:19:31.836097372 +0200 +*************** +*** 346,348 **** +--- 346,350 ---- + Bar exists: 1 + func Bar exists: 1 + Vim(call):E116: Invalid arguments for function append ++ {{{1 setpos/getpos ++ 6 +*** ../vim-7.4.309/runtime/doc/eval.txt 2014-05-07 18:35:25.661216052 +0200 +--- runtime/doc/eval.txt 2014-05-28 14:04:40.928089573 +0200 +*************** +*** 2587,2595 **** + cursor({list}) + Positions the cursor at the column (byte count) {col} in the + line {lnum}. The first column is one. + When there is one argument {list} this is used as a |List| +! with two or three items {lnum}, {col} and {off}. This is like +! the return value of |getpos()|, but without the first item. + Does not change the jumplist. + If {lnum} is greater than the number of lines in the buffer, + the cursor will be positioned at the last line in the buffer. +--- 2587,2600 ---- + cursor({list}) + Positions the cursor at the column (byte count) {col} in the + line {lnum}. The first column is one. ++ + When there is one argument {list} this is used as a |List| +! with two, three or four item: +! [{lnum}, {col}, {off}] +! [{lnum}, {col}, {off}, {curswant}] +! This is like the return value of |getpos()|, but without the +! first item. +! + Does not change the jumplist. + If {lnum} is greater than the number of lines in the buffer, + the cursor will be positioned at the last line in the buffer. +*************** +*** 4475,4482 **** + *getpos()* + getpos({expr}) Get the position for {expr}. For possible values of {expr} + see |line()|. +! The result is a |List| with four numbers: + [bufnum, lnum, col, off] + "bufnum" is zero, unless a mark like '0 or 'A is used, then it + is the buffer number of the mark. + "lnum" and "col" are the position in the buffer. The first +--- 4490,4498 ---- + *getpos()* + getpos({expr}) Get the position for {expr}. For possible values of {expr} + see |line()|. +! The result is a |List| with four or five numbers: + [bufnum, lnum, col, off] ++ [bufnum, lnum, col, off, curswant] + "bufnum" is zero, unless a mark like '0 or 'A is used, then it + is the buffer number of the mark. + "lnum" and "col" are the position in the buffer. The first +*************** +*** 4485,4490 **** +--- 4501,4511 ---- + it is the offset in screen columns from the start of the + character. E.g., a position within a <Tab> or after the last + character. ++ The "curswant" number is only added for getpos('.'), it is the ++ preferred column when moving the cursor vertically. ++ Note that for '< and '> Visual mode matters: when it is "V" ++ (visual line mode) the column of '< is zero and the column of ++ '> is a large number. + This can be used to save and restore the cursor position: > + let save_cursor = getpos(".") + MoveTheCursorAround +*************** +*** 5289,5296 **** + . the cursor + 'x mark x + +! {list} must be a |List| with four numbers: + [bufnum, lnum, col, off] + + "bufnum" is the buffer number. Zero can be used for the + current buffer. Setting the cursor is only possible for +--- 5310,5318 ---- + . the cursor + 'x mark x + +! {list} must be a |List| with four or five numbers: + [bufnum, lnum, col, off] ++ [bufnum, lnum, col, off, curswant] + + "bufnum" is the buffer number. Zero can be used for the + current buffer. Setting the cursor is only possible for +*************** +*** 5308,5320 **** + character. E.g., a position within a <Tab> or after the last + character. + + Returns 0 when the position could be set, -1 otherwise. + An error message is given if {expr} is invalid. + + Also see |getpos()| + + This does not restore the preferred column for moving +! vertically. See |winrestview()| for that. + + + setqflist({list} [, {action}]) *setqflist()* +--- 5330,5355 ---- + character. E.g., a position within a <Tab> or after the last + character. + ++ The "curswant" number is only used when setting the cursor ++ position. It sets the preferred column for when moving the ++ cursor vertically. When the "curswant" number is missing the ++ preferred column is not set. When it is present and setting a ++ mark position it is not used. ++ ++ Note that for '< and '> changing the line number may result in ++ the marks to be effectively be swapped, so that '< is always ++ before '>. ++ + Returns 0 when the position could be set, -1 otherwise. + An error message is given if {expr} is invalid. + + Also see |getpos()| + + This does not restore the preferred column for moving +! vertically; if you set the cursor position with this, |j| and +! |k| motions will jump to previous columns! Use |cursor()| to +! also set the preferred column. Also see the "curswant" key in +! |winrestview()|. + + + setqflist({list} [, {action}]) *setqflist()* +*** ../vim-7.4.309/src/version.c 2014-05-28 13:42:59.884078184 +0200 +--- src/version.c 2014-05-28 14:27:20.132101471 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 310, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +218. Your spouse hands you a gift wrapped magnet with your PC's name + on it and you accuse him or her of genocide. + + /// 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/patches/source/vim/patches/7.4.311 b/patches/source/vim/patches/7.4.311 new file mode 100644 index 000000000..00097883c --- /dev/null +++ b/patches/source/vim/patches/7.4.311 @@ -0,0 +1,127 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.311 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.311 +Problem: Can't use winrestview to only restore part of the view. +Solution: Handle missing items in the dict. (Christian Brabandt) +Files: src/eval.c, runtime/doc/eval.txt + + +*** ../vim-7.4.310/src/eval.c 2014-05-28 14:32:47.156104334 +0200 +--- src/eval.c 2014-05-28 16:42:25.196172421 +0200 +*************** +*** 19231,19250 **** + EMSG(_(e_invarg)); + else + { +! curwin->w_cursor.lnum = get_dict_number(dict, (char_u *)"lnum"); +! curwin->w_cursor.col = get_dict_number(dict, (char_u *)"col"); + #ifdef FEAT_VIRTUALEDIT +! curwin->w_cursor.coladd = get_dict_number(dict, (char_u *)"coladd"); + #endif +! curwin->w_curswant = get_dict_number(dict, (char_u *)"curswant"); +! curwin->w_set_curswant = FALSE; + +! set_topline(curwin, get_dict_number(dict, (char_u *)"topline")); + #ifdef FEAT_DIFF +! curwin->w_topfill = get_dict_number(dict, (char_u *)"topfill"); + #endif +! curwin->w_leftcol = get_dict_number(dict, (char_u *)"leftcol"); +! curwin->w_skipcol = get_dict_number(dict, (char_u *)"skipcol"); + + check_cursor(); + win_new_height(curwin, curwin->w_height); +--- 19231,19260 ---- + EMSG(_(e_invarg)); + else + { +! if (dict_find(dict, (char_u *)"lnum", -1) != NULL) +! curwin->w_cursor.lnum = get_dict_number(dict, (char_u *)"lnum"); +! if (dict_find(dict, (char_u *)"col", -1) != NULL) +! curwin->w_cursor.col = get_dict_number(dict, (char_u *)"col"); + #ifdef FEAT_VIRTUALEDIT +! if (dict_find(dict, (char_u *)"coladd", -1) != NULL) +! curwin->w_cursor.coladd = get_dict_number(dict, (char_u *)"coladd"); + #endif +! if (dict_find(dict, (char_u *)"curswant", -1) != NULL) +! { +! curwin->w_curswant = get_dict_number(dict, (char_u *)"curswant"); +! curwin->w_set_curswant = FALSE; +! } + +! if (dict_find(dict, (char_u *)"topline", -1) != NULL) +! set_topline(curwin, get_dict_number(dict, (char_u *)"topline")); + #ifdef FEAT_DIFF +! if (dict_find(dict, (char_u *)"topfill", -1) != NULL) +! curwin->w_topfill = get_dict_number(dict, (char_u *)"topfill"); + #endif +! if (dict_find(dict, (char_u *)"leftcol", -1) != NULL) +! curwin->w_leftcol = get_dict_number(dict, (char_u *)"leftcol"); +! if (dict_find(dict, (char_u *)"skipcol", -1) != NULL) +! curwin->w_skipcol = get_dict_number(dict, (char_u *)"skipcol"); + + check_cursor(); + win_new_height(curwin, curwin->w_height); +*** ../vim-7.4.310/runtime/doc/eval.txt 2014-05-28 14:32:47.164104334 +0200 +--- runtime/doc/eval.txt 2014-05-28 16:42:25.192172421 +0200 +*************** +*** 6404,6409 **** +--- 6414,6429 ---- + winrestview({dict}) + Uses the |Dictionary| returned by |winsaveview()| to restore + the view of the current window. ++ Note: The {dict} does not have to contain all values, that are ++ returned by |winsaveview()|. If values are missing, those ++ settings won't be restored. So you can use: > ++ :call winrestview({'curswant': 4}) ++ < ++ This will only set the curswant value (the column the cursor ++ wants to move on vertical movements) of the cursor to column 5 ++ (yes, that is 5), while all other settings will remain the ++ same. This is useful, if you set the cursor position manually. ++ + If you have changed the values the result is unpredictable. + If the window size changed the result won't be the same. + +*************** +*** 6418,6424 **** + not opened when moving around. + The return value includes: + lnum cursor line number +! col cursor column + coladd cursor column offset for 'virtualedit' + curswant column for vertical movement + topline first line in the window +--- 6438,6446 ---- + not opened when moving around. + The return value includes: + lnum cursor line number +! col cursor column (Note: the first column +! zero, as opposed to what getpos() +! returns) + coladd cursor column offset for 'virtualedit' + curswant column for vertical movement + topline first line in the window +*** ../vim-7.4.310/src/version.c 2014-05-28 14:32:47.164104334 +0200 +--- src/version.c 2014-05-28 16:45:19.200173944 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 311, + /**/ + +-- +Your fault: core dumped + + /// 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/patches/source/vim/patches/7.4.312 b/patches/source/vim/patches/7.4.312 new file mode 100644 index 000000000..14bc1c1c9 --- /dev/null +++ b/patches/source/vim/patches/7.4.312 @@ -0,0 +1,194 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.312 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.312 +Problem: Cannot figure out what argument list is being used for a window. +Solution: Add the arglistid() function. (Marcin Szamotulski) +Files: runtime/doc/eval.txt, runtime/doc/usr_41.txt, src/eval.c, + src/ex_docmd.c, src/globals.h, src/structs.h, src/main.c + + +*** ../vim-7.4.311/runtime/doc/eval.txt 2014-05-28 16:47:11.396174926 +0200 +--- runtime/doc/eval.txt 2014-05-28 18:00:06.248213223 +0200 +*************** +*** 1716,1721 **** +--- 1716,1723 ---- + append( {lnum}, {list}) Number append lines {list} below line {lnum} + argc() Number number of files in the argument list + argidx() Number current index in the argument list ++ arglistid( [{winnr}, [ {tabnr}]]) ++ Number argument list id + argv( {nr}) String {nr} entry of the argument list + argv( ) List the argument list + asin( {expr}) Float arc sine of {expr} +*************** +*** 2103,2108 **** +--- 2105,2122 ---- + argidx() The result is the current index in the argument list. 0 is + the first file. argc() - 1 is the last one. See |arglist|. + ++ *arglistid()* ++ arglistid([{winnr}, [ {tabnr} ]]) ++ Return the argument list ID. This is a number which ++ identifies the argument list being used. Zero is used for the ++ global argument list. ++ Return zero if the arguments are invalid. ++ ++ Without arguments use the current window. ++ With {winnr} only use this window in the current tab page. ++ With {winnr} and {tabnr} use the window in the specified tab ++ page. ++ + *argv()* + argv([{nr}]) The result is the {nr}th file in the argument list of the + current window. See |arglist|. "argv(0)" is the first one. +*** ../vim-7.4.311/runtime/doc/usr_41.txt 2014-03-25 18:23:27.054087691 +0100 +--- runtime/doc/usr_41.txt 2014-05-28 18:07:43.096217222 +0200 +*************** +*** 770,775 **** +--- 772,778 ---- + Buffers, windows and the argument list: + argc() number of entries in the argument list + argidx() current position in the argument list ++ arglistid() get id of the argument list + argv() get one entry from the argument list + bufexists() check if a buffer exists + buflisted() check if a buffer exists and is listed +*** ../vim-7.4.311/src/eval.c 2014-05-28 16:47:11.392174926 +0200 +--- src/eval.c 2014-05-28 18:11:10.264219035 +0200 +*************** +*** 463,468 **** +--- 463,469 ---- + static void f_append __ARGS((typval_T *argvars, typval_T *rettv)); + static void f_argc __ARGS((typval_T *argvars, typval_T *rettv)); + static void f_argidx __ARGS((typval_T *argvars, typval_T *rettv)); ++ static void f_arglistid __ARGS((typval_T *argvars, typval_T *rettv)); + static void f_argv __ARGS((typval_T *argvars, typval_T *rettv)); + #ifdef FEAT_FLOAT + static void f_asin __ARGS((typval_T *argvars, typval_T *rettv)); +*************** +*** 7875,7880 **** +--- 7876,7882 ---- + {"append", 2, 2, f_append}, + {"argc", 0, 0, f_argc}, + {"argidx", 0, 0, f_argidx}, ++ {"arglistid", 0, 2, f_arglistid}, + {"argv", 0, 1, f_argv}, + #ifdef FEAT_FLOAT + {"asin", 1, 1, f_asin}, /* WJMc */ +*************** +*** 8859,8864 **** +--- 8861,8901 ---- + } + + /* ++ * "arglistid()" function ++ */ ++ static void ++ f_arglistid(argvars, rettv) ++ typval_T *argvars UNUSED; ++ typval_T *rettv; ++ { ++ win_T *wp; ++ tabpage_T *tp = NULL; ++ long n; ++ ++ rettv->vval.v_number = -1; ++ if (argvars[0].v_type != VAR_UNKNOWN) ++ { ++ if (argvars[1].v_type != VAR_UNKNOWN) ++ { ++ n = get_tv_number(&argvars[1]); ++ if (n >= 0) ++ tp = find_tabpage(n); ++ } ++ else ++ tp = curtab; ++ ++ if (tp != NULL) ++ { ++ wp = find_win_by_nr(&argvars[0], tp); ++ if (wp != NULL) ++ rettv->vval.v_number = wp->w_alist->id; ++ } ++ } ++ else ++ rettv->vval.v_number = curwin->w_alist->id; ++ } ++ ++ /* + * "argv(nr)" function + */ + static void +*** ../vim-7.4.311/src/ex_docmd.c 2014-05-07 21:14:42.913299714 +0200 +--- src/ex_docmd.c 2014-05-28 18:10:01.696218435 +0200 +*************** +*** 7211,7216 **** +--- 7211,7217 ---- + else + { + curwin->w_alist->al_refcount = 1; ++ curwin->w_alist->id = ++max_alist_id; + alist_init(curwin->w_alist); + } + } +*** ../vim-7.4.311/src/globals.h 2014-05-22 18:14:27.570224664 +0200 +--- src/globals.h 2014-05-28 17:56:53.392211534 +0200 +*************** +*** 601,606 **** +--- 601,607 ---- + * to this when the window is using the global argument list. + */ + EXTERN alist_T global_alist; /* global argument list */ ++ EXTERN int max_alist_id INIT(= 0); /* the previous argument list id */ + EXTERN int arg_had_last INIT(= FALSE); /* accessed last file in + global_alist */ + +*** ../vim-7.4.311/src/structs.h 2014-05-13 20:19:53.573808877 +0200 +--- src/structs.h 2014-05-28 17:54:18.312210177 +0200 +*************** +*** 675,680 **** +--- 675,681 ---- + { + garray_T al_ga; /* growarray with the array of file names */ + int al_refcount; /* number of windows using this arglist */ ++ int id; /* id of this arglist */ + } alist_T; + + /* +*** ../vim-7.4.311/src/main.c 2014-04-01 19:55:46.252787300 +0200 +--- src/main.c 2014-05-28 18:09:32.040218175 +0200 +*************** +*** 322,327 **** +--- 322,328 ---- + init_yank(); /* init yank buffers */ + + alist_init(&global_alist); /* Init the argument list to empty. */ ++ global_alist.id = 0; + + /* + * Set the default values for the options. +*** ../vim-7.4.311/src/version.c 2014-05-28 16:47:11.396174926 +0200 +--- src/version.c 2014-05-28 17:25:32.644195071 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 312, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +222. You send more than 20 personal e-mails a 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/patches/source/vim/patches/7.4.313 b/patches/source/vim/patches/7.4.313 new file mode 100644 index 000000000..39468e0ad --- /dev/null +++ b/patches/source/vim/patches/7.4.313 @@ -0,0 +1,320 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.313 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.313 (after 7.4.310) +Problem: Changing the return value of getpos() causes an error. (Jie Zhu) +Solution: Revert getpos() and add getcurpos(). +Files: src/eval.c, src/testdir/test_eval.in, src/testdir/test_eval.ok, + runtime/doc/eval.txt + + +*** ../vim-7.4.312/src/eval.c 2014-05-28 18:22:37.876225054 +0200 +--- src/eval.c 2014-05-28 20:11:55.364282457 +0200 +*************** +*** 560,565 **** +--- 560,566 ---- + static void f_getline __ARGS((typval_T *argvars, typval_T *rettv)); + static void f_getmatches __ARGS((typval_T *argvars, typval_T *rettv)); + static void f_getpid __ARGS((typval_T *argvars, typval_T *rettv)); ++ static void f_getcurpos __ARGS((typval_T *argvars, typval_T *rettv)); + static void f_getpos __ARGS((typval_T *argvars, typval_T *rettv)); + static void f_getqflist __ARGS((typval_T *argvars, typval_T *rettv)); + static void f_getreg __ARGS((typval_T *argvars, typval_T *rettv)); +*************** +*** 7967,7972 **** +--- 7968,7974 ---- + {"getcmdline", 0, 0, f_getcmdline}, + {"getcmdpos", 0, 0, f_getcmdpos}, + {"getcmdtype", 0, 0, f_getcmdtype}, ++ {"getcurpos", 0, 0, f_getcurpos}, + {"getcwd", 0, 0, f_getcwd}, + {"getfontname", 0, 1, f_getfontname}, + {"getfperm", 1, 1, f_getfperm}, +*************** +*** 11780,11785 **** +--- 11782,11800 ---- + rettv->vval.v_number = mch_get_pid(); + } + ++ static void getpos_both __ARGS((typval_T *argvars, typval_T *rettv, int getcurpos)); ++ ++ /* ++ * "getcurpos()" function ++ */ ++ static void ++ f_getcurpos(argvars, rettv) ++ typval_T *argvars; ++ typval_T *rettv; ++ { ++ getpos_both(argvars, rettv, TRUE); ++ } ++ + /* + * "getpos(string)" function + */ +*************** +*** 11788,11793 **** +--- 11803,11817 ---- + typval_T *argvars; + typval_T *rettv; + { ++ getpos_both(argvars, rettv, FALSE); ++ } ++ ++ static void ++ getpos_both(argvars, rettv, getcurpos) ++ typval_T *argvars; ++ typval_T *rettv; ++ int getcurpos; ++ { + pos_T *fp; + list_T *l; + int fnum = -1; +*************** +*** 11795,11801 **** + if (rettv_list_alloc(rettv) == OK) + { + l = rettv->vval.v_list; +! fp = var2fpos(&argvars[0], TRUE, &fnum); + if (fnum != -1) + list_append_number(l, (varnumber_T)fnum); + else +--- 11819,11828 ---- + if (rettv_list_alloc(rettv) == OK) + { + l = rettv->vval.v_list; +! if (getcurpos) +! fp = &curwin->w_cursor; +! else +! fp = var2fpos(&argvars[0], TRUE, &fnum); + if (fnum != -1) + list_append_number(l, (varnumber_T)fnum); + else +*************** +*** 11810,11816 **** + (fp != NULL) ? (varnumber_T)fp->coladd : + #endif + (varnumber_T)0); +! if (fp == &curwin->w_cursor) + list_append_number(l, (varnumber_T)curwin->w_curswant + 1); + } + else +--- 11837,11843 ---- + (fp != NULL) ? (varnumber_T)fp->coladd : + #endif + (varnumber_T)0); +! if (getcurpos) + list_append_number(l, (varnumber_T)curwin->w_curswant + 1); + } + else +*** ../vim-7.4.312/src/testdir/test_eval.in 2014-05-28 14:32:47.160104334 +0200 +--- src/testdir/test_eval.in 2014-05-28 20:14:27.048283785 +0200 +*************** +*** 190,198 **** + :$put =v:exception + :endtry + :" +! :$put ='{{{1 setpos/getpos' + /^012345678 +! 6l:let sp = getpos('.') + 0:call setpos('.', sp) + jyl:$put + :" +--- 190,198 ---- + :$put =v:exception + :endtry + :" +! :$put ='{{{1 getcurpos/setpos' + /^012345678 +! 6l:let sp = getcurpos() + 0:call setpos('.', sp) + jyl:$put + :" +*** ../vim-7.4.312/src/testdir/test_eval.ok 2014-05-28 14:32:47.160104334 +0200 +--- src/testdir/test_eval.ok 2014-05-28 20:14:43.316283927 +0200 +*************** +*** 346,350 **** + Bar exists: 1 + func Bar exists: 1 + Vim(call):E116: Invalid arguments for function append +! {{{1 setpos/getpos + 6 +--- 346,350 ---- + Bar exists: 1 + func Bar exists: 1 + Vim(call):E116: Invalid arguments for function append +! {{{1 getcurpos/setpos + 6 +*** ../vim-7.4.312/runtime/doc/eval.txt 2014-05-28 18:22:37.872225054 +0200 +--- runtime/doc/eval.txt 2014-05-28 20:27:57.092290876 +0200 +*************** +*** 1808,1817 **** + getcmdline() String return the current command-line + getcmdpos() Number return cursor position in command-line + getcmdtype() String return the current command-line type + getcwd() String the current working directory + getfperm( {fname}) String file permissions of file {fname} + getfsize( {fname}) Number size in bytes of file {fname} +- getfontname( [{name}]) String name of font being used + getftime( {fname}) Number last modification time of file + getftype( {fname}) String description of type of file {fname} + getline( {lnum}) String line {lnum} of current buffer +--- 1808,1818 ---- + getcmdline() String return the current command-line + getcmdpos() Number return cursor position in command-line + getcmdtype() String return the current command-line type ++ getcurpos() List position of the cursor + getcwd() String the current working directory ++ getfontname( [{name}]) String name of font being used + getfperm( {fname}) String file permissions of file {fname} + getfsize( {fname}) Number size in bytes of file {fname} + getftime( {fname}) Number last modification time of file + getftype( {fname}) String description of type of file {fname} + getline( {lnum}) String line {lnum} of current buffer +*************** +*** 2606,2613 **** + with two, three or four item: + [{lnum}, {col}, {off}] + [{lnum}, {col}, {off}, {curswant}] +! This is like the return value of |getpos()|, but without the +! first item. + + Does not change the jumplist. + If {lnum} is greater than the number of lines in the buffer, +--- 2607,2614 ---- + with two, three or four item: + [{lnum}, {col}, {off}] + [{lnum}, {col}, {off}, {curswant}] +! This is like the return value of |getpos()| or |getcurpos|, +! but without the first item. + + Does not change the jumplist. + If {lnum} is greater than the number of lines in the buffer, +*************** +*** 2617,2622 **** +--- 2618,2625 ---- + the cursor will be positioned at the last character in the + line. + If {col} is zero, the cursor will stay in the current column. ++ If {curswant} is given it is used to set the preferred column ++ for vertical movment. Otherwise {col} is used. + When 'virtualedit' is used {off} specifies the offset in + screen columns from the start of the character. E.g., a + position within a <Tab> or after the last character. +*************** +*** 3339,3344 **** +--- 3347,3363 ---- + Returns an empty string otherwise. + Also see |getcmdpos()|, |setcmdpos()| and |getcmdline()|. + ++ *getcurpos()* ++ getcurpos() Get the position of the cursor. This is like getpos('.'), but ++ includes an extra item in the list: ++ [bufnum, lnum, col, off, curswant] ++ The "curswant" number is the preferred column when moving the ++ cursor vertically. ++ This can be used to save and restore the cursor position: > ++ let save_cursor = getcurpos() ++ MoveTheCursorAround ++ call setpos('.', save_cursor) ++ + *getcwd()* + getcwd() The result is a String, which is the name of the current + working directory. +*************** +*** 4493,4502 **** + + *getpos()* + getpos({expr}) Get the position for {expr}. For possible values of {expr} +! see |line()|. +! The result is a |List| with four or five numbers: + [bufnum, lnum, col, off] +- [bufnum, lnum, col, off, curswant] + "bufnum" is zero, unless a mark like '0 or 'A is used, then it + is the buffer number of the mark. + "lnum" and "col" are the position in the buffer. The first +--- 4517,4526 ---- + + *getpos()* + getpos({expr}) Get the position for {expr}. For possible values of {expr} +! see |line()|. For getting the cursor position see +! |getcurpos()|. +! The result is a |List| with four numbers: + [bufnum, lnum, col, off] + "bufnum" is zero, unless a mark like '0 or 'A is used, then it + is the buffer number of the mark. + "lnum" and "col" are the position in the buffer. The first +*************** +*** 4505,4520 **** + it is the offset in screen columns from the start of the + character. E.g., a position within a <Tab> or after the last + character. +- The "curswant" number is only added for getpos('.'), it is the +- preferred column when moving the cursor vertically. + Note that for '< and '> Visual mode matters: when it is "V" + (visual line mode) the column of '< is zero and the column of + '> is a large number. +! This can be used to save and restore the cursor position: > +! let save_cursor = getpos(".") +! MoveTheCursorAround +! call setpos('.', save_cursor) +! < Also see |setpos()|. + + or({expr}, {expr}) *or()* + Bitwise OR on the two arguments. The arguments are converted +--- 4529,4542 ---- + it is the offset in screen columns from the start of the + character. E.g., a position within a <Tab> or after the last + character. + Note that for '< and '> Visual mode matters: when it is "V" + (visual line mode) the column of '< is zero and the column of + '> is a large number. +! This can be used to save and restore the position of a mark: > +! let save_a_mark = getpos("'a") +! ... +! call setpos(''a', save_a_mark +! < Also see |getcurpos()| and |setpos()|. + + or({expr}, {expr}) *or()* + Bitwise OR on the two arguments. The arguments are converted +*************** +*** 5347,5353 **** + Returns 0 when the position could be set, -1 otherwise. + An error message is given if {expr} is invalid. + +! Also see |getpos()| + + This does not restore the preferred column for moving + vertically; if you set the cursor position with this, |j| and +--- 5369,5375 ---- + Returns 0 when the position could be set, -1 otherwise. + An error message is given if {expr} is invalid. + +! Also see |getpos()| and |getcurpos()|. + + This does not restore the preferred column for moving + vertically; if you set the cursor position with this, |j| and +*** ../vim-7.4.312/src/version.c 2014-05-28 18:22:37.880225054 +0200 +--- src/version.c 2014-05-28 20:15:52.164284530 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 313, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +225. You sign up for free subscriptions for all the computer magazines + + /// 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/patches/source/vim/patches/7.4.314 b/patches/source/vim/patches/7.4.314 new file mode 100644 index 000000000..9308e38c9 --- /dev/null +++ b/patches/source/vim/patches/7.4.314 @@ -0,0 +1,178 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.314 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.314 +Problem: Completion messages can get in the way of a plugin. +Solution: Add 'c' flag to 'shortmess' option. (Shougo Matsu) +Files: runtime/doc/options.txt, src/edit.c, src/option.h, src/screen.c + + +*** ../vim-7.4.313/runtime/doc/options.txt 2014-03-12 18:55:52.096906804 +0100 +--- runtime/doc/options.txt 2014-05-28 20:55:14.640305211 +0200 +*************** +*** 6252,6257 **** +--- 6254,6262 ---- + A don't give the "ATTENTION" message when an existing swap file + is found. + I don't give the intro message when starting Vim |:intro|. ++ c don't give |ins-completion-menu| messages. For example, ++ "-- XXX completion (YYY)", "match 1 of 2", "The only match", ++ "Pattern not found", "Back at original", etc. + + This gives you the opportunity to avoid that a change between buffers + requires you to hit <Enter>, but still gives as useful a message as +*** ../vim-7.4.313/src/edit.c 2014-04-29 14:44:31.515875819 +0200 +--- src/edit.c 2014-05-28 21:33:57.588325545 +0200 +*************** +*** 3854,3860 **** + ins_compl_free(); + compl_started = FALSE; + compl_matches = 0; +! msg_clr_cmdline(); /* necessary for "noshowmode" */ + ctrl_x_mode = 0; + compl_enter_selects = FALSE; + if (edit_submode != NULL) +--- 3854,3861 ---- + ins_compl_free(); + compl_started = FALSE; + compl_matches = 0; +! if (!shortmess(SHM_COMPLETIONMENU)) +! msg_clr_cmdline(); /* necessary for "noshowmode" */ + ctrl_x_mode = 0; + compl_enter_selects = FALSE; + if (edit_submode != NULL) +*************** +*** 5285,5291 **** + { + ctrl_x_mode = 0; + edit_submode = NULL; +! msg_clr_cmdline(); + return FAIL; + } + +--- 5286,5293 ---- + { + ctrl_x_mode = 0; + edit_submode = NULL; +! if (!shortmess(SHM_COMPLETIONMENU)) +! msg_clr_cmdline(); + return FAIL; + } + +*************** +*** 5544,5558 **** + + /* Show a message about what (completion) mode we're in. */ + showmode(); +! if (edit_submode_extra != NULL) + { +! if (!p_smd) +! msg_attr(edit_submode_extra, +! edit_submode_highl < HLF_COUNT +! ? hl_attr(edit_submode_highl) : 0); + } +- else +- msg_clr_cmdline(); /* necessary for "noshowmode" */ + + /* Show the popup menu, unless we got interrupted. */ + if (!compl_interrupted) +--- 5546,5563 ---- + + /* Show a message about what (completion) mode we're in. */ + showmode(); +! if (!shortmess(SHM_COMPLETIONMENU)) + { +! if (edit_submode_extra != NULL) +! { +! if (!p_smd) +! msg_attr(edit_submode_extra, +! edit_submode_highl < HLF_COUNT +! ? hl_attr(edit_submode_highl) : 0); +! } +! else +! msg_clr_cmdline(); /* necessary for "noshowmode" */ + } + + /* Show the popup menu, unless we got interrupted. */ + if (!compl_interrupted) +*** ../vim-7.4.313/src/option.h 2014-03-23 15:12:29.943264337 +0100 +--- src/option.h 2014-05-28 21:34:25.244325787 +0200 +*************** +*** 212,218 **** + #define SHM_SEARCH 's' /* no search hit bottom messages */ + #define SHM_ATTENTION 'A' /* no ATTENTION messages */ + #define SHM_INTRO 'I' /* intro messages */ +! #define SHM_ALL "rmfixlnwaWtToOsAI" /* all possible flags for 'shm' */ + + /* characters for p_go: */ + #define GO_ASEL 'a' /* autoselect */ +--- 212,219 ---- + #define SHM_SEARCH 's' /* no search hit bottom messages */ + #define SHM_ATTENTION 'A' /* no ATTENTION messages */ + #define SHM_INTRO 'I' /* intro messages */ +! #define SHM_COMPLETIONMENU 'c' /* completion menu messages */ +! #define SHM_ALL "rmfixlnwaWtToOsAIc" /* all possible flags for 'shm' */ + + /* characters for p_go: */ + #define GO_ASEL 'a' /* autoselect */ +*** ../vim-7.4.313/src/screen.c 2014-05-22 16:05:16.338382204 +0200 +--- src/screen.c 2014-05-28 20:53:20.488304211 +0200 +*************** +*** 42,48 **** + * + * The part of the buffer that is displayed in a window is set with: + * - w_topline (first buffer line in window) +! * - w_topfill (filler line above the first line) + * - w_leftcol (leftmost window cell in window), + * - w_skipcol (skipped window cells of first line) + * +--- 42,48 ---- + * + * The part of the buffer that is displayed in a window is set with: + * - w_topline (first buffer line in window) +! * - w_topfill (filler lines above the first line) + * - w_leftcol (leftmost window cell in window), + * - w_skipcol (skipped window cells of first line) + * +*************** +*** 9683,9689 **** + } + #endif + #ifdef FEAT_INS_EXPAND +! if (edit_submode != NULL) /* CTRL-X in Insert mode */ + { + /* These messages can get long, avoid a wrap in a narrow + * window. Prefer showing edit_submode_extra. */ +--- 9683,9690 ---- + } + #endif + #ifdef FEAT_INS_EXPAND +! /* CTRL-X in Insert mode */ +! if (edit_submode != NULL && !shortmess(SHM_COMPLETIONMENU)) + { + /* These messages can get long, avoid a wrap in a narrow + * window. Prefer showing edit_submode_extra. */ +*** ../vim-7.4.313/src/version.c 2014-05-28 20:31:37.504292805 +0200 +--- src/version.c 2014-05-28 20:54:27.664304800 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 314, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +227. You sleep next to your monitor. Or on top of it. + + /// 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/patches/source/vim/patches/7.4.315 b/patches/source/vim/patches/7.4.315 new file mode 100644 index 000000000..ab52ec577 --- /dev/null +++ b/patches/source/vim/patches/7.4.315 @@ -0,0 +1,229 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.315 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.315 (after 7.4.309) +Problem: Fixes for computation of topline not tested. +Solution: Add test. (Hirohito Higashi) +Files: 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/testdir/test107.in, src/testdir/test107.ok + + +*** ../vim-7.4.314/src/testdir/Make_amiga.mak 2014-04-29 12:15:22.852032651 +0200 +--- src/testdir/Make_amiga.mak 2014-05-28 13:13:32.108062709 +0200 +*************** +*** 35,41 **** + 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 \ +! test104.out test105.out test106.out \ + test_autoformat_join.out \ + test_eval.out \ + test_options.out +--- 35,41 ---- + 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 \ +! test104.out test105.out test106.out test107.out \ + test_autoformat_join.out \ + test_eval.out \ + test_options.out +*************** +*** 161,166 **** +--- 161,167 ---- + test104.out: test104.in + test105.out: test105.in + test106.out: test106.in ++ test107.out: test107.in + test_autoformat_join.out: test_autoformat_join.in + test_eval.out: test_eval.in + test_options.out: test_options.in +*** ../vim-7.4.314/src/testdir/Make_dos.mak 2014-04-29 12:15:22.852032651 +0200 +--- src/testdir/Make_dos.mak 2014-05-28 13:13:44.344062816 +0200 +*************** +*** 34,40 **** + 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 test104.out \ +! test105.out test106.out \ + test_autoformat_join.out \ + test_eval.out \ + test_options.out +--- 34,40 ---- + 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 test104.out \ +! test105.out test106.out test107.out\ + test_autoformat_join.out \ + test_eval.out \ + test_options.out +*** ../vim-7.4.314/src/testdir/Make_ming.mak 2014-04-29 12:15:22.852032651 +0200 +--- src/testdir/Make_ming.mak 2014-05-28 13:13:52.656062889 +0200 +*************** +*** 54,60 **** + 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 test104.out \ +! test105.out test106.out \ + test_autoformat_join.out \ + test_eval.out \ + test_options.out +--- 54,60 ---- + 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 test104.out \ +! test105.out test106.out test107.out \ + test_autoformat_join.out \ + test_eval.out \ + test_options.out +*** ../vim-7.4.314/src/testdir/Make_os2.mak 2014-04-29 12:15:22.852032651 +0200 +--- src/testdir/Make_os2.mak 2014-05-28 13:14:03.616062985 +0200 +*************** +*** 36,42 **** + 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 test104.out \ +! test105.out test106.out \ + test_autoformat_join.out \ + test_eval.out \ + test_options.out +--- 36,42 ---- + 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 test104.out \ +! test105.out test106.out test107.out \ + test_autoformat_join.out \ + test_eval.out \ + test_options.out +*** ../vim-7.4.314/src/testdir/Make_vms.mms 2014-04-29 12:15:22.852032651 +0200 +--- src/testdir/Make_vms.mms 2014-05-28 13:14:09.724063038 +0200 +*************** +*** 4,10 **** + # Authors: Zoltan Arpadffy, <arpadffy@polarhome.com> + # Sandor Kopanyi, <sandor.kopanyi@mailbox.hu> + # +! # Last change: 2014 Mar 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, <arpadffy@polarhome.com> + # Sandor Kopanyi, <sandor.kopanyi@mailbox.hu> + # +! # Last change: 2014 May 28 + # + # 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. +*************** +*** 95,101 **** + test90.out test91.out test92.out test93.out test94.out \ + test95.out test96.out test98.out test99.out \ + test100.out test101.out test103.out test104.out \ +! test105.out test106.out \ + test_autoformat_join.out \ + test_eval.out \ + test_options.out +--- 95,101 ---- + test90.out test91.out test92.out test93.out test94.out \ + test95.out test96.out test98.out test99.out \ + test100.out test101.out test103.out test104.out \ +! test105.out test106.out test107.out \ + test_autoformat_join.out \ + test_eval.out \ + test_options.out +*** ../vim-7.4.314/src/testdir/Makefile 2014-05-22 13:12:25.650592983 +0200 +--- src/testdir/Makefile 2014-05-28 13:14:28.688063204 +0200 +*************** +*** 32,38 **** + 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 \ +! test104.out test105.out test106.out \ + test_autoformat_join.out \ + test_eval.out \ + test_options.out +--- 32,38 ---- + 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 \ +! test104.out test105.out test106.out test107.out \ + test_autoformat_join.out \ + test_eval.out \ + test_options.out +*** ../vim-7.4.314/src/testdir/test107.in 2014-05-29 11:46:48.728773486 +0200 +--- src/testdir/test107.in 2014-05-29 11:40:20.096770084 +0200 +*************** +*** 0 **** +--- 1,38 ---- ++ Tests for adjusting window and contents vim: set ft=vim : ++ ++ STARTTEST ++ :so small.vim ++ :new ++ :call setline(1, range(1,256)) ++ :let r=[] ++ :func! GetScreenStr(row) ++ : let str = "" ++ : for c in range(1,3) ++ : let str .= nr2char(screenchar(a:row, c)) ++ : endfor ++ : return str ++ :endfunc ++ : ++ :exe ":norm! \<C-W>t\<C-W>=1Gzt\<C-W>w\<C-W>+" ++ :let s3=GetScreenStr(1) ++ :wincmd p ++ :call add(r, [line("w0"), s3]) ++ : ++ :exe ":norm! \<C-W>t\<C-W>=50Gzt\<C-W>w\<C-W>+" ++ :let s3=GetScreenStr(1) ++ :wincmd p ++ :call add(r, [line("w0"), s3]) ++ : ++ :exe ":norm! \<C-W>t\<C-W>=59Gzt\<C-W>w\<C-W>+" ++ :let s3=GetScreenStr(1) ++ ::wincmd p ++ :call add(r, [line("w0"), s3]) ++ : ++ :bwipeout! ++ :$put=r ++ :call garbagecollect(1) ++ :" ++ :/^start:/,$wq! test.out ++ ENDTEST ++ ++ start: +*** ../vim-7.4.314/src/testdir/test107.ok 2014-05-29 11:46:48.736773486 +0200 +--- src/testdir/test107.ok 2014-05-29 11:40:20.096770084 +0200 +*************** +*** 0 **** +--- 1,4 ---- ++ start: ++ [1, '1 '] ++ [50, '50 '] ++ [59, '59 '] +*** ../vim-7.4.314/src/version.c 2014-05-28 21:40:47.092329130 +0200 +--- src/version.c 2014-05-29 11:41:47.640770850 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 315, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +229. You spend so much time thinking what to add on this list. + + /// 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/patches/source/vim/patches/7.4.316 b/patches/source/vim/patches/7.4.316 new file mode 100644 index 000000000..89b3b5011 --- /dev/null +++ b/patches/source/vim/patches/7.4.316 @@ -0,0 +1,52 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.316 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.316 +Problem: Warning from 64-bit compiler. +Solution: Add type cast. (Mike Williams) +Files: src/ex_getln.c + + +*** ../vim-7.4.315/src/ex_getln.c 2014-05-07 18:35:25.665216052 +0200 +--- src/ex_getln.c 2014-05-29 14:32:53.584860716 +0200 +*************** +*** 5202,5208 **** + for (i = 0; i < num_p; ++i) + { + ((char_u **)ga->ga_data)[ga->ga_len] = +! vim_strnsave(p[i], STRLEN(p[i])); + ++ga->ga_len; + } + } +--- 5202,5208 ---- + for (i = 0; i < num_p; ++i) + { + ((char_u **)ga->ga_data)[ga->ga_len] = +! vim_strnsave(p[i], (int)STRLEN(p[i])); + ++ga->ga_len; + } + } +*** ../vim-7.4.315/src/version.c 2014-05-29 11:47:19.808773758 +0200 +--- src/version.c 2014-05-29 14:33:29.476861030 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 316, + /**/ + +-- +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/patches/source/vim/patches/7.4.317 b/patches/source/vim/patches/7.4.317 new file mode 100644 index 000000000..34ea33628 --- /dev/null +++ b/patches/source/vim/patches/7.4.317 @@ -0,0 +1,57 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.317 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.317 +Problem: Crash when starting gvim. Issue 230. +Solution: Check for a pointer to be NULL. (Christian Brabandt) +Files: src/window.c + + +*** ../vim-7.4.316/src/window.c 2014-05-28 13:42:59.884078184 +0200 +--- src/window.c 2014-06-12 11:36:53.619441640 +0200 +*************** +*** 4721,4728 **** + win_free_lsize(wp) + win_T *wp; + { +! vim_free(wp->w_lines); +! wp->w_lines = NULL; + } + + /* +--- 4721,4732 ---- + win_free_lsize(wp) + win_T *wp; + { +! /* TODO: why would wp be NULL here? */ +! if (wp != NULL) +! { +! vim_free(wp->w_lines); +! wp->w_lines = NULL; +! } + } + + /* +*** ../vim-7.4.316/src/version.c 2014-05-29 14:36:26.156862577 +0200 +--- src/version.c 2014-06-12 11:37:37.907443315 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 317, + /**/ + +-- +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/patches/source/vim/patches/7.4.318 b/patches/source/vim/patches/7.4.318 new file mode 100644 index 000000000..3f82c53fe --- /dev/null +++ b/patches/source/vim/patches/7.4.318 @@ -0,0 +1,52 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.318 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.318 +Problem: Check for whether a highlight group has settings ignores fg and bg + color settings. +Solution: Also check cterm and GUI color settings. (Christian Brabandt) +Files: src/syntax.c + + +*** ../vim-7.4.317/src/syntax.c 2014-03-23 15:12:29.939264336 +0100 +--- src/syntax.c 2014-06-12 12:16:13.851530931 +0200 +*************** +*** 8043,8050 **** +--- 8043,8056 ---- + { + return ( HL_TABLE()[idx].sg_term_attr != 0 + || HL_TABLE()[idx].sg_cterm_attr != 0 ++ || HL_TABLE()[idx].sg_cterm_fg != 0 ++ || HL_TABLE()[idx].sg_cterm_bg != 0 + #ifdef FEAT_GUI + || HL_TABLE()[idx].sg_gui_attr != 0 ++ || HL_TABLE()[idx].sg_gui_fg_name != NULL ++ || HL_TABLE()[idx].sg_gui_bg_name != NULL ++ || HL_TABLE()[idx].sg_gui_sp_name != NULL ++ || HL_TABLE()[idx].sg_font_name != NUL + #endif + || (check_link && (HL_TABLE()[idx].sg_set & SG_LINK))); + } +*** ../vim-7.4.317/src/version.c 2014-06-12 11:49:42.219470717 +0200 +--- src/version.c 2014-06-12 12:17:25.607533645 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 318, + /**/ + +-- +The software said it requires Windows 95 or better, so I installed Linux. + + /// 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/patches/source/vim/patches/7.4.319 b/patches/source/vim/patches/7.4.319 new file mode 100644 index 000000000..9b7cfaa37 --- /dev/null +++ b/patches/source/vim/patches/7.4.319 @@ -0,0 +1,55 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.319 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.319 +Problem: Crash when putting zero bytes on the clipboard. +Solution: Do not support the utf8_atom target when not using an Unicode + encoding. (Naofumi Honda) +Files: src/ui.c + + +*** ../vim-7.4.318/src/ui.c 2014-03-23 15:12:29.943264337 +0100 +--- src/ui.c 2014-06-12 13:25:21.791687853 +0200 +*************** +*** 2324,2330 **** + if ( *target != XA_STRING + #ifdef FEAT_MBYTE + && *target != vimenc_atom +! && *target != utf8_atom + #endif + && *target != vim_atom + && *target != text_atom +--- 2324,2330 ---- + if ( *target != XA_STRING + #ifdef FEAT_MBYTE + && *target != vimenc_atom +! && (*target != utf8_atom || !enc_utf8) + #endif + && *target != vim_atom + && *target != text_atom +*** ../vim-7.4.318/src/version.c 2014-06-12 12:20:50.195541385 +0200 +--- src/version.c 2014-06-12 13:26:09.147689645 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 319, + /**/ + +-- +FIRST HEAD: Oh! quick! get the sword out I want to cut his head off. +THIRD HEAD: Oh, cut your own head off. +SECOND HEAD: Yes - do us all a favour. + "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/patches/source/vim/patches/7.4.320 b/patches/source/vim/patches/7.4.320 new file mode 100644 index 000000000..92830aa08 --- /dev/null +++ b/patches/source/vim/patches/7.4.320 @@ -0,0 +1,143 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.320 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.320 +Problem: Possible crash when an BufLeave autocommand deletes the buffer. +Solution: Check for the window pointer being valid. Postpone freeing the + window until autocommands are done. (Yasuhiro Matsumoto) +Files: src/buffer.c, src/fileio.c, src/globals.h, src/window.c + + +*** ../vim-7.4.319/src/buffer.c 2014-05-07 16:35:05.029152844 +0200 +--- src/buffer.c 2014-06-12 13:47:17.799737639 +0200 +*************** +*** 371,377 **** + unload_buf = TRUE; + #endif + +! if (win != NULL) + { + /* Set b_last_cursor when closing the last window for the buffer. + * Remember the last cursor position and window options of the buffer. +--- 371,381 ---- + unload_buf = TRUE; + #endif + +! if (win != NULL +! #ifdef FEAT_WINDOWS +! && win_valid(win) /* in case autocommands closed the window */ +! #endif +! ) + { + /* Set b_last_cursor when closing the last window for the buffer. + * Remember the last cursor position and window options of the buffer. +*** ../vim-7.4.319/src/fileio.c 2014-05-02 15:46:10.731268318 +0200 +--- src/fileio.c 2014-06-12 13:53:33.207751842 +0200 +*************** +*** 9549,9555 **** + + /* + * When stopping to execute autocommands, restore the search patterns and +! * the redo buffer. Free buffers in the au_pending_free_buf list. + */ + if (!autocmd_busy) + { +--- 9549,9556 ---- + + /* + * When stopping to execute autocommands, restore the search patterns and +! * the redo buffer. Free any buffers in the au_pending_free_buf list and +! * free any windows in the au_pending_free_win list. + */ + if (!autocmd_busy) + { +*************** +*** 9562,9567 **** +--- 9563,9574 ---- + vim_free(au_pending_free_buf); + au_pending_free_buf = b; + } ++ while (au_pending_free_win != NULL) ++ { ++ win_T *w = au_pending_free_win->w_next; ++ vim_free(au_pending_free_win); ++ au_pending_free_win = w; ++ } + } + + /* +*** ../vim-7.4.319/src/globals.h 2014-05-28 18:22:37.876225054 +0200 +--- src/globals.h 2014-06-12 13:54:29.163753959 +0200 +*************** +*** 387,396 **** + * which one is preferred, au_new_curbuf is set to it */ + EXTERN buf_T *au_new_curbuf INIT(= NULL); + +! /* When deleting the buffer and autocmd_busy is TRUE, do not free the buffer +! * but link it in the list starting with au_pending_free_buf, using b_next. +! * Free the buffer when autocmd_busy is set to FALSE. */ + EXTERN buf_T *au_pending_free_buf INIT(= NULL); + #endif + + #ifdef FEAT_MOUSE +--- 387,398 ---- + * which one is preferred, au_new_curbuf is set to it */ + EXTERN buf_T *au_new_curbuf INIT(= NULL); + +! /* When deleting a buffer/window and autocmd_busy is TRUE, do not free the +! * buffer/window. but link it in the list starting with +! * au_pending_free_buf/ap_pending_free_win, using b_next/w_next. +! * Free the buffer/window when autocmd_busy is being set to FALSE. */ + EXTERN buf_T *au_pending_free_buf INIT(= NULL); ++ EXTERN win_T *au_pending_free_win INIT(= NULL); + #endif + + #ifdef FEAT_MOUSE +*** ../vim-7.4.319/src/window.c 2014-06-12 11:49:42.219470717 +0200 +--- src/window.c 2014-06-12 13:51:54.939748124 +0200 +*************** +*** 4597,4603 **** + if (wp != aucmd_win) + #endif + win_remove(wp, tp); +! vim_free(wp); + + #ifdef FEAT_AUTOCMD + unblock_autocmds(); +--- 4597,4609 ---- + if (wp != aucmd_win) + #endif + win_remove(wp, tp); +! if (autocmd_busy) +! { +! wp->w_next = au_pending_free_win; +! au_pending_free_win = wp; +! } +! else +! vim_free(wp); + + #ifdef FEAT_AUTOCMD + unblock_autocmds(); +*** ../vim-7.4.319/src/version.c 2014-06-12 13:28:26.771694851 +0200 +--- src/version.c 2014-06-12 13:40:23.507721966 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 320, + /**/ + +-- +Life would be so much easier if we could just look at the source code. + + /// 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/patches/source/vim/patches/7.4.321 b/patches/source/vim/patches/7.4.321 new file mode 100644 index 000000000..eaac413d9 --- /dev/null +++ b/patches/source/vim/patches/7.4.321 @@ -0,0 +1,71 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.321 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.321 +Problem: Can't build with strawberry perl 5.20 + mingw-w64-4.9.0. +Solution: Define save_strlen. (Ken Takata) +Files: src/if_perl.xs + + +*** ../vim-7.4.320/src/if_perl.xs 2014-03-12 17:08:01.508807656 +0100 +--- src/if_perl.xs 2014-06-12 16:02:25.584044368 +0200 +*************** +*** 191,196 **** +--- 191,199 ---- + # define Perl_pop_scope dll_Perl_pop_scope + # define Perl_push_scope dll_Perl_push_scope + # define Perl_save_int dll_Perl_save_int ++ # if (PERL_REVISION == 5) && (PERL_VERSION >= 20) ++ # define Perl_save_strlen dll_Perl_save_strlen ++ # endif + # define Perl_stack_grow dll_Perl_stack_grow + # define Perl_set_context dll_Perl_set_context + # if (PERL_REVISION == 5) && (PERL_VERSION >= 14) +*************** +*** 311,316 **** +--- 314,322 ---- + static void (*Perl_pop_scope)(pTHX); + static void (*Perl_push_scope)(pTHX); + static void (*Perl_save_int)(pTHX_ int*); ++ #if (PERL_REVISION == 5) && (PERL_VERSION >= 20) ++ static void (*Perl_save_strlen)(pTHX_ STRLEN* ptr); ++ #endif + static SV** (*Perl_stack_grow)(pTHX_ SV**, SV**p, int); + static SV** (*Perl_set_context)(void*); + #if (PERL_REVISION == 5) && (PERL_VERSION >= 14) +*************** +*** 440,445 **** +--- 446,454 ---- + {"Perl_pop_scope", (PERL_PROC*)&Perl_pop_scope}, + {"Perl_push_scope", (PERL_PROC*)&Perl_push_scope}, + {"Perl_save_int", (PERL_PROC*)&Perl_save_int}, ++ #if (PERL_REVISION == 5) && (PERL_VERSION >= 20) ++ {"Perl_save_strlen", (PERL_PROC*)&Perl_save_strlen}, ++ #endif + {"Perl_stack_grow", (PERL_PROC*)&Perl_stack_grow}, + {"Perl_set_context", (PERL_PROC*)&Perl_set_context}, + #if (PERL_REVISION == 5) && (PERL_VERSION >= 14) +*** ../vim-7.4.320/src/version.c 2014-06-12 14:01:27.583769788 +0200 +--- src/version.c 2014-06-12 16:02:37.156044806 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 321, + /**/ + +-- +Microsoft's definition of a boolean: TRUE, FALSE, MAYBE +"Embrace and extend"...? + + /// 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/patches/source/vim/patches/7.4.322 b/patches/source/vim/patches/7.4.322 new file mode 100644 index 000000000..6c12b6172 --- /dev/null +++ b/patches/source/vim/patches/7.4.322 @@ -0,0 +1,92 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.322 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.322 +Problem: Using "msgfmt" is hard coded, cannot use "gmsgfmt". +Solution: Use the msgfmt command found by configure. (Danek Duvall) +Files: src/config.mk.in, src/po/Makefile + + +*** ../vim-7.4.321/src/config.mk.in 2010-11-03 22:26:24.000000000 +0100 +--- src/config.mk.in 2014-06-12 17:41:12.892268607 +0200 +*************** +*** 164,169 **** +--- 164,171 ---- + ### If the *.po files are to be translated to *.mo files. + MAKEMO = @MAKEMO@ + ++ MSGFMT = @MSGFMT@ ++ + # Make sure that "make first" will run "make all" once configure has done its + # work. This is needed when using the Makefile in the top directory. + first: all +*** ../vim-7.4.321/src/po/Makefile 2013-06-23 13:26:12.000000000 +0200 +--- src/po/Makefile 2014-06-12 17:45:19.116277922 +0200 +*************** +*** 1,5 **** +--- 1,8 ---- + # Makefile for the Vim message translations. + ++ # Include stuff found by configure. ++ include ../auto/config.mk ++ + # TODO make this configurable + # Note: ja.sjis, *.cp1250 and zh_CN.cp936 are only for MS-Windows, they are + # not installed on Unix +*************** +*** 133,139 **** + # tools 0.10.37, which use a slightly different .po file format that is not + # compatible with Solaris (and old gettext implementations) unless these are + # set. gettext 0.10.36 will not work! +! MSGFMT = OLD_PO_FILE_INPUT=yes msgfmt -v + XGETTEXT = OLD_PO_FILE_INPUT=yes OLD_PO_FILE_OUTPUT=yes xgettext + MSGMERGE = OLD_PO_FILE_INPUT=yes OLD_PO_FILE_OUTPUT=yes msgmerge + +--- 136,142 ---- + # tools 0.10.37, which use a slightly different .po file format that is not + # compatible with Solaris (and old gettext implementations) unless these are + # set. gettext 0.10.36 will not work! +! MSGFMTCMD = OLD_PO_FILE_INPUT=yes $(MSGFMT) -v + XGETTEXT = OLD_PO_FILE_INPUT=yes OLD_PO_FILE_OUTPUT=yes xgettext + MSGMERGE = OLD_PO_FILE_INPUT=yes OLD_PO_FILE_OUTPUT=yes msgmerge + +*************** +*** 142,148 **** + .PHONY: all install uninstall prefixcheck converted check clean checkclean distclean update-po $(LANGUAGES) $(CONVERTED) + + .po.mo: +! $(MSGFMT) -o $@ $< + + .po.ck: + $(VIM) -u NONE -e -X -S check.vim -c "if error == 0 | q | endif" -c cq $< +--- 145,151 ---- + .PHONY: all install uninstall prefixcheck converted check clean checkclean distclean update-po $(LANGUAGES) $(CONVERTED) + + .po.mo: +! $(MSGFMTCMD) -o $@ $< + + .po.ck: + $(VIM) -u NONE -e -X -S check.vim -c "if error == 0 | q | endif" -c cq $< +*** ../vim-7.4.321/src/version.c 2014-06-12 16:03:24.268046589 +0200 +--- src/version.c 2014-06-12 17:42:27.584271433 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 322, + /**/ + +-- +If I tell you "you have a beautiful body", would you hold it against me? + + /// 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/patches/source/vim/patches/7.4.323 b/patches/source/vim/patches/7.4.323 new file mode 100644 index 000000000..3faac9c69 --- /dev/null +++ b/patches/source/vim/patches/7.4.323 @@ -0,0 +1,96 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.323 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.323 +Problem: Substitute() with zero width pattern breaks multi-byte character. +Solution: Take multi-byte character size into account. (Yukihiro Nakadaira) +Files: src/eval.c src/testdir/test69.in, src/testdir/test69.ok + + +*** ../vim-7.4.322/src/eval.c 2014-05-28 20:31:37.496292805 +0200 +--- src/eval.c 2014-06-12 18:34:22.928389291 +0200 +*************** +*** 24848,24855 **** + 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]; +--- 24848,24858 ---- + if (zero_width == regmatch.startp[0]) + { + /* avoid getting stuck on a match with an empty string */ +! i = MB_PTR2LEN(tail); +! mch_memmove((char_u *)ga.ga_data + ga.ga_len, tail, +! (size_t)i); +! ga.ga_len += i; +! tail += i; + continue; + } + zero_width = regmatch.startp[0]; +*** ../vim-7.4.322/src/testdir/test69.in 2014-02-22 23:49:30.268896843 +0100 +--- src/testdir/test69.in 2014-06-12 18:32:43.108385514 +0200 +*************** +*** 180,185 **** +--- 180,192 ---- + byteidxcomp + + STARTTEST ++ /^substitute ++ :let y = substitute('123', '\zs', 'a', 'g') | put =y ++ ENDTEST ++ ++ substitute ++ ++ STARTTEST + :g/^STARTTEST/.,/^ENDTEST/d + :1;/^Results/,$wq! test.out + ENDTEST +*** ../vim-7.4.322/src/testdir/test69.ok 2014-02-22 23:49:30.268896843 +0100 +--- src/testdir/test69.ok 2014-06-12 18:32:43.108385514 +0200 +*************** +*** 160,162 **** +--- 160,166 ---- + [0, 1, 3, 4, -1] + [0, 1, 2, 4, 5, -1] + ++ ++ substitute ++ a1a2a3a ++ +*** ../vim-7.4.322/src/version.c 2014-06-12 18:03:24.940319000 +0200 +--- src/version.c 2014-06-12 18:32:08.356384200 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 323, + /**/ + +-- + When danger reared its ugly head, + He bravely turned his tail and fled + Yes, Brave Sir Robin turned about + And gallantly he chickened out + Bravely taking to his feet + He beat a very brave retreat + Bravest of the brave Sir Robin + Petrified of being dead + Soiled his pants then brave Sir Robin + Turned away and fled. + "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/patches/source/vim/patches/7.4.324 b/patches/source/vim/patches/7.4.324 new file mode 100644 index 000000000..7418d06b7 --- /dev/null +++ b/patches/source/vim/patches/7.4.324 @@ -0,0 +1,190 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.324 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.324 +Problem: In Ex mode, cyrillic characters are not handled. (Stas Malavin) +Solution: Support multi-byte characters in Ex mode. (Yukihiro Nakadaira) +Files: src/ex_getln.c + + +*** ../vim-7.4.323/src/ex_getln.c 2014-05-29 14:36:26.156862577 +0200 +--- src/ex_getln.c 2014-06-12 19:33:10.440522741 +0200 +*************** +*** 2188,2193 **** +--- 2188,2194 ---- + int vcol = 0; + char_u *p; + int prev_char; ++ int len; + + /* Switch cursor on now. This avoids that it happens after the "\n", which + * confuses the system function that computes tabstops. */ +*************** +*** 2264,2270 **** + { + if (line_ga.ga_len > 0) + { +! --line_ga.ga_len; + goto redraw; + } + continue; +--- 2265,2281 ---- + { + if (line_ga.ga_len > 0) + { +! #ifdef FEAT_MBYTE +! if (has_mbyte) +! { +! p = (char_u *)line_ga.ga_data; +! p[line_ga.ga_len] = NUL; +! len = (*mb_head_off)(p, p + line_ga.ga_len - 1) + 1; +! line_ga.ga_len -= len; +! } +! else +! #endif +! --line_ga.ga_len; + goto redraw; + } + continue; +*************** +*** 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; +--- 2291,2297 ---- + + if (c1 == Ctrl_T) + { +! long sw = get_sw_value(curbuf); + + p = (char_u *)line_ga.ga_data; + p[line_ga.ga_len] = NUL; +*************** +*** 2300,2307 **** + /* redraw the line */ + msg_col = startcol; + vcol = 0; +! for (p = (char_u *)line_ga.ga_data; +! p < (char_u *)line_ga.ga_data + line_ga.ga_len; ++p) + { + if (*p == TAB) + { +--- 2311,2319 ---- + /* redraw the line */ + msg_col = startcol; + vcol = 0; +! p = (char_u *)line_ga.ga_data; +! p[line_ga.ga_len] = NUL; +! while (p < (char_u *)line_ga.ga_data + line_ga.ga_len) + { + if (*p == TAB) + { +*************** +*** 2309,2319 **** + { + msg_putchar(' '); + } while (++vcol % 8); + } + else + { +! msg_outtrans_len(p, 1); +! vcol += char2cells(*p); + } + } + msg_clr_eos(); +--- 2321,2334 ---- + { + msg_putchar(' '); + } while (++vcol % 8); ++ ++p; + } + else + { +! len = MB_PTR2LEN(p); +! msg_outtrans_len(p, len); +! vcol += ptr2cells(p); +! p += len; + } + } + msg_clr_eos(); +*************** +*** 2362,2368 **** + + if (IS_SPECIAL(c1)) + c1 = '?'; +! ((char_u *)line_ga.ga_data)[line_ga.ga_len] = c1; + if (c1 == '\n') + msg_putchar('\n'); + else if (c1 == TAB) +--- 2377,2392 ---- + + if (IS_SPECIAL(c1)) + c1 = '?'; +! #ifdef FEAT_MBYTE +! if (has_mbyte) +! len = (*mb_char2bytes)(c1, +! (char_u *)line_ga.ga_data + line_ga.ga_len); +! else +! #endif +! { +! len = 1; +! ((char_u *)line_ga.ga_data)[line_ga.ga_len] = c1; +! } + if (c1 == '\n') + msg_putchar('\n'); + else if (c1 == TAB) +*************** +*** 2376,2385 **** + else + { + msg_outtrans_len( +! ((char_u *)line_ga.ga_data) + line_ga.ga_len, 1); + vcol += char2cells(c1); + } +! ++line_ga.ga_len; + escaped = FALSE; + + windgoto(msg_row, msg_col); +--- 2400,2409 ---- + else + { + msg_outtrans_len( +! ((char_u *)line_ga.ga_data) + line_ga.ga_len, len); + vcol += char2cells(c1); + } +! line_ga.ga_len += len; + escaped = FALSE; + + windgoto(msg_row, msg_col); +*** ../vim-7.4.323/src/version.c 2014-06-12 18:39:16.828400409 +0200 +--- src/version.c 2014-06-12 19:37:40.296532950 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 324, + /**/ + +-- +ZOOT: I'm afraid our life must seem very dull and quiet compared to yours. + We are but eightscore young blondes, all between sixteen and + nineteen-and-a-half, cut off in this castle, with no one to protect us. + Oooh. It is a lonely life ... bathing ... dressing ... undressing ... + making exciting underwear.... + "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/patches/source/vim/patches/7.4.325 b/patches/source/vim/patches/7.4.325 new file mode 100644 index 000000000..5482a1ddb --- /dev/null +++ b/patches/source/vim/patches/7.4.325 @@ -0,0 +1,62 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.325 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.325 +Problem: When starting the gui and changing the window size the status line + may not be drawn correctly. +Solution: Catch new_win_height() being called recursively. (Christian + Brabandt) +Files: src/window.c + + +*** ../vim-7.4.324/src/window.c 2014-06-12 14:01:27.579769788 +0200 +--- src/window.c 2014-06-13 20:04:59.051863582 +0200 +*************** +*** 5660,5666 **** + if (wp->w_height > 0) + { + if (wp == curwin) +! validate_cursor(); /* w_wrow needs to be valid */ + if (wp->w_wrow != wp->w_prev_fraction_row) + set_fraction(wp); + } +--- 5660,5671 ---- + if (wp->w_height > 0) + { + if (wp == curwin) +! /* w_wrow needs to be valid. When setting 'laststatus' this may +! * call win_new_height() recursively. */ +! validate_cursor(); +! if (wp->w_height != prev_height) +! return; /* Recursive call already changed the size, bail out here +! to avoid the following to mess things up. */ + if (wp->w_wrow != wp->w_prev_fraction_row) + set_fraction(wp); + } +*** ../vim-7.4.324/src/version.c 2014-06-12 19:44:45.324549030 +0200 +--- src/version.c 2014-06-13 20:06:12.947866378 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 325, + /**/ + +-- +DINGO: And after the spanking ... the oral sex. +GALAHAD: Oh, dear! Well, I... +GIRLS: The oral sex ... The oral sex. +GALAHAD: Well, I suppose I could stay a BIT longer. + "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/patches/source/vim/patches/7.4.326 b/patches/source/vim/patches/7.4.326 new file mode 100644 index 000000000..da62b68c1 --- /dev/null +++ b/patches/source/vim/patches/7.4.326 @@ -0,0 +1,51 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.326 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.326 +Problem: Can't build Tiny version. (Elimar Riesebieter) +Solution: Add #ifdef. +Files: src/window.c + + +*** ../vim-7.4.325/src/window.c 2014-06-13 20:08:41.295871990 +0200 +--- src/window.c 2014-06-14 12:51:00.010147123 +0200 +*************** +*** 4597,4608 **** +--- 4597,4610 ---- + if (wp != aucmd_win) + #endif + win_remove(wp, tp); ++ #ifdef FEAT_AUTOCMD + if (autocmd_busy) + { + wp->w_next = au_pending_free_win; + au_pending_free_win = wp; + } + else ++ #endif + vim_free(wp); + + #ifdef FEAT_AUTOCMD +*** ../vim-7.4.325/src/version.c 2014-06-13 20:08:41.295871990 +0200 +--- src/version.c 2014-06-14 12:53:05.134151857 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 326, + /**/ + +-- +You cannot propel yourself forward by patting yourself on the back. + + /// 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/patches/source/vim/patches/7.4.327 b/patches/source/vim/patches/7.4.327 new file mode 100644 index 000000000..a797dd7ec --- /dev/null +++ b/patches/source/vim/patches/7.4.327 @@ -0,0 +1,163 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.327 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.327 +Problem: When 'verbose' is set to display the return value of a function, + may get E724 repeatedly. +Solution: Do not give an error for verbose messages. Abort conversion to + string after an error. +Files: src/eval.c + + +*** ../vim-7.4.326/src/eval.c 2014-06-12 18:39:16.828400409 +0200 +--- src/eval.c 2014-06-17 12:48:12.083946675 +0200 +*************** +*** 134,139 **** +--- 134,142 ---- + #define COPYID_INC 2 + #define COPYID_MASK (~0x1) + ++ /* Abort conversion to string after a recursion error. */ ++ static int did_echo_string_emsg = FALSE; ++ + /* + * Array to hold the hashtab with variables local to each sourced script. + * Each item holds a variable (nameless) that points to the dict_T. +*************** +*** 6686,6691 **** +--- 6689,6696 ---- + } + + line_breakcheck(); ++ if (did_echo_string_emsg) /* recursion error, bail out */ ++ break; + } + + /* Allocate result buffer with its total size, avoid re-allocation and +*************** +*** 7460,7467 **** + if (s != NULL) + ga_concat(&ga, s); + vim_free(tofree); +! if (s == NULL) + break; + } + } + if (todo > 0) +--- 7465,7474 ---- + if (s != NULL) + ga_concat(&ga, s); + vim_free(tofree); +! if (s == NULL || did_echo_string_emsg) + break; ++ line_breakcheck(); ++ + } + } + if (todo > 0) +*************** +*** 7619,7627 **** + + if (recurse >= DICT_MAXNEST) + { +! EMSG(_("E724: variable nested too deep for displaying")); + *tofree = NULL; +! return NULL; + } + ++recurse; + +--- 7626,7641 ---- + + if (recurse >= DICT_MAXNEST) + { +! if (!did_echo_string_emsg) +! { +! /* Only give this message once for a recursive call to avoid +! * flooding the user with errors. And stop iterating over lists +! * and dicts. */ +! did_echo_string_emsg = TRUE; +! EMSG(_("E724: variable nested too deep for displaying")); +! } + *tofree = NULL; +! return (char_u *)"{E724}"; + } + ++recurse; + +*************** +*** 7689,7695 **** + *tofree = NULL; + } + +! --recurse; + return r; + } + +--- 7703,7710 ---- + *tofree = NULL; + } + +! if (--recurse == 0) +! did_echo_string_emsg = FALSE; + return r; + } + +*************** +*** 23303,23309 **** +--- 23318,23327 ---- + msg_outnum((long)argvars[i].vval.v_number); + else + { ++ /* Do not want errors such as E724 here. */ ++ ++emsg_off; + s = tv2string(&argvars[i], &tofree, numbuf2, 0); ++ --emsg_off; + if (s != NULL) + { + if (vim_strsize(s) > MSG_BUF_CLEN) +*************** +*** 23395,23402 **** + + /* The value may be very long. Skip the middle part, so that we + * have some idea how it starts and ends. smsg() would always +! * truncate it at the end. */ + s = tv2string(fc->rettv, &tofree, numbuf2, 0); + if (s != NULL) + { + if (vim_strsize(s) > MSG_BUF_CLEN) +--- 23413,23422 ---- + + /* The value may be very long. Skip the middle part, so that we + * have some idea how it starts and ends. smsg() would always +! * truncate it at the end. Don't want errors such as E724 here. */ +! ++emsg_off; + s = tv2string(fc->rettv, &tofree, numbuf2, 0); ++ --emsg_off; + if (s != NULL) + { + if (vim_strsize(s) > MSG_BUF_CLEN) +*** ../vim-7.4.326/src/version.c 2014-06-14 12:53:27.394152699 +0200 +--- src/version.c 2014-06-17 12:41:45.019932032 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 327, + /**/ + +-- +TALL KNIGHT: We shall say Ni! again to you if you do not appease us. +ARTHUR: All right! What do you want? +TALL KNIGHT: We want ... a shrubbery! + "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/patches/source/vim/patches/7.4.328 b/patches/source/vim/patches/7.4.328 new file mode 100644 index 000000000..d1f8c493b --- /dev/null +++ b/patches/source/vim/patches/7.4.328 @@ -0,0 +1,82 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.328 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.328 +Problem: Selection of inner block is inconsistent. +Solution: Skip indent not only for '}' but all parens. (Tom McDonald) +Files: src/search.c + + +*** ../vim-7.4.327/src/search.c 2014-03-23 15:12:29.935264336 +0100 +--- src/search.c 2014-06-17 12:37:49.075923106 +0200 +*************** +*** 3608,3628 **** + + /* + * Try to exclude the '(', '{', ')', '}', etc. when "include" is FALSE. +! * If the ending '}' is only preceded by indent, skip that indent. +! * But only if the resulting area is not smaller than what we started with. + */ + while (!include) + { + incl(&start_pos); + sol = (curwin->w_cursor.col == 0); + decl(&curwin->w_cursor); +! if (what == '{') +! while (inindent(1)) +! { +! sol = TRUE; +! if (decl(&curwin->w_cursor) != 0) +! break; +! } + /* + * In Visual mode, when the resulting area is not bigger than what we + * started with, extend it to the next block, and then exclude again. +--- 3608,3629 ---- + + /* + * Try to exclude the '(', '{', ')', '}', etc. when "include" is FALSE. +! * If the ending '}', ')' or ']' is only preceded by indent, skip that +! * indent. But only if the resulting area is not smaller than what we +! * started with. + */ + while (!include) + { + incl(&start_pos); + sol = (curwin->w_cursor.col == 0); + decl(&curwin->w_cursor); +! while (inindent(1)) +! { +! sol = TRUE; +! if (decl(&curwin->w_cursor) != 0) +! break; +! } +! + /* + * In Visual mode, when the resulting area is not bigger than what we + * started with, extend it to the next block, and then exclude again. +*** ../vim-7.4.327/src/version.c 2014-06-17 12:51:13.207953527 +0200 +--- src/version.c 2014-06-17 12:52:35.279956632 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 328, + /**/ + +-- +FATHER: One day, lad, all this will be yours ... +PRINCE: What - the curtains? + "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/patches/source/vim/patches/7.4.329 b/patches/source/vim/patches/7.4.329 new file mode 100644 index 000000000..0fd9bad8d --- /dev/null +++ b/patches/source/vim/patches/7.4.329 @@ -0,0 +1,55 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.329 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.329 +Problem: When moving the cursor and then switching to another window the + previous window isn't scrolled. (Yukihiro Nakadaira) +Solution: Call update_topline() before leaving the window. (Christian + Brabandt) +Files: src/window.c + + +*** ../vim-7.4.328/src/window.c 2014-06-14 12:53:27.394152699 +0200 +--- src/window.c 2014-06-17 13:44:48.812075178 +0200 +*************** +*** 4250,4255 **** +--- 4250,4260 ---- + /* sync undo before leaving the current buffer */ + if (undo_sync && curbuf != wp->w_buffer) + u_sync(FALSE); ++ ++ /* Might need to scroll the old window before switching, e.g., when the ++ * cursor was moved. */ ++ update_topline(); ++ + /* may have to copy the buffer options when 'cpo' contains 'S' */ + if (wp->w_buffer != curbuf) + buf_copy_options(wp->w_buffer, BCO_ENTER | BCO_NOHELP); +*** ../vim-7.4.328/src/version.c 2014-06-17 13:50:06.148087184 +0200 +--- src/version.c 2014-06-17 13:51:09.960089598 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 329, + /**/ + +-- +FATHER: Make sure the Prince doesn't leave this room until I come and + get him. +FIRST GUARD: Not ... to leave the room ... even if you come and get him. +FATHER: No. Until I come and get him. +SECOND GUARD: Hic. + "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/patches/source/vim/patches/7.4.330 b/patches/source/vim/patches/7.4.330 new file mode 100644 index 000000000..360d20c43 --- /dev/null +++ b/patches/source/vim/patches/7.4.330 @@ -0,0 +1,1131 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.330 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.330 +Problem: Using a regexp pattern to highlight a specific position can be + slow. +Solution: Add matchaddpos() to highlight specific positions efficiently. + (Alexey Radkov) +Files: runtime/doc/eval.txt, runtime/doc/usr_41.txt, + runtime/plugin/matchparen.vim, src/eval.c, src/ex_docmd.c, + src/proto/window.pro, src/screen.c, src/structs.h, + src/testdir/test63.in, src/testdir/test63.ok, src/window.c + + +*** ../vim-7.4.329/runtime/doc/eval.txt 2014-05-28 20:31:37.500292805 +0200 +--- runtime/doc/eval.txt 2014-06-17 16:31:35.572453748 +0200 +*************** +*** 1887,1892 **** +--- 1887,1894 ---- + Number position where {pat} matches in {expr} + matchadd( {group}, {pattern}[, {priority}[, {id}]]) + Number highlight {pattern} with {group} ++ matchaddpos( {group}, {list}[, {priority}[, {id}]]) ++ Number highlight positions with {group} + matcharg( {nr}) List arguments of |:match| + matchdelete( {id}) Number delete match identified by {id} + matchend( {expr}, {pat}[, {start}[, {count}]]) +*************** +*** 4342,4347 **** +--- 4382,4422 ---- + available from |getmatches()|. All matches can be deleted in + one operation by |clearmatches()|. + ++ matchaddpos({group}, {pos}[, {priority}[, {id}]]) *matchaddpos()* ++ Same as |matchadd()|, but requires a list of positions {pos} ++ instead of a pattern. This command is faster than |matchadd()| ++ because it does not require to handle regular expressions and ++ sets buffer line boundaries to redraw screen. It is supposed ++ to be used when fast match additions and deletions are ++ required, for example to highlight matching parentheses. ++ ++ The list {pos} can contain one of these items: ++ - A number. This while line will be highlighted. The first ++ line has number 1. ++ - A list with one number, e.g., [23]. The whole line with this ++ number will be highlighted. ++ - A list with two numbers, e.g., [23, 11]. The first number is ++ the line number, the second one the column number (first ++ column is 1). The character at this position will be ++ highlighted. ++ - A list with three numbers, e.g., [23, 11, 3]. As above, but ++ the third number gives the length of the highlight in screen ++ cells. ++ ++ The maximum number of positions is 8. ++ ++ Example: > ++ :highlight MyGroup ctermbg=green guibg=green ++ :let m = matchaddpos("MyGroup", [[23, 24], 34]) ++ < Deletion of the pattern: > ++ :call matchdelete(m) ++ ++ < Matches added by |matchaddpos()| are returned by ++ |getmatches()| with an entry "pos1", "pos2", etc., with the ++ value a list like the {pos} item. ++ These matches cannot be set via |setmatches()|, however they ++ can still be deleted by |clearmatches()|. ++ + matcharg({nr}) *matcharg()* + Selects the {nr} match item, as set with a |:match|, + |:2match| or |:3match| command. +*** ../vim-7.4.329/runtime/doc/usr_41.txt 2014-05-28 18:22:37.872225054 +0200 +--- runtime/doc/usr_41.txt 2014-06-17 14:06:44.836124965 +0200 +*************** +*** 824,829 **** +--- 827,833 ---- + synconcealed() get info about concealing + diff_hlID() get highlight ID for diff mode at a position + matchadd() define a pattern to highlight (a "match") ++ matchaddpos() define a list of positions to highlight + matcharg() get info about |:match| arguments + matchdelete() delete a match defined by |matchadd()| or a + |:match| command +*** ../vim-7.4.329/runtime/plugin/matchparen.vim 2013-05-08 05:15:53.000000000 +0200 +--- runtime/plugin/matchparen.vim 2014-06-17 14:14:45.712143158 +0200 +*************** +*** 1,6 **** + " Vim plugin for showing matching parens + " Maintainer: Bram Moolenaar <Bram@vim.org> +! " Last Change: 2013 May 08 + + " Exit quickly when: + " - this plugin was already loaded (or disabled) +--- 1,6 ---- + " Vim plugin for showing matching parens + " Maintainer: Bram Moolenaar <Bram@vim.org> +! " Last Change: 2014 Jun 17 + + " Exit quickly when: + " - this plugin was already loaded (or disabled) +*************** +*** 39,45 **** + function! s:Highlight_Matching_Pair() + " Remove any previous match. + if exists('w:paren_hl_on') && w:paren_hl_on +! 3match none + let w:paren_hl_on = 0 + endif + +--- 39,45 ---- + function! s:Highlight_Matching_Pair() + " Remove any previous match. + if exists('w:paren_hl_on') && w:paren_hl_on +! silent! call matchdelete(3) + let w:paren_hl_on = 0 + endif + +*************** +*** 152,165 **** + + " If a match is found setup match highlighting. + if m_lnum > 0 && m_lnum >= stoplinetop && m_lnum <= stoplinebottom +! exe '3match MatchParen /\(\%' . c_lnum . 'l\%' . (c_col - before) . +! \ 'c\)\|\(\%' . m_lnum . 'l\%' . m_col . 'c\)/' + let w:paren_hl_on = 1 + endif + endfunction + + " Define commands that will disable and enable the plugin. +! command! NoMatchParen windo 3match none | unlet! g:loaded_matchparen | + \ au! matchparen + command! DoMatchParen runtime plugin/matchparen.vim | windo doau CursorMoved + +--- 152,169 ---- + + " If a match is found setup match highlighting. + if m_lnum > 0 && m_lnum >= stoplinetop && m_lnum <= stoplinebottom +! if exists('*matchaddpos') +! call matchaddpos('MatchParen', [[c_lnum, c_col - before], [m_lnum, m_col]], 10, 3) +! else +! exe '3match MatchParen /\(\%' . c_lnum . 'l\%' . (c_col - before) . +! \ 'c\)\|\(\%' . m_lnum . 'l\%' . m_col . 'c\)/' +! endif + let w:paren_hl_on = 1 + endif + endfunction + + " Define commands that will disable and enable the plugin. +! command! NoMatchParen windo silent! call matchdelete(3) | unlet! g:loaded_matchparen | + \ au! matchparen + command! DoMatchParen runtime plugin/matchparen.vim | windo doau CursorMoved + +*** ../vim-7.4.329/src/eval.c 2014-06-17 12:51:13.207953527 +0200 +--- src/eval.c 2014-06-17 17:02:25.388523729 +0200 +*************** +*** 622,627 **** +--- 622,628 ---- + static void f_mapcheck __ARGS((typval_T *argvars, typval_T *rettv)); + static void f_match __ARGS((typval_T *argvars, typval_T *rettv)); + static void f_matchadd __ARGS((typval_T *argvars, typval_T *rettv)); ++ static void f_matchaddpos __ARGS((typval_T *argvars, typval_T *rettv)); + static void f_matcharg __ARGS((typval_T *argvars, typval_T *rettv)); + static void f_matchdelete __ARGS((typval_T *argvars, typval_T *rettv)); + static void f_matchend __ARGS((typval_T *argvars, typval_T *rettv)); +*************** +*** 8054,8059 **** +--- 8055,8061 ---- + {"mapcheck", 1, 3, f_mapcheck}, + {"match", 2, 4, f_match}, + {"matchadd", 2, 4, f_matchadd}, ++ {"matchaddpos", 2, 4, f_matchaddpos}, + {"matcharg", 1, 1, f_matcharg}, + {"matchdelete", 1, 1, f_matchdelete}, + {"matchend", 2, 4, f_matchend}, +*************** +*** 11767,11772 **** +--- 11769,11775 ---- + #ifdef FEAT_SEARCH_EXTRA + dict_T *dict; + matchitem_T *cur = curwin->w_match_head; ++ int i; + + if (rettv_list_alloc(rettv) == OK) + { +*************** +*** 11775,11782 **** + dict = dict_alloc(); + if (dict == NULL) + return; + dict_add_nr_str(dict, "group", 0L, syn_id2name(cur->hlg_id)); +- dict_add_nr_str(dict, "pattern", 0L, cur->pattern); + dict_add_nr_str(dict, "priority", (long)cur->priority, NULL); + dict_add_nr_str(dict, "id", (long)cur->id, NULL); + list_append_dict(rettv->vval.v_list, dict); +--- 11778,11813 ---- + dict = dict_alloc(); + if (dict == NULL) + return; ++ if (cur->match.regprog == NULL) ++ { ++ /* match added with matchaddpos() */ ++ for (i = 0; i < MAXPOSMATCH; ++i) ++ { ++ llpos_T *llpos; ++ char buf[6]; ++ list_T *l; ++ ++ llpos = &cur->pos.pos[i]; ++ if (llpos->lnum == 0) ++ break; ++ l = list_alloc(); ++ if (l == NULL) ++ break; ++ list_append_number(l, (varnumber_T)llpos->lnum); ++ if (llpos->col > 0) ++ { ++ list_append_number(l, (varnumber_T)llpos->col); ++ list_append_number(l, (varnumber_T)llpos->len); ++ } ++ sprintf(buf, "pos%d", i + 1); ++ dict_add_list(dict, buf, l); ++ } ++ } ++ else ++ { ++ dict_add_nr_str(dict, "pattern", 0L, cur->pattern); ++ } + dict_add_nr_str(dict, "group", 0L, syn_id2name(cur->hlg_id)); + dict_add_nr_str(dict, "priority", (long)cur->priority, NULL); + dict_add_nr_str(dict, "id", (long)cur->id, NULL); + list_append_dict(rettv->vval.v_list, dict); +*************** +*** 14313,14319 **** + return; + } + +! rettv->vval.v_number = match_add(curwin, grp, pat, prio, id); + #endif + } + +--- 14344,14401 ---- + return; + } + +! rettv->vval.v_number = match_add(curwin, grp, pat, prio, id, NULL); +! #endif +! } +! +! /* +! * "matchaddpos()" function +! */ +! static void +! f_matchaddpos(argvars, rettv) +! typval_T *argvars UNUSED; +! typval_T *rettv UNUSED; +! { +! #ifdef FEAT_SEARCH_EXTRA +! char_u buf[NUMBUFLEN]; +! char_u *group; +! int prio = 10; +! int id = -1; +! int error = FALSE; +! list_T *l; +! +! rettv->vval.v_number = -1; +! +! group = get_tv_string_buf_chk(&argvars[0], buf); +! if (group == NULL) +! return; +! +! if (argvars[1].v_type != VAR_LIST) +! { +! EMSG2(_(e_listarg), "matchaddpos()"); +! return; +! } +! l = argvars[1].vval.v_list; +! if (l == NULL) +! return; +! +! if (argvars[2].v_type != VAR_UNKNOWN) +! { +! prio = get_tv_number_chk(&argvars[2], &error); +! if (argvars[3].v_type != VAR_UNKNOWN) +! id = get_tv_number_chk(&argvars[3], &error); +! } +! if (error == TRUE) +! return; +! +! /* id == 3 is ok because matchaddpos() is supposed to substitute :3match */ +! if (id == 1 || id == 2) +! { +! EMSGN("E798: ID is reserved for \":match\": %ld", id); +! return; +! } +! +! rettv->vval.v_number = match_add(curwin, group, NULL, prio, id, l); + #endif + } + +*************** +*** 16816,16822 **** + match_add(curwin, get_dict_string(d, (char_u *)"group", FALSE), + get_dict_string(d, (char_u *)"pattern", FALSE), + (int)get_dict_number(d, (char_u *)"priority"), +! (int)get_dict_number(d, (char_u *)"id")); + li = li->li_next; + } + rettv->vval.v_number = 0; +--- 16898,16904 ---- + match_add(curwin, get_dict_string(d, (char_u *)"group", FALSE), + get_dict_string(d, (char_u *)"pattern", FALSE), + (int)get_dict_number(d, (char_u *)"priority"), +! (int)get_dict_number(d, (char_u *)"id"), NULL); + li = li->li_next; + } + rettv->vval.v_number = 0; +*** ../vim-7.4.329/src/ex_docmd.c 2014-05-28 18:22:37.876225054 +0200 +--- src/ex_docmd.c 2014-06-17 14:06:44.844124966 +0200 +*************** +*** 11489,11495 **** + + c = *end; + *end = NUL; +! match_add(curwin, g, p + 1, 10, id); + vim_free(g); + *end = c; + } +--- 11489,11495 ---- + + c = *end; + *end = NUL; +! match_add(curwin, g, p + 1, 10, id, NULL); + vim_free(g); + *end = c; + } +*** ../vim-7.4.329/src/proto/window.pro 2013-08-14 17:11:14.000000000 +0200 +--- src/proto/window.pro 2014-06-17 14:06:44.844124966 +0200 +*************** +*** 75,81 **** + void switch_buffer __ARGS((buf_T **save_curbuf, buf_T *buf)); + void restore_buffer __ARGS((buf_T *save_curbuf)); + int win_hasvertsplit __ARGS((void)); +! int match_add __ARGS((win_T *wp, char_u *grp, char_u *pat, int prio, int id)); + int match_delete __ARGS((win_T *wp, int id, int perr)); + void clear_matches __ARGS((win_T *wp)); + matchitem_T *get_match __ARGS((win_T *wp, int id)); +--- 75,81 ---- + void switch_buffer __ARGS((buf_T **save_curbuf, buf_T *buf)); + void restore_buffer __ARGS((buf_T *save_curbuf)); + int win_hasvertsplit __ARGS((void)); +! int match_add __ARGS((win_T *wp, char_u *grp, char_u *pat, int prio, int id, list_T *pos)); + int match_delete __ARGS((win_T *wp, int id, int perr)); + void clear_matches __ARGS((win_T *wp)); + matchitem_T *get_match __ARGS((win_T *wp, int id)); +*** ../vim-7.4.329/src/screen.c 2014-05-28 21:40:47.092329130 +0200 +--- src/screen.c 2014-06-17 17:04:08.064527614 +0200 +*************** +*** 144,150 **** + static void end_search_hl __ARGS((void)); + static void init_search_hl __ARGS((win_T *wp)); + static void prepare_search_hl __ARGS((win_T *wp, linenr_T lnum)); +! static void next_search_hl __ARGS((win_T *win, match_T *shl, linenr_T lnum, colnr_T mincol)); + #endif + static void screen_start_highlight __ARGS((int attr)); + static void screen_char __ARGS((unsigned off, int row, int col)); +--- 144,151 ---- + static void end_search_hl __ARGS((void)); + static void init_search_hl __ARGS((win_T *wp)); + static void prepare_search_hl __ARGS((win_T *wp, linenr_T lnum)); +! static void next_search_hl __ARGS((win_T *win, match_T *shl, linenr_T lnum, colnr_T mincol, matchitem_T *cur)); +! static int next_search_hl_pos __ARGS((match_T *shl, linenr_T lnum, posmatch_T *pos, colnr_T mincol)); + #endif + static void screen_start_highlight __ARGS((int attr)); + static void screen_char __ARGS((unsigned off, int row, int col)); +*************** +*** 2929,2934 **** +--- 2930,2937 ---- + match_T *shl; /* points to search_hl or a match */ + int shl_flag; /* flag to indicate whether search_hl + has been processed or not */ ++ int pos_inprogress; /* marks that position match search is ++ in progress */ + int prevcol_hl_flag; /* flag to indicate whether prevcol + equals startcol of search_hl or one + of the matches */ +*************** +*** 3439,3482 **** + shl->startcol = MAXCOL; + shl->endcol = MAXCOL; + shl->attr_cur = 0; +! if (shl->rm.regprog != NULL) +! { +! v = (long)(ptr - line); +! next_search_hl(wp, shl, lnum, (colnr_T)v); +! +! /* Need to get the line again, a multi-line regexp may have made it +! * invalid. */ +! line = ml_get_buf(wp->w_buffer, lnum, FALSE); +! ptr = line + v; + +! if (shl->lnum != 0 && shl->lnum <= lnum) + { +- if (shl->lnum == lnum) +- shl->startcol = shl->rm.startpos[0].col; +- else +- shl->startcol = 0; +- if (lnum == shl->lnum + shl->rm.endpos[0].lnum +- - shl->rm.startpos[0].lnum) +- shl->endcol = shl->rm.endpos[0].col; +- else +- shl->endcol = MAXCOL; +- /* Highlight one character for an empty match. */ +- if (shl->startcol == shl->endcol) +- { + #ifdef FEAT_MBYTE +! if (has_mbyte && line[shl->endcol] != NUL) +! shl->endcol += (*mb_ptr2len)(line + shl->endcol); +! else + #endif +! ++shl->endcol; +! } +! if ((long)shl->startcol < v) /* match at leftcol */ +! { +! shl->attr_cur = shl->attr; +! search_attr = shl->attr; +! } +! area_highlighting = TRUE; + } + } + if (shl != &search_hl && cur != NULL) + cur = cur->next; +--- 3442,3484 ---- + shl->startcol = MAXCOL; + shl->endcol = MAXCOL; + shl->attr_cur = 0; +! v = (long)(ptr - line); +! if (cur != NULL) +! cur->pos.cur = 0; +! next_search_hl(wp, shl, lnum, (colnr_T)v, cur); +! +! /* Need to get the line again, a multi-line regexp may have made it +! * invalid. */ +! line = ml_get_buf(wp->w_buffer, lnum, FALSE); +! ptr = line + v; + +! if (shl->lnum != 0 && shl->lnum <= lnum) +! { +! if (shl->lnum == lnum) +! shl->startcol = shl->rm.startpos[0].col; +! else +! shl->startcol = 0; +! if (lnum == shl->lnum + shl->rm.endpos[0].lnum +! - shl->rm.startpos[0].lnum) +! shl->endcol = shl->rm.endpos[0].col; +! else +! shl->endcol = MAXCOL; +! /* Highlight one character for an empty match. */ +! if (shl->startcol == shl->endcol) + { + #ifdef FEAT_MBYTE +! if (has_mbyte && line[shl->endcol] != NUL) +! shl->endcol += (*mb_ptr2len)(line + shl->endcol); +! else + #endif +! ++shl->endcol; + } ++ if ((long)shl->startcol < v) /* match at leftcol */ ++ { ++ shl->attr_cur = shl->attr; ++ search_attr = shl->attr; ++ } ++ area_highlighting = TRUE; + } + if (shl != &search_hl && cur != NULL) + cur = cur->next; +*************** +*** 3488,3494 **** + * when Visual mode is active, because it's not clear what is selected + * then. */ + if (wp->w_p_cul && lnum == wp->w_cursor.lnum +! && !(wp == curwin && VIsual_active)) + { + line_attr = hl_attr(HLF_CUL); + area_highlighting = TRUE; +--- 3490,3496 ---- + * when Visual mode is active, because it's not clear what is selected + * then. */ + if (wp->w_p_cul && lnum == wp->w_cursor.lnum +! && !(wp == curwin && VIsual_active)) + { + line_attr = hl_attr(HLF_CUL); + area_highlighting = TRUE; +*************** +*** 3792,3798 **** + } + else + shl = &cur->hl; +! while (shl->rm.regprog != NULL) + { + if (shl->startcol != MAXCOL + && v >= (long)shl->startcol +--- 3794,3804 ---- + } + else + shl = &cur->hl; +! if (cur != NULL) +! cur->pos.cur = 0; +! pos_inprogress = TRUE; +! while (shl->rm.regprog != NULL +! || (cur != NULL && pos_inprogress)) + { + if (shl->startcol != MAXCOL + && v >= (long)shl->startcol +*************** +*** 3803,3810 **** + else if (v == (long)shl->endcol) + { + shl->attr_cur = 0; +! +! next_search_hl(wp, shl, lnum, (colnr_T)v); + + /* Need to get the line again, a multi-line regexp + * may have made it invalid. */ +--- 3809,3817 ---- + else if (v == (long)shl->endcol) + { + shl->attr_cur = 0; +! next_search_hl(wp, shl, lnum, (colnr_T)v, cur); +! pos_inprogress = cur == NULL || cur->pos.cur == 0 +! ? FALSE : TRUE; + + /* Need to get the line again, a multi-line regexp + * may have made it invalid. */ +*************** +*** 7277,7282 **** +--- 7284,7291 ---- + match_T *shl; /* points to search_hl or a match */ + int shl_flag; /* flag to indicate whether search_hl + has been processed or not */ ++ int pos_inprogress; /* marks that position match search is ++ in progress */ + int n; + + /* +*************** +*** 7311,7320 **** + shl->first_lnum = wp->w_topline; + # endif + } + n = 0; +! while (shl->first_lnum < lnum && shl->rm.regprog != NULL) + { +! next_search_hl(wp, shl, shl->first_lnum, (colnr_T)n); + if (shl->lnum != 0) + { + shl->first_lnum = shl->lnum +--- 7320,7335 ---- + shl->first_lnum = wp->w_topline; + # endif + } ++ if (cur != NULL) ++ cur->pos.cur = 0; ++ pos_inprogress = TRUE; + n = 0; +! while (shl->first_lnum < lnum && (shl->rm.regprog != NULL +! || (cur != NULL && pos_inprogress))) + { +! next_search_hl(wp, shl, shl->first_lnum, (colnr_T)n, cur); +! pos_inprogress = cur == NULL || cur->pos.cur == 0 +! ? FALSE : TRUE; + if (shl->lnum != 0) + { + shl->first_lnum = shl->lnum +*************** +*** 7343,7353 **** + * Careful: Any pointers for buffer lines will become invalid. + */ + static void +! next_search_hl(win, shl, lnum, mincol) +! win_T *win; +! match_T *shl; /* points to search_hl or a match */ +! linenr_T lnum; +! colnr_T mincol; /* minimal column for a match */ + { + linenr_T l; + colnr_T matchcol; +--- 7358,7369 ---- + * Careful: Any pointers for buffer lines will become invalid. + */ + static void +! next_search_hl(win, shl, lnum, mincol, cur) +! win_T *win; +! match_T *shl; /* points to search_hl or a match */ +! linenr_T lnum; +! colnr_T mincol; /* minimal column for a match */ +! matchitem_T *cur; /* to retrieve match postions if any */ + { + linenr_T l; + colnr_T matchcol; +*************** +*** 7415,7440 **** + matchcol = shl->rm.endpos[0].col; + + shl->lnum = lnum; +! nmatched = vim_regexec_multi(&shl->rm, win, shl->buf, lnum, matchcol, + #ifdef FEAT_RELTIME +! &(shl->tm) + #else +! NULL + #endif +! ); +! if (called_emsg || got_int) +! { +! /* Error while handling regexp: stop using this regexp. */ +! if (shl == &search_hl) + { +! /* 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; +! got_int = FALSE; /* avoid the "Type :quit to exit Vim" message */ +! break; + } + if (nmatched == 0) + { +--- 7431,7465 ---- + matchcol = shl->rm.endpos[0].col; + + shl->lnum = lnum; +! if (shl->rm.regprog != NULL) +! { +! nmatched = vim_regexec_multi(&shl->rm, win, shl->buf, lnum, +! matchcol, + #ifdef FEAT_RELTIME +! &(shl->tm) + #else +! NULL + #endif +! ); +! if (called_emsg || got_int) + { +! /* Error while handling regexp: stop using this regexp. */ +! if (shl == &search_hl) +! { +! /* 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; +! got_int = FALSE; /* avoid the "Type :quit to exit Vim" +! message */ +! break; + } +! } +! else if (cur != NULL) +! { +! nmatched = next_search_hl_pos(shl, lnum, &(cur->pos), matchcol); + } + if (nmatched == 0) + { +*************** +*** 7453,7458 **** +--- 7478,7539 ---- + } + #endif + ++ static int ++ next_search_hl_pos(shl, lnum, posmatch, mincol) ++ match_T *shl; /* points to a match */ ++ linenr_T lnum; ++ posmatch_T *posmatch; /* match positions */ ++ colnr_T mincol; /* minimal column for a match */ ++ { ++ int i; ++ int bot = -1; ++ ++ shl->lnum = 0; ++ for (i = posmatch->cur; i < MAXPOSMATCH; i++) ++ { ++ if (posmatch->pos[i].lnum == 0) ++ break; ++ if (posmatch->pos[i].col < mincol) ++ continue; ++ if (posmatch->pos[i].lnum == lnum) ++ { ++ if (shl->lnum == lnum) ++ { ++ /* partially sort positions by column numbers ++ * on the same line */ ++ if (posmatch->pos[i].col < posmatch->pos[bot].col) ++ { ++ llpos_T tmp = posmatch->pos[i]; ++ ++ posmatch->pos[i] = posmatch->pos[bot]; ++ posmatch->pos[bot] = tmp; ++ } ++ } ++ else ++ { ++ bot = i; ++ shl->lnum = lnum; ++ } ++ } ++ } ++ posmatch->cur = 0; ++ if (shl->lnum == lnum) ++ { ++ colnr_T start = posmatch->pos[bot].col == 0 ++ ? 0 : posmatch->pos[bot].col - 1; ++ colnr_T end = posmatch->pos[bot].col == 0 ++ ? MAXCOL : start + posmatch->pos[bot].len; ++ ++ shl->rm.startpos[0].lnum = 0; ++ shl->rm.startpos[0].col = start; ++ shl->rm.endpos[0].lnum = 0; ++ shl->rm.endpos[0].col = end; ++ posmatch->cur = bot + 1; ++ return TRUE; ++ } ++ return FALSE; ++ } ++ + static void + screen_start_highlight(attr) + int attr; +*** ../vim-7.4.329/src/structs.h 2014-05-28 18:22:37.876225054 +0200 +--- src/structs.h 2014-06-17 17:00:55.524520330 +0200 +*************** +*** 1927,1932 **** +--- 1927,1958 ---- + #endif + } match_T; + ++ /* number of positions supported by matchaddpos() */ ++ #define MAXPOSMATCH 8 ++ ++ /* ++ * Same as lpos_T, but with additional field len. ++ */ ++ typedef struct ++ { ++ linenr_T lnum; /* line number */ ++ colnr_T col; /* column number */ ++ int len; /* length: 0 - to the end of line */ ++ } llpos_T; ++ ++ /* ++ * posmatch_T provides an array for storing match items for matchaddpos() ++ * function. ++ */ ++ typedef struct posmatch posmatch_T; ++ struct posmatch ++ { ++ llpos_T pos[MAXPOSMATCH]; /* array of positions */ ++ int cur; /* internal position counter */ ++ linenr_T toplnum; /* top buffer line */ ++ linenr_T botlnum; /* bottom buffer line */ ++ }; ++ + /* + * matchitem_T provides a linked list for storing match items for ":match" and + * the match functions. +*************** +*** 1940,1945 **** +--- 1966,1972 ---- + char_u *pattern; /* pattern to highlight */ + int hlg_id; /* highlight group ID */ + regmmatch_T match; /* regexp program for pattern */ ++ posmatch_T pos; /* position matches */ + match_T hl; /* struct for doing the actual highlighting */ + }; + +*** ../vim-7.4.329/src/testdir/test63.in 2010-05-15 13:04:10.000000000 +0200 +--- src/testdir/test63.in 2014-06-17 16:29:36.056449227 +0200 +*************** +*** 1,5 **** + Test for ":match", ":2match", ":3match", "clearmatches()", "getmatches()", +! "matchadd()", "matcharg()", "matchdelete()", and "setmatches()". + + STARTTEST + :so small.vim +--- 1,5 ---- + Test for ":match", ":2match", ":3match", "clearmatches()", "getmatches()", +! "matchadd()", "matchaddpos", "matcharg()", "matchdelete()", and "setmatches()". + + STARTTEST + :so small.vim +*************** +*** 147,155 **** + :unlet rf1 + :unlet rf2 + :unlet rf3 +! :highlight clear MyGroup1 +! :highlight clear MyGroup2 +! :highlight clear MyGroup3 + G"rp + :/^Results/,$wq! test.out + ENDTEST +--- 147,172 ---- + :unlet rf1 + :unlet rf2 + :unlet rf3 +! :" --- Check that "matchaddpos()" positions matches correctly +! :let @r .= "*** Test 11:\n" +! :set nolazyredraw +! :call setline(1, 'abcdefghijklmnopq') +! :call matchaddpos("MyGroup1", [[1, 5], [1, 8, 3]], 10, 3) +! :1 +! :redraw! +! :let v1 = screenattr(1, 1) +! :let v5 = screenattr(1, 5) +! :let v6 = screenattr(1, 6) +! :let v8 = screenattr(1, 8) +! :let v10 = screenattr(1, 10) +! :let v11 = screenattr(1, 11) +! :let @r .= string(getmatches())."\n" +! :if v1 != v5 && v6 == v1 && v8 == v5 && v10 == v5 && v11 == v1 +! : let @r .= "OK\n" +! :else +! : let @r .= "FAILED\n" +! :endif +! :call clearmatches() + G"rp + :/^Results/,$wq! test.out + ENDTEST +*** ../vim-7.4.329/src/testdir/test63.ok 2010-05-15 13:04:10.000000000 +0200 +--- src/testdir/test63.ok 2014-06-17 17:32:57.036593023 +0200 +*************** +*** 9,11 **** +--- 9,14 ---- + *** Test 8: OK + *** Test 9: OK + *** Test 10: OK ++ *** Test 11: ++ [{'group': 'MyGroup1', 'id': 3, 'priority': 10, 'pos1': [1, 5, 1], 'pos2': [1, 8, 3]}] ++ OK +*** ../vim-7.4.329/src/window.c 2014-06-17 13:52:35.868092848 +0200 +--- src/window.c 2014-06-17 17:04:51.060529240 +0200 +*************** +*** 6751,6770 **** + * Return ID of added match, -1 on failure. + */ + int +! match_add(wp, grp, pat, prio, id) + win_T *wp; + char_u *grp; + char_u *pat; + int prio; + int id; + { +! matchitem_T *cur; +! matchitem_T *prev; +! matchitem_T *m; + int hlg_id; +! regprog_T *regprog; + +! if (*grp == NUL || *pat == NUL) + return -1; + if (id < -1 || id == 0) + { +--- 6751,6772 ---- + * Return ID of added match, -1 on failure. + */ + int +! match_add(wp, grp, pat, prio, id, pos_list) + win_T *wp; + char_u *grp; + char_u *pat; + int prio; + int id; ++ list_T *pos_list; + { +! matchitem_T *cur; +! matchitem_T *prev; +! matchitem_T *m; + int hlg_id; +! regprog_T *regprog = NULL; +! int rtype = SOME_VALID; + +! if (*grp == NUL || (pat != NULL && *pat == NUL)) + return -1; + if (id < -1 || id == 0) + { +*************** +*** 6789,6795 **** + EMSG2(_(e_nogroup), grp); + return -1; + } +! if ((regprog = vim_regcomp(pat, RE_MAGIC)) == NULL) + { + EMSG2(_(e_invarg2), pat); + return -1; +--- 6791,6797 ---- + EMSG2(_(e_nogroup), grp); + return -1; + } +! if (pat != NULL && (regprog = vim_regcomp(pat, RE_MAGIC)) == NULL) + { + EMSG2(_(e_invarg2), pat); + return -1; +*************** +*** 6810,6821 **** + m = (matchitem_T *)alloc(sizeof(matchitem_T)); + m->id = id; + m->priority = prio; +! m->pattern = vim_strsave(pat); + m->hlg_id = hlg_id; + m->match.regprog = regprog; + m->match.rmm_ic = FALSE; + m->match.rmm_maxcol = 0; + + /* Insert new match. The match list is in ascending order with regard to + * the match priorities. */ + cur = wp->w_match_head; +--- 6812,6922 ---- + m = (matchitem_T *)alloc(sizeof(matchitem_T)); + m->id = id; + m->priority = prio; +! m->pattern = pat == NULL ? NULL : vim_strsave(pat); +! m->pos.cur = 0; + m->hlg_id = hlg_id; + m->match.regprog = regprog; + m->match.rmm_ic = FALSE; + m->match.rmm_maxcol = 0; + ++ /* Set up position matches */ ++ if (pos_list != NULL) ++ { ++ linenr_T toplnum = 0; ++ linenr_T botlnum = 0; ++ listitem_T *li; ++ int i; ++ ++ for (i = 0, li = pos_list->lv_first; i < MAXPOSMATCH; ++ i++, li = li->li_next) ++ { ++ linenr_T lnum = 0; ++ colnr_T col = 0; ++ int len = 1; ++ list_T *subl; ++ listitem_T *subli; ++ int error; ++ ++ if (li == NULL) ++ { ++ m->pos.pos[i].lnum = 0; ++ break; ++ } ++ if (li->li_tv.v_type == VAR_LIST) ++ { ++ subl = li->li_tv.vval.v_list; ++ if (subl == NULL) ++ goto fail; ++ subli = subl->lv_first; ++ if (subli == NULL) ++ goto fail; ++ lnum = get_tv_number_chk(&subli->li_tv, &error); ++ if (error == TRUE) ++ goto fail; ++ m->pos.pos[i].lnum = lnum; ++ if (lnum == 0) ++ { ++ --i; ++ continue; ++ } ++ subli = subli->li_next; ++ if (subli != NULL) ++ { ++ col = get_tv_number_chk(&subli->li_tv, &error); ++ if (error == TRUE) ++ goto fail; ++ subli = subli->li_next; ++ if (subli != NULL) ++ { ++ len = get_tv_number_chk(&subli->li_tv, &error); ++ if (error == TRUE) ++ goto fail; ++ } ++ } ++ m->pos.pos[i].col = col; ++ m->pos.pos[i].len = len; ++ } ++ else if (li->li_tv.v_type == VAR_NUMBER) ++ { ++ if (li->li_tv.vval.v_number == 0) ++ continue; ++ m->pos.pos[i].lnum = li->li_tv.vval.v_number; ++ m->pos.pos[i].col = 0; ++ m->pos.pos[i].len = 0; ++ } ++ else ++ { ++ EMSG(_("List or number required")); ++ goto fail; ++ } ++ if (toplnum == 0 || lnum < toplnum) ++ toplnum = lnum; ++ if (botlnum == 0 || lnum > botlnum) ++ botlnum = lnum; ++ } ++ ++ /* Calculate top and bottom lines for redrawing area */ ++ if (toplnum != 0) ++ { ++ if (wp->w_buffer->b_mod_set) ++ { ++ if (wp->w_buffer->b_mod_top > toplnum) ++ wp->w_buffer->b_mod_top = toplnum; ++ if (wp->w_buffer->b_mod_bot < botlnum) ++ wp->w_buffer->b_mod_bot = botlnum; ++ } ++ else ++ { ++ wp->w_buffer->b_mod_top = toplnum; ++ wp->w_buffer->b_mod_bot = botlnum; ++ } ++ m->pos.toplnum = toplnum; ++ m->pos.botlnum = botlnum; ++ wp->w_buffer->b_mod_set = TRUE; ++ rtype = VALID; ++ } ++ } ++ + /* Insert new match. The match list is in ascending order with regard to + * the match priorities. */ + cur = wp->w_match_head; +*************** +*** 6831,6838 **** + prev->next = m; + m->next = cur; + +! redraw_later(SOME_VALID); + return id; + } + + /* +--- 6932,6943 ---- + prev->next = m; + m->next = cur; + +! redraw_later(rtype); + return id; ++ ++ fail: ++ vim_free(m); ++ return -1; + } + + /* +*************** +*** 6845,6852 **** + int id; + int perr; + { +! matchitem_T *cur = wp->w_match_head; +! matchitem_T *prev = cur; + + if (id < 1) + { +--- 6950,6958 ---- + int id; + int perr; + { +! matchitem_T *cur = wp->w_match_head; +! matchitem_T *prev = cur; +! int rtype = SOME_VALID; + + if (id < 1) + { +*************** +*** 6872,6879 **** + prev->next = cur->next; + vim_regfree(cur->match.regprog); + vim_free(cur->pattern); + vim_free(cur); +! redraw_later(SOME_VALID); + return 0; + } + +--- 6978,7002 ---- + prev->next = cur->next; + vim_regfree(cur->match.regprog); + vim_free(cur->pattern); ++ if (cur->pos.toplnum != 0) ++ { ++ if (wp->w_buffer->b_mod_set) ++ { ++ if (wp->w_buffer->b_mod_top > cur->pos.toplnum) ++ wp->w_buffer->b_mod_top = cur->pos.toplnum; ++ if (wp->w_buffer->b_mod_bot < cur->pos.botlnum) ++ wp->w_buffer->b_mod_bot = cur->pos.botlnum; ++ } ++ else ++ { ++ wp->w_buffer->b_mod_top = cur->pos.toplnum; ++ wp->w_buffer->b_mod_bot = cur->pos.botlnum; ++ } ++ wp->w_buffer->b_mod_set = TRUE; ++ rtype = VALID; ++ } + vim_free(cur); +! redraw_later(rtype); + return 0; + } + +*** ../vim-7.4.329/src/version.c 2014-06-17 13:52:35.868092848 +0200 +--- src/version.c 2014-06-17 14:11:53.764136653 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 330, + /**/ + +-- +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/patches/source/vim/patches/7.4.331 b/patches/source/vim/patches/7.4.331 new file mode 100644 index 000000000..d8d526d7f --- /dev/null +++ b/patches/source/vim/patches/7.4.331 @@ -0,0 +1,47 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.331 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.331 +Problem: Relative numbering not updated after a linewise yank. Issue 235. +Solution: Redraw after the yank. (Christian Brabandt) +Files: src/ops.c + + +*** ../vim-7.4.330/src/ops.c 2014-04-29 15:55:39.443801021 +0200 +--- src/ops.c 2014-06-17 18:14:36.584687585 +0200 +*************** +*** 3150,3155 **** +--- 3150,3157 ---- + vim_free(y_current->y_array); + y_current = curr; + } ++ if (curwin->w_p_rnu) ++ redraw_later(SOME_VALID); /* cursor moved to start */ + if (mess) /* Display message about yank? */ + { + if (yanktype == MCHAR +*** ../vim-7.4.330/src/version.c 2014-06-17 17:48:21.784628008 +0200 +--- src/version.c 2014-06-17 18:13:35.824685286 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 331, + /**/ + +-- +CONCORDE: Message for you, sir. + He falls forward revealing the arrow with the note. + "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/patches/source/vim/patches/7.4.332 b/patches/source/vim/patches/7.4.332 new file mode 100644 index 000000000..94e04d2dc --- /dev/null +++ b/patches/source/vim/patches/7.4.332 @@ -0,0 +1,118 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.332 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.332 +Problem: GTK: When a sign icon doesn't fit exactly there can be ugly gaps. +Solution: Scale the sign to fit when the aspect ratio is not too far off. + (Christian Brabandt) +Files: src/gui_gtk_x11.c + + +*** ../vim-7.4.331/src/gui_gtk_x11.c 2014-05-13 20:19:53.573808877 +0200 +--- src/gui_gtk_x11.c 2014-06-17 18:44:39.900755807 +0200 +*************** +*** 5965,5991 **** + * Decide whether we need to scale. Allow one pixel of border + * width to be cut off, in order to avoid excessive scaling for + * tiny differences in font size. + */ + need_scale = (width > SIGN_WIDTH + 2 +! || height > SIGN_HEIGHT + 2 + || (width < 3 * SIGN_WIDTH / 4 + && height < 3 * SIGN_HEIGHT / 4)); + if (need_scale) + { +! double aspect; + + /* Keep the original aspect ratio */ + aspect = (double)height / (double)width; + width = (double)SIGN_WIDTH * SIGN_ASPECT / aspect; + width = MIN(width, SIGN_WIDTH); +! height = (double)width * aspect; + +! /* This doesn't seem to be worth caching, and doing so +! * would complicate the code quite a bit. */ +! sign = gdk_pixbuf_scale_simple(sign, width, height, +! GDK_INTERP_BILINEAR); +! if (sign == NULL) +! return; /* out of memory */ + } + + /* The origin is the upper-left corner of the pixmap. Therefore +--- 5965,6012 ---- + * Decide whether we need to scale. Allow one pixel of border + * width to be cut off, in order to avoid excessive scaling for + * tiny differences in font size. ++ * Do scale to fit the height to avoid gaps because of linespacing. + */ + need_scale = (width > SIGN_WIDTH + 2 +! || height != SIGN_HEIGHT + || (width < 3 * SIGN_WIDTH / 4 + && height < 3 * SIGN_HEIGHT / 4)); + if (need_scale) + { +! double aspect; +! int w = width; +! int h = height; + + /* Keep the original aspect ratio */ + aspect = (double)height / (double)width; + width = (double)SIGN_WIDTH * SIGN_ASPECT / aspect; + width = MIN(width, SIGN_WIDTH); +! if (((double)(MAX(height, SIGN_HEIGHT)) / +! (double)(MIN(height, SIGN_HEIGHT))) < 1.15) +! { +! /* Change the aspect ratio by at most 15% to fill the +! * available space completly. */ +! height = (double)SIGN_HEIGHT * SIGN_ASPECT / aspect; +! height = MIN(height, SIGN_HEIGHT); +! } +! else +! height = (double)width * aspect; + +! if (w == width && h == height) +! { +! /* no change in dimensions; don't decrease reference counter +! * (below) */ +! need_scale = FALSE; +! } +! else +! { +! /* This doesn't seem to be worth caching, and doing so would +! * complicate the code quite a bit. */ +! sign = gdk_pixbuf_scale_simple(sign, width, height, +! GDK_INTERP_BILINEAR); +! if (sign == NULL) +! return; /* out of memory */ +! } + } + + /* The origin is the upper-left corner of the pixmap. Therefore +*** ../vim-7.4.331/src/version.c 2014-06-17 18:16:08.420691059 +0200 +--- src/version.c 2014-06-17 18:46:49.784760721 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 332, + /**/ + +-- + "To whoever finds this note - + I have been imprisoned by my father who wishes me to marry + against my will. Please please please please come and rescue me. + I am in the tall tower of Swamp Castle." + SIR LAUNCELOT's eyes light up with holy inspiration. + "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/patches/source/vim/patches/7.4.333 b/patches/source/vim/patches/7.4.333 new file mode 100644 index 000000000..d0b61711d --- /dev/null +++ b/patches/source/vim/patches/7.4.333 @@ -0,0 +1,72 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.333 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.333 +Problem: Compiler warning for unused function. +Solution: Put the function inside the #ifdef. +Files: src/screen.c + + +*** ../vim-7.4.332/src/screen.c 2014-06-17 17:48:21.784628008 +0200 +--- src/screen.c 2014-06-17 23:16:24.121372619 +0200 +*************** +*** 139,145 **** + static void redraw_custom_statusline __ARGS((win_T *wp)); + #endif + #ifdef FEAT_SEARCH_EXTRA +! #define SEARCH_HL_PRIORITY 0 + static void start_search_hl __ARGS((void)); + static void end_search_hl __ARGS((void)); + static void init_search_hl __ARGS((win_T *wp)); +--- 139,145 ---- + static void redraw_custom_statusline __ARGS((win_T *wp)); + #endif + #ifdef FEAT_SEARCH_EXTRA +! # define SEARCH_HL_PRIORITY 0 + static void start_search_hl __ARGS((void)); + static void end_search_hl __ARGS((void)); + static void init_search_hl __ARGS((win_T *wp)); +*************** +*** 7476,7482 **** + } + } + } +- #endif + + static int + next_search_hl_pos(shl, lnum, posmatch, mincol) +--- 7476,7481 ---- +*************** +*** 7533,7538 **** +--- 7532,7538 ---- + } + return FALSE; + } ++ #endif + + static void + screen_start_highlight(attr) +*** ../vim-7.4.332/src/version.c 2014-06-17 18:46:57.880761027 +0200 +--- src/version.c 2014-06-17 23:17:14.949374542 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 333, + /**/ + +-- +You had connectors? Eeee, when I were a lad we 'ad to carry the +bits between the computer and the terminal with a spoon... + + /// 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/patches/source/vim/patches/7.4.334 b/patches/source/vim/patches/7.4.334 new file mode 100644 index 000000000..4f72bb24b --- /dev/null +++ b/patches/source/vim/patches/7.4.334 @@ -0,0 +1,112 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.334 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.334 (after 7.4.330) +Problem: Unitialized variables, causing some problems. +Solution: Initialize the variables. (Dominique Pelle) +Files: src/screen.c, src/window.c + + +*** ../vim-7.4.333/src/screen.c 2014-06-17 23:17:56.489376113 +0200 +--- src/screen.c 2014-06-18 21:16:23.560368846 +0200 +*************** +*** 7363,7369 **** + match_T *shl; /* points to search_hl or a match */ + linenr_T lnum; + colnr_T mincol; /* minimal column for a match */ +! matchitem_T *cur; /* to retrieve match postions if any */ + { + linenr_T l; + colnr_T matchcol; +--- 7363,7369 ---- + match_T *shl; /* points to search_hl or a match */ + linenr_T lnum; + colnr_T mincol; /* minimal column for a match */ +! matchitem_T *cur; /* to retrieve match positions if any */ + { + linenr_T l; + colnr_T matchcol; +*************** +*** 7458,7466 **** + } + } + else if (cur != NULL) +- { + nmatched = next_search_hl_pos(shl, lnum, &(cur->pos), matchcol); +! } + if (nmatched == 0) + { + shl->lnum = 0; /* no match found */ +--- 7458,7466 ---- + } + } + else if (cur != NULL) + nmatched = next_search_hl_pos(shl, lnum, &(cur->pos), matchcol); +! else +! nmatched = 0; + if (nmatched == 0) + { + shl->lnum = 0; /* no match found */ +*** ../vim-7.4.333/src/window.c 2014-06-17 17:48:21.784628008 +0200 +--- src/window.c 2014-06-18 21:12:15.232359452 +0200 +*************** +*** 6809,6815 **** + } + + /* Build new match. */ +! m = (matchitem_T *)alloc(sizeof(matchitem_T)); + m->id = id; + m->priority = prio; + m->pattern = pat == NULL ? NULL : vim_strsave(pat); +--- 6809,6815 ---- + } + + /* Build new match. */ +! m = (matchitem_T *)alloc_clear(sizeof(matchitem_T)); + m->id = id; + m->priority = prio; + m->pattern = pat == NULL ? NULL : vim_strsave(pat); +*************** +*** 6835,6841 **** + int len = 1; + list_T *subl; + listitem_T *subli; +! int error; + + if (li == NULL) + { +--- 6835,6841 ---- + int len = 1; + list_T *subl; + listitem_T *subli; +! int error = FALSE; + + if (li == NULL) + { +*** ../vim-7.4.333/src/version.c 2014-06-17 23:17:56.493376113 +0200 +--- src/version.c 2014-06-18 21:14:16.516364040 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 334, + /**/ + +-- +You were lucky. We lived for three months in a brown paper bag in a +septic tank. We used to have to get up at six o'clock in the morning, +clean the bag, eat a crust of stale bread, go to work down mill for +fourteen hours a day week in-week out. When we got home, our Dad +would thrash us to sleep with his belt! + + /// 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/patches/source/vim/patches/7.4.335 b/patches/source/vim/patches/7.4.335 new file mode 100644 index 000000000..ef41bc8aa --- /dev/null +++ b/patches/source/vim/patches/7.4.335 @@ -0,0 +1,108 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.335 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.335 +Problem: No digraph for the new rouble sign. +Solution: Add the digraphs =R and =P. +Files: src/digraph.c, runtime/doc/digraph.txt + + +*** ../vim-7.4.334/src/digraph.c 2012-01-10 21:57:16.000000000 +0100 +--- src/digraph.c 2014-06-18 21:36:46.148415099 +0200 +*************** +*** 1425,1430 **** +--- 1425,1432 ---- + {'W', '=', 0x20a9}, + {'=', 'e', 0x20ac}, /* euro */ + {'E', 'u', 0x20ac}, /* euro */ ++ {'=', 'R', 0x20bd}, /* rouble */ ++ {'=', 'P', 0x20bd}, /* rouble */ + {'o', 'C', 0x2103}, + {'c', 'o', 0x2105}, + {'o', 'F', 0x2109}, +*** ../vim-7.4.334/runtime/doc/digraph.txt 2013-08-10 13:24:52.000000000 +0200 +--- runtime/doc/digraph.txt 2014-06-18 21:35:21.684411903 +0200 +*************** +*** 147,153 **** + Two 2 Hook + Nine 9 Horn + +! Equals = Cyrillic + Asterisk * Greek + Percent sign % Greek/Cyrillic special + Plus + smalls: Arabic, capitals: Hebrew +--- 147,153 ---- + Two 2 Hook + Nine 9 Horn + +! Equals = Cyrillic (= used as second char) + Asterisk * Greek + Percent sign % Greek/Cyrillic special + Plus + smalls: Arabic, capitals: Hebrew +*************** +*** 170,175 **** +--- 170,180 ---- + used for the euro sign, while both of them are the character 164, 0xa4. For + compatibility with zsh Eu can also be used for the euro sign. + ++ ROUBLE ++ ++ The rouble sign was added in 2014 as 0x20bd. Vim supports the digraphs =R and ++ =P for this. Note that R= and P= are other characters. ++ + *digraph-table* + char digraph hex dec official name ~ + ^@ NU 0x00 0 NULL (NUL) +*************** +*** 966,971 **** +--- 971,978 ---- + ₧ Pt 20A7 8359 PESETA SIGN + ₩ W= 20A9 8361 WON SIGN + € Eu 20AC 8364 EURO SIGN ++ ₽ =R 20AC 8381 ROUBLE SIGN ++ ₽ =P 20AC 8381 ROUBLE SIGN + ℃ oC 2103 8451 DEGREE CELSIUS + ℅ co 2105 8453 CARE OF + ℉ oF 2109 8457 DEGREE FAHRENHEIT +*************** +*** 1077,1083 **** + ⊥ -T 22A5 8869 UP TACK + ⋅ .P 22C5 8901 DOT OPERATOR + ⋮ :3 22EE 8942 VERTICAL ELLIPSIS +! ⋯ .3 22EF 8943 MIDLINE HORIZONTAL ELLIPSIS + ⌂ Eh 2302 8962 HOUSE + ⌈ <7 2308 8968 LEFT CEILING + ⌉ >7 2309 8969 RIGHT CEILING +--- 1084,1090 ---- + ⊥ -T 22A5 8869 UP TACK + ⋅ .P 22C5 8901 DOT OPERATOR + ⋮ :3 22EE 8942 VERTICAL ELLIPSIS +! ⋯ .3 22EF 8943 MIDLINE HORIZONTAL ELLIPSIS + ⌂ Eh 2302 8962 HOUSE + ⌈ <7 2308 8968 LEFT CEILING + ⌉ >7 2309 8969 RIGHT CEILING +*** ../vim-7.4.334/src/version.c 2014-06-18 21:20:07.240377308 +0200 +--- src/version.c 2014-06-18 21:36:14.632413906 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 335, + /**/ + +-- +You got to work at a mill? Lucky! I got sent back to work in the +acid-mines for my daily crust of stale bread... which not even the +birds would eat. + + /// 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/patches/source/vim/patches/7.4.336 b/patches/source/vim/patches/7.4.336 new file mode 100644 index 000000000..6e5fe3f39 --- /dev/null +++ b/patches/source/vim/patches/7.4.336 @@ -0,0 +1,100 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.336 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.336 +Problem: Setting 'history' to a big value causes out-of-memory errors. +Solution: Limit the value to 10000. (Hirohito Higashi) +Files: runtime/doc/options.txt, src/option.c + + +*** ../vim-7.4.335/runtime/doc/options.txt 2014-05-28 21:40:47.088329130 +0200 +--- runtime/doc/options.txt 2014-06-25 11:44:16.985950668 +0200 +*************** +*** 3920,3931 **** + NOTE: This option is reset when 'compatible' is set. + + *'history'* *'hi'* +! 'history' 'hi' number (Vim default: 20, Vi default: 0) + global + {not in Vi} + A history of ":" commands, and a history of previous search patterns +! are remembered. This option decides how many entries may be stored in + each of these histories (see |cmdline-editing|). + NOTE: This option is set to the Vi default value when 'compatible' is + set and to the Vim default value when 'compatible' is reset. + +--- 3920,3932 ---- + NOTE: This option is reset when 'compatible' is set. + + *'history'* *'hi'* +! 'history' 'hi' number (Vim default: 50, Vi default: 0) + global + {not in Vi} + A history of ":" commands, and a history of previous search patterns +! is remembered. This option decides how many entries may be stored in + each of these histories (see |cmdline-editing|). ++ The maximum value is 10000. + NOTE: This option is set to the Vi default value when 'compatible' is + set and to the Vim default value when 'compatible' is reset. + +*** ../vim-7.4.335/src/option.c 2014-05-13 12:16:44.037555110 +0200 +--- src/option.c 2014-06-25 11:44:48.349951855 +0200 +*************** +*** 1392,1398 **** + SCRIPTID_INIT}, + {"history", "hi", P_NUM|P_VIM, + (char_u *)&p_hi, PV_NONE, +! {(char_u *)0L, (char_u *)20L} SCRIPTID_INIT}, + {"hkmap", "hk", P_BOOL|P_VI_DEF|P_VIM, + #ifdef FEAT_RIGHTLEFT + (char_u *)&p_hkmap, PV_NONE, +--- 1392,1398 ---- + SCRIPTID_INIT}, + {"history", "hi", P_NUM|P_VIM, + (char_u *)&p_hi, PV_NONE, +! {(char_u *)0L, (char_u *)50L} SCRIPTID_INIT}, + {"hkmap", "hk", P_BOOL|P_VI_DEF|P_VIM, + #ifdef FEAT_RIGHTLEFT + (char_u *)&p_hkmap, PV_NONE, +*************** +*** 8595,8600 **** +--- 8595,8605 ---- + errmsg = e_positive; + p_hi = 0; + } ++ else if (p_hi > 10000) ++ { ++ errmsg = e_invarg; ++ p_hi = 10000; ++ } + if (p_re < 0 || p_re > 2) + { + errmsg = e_invarg; +*** ../vim-7.4.335/src/version.c 2014-06-18 21:38:12.216418355 +0200 +--- src/version.c 2014-06-25 11:45:08.141952604 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 336, + /**/ + +-- +ARTHUR: Well, it doesn't matter. Will you go and tell your master that + Arthur from the Court of Camelot is here. +GUARD #1: Listen, in order to maintain air-speed velocity, a swallow + needs to beat its wings 43 times every second, right? +ARTHUR: Please! + 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/patches/source/vim/patches/7.4.337 b/patches/source/vim/patches/7.4.337 new file mode 100644 index 000000000..80b8349b3 --- /dev/null +++ b/patches/source/vim/patches/7.4.337 @@ -0,0 +1,51 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.337 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.337 +Problem: When there is an error preparing to edit the command line, the + command won't be executed. (Hirohito Higashi) +Solution: Reset did_emsg before editing. +Files: src/ex_getln.c + + +*** ../vim-7.4.336/src/ex_getln.c 2014-06-12 19:44:45.324549030 +0200 +--- src/ex_getln.c 2014-06-25 12:06:38.018001402 +0200 +*************** +*** 342,347 **** +--- 342,354 ---- + do_digraph(-1); /* init digraph typeahead */ + #endif + ++ /* If something above caused an error, reset the flags, we do want to type ++ * and execute commands. Display may be messed up a bit. */ ++ if (did_emsg) ++ redrawcmd(); ++ did_emsg = FALSE; ++ got_int = FALSE; ++ + /* + * Collect the command string, handling editing keys. + */ +*** ../vim-7.4.336/src/version.c 2014-06-25 11:48:40.733960646 +0200 +--- src/version.c 2014-06-25 12:24:39.442042313 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 337, + /**/ + +-- +Computers are not intelligent. They only think they are. + + /// 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/patches/source/vim/patches/7.4.338 b/patches/source/vim/patches/7.4.338 new file mode 100644 index 000000000..f533693cc --- /dev/null +++ b/patches/source/vim/patches/7.4.338 @@ -0,0 +1,1830 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.338 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.338 +Problem: Cannot wrap lines taking indent into account. +Solution: Add the 'breakindent' option. (many authors, final improvements by + Christian Brabandt) +Files: runtime/doc/eval.txt, runtime/doc/options.txt, runtime/optwin.vim, + src/buffer.c, src/charset.c, src/edit.c, src/ex_getln.c, + src/getchar.c, src/misc1.c, src/misc2.c, src/ops.c, src/option.c, + src/option.h, src/proto/charset.pro, src/proto/misc1.pro, + src/proto/option.pro, src/screen.c, src/structs.h, + 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/testdir/test_breakindent.in, src/testdir/test_breakindent.ok, + src/ui.c + + +*** ../vim-7.4.337/runtime/doc/eval.txt 2014-06-17 17:48:21.768628007 +0200 +--- runtime/doc/eval.txt 2014-06-25 12:57:00.986115765 +0200 +*************** +*** 6639,6646 **** + keymap Compiled with 'keymap' support. + langmap Compiled with 'langmap' support. + libcall Compiled with |libcall()| support. +! linebreak Compiled with 'linebreak', 'breakat' and 'showbreak' +! support. + lispindent Compiled with support for lisp indenting. + listcmds Compiled with commands for the buffer list |:files| + and the argument list |arglist|. +--- 6651,6658 ---- + keymap Compiled with 'keymap' support. + langmap Compiled with 'langmap' support. + libcall Compiled with |libcall()| support. +! linebreak Compiled with 'linebreak', 'breakat', 'showbreak' and +! 'breakindent' support. + lispindent Compiled with support for lisp indenting. + listcmds Compiled with commands for the buffer list |:files| + and the argument list |arglist|. +*** ../vim-7.4.337/runtime/doc/options.txt 2014-06-17 17:48:21.768628007 +0200 +--- runtime/doc/options.txt 2014-06-25 12:57:00.986115765 +0200 +*************** +*** 1200,1205 **** +--- 1200,1237 ---- + break if 'linebreak' is on. Only works for ASCII and also for 8-bit + characters when 'encoding' is an 8-bit encoding. + ++ *'breakindent'* *'bri'* ++ 'breakindent' 'bri' boolean (default off) ++ local to window ++ {not in Vi} ++ {not available when compiled without the |+linebreak| ++ feature} ++ Every wrapped line will continue visually indented (same amount of ++ space as the beginning of that line), thus preserving horizontal blocks ++ of text. ++ ++ *'breakindentopt'* *'briopt'* ++ 'breakindentopt' 'briopt' string (default empty) ++ local to window ++ {not in Vi} ++ {not available when compiled without the |+linebreak| ++ feature} ++ Settings for 'breakindent'. It can consist of the following optional ++ items and must be seperated by a comma: ++ min:{n} Minimum text width that will be kept after ++ applying 'breakindent', even if the resulting ++ text should normally be narrower. This prevents ++ text indented almost to the right window border ++ occupying lot of vertical space when broken. ++ shift:{n} After applying 'breakindent', wrapped line ++ beginning will be shift by given number of ++ characters. It permits dynamic French paragraph ++ indentation (negative) or emphasizing the line ++ continuation (positive). ++ sbr Display the 'showbreak' value before applying the ++ additional indent. ++ The default value for min is 20 and shift is 0. ++ + *'browsedir'* *'bsdir'* + 'browsedir' 'bsdir' string (default: "last") + global +*** ../vim-7.4.337/runtime/optwin.vim 2014-04-01 12:26:40.241157964 +0200 +--- runtime/optwin.vim 2014-06-25 12:57:00.990115765 +0200 +*************** +*** 324,329 **** +--- 324,335 ---- + call append("$", "linebreak\twrap long lines at a character in 'breakat'") + call append("$", "\t(local to window)") + call <SID>BinOptionL("lbr") ++ call append("$", "breakindent\tpreserve indentation in wrapped text") ++ call append("$", "\t(local to window)") ++ call <SID>BinOptionL("bri") ++ call append("$", "breakindentopt\tadjust breakindent behaviour") ++ call append("$", "\t(local to window)") ++ call <SID>OptionL("briopt") + call append("$", "breakat\twhich characters might cause a line break") + call <SID>OptionG("brk", &brk) + call append("$", "showbreak\tstring to put before wrapped screen lines") +*** ../vim-7.4.337/src/charset.c 2014-03-23 15:12:29.911264336 +0100 +--- src/charset.c 2014-06-25 13:23:05.842174966 +0200 +*************** +*** 867,875 **** + char_u *s; + { + colnr_T col = startcol; + + while (*s != NUL) +! col += lbr_chartabsize_adv(&s, col); + return (int)col; + } + +--- 867,876 ---- + char_u *s; + { + colnr_T col = startcol; ++ char_u *line = s; /* pointer to start of line, for breakindent */ + + while (*s != NUL) +! col += lbr_chartabsize_adv(line, &s, col); + return (int)col; + } + +*************** +*** 877,892 **** + * Like linetabsize(), but for a given window instead of the current one. + */ + int +! win_linetabsize(wp, p, len) + win_T *wp; +! char_u *p; + colnr_T len; + { + colnr_T col = 0; + char_u *s; + +! for (s = p; *s != NUL && (len == MAXCOL || s < p + len); mb_ptr_adv(s)) +! col += win_lbr_chartabsize(wp, s, col, NULL); + return (int)col; + } + +--- 878,894 ---- + * Like linetabsize(), but for a given window instead of the current one. + */ + int +! win_linetabsize(wp, line, len) + win_T *wp; +! char_u *line; + colnr_T len; + { + colnr_T col = 0; + char_u *s; + +! for (s = line; *s != NUL && (len == MAXCOL || s < line + len); +! mb_ptr_adv(s)) +! col += win_lbr_chartabsize(wp, line, s, col, NULL); + return (int)col; + } + +*************** +*** 1021,1032 **** + * like chartabsize(), but also check for line breaks on the screen + */ + int +! lbr_chartabsize(s, col) + unsigned char *s; + colnr_T col; + { + #ifdef FEAT_LINEBREAK +! if (!curwin->w_p_lbr && *p_sbr == NUL) + { + #endif + #ifdef FEAT_MBYTE +--- 1023,1035 ---- + * like chartabsize(), but also check for line breaks on the screen + */ + int +! lbr_chartabsize(line, s, col) +! char_u *line; /* start of the line */ + unsigned char *s; + colnr_T col; + { + #ifdef FEAT_LINEBREAK +! if (!curwin->w_p_lbr && *p_sbr == NUL && !curwin->w_p_bri) + { + #endif + #ifdef FEAT_MBYTE +*************** +*** 1036,1042 **** + RET_WIN_BUF_CHARTABSIZE(curwin, curbuf, s, col) + #ifdef FEAT_LINEBREAK + } +! return win_lbr_chartabsize(curwin, s, col, NULL); + #endif + } + +--- 1039,1045 ---- + RET_WIN_BUF_CHARTABSIZE(curwin, curbuf, s, col) + #ifdef FEAT_LINEBREAK + } +! return win_lbr_chartabsize(curwin, line == NULL ? s : line, s, col, NULL); + #endif + } + +*************** +*** 1044,1056 **** + * Call lbr_chartabsize() and advance the pointer. + */ + int +! lbr_chartabsize_adv(s, col) + char_u **s; + colnr_T col; + { + int retval; + +! retval = lbr_chartabsize(*s, col); + mb_ptr_adv(*s); + return retval; + } +--- 1047,1060 ---- + * Call lbr_chartabsize() and advance the pointer. + */ + int +! lbr_chartabsize_adv(line, s, col) +! char_u *line; /* start of the line */ + char_u **s; + colnr_T col; + { + int retval; + +! retval = lbr_chartabsize(line, *s, col); + mb_ptr_adv(*s); + return retval; + } +*************** +*** 1063,1070 **** + * value, init to 0 before calling. + */ + int +! win_lbr_chartabsize(wp, s, col, headp) + win_T *wp; + char_u *s; + colnr_T col; + int *headp UNUSED; +--- 1067,1075 ---- + * value, init to 0 before calling. + */ + int +! win_lbr_chartabsize(wp, line, s, col, headp) + win_T *wp; ++ char_u *line; /* start of the line */ + char_u *s; + colnr_T col; + int *headp UNUSED; +*************** +*** 1086,1094 **** + int n; + + /* +! * No 'linebreak' and 'showbreak': return quickly. + */ +! if (!wp->w_p_lbr && *p_sbr == NUL) + #endif + { + #ifdef FEAT_MBYTE +--- 1091,1099 ---- + int n; + + /* +! * No 'linebreak', 'showbreak' and 'breakindent': return quickly. + */ +! if (!wp->w_p_lbr && !wp->w_p_bri && *p_sbr == NUL) + #endif + { + #ifdef FEAT_MBYTE +*************** +*** 1163,1173 **** + # endif + + /* +! * May have to add something for 'showbreak' string at start of line + * Set *headp to the size of what we add. + */ + added = 0; +! if (*p_sbr != NUL && wp->w_p_wrap && col != 0) + { + numberextra = win_col_off(wp); + col += numberextra + mb_added; +--- 1168,1179 ---- + # endif + + /* +! * May have to add something for 'breakindent' and/or 'showbreak' +! * string at start of line. + * Set *headp to the size of what we add. + */ + added = 0; +! if ((*p_sbr != NUL || wp->w_p_bri) && wp->w_p_wrap && col != 0) + { + numberextra = win_col_off(wp); + col += numberextra + mb_added; +*************** +*** 1180,1186 **** + } + if (col == 0 || col + size > (colnr_T)W_WIDTH(wp)) + { +! added = vim_strsize(p_sbr); + if (tab_corr) + size += (added / wp->w_buffer->b_p_ts) * wp->w_buffer->b_p_ts; + else +--- 1186,1197 ---- + } + if (col == 0 || col + size > (colnr_T)W_WIDTH(wp)) + { +! added = 0; +! if (*p_sbr != NUL) +! added += vim_strsize(p_sbr); +! if (wp->w_p_bri) +! added += get_breakindent_win(wp, line); +! + if (tab_corr) + size += (added / wp->w_buffer->b_p_ts) * wp->w_buffer->b_p_ts; + else +*************** +*** 1274,1286 **** + colnr_T vcol; + char_u *ptr; /* points to current char */ + char_u *posptr; /* points to char at pos->col */ + int incr; + int head; + int ts = wp->w_buffer->b_p_ts; + int c; + + vcol = 0; +! ptr = ml_get_buf(wp->w_buffer, pos->lnum, FALSE); + if (pos->col == MAXCOL) + posptr = NULL; /* continue until the NUL */ + else +--- 1285,1298 ---- + colnr_T vcol; + char_u *ptr; /* points to current char */ + char_u *posptr; /* points to char at pos->col */ ++ char_u *line; /* start of the line */ + int incr; + int head; + int ts = wp->w_buffer->b_p_ts; + int c; + + vcol = 0; +! line = ptr = ml_get_buf(wp->w_buffer, pos->lnum, FALSE); + if (pos->col == MAXCOL) + posptr = NULL; /* continue until the NUL */ + else +*************** +*** 1288,1299 **** + + /* + * This function is used very often, do some speed optimizations. +! * When 'list', 'linebreak' and 'showbreak' are not set use a simple loop. + * Also use this when 'list' is set but tabs take their normal size. + */ + if ((!wp->w_p_list || lcs_tab1 != NUL) + #ifdef FEAT_LINEBREAK +! && !wp->w_p_lbr && *p_sbr == NUL + #endif + ) + { +--- 1300,1312 ---- + + /* + * This function is used very often, do some speed optimizations. +! * When 'list', 'linebreak', 'showbreak' and 'breakindent' are not set +! * use a simple loop. + * Also use this when 'list' is set but tabs take their normal size. + */ + if ((!wp->w_p_list || lcs_tab1 != NUL) + #ifdef FEAT_LINEBREAK +! && !wp->w_p_lbr && *p_sbr == NUL && !wp->w_p_bri + #endif + ) + { +*************** +*** 1355,1361 **** + { + /* A tab gets expanded, depending on the current column */ + head = 0; +! incr = win_lbr_chartabsize(wp, ptr, vcol, &head); + /* make sure we don't go past the end of the line */ + if (*ptr == NUL) + { +--- 1368,1374 ---- + { + /* A tab gets expanded, depending on the current column */ + head = 0; +! incr = win_lbr_chartabsize(wp, line, ptr, vcol, &head); + /* make sure we don't go past the end of the line */ + if (*ptr == NUL) + { +*** ../vim-7.4.337/src/edit.c 2014-05-28 21:40:47.092329130 +0200 +--- src/edit.c 2014-06-25 13:16:43.278160493 +0200 +*************** +*** 1956,1962 **** + else + #endif + ++new_cursor_col; +! vcol += lbr_chartabsize(ptr + new_cursor_col, (colnr_T)vcol); + } + vcol = last_vcol; + +--- 1956,1962 ---- + else + #endif + ++new_cursor_col; +! vcol += lbr_chartabsize(ptr, ptr + new_cursor_col, (colnr_T)vcol); + } + vcol = last_vcol; + +*************** +*** 7126,7134 **** + for (;;) + { + coladvance(v - width); +! /* getviscol() is slow, skip it when 'showbreak' is empty and +! * there are no multi-byte characters */ +! if ((*p_sbr == NUL + # ifdef FEAT_MBYTE + && !has_mbyte + # endif +--- 7126,7135 ---- + for (;;) + { + coladvance(v - width); +! /* getviscol() is slow, skip it when 'showbreak' is empty, +! * 'breakindent' is not set and there are no multi-byte +! * characters */ +! if ((*p_sbr == NUL && !curwin->w_p_bri + # ifdef FEAT_MBYTE + && !has_mbyte + # endif +*************** +*** 9758,9768 **** + getvcol(curwin, &fpos, &vcol, NULL, NULL); + getvcol(curwin, cursor, &want_vcol, NULL, NULL); + +! /* Use as many TABs as possible. Beware of 'showbreak' and +! * 'linebreak' adding extra virtual columns. */ + while (vim_iswhite(*ptr)) + { +! i = lbr_chartabsize((char_u *)"\t", vcol); + if (vcol + i > want_vcol) + break; + if (*ptr != TAB) +--- 9759,9769 ---- + getvcol(curwin, &fpos, &vcol, NULL, NULL); + getvcol(curwin, cursor, &want_vcol, NULL, NULL); + +! /* Use as many TABs as possible. Beware of 'breakindent', 'showbreak' +! * and 'linebreak' adding extra virtual columns. */ + while (vim_iswhite(*ptr)) + { +! i = lbr_chartabsize(NULL, (char_u *)"\t", vcol); + if (vcol + i > want_vcol) + break; + if (*ptr != TAB) +*************** +*** 9784,9794 **** + if (change_col >= 0) + { + int repl_off = 0; + + /* Skip over the spaces we need. */ + while (vcol < want_vcol && *ptr == ' ') + { +! vcol += lbr_chartabsize(ptr, vcol); + ++ptr; + ++repl_off; + } +--- 9785,9796 ---- + if (change_col >= 0) + { + int repl_off = 0; ++ char_u *line = ptr; + + /* Skip over the spaces we need. */ + while (vcol < want_vcol && *ptr == ' ') + { +! vcol += lbr_chartabsize(line, ptr, vcol); + ++ptr; + ++repl_off; + } +*************** +*** 10029,10034 **** +--- 10031,10037 ---- + int c; + int temp; + char_u *ptr, *prev_ptr; ++ char_u *line; + + if (lnum < 1 || lnum > curbuf->b_ml.ml_line_count) + { +*************** +*** 10038,10050 **** + + /* try to advance to the cursor column */ + temp = 0; +! ptr = ml_get(lnum); + prev_ptr = ptr; + validate_virtcol(); + while ((colnr_T)temp < curwin->w_virtcol && *ptr != NUL) + { + prev_ptr = ptr; +! temp += lbr_chartabsize_adv(&ptr, (colnr_T)temp); + } + if ((colnr_T)temp > curwin->w_virtcol) + ptr = prev_ptr; +--- 10041,10053 ---- + + /* try to advance to the cursor column */ + temp = 0; +! line = ptr = ml_get(lnum); + prev_ptr = ptr; + validate_virtcol(); + while ((colnr_T)temp < curwin->w_virtcol && *ptr != NUL) + { + prev_ptr = ptr; +! temp += lbr_chartabsize_adv(line, &ptr, (colnr_T)temp); + } + if ((colnr_T)temp > curwin->w_virtcol) + ptr = prev_ptr; +*** ../vim-7.4.337/src/ex_getln.c 2014-06-25 12:26:42.230046959 +0200 +--- src/ex_getln.c 2014-06-25 12:57:00.998115765 +0200 +*************** +*** 2302,2311 **** + + p = (char_u *)line_ga.ga_data; + p[line_ga.ga_len] = NUL; +! indent = get_indent_str(p, 8); + indent += sw - indent % sw; + add_indent: +! while (get_indent_str(p, 8) < indent) + { + char_u *s = skipwhite(p); + +--- 2302,2311 ---- + + p = (char_u *)line_ga.ga_data; + p[line_ga.ga_len] = NUL; +! indent = get_indent_str(p, 8, FALSE); + indent += sw - indent % sw; + add_indent: +! while (get_indent_str(p, 8, FALSE) < indent) + { + char_u *s = skipwhite(p); + +*************** +*** 2357,2367 **** + else + { + 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) + { + char_u *s = skipwhite(p); + +--- 2357,2367 ---- + else + { + p[line_ga.ga_len] = NUL; +! indent = get_indent_str(p, 8, FALSE); + --indent; + indent -= indent % get_sw_value(curbuf); + } +! while (get_indent_str(p, 8, FALSE) > indent) + { + char_u *s = skipwhite(p); + +*** ../vim-7.4.337/src/getchar.c 2014-05-22 18:59:54.510169240 +0200 +--- src/getchar.c 2014-06-25 13:16:53.946160896 +0200 +*************** +*** 2675,2681 **** + { + if (!vim_iswhite(ptr[col])) + curwin->w_wcol = vcol; +! vcol += lbr_chartabsize(ptr + col, + (colnr_T)vcol); + #ifdef FEAT_MBYTE + if (has_mbyte) +--- 2675,2681 ---- + { + if (!vim_iswhite(ptr[col])) + curwin->w_wcol = vcol; +! vcol += lbr_chartabsize(ptr, ptr + col, + (colnr_T)vcol); + #ifdef FEAT_MBYTE + if (has_mbyte) +*** ../vim-7.4.337/src/misc1.c 2014-05-22 14:00:12.698534712 +0200 +--- src/misc1.c 2014-06-25 13:39:43.598212712 +0200 +*************** +*** 32,38 **** + int + get_indent() + { +! return get_indent_str(ml_get_curline(), (int)curbuf->b_p_ts); + } + + /* +--- 32,38 ---- + int + get_indent() + { +! return get_indent_str(ml_get_curline(), (int)curbuf->b_p_ts, FALSE); + } + + /* +*************** +*** 42,48 **** + get_indent_lnum(lnum) + linenr_T lnum; + { +! return get_indent_str(ml_get(lnum), (int)curbuf->b_p_ts); + } + + #if defined(FEAT_FOLDING) || defined(PROTO) +--- 42,48 ---- + get_indent_lnum(lnum) + linenr_T lnum; + { +! return get_indent_str(ml_get(lnum), (int)curbuf->b_p_ts, FALSE); + } + + #if defined(FEAT_FOLDING) || defined(PROTO) +*************** +*** 55,61 **** + buf_T *buf; + linenr_T lnum; + { +! return get_indent_str(ml_get_buf(buf, lnum, FALSE), (int)buf->b_p_ts); + } + #endif + +--- 55,61 ---- + buf_T *buf; + linenr_T lnum; + { +! return get_indent_str(ml_get_buf(buf, lnum, FALSE), (int)buf->b_p_ts, FALSE); + } + #endif + +*************** +*** 64,79 **** + * 'tabstop' at "ts" + */ + int +! get_indent_str(ptr, ts) + char_u *ptr; + int ts; + { + int count = 0; + + for ( ; *ptr; ++ptr) + { +! if (*ptr == TAB) /* count a tab for what it is worth */ +! count += ts - (count % ts); + else if (*ptr == ' ') + ++count; /* count a space for one */ + else +--- 64,86 ---- + * 'tabstop' at "ts" + */ + int +! get_indent_str(ptr, ts, list) + char_u *ptr; + int ts; ++ int list; /* if TRUE, count only screen size for tabs */ + { + int count = 0; + + for ( ; *ptr; ++ptr) + { +! if (*ptr == TAB) +! { +! if (!list || lcs_tab1) /* count a tab for what it is worth */ +! count += ts - (count % ts); +! else +! /* in list mode, when tab is not set, count screen char width for Tab: ^I */ +! count += ptr2cells(ptr); +! } + else if (*ptr == ' ') + ++count; /* count a space for one */ + else +*************** +*** 476,481 **** +--- 483,540 ---- + return (int)col; + } + ++ #if defined(FEAT_LINEBREAK) || defined(PROTO) ++ /* ++ * Return appropriate space number for breakindent, taking influencing ++ * parameters into account. Window must be specified, since it is not ++ * necessarily always the current one. ++ */ ++ int ++ get_breakindent_win(wp, line) ++ win_T *wp; ++ char_u *line; /* start of the line */ ++ { ++ static int prev_indent = 0; /* cached indent value */ ++ static long prev_ts = 0L; /* cached tabstop value */ ++ static char_u *prev_line = NULL; /* cached pointer to line */ ++ int bri = 0; ++ /* window width minus window margin space, i.e. what rests for text */ ++ const int eff_wwidth = W_WIDTH(wp) ++ - ((wp->w_p_nu || wp->w_p_rnu) ++ && (vim_strchr(p_cpo, CPO_NUMCOL) == NULL) ++ ? number_width(wp) + 1 : 0); ++ ++ /* used cached indent, unless pointer or 'tabstop' changed */ ++ if (prev_line != line || prev_ts != wp->w_buffer->b_p_ts) ++ { ++ prev_line = line; ++ prev_ts = wp->w_buffer->b_p_ts; ++ prev_indent = get_indent_str(line, ++ (int)wp->w_buffer->b_p_ts, wp->w_p_list) + wp->w_p_brishift; ++ } ++ ++ /* indent minus the length of the showbreak string */ ++ bri = prev_indent; ++ if (wp->w_p_brisbr) ++ bri -= vim_strsize(p_sbr); ++ ++ /* Add offset for number column, if 'n' is in 'cpoptions' */ ++ bri += win_col_off2(wp); ++ ++ /* never indent past left window margin */ ++ if (bri < 0) ++ bri = 0; ++ /* always leave at least bri_min characters on the left, ++ * if text width is sufficient */ ++ else if (bri > eff_wwidth - wp->w_p_brimin) ++ bri = (eff_wwidth - wp->w_p_brimin < 0) ++ ? 0 : eff_wwidth - wp->w_p_brimin; ++ ++ return bri; ++ } ++ #endif ++ ++ + #if defined(FEAT_CINDENT) || defined(FEAT_SMARTINDENT) + + static int cin_is_cinword __ARGS((char_u *line)); +*************** +*** 678,684 **** + /* + * count white space on current line + */ +! newindent = get_indent_str(saved_line, (int)curbuf->b_p_ts); + if (newindent == 0 && !(flags & OPENLINE_COM_LIST)) + newindent = second_line_indent; /* for ^^D command in insert mode */ + +--- 737,743 ---- + /* + * count white space on current line + */ +! newindent = get_indent_str(saved_line, (int)curbuf->b_p_ts, FALSE); + if (newindent == 0 && !(flags & OPENLINE_COM_LIST)) + newindent = second_line_indent; /* for ^^D command in insert mode */ + +*************** +*** 1201,1207 **** + || do_si + #endif + ) +! newindent = get_indent_str(leader, (int)curbuf->b_p_ts); + + /* Add the indent offset */ + if (newindent + off < 0) +--- 1260,1266 ---- + || do_si + #endif + ) +! newindent = get_indent_str(leader, (int)curbuf->b_p_ts, FALSE); + + /* Add the indent offset */ + if (newindent + off < 0) +*************** +*** 1994,1999 **** +--- 2053,2059 ---- + char_u *s; + int lines = 0; + int width; ++ char_u *line; + + #ifdef FEAT_DIFF + /* Check for filler lines above this buffer line. When folded the result +*************** +*** 2009,2020 **** + return lines + 1; + #endif + +! s = ml_get_buf(wp->w_buffer, lnum, FALSE); + + col = 0; + while (*s != NUL && --column >= 0) + { +! col += win_lbr_chartabsize(wp, s, (colnr_T)col, NULL); + mb_ptr_adv(s); + } + +--- 2069,2080 ---- + return lines + 1; + #endif + +! line = s = ml_get_buf(wp->w_buffer, lnum, FALSE); + + col = 0; + while (*s != NUL && --column >= 0) + { +! col += win_lbr_chartabsize(wp, line, s, (colnr_T)col, NULL); + mb_ptr_adv(s); + } + +*************** +*** 2026,2032 **** + * 'ts') -- webb. + */ + if (*s == TAB && (State & NORMAL) && (!wp->w_p_list || lcs_tab1)) +! col += win_lbr_chartabsize(wp, s, (colnr_T)col, NULL) - 1; + + /* + * Add column offset for 'number', 'relativenumber', 'foldcolumn', etc. +--- 2086,2092 ---- + * 'ts') -- webb. + */ + if (*s == TAB && (State & NORMAL) && (!wp->w_p_list || lcs_tab1)) +! col += win_lbr_chartabsize(wp, line, s, (colnr_T)col, NULL) - 1; + + /* + * Add column offset for 'number', 'relativenumber', 'foldcolumn', etc. +*************** +*** 9002,9011 **** + amount = 2; + else + { + amount = 0; + while (*that && col) + { +! amount += lbr_chartabsize_adv(&that, (colnr_T)amount); + col--; + } + +--- 9062,9073 ---- + amount = 2; + else + { ++ char_u *line = that; ++ + amount = 0; + while (*that && col) + { +! amount += lbr_chartabsize_adv(line, &that, (colnr_T)amount); + col--; + } + +*************** +*** 9028,9034 **** + + while (vim_iswhite(*that)) + { +! amount += lbr_chartabsize(that, (colnr_T)amount); + ++that; + } + +--- 9090,9096 ---- + + while (vim_iswhite(*that)) + { +! amount += lbr_chartabsize(line, that, (colnr_T)amount); + ++that; + } + +*************** +*** 9066,9080 **** + && !quotecount) + --parencount; + if (*that == '\\' && *(that+1) != NUL) +! amount += lbr_chartabsize_adv(&that, +! (colnr_T)amount); +! amount += lbr_chartabsize_adv(&that, +! (colnr_T)amount); + } + } + while (vim_iswhite(*that)) + { +! amount += lbr_chartabsize(that, (colnr_T)amount); + that++; + } + if (!*that || *that == ';') +--- 9128,9143 ---- + && !quotecount) + --parencount; + if (*that == '\\' && *(that+1) != NUL) +! amount += lbr_chartabsize_adv( +! line, &that, (colnr_T)amount); +! amount += lbr_chartabsize_adv( +! line, &that, (colnr_T)amount); + } + } + while (vim_iswhite(*that)) + { +! amount += lbr_chartabsize( +! line, that, (colnr_T)amount); + that++; + } + if (!*that || *that == ';') +*** ../vim-7.4.337/src/misc2.c 2014-05-07 18:35:25.669216052 +0200 +--- src/misc2.c 2014-06-25 13:21:18.474170904 +0200 +*************** +*** 201,210 **** + { + /* Count a tab for what it's worth (if list mode not on) */ + #ifdef FEAT_LINEBREAK +! csize = win_lbr_chartabsize(curwin, ptr, col, &head); + mb_ptr_adv(ptr); + #else +! csize = lbr_chartabsize_adv(&ptr, col); + #endif + col += csize; + } +--- 201,210 ---- + { + /* Count a tab for what it's worth (if list mode not on) */ + #ifdef FEAT_LINEBREAK +! csize = win_lbr_chartabsize(curwin, line, ptr, col, &head); + mb_ptr_adv(ptr); + #else +! csize = lbr_chartabsize_adv(line, &ptr, col); + #endif + col += csize; + } +*************** +*** 2156,2162 **** + } + } + +! #if (defined(UNIX) && !defined(USE_SYSTEM)) || defined(WIN3264) + /* + * Append the text in "gap" below the cursor line and clear "gap". + */ +--- 2156,2163 ---- + } + } + +! #if (defined(UNIX) && !defined(USE_SYSTEM)) || defined(WIN3264) \ +! || defined(PROTO) + /* + * Append the text in "gap" below the cursor line and clear "gap". + */ +*** ../vim-7.4.337/src/ops.c 2014-06-17 18:16:08.420691059 +0200 +--- src/ops.c 2014-06-25 13:18:27.082164420 +0200 +*************** +*** 420,426 **** + } + for ( ; vim_iswhite(*bd.textstart); ) + { +! incr = lbr_chartabsize_adv(&bd.textstart, (colnr_T)(bd.start_vcol)); + total += incr; + bd.start_vcol += incr; + } +--- 420,428 ---- + } + for ( ; vim_iswhite(*bd.textstart); ) + { +! /* TODO: is passing bd.textstart for start of the line OK? */ +! incr = lbr_chartabsize_adv(bd.textstart, &bd.textstart, +! (colnr_T)(bd.start_vcol)); + total += incr; + bd.start_vcol += incr; + } +*************** +*** 480,486 **** + + while (vim_iswhite(*non_white)) + { +! incr = lbr_chartabsize_adv(&non_white, non_white_col); + non_white_col += incr; + } + +--- 482,488 ---- + + while (vim_iswhite(*non_white)) + { +! incr = lbr_chartabsize_adv(bd.textstart, &non_white, non_white_col); + non_white_col += incr; + } + +*************** +*** 505,511 **** + verbatim_copy_width -= bd.start_char_vcols; + while (verbatim_copy_width < destination_col) + { +! incr = lbr_chartabsize(verbatim_copy_end, verbatim_copy_width); + if (verbatim_copy_width + incr > destination_col) + break; + verbatim_copy_width += incr; +--- 507,517 ---- + verbatim_copy_width -= bd.start_char_vcols; + while (verbatim_copy_width < destination_col) + { +! char_u *line = verbatim_copy_end; +! +! /* TODO: is passing verbatim_copy_end for start of the line OK? */ +! incr = lbr_chartabsize(line, verbatim_copy_end, +! verbatim_copy_width); + if (verbatim_copy_width + incr > destination_col) + break; + verbatim_copy_width += incr; +*************** +*** 3617,3623 **** + for (ptr = oldp; vcol < col && *ptr; ) + { + /* Count a tab for what it's worth (if list mode not on) */ +! incr = lbr_chartabsize_adv(&ptr, (colnr_T)vcol); + vcol += incr; + } + bd.textcol = (colnr_T)(ptr - oldp); +--- 3623,3629 ---- + for (ptr = oldp; vcol < col && *ptr; ) + { + /* Count a tab for what it's worth (if list mode not on) */ +! incr = lbr_chartabsize_adv(oldp, &ptr, (colnr_T)vcol); + vcol += incr; + } + bd.textcol = (colnr_T)(ptr - oldp); +*************** +*** 3651,3657 **** + /* calculate number of spaces required to fill right side of block*/ + spaces = y_width + 1; + for (j = 0; j < yanklen; j++) +! spaces -= lbr_chartabsize(&y_array[i][j], 0); + if (spaces < 0) + spaces = 0; + +--- 3657,3663 ---- + /* calculate number of spaces required to fill right side of block*/ + spaces = y_width + 1; + for (j = 0; j < yanklen; j++) +! spaces -= lbr_chartabsize(NULL, &y_array[i][j], 0); + if (spaces < 0) + spaces = 0; + +*************** +*** 5203,5209 **** + while (bdp->start_vcol < oap->start_vcol && *pstart) + { + /* Count a tab for what it's worth (if list mode not on) */ +! incr = lbr_chartabsize(pstart, (colnr_T)bdp->start_vcol); + bdp->start_vcol += incr; + #ifdef FEAT_VISUALEXTRA + if (vim_iswhite(*pstart)) +--- 5209,5215 ---- + while (bdp->start_vcol < oap->start_vcol && *pstart) + { + /* Count a tab for what it's worth (if list mode not on) */ +! incr = lbr_chartabsize(line, pstart, (colnr_T)bdp->start_vcol); + bdp->start_vcol += incr; + #ifdef FEAT_VISUALEXTRA + if (vim_iswhite(*pstart)) +*************** +*** 5272,5278 **** + { + /* Count a tab for what it's worth (if list mode not on) */ + prev_pend = pend; +! incr = lbr_chartabsize_adv(&pend, (colnr_T)bdp->end_vcol); + bdp->end_vcol += incr; + } + if (bdp->end_vcol <= oap->end_vcol +--- 5278,5287 ---- + { + /* Count a tab for what it's worth (if list mode not on) */ + prev_pend = pend; +! /* TODO: is passing prev_pend for start of the line OK? +! * perhaps it should be "line". */ +! incr = lbr_chartabsize_adv(prev_pend, &pend, +! (colnr_T)bdp->end_vcol); + bdp->end_vcol += incr; + } + if (bdp->end_vcol <= oap->end_vcol +*************** +*** 6882,6888 **** + validate_virtcol(); + col_print(buf1, sizeof(buf1), (int)curwin->w_cursor.col + 1, + (int)curwin->w_virtcol + 1); +! col_print(buf2, sizeof(buf2), (int)STRLEN(p), linetabsize(p)); + + if (char_count_cursor == byte_count_cursor + && char_count == byte_count) +--- 6891,6898 ---- + validate_virtcol(); + col_print(buf1, sizeof(buf1), (int)curwin->w_cursor.col + 1, + (int)curwin->w_virtcol + 1); +! col_print(buf2, sizeof(buf2), (int)STRLEN(p), +! linetabsize(p)); + + if (char_count_cursor == byte_count_cursor + && char_count == byte_count) +*** ../vim-7.4.337/src/option.c 2014-06-25 11:48:40.733960646 +0200 +--- src/option.c 2014-06-25 14:31:41.630330672 +0200 +*************** +*** 188,193 **** +--- 188,197 ---- + #ifdef FEAT_ARABIC + # define PV_ARAB OPT_WIN(WV_ARAB) + #endif ++ #ifdef FEAT_LINEBREAK ++ # define PV_BRI OPT_WIN(WV_BRI) ++ # define PV_BRIOPT OPT_WIN(WV_BRIOPT) ++ #endif + #ifdef FEAT_DIFF + # define PV_DIFF OPT_WIN(WV_DIFF) + #endif +*************** +*** 648,653 **** +--- 652,675 ---- + {(char_u *)0L, (char_u *)0L} + #endif + SCRIPTID_INIT}, ++ {"breakindent", "bri", P_BOOL|P_VI_DEF|P_VIM|P_RWIN, ++ #ifdef FEAT_LINEBREAK ++ (char_u *)VAR_WIN, PV_BRI, ++ {(char_u *)FALSE, (char_u *)0L} ++ #else ++ (char_u *)NULL, PV_NONE, ++ {(char_u *)0L, (char_u *)0L} ++ #endif ++ SCRIPTID_INIT}, ++ {"breakindentopt", "briopt", P_STRING|P_ALLOCED|P_VI_DEF|P_RBUF|P_COMMA|P_NODUP, ++ #ifdef FEAT_LINEBREAK ++ (char_u *)VAR_WIN, PV_BRIOPT, ++ {(char_u *)"", (char_u *)NULL} ++ #else ++ (char_u *)NULL, PV_NONE, ++ {(char_u *)"", (char_u *)NULL} ++ #endif ++ SCRIPTID_INIT}, + {"browsedir", "bsdir",P_STRING|P_VI_DEF, + #ifdef FEAT_BROWSE + (char_u *)&p_bsdir, PV_NONE, +*************** +*** 5256,5261 **** +--- 5278,5286 ---- + /* set cedit_key */ + (void)check_cedit(); + #endif ++ #ifdef FEAT_LINEBREAK ++ briopt_check(); ++ #endif + } + + /* +*************** +*** 5709,5714 **** +--- 5734,5747 ---- + *p_pm == '.' ? p_pm + 1 : p_pm) == 0) + errmsg = (char_u *)N_("E589: 'backupext' and 'patchmode' are equal"); + } ++ #ifdef FEAT_LINEBREAK ++ /* 'breakindentopt' */ ++ else if (varp == &curwin->w_p_briopt) ++ { ++ if (briopt_check() == FAIL) ++ errmsg = e_invarg; ++ } ++ #endif + + /* + * 'isident', 'iskeyword', 'isprint or 'isfname' option: refill chartab[] +*************** +*** 10018,10023 **** +--- 10051,10058 ---- + case PV_WRAP: return (char_u *)&(curwin->w_p_wrap); + #ifdef FEAT_LINEBREAK + case PV_LBR: return (char_u *)&(curwin->w_p_lbr); ++ case PV_BRI: return (char_u *)&(curwin->w_p_bri); ++ case PV_BRIOPT: return (char_u *)&(curwin->w_p_briopt); + #endif + #ifdef FEAT_SCROLLBIND + case PV_SCBIND: return (char_u *)&(curwin->w_p_scb); +*************** +*** 10207,10212 **** +--- 10242,10249 ---- + #endif + #ifdef FEAT_LINEBREAK + to->wo_lbr = from->wo_lbr; ++ to->wo_bri = from->wo_bri; ++ to->wo_briopt = vim_strsave(from->wo_briopt); + #endif + #ifdef FEAT_SCROLLBIND + to->wo_scb = from->wo_scb; +*************** +*** 10294,10299 **** +--- 10331,10339 ---- + #ifdef FEAT_CONCEAL + check_string_option(&wop->wo_cocu); + #endif ++ #ifdef FEAT_LINEBREAK ++ check_string_option(&wop->wo_briopt); ++ #endif + } + + /* +*************** +*** 10313,10318 **** +--- 10353,10361 ---- + # endif + clear_string_option(&wop->wo_fmr); + #endif ++ #ifdef FEAT_LINEBREAK ++ clear_string_option(&wop->wo_briopt); ++ #endif + #ifdef FEAT_RIGHTLEFT + clear_string_option(&wop->wo_rlc); + #endif +*************** +*** 11927,11929 **** +--- 11970,12018 ---- + ++ptr; + } + } ++ ++ #if defined(FEAT_LINEBREAK) || defined(PROTO) ++ /* ++ * This is called when 'breakindentopt' is changed and when a window is ++ * initialized. ++ */ ++ int ++ briopt_check() ++ { ++ char_u *p; ++ int bri_shift = 0; ++ long bri_min = 20; ++ int bri_sbr = FALSE; ++ ++ p = curwin->w_p_briopt; ++ while (*p != NUL) ++ { ++ if (STRNCMP(p, "shift:", 6) == 0 ++ && ((p[6] == '-' && VIM_ISDIGIT(p[7])) || VIM_ISDIGIT(p[6]))) ++ { ++ p += 6; ++ bri_shift = getdigits(&p); ++ } ++ else if (STRNCMP(p, "min:", 4) == 0 && VIM_ISDIGIT(p[4])) ++ { ++ p += 4; ++ bri_min = getdigits(&p); ++ } ++ else if (STRNCMP(p, "sbr", 3) == 0) ++ { ++ p += 3; ++ bri_sbr = TRUE; ++ } ++ if (*p != ',' && *p != NUL) ++ return FAIL; ++ if (*p == ',') ++ ++p; ++ } ++ ++ curwin->w_p_brishift = bri_shift; ++ curwin->w_p_brimin = bri_min; ++ curwin->w_p_brisbr = bri_sbr; ++ ++ return OK; ++ } ++ #endif +*** ../vim-7.4.337/src/option.h 2014-05-28 21:40:47.092329130 +0200 +--- src/option.h 2014-06-25 12:57:01.002115765 +0200 +*************** +*** 1052,1057 **** +--- 1052,1061 ---- + #ifdef FEAT_CURSORBIND + , WV_CRBIND + #endif ++ #ifdef FEAT_LINEBREAK ++ , WV_BRI ++ , WV_BRIOPT ++ #endif + #ifdef FEAT_DIFF + , WV_DIFF + #endif +*** ../vim-7.4.337/src/proto/charset.pro 2013-08-10 13:37:07.000000000 +0200 +--- src/proto/charset.pro 2014-06-25 13:22:32.934173721 +0200 +*************** +*** 16,22 **** + int chartabsize __ARGS((char_u *p, colnr_T col)); + int linetabsize __ARGS((char_u *s)); + int linetabsize_col __ARGS((int startcol, char_u *s)); +! int win_linetabsize __ARGS((win_T *wp, char_u *p, colnr_T len)); + int vim_isIDc __ARGS((int c)); + int vim_iswordc __ARGS((int c)); + int vim_iswordc_buf __ARGS((int c, buf_T *buf)); +--- 16,22 ---- + int chartabsize __ARGS((char_u *p, colnr_T col)); + int linetabsize __ARGS((char_u *s)); + int linetabsize_col __ARGS((int startcol, char_u *s)); +! int win_linetabsize __ARGS((win_T *wp, char_u *line, colnr_T len)); + int vim_isIDc __ARGS((int c)); + int vim_iswordc __ARGS((int c)); + int vim_iswordc_buf __ARGS((int c, buf_T *buf)); +*************** +*** 26,34 **** + int vim_isfilec_or_wc __ARGS((int c)); + int vim_isprintc __ARGS((int c)); + int vim_isprintc_strict __ARGS((int c)); +! int lbr_chartabsize __ARGS((unsigned char *s, colnr_T col)); +! int lbr_chartabsize_adv __ARGS((char_u **s, colnr_T col)); +! int win_lbr_chartabsize __ARGS((win_T *wp, char_u *s, colnr_T col, int *headp)); + int in_win_border __ARGS((win_T *wp, colnr_T vcol)); + void getvcol __ARGS((win_T *wp, pos_T *pos, colnr_T *start, colnr_T *cursor, colnr_T *end)); + colnr_T getvcol_nolist __ARGS((pos_T *posp)); +--- 26,34 ---- + int vim_isfilec_or_wc __ARGS((int c)); + int vim_isprintc __ARGS((int c)); + int vim_isprintc_strict __ARGS((int c)); +! int lbr_chartabsize __ARGS((char_u *line, unsigned char *s, colnr_T col)); +! int lbr_chartabsize_adv __ARGS((char_u *line, char_u **s, colnr_T col)); +! int win_lbr_chartabsize __ARGS((win_T *wp, char_u *line, char_u *s, colnr_T col, int *headp)); + int in_win_border __ARGS((win_T *wp, colnr_T vcol)); + void getvcol __ARGS((win_T *wp, pos_T *pos, colnr_T *start, colnr_T *cursor, colnr_T *end)); + colnr_T getvcol_nolist __ARGS((pos_T *posp)); +*** ../vim-7.4.337/src/proto/misc1.pro 2014-05-07 15:10:17.661108310 +0200 +--- src/proto/misc1.pro 2014-06-25 12:57:01.002115765 +0200 +*************** +*** 2,10 **** + int get_indent __ARGS((void)); + int get_indent_lnum __ARGS((linenr_T lnum)); + int get_indent_buf __ARGS((buf_T *buf, linenr_T lnum)); +! int get_indent_str __ARGS((char_u *ptr, int ts)); + int set_indent __ARGS((int size, int flags)); + int get_number_indent __ARGS((linenr_T lnum)); + int open_line __ARGS((int dir, int flags, int second_line_indent)); + int get_leader_len __ARGS((char_u *line, char_u **flags, int backward, int include_space)); + int get_last_leader_offset __ARGS((char_u *line, char_u **flags)); +--- 2,11 ---- + int get_indent __ARGS((void)); + int get_indent_lnum __ARGS((linenr_T lnum)); + int get_indent_buf __ARGS((buf_T *buf, linenr_T lnum)); +! int get_indent_str __ARGS((char_u *ptr, int ts, int list)); + int set_indent __ARGS((int size, int flags)); + int get_number_indent __ARGS((linenr_T lnum)); ++ int get_breakindent_win __ARGS((win_T *wp, char_u *ptr)); + int open_line __ARGS((int dir, int flags, int second_line_indent)); + int get_leader_len __ARGS((char_u *line, char_u **flags, int backward, int include_space)); + int get_last_leader_offset __ARGS((char_u *line, char_u **flags)); +*** ../vim-7.4.337/src/proto/option.pro 2014-01-14 16:54:53.000000000 +0100 +--- src/proto/option.pro 2014-06-25 14:16:04.882295233 +0200 +*************** +*** 63,66 **** +--- 63,67 ---- + 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)); ++ int briopt_check __ARGS((void)); + /* vim: set ft=c : */ +*** ../vim-7.4.337/src/screen.c 2014-06-18 21:20:07.232377308 +0200 +--- src/screen.c 2014-06-25 13:43:39.930221653 +0200 +*************** +*** 2962,2971 **** + # define WL_SIGN WL_FOLD /* column for signs */ + #endif + #define WL_NR WL_SIGN + 1 /* line number */ + #if defined(FEAT_LINEBREAK) || defined(FEAT_DIFF) +! # define WL_SBR WL_NR + 1 /* 'showbreak' or 'diff' */ + #else +! # define WL_SBR WL_NR + #endif + #define WL_LINE WL_SBR + 1 /* text in the line */ + int draw_state = WL_START; /* what to draw next */ +--- 2962,2976 ---- + # define WL_SIGN WL_FOLD /* column for signs */ + #endif + #define WL_NR WL_SIGN + 1 /* line number */ ++ #ifdef FEAT_LINEBREAK ++ # define WL_BRI WL_NR + 1 /* 'breakindent' */ ++ #else ++ # define WL_BRI WL_NR ++ #endif + #if defined(FEAT_LINEBREAK) || defined(FEAT_DIFF) +! # define WL_SBR WL_BRI + 1 /* 'showbreak' or 'diff' */ + #else +! # define WL_SBR WL_BRI + #endif + #define WL_LINE WL_SBR + 1 /* text in the line */ + int draw_state = WL_START; /* what to draw next */ +*************** +*** 3301,3307 **** + #endif + while (vcol < v && *ptr != NUL) + { +! c = win_lbr_chartabsize(wp, ptr, (colnr_T)vcol, NULL); + vcol += c; + #ifdef FEAT_MBYTE + prev_ptr = ptr; +--- 3306,3312 ---- + #endif + while (vcol < v && *ptr != NUL) + { +! c = win_lbr_chartabsize(wp, line, ptr, (colnr_T)vcol, NULL); + vcol += c; + #ifdef FEAT_MBYTE + prev_ptr = ptr; +*************** +*** 3670,3675 **** +--- 3675,3718 ---- + } + } + ++ #ifdef FEAT_LINEBREAK ++ if (wp->w_p_brisbr && draw_state == WL_BRI - 1 ++ && n_extra == 0 && *p_sbr != NUL) ++ /* draw indent after showbreak value */ ++ draw_state = WL_BRI; ++ else if (wp->w_p_brisbr && draw_state == WL_SBR && n_extra == 0) ++ /* After the showbreak, draw the breakindent */ ++ draw_state = WL_BRI - 1; ++ ++ /* draw 'breakindent': indent wrapped text accordingly */ ++ if (draw_state == WL_BRI - 1 && n_extra == 0) ++ { ++ draw_state = WL_BRI; ++ # ifdef FEAT_DIFF ++ # endif ++ if (wp->w_p_bri && n_extra == 0 && row != startrow ++ #ifdef FEAT_DIFF ++ && filler_lines == 0 ++ #endif ++ ) ++ { ++ char_attr = 0; /* was: hl_attr(HLF_AT); */ ++ #ifdef FEAT_DIFF ++ if (diff_hlf != (hlf_T)0) ++ char_attr = hl_attr(diff_hlf); ++ #endif ++ p_extra = NUL; ++ c_extra = ' '; ++ n_extra = get_breakindent_win(wp, ++ ml_get_buf(wp->w_buffer, lnum, FALSE)); ++ /* Correct end of highlighted area for 'breakindent', ++ * required when 'linebreak' is also set. */ ++ if (tocol == vcol) ++ tocol += n_extra; ++ } ++ } ++ #endif ++ + #if defined(FEAT_LINEBREAK) || defined(FEAT_DIFF) + if (draw_state == WL_SBR - 1 && n_extra == 0) + { +*************** +*** 4382,4392 **** + if (wp->w_p_lbr && vim_isbreak(c) && !vim_isbreak(*ptr) + && !wp->w_p_list) + { +! n_extra = win_lbr_chartabsize(wp, ptr - ( + # ifdef FEAT_MBYTE + has_mbyte ? mb_l : + # endif +! 1), (colnr_T)vcol, NULL) - 1; + c_extra = ' '; + if (vim_iswhite(c)) + { +--- 4425,4438 ---- + if (wp->w_p_lbr && vim_isbreak(c) && !vim_isbreak(*ptr) + && !wp->w_p_list) + { +! char_u *p = ptr - ( + # ifdef FEAT_MBYTE + has_mbyte ? mb_l : + # endif +! 1); +! /* TODO: is passing p for start of the line OK? */ +! n_extra = win_lbr_chartabsize(wp, p, p, (colnr_T)vcol, +! NULL) - 1; + c_extra = ' '; + if (vim_iswhite(c)) + { +*************** +*** 8916,8923 **** + { + if (noinvcurs) + screen_stop_highlight(); +! if (row == screen_cur_row && (col > screen_cur_col) && +! *T_CRI != NUL) + term_cursor_right(col - screen_cur_col); + else + term_windgoto(row, col); +--- 8962,8969 ---- + { + if (noinvcurs) + screen_stop_highlight(); +! if (row == screen_cur_row && (col > screen_cur_col) +! && *T_CRI != NUL) + term_cursor_right(col - screen_cur_col); + else + term_windgoto(row, col); +*** ../vim-7.4.337/src/structs.h 2014-06-17 17:48:21.784628008 +0200 +--- src/structs.h 2014-06-25 12:57:01.006115766 +0200 +*************** +*** 134,139 **** +--- 134,145 ---- + int wo_arab; + # define w_p_arab w_onebuf_opt.wo_arab /* 'arabic' */ + #endif ++ #ifdef FEAT_LINEBREAK ++ int wo_bri; ++ # define w_p_bri w_onebuf_opt.wo_bri /* 'breakindent' */ ++ char_u *wo_briopt; ++ # define w_p_briopt w_onebuf_opt.wo_briopt /* 'breakindentopt' */ ++ #endif + #ifdef FEAT_DIFF + int wo_diff; + # define w_p_diff w_onebuf_opt.wo_diff /* 'diff' */ +*************** +*** 2189,2194 **** +--- 2195,2205 ---- + #ifdef FEAT_SYN_HL + int *w_p_cc_cols; /* array of columns to highlight or NULL */ + #endif ++ #ifdef FEAT_LINEBREAK ++ int w_p_brimin; /* minimum width for breakindent */ ++ int w_p_brishift; /* additional shift for breakindent */ ++ int w_p_brisbr; /* sbr in 'briopt' */ ++ #endif + + /* transform a pointer to a "onebuf" option into a "allbuf" option */ + #define GLOBAL_WO(p) ((char *)p + sizeof(winopt_T)) +*** ../vim-7.4.337/src/testdir/Make_amiga.mak 2014-05-29 11:47:19.804773758 +0200 +--- src/testdir/Make_amiga.mak 2014-06-25 12:57:01.006115766 +0200 +*************** +*** 37,42 **** +--- 37,43 ---- + test99.out test100.out test101.out test102.out test103.out \ + test104.out test105.out test106.out test107.out \ + test_autoformat_join.out \ ++ test_breakindent.out \ + test_eval.out \ + test_options.out + +*************** +*** 163,167 **** +--- 164,169 ---- + test106.out: test106.in + test107.out: test107.in + test_autoformat_join.out: test_autoformat_join.in ++ test_breakindent.out: test_breakindent.in + test_eval.out: test_eval.in + test_options.out: test_options.in +*** ../vim-7.4.337/src/testdir/Make_dos.mak 2014-05-29 11:47:19.804773758 +0200 +--- src/testdir/Make_dos.mak 2014-06-25 12:57:01.006115766 +0200 +*************** +*** 36,41 **** +--- 36,42 ---- + test100.out test101.out test102.out test103.out test104.out \ + test105.out test106.out test107.out\ + test_autoformat_join.out \ ++ test_breakindent.out \ + test_eval.out \ + test_options.out + +*** ../vim-7.4.337/src/testdir/Make_ming.mak 2014-05-29 11:47:19.804773758 +0200 +--- src/testdir/Make_ming.mak 2014-06-25 12:57:01.006115766 +0200 +*************** +*** 56,61 **** +--- 56,62 ---- + test100.out test101.out test102.out test103.out test104.out \ + test105.out test106.out test107.out \ + test_autoformat_join.out \ ++ test_breakindent.out \ + test_eval.out \ + test_options.out + +*** ../vim-7.4.337/src/testdir/Make_os2.mak 2014-05-29 11:47:19.804773758 +0200 +--- src/testdir/Make_os2.mak 2014-06-25 12:59:45.774121999 +0200 +*************** +*** 39,44 **** +--- 39,45 ---- + test105.out test106.out test107.out \ + test_autoformat_join.out \ + test_eval.out \ ++ test_breakindent.out \ + test_options.out + + .SUFFIXES: .in .out +*** ../vim-7.4.337/src/testdir/Make_vms.mms 2014-05-29 11:47:19.804773758 +0200 +--- src/testdir/Make_vms.mms 2014-06-25 12:57:01.006115766 +0200 +*************** +*** 97,102 **** +--- 97,103 ---- + test100.out test101.out test103.out test104.out \ + test105.out test106.out test107.out \ + test_autoformat_join.out \ ++ test_breakindent.out \ + test_eval.out \ + test_options.out + +*** ../vim-7.4.337/src/testdir/Makefile 2014-05-29 11:47:19.804773758 +0200 +--- src/testdir/Makefile 2014-06-25 12:57:01.006115766 +0200 +*************** +*** 34,39 **** +--- 34,40 ---- + test99.out test100.out test101.out test102.out test103.out \ + test104.out test105.out test106.out test107.out \ + test_autoformat_join.out \ ++ test_breakindent.out \ + test_eval.out \ + test_options.out + +*** ../vim-7.4.337/src/testdir/test_breakindent.in 2014-06-25 14:36:28.690341532 +0200 +--- src/testdir/test_breakindent.in 2014-06-25 14:26:00.994317785 +0200 +*************** +*** 0 **** +--- 1,79 ---- ++ Test for breakindent ++ ++ STARTTEST ++ :so small.vim ++ :if !exists("+breakindent") | e! test.ok | w! test.out | qa! | endif ++ :10new|:vsp|:vert resize 20 ++ :put =\"\tabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOP\" ++ :set ts=4 sw=4 sts=4 breakindent ++ :fu! ScreenChar(width) ++ : let c='' ++ : for i in range(1,a:width) ++ : let c.=nr2char(screenchar(line('.'), i)) ++ : endfor ++ : let c.="\n" ++ : for i in range(1,a:width) ++ : let c.=nr2char(screenchar(line('.')+1, i)) ++ : endfor ++ : let c.="\n" ++ : for i in range(1,a:width) ++ : let c.=nr2char(screenchar(line('.')+2, i)) ++ : endfor ++ : return c ++ :endfu ++ :fu DoRecordScreen() ++ : wincmd l ++ : $put =printf(\"\n%s\", g:test) ++ : $put =g:line1 ++ : wincmd p ++ :endfu ++ :let g:test="Test 1: Simple breakindent" ++ :let line1=ScreenChar(8) ++ :call DoRecordScreen() ++ :let g:test="Test 2: Simple breakindent + sbr=>>" ++ :set sbr=>> ++ :let line1=ScreenChar(8) ++ :call DoRecordScreen() ++ :let g:test ="Test 3: Simple breakindent + briopt:sbr" ++ :set briopt=sbr,min:0 sbr=++ ++ :let line1=ScreenChar(8) ++ :call DoRecordScreen() ++ :let g:test ="Test 4: Simple breakindent + min width: 18" ++ :set sbr= briopt=min:18 ++ :let line1=ScreenChar(8) ++ :call DoRecordScreen() ++ :let g:test =" Test 5: Simple breakindent + shift by 2" ++ :set briopt=shift:2,min:0 ++ :let line1=ScreenChar(8) ++ :call DoRecordScreen() ++ :let g:test=" Test 6: Simple breakindent + shift by -1" ++ :set briopt=shift:-1,min:0 ++ :let line1=ScreenChar(8) ++ :call DoRecordScreen() ++ :let g:test=" Test 7: breakindent + shift by +1 + nu + sbr=? briopt:sbr" ++ :set briopt=shift:1,sbr,min:0 nu sbr=? nuw=4 ++ :let line1=ScreenChar(10) ++ :call DoRecordScreen() ++ :let g:test=" Test 8: breakindent + shift:1 + nu + sbr=# list briopt:sbr" ++ :set briopt=shift:1,sbr,min:0 nu sbr=# list ++ :let line1=ScreenChar(10) ++ :call DoRecordScreen() ++ :let g:test=" Test 9: breakindent + shift by +1 + 'nu' + sbr=# list" ++ :set briopt-=sbr ++ :let line1=ScreenChar(10) ++ :call DoRecordScreen() ++ :let g:test=" Test 10: breakindent + shift by +1 + 'nu' + sbr=~ cpo+=n" ++ :set cpo+=n sbr=~ nu nuw=4 nolist briopt=sbr,min:0 ++ :let line1=ScreenChar(10) ++ :call DoRecordScreen() ++ :wincmd p ++ :let g:test="\n Test 11: strdisplaywidth when breakindent is on" ++ :set cpo-=n sbr=>> nu nuw=4 nolist briopt= ts=4 ++ :let text=getline(2) "skip leading tab when calculating text width ++ :let width = strlen(text[1:])+indent(2)*4+strlen(&sbr)*3 " text wraps 3 times ++ :$put =g:test ++ :$put =printf(\"strdisplaywidth: %d == calculated: %d\", strdisplaywidth(text), width) ++ :%w! test.out ++ :qa! ++ ENDTEST ++ dummy text +*** ../vim-7.4.337/src/testdir/test_breakindent.ok 2014-06-25 14:36:28.698341532 +0200 +--- src/testdir/test_breakindent.ok 2014-06-25 12:57:01.006115766 +0200 +*************** +*** 0 **** +--- 1,55 ---- ++ ++ abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOP ++ ++ Test 1: Simple breakindent ++ abcd ++ qrst ++ GHIJ ++ ++ Test 2: Simple breakindent + sbr=>> ++ abcd ++ >>qr ++ >>EF ++ ++ Test 3: Simple breakindent + briopt:sbr ++ abcd ++ ++ qrst ++ ++ GHIJ ++ ++ Test 4: Simple breakindent + min width: 18 ++ abcd ++ qrstuv ++ IJKLMN ++ ++ Test 5: Simple breakindent + shift by 2 ++ abcd ++ qr ++ EF ++ ++ Test 6: Simple breakindent + shift by -1 ++ abcd ++ qrstu ++ HIJKL ++ ++ Test 7: breakindent + shift by +1 + nu + sbr=? briopt:sbr ++ 2 ab ++ ? m ++ ? x ++ ++ Test 8: breakindent + shift:1 + nu + sbr=# list briopt:sbr ++ 2 ^Iabcd ++ # opq ++ # BCD ++ ++ Test 9: breakindent + shift by +1 + 'nu' + sbr=# list ++ 2 ^Iabcd ++ #op ++ #AB ++ ++ Test 10: breakindent + shift by +1 + 'nu' + sbr=~ cpo+=n ++ 2 ab ++ ~ mn ++ ~ yz ++ ++ Test 11: strdisplaywidth when breakindent is on ++ strdisplaywidth: 46 == calculated: 64 +*** ../vim-7.4.337/src/ui.c 2014-06-12 13:28:26.771694851 +0200 +--- src/ui.c 2014-06-25 13:22:20.218173240 +0200 +*************** +*** 3162,3176 **** + /* try to advance to the specified column */ + int count = 0; + char_u *ptr; +! char_u *start; + +! start = ptr = ml_get_buf(wp->w_buffer, lnum, FALSE); + while (count < vcol && *ptr != NUL) + { +! count += win_lbr_chartabsize(wp, ptr, count, NULL); + mb_ptr_adv(ptr); + } +! return (int)(ptr - start); + } + #endif + +--- 3162,3176 ---- + /* try to advance to the specified column */ + int count = 0; + char_u *ptr; +! char_u *line; + +! line = ptr = ml_get_buf(wp->w_buffer, lnum, FALSE); + while (count < vcol && *ptr != NUL) + { +! count += win_lbr_chartabsize(wp, line, ptr, count, NULL); + mb_ptr_adv(ptr); + } +! return (int)(ptr - line); + } + #endif + +*** ../vim-7.4.337/src/version.c 2014-06-25 12:26:42.230046959 +0200 +--- src/version.c 2014-06-25 13:00:26.990123558 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 338, + /**/ + +-- +MORTICIAN: Bring out your dead! + [clang] + Bring out your dead! + [clang] + Bring out your dead! +CUSTOMER: Here's one -- nine pence. +DEAD PERSON: I'm not dead! + 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/patches/source/vim/patches/7.4.339 b/patches/source/vim/patches/7.4.339 new file mode 100644 index 000000000..ffe2d16be --- /dev/null +++ b/patches/source/vim/patches/7.4.339 @@ -0,0 +1,79 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.339 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.339 +Problem: Local function is available globally. +Solution: Add "static". +Files: src/option.c, src/proto/option.pro + + +*** ../vim-7.4.338/src/option.c 2014-06-25 14:39:35.110348584 +0200 +--- src/option.c 2014-06-25 14:42:33.986355351 +0200 +*************** +*** 3074,3079 **** +--- 3074,3080 ---- + static char_u *get_varp_scope __ARGS((struct vimoption *p, int opt_flags)); + static char_u *get_varp __ARGS((struct vimoption *)); + static void option_value2string __ARGS((struct vimoption *, int opt_flags)); ++ static void check_winopt __ARGS((winopt_T *wop)); + static int wc_use_keyname __ARGS((char_u *varp, long *wcp)); + #ifdef FEAT_LANGMAP + static void langmap_init __ARGS((void)); +*************** +*** 10305,10311 **** + /* + * Check for NULL pointers in a winopt_T and replace them with empty_option. + */ +! void + check_winopt(wop) + winopt_T *wop UNUSED; + { +--- 10306,10312 ---- + /* + * Check for NULL pointers in a winopt_T and replace them with empty_option. + */ +! static void + check_winopt(wop) + winopt_T *wop UNUSED; + { +*** ../vim-7.4.338/src/proto/option.pro 2014-06-25 14:39:35.110348584 +0200 +--- src/proto/option.pro 2014-06-25 14:42:38.702355530 +0200 +*************** +*** 40,46 **** + void win_copy_options __ARGS((win_T *wp_from, win_T *wp_to)); + void copy_winopt __ARGS((winopt_T *from, winopt_T *to)); + void check_win_options __ARGS((win_T *win)); +- void check_winopt __ARGS((winopt_T *wop)); + void clear_winopt __ARGS((winopt_T *wop)); + void buf_copy_options __ARGS((buf_T *buf, int flags)); + void reset_modifiable __ARGS((void)); +--- 40,45 ---- +*** ../vim-7.4.338/src/version.c 2014-06-25 14:39:35.114348584 +0200 +--- src/version.c 2014-06-25 14:43:41.502357905 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 339, + /**/ + +-- +MORTICIAN: What? +CUSTOMER: Nothing -- here's your nine pence. +DEAD PERSON: I'm not dead! +MORTICIAN: Here -- he says he's not dead! +CUSTOMER: Yes, he is. +DEAD PERSON: I'm not! + 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/patches/source/vim/patches/7.4.340 b/patches/source/vim/patches/7.4.340 new file mode 100644 index 000000000..f4694201d --- /dev/null +++ b/patches/source/vim/patches/7.4.340 @@ -0,0 +1,97 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.340 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.340 +Problem: Error from sed about illegal bytes when installing Vim. +Solution: Prepend LC_ALL=C. (Itchyny) +Files: src/installman.sh + + +*** ../vim-7.4.339/src/installman.sh 2010-05-15 13:04:07.000000000 +0200 +--- src/installman.sh 2014-06-25 14:54:11.742381748 +0200 +*************** +*** 43,52 **** + fi + fi + + if test $what = "install"; then + # vim.1 + echo installing $destdir/$exename.1 +! sed -e s+/usr/local/lib/vim+$vimloc+ \ + -e s+$vimloc/doc+$helpsubloc+ \ + -e s+$vimloc/print+$printsubloc+ \ + -e s+$vimloc/syntax+$synsubloc+ \ +--- 43,55 ---- + fi + fi + ++ # Note: setting LC_ALL to C is required to avoid illegal byte errors from sed ++ # on some systems. ++ + if test $what = "install"; then + # vim.1 + echo installing $destdir/$exename.1 +! LC_ALL=C sed -e s+/usr/local/lib/vim+$vimloc+ \ + -e s+$vimloc/doc+$helpsubloc+ \ + -e s+$vimloc/print+$printsubloc+ \ + -e s+$vimloc/syntax+$synsubloc+ \ +*************** +*** 64,70 **** + + # vimtutor.1 + echo installing $destdir/$exename""tutor.1 +! sed -e s+/usr/local/lib/vim+$vimloc+ \ + -e s+$vimloc/tutor+$tutorsubloc+ \ + $helpsource/vimtutor$langadd.1 > $destdir/$exename""tutor.1 + chmod $manmod $destdir/$exename""tutor.1 +--- 67,73 ---- + + # vimtutor.1 + echo installing $destdir/$exename""tutor.1 +! LC_ALL=C sed -e s+/usr/local/lib/vim+$vimloc+ \ + -e s+$vimloc/tutor+$tutorsubloc+ \ + $helpsource/vimtutor$langadd.1 > $destdir/$exename""tutor.1 + chmod $manmod $destdir/$exename""tutor.1 +*************** +*** 76,82 **** + + # evim.1 + echo installing $destdir/$evimname.1 +! sed -e s+/usr/local/lib/vim+$vimloc+ \ + -e s+$vimloc/evim.vim+$scriptloc/evim.vim+ \ + $helpsource/evim$langadd.1 > $destdir/$evimname.1 + chmod $manmod $destdir/$evimname.1 +--- 79,85 ---- + + # evim.1 + echo installing $destdir/$evimname.1 +! LC_ALL=C sed -e s+/usr/local/lib/vim+$vimloc+ \ + -e s+$vimloc/evim.vim+$scriptloc/evim.vim+ \ + $helpsource/evim$langadd.1 > $destdir/$evimname.1 + chmod $manmod $destdir/$evimname.1 +*** ../vim-7.4.339/src/version.c 2014-06-25 14:44:04.458358774 +0200 +--- src/version.c 2014-06-25 14:55:14.198384111 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 340, + /**/ + +-- +DEAD PERSON: I'm getting better! +CUSTOMER: No, you're not -- you'll be stone dead in a moment. +MORTICIAN: Oh, I can't take him like that -- it's against regulations. + 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/patches/source/vim/patches/7.4.341 b/patches/source/vim/patches/7.4.341 new file mode 100644 index 000000000..061828a51 --- /dev/null +++ b/patches/source/vim/patches/7.4.341 @@ -0,0 +1,178 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.341 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.341 +Problem: sort() doesn't handle numbers well. +Solution: Add an argument to specify sorting on numbers. (Christian Brabandt) +Files: runtime/doc/eval.txt, src/eval.c, src/testdir/test55.in, + src/testdir/test55.ok + + +*** ../vim-7.4.340/runtime/doc/eval.txt 2014-06-25 14:39:35.094348583 +0200 +--- runtime/doc/eval.txt 2014-06-25 17:05:50.606680574 +0200 +*************** +*** 5618,5628 **** + + If you want a list to remain unmodified make a copy first: > + :let sortedlist = sort(copy(mylist)) +- < Uses the string representation of each item to sort on. +- Numbers sort after Strings, |Lists| after Numbers. +- For sorting text in the current buffer use |:sort|. + +! When {func} is given and it is one then case is ignored. + When {func} is a |Funcref| or a function name, this function + is called to compare items. The function is invoked with two + items as argument and must return zero if they are equal, 1 or +--- 5628,5647 ---- + + If you want a list to remain unmodified make a copy first: > + :let sortedlist = sort(copy(mylist)) + +! < When {func} is omitted, is empty or zero, then sort() uses the +! string representation of each item to sort on. Numbers sort +! after Strings, |Lists| after Numbers. For sorting text in the +! current buffer use |:sort|. +! +! When {func} is given and it is is '1' or 'i' then case is +! ignored. +! +! When {func} is given and it is 'n' then all items will be +! sorted numerical (Implementation detail: This uses the +! strtod() function to parse numbers, Strings, Lists, Dicts and +! Funcrefs will be considered as being 0). +! + When {func} is a |Funcref| or a function name, this function + is called to compare items. The function is invoked with two + items as argument and must return zero if they are equal, 1 or +*** ../vim-7.4.340/src/eval.c 2014-06-17 17:48:21.776628008 +0200 +--- src/eval.c 2014-06-25 17:23:05.466719724 +0200 +*************** +*** 17330,17335 **** +--- 17330,17336 ---- + item_compare2 __ARGS((const void *s1, const void *s2)); + + static int item_compare_ic; ++ static int item_compare_numeric; + static char_u *item_compare_func; + static dict_T *item_compare_selfdict; + static int item_compare_func_err; +*************** +*** 17359,17368 **** + p1 = (char_u *)""; + if (p2 == NULL) + p2 = (char_u *)""; +! if (item_compare_ic) +! res = STRICMP(p1, p2); + else +! res = STRCMP(p1, p2); + vim_free(tofree1); + vim_free(tofree2); + return res; +--- 17360,17379 ---- + p1 = (char_u *)""; + if (p2 == NULL) + p2 = (char_u *)""; +! if (!item_compare_numeric) +! { +! if (item_compare_ic) +! res = STRICMP(p1, p2); +! else +! res = STRCMP(p1, p2); +! } + else +! { +! double n1, n2; +! n1 = strtod((char *)p1, (char **)&p1); +! n2 = strtod((char *)p2, (char **)&p2); +! res = n1 == n2 ? 0 : n1 > n2 ? 1 : -1; +! } + vim_free(tofree1); + vim_free(tofree2); + return res; +*************** +*** 17439,17444 **** +--- 17450,17456 ---- + return; /* short list sorts pretty quickly */ + + item_compare_ic = FALSE; ++ item_compare_numeric = FALSE; + item_compare_func = NULL; + item_compare_selfdict = NULL; + if (argvars[1].v_type != VAR_UNKNOWN) +*************** +*** 17457,17462 **** +--- 17469,17487 ---- + item_compare_ic = TRUE; + else + item_compare_func = get_tv_string(&argvars[1]); ++ if (item_compare_func != NULL) ++ { ++ if (STRCMP(item_compare_func, "n") == 0) ++ { ++ item_compare_func = NULL; ++ item_compare_numeric = TRUE; ++ } ++ else if (STRCMP(item_compare_func, "i") == 0) ++ { ++ item_compare_func = NULL; ++ item_compare_ic = TRUE; ++ } ++ } + } + + if (argvars[2].v_type != VAR_UNKNOWN) +*** ../vim-7.4.340/src/testdir/test55.in 2014-03-25 18:23:27.062087691 +0100 +--- src/testdir/test55.in 2014-06-25 17:20:47.006714486 +0200 +*************** +*** 332,337 **** +--- 332,342 ---- + :$put =string(reverse(sort(l))) + :$put =string(sort(reverse(sort(l)))) + :$put =string(uniq(sort(l))) ++ :let l=[7, 9, 18, 12, 22, 10.0e-16, -1, 0xff, 0, -0, 0.22, 'foo', 'FOOBAR',{}, []] ++ :$put =string(sort(copy(l), 'n')) ++ :$put =string(sort(copy(l), 1)) ++ :$put =string(sort(copy(l), 'i')) ++ :$put =string(sort(copy(l))) + :" + :" splitting a string to a List + :$put =string(split(' aa bb ')) +*** ../vim-7.4.340/src/testdir/test55.ok 2014-03-25 18:23:27.062087691 +0100 +--- src/testdir/test55.ok 2014-06-25 17:23:31.382720704 +0200 +*************** +*** 101,106 **** +--- 101,110 ---- + [[0, 1, 2], [0, 1, 2], 4, 2, 2, 1.5, 'xaaa', 'x8', 'foo6', 'foo', 'foo', 'A11', '-0'] + ['-0', 'A11', 'foo', 'foo', 'foo6', 'x8', 'xaaa', 1.5, 2, 2, 4, [0, 1, 2], [0, 1, 2]] + ['-0', 'A11', 'foo', 'foo6', 'x8', 'xaaa', 1.5, 2, 4, [0, 1, 2]] ++ [-1, 0, 0, 'foo', 'FOOBAR', {}, [], 1.0e-15, 0.22, 7, 9, 12, 18, 22, 255] ++ ['foo', 'FOOBAR', -1, 0, 0, 0.22, 1.0e-15, 12, 18, 22, 255, 7, 9, [], {}] ++ ['foo', 'FOOBAR', -1, 0, 0, 0.22, 1.0e-15, 12, 18, 22, 255, 7, 9, [], {}] ++ ['FOOBAR', 'foo', -1, 0, 0, 0.22, 1.0e-15, 12, 18, 22, 255, 7, 9, [], {}] + ['aa', 'bb'] + ['aa', 'bb'] + ['', 'aa', 'bb', ''] +*** ../vim-7.4.340/src/version.c 2014-06-25 15:02:29.250400570 +0200 +--- src/version.c 2014-06-25 16:46:45.438637250 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 341, + /**/ + +-- +We do not stumble over mountains, but over molehills. + Confucius + + /// 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/patches/source/vim/patches/7.4.342 b/patches/source/vim/patches/7.4.342 new file mode 100644 index 000000000..8bdc72e4a --- /dev/null +++ b/patches/source/vim/patches/7.4.342 @@ -0,0 +1,67 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.342 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.342 +Problem: Clang gives warnings. +Solution: Add an else block. (Dominique Pelle) +Files: src/gui_beval.c + + +*** ../vim-7.4.341/src/gui_beval.c 2013-05-06 04:06:04.000000000 +0200 +--- src/gui_beval.c 2014-06-25 17:40:40.818759649 +0200 +*************** +*** 1193,1203 **** + XmFontList fl; + + fl = gui_motif_fontset2fontlist(&gui.tooltip_fontset); +! if (fl != NULL) + { +! XmStringExtent(fl, s, &w, &h); +! XmFontListFree(fl); + } + } + w += gui.border_offset << 1; + h += gui.border_offset << 1; +--- 1193,1205 ---- + XmFontList fl; + + fl = gui_motif_fontset2fontlist(&gui.tooltip_fontset); +! if (fl == NULL) + { +! XmStringFree(s); +! return; + } ++ XmStringExtent(fl, s, &w, &h); ++ XmFontListFree(fl); + } + w += gui.border_offset << 1; + h += gui.border_offset << 1; +*** ../vim-7.4.341/src/version.c 2014-06-25 17:31:04.942737863 +0200 +--- src/version.c 2014-06-25 17:40:56.902760258 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 342, + /**/ + +-- +CUSTOMER: Well, can you hang around a couple of minutes? He won't be + long. +MORTICIAN: Naaah, I got to go on to Robinson's -- they've lost nine today. +CUSTOMER: Well, when is your next round? +MORTICIAN: Thursday. +DEAD PERSON: I think I'll go for a walk. + 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/patches/source/vim/patches/7.4.343 b/patches/source/vim/patches/7.4.343 new file mode 100644 index 000000000..141d9816c --- /dev/null +++ b/patches/source/vim/patches/7.4.343 @@ -0,0 +1,60 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.343 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.343 +Problem: matchdelete() does not always update the right lines. +Solution: Fix off-by-one error. (Ozaki Kiichi) +Files: src/window.c + + +*** ../vim-7.4.342/src/window.c 2014-06-18 21:20:07.236377308 +0200 +--- src/window.c 2014-06-25 17:55:34.190793447 +0200 +*************** +*** 6891,6898 **** + } + if (toplnum == 0 || lnum < toplnum) + toplnum = lnum; +! if (botlnum == 0 || lnum > botlnum) +! botlnum = lnum; + } + + /* Calculate top and bottom lines for redrawing area */ +--- 6891,6898 ---- + } + if (toplnum == 0 || lnum < toplnum) + toplnum = lnum; +! if (botlnum == 0 || lnum >= botlnum) +! botlnum = lnum + 1; + } + + /* Calculate top and bottom lines for redrawing area */ +*** ../vim-7.4.342/src/version.c 2014-06-25 17:44:45.850768919 +0200 +--- src/version.c 2014-06-25 17:54:14.258790423 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 343, + /**/ + +-- +CUSTOMER: You're not fooling anyone y'know. Look, isn't there something + you can do? +DEAD PERSON: I feel happy... I feel happy. + [whop] +CUSTOMER: Ah, thanks very much. +MORTICIAN: Not at all. See you on Thursday. +CUSTOMER: Right. + 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/patches/source/vim/patches/7.4.344 b/patches/source/vim/patches/7.4.344 new file mode 100644 index 000000000..3b619e76c --- /dev/null +++ b/patches/source/vim/patches/7.4.344 @@ -0,0 +1,180 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.344 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.344 +Problem: Unessecary initializations and other things related to + matchaddpos(). +Solution: Code cleanup. (Alexey Radkov) +Files: runtime/doc/eval.txt, src/screen.c, src/window.c + + +*** ../vim-7.4.343/runtime/doc/eval.txt 2014-06-25 17:31:04.934737863 +0200 +--- runtime/doc/eval.txt 2014-06-25 18:08:50.790823583 +0200 +*************** +*** 4353,4369 **** + required, for example to highlight matching parentheses. + + The list {pos} can contain one of these items: +! - A number. This while line will be highlighted. The first + line has number 1. + - A list with one number, e.g., [23]. The whole line with this + number will be highlighted. + - A list with two numbers, e.g., [23, 11]. The first number is +! the line number, the second one the column number (first +! column is 1). The character at this position will be +! highlighted. + - A list with three numbers, e.g., [23, 11, 3]. As above, but +! the third number gives the length of the highlight in screen +! cells. + + The maximum number of positions is 8. + +--- 4391,4407 ---- + required, for example to highlight matching parentheses. + + The list {pos} can contain one of these items: +! - A number. This whole line will be highlighted. The first + line has number 1. + - A list with one number, e.g., [23]. The whole line with this + number will be highlighted. + - A list with two numbers, e.g., [23, 11]. The first number is +! the line number, the second one is the column number (first +! column is 1, the value must correspond to the byte index as +! |col()| would return). The character at this position will +! be highlighted. + - A list with three numbers, e.g., [23, 11, 3]. As above, but +! the third number gives the length of the highlight in bytes. + + The maximum number of positions is 8. + +*** ../vim-7.4.343/src/screen.c 2014-06-25 14:39:35.110348584 +0200 +--- src/screen.c 2014-06-25 18:10:11.906826652 +0200 +*************** +*** 7531,7537 **** + colnr_T mincol; /* minimal column for a match */ + { + int i; +! int bot = -1; + + shl->lnum = 0; + for (i = posmatch->cur; i < MAXPOSMATCH; i++) +--- 7531,7537 ---- + colnr_T mincol; /* minimal column for a match */ + { + int i; +! int bot = -1; + + shl->lnum = 0; + for (i = posmatch->cur; i < MAXPOSMATCH; i++) +*** ../vim-7.4.343/src/window.c 2014-06-25 17:58:07.346799241 +0200 +--- src/window.c 2014-06-25 18:10:45.698827930 +0200 +*************** +*** 6813,6819 **** + m->id = id; + m->priority = prio; + m->pattern = pat == NULL ? NULL : vim_strsave(pat); +- m->pos.cur = 0; + m->hlg_id = hlg_id; + m->match.regprog = regprog; + m->match.rmm_ic = FALSE; +--- 6813,6818 ---- +*************** +*** 6827,6833 **** + listitem_T *li; + int i; + +! for (i = 0, li = pos_list->lv_first; i < MAXPOSMATCH; + i++, li = li->li_next) + { + linenr_T lnum = 0; +--- 6826,6832 ---- + listitem_T *li; + int i; + +! for (i = 0, li = pos_list->lv_first; li != NULL && i < MAXPOSMATCH; + i++, li = li->li_next) + { + linenr_T lnum = 0; +*************** +*** 6837,6847 **** + listitem_T *subli; + int error = FALSE; + +- if (li == NULL) +- { +- m->pos.pos[i].lnum = 0; +- break; +- } + if (li->li_tv.v_type == VAR_LIST) + { + subl = li->li_tv.vval.v_list; +--- 6836,6841 ---- +*************** +*** 6853,6864 **** + lnum = get_tv_number_chk(&subli->li_tv, &error); + if (error == TRUE) + goto fail; +- m->pos.pos[i].lnum = lnum; + if (lnum == 0) + { + --i; + continue; + } + subli = subli->li_next; + if (subli != NULL) + { +--- 6847,6858 ---- + lnum = get_tv_number_chk(&subli->li_tv, &error); + if (error == TRUE) + goto fail; + if (lnum == 0) + { + --i; + continue; + } ++ m->pos.pos[i].lnum = lnum; + subli = subli->li_next; + if (subli != NULL) + { +*************** +*** 6879,6885 **** +--- 6873,6882 ---- + else if (li->li_tv.v_type == VAR_NUMBER) + { + if (li->li_tv.vval.v_number == 0) ++ { ++ --i; + continue; ++ } + m->pos.pos[i].lnum = li->li_tv.vval.v_number; + m->pos.pos[i].col = 0; + m->pos.pos[i].len = 0; +*** ../vim-7.4.343/src/version.c 2014-06-25 17:58:07.346799241 +0200 +--- src/version.c 2014-06-25 18:07:06.170819625 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 344, + /**/ + +-- + [clop clop] +MORTICIAN: Who's that then? +CUSTOMER: I don't know. +MORTICIAN: Must be a king. +CUSTOMER: Why? +MORTICIAN: He hasn't got shit all over him. + 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/patches/source/vim/patches/7.4.345 b/patches/source/vim/patches/7.4.345 new file mode 100644 index 000000000..7cac5f6ab --- /dev/null +++ b/patches/source/vim/patches/7.4.345 @@ -0,0 +1,73 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.345 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.345 (after 7.4.338) +Problem: Indent is not updated when deleting indent. +Solution: Remember changedtick. +Files: src/misc1.c + + +*** ../vim-7.4.344/src/misc1.c 2014-06-25 14:39:35.106348584 +0200 +--- src/misc1.c 2014-06-25 22:51:32.955465286 +0200 +*************** +*** 497,502 **** +--- 497,503 ---- + static int prev_indent = 0; /* cached indent value */ + static long prev_ts = 0L; /* cached tabstop value */ + static char_u *prev_line = NULL; /* cached pointer to line */ ++ static int prev_tick = 0; /* changedtick of cached value */ + int bri = 0; + /* window width minus window margin space, i.e. what rests for text */ + const int eff_wwidth = W_WIDTH(wp) +*************** +*** 505,514 **** + ? number_width(wp) + 1 : 0); + + /* used cached indent, unless pointer or 'tabstop' changed */ +! if (prev_line != line || prev_ts != wp->w_buffer->b_p_ts) + { + prev_line = line; + prev_ts = wp->w_buffer->b_p_ts; + prev_indent = get_indent_str(line, + (int)wp->w_buffer->b_p_ts, wp->w_p_list) + wp->w_p_brishift; + } +--- 506,517 ---- + ? number_width(wp) + 1 : 0); + + /* used cached indent, unless pointer or 'tabstop' changed */ +! if (prev_line != line || prev_ts != wp->w_buffer->b_p_ts +! || prev_tick != wp->w_buffer->b_changedtick) + { + prev_line = line; + prev_ts = wp->w_buffer->b_p_ts; ++ prev_tick = wp->w_buffer->b_changedtick; + prev_indent = get_indent_str(line, + (int)wp->w_buffer->b_p_ts, wp->w_p_list) + wp->w_p_brishift; + } +*** ../vim-7.4.344/src/version.c 2014-06-25 18:15:18.446838249 +0200 +--- src/version.c 2014-06-25 22:52:55.971468427 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 345, + /**/ + +-- +ARTHUR: Well, I can't just call you `Man'. +DENNIS: Well, you could say `Dennis'. +ARTHUR: Well, I didn't know you were called `Dennis.' +DENNIS: Well, you didn't bother to find out, did you? + 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/patches/source/vim/patches/7.4.346 b/patches/source/vim/patches/7.4.346 new file mode 100644 index 000000000..a40278e10 --- /dev/null +++ b/patches/source/vim/patches/7.4.346 @@ -0,0 +1,61 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.346 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.346 (after 7.4.338) +Problem: Indent is not updated when changing 'breakindentopt'. (itchyny) +Solution: Do not cache "brishift". (Christian Brabandt) +Files: src/misc1.c + + +*** ../vim-7.4.345/src/misc1.c 2014-06-25 22:55:34.783474435 +0200 +--- src/misc1.c 2014-06-26 21:15:46.970516542 +0200 +*************** +*** 513,523 **** + prev_ts = wp->w_buffer->b_p_ts; + prev_tick = wp->w_buffer->b_changedtick; + prev_indent = get_indent_str(line, +! (int)wp->w_buffer->b_p_ts, wp->w_p_list) + wp->w_p_brishift; + } + + /* indent minus the length of the showbreak string */ +- bri = prev_indent; + if (wp->w_p_brisbr) + bri -= vim_strsize(p_sbr); + +--- 513,523 ---- + prev_ts = wp->w_buffer->b_p_ts; + prev_tick = wp->w_buffer->b_changedtick; + prev_indent = get_indent_str(line, +! (int)wp->w_buffer->b_p_ts, wp->w_p_list); + } ++ bri = prev_indent + wp->w_p_brishift; + + /* indent minus the length of the showbreak string */ + if (wp->w_p_brisbr) + bri -= vim_strsize(p_sbr); + +*** ../vim-7.4.345/src/version.c 2014-06-25 22:55:34.783474435 +0200 +--- src/version.c 2014-06-26 21:17:10.342519697 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 346, + /**/ + +-- +A computer programmer is a device for turning requirements into +undocumented features. It runs on cola, pizza and Dilbert cartoons. + 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/patches/source/vim/patches/7.4.347 b/patches/source/vim/patches/7.4.347 new file mode 100644 index 000000000..7b6b6ddb0 --- /dev/null +++ b/patches/source/vim/patches/7.4.347 @@ -0,0 +1,74 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.347 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.347 +Problem: test55 fails on some systems. +Solution: Remove the elements that all result in zero and can end up in an + arbitrary position. +Files: src/testdir/test55.in, src/testdir/test55.ok + + +*** ../vim-7.4.346/src/testdir/test55.in 2014-06-25 17:31:04.942737863 +0200 +--- src/testdir/test55.in 2014-06-26 22:25:33.078674909 +0200 +*************** +*** 332,339 **** + :$put =string(reverse(sort(l))) + :$put =string(sort(reverse(sort(l)))) + :$put =string(uniq(sort(l))) +! :let l=[7, 9, 18, 12, 22, 10.0e-16, -1, 0xff, 0, -0, 0.22, 'foo', 'FOOBAR',{}, []] + :$put =string(sort(copy(l), 'n')) + :$put =string(sort(copy(l), 1)) + :$put =string(sort(copy(l), 'i')) + :$put =string(sort(copy(l))) +--- 332,340 ---- + :$put =string(reverse(sort(l))) + :$put =string(sort(reverse(sort(l)))) + :$put =string(uniq(sort(l))) +! :let l=[7, 9, 18, 12, 22, 10.0e-16, -1, 0xff, 0.22, 'foo'] + :$put =string(sort(copy(l), 'n')) ++ :let l=[7, 9, 18, 12, 22, 10.0e-16, -1, 0xff, 0, -0, 0.22, 'foo', 'FOOBAR',{}, []] + :$put =string(sort(copy(l), 1)) + :$put =string(sort(copy(l), 'i')) + :$put =string(sort(copy(l))) +*** ../vim-7.4.346/src/testdir/test55.ok 2014-06-25 17:31:04.942737863 +0200 +--- src/testdir/test55.ok 2014-06-26 22:26:38.662677390 +0200 +*************** +*** 101,107 **** + [[0, 1, 2], [0, 1, 2], 4, 2, 2, 1.5, 'xaaa', 'x8', 'foo6', 'foo', 'foo', 'A11', '-0'] + ['-0', 'A11', 'foo', 'foo', 'foo6', 'x8', 'xaaa', 1.5, 2, 2, 4, [0, 1, 2], [0, 1, 2]] + ['-0', 'A11', 'foo', 'foo6', 'x8', 'xaaa', 1.5, 2, 4, [0, 1, 2]] +! [-1, 0, 0, 'foo', 'FOOBAR', {}, [], 1.0e-15, 0.22, 7, 9, 12, 18, 22, 255] + ['foo', 'FOOBAR', -1, 0, 0, 0.22, 1.0e-15, 12, 18, 22, 255, 7, 9, [], {}] + ['foo', 'FOOBAR', -1, 0, 0, 0.22, 1.0e-15, 12, 18, 22, 255, 7, 9, [], {}] + ['FOOBAR', 'foo', -1, 0, 0, 0.22, 1.0e-15, 12, 18, 22, 255, 7, 9, [], {}] +--- 101,107 ---- + [[0, 1, 2], [0, 1, 2], 4, 2, 2, 1.5, 'xaaa', 'x8', 'foo6', 'foo', 'foo', 'A11', '-0'] + ['-0', 'A11', 'foo', 'foo', 'foo6', 'x8', 'xaaa', 1.5, 2, 2, 4, [0, 1, 2], [0, 1, 2]] + ['-0', 'A11', 'foo', 'foo6', 'x8', 'xaaa', 1.5, 2, 4, [0, 1, 2]] +! [-1, 'foo', 1.0e-15, 0.22, 7, 9, 12, 18, 22, 255] + ['foo', 'FOOBAR', -1, 0, 0, 0.22, 1.0e-15, 12, 18, 22, 255, 7, 9, [], {}] + ['foo', 'FOOBAR', -1, 0, 0, 0.22, 1.0e-15, 12, 18, 22, 255, 7, 9, [], {}] + ['FOOBAR', 'foo', -1, 0, 0, 0.22, 1.0e-15, 12, 18, 22, 255, 7, 9, [], {}] +*** ../vim-7.4.346/src/version.c 2014-06-26 21:24:53.134537205 +0200 +--- src/version.c 2014-06-26 22:28:15.402681050 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 347, + /**/ + +-- +Witches prefer brooms: vacuum-cleaners need extension cords! + + /// 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/patches/source/vim/patches/7.4.348 b/patches/source/vim/patches/7.4.348 new file mode 100644 index 000000000..c8817197b --- /dev/null +++ b/patches/source/vim/patches/7.4.348 @@ -0,0 +1,58 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.348 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.348 +Problem: When using "J1" in 'cinoptions' a line below a continuation line + gets too much indent. +Solution: Fix parenthesis in condition. +Files: src/misc1.c + + +*** ../vim-7.4.347/src/misc1.c 2014-06-26 21:24:53.134537205 +0200 +--- src/misc1.c 2014-07-02 16:58:08.854208322 +0200 +*************** +*** 7497,7505 **** + * 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); + +--- 7497,7507 ---- + * ldfd) { + * } + */ +! if ((curbuf->b_ind_js || curbuf->b_ind_keep_case_label) +! && cin_iscase(skipwhite(ml_get_curline()), FALSE)) + amount = get_indent(); ++ else if (curbuf->b_ind_js) ++ amount = get_indent_lnum(lnum); + else + amount = skip_label(lnum, &l); + +*** ../vim-7.4.347/src/version.c 2014-06-26 22:33:47.850693627 +0200 +--- src/version.c 2014-07-02 16:46:14.934197383 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 348, + /**/ + +-- +5 out of 4 people have trouble with fractions. + + /// 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/patches/source/vim/patches/7.4.349 b/patches/source/vim/patches/7.4.349 new file mode 100644 index 000000000..ce2320205 --- /dev/null +++ b/patches/source/vim/patches/7.4.349 @@ -0,0 +1,111 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.349 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.349 +Problem: When there are matches to highlight the whole window is redrawn, + which is slow. +Solution: Only redraw everything when lines were inserted or deleted. + Reset b_mod_xlines when needed. (Alexey Radkov) +Files: src/screen.c, src/window.c + + +*** ../vim-7.4.348/src/screen.c 2014-06-25 18:15:18.446838249 +0200 +--- src/screen.c 2014-06-28 15:35:18.868836570 +0200 +*************** +*** 1769,1776 **** + syntax_check_changed(lnum))) + #endif + #ifdef FEAT_SEARCH_EXTRA +! /* match in fixed position might need redraw */ +! || wp->w_match_head != NULL + #endif + ))))) + { +--- 1769,1778 ---- + syntax_check_changed(lnum))) + #endif + #ifdef FEAT_SEARCH_EXTRA +! /* match in fixed position might need redraw +! * if lines were inserted or deleted */ +! || (wp->w_match_head != NULL +! && buf->b_mod_xlines != 0) + #endif + ))))) + { +*** ../vim-7.4.348/src/window.c 2014-06-25 18:15:18.446838249 +0200 +--- src/window.c 2014-06-28 15:38:51.952839835 +0200 +*************** +*** 6904,6915 **** + } + else + { + wp->w_buffer->b_mod_top = toplnum; + wp->w_buffer->b_mod_bot = botlnum; + } + m->pos.toplnum = toplnum; + m->pos.botlnum = botlnum; +- wp->w_buffer->b_mod_set = TRUE; + rtype = VALID; + } + } +--- 6904,6916 ---- + } + else + { ++ wp->w_buffer->b_mod_set = TRUE; + wp->w_buffer->b_mod_top = toplnum; + wp->w_buffer->b_mod_bot = botlnum; ++ wp->w_buffer->b_mod_xlines = 0; + } + m->pos.toplnum = toplnum; + m->pos.botlnum = botlnum; + rtype = VALID; + } + } +*************** +*** 6986,6995 **** + } + else + { + wp->w_buffer->b_mod_top = cur->pos.toplnum; + wp->w_buffer->b_mod_bot = cur->pos.botlnum; + } +- wp->w_buffer->b_mod_set = TRUE; + rtype = VALID; + } + vim_free(cur); +--- 6987,6997 ---- + } + else + { ++ wp->w_buffer->b_mod_set = TRUE; + wp->w_buffer->b_mod_top = cur->pos.toplnum; + wp->w_buffer->b_mod_bot = cur->pos.botlnum; ++ wp->w_buffer->b_mod_xlines = 0; + } + rtype = VALID; + } + vim_free(cur); +*** ../vim-7.4.348/src/version.c 2014-07-02 17:02:29.726212319 +0200 +--- src/version.c 2014-07-02 17:15:58.646224714 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 349, + /**/ + +-- +Trees moving back and forth is what makes the wind blow. + + /// 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/patches/source/vim/patches/7.4.350 b/patches/source/vim/patches/7.4.350 new file mode 100644 index 000000000..1c4a5a34a --- /dev/null +++ b/patches/source/vim/patches/7.4.350 @@ -0,0 +1,139 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.350 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.350 +Problem: Using C indenting for Javascript does not work well for a {} block + inside parenthesis. +Solution: When looking for a matching paren ignore one that is before the + start of a {} block. +Files: src/misc1.c, src/testdir/test3.in, src/testdir/test3.ok + + +*** ../vim-7.4.349/src/misc1.c 2014-07-02 17:02:29.722212319 +0200 +--- src/misc1.c 2014-07-02 18:09:39.670274070 +0200 +*************** +*** 6614,6620 **** + } + + /* +! * Find the matching '(', failing if it is in a comment. + * Return NULL if no match found. + */ + static pos_T * +--- 6614,6620 ---- + } + + /* +! * Find the matching '(', ignoring it if it is in a comment. + * Return NULL if no match found. + */ + static pos_T * +*************** +*** 6645,6650 **** +--- 6645,6676 ---- + } + + /* ++ * Find the matching '(', ignoring it if it is in a comment or before an ++ * unmatched {. ++ * Return NULL if no match found. ++ */ ++ static pos_T * ++ find_match_paren_after_brace(ind_maxparen) /* XXX */ ++ int ind_maxparen; ++ { ++ pos_T *trypos = find_match_paren(ind_maxparen); ++ ++ if (trypos != NULL) ++ { ++ pos_T *tryposBrace = find_start_brace(); ++ ++ /* If both an unmatched '(' and '{' is found. Ignore the '(' ++ * position if the '{' is further down. */ ++ if (tryposBrace != NULL ++ && (trypos->lnum != tryposBrace->lnum ++ ? trypos->lnum < tryposBrace->lnum ++ : trypos->col < tryposBrace->col)) ++ trypos = NULL; ++ } ++ return trypos; ++ } ++ ++ /* + * Return ind_maxparen corrected for the difference in line number between the + * cursor position and "startpos". This makes sure that searching for a + * matching paren above the cursor line doesn't find a match because of +*************** +*** 7419,7425 **** + { + 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 + { +--- 7445,7452 ---- + { + curwin->w_cursor.lnum = our_paren_pos.lnum; + curwin->w_cursor.col = col; +! if (find_match_paren_after_brace(curbuf->b_ind_maxparen) +! != NULL) + amount += curbuf->b_ind_unclosed2; + else + { +*** ../vim-7.4.349/src/testdir/test3.in 2013-03-07 12:39:35.000000000 +0100 +--- src/testdir/test3.in 2014-07-02 18:08:06.430272641 +0200 +*************** +*** 1950,1955 **** +--- 1950,1959 ---- + JSSTART + (function($){ + ++ if (cond && ++ cond) { ++ stmt; ++ } + var class_name='myclass'; + + function private_method() { +*** ../vim-7.4.349/src/testdir/test3.ok 2013-03-07 12:40:03.000000000 +0100 +--- src/testdir/test3.ok 2014-07-02 18:09:14.470273684 +0200 +*************** +*** 1728,1733 **** +--- 1728,1737 ---- + JSSTART + (function($){ + ++ if (cond && ++ cond) { ++ stmt; ++ } + var class_name='myclass'; + + function private_method() { +*** ../vim-7.4.349/src/version.c 2014-07-02 17:16:51.334225522 +0200 +--- src/version.c 2014-07-02 18:06:31.330271184 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 350, + /**/ + +-- +FATHER: You killed eight wedding guests in all! +LAUNCELOT: Er, Well ... the thing is ... I thought your son was a lady. +FATHER: I can understand that. + "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/patches/source/vim/patches/7.4.351 b/patches/source/vim/patches/7.4.351 new file mode 100644 index 000000000..0ace333eb --- /dev/null +++ b/patches/source/vim/patches/7.4.351 @@ -0,0 +1,160 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.351 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.351 +Problem: sort() is not stable. +Solution: When the items are identical, compare the pointers. +Files: src/eval.c, src/testdir/test55.in, src/testdir/test55.ok + + +*** ../vim-7.4.350/src/eval.c 2014-06-25 17:31:04.942737863 +0200 +--- src/eval.c 2014-07-02 18:52:19.102313288 +0200 +*************** +*** 17334,17339 **** +--- 17334,17340 ---- + static char_u *item_compare_func; + static dict_T *item_compare_selfdict; + static int item_compare_func_err; ++ static int item_compare_keep_zero; + static void do_sort_uniq __ARGS((typval_T *argvars, typval_T *rettv, int sort)); + #define ITEM_COMPARE_FAIL 999 + +*************** +*** 17374,17379 **** +--- 17375,17386 ---- + n2 = strtod((char *)p2, (char **)&p2); + res = n1 == n2 ? 0 : n1 > n2 ? 1 : -1; + } ++ ++ /* When the result would be zero, compare the pointers themselves. Makes ++ * the sort stable. */ ++ if (res == 0 && !item_compare_keep_zero) ++ res = s1 > s2 ? 1 : -1; ++ + vim_free(tofree1); + vim_free(tofree2); + return res; +*************** +*** 17396,17402 **** + if (item_compare_func_err) + return 0; + +! /* copy the values. This is needed to be able to set v_lock to VAR_FIXED + * in the copy without changing the original list items. */ + copy_tv(&(*(listitem_T **)s1)->li_tv, &argv[0]); + copy_tv(&(*(listitem_T **)s2)->li_tv, &argv[1]); +--- 17403,17409 ---- + if (item_compare_func_err) + return 0; + +! /* Copy the values. This is needed to be able to set v_lock to VAR_FIXED + * in the copy without changing the original list items. */ + copy_tv(&(*(listitem_T **)s1)->li_tv, &argv[0]); + copy_tv(&(*(listitem_T **)s2)->li_tv, &argv[1]); +*************** +*** 17415,17420 **** +--- 17422,17433 ---- + if (item_compare_func_err) + res = ITEM_COMPARE_FAIL; /* return value has wrong type */ + clear_tv(&rettv); ++ ++ /* When the result would be zero, compare the pointers themselves. Makes ++ * the sort stable. */ ++ if (res == 0 && !item_compare_keep_zero) ++ res = s1 > s2 ? 1 : -1; ++ + return res; + } + +*************** +*** 17509,17514 **** +--- 17522,17528 ---- + ptrs[i++] = li; + + item_compare_func_err = FALSE; ++ item_compare_keep_zero = FALSE; + /* test the compare function */ + if (item_compare_func != NULL + && item_compare2((void *)&ptrs[0], (void *)&ptrs[1]) +*************** +*** 17536,17541 **** +--- 17550,17556 ---- + + /* f_uniq(): ptrs will be a stack of items to remove */ + item_compare_func_err = FALSE; ++ item_compare_keep_zero = TRUE; + item_compare_func_ptr = item_compare_func + ? item_compare2 : item_compare; + +*** ../vim-7.4.350/src/testdir/test55.in 2014-06-26 22:33:47.850693627 +0200 +--- src/testdir/test55.in 2014-07-02 19:00:09.238320492 +0200 +*************** +*** 332,340 **** + :$put =string(reverse(sort(l))) + :$put =string(sort(reverse(sort(l)))) + :$put =string(uniq(sort(l))) +! :let l=[7, 9, 18, 12, 22, 10.0e-16, -1, 0xff, 0.22, 'foo'] + :$put =string(sort(copy(l), 'n')) +! :let l=[7, 9, 18, 12, 22, 10.0e-16, -1, 0xff, 0, -0, 0.22, 'foo', 'FOOBAR',{}, []] + :$put =string(sort(copy(l), 1)) + :$put =string(sort(copy(l), 'i')) + :$put =string(sort(copy(l))) +--- 332,340 ---- + :$put =string(reverse(sort(l))) + :$put =string(sort(reverse(sort(l)))) + :$put =string(uniq(sort(l))) +! :let l=[7, 9, 'one', 18, 12, 22, 'two', 10.0e-16, -1, 'three', 0xff, 0.22, 'four'] + :$put =string(sort(copy(l), 'n')) +! :let l=[7, 9, 18, 12, 22, 10.0e-16, -1, 0xff, 0, -0, 0.22, 'bar', 'BAR', 'Bar', 'Foo', 'FOO', 'foo', 'FOOBAR', {}, []] + :$put =string(sort(copy(l), 1)) + :$put =string(sort(copy(l), 'i')) + :$put =string(sort(copy(l))) +*** ../vim-7.4.350/src/testdir/test55.ok 2014-06-26 22:33:47.850693627 +0200 +--- src/testdir/test55.ok 2014-07-02 19:00:57.078321225 +0200 +*************** +*** 101,110 **** + [[0, 1, 2], [0, 1, 2], 4, 2, 2, 1.5, 'xaaa', 'x8', 'foo6', 'foo', 'foo', 'A11', '-0'] + ['-0', 'A11', 'foo', 'foo', 'foo6', 'x8', 'xaaa', 1.5, 2, 2, 4, [0, 1, 2], [0, 1, 2]] + ['-0', 'A11', 'foo', 'foo6', 'x8', 'xaaa', 1.5, 2, 4, [0, 1, 2]] +! [-1, 'foo', 1.0e-15, 0.22, 7, 9, 12, 18, 22, 255] +! ['foo', 'FOOBAR', -1, 0, 0, 0.22, 1.0e-15, 12, 18, 22, 255, 7, 9, [], {}] +! ['foo', 'FOOBAR', -1, 0, 0, 0.22, 1.0e-15, 12, 18, 22, 255, 7, 9, [], {}] +! ['FOOBAR', 'foo', -1, 0, 0, 0.22, 1.0e-15, 12, 18, 22, 255, 7, 9, [], {}] + ['aa', 'bb'] + ['aa', 'bb'] + ['', 'aa', 'bb', ''] +--- 101,110 ---- + [[0, 1, 2], [0, 1, 2], 4, 2, 2, 1.5, 'xaaa', 'x8', 'foo6', 'foo', 'foo', 'A11', '-0'] + ['-0', 'A11', 'foo', 'foo', 'foo6', 'x8', 'xaaa', 1.5, 2, 2, 4, [0, 1, 2], [0, 1, 2]] + ['-0', 'A11', 'foo', 'foo6', 'x8', 'xaaa', 1.5, 2, 4, [0, 1, 2]] +! [-1, 'one', 'two', 'three', 'four', 1.0e-15, 0.22, 7, 9, 12, 18, 22, 255] +! ['bar', 'BAR', 'Bar', 'Foo', 'FOO', 'foo', 'FOOBAR', -1, 0, 0, 0.22, 1.0e-15, 12, 18, 22, 255, 7, 9, [], {}] +! ['bar', 'BAR', 'Bar', 'Foo', 'FOO', 'foo', 'FOOBAR', -1, 0, 0, 0.22, 1.0e-15, 12, 18, 22, 255, 7, 9, [], {}] +! ['BAR', 'Bar', 'FOO', 'FOOBAR', 'Foo', 'bar', 'foo', -1, 0, 0, 0.22, 1.0e-15, 12, 18, 22, 255, 7, 9, [], {}] + ['aa', 'bb'] + ['aa', 'bb'] + ['', 'aa', 'bb', ''] +*** ../vim-7.4.350/src/version.c 2014-07-02 18:27:44.662290695 +0200 +--- src/version.c 2014-07-02 18:46:38.230308065 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 351, + /**/ + +-- +The early bird gets the worm. If you want something else for +breakfast, get up later. + + /// 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/patches/source/vim/patches/7.4.352 b/patches/source/vim/patches/7.4.352 new file mode 100644 index 000000000..ecfabb3b3 --- /dev/null +++ b/patches/source/vim/patches/7.4.352 @@ -0,0 +1,101 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.352 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.352 +Problem: With 'linebreak' a tab causes missing line break. +Solution: Count a tab for what it's worth also for shorter lines. + (Christian Brabandt) +Files: src/charset.c + + +*** ../vim-7.4.351/src/charset.c 2014-06-25 14:39:35.098348584 +0200 +--- src/charset.c 2014-07-02 19:34:28.142352040 +0200 +*************** +*** 1078,1083 **** +--- 1078,1084 ---- + int c; + int size; + colnr_T col2; ++ colnr_T col_adj = 0; /* col + screen size of tab */ + colnr_T colmax; + int added; + # ifdef FEAT_MBYTE +*************** +*** 1109,1114 **** +--- 1110,1117 ---- + */ + size = win_chartabsize(wp, s, col); + c = *s; ++ if (tab_corr) ++ col_adj = size - 1; + + /* + * If 'linebreak' set check at a blank before a non-blank if the line +*************** +*** 1130,1141 **** + */ + numberextra = win_col_off(wp); + col2 = col; +! colmax = (colnr_T)(W_WIDTH(wp) - numberextra); + if (col >= colmax) + { +! n = colmax + win_col_off2(wp); + if (n > 0) +! colmax += (((col - colmax) / n) + 1) * n; + } + + for (;;) +--- 1133,1145 ---- + */ + numberextra = win_col_off(wp); + col2 = col; +! colmax = (colnr_T)(W_WIDTH(wp) - numberextra - col_adj); + if (col >= colmax) + { +! colmax += col_adj; +! n = colmax + win_col_off2(wp); + if (n > 0) +! colmax += (((col - colmax) / n) + 1) * n - col_adj; + } + + for (;;) +*************** +*** 1152,1158 **** + col2 += win_chartabsize(wp, s, col2); + if (col2 >= colmax) /* doesn't fit */ + { +! size = colmax - col; + tab_corr = FALSE; + break; + } +--- 1156,1162 ---- + col2 += win_chartabsize(wp, s, col2); + if (col2 >= colmax) /* doesn't fit */ + { +! size = colmax - col + col_adj; + tab_corr = FALSE; + break; + } +*** ../vim-7.4.351/src/version.c 2014-07-02 19:06:14.686326091 +0200 +--- src/version.c 2014-07-02 19:32:50.218350540 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 352, + /**/ + +-- +The early bird gets the worm. The second mouse gets the cheese. + + /// 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/patches/source/vim/patches/7.4.353 b/patches/source/vim/patches/7.4.353 new file mode 100644 index 000000000..c54465d96 --- /dev/null +++ b/patches/source/vim/patches/7.4.353 @@ -0,0 +1,489 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.353 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.353 +Problem: 'linebreak' doesn't work with the 'list' option. +Solution: Make it work. (Christian Brabandt) +Files: runtime/doc/options.txt, src/charset.c, src/screen.c, + 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/testdir/test_listlbr.in, src/testdir/test_listlbr.ok + + +*** ../vim-7.4.352/runtime/doc/options.txt 2014-06-25 11:48:40.729960646 +0200 +--- runtime/doc/options.txt 2014-07-02 19:47:21.602363892 +0200 +*************** +*** 1200,1205 **** +--- 1200,1237 ---- + break if 'linebreak' is on. Only works for ASCII and also for 8-bit + characters when 'encoding' is an 8-bit encoding. + ++ *'breakindent'* *'bri'* ++ 'breakindent' 'bri' boolean (default off) ++ local to window ++ {not in Vi} ++ {not available when compiled without the |+linebreak| ++ feature} ++ Every wrapped line will continue visually indented (same amount of ++ space as the beginning of that line), thus preserving horizontal blocks ++ of text. ++ ++ *'breakindentopt'* *'briopt'* ++ 'breakindentopt' 'briopt' string (default empty) ++ local to window ++ {not in Vi} ++ {not available when compiled without the |+linebreak| ++ feature} ++ Settings for 'breakindent'. It can consist of the following optional ++ items and must be separated by a comma: ++ min:{n} Minimum text width that will be kept after ++ applying 'breakindent', even if the resulting ++ text should normally be narrower. This prevents ++ text indented almost to the right window border ++ occupying lot of vertical space when broken. ++ shift:{n} After applying 'breakindent', the wrapped line's ++ beginning will be shifted by the given number of ++ characters. It permits dynamic French paragraph ++ indentation (negative) or emphasizing the line ++ continuation (positive). ++ sbr Display the 'showbreak' value before applying the ++ additional indent. ++ The default value for min is 20 and shift is 0. ++ + *'browsedir'* *'bsdir'* + 'browsedir' 'bsdir' string (default: "last") + global +*** ../vim-7.4.352/src/charset.c 2014-07-02 19:37:38.462354956 +0200 +--- src/charset.c 2014-07-02 19:47:21.602363892 +0200 +*************** +*** 1120,1126 **** + if (wp->w_p_lbr + && vim_isbreak(c) + && !vim_isbreak(s[1]) +- && !wp->w_p_list + && wp->w_p_wrap + # ifdef FEAT_VERTSPLIT + && wp->w_width != 0 +--- 1120,1125 ---- +*** ../vim-7.4.352/src/screen.c 2014-07-02 17:16:51.330225522 +0200 +--- src/screen.c 2014-07-02 19:51:42.082367883 +0200 +*************** +*** 2843,2848 **** +--- 2843,2849 ---- + char_u extra[18]; /* "%ld" and 'fdc' must fit in here */ + int n_extra = 0; /* number of extra chars */ + char_u *p_extra = NULL; /* string of extra chars, plus NUL */ ++ char_u *p_extra_free = NULL; /* p_extra needs to be freed */ + int c_extra = NUL; /* extra chars, all the same */ + int extra_attr = 0; /* attributes when n_extra != 0 */ + static char_u *at_end_str = (char_u *)""; /* used for p_extra when +*************** +*** 4053,4058 **** +--- 4054,4064 ---- + } + else + { ++ if (p_extra_free != NULL) ++ { ++ vim_free(p_extra_free); ++ p_extra_free = NULL; ++ } + /* + * Get a character from the line itself. + */ +*************** +*** 4424,4431 **** + /* + * Found last space before word: check for line break. + */ +! if (wp->w_p_lbr && vim_isbreak(c) && !vim_isbreak(*ptr) +! && !wp->w_p_list) + { + char_u *p = ptr - ( + # ifdef FEAT_MBYTE +--- 4430,4436 ---- + /* + * Found last space before word: check for line break. + */ +! if (wp->w_p_lbr && vim_isbreak(c) && !vim_isbreak(*ptr)) + { + char_u *p = ptr - ( + # ifdef FEAT_MBYTE +*************** +*** 4433,4439 **** + # endif + 1); + /* TODO: is passing p for start of the line OK? */ +! n_extra = win_lbr_chartabsize(wp, p, p, (colnr_T)vcol, + NULL) - 1; + c_extra = ' '; + if (vim_iswhite(c)) +--- 4438,4444 ---- + # endif + 1); + /* TODO: is passing p for start of the line OK? */ +! n_extra = win_lbr_chartabsize(wp, line, p, (colnr_T)vcol, + NULL) - 1; + c_extra = ' '; + if (vim_iswhite(c)) +*************** +*** 4443,4449 **** + /* See "Tab alignment" below. */ + FIX_FOR_BOGUSCOLS; + #endif +! c = ' '; + } + } + #endif +--- 4448,4455 ---- + /* See "Tab alignment" below. */ + FIX_FOR_BOGUSCOLS; + #endif +! if (!wp->w_p_list) +! c = ' '; + } + } + #endif +*************** +*** 4483,4491 **** + */ + if (c == TAB && (!wp->w_p_list || lcs_tab1)) + { + /* tab amount depends on current column */ +! n_extra = (int)wp->w_buffer->b_p_ts + - vcol % (int)wp->w_buffer->b_p_ts - 1; + #ifdef FEAT_CONCEAL + /* Tab alignment should be identical regardless of + * 'conceallevel' value. So tab compensates of all +--- 4489,4538 ---- + */ + if (c == TAB && (!wp->w_p_list || lcs_tab1)) + { ++ int tab_len = 0; + /* tab amount depends on current column */ +! tab_len = (int)wp->w_buffer->b_p_ts + - vcol % (int)wp->w_buffer->b_p_ts - 1; ++ #ifdef FEAT_LINEBREAK ++ if (!wp->w_p_lbr) ++ #endif ++ /* tab amount depends on current column */ ++ n_extra = tab_len; ++ #ifdef FEAT_LINEBREAK ++ else ++ { ++ char_u *p; ++ int len = n_extra; ++ int i; ++ int saved_nextra = n_extra; ++ ++ /* if n_extra > 0, it gives the number of chars, to ++ * use for a tab, else we need to calculate the width ++ * for a tab */ ++ #ifdef FEAT_MBYTE ++ len = (tab_len * mb_char2len(lcs_tab2)); ++ if (n_extra > 0) ++ len += n_extra - tab_len; ++ #endif ++ c = lcs_tab1; ++ p = alloc((unsigned)(len + 1)); ++ vim_memset(p, ' ', len); ++ p[len] = NUL; ++ p_extra_free = p; ++ for (i = 0; i < tab_len; i++) ++ { ++ #ifdef FEAT_MBYTE ++ mb_char2bytes(lcs_tab2, p); ++ p += mb_char2len(lcs_tab2); ++ n_extra += mb_char2len(lcs_tab2) ++ - (saved_nextra > 0 ? 1 : 0); ++ #else ++ p[i] = lcs_tab2; ++ #endif ++ } ++ p_extra = p_extra_free; ++ } ++ #endif + #ifdef FEAT_CONCEAL + /* Tab alignment should be identical regardless of + * 'conceallevel' value. So tab compensates of all +*************** +*** 4501,4508 **** + if (wp->w_p_list) + { + c = lcs_tab1; +! c_extra = lcs_tab2; +! n_attr = n_extra + 1; + extra_attr = hl_attr(HLF_8); + saved_attr2 = char_attr; /* save current attr */ + #ifdef FEAT_MBYTE +--- 4548,4560 ---- + if (wp->w_p_list) + { + c = lcs_tab1; +! #ifdef FEAT_LINEBREAK +! if (wp->w_p_lbr) +! c_extra = NUL; /* using p_extra from above */ +! else +! #endif +! c_extra = lcs_tab2; +! n_attr = tab_len + 1; + extra_attr = hl_attr(HLF_8); + saved_attr2 = char_attr; /* save current attr */ + #ifdef FEAT_MBYTE +*************** +*** 4598,4606 **** + if ((dy_flags & DY_UHEX) && wp->w_p_rl) + rl_mirror(p_extra); /* reverse "<12>" */ + #endif +- n_extra = byte2cells(c) - 1; + c_extra = NUL; +! c = *p_extra++; + if (!attr_pri) + { + n_attr = n_extra + 1; +--- 4650,4674 ---- + if ((dy_flags & DY_UHEX) && wp->w_p_rl) + rl_mirror(p_extra); /* reverse "<12>" */ + #endif + c_extra = NUL; +! #ifdef FEAT_LINEBREAK +! if (wp->w_p_lbr) +! { +! char_u *p; +! +! c = *p_extra; +! p = alloc((unsigned)n_extra + 1); +! vim_memset(p, ' ', n_extra); +! STRNCPY(p, p_extra + 1, STRLEN(p_extra) - 1); +! p[n_extra] = NUL; +! p_extra_free = p_extra = p; +! } +! else +! #endif +! { +! n_extra = byte2cells(c) - 1; +! c = *p_extra++; +! } + if (!attr_pri) + { + n_attr = n_extra + 1; +*** ../vim-7.4.352/src/testdir/Make_amiga.mak 2014-06-25 14:39:35.110348584 +0200 +--- src/testdir/Make_amiga.mak 2014-07-02 19:47:21.610363892 +0200 +*************** +*** 38,43 **** +--- 38,44 ---- + test104.out test105.out test106.out test107.out \ + test_autoformat_join.out \ + test_breakindent.out \ ++ test_listlbr.out \ + test_eval.out \ + test_options.out + +*************** +*** 165,169 **** +--- 166,171 ---- + test107.out: test107.in + test_autoformat_join.out: test_autoformat_join.in + test_breakindent.out: test_breakindent.in ++ test_listlbr.out: test_listlbr.in + test_eval.out: test_eval.in + test_options.out: test_options.in +*** ../vim-7.4.352/src/testdir/Make_dos.mak 2014-06-25 14:39:35.110348584 +0200 +--- src/testdir/Make_dos.mak 2014-07-02 19:47:21.610363892 +0200 +*************** +*** 37,42 **** +--- 37,43 ---- + test105.out test106.out test107.out\ + test_autoformat_join.out \ + test_breakindent.out \ ++ test_listlbr \ + test_eval.out \ + test_options.out + +*** ../vim-7.4.352/src/testdir/Make_ming.mak 2014-06-25 14:39:35.110348584 +0200 +--- src/testdir/Make_ming.mak 2014-07-02 19:47:21.610363892 +0200 +*************** +*** 57,62 **** +--- 57,63 ---- + test105.out test106.out test107.out \ + test_autoformat_join.out \ + test_breakindent.out \ ++ test_listlbr.out \ + test_eval.out \ + test_options.out + +*** ../vim-7.4.352/src/testdir/Make_os2.mak 2014-06-25 14:39:35.114348584 +0200 +--- src/testdir/Make_os2.mak 2014-07-02 19:47:21.610363892 +0200 +*************** +*** 40,45 **** +--- 40,46 ---- + test_autoformat_join.out \ + test_eval.out \ + test_breakindent.out \ ++ test_listlbr.out \ + test_options.out + + .SUFFIXES: .in .out +*** ../vim-7.4.352/src/testdir/Make_vms.mms 2014-06-25 14:39:35.114348584 +0200 +--- src/testdir/Make_vms.mms 2014-07-02 19:47:21.610363892 +0200 +*************** +*** 98,103 **** +--- 98,104 ---- + test105.out test106.out test107.out \ + test_autoformat_join.out \ + test_breakindent.out \ ++ test_listlbr.out \ + test_eval.out \ + test_options.out + +*** ../vim-7.4.352/src/testdir/Makefile 2014-06-25 14:39:35.114348584 +0200 +--- src/testdir/Makefile 2014-07-02 19:47:21.610363892 +0200 +*************** +*** 35,40 **** +--- 35,41 ---- + test104.out test105.out test106.out test107.out \ + test_autoformat_join.out \ + test_breakindent.out \ ++ test_listlbr.out \ + test_eval.out \ + test_options.out + +*** ../vim-7.4.352/src/testdir/test_listlbr.in 2014-07-02 19:58:25.642374067 +0200 +--- src/testdir/test_listlbr.in 2014-07-02 19:47:21.610363892 +0200 +*************** +*** 0 **** +--- 1,62 ---- ++ Test for linebreak and list option ++ ++ STARTTEST ++ :so small.vim ++ :if !exists("+linebreak") | e! test.ok | w! test.out | qa! | endif ++ :10new|:vsp|:vert resize 20 ++ :put =\"\tabcdef hijklmn\tpqrstuvwxyz\u00a01060ABCDEFGHIJKLMNOP \" ++ :norm! zt ++ :set ts=4 sw=4 sts=4 linebreak sbr=+ wrap ++ :fu! ScreenChar(width) ++ : let c='' ++ : for j in range(1,4) ++ : for i in range(1,a:width) ++ : let c.=nr2char(screenchar(j, i)) ++ : endfor ++ : let c.="\n" ++ : endfor ++ : return c ++ :endfu ++ :fu! DoRecordScreen() ++ : wincmd l ++ : $put =printf(\"\n%s\", g:test) ++ : $put =g:line ++ : wincmd p ++ :endfu ++ :let g:test="Test 1: set linebreak" ++ :redraw! ++ :let line=ScreenChar(winwidth(0)) ++ :call DoRecordScreen() ++ :let g:test="Test 2: set linebreak + set list" ++ :set linebreak list listchars= ++ :redraw! ++ :let line=ScreenChar(winwidth(0)) ++ :call DoRecordScreen() ++ :let g:test ="Test 3: set linebreak + set list + fancy listchars" ++ :exe "set linebreak list listchars=nbsp:\u2423,tab:\u2595\u2014,trail:\u02d1,eol:\ub6" ++ :redraw! ++ :let line=ScreenChar(winwidth(0)) ++ :call DoRecordScreen() ++ :let g:test ="Test 4: set linebreak nolist" ++ :set nolist linebreak ++ :redraw! ++ :let line=ScreenChar(winwidth(0)) ++ :call DoRecordScreen() ++ :let g:test ="Test 5: set nolinebreak list" ++ :set list nolinebreak ++ :redraw! ++ :let line=ScreenChar(winwidth(0)) ++ :call DoRecordScreen() ++ :let g:test ="Test 6: set linebreak with tab and 1 line as long as screen: should break!" ++ :set nolist linebreak ts=8 ++ :let line="1\t".repeat('a', winwidth(0)-2) ++ :$put =line ++ :$ ++ :norm! zt ++ :redraw! ++ :let line=ScreenChar(winwidth(0)) ++ :call DoRecordScreen() ++ :%w! test.out ++ :qa! ++ ENDTEST ++ dummy text +*** ../vim-7.4.352/src/testdir/test_listlbr.ok 2014-07-02 19:58:25.646374067 +0200 +--- src/testdir/test_listlbr.ok 2014-07-02 19:47:21.610363892 +0200 +*************** +*** 0 **** +--- 1,39 ---- ++ ++ abcdef hijklmn pqrstuvwxyz 1060ABCDEFGHIJKLMNOP ++ ++ Test 1: set linebreak ++ abcdef ++ +hijklmn ++ +pqrstuvwxyz 1060ABC ++ +DEFGHIJKLMNOP ++ ++ Test 2: set linebreak + set list ++ ^Iabcdef hijklmn^I ++ +pqrstuvwxyz 1060ABC ++ +DEFGHIJKLMNOP ++ ++ ++ Test 3: set linebreak + set list + fancy listchars ++ ▕———abcdef ++ +hijklmn▕——— ++ +pqrstuvwxyz␣1060ABC ++ +DEFGHIJKLMNOPˑ¶ ++ ++ Test 4: set linebreak nolist ++ abcdef ++ +hijklmn ++ +pqrstuvwxyz 1060ABC ++ +DEFGHIJKLMNOP ++ ++ Test 5: set nolinebreak list ++ ▕———abcdef hijklmn▕— ++ +pqrstuvwxyz␣1060ABC ++ +DEFGHIJKLMNOPˑ¶ ++ ¶ ++ 1 aaaaaaaaaaaaaaaaaa ++ ++ Test 6: set linebreak with tab and 1 line as long as screen: should break! ++ 1 ++ +aaaaaaaaaaaaaaaaaa ++ ~ ++ ~ +*** ../vim-7.4.352/src/version.c 2014-07-02 19:37:38.462354956 +0200 +--- src/version.c 2014-07-02 19:57:44.066373430 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 353, + /**/ + +-- +FATHER: You only killed the bride's father - that's all - +LAUNCELOT: Oh dear, I didn't really mean to... +FATHER: Didn't mean to? You put your sword right through his head! +LAUNCELOT: Gosh - Is he all right? + "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/patches/source/vim/patches/7.4.354 b/patches/source/vim/patches/7.4.354 new file mode 100644 index 000000000..1bbcf6dde --- /dev/null +++ b/patches/source/vim/patches/7.4.354 @@ -0,0 +1,56 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.354 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.354 +Problem: Compiler warning. +Solution: Change NUL to NULL. (Ken Takata) +Files: src/screen.c + + +*** ../vim-7.4.353/src/screen.c 2014-07-02 19:59:35.454375136 +0200 +--- src/screen.c 2014-07-03 14:08:03.579375847 +0200 +*************** +*** 3704,3710 **** + if (diff_hlf != (hlf_T)0) + char_attr = hl_attr(diff_hlf); + #endif +! p_extra = NUL; + c_extra = ' '; + n_extra = get_breakindent_win(wp, + ml_get_buf(wp->w_buffer, lnum, FALSE)); +--- 3704,3710 ---- + if (diff_hlf != (hlf_T)0) + char_attr = hl_attr(diff_hlf); + #endif +! p_extra = NULL; + c_extra = ' '; + n_extra = get_breakindent_win(wp, + ml_get_buf(wp->w_buffer, lnum, FALSE)); +*** ../vim-7.4.353/src/version.c 2014-07-02 19:59:35.454375136 +0200 +--- src/version.c 2014-07-03 14:08:38.875376388 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 354, + /**/ + +-- + [SIR LAUNCELOT runs back up the stairs, grabs a rope + of the wall and swings out over the heads of the CROWD in a + swashbuckling manner towards a large window. He stops just short + of the window and is left swing pathetically back and forth.] +LAUNCELOT: Excuse me ... could somebody give me a push ... + "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/patches/source/vim/patches/7.4.355 b/patches/source/vim/patches/7.4.355 new file mode 100644 index 000000000..49d4276ab --- /dev/null +++ b/patches/source/vim/patches/7.4.355 @@ -0,0 +1,929 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.355 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.355 +Problem: Several problems with Javascript indenting. +Solution: Improve Javascript indenting. +Files: src/misc1.c + + +*** ../vim-7.4.354/src/misc1.c 2014-07-02 18:27:44.662290695 +0200 +--- src/misc1.c 2014-07-03 22:42:20.315848662 +0200 +*************** +*** 5382,5387 **** +--- 5382,5388 ---- + static char_u *cin_skipcomment __ARGS((char_u *)); + static int cin_nocode __ARGS((char_u *)); + static pos_T *find_line_comment __ARGS((void)); ++ static int cin_has_js_key __ARGS((char_u *text)); + static int cin_islabel_skip __ARGS((char_u **)); + static int cin_isdefault __ARGS((char_u *)); + static char_u *after_label __ARGS((char_u *l)); +*************** +*** 5410,5415 **** +--- 5411,5417 ---- + 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 pos_T *find_match_char __ARGS((int c, int ind_maxparen)); + 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)); +*************** +*** 5494,5500 **** +--- 5496,5533 ---- + } + + /* ++ * Return TRUE if "text" starts with "key:". ++ */ ++ static int ++ cin_has_js_key(text) ++ char_u *text; ++ { ++ char_u *s = skipwhite(text); ++ int quote = 0; ++ ++ if (*s == '\'' || *s == '"') ++ { ++ /* can be 'key': or "key": */ ++ quote = *s; ++ ++s; ++ } ++ if (!vim_isIDc(*s)) /* need at least one ID character */ ++ return FALSE; ++ ++ while (vim_isIDc(*s)) ++ ++s; ++ if (*s == quote) ++ ++s; ++ ++ s = cin_skipcomment(s); ++ ++ /* "::" is not a label, it's C++ */ ++ return (*s == ':' && s[1] != ':'); ++ } ++ ++ /* + * Check if string matches "label:"; move to character after ':' if true. ++ * "*s" must point to the start of the label, if there is one. + */ + static int + cin_islabel_skip(s) +*************** +*** 6621,6632 **** + find_match_paren(ind_maxparen) /* XXX */ + int ind_maxparen; + { + pos_T cursor_save; + pos_T *trypos; + static pos_T pos_copy; + + cursor_save = curwin->w_cursor; +! if ((trypos = findmatchlimit(NULL, '(', 0, ind_maxparen)) != NULL) + { + /* check if the ( is in a // comment */ + if ((colnr_T)cin_skip2pos(trypos) > trypos->col) +--- 6654,6673 ---- + find_match_paren(ind_maxparen) /* XXX */ + int ind_maxparen; + { ++ return find_match_char('(', ind_maxparen); ++ } ++ ++ static pos_T * ++ find_match_char(c, ind_maxparen) /* XXX */ ++ int c; ++ int ind_maxparen; ++ { + pos_T cursor_save; + pos_T *trypos; + static pos_T pos_copy; + + cursor_save = curwin->w_cursor; +! if ((trypos = findmatchlimit(NULL, c, 0, ind_maxparen)) != NULL) + { + /* check if the ( is in a // comment */ + if ((colnr_T)cin_skip2pos(trypos) > trypos->col) +*************** +*** 6976,6981 **** +--- 7017,7024 ---- + #define LOOKFOR_NOBREAK 8 + #define LOOKFOR_CPP_BASECLASS 9 + #define LOOKFOR_ENUM_OR_INIT 10 ++ #define LOOKFOR_JS_KEY 11 ++ #define LOOKFOR_NO_COMMA 12 + + int whilelevel; + linenr_T lnum; +*************** +*** 6986,6991 **** +--- 7029,7035 ---- + int cont_amount = 0; /* amount for continuation line */ + int original_line_islabel; + int added_to_amount = 0; ++ int js_cur_has_key = 0; + + /* make a copy, value is changed below */ + int ind_continuation = curbuf->b_ind_continuation; +*************** +*** 7209,7214 **** +--- 7253,7268 ---- + } + + /* ++ * Are we looking at a ']' that has a match? ++ */ ++ else if (*skipwhite(theline) == ']' ++ && (trypos = find_match_char('[', curbuf->b_ind_maxparen)) != NULL) ++ { ++ /* align with the line containing the '['. */ ++ amount = get_indent_lnum(trypos->lnum); ++ } ++ ++ /* + * Are we inside parentheses or braces? + */ /* XXX */ + else if (((trypos = find_match_paren(curbuf->b_ind_maxparen)) != NULL +*************** +*** 7473,7486 **** + if (cin_iscomment(theline)) + amount += curbuf->b_ind_comment; + } +- +- /* +- * Are we at least inside braces, then? +- */ + else + { + trypos = tryposBrace; +- + ourscope = trypos->lnum; + start = ml_get(ourscope); + +--- 7527,7539 ---- + if (cin_iscomment(theline)) + amount += curbuf->b_ind_comment; + } + else + { ++ /* ++ * We are inside braces, there is a { before this line at the position ++ * stored in tryposBrace. ++ */ + trypos = tryposBrace; + ourscope = trypos->lnum; + start = ml_get(ourscope); + +*************** +*** 7502,7525 **** + } + else + { +! /* +! * that opening brace might have been on a continuation +! * line. if so, find the start of the line. +! */ + curwin->w_cursor.lnum = ourscope; + +! /* +! * position the cursor over the rightmost paren, so that +! * matching it will take us back to the start of the line. +! */ + lnum = ourscope; + if (find_last_paren(start, '(', ')') + && (trypos = find_match_paren(curbuf->b_ind_maxparen)) + != NULL) + lnum = trypos->lnum; + +! /* +! * It could have been something like + * case 1: if (asdf && + * ldfd) { + * } +--- 7555,7573 ---- + } + else + { +! /* That opening brace might have been on a continuation +! * line. if so, find the start of the line. */ + curwin->w_cursor.lnum = ourscope; + +! /* Position the cursor over the rightmost paren, so that +! * matching it will take us back to the start of the line. */ + lnum = ourscope; + if (find_last_paren(start, '(', ')') + && (trypos = find_match_paren(curbuf->b_ind_maxparen)) + != NULL) + lnum = trypos->lnum; + +! /* It could have been something like + * case 1: if (asdf && + * ldfd) { + * } +*************** +*** 7535,7542 **** + start_brace = BRACE_AT_END; + } + + /* +! * if we're looking at a closing brace, that's where + * we want to be. otherwise, add the amount of room + * that an indent is supposed to be. + */ +--- 7583,7594 ---- + start_brace = BRACE_AT_END; + } + ++ /* For Javascript check if the line starts with "key:". */ ++ if (curbuf->b_ind_js) ++ js_cur_has_key = cin_has_js_key(theline); ++ + /* +! * If we're looking at a closing brace, that's where + * we want to be. otherwise, add the amount of room + * that an indent is supposed to be. + */ +*************** +*** 7643,7649 **** + * Search backwards. If we find something we recognize, line up + * with that. + * +! * if we're looking at an open brace, indent + * the usual amount relative to the conditional + * that opens the block. + */ +--- 7695,7701 ---- + * Search backwards. If we find something we recognize, line up + * with that. + * +! * If we're looking at an open brace, indent + * the usual amount relative to the conditional + * that opens the block. + */ +*************** +*** 8051,8056 **** +--- 8103,8143 ---- + */ + terminated = cin_isterminated(l, FALSE, TRUE); + ++ if (js_cur_has_key) ++ { ++ js_cur_has_key = 0; /* only check the first line */ ++ if (curbuf->b_ind_js && terminated == ',') ++ { ++ /* For Javascript we might be inside an object: ++ * key: something, <- align with this ++ * key: something ++ * or: ++ * key: something + <- align with this ++ * something, ++ * key: something ++ */ ++ lookfor = LOOKFOR_JS_KEY; ++ } ++ } ++ if (lookfor == LOOKFOR_JS_KEY && cin_has_js_key(l)) ++ { ++ amount = get_indent(); ++ break; ++ } ++ if (lookfor == LOOKFOR_NO_COMMA) ++ { ++ if (terminated != ',') ++ /* line below current line is the one that starts a ++ * (possibly broken) line ending in a comma. */ ++ break; ++ amount = get_indent(); ++ if (curwin->w_cursor.lnum - 1 == ourscope) ++ /* line above is start of the scope, thus current line ++ * is the one that stars a (possibly broken) line ++ * ending in a comma. */ ++ break; ++ } ++ + if (terminated == 0 || (lookfor != LOOKFOR_UNTERM + && terminated == ',')) + { +*************** +*** 8062,8072 **** + * bar ) + */ + /* +! * position the cursor over the rightmost paren, so that + * 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 +--- 8149,8164 ---- + * bar ) + */ + /* +! * Position the cursor over the rightmost paren, so that + * matching it will take us back to the start of the line. ++ * Ignore a match before the start of the block. + */ + (void)find_last_paren(l, '(', ')'); + trypos = find_match_paren(corr_ind_maxparen(&cur_curpos)); ++ if (trypos != NULL && (trypos->lnum < tryposBrace->lnum ++ || (trypos->lnum == tryposBrace->lnum ++ && trypos->col < tryposBrace->col))) ++ trypos = NULL; + + /* + * If we are looking for ',', we also look for matching +*************** +*** 8117,8126 **** + * 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); +! else + cur_amount = get_indent(); + /* + * If this is just above the line we are indenting, and it + * starts with a '{', line it up with this line. +--- 8209,8218 ---- + * Get indent and pointer to text for current line, + * ignoring any jump label. XXX + */ +! if (curbuf->b_ind_js) + cur_amount = get_indent(); ++ else ++ cur_amount = skip_label(curwin->w_cursor.lnum, &l); + /* + * If this is just above the line we are indenting, and it + * starts with a '{', line it up with this line. +*************** +*** 8142,8148 **** + 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 */ +--- 8234,8240 ---- + if (*skipwhite(l) != '{') + amount += curbuf->b_ind_open_extra; + +! if (curbuf->b_ind_cpp_baseclass && !curbuf->b_ind_js) + { + /* have to look back, whether it is a cpp base + * class declaration or initialization */ +*************** +*** 8302,8309 **** + */ + if (lookfor == LOOKFOR_INITIAL && terminated == ',') + { +! lookfor = LOOKFOR_ENUM_OR_INIT; +! cont_amount = cin_first_id_amount(); + } + else + { +--- 8394,8434 ---- + */ + if (lookfor == LOOKFOR_INITIAL && terminated == ',') + { +! if (curbuf->b_ind_js) +! { +! /* Search for a line ending in a comma +! * and line up with the line below it +! * (could be the current line). +! * some = [ +! * 1, <- line up here +! * 2, +! * some = [ +! * 3 + <- line up here +! * 4 * +! * 5, +! * 6, +! */ +! lookfor = LOOKFOR_NO_COMMA; +! amount = get_indent(); /* XXX */ +! trypos = find_match_char('[', +! curbuf->b_ind_maxparen); +! if (trypos != NULL) +! { +! if (trypos->lnum +! == curwin->w_cursor.lnum - 1) +! { +! /* Current line is first inside +! * [], line up with it. */ +! break; +! } +! ourscope = trypos->lnum; +! } +! } +! else +! { +! lookfor = LOOKFOR_ENUM_OR_INIT; +! cont_amount = cin_first_id_amount(); +! } + } + else + { +*************** +*** 8313,8319 **** + /* XXX */ + cont_amount = cin_get_equal_amount( + curwin->w_cursor.lnum); +! if (lookfor != LOOKFOR_TERM) + lookfor = LOOKFOR_UNTERM; + } + } +--- 8438,8445 ---- + /* XXX */ + cont_amount = cin_get_equal_amount( + curwin->w_cursor.lnum); +! if (lookfor != LOOKFOR_TERM +! && lookfor != LOOKFOR_JS_KEY) + lookfor = LOOKFOR_UNTERM; + } + } +*************** +*** 8324,8331 **** + * Check if we are after a while (cond); + * If so: Ignore until the matching "do". + */ +! /* XXX */ +! else if (cin_iswhileofdo_end(terminated)) + { + /* + * Found an unterminated line after a while ();, line up +--- 8450,8456 ---- + * Check if we are after a while (cond); + * If so: Ignore until the matching "do". + */ +! else if (cin_iswhileofdo_end(terminated)) /* XXX */ + { + /* + * Found an unterminated line after a while ();, line up +*************** +*** 8538,8555 **** + if (curbuf->b_ind_jump_label > 0 && original_line_islabel) + amount -= curbuf->b_ind_jump_label; + } +- +- /* +- * ok -- we're not inside any sort of structure at all! +- * +- * this means we're at the top level, and everything should +- * basically just match where the previous line is, except +- * for the lines immediately following a function declaration, +- * which are K&R-style parameters and need to be indented. +- */ + else + { + /* + * if our line starts with an open brace, forget about any + * prevailing indent and make sure it looks like the start + * of a function +--- 8663,8678 ---- + if (curbuf->b_ind_jump_label > 0 && original_line_islabel) + amount -= curbuf->b_ind_jump_label; + } + else + { + /* ++ * ok -- we're not inside any sort of structure at all! ++ * ++ * This means we're at the top level, and everything should ++ * basically just match where the previous line is, except ++ * for the lines immediately following a function declaration, ++ * which are K&R-style parameters and need to be indented. ++ * + * if our line starts with an open brace, forget about any + * prevailing indent and make sure it looks like the start + * of a function +*************** +*** 8700,8705 **** +--- 8823,8840 ---- + break; + + /* ++ * If the previous line ends on '[' we are probably in an ++ * array constant: ++ * something = [ ++ * 234, <- extra indent ++ */ ++ if (cin_ends_in(l, (char_u *)"[", NULL)) ++ { ++ amount = get_indent() + ind_continuation; ++ break; ++ } ++ ++ /* + * Find a line only has a semicolon that belongs to a previous + * line ending in '}', e.g. before an #endif. Don't increase + * indent then. +*** ../vim-7.4.354/src/testdir/test3.in 2014-07-02 18:27:44.662290695 +0200 +--- src/testdir/test3.in 2014-07-03 22:41:38.743848025 +0200 +*************** +*** 1432,1438 **** + + STARTTEST + :set cino=(0,ts +! 2kdd=][ + ENDTEST + + void func(int a +--- 1432,1438 ---- + + STARTTEST + :set cino=(0,ts +! 2kdd2j=][ + ENDTEST + + void func(int a +*************** +*** 1446,1452 **** + + STARTTEST + :set cino=(0 +! 2kdd=][ + ENDTEST + + void +--- 1446,1452 ---- + + STARTTEST + :set cino=(0 +! 2kdd2j=][ + ENDTEST + + void +*************** +*** 1461,1467 **** + + STARTTEST + :set cino& +! 2kdd=7][ + ENDTEST + + void func(void) +--- 1461,1467 ---- + + STARTTEST + :set cino& +! 2kdd2j=7][ + ENDTEST + + void func(void) +*************** +*** 1538,1544 **** + STARTTEST + :set cino& + :set cino+=l1 +! 2kdd=][ + ENDTEST + + void func(void) +--- 1538,1544 ---- + STARTTEST + :set cino& + :set cino+=l1 +! 2kdd2j=][ + ENDTEST + + void func(void) +*************** +*** 1567,1573 **** + + STARTTEST + :set cino& +! 2kdd=][ + ENDTEST + + void func(void) +--- 1567,1573 ---- + + STARTTEST + :set cino& +! 2kdd2j=][ + ENDTEST + + void func(void) +*************** +*** 1592,1598 **** + + STARTTEST + :set cino& +! 2kdd=][ + ENDTEST + + void func(void) +--- 1592,1598 ---- + + STARTTEST + :set cino& +! 2kdd2j=][ + ENDTEST + + void func(void) +*************** +*** 1919,1928 **** + + JSSTART + var foo = [ +! 1, // indent 8 more + 2, + 3 +! ]; // indent 8 less + JSEND + + STARTTEST +--- 1919,1928 ---- + + JSSTART + var foo = [ +! 1, + 2, + 3 +! ]; + JSEND + + STARTTEST +*************** +*** 1937,1943 **** + 1, + 2, + 3 +! ]; // indent 16 less + } + JSEND + +--- 1937,1943 ---- + 1, + 2, + 3 +! ]; + } + JSEND + +*************** +*** 1954,1959 **** +--- 1954,1961 ---- + cond) { + stmt; + } ++ window.something.left = ++ (width - 50 + offset) + "px"; + var class_name='myclass'; + + function private_method() { +*************** +*** 1969,1983 **** + + $(this).data(class_name+'_public',$.extend({},{ + foo: 'bar', +! bar: 2, // indent 8 more +! foobar: [ // indent 8 more +! 1, // indent 8 more +! 2, // indent 16 more +! 3 // indent 16 more + ], +! callback: function(){ // indent 8 more +! return true; // indent 8 more +! } // indent 8 more + }, options||{})); + } + +--- 1971,1985 ---- + + $(this).data(class_name+'_public',$.extend({},{ + foo: 'bar', +! bar: 2, +! foobar: [ +! 1, +! 2, +! 3 + ], +! callback: function(){ +! return true; +! } + }, options||{})); + } + +*************** +*** 2018,2026 **** + foo: 'bar', + bar: 2, + foobar: [ +! 1, // indent 8 more +! 2, // indent 8 more +! 3 // indent 8 more + ], + callback: function(){ + return true; +--- 2020,2028 ---- + foo: 'bar', + bar: 2, + foobar: [ +! 1, +! 2, +! 3 + ], + callback: function(){ + return true; +*************** +*** 2040,2054 **** + function init(options) { + $(this).data(class_name+'_public',$.extend({},{ + foo: 'bar', +! bar: 2, // indent 8 more +! foobar: [ // indent 8 more +! 1, // indent 8 more +! 2, // indent 16 more +! 3 // indent 16 more + ], +! callback: function(){ // indent 8 more +! return true; // indent 8 more +! } // indent 8 more + }, options||{})); + } + })(jQuery); +--- 2042,2056 ---- + function init(options) { + $(this).data(class_name+'_public',$.extend({},{ + foo: 'bar', +! bar: 2, +! foobar: [ +! 1, +! 2, +! 3 + ], +! callback: function(){ +! return true; +! } + }, options||{})); + } + })(jQuery); +*** ../vim-7.4.354/src/testdir/test3.ok 2014-07-02 18:27:44.662290695 +0200 +--- src/testdir/test3.ok 2014-07-03 22:18:58.167827177 +0200 +*************** +*** 1707,1716 **** + + JSSTART + var foo = [ +! 1, // indent 8 more + 2, + 3 +! ]; // indent 8 less + JSEND + + +--- 1707,1716 ---- + + JSSTART + var foo = [ +! 1, + 2, + 3 +! ]; + JSEND + + +*************** +*** 1720,1726 **** + 1, + 2, + 3 +! ]; // indent 16 less + } + JSEND + +--- 1720,1726 ---- + 1, + 2, + 3 +! ]; + } + JSEND + +*************** +*** 1732,1737 **** +--- 1732,1739 ---- + cond) { + stmt; + } ++ window.something.left = ++ (width - 50 + offset) + "px"; + var class_name='myclass'; + + function private_method() { +*************** +*** 1747,1761 **** + + $(this).data(class_name+'_public',$.extend({},{ + foo: 'bar', +! bar: 2, // indent 8 more +! foobar: [ // indent 8 more +! 1, // indent 8 more +! 2, // indent 16 more +! 3 // indent 16 more + ], +! callback: function(){ // indent 8 more +! return true; // indent 8 more +! } // indent 8 more + }, options||{})); + } + +--- 1749,1763 ---- + + $(this).data(class_name+'_public',$.extend({},{ + foo: 'bar', +! bar: 2, +! foobar: [ +! 1, +! 2, +! 3 + ], +! callback: function(){ +! return true; +! } + }, options||{})); + } + +*************** +*** 1791,1799 **** + foo: 'bar', + bar: 2, + foobar: [ +! 1, // indent 8 more +! 2, // indent 8 more +! 3 // indent 8 more + ], + callback: function(){ + return true; +--- 1793,1801 ---- + foo: 'bar', + bar: 2, + foobar: [ +! 1, +! 2, +! 3 + ], + callback: function(){ + return true; +*************** +*** 1808,1822 **** + function init(options) { + $(this).data(class_name+'_public',$.extend({},{ + foo: 'bar', +! bar: 2, // indent 8 more +! foobar: [ // indent 8 more +! 1, // indent 8 more +! 2, // indent 16 more +! 3 // indent 16 more + ], +! callback: function(){ // indent 8 more +! return true; // indent 8 more +! } // indent 8 more + }, options||{})); + } + })(jQuery); +--- 1810,1824 ---- + function init(options) { + $(this).data(class_name+'_public',$.extend({},{ + foo: 'bar', +! bar: 2, +! foobar: [ +! 1, +! 2, +! 3 + ], +! callback: function(){ +! return true; +! } + }, options||{})); + } + })(jQuery); +*** ../vim-7.4.354/src/version.c 2014-07-03 22:54:04.911859458 +0200 +--- src/version.c 2014-07-03 22:54:40.971860011 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 355, + /**/ + +-- +MESKIMEN'S LAW + There's never time to do it right, but always time to do it over. + + /// 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/patches/source/vim/patches/7.4.356 b/patches/source/vim/patches/7.4.356 new file mode 100644 index 000000000..58af03830 --- /dev/null +++ b/patches/source/vim/patches/7.4.356 @@ -0,0 +1,38 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.356 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.356 +Problem: Mercurial does not ignore memfile_test. (Daniel Hahler) +Solution: Add memfile_test to ignored files, remove trailing spaces. +Files: .hgignore + + +Note: This patch was made empty, because .hgignore is not part of the +distributed files. + + +*** ../vim-7.4.355/src/version.c 2014-07-03 22:57:51.299862927 +0200 +--- src/version.c 2014-07-09 13:41:39.855060005 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 356, + /**/ + +-- +In Africa some of the native tribes have a custom of beating the ground +with clubs and uttering spine chilling cries. Anthropologists call +this a form of primitive self-expression. In America we call it golf. + + /// 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/patches/source/vim/patches/7.4.357 b/patches/source/vim/patches/7.4.357 new file mode 100644 index 000000000..e1d638f6c --- /dev/null +++ b/patches/source/vim/patches/7.4.357 @@ -0,0 +1,52 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.357 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.357 +Problem: After completion some characters are not redrawn. +Solution: Clear the command line unconditionally. (Jacob Niehus) +Files: src/edit.c + + +*** ../vim-7.4.356/src/edit.c 2014-06-25 14:39:35.102348584 +0200 +--- src/edit.c 2014-07-09 13:22:22.747075922 +0200 +*************** +*** 3854,3861 **** + ins_compl_free(); + compl_started = FALSE; + compl_matches = 0; +! if (!shortmess(SHM_COMPLETIONMENU)) +! msg_clr_cmdline(); /* necessary for "noshowmode" */ + ctrl_x_mode = 0; + compl_enter_selects = FALSE; + if (edit_submode != NULL) +--- 3854,3860 ---- + ins_compl_free(); + compl_started = FALSE; + compl_matches = 0; +! msg_clr_cmdline(); /* necessary for "noshowmode" */ + ctrl_x_mode = 0; + compl_enter_selects = FALSE; + if (edit_submode != NULL) +*** ../vim-7.4.356/src/version.c 2014-07-09 13:43:18.399058649 +0200 +--- src/version.c 2014-07-09 13:58:35.483046034 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 357, + /**/ + +-- +Why isn't there mouse-flavored cat food? + + /// 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/patches/source/vim/patches/7.4.358 b/patches/source/vim/patches/7.4.358 new file mode 100644 index 000000000..a36803dd8 --- /dev/null +++ b/patches/source/vim/patches/7.4.358 @@ -0,0 +1,290 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.358 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.358 (after 7.4.351) +Problem: Sort is not always stable. +Solution: Add an index instead of relying on the pointer to remain the same. + Idea by Jun Takimoto. +Files: src/eval.c + + +*** ../vim-7.4.357/src/eval.c 2014-07-02 19:06:14.686326091 +0200 +--- src/eval.c 2014-07-09 17:42:05.699813489 +0200 +*************** +*** 17329,17334 **** +--- 17329,17341 ---- + #endif + item_compare2 __ARGS((const void *s1, const void *s2)); + ++ /* struct used in the array that's given to qsort() */ ++ typedef struct ++ { ++ listitem_T *item; ++ int idx; ++ } sortItem_T; ++ + static int item_compare_ic; + static int item_compare_numeric; + static char_u *item_compare_func; +*************** +*** 17349,17362 **** + const void *s1; + const void *s2; + { + char_u *p1, *p2; + char_u *tofree1, *tofree2; + int res; + char_u numbuf1[NUMBUFLEN]; + char_u numbuf2[NUMBUFLEN]; + +! p1 = tv2string(&(*(listitem_T **)s1)->li_tv, &tofree1, numbuf1, 0); +! p2 = tv2string(&(*(listitem_T **)s2)->li_tv, &tofree2, numbuf2, 0); + if (p1 == NULL) + p1 = (char_u *)""; + if (p2 == NULL) +--- 17356,17372 ---- + const void *s1; + const void *s2; + { ++ sortItem_T *si1, *si2; + char_u *p1, *p2; + char_u *tofree1, *tofree2; + int res; + char_u numbuf1[NUMBUFLEN]; + char_u numbuf2[NUMBUFLEN]; + +! si1 = (sortItem_T *)s1; +! si2 = (sortItem_T *)s2; +! p1 = tv2string(&si1->item->li_tv, &tofree1, numbuf1, 0); +! p2 = tv2string(&si2->item->li_tv, &tofree2, numbuf2, 0); + if (p1 == NULL) + p1 = (char_u *)""; + if (p2 == NULL) +*************** +*** 17379,17385 **** + /* When the result would be zero, compare the pointers themselves. Makes + * the sort stable. */ + if (res == 0 && !item_compare_keep_zero) +! res = s1 > s2 ? 1 : -1; + + vim_free(tofree1); + vim_free(tofree2); +--- 17389,17395 ---- + /* When the result would be zero, compare the pointers themselves. Makes + * the sort stable. */ + if (res == 0 && !item_compare_keep_zero) +! res = si1->idx > si2->idx ? 1 : -1; + + vim_free(tofree1); + vim_free(tofree2); +*************** +*** 17394,17399 **** +--- 17404,17410 ---- + const void *s1; + const void *s2; + { ++ sortItem_T *si1, *si2; + int res; + typval_T rettv; + typval_T argv[3]; +*************** +*** 17403,17412 **** + if (item_compare_func_err) + return 0; + + /* Copy the values. This is needed to be able to set v_lock to VAR_FIXED + * in the copy without changing the original list items. */ +! copy_tv(&(*(listitem_T **)s1)->li_tv, &argv[0]); +! copy_tv(&(*(listitem_T **)s2)->li_tv, &argv[1]); + + rettv.v_type = VAR_UNKNOWN; /* clear_tv() uses this */ + res = call_func(item_compare_func, (int)STRLEN(item_compare_func), +--- 17414,17426 ---- + if (item_compare_func_err) + return 0; + ++ si1 = (sortItem_T *)s1; ++ si2 = (sortItem_T *)s2; ++ + /* Copy the values. This is needed to be able to set v_lock to VAR_FIXED + * in the copy without changing the original list items. */ +! copy_tv(&si1->item->li_tv, &argv[0]); +! copy_tv(&si2->item->li_tv, &argv[1]); + + rettv.v_type = VAR_UNKNOWN; /* clear_tv() uses this */ + res = call_func(item_compare_func, (int)STRLEN(item_compare_func), +*************** +*** 17426,17432 **** + /* When the result would be zero, compare the pointers themselves. Makes + * the sort stable. */ + if (res == 0 && !item_compare_keep_zero) +! res = s1 > s2 ? 1 : -1; + + return res; + } +--- 17440,17446 ---- + /* When the result would be zero, compare the pointers themselves. Makes + * the sort stable. */ + if (res == 0 && !item_compare_keep_zero) +! res = si1->idx > si2->idx ? 1 : -1; + + return res; + } +*************** +*** 17442,17448 **** + { + list_T *l; + listitem_T *li; +! listitem_T **ptrs; + long len; + long i; + +--- 17456,17462 ---- + { + list_T *l; + listitem_T *li; +! sortItem_T *ptrs; + long len; + long i; + +*************** +*** 17510,17516 **** + } + + /* Make an array with each entry pointing to an item in the List. */ +! ptrs = (listitem_T **)alloc((int)(len * sizeof(listitem_T *))); + if (ptrs == NULL) + return; + +--- 17524,17530 ---- + } + + /* Make an array with each entry pointing to an item in the List. */ +! ptrs = (sortItem_T *)alloc((int)(len * sizeof(sortItem_T))); + if (ptrs == NULL) + return; + +*************** +*** 17519,17525 **** + { + /* sort(): ptrs will be the list to sort */ + for (li = l->lv_first; li != NULL; li = li->li_next) +! ptrs[i++] = li; + + item_compare_func_err = FALSE; + item_compare_keep_zero = FALSE; +--- 17533,17543 ---- + { + /* sort(): ptrs will be the list to sort */ + for (li = l->lv_first; li != NULL; li = li->li_next) +! { +! ptrs[i].item = li; +! ptrs[i].idx = i; +! ++i; +! } + + item_compare_func_err = FALSE; + item_compare_keep_zero = FALSE; +*************** +*** 17531,17537 **** + else + { + /* Sort the array with item pointers. */ +! qsort((void *)ptrs, (size_t)len, sizeof(listitem_T *), + item_compare_func == NULL ? item_compare : item_compare2); + + if (!item_compare_func_err) +--- 17549,17555 ---- + else + { + /* Sort the array with item pointers. */ +! qsort((void *)ptrs, (size_t)len, sizeof(sortItem_T), + item_compare_func == NULL ? item_compare : item_compare2); + + if (!item_compare_func_err) +*************** +*** 17540,17546 **** + l->lv_first = l->lv_last = l->lv_idx_item = NULL; + l->lv_len = 0; + for (i = 0; i < len; ++i) +! list_append(l, ptrs[i]); + } + } + } +--- 17558,17564 ---- + l->lv_first = l->lv_last = l->lv_idx_item = NULL; + l->lv_len = 0; + for (i = 0; i < len; ++i) +! list_append(l, ptrs[i].item); + } + } + } +*************** +*** 17559,17565 **** + { + if (item_compare_func_ptr((void *)&li, (void *)&li->li_next) + == 0) +! ptrs[i++] = li; + if (item_compare_func_err) + { + EMSG(_("E882: Uniq compare function failed")); +--- 17577,17583 ---- + { + if (item_compare_func_ptr((void *)&li, (void *)&li->li_next) + == 0) +! ptrs[i++].item = li; + if (item_compare_func_err) + { + EMSG(_("E882: Uniq compare function failed")); +*************** +*** 17571,17582 **** + { + while (--i >= 0) + { +! li = ptrs[i]->li_next; +! ptrs[i]->li_next = li->li_next; + if (li->li_next != NULL) +! li->li_next->li_prev = ptrs[i]; + else +! l->lv_last = ptrs[i]; + list_fix_watch(l, li); + listitem_free(li); + l->lv_len--; +--- 17589,17600 ---- + { + while (--i >= 0) + { +! li = ptrs[i].item->li_next; +! ptrs[i].item->li_next = li->li_next; + if (li->li_next != NULL) +! li->li_next->li_prev = ptrs[i].item; + else +! l->lv_last = ptrs[i].item; + list_fix_watch(l, li); + listitem_free(li); + l->lv_len--; +*** ../vim-7.4.357/src/version.c 2014-07-09 14:00:45.175044250 +0200 +--- src/version.c 2014-07-09 17:23:12.791836515 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 358, + /**/ + +-- +An indication you must be a manager: +You can explain to somebody the difference between "re-engineering", +"down-sizing", "right-sizing", and "firing people's asses". + + /// 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/patches/source/vim/patches/7.4.359 b/patches/source/vim/patches/7.4.359 new file mode 100644 index 000000000..ab695d57f --- /dev/null +++ b/patches/source/vim/patches/7.4.359 @@ -0,0 +1,103 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.359 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.359 +Problem: When 'ttymouse' is set to 'uxterm' the xterm version is not + requested. (Tomas Janousek) +Solution: Do not mark uxterm as a conflict mouse and add + resume_get_esc_sequence(). +Files: src/term.c, src/os_unix.c, src/proto/term.pro + + +*** ../vim-7.4.358/src/term.c 2014-05-22 21:22:15.361995652 +0200 +--- src/term.c 2014-07-09 18:49:57.127730739 +0200 +*************** +*** 3330,3335 **** +--- 3330,3348 ---- + return crv_status == CRV_SENT || u7_status == U7_SENT + || xt_index_out > xt_index_in; + } ++ ++ /* ++ * If requesting the version was disabled in did_request_esc_sequence(), ++ * enable it again. ++ */ ++ void ++ resume_get_esc_sequence() ++ { ++ if (crv_status == 0) ++ crv_status = CRV_GET; ++ if (u7_status == 0) ++ u7_status = U7_GET; ++ } + # endif + + +*** ../vim-7.4.358/src/os_unix.c 2014-05-22 21:22:15.361995652 +0200 +--- src/os_unix.c 2014-07-09 18:56:58.483722175 +0200 +*************** +*** 3780,3788 **** + # ifdef FEAT_MOUSE_URXVT + /* same as the dec mouse */ + if (use_xterm_mouse() == 3 +- # ifdef FEAT_TERMRESPONSE +- && !did_request_esc_sequence() +- # endif + # ifdef FEAT_GUI + && !gui.in_use + # endif +--- 3780,3785 ---- +*************** +*** 3797,3803 **** + mch_setmouse(FALSE); + setmouse(); + } +! xterm_conflict_mouse = TRUE; + } + else + del_mouse_termcode(KS_URXVT_MOUSE); +--- 3794,3801 ---- + mch_setmouse(FALSE); + setmouse(); + } +! /* It's OK to request the xterm version for uxterm. */ +! resume_get_esc_sequence(); + } + else + del_mouse_termcode(KS_URXVT_MOUSE); +*** ../vim-7.4.358/src/proto/term.pro 2014-05-22 18:14:27.570224664 +0200 +--- src/proto/term.pro 2014-07-09 18:53:31.827726375 +0200 +*************** +*** 35,40 **** +--- 35,41 ---- + void starttermcap __ARGS((void)); + void stoptermcap __ARGS((void)); + int did_request_esc_sequence __ARGS((void)); ++ void resume_get_esc_sequence __ARGS((void)); + void may_req_termresponse __ARGS((void)); + void may_req_ambiguous_char_width __ARGS((void)); + int swapping_screen __ARGS((void)); +*** ../vim-7.4.358/src/version.c 2014-07-09 17:51:46.075801693 +0200 +--- src/version.c 2014-07-09 18:50:55.515729552 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 359, + /**/ + +-- +An indication you must be a manager: +You give constructive feedback to your dog. + + /// 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/patches/source/vim/patches/7.4.360 b/patches/source/vim/patches/7.4.360 new file mode 100644 index 000000000..9bd5212f0 --- /dev/null +++ b/patches/source/vim/patches/7.4.360 @@ -0,0 +1,80 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.360 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.360 +Problem: In a regexp pattern a "$" followed by \v or \V is not seen as the + end-of-line. +Solution: Handle the situation. (Ozaki Kiichi) +Files: src/regexp.c + + +*** ../vim-7.4.359/src/regexp.c 2014-05-13 19:37:19.489786520 +0200 +--- src/regexp.c 2014-07-09 19:28:51.871683287 +0200 +*************** +*** 3109,3123 **** + if (reg_magic >= MAGIC_OFF) + { + char_u *p = regparse + 1; + +! /* ignore \c \C \m and \M after '$' */ + while (p[0] == '\\' && (p[1] == 'c' || p[1] == 'C' +! || p[1] == 'm' || p[1] == 'M' || p[1] == 'Z')) + p += 2; + if (p[0] == NUL + || (p[0] == '\\' + && (p[1] == '|' || p[1] == '&' || p[1] == ')' + || p[1] == 'n')) + || reg_magic == MAGIC_ALL) + curchr = Magic('$'); + } +--- 3109,3133 ---- + if (reg_magic >= MAGIC_OFF) + { + char_u *p = regparse + 1; ++ int is_magic_all = (reg_magic == MAGIC_ALL); + +! /* ignore \c \C \m \M \v \V and \Z after '$' */ + while (p[0] == '\\' && (p[1] == 'c' || p[1] == 'C' +! || p[1] == 'm' || p[1] == 'M' +! || p[1] == 'v' || p[1] == 'V' || p[1] == 'Z')) +! { +! if (p[1] == 'v') +! is_magic_all = TRUE; +! else if (p[1] == 'm' || p[1] == 'M' || p[1] == 'V') +! is_magic_all = FALSE; + p += 2; ++ } + if (p[0] == NUL + || (p[0] == '\\' + && (p[1] == '|' || p[1] == '&' || p[1] == ')' + || p[1] == 'n')) ++ || (is_magic_all ++ && (p[0] == '|' || p[0] == '&' || p[0] == ')')) + || reg_magic == MAGIC_ALL) + curchr = Magic('$'); + } +*** ../vim-7.4.359/src/version.c 2014-07-09 19:13:45.007701718 +0200 +--- src/version.c 2014-07-09 19:18:36.599695792 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 360, + /**/ + +-- +An indication you must be a manager: +You believe you never have any problems in your life, just +"issues" and "improvement opportunities". + + /// 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/patches/source/vim/patches/7.4.361 b/patches/source/vim/patches/7.4.361 new file mode 100644 index 000000000..7629b1208 --- /dev/null +++ b/patches/source/vim/patches/7.4.361 @@ -0,0 +1,48 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.361 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.361 +Problem: Lots of flickering when filling the preview window for 'omnifunc'. +Solution: Disable redrawing. (Hirohito Higashi) +Files: src/popupmnu.c + + +*** ../vim-7.4.360/src/popupmnu.c 2013-11-06 04:04:29.000000000 +0100 +--- src/popupmnu.c 2014-07-09 19:56:25.663649674 +0200 +*************** +*** 567,573 **** +--- 567,575 ---- + g_do_tagpreview = 3; + if (p_pvh > 0 && p_pvh < g_do_tagpreview) + g_do_tagpreview = p_pvh; ++ ++RedrawingDisabled; + resized = prepare_tagpreview(FALSE); ++ --RedrawingDisabled; + g_do_tagpreview = 0; + + if (curwin->w_p_pvw) +*** ../vim-7.4.360/src/version.c 2014-07-09 19:32:30.939678834 +0200 +--- src/version.c 2014-07-09 19:55:48.995650419 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 361, + /**/ + +-- +Lose weight, NEVER Diet again with + The "Invisible Weight Loss Patch" + (spam 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/patches/source/vim/patches/7.4.362 b/patches/source/vim/patches/7.4.362 new file mode 100644 index 000000000..beeb6ddcf --- /dev/null +++ b/patches/source/vim/patches/7.4.362 @@ -0,0 +1,53 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.362 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.362 +Problem: When matchaddpos() uses a length smaller than the number of bytes + in the (last) character the highlight continues until the end of + the line. +Solution: Change condition from equal to larger-or-equal. +Files: src/screen.c + + +*** ../vim-7.4.361/src/screen.c 2014-07-03 22:54:04.911859458 +0200 +--- src/screen.c 2014-07-09 20:14:46.611627298 +0200 +*************** +*** 3852,3858 **** + { + shl->attr_cur = shl->attr; + } +! else if (v == (long)shl->endcol) + { + shl->attr_cur = 0; + next_search_hl(wp, shl, lnum, (colnr_T)v, cur); +--- 3852,3858 ---- + { + shl->attr_cur = shl->attr; + } +! else if (v >= (long)shl->endcol) + { + shl->attr_cur = 0; + next_search_hl(wp, shl, lnum, (colnr_T)v, cur); +*** ../vim-7.4.361/src/version.c 2014-07-09 19:58:21.115647328 +0200 +--- src/version.c 2014-07-09 20:20:14.423620635 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 362, + /**/ + +-- +Compilation process failed successfully. + + /// 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/patches/source/vim/patches/7.4.363 b/patches/source/vim/patches/7.4.363 new file mode 100644 index 000000000..d225cdb97 --- /dev/null +++ b/patches/source/vim/patches/7.4.363 @@ -0,0 +1,160 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.363 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.363 +Problem: In Windows console typing 0xCE does not work. +Solution: Convert 0xCE to K_NUL 3. (Nobuhiro Takasaki et al.) +Files: src/os_win32.c, src/term.c + + +*** ../vim-7.4.362/src/os_win32.c 2014-04-01 21:00:45.436733663 +0200 +--- src/os_win32.c 2014-07-09 20:29:30.787609327 +0200 +*************** +*** 619,625 **** + return FALSE; + } + +! tokenPrivileges.PrivilegeCount = 1; + tokenPrivileges.Privileges[0].Luid = luid; + tokenPrivileges.Privileges[0].Attributes = bEnable ? + SE_PRIVILEGE_ENABLED : 0; +--- 619,625 ---- + return FALSE; + } + +! tokenPrivileges.PrivilegeCount = 1; + tokenPrivileges.Privileges[0].Luid = luid; + tokenPrivileges.Privileges[0].Attributes = bEnable ? + SE_PRIVILEGE_ENABLED : 0; +*************** +*** 1785,1797 **** + #endif + { + int n = 1; + +- /* A key may have one or two bytes. */ + typeahead[typeaheadlen] = c; + if (ch2 != NUL) + { +! typeahead[typeaheadlen + 1] = ch2; +! ++n; + } + #ifdef FEAT_MBYTE + /* Only convert normal characters, not special keys. Need to +--- 1785,1798 ---- + #endif + { + int n = 1; ++ int conv = FALSE; + + typeahead[typeaheadlen] = c; + if (ch2 != NUL) + { +! typeahead[typeaheadlen + 1] = 3; +! typeahead[typeaheadlen + 2] = ch2; +! n += 2; + } + #ifdef FEAT_MBYTE + /* Only convert normal characters, not special keys. Need to +*************** +*** 1800,1805 **** +--- 1801,1807 ---- + if (input_conv.vc_type != CONV_NONE + && (ch2 == NUL || c != K_NUL)) + { ++ conv = TRUE; + typeaheadlen -= unconverted; + n = convert_input_safe(typeahead + typeaheadlen, + n + unconverted, TYPEAHEADLEN - typeaheadlen, +*************** +*** 1807,1812 **** +--- 1809,1832 ---- + } + #endif + ++ if (conv) ++ { ++ char_u *p = typeahead + typeaheadlen; ++ char_u *e = typeahead + TYPEAHEADLEN; ++ ++ while (*p && p < e) ++ { ++ if (*p == K_NUL) ++ { ++ ++p; ++ mch_memmove(p + 1, p, ((size_t)(e - p)) - 1); ++ *p = 3; ++ ++n; ++ } ++ ++p; ++ } ++ } ++ + /* Use the ALT key to set the 8th bit of the character + * when it's one byte, the 8th bit isn't set yet and not + * using a double-byte encoding (would become a lead +*** ../vim-7.4.362/src/term.c 2014-07-09 19:13:45.003701718 +0200 +--- src/term.c 2014-07-09 20:26:28.655613029 +0200 +*************** +*** 3724,3730 **** +--- 3724,3734 ---- + return; + } + ++ #if defined(WIN3264) && !defined(FEAT_GUI) ++ s = vim_strnsave(string, (int)STRLEN(string) + 1); ++ #else + s = vim_strsave(string); ++ #endif + if (s == NULL) + return; + +*************** +*** 3734,3739 **** +--- 3738,3752 ---- + STRMOVE(s, s + 1); + s[0] = term_7to8bit(string); + } ++ ++ #if defined(WIN3264) && !defined(FEAT_GUI) ++ if (s[0] == K_NUL) ++ { ++ STRMOVE(s + 1, s); ++ s[1] = 3; ++ } ++ #endif ++ + len = (int)STRLEN(s); + + need_gather = TRUE; /* need to fill termleader[] */ +*** ../vim-7.4.362/src/version.c 2014-07-09 20:20:40.359620108 +0200 +--- src/version.c 2014-07-09 20:26:38.903612821 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 363, + /**/ + +-- +BROTHER MAYNARD: Armaments Chapter Two Verses Nine to Twenty One. +ANOTHER MONK: And St. Attila raised his hand grenade up on high saying "O + Lord bless this thy hand grenade that with it thou mayest + blow thine enemies to tiny bits, in thy mercy. "and the Lord + did grin and people did feast upon the lambs and sloths and + carp and anchovies and orang-utans and breakfast cereals and + fruit bats and... +BROTHER MAYNARD: Skip a bit brother ... + "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/patches/source/vim/patches/7.4.364 b/patches/source/vim/patches/7.4.364 new file mode 100644 index 000000000..493056c98 --- /dev/null +++ b/patches/source/vim/patches/7.4.364 @@ -0,0 +1,70 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.364 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.364 +Problem: When the viminfo file can't be renamed there is no error message. + (Vladimir Berezhnoy) +Solution: Check for the rename to fail. +Files: src/ex_cmds.c + + +*** ../vim-7.4.363/src/ex_cmds.c 2014-05-22 14:00:12.694534712 +0200 +--- src/ex_cmds.c 2014-07-09 21:11:44.531557830 +0200 +*************** +*** 2004,2014 **** + { + fclose(fp_in); + +! /* +! * In case of an error keep the original viminfo file. +! * Otherwise rename the newly written file. +! */ +! if (viminfo_errcnt || vim_rename(tempname, fname) == -1) + mch_remove(tempname); + + #ifdef WIN3264 +--- 2004,2017 ---- + { + fclose(fp_in); + +! /* In case of an error keep the original viminfo file. Otherwise +! * rename the newly written file. Give an error if that fails. */ +! if (viminfo_errcnt == 0 && vim_rename(tempname, fname) == -1) +! { +! ++viminfo_errcnt; +! EMSG2(_("E886: Can't rename viminfo file to %s!"), fname); +! } +! if (viminfo_errcnt > 0) + mch_remove(tempname); + + #ifdef WIN3264 +*** ../vim-7.4.363/src/version.c 2014-07-09 20:51:04.519583033 +0200 +--- src/version.c 2014-07-09 21:13:18.575555919 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 364, + /**/ + +-- +MONK: ... and the Lord spake, saying, "First shalt thou take out the Holy Pin, + then shalt thou count to three, no more, no less. Three shalt be the + number thou shalt count, and the number of the counting shalt be three. + Four shalt thou not count, neither count thou two, excepting that thou + then proceed to three. Five is right out. Once the number three, being + the third number, be reached, then lobbest thou thy Holy Hand Grenade of + Antioch towards thou foe, who being naughty in my sight, shall snuff it. + "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/patches/source/vim/patches/7.4.365 b/patches/source/vim/patches/7.4.365 new file mode 100644 index 000000000..196e66e39 --- /dev/null +++ b/patches/source/vim/patches/7.4.365 @@ -0,0 +1,159 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.365 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.365 +Problem: Crash when using ":botright split" when there isn't much space. +Solution: Add a check for the minimum width/height. (Yukihiro Nakadaira) +Files: src/window.c + + +*** ../vim-7.4.364/src/window.c 2014-07-02 17:16:51.334225522 +0200 +--- src/window.c 2014-07-16 14:14:37.751774230 +0200 +*************** +*** 686,691 **** +--- 686,693 ---- + int layout; + frame_T *frp, *curfrp; + int before; ++ int minwidth; ++ int minheight; + + if (flags & WSP_TOP) + oldwin = firstwin; +*************** +*** 725,735 **** + needed += p_wiw - p_wmw; + if (p_ea || (flags & (WSP_BOT | WSP_TOP))) + { + available = topframe->fr_width; +! needed += frame_minwidth(topframe, NULL); + } + else + available = oldwin->w_width; + if (available < needed && new_wp == NULL) + { + EMSG(_(e_noroom)); +--- 727,741 ---- + needed += p_wiw - p_wmw; + if (p_ea || (flags & (WSP_BOT | WSP_TOP))) + { ++ minwidth = frame_minwidth(topframe, NULL); + available = topframe->fr_width; +! needed += minwidth; + } + else ++ { ++ minwidth = frame_minwidth(oldwin->w_frame, NULL); + available = oldwin->w_width; ++ } + if (available < needed && new_wp == NULL) + { + EMSG(_(e_noroom)); +*************** +*** 739,744 **** +--- 745,752 ---- + new_size = oldwin->w_width / 2; + if (new_size > oldwin->w_width - p_wmw - 1) + new_size = oldwin->w_width - p_wmw - 1; ++ if (new_size > available - minwidth - 1) ++ new_size = available - minwidth - 1; + if (new_size < p_wmw) + new_size = p_wmw; + +*************** +*** 786,796 **** + needed += p_wh - p_wmh; + if (p_ea || (flags & (WSP_BOT | WSP_TOP))) + { + available = topframe->fr_height; +! needed += frame_minheight(topframe, NULL); + } + else + { + available = oldwin->w_height; + needed += p_wmh; + } +--- 794,806 ---- + needed += p_wh - p_wmh; + if (p_ea || (flags & (WSP_BOT | WSP_TOP))) + { ++ minheight = frame_minheight(topframe, NULL); + available = topframe->fr_height; +! needed += minheight; + } + else + { ++ minheight = frame_minheight(oldwin->w_frame, NULL); + available = oldwin->w_height; + needed += p_wmh; + } +*************** +*** 810,815 **** +--- 820,827 ---- + + if (new_size > oldwin_height - p_wmh - STATUS_HEIGHT) + new_size = oldwin_height - p_wmh - STATUS_HEIGHT; ++ if (new_size > available - minheight - STATUS_HEIGHT) ++ new_size = available - minheight - STATUS_HEIGHT; + if (new_size < p_wmh) + new_size = p_wmh; + +*************** +*** 5732,5738 **** + --wp->w_wrow; + } + } +! set_topline(wp, lnum); + } + else if (sline > 0) + { +--- 5744,5750 ---- + --wp->w_wrow; + } + } +! set_topline(wp, lnum); + } + else if (sline > 0) + { +*************** +*** 5778,5784 **** + wp->w_wrow -= sline; + } + +! set_topline(wp, lnum); + } + } + +--- 5790,5796 ---- + wp->w_wrow -= sline; + } + +! set_topline(wp, lnum); + } + } + +*** ../vim-7.4.364/src/version.c 2014-07-09 21:17:59.755550204 +0200 +--- src/version.c 2014-07-16 14:10:41.191779038 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 365, + /**/ + +-- +"Software is like sex... it's better when it's free." + -- Linus Torvalds, initiator of the free Linux OS +Makes me wonder what FSF stands for...? + + /// 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/patches/source/vim/patches/7.4.366 b/patches/source/vim/patches/7.4.366 new file mode 100644 index 000000000..76097bede --- /dev/null +++ b/patches/source/vim/patches/7.4.366 @@ -0,0 +1,53 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.366 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.366 +Problem: Can't run the linebreak test on MS-Windows. +Solution: Fix the output file name. (Taro Muraoka) +Files: src/testdir/Make_dos.mak + + +*** ../vim-7.4.365/src/testdir/Make_dos.mak 2014-07-02 19:59:35.454375136 +0200 +--- src/testdir/Make_dos.mak 2014-07-16 14:19:39.719768093 +0200 +*************** +*** 37,43 **** + test105.out test106.out test107.out\ + test_autoformat_join.out \ + test_breakindent.out \ +! test_listlbr \ + test_eval.out \ + test_options.out + +--- 37,43 ---- + test105.out test106.out test107.out\ + test_autoformat_join.out \ + test_breakindent.out \ +! test_listlbr.out \ + test_eval.out \ + test_options.out + +*** ../vim-7.4.365/src/version.c 2014-07-16 14:16:41.519771715 +0200 +--- src/version.c 2014-07-16 14:18:43.307769239 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 366, + /**/ + +-- +<Beeth> Girls are like internet domain names, + the ones I like are already taken. +<honx> Well, you can stil get one from a strange country :-P + + /// 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/patches/source/vim/patches/7.4.367 b/patches/source/vim/patches/7.4.367 new file mode 100644 index 000000000..c184192e4 --- /dev/null +++ b/patches/source/vim/patches/7.4.367 @@ -0,0 +1,67 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.367 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.367 (after 7.4.357) +Problem: Other solution for redrawing after completion. +Solution: Schedule a window redraw instead of just clearing the command + line. (Jacob Niehus) +Files: src/edit.c + + +*** ../vim-7.4.366/src/edit.c 2014-07-09 14:00:45.175044250 +0200 +--- src/edit.c 2014-07-16 14:36:00.679748155 +0200 +*************** +*** 3854,3860 **** + ins_compl_free(); + compl_started = FALSE; + compl_matches = 0; +! msg_clr_cmdline(); /* necessary for "noshowmode" */ + ctrl_x_mode = 0; + compl_enter_selects = FALSE; + if (edit_submode != NULL) +--- 3854,3861 ---- + ins_compl_free(); + compl_started = FALSE; + compl_matches = 0; +! if (!shortmess(SHM_COMPLETIONMENU)) +! msg_clr_cmdline(); /* necessary for "noshowmode" */ + ctrl_x_mode = 0; + compl_enter_selects = FALSE; + if (edit_submode != NULL) +*************** +*** 4591,4597 **** +--- 4592,4601 ---- + */ + i = compl_col + (compl_cont_status & CONT_ADDING ? compl_length : 0); + backspace_until_column(i); ++ ++ /* Not sure what is still valid, better redraw everything. */ + changed_cline_bef_curs(); ++ redraw_curbuf_later(NOT_VALID); + } + + /* Insert the new text being completed. */ +*** ../vim-7.4.366/src/version.c 2014-07-16 14:20:38.255766903 +0200 +--- src/version.c 2014-07-16 14:42:23.059740384 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 367, + /**/ + +-- +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/patches/source/vim/patches/7.4.368 b/patches/source/vim/patches/7.4.368 new file mode 100644 index 000000000..0dd85e350 --- /dev/null +++ b/patches/source/vim/patches/7.4.368 @@ -0,0 +1,79 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.368 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.368 +Problem: Restoring the window sizes after closing the command line window + doesn't work properly if there are nested splits. +Solution: Restore the sizes twice. (Hirohito Higashi) +Files: src/window.c + + +*** ../vim-7.4.367/src/window.c 2014-07-16 14:16:41.519771715 +0200 +--- src/window.c 2014-07-16 15:13:52.895701974 +0200 +*************** +*** 4848,4862 **** + garray_T *gap; + { + win_T *wp; +! int i; + + if (win_count() * 2 == gap->ga_len) + { +! i = 0; +! for (wp = firstwin; wp != NULL; wp = wp->w_next) + { +! frame_setwidth(wp->w_frame, ((int *)gap->ga_data)[i++]); +! win_setheight_win(((int *)gap->ga_data)[i++], wp); + } + /* recompute the window positions */ + (void)win_comp_pos(); +--- 4848,4867 ---- + garray_T *gap; + { + win_T *wp; +! int i, j; + + if (win_count() * 2 == gap->ga_len) + { +! /* The order matters, because frames contain other frames, but it's +! * difficult to get right. The easy way out is to do it twice. */ +! for (j = 0; j < 2; ++j) + { +! i = 0; +! for (wp = firstwin; wp != NULL; wp = wp->w_next) +! { +! frame_setwidth(wp->w_frame, ((int *)gap->ga_data)[i++]); +! win_setheight_win(((int *)gap->ga_data)[i++], wp); +! } + } + /* recompute the window positions */ + (void)win_comp_pos(); +*** ../vim-7.4.367/src/version.c 2014-07-16 14:42:37.923740082 +0200 +--- src/version.c 2014-07-16 15:14:46.035700894 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 368, + /**/ + +-- +FROG: How you English say: I one more time, mac, I unclog my nose towards + you, sons of a window-dresser, so, you think you could out-clever us + French fellows with your silly knees-bent creeping about advancing + behaviour. (blows a raspberry) I wave my private parts at your aunties, + you brightly-coloured, mealy-templed, cranberry-smelling, electric + donkey-bottom biters. + "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/patches/source/vim/patches/7.4.369 b/patches/source/vim/patches/7.4.369 new file mode 100644 index 000000000..c501c64ac --- /dev/null +++ b/patches/source/vim/patches/7.4.369 @@ -0,0 +1,70 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.369 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.369 +Problem: Using freed memory when exiting while compiled with EXITFREE. +Solution: Set curwin to NULL and check for that. (Dominique Pelle) +Files: src/buffer.c, src/window.c + + +*** ../vim-7.4.368/src/buffer.c 2014-06-12 14:01:27.571769788 +0200 +--- src/buffer.c 2014-07-16 16:20:04.443621254 +0200 +*************** +*** 5702,5709 **** + signlist_T *next; + + /* When deleting the last sign need to redraw the windows to remove the +! * sign column. */ +! if (buf->b_signlist != NULL) + { + redraw_buf_later(buf, NOT_VALID); + changed_cline_bef_curs(); +--- 5702,5709 ---- + signlist_T *next; + + /* When deleting the last sign need to redraw the windows to remove the +! * sign column. Not when curwin is NULL (this means we're exiting). */ +! if (buf->b_signlist != NULL && curwin != NULL) + { + redraw_buf_later(buf, NOT_VALID); + changed_cline_bef_curs(); +*** ../vim-7.4.368/src/window.c 2014-07-16 15:18:22.903696486 +0200 +--- src/window.c 2014-07-16 16:15:41.063626607 +0200 +*************** +*** 2489,2494 **** +--- 2489,2498 ---- + + while (firstwin != NULL) + (void)win_free_mem(firstwin, &dummy, NULL); ++ ++ /* No window should be used after this. Set curwin to NULL to crash ++ * instead of using freed memory. */ ++ curwin = NULL; + } + #endif + +*** ../vim-7.4.368/src/version.c 2014-07-16 15:18:22.907696486 +0200 +--- src/version.c 2014-07-16 16:18:36.827623035 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 369, + /**/ + +-- +ARTHUR: If you do not open these doors, we will take this castle by force ... + [A bucket of slops land on ARTHUR. He tries to retain his dignity.] + "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/patches/source/vim/patches/7.4.370 b/patches/source/vim/patches/7.4.370 new file mode 100644 index 000000000..5da13f467 --- /dev/null +++ b/patches/source/vim/patches/7.4.370 @@ -0,0 +1,316 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.370 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.370 +Problem: Linebreak test fails when encoding is not utf-8. (Danek Duvall) +Solution: Split the test in a single byte one and a utf-8 one. (Christian + Brabandt) +Files: 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/testdir/test_listlbr.in, src/testdir/test_listlbr.ok, + src/testdir/test_listlbr_utf8.in, src/testdir/test_listlbr_utf8.ok + + +*** ../vim-7.4.369/src/testdir/Make_amiga.mak 2014-07-02 19:59:35.454375136 +0200 +--- src/testdir/Make_amiga.mak 2014-07-16 16:55:15.311578352 +0200 +*************** +*** 39,44 **** +--- 39,45 ---- + test_autoformat_join.out \ + test_breakindent.out \ + test_listlbr.out \ ++ test_listlbr_utf8.out \ + test_eval.out \ + test_options.out + +*************** +*** 167,171 **** +--- 168,173 ---- + test_autoformat_join.out: test_autoformat_join.in + test_breakindent.out: test_breakindent.in + test_listlbr.out: test_listlbr.in ++ test_listlbr_utf8.out: test_listlbr_utf8.in + test_eval.out: test_eval.in + test_options.out: test_options.in +*** ../vim-7.4.369/src/testdir/Make_dos.mak 2014-07-16 14:20:38.255766903 +0200 +--- src/testdir/Make_dos.mak 2014-07-16 16:56:02.423577394 +0200 +*************** +*** 38,43 **** +--- 38,44 ---- + test_autoformat_join.out \ + test_breakindent.out \ + test_listlbr.out \ ++ test_listlbr_utf8.out \ + test_eval.out \ + test_options.out + +*** ../vim-7.4.369/src/testdir/Make_ming.mak 2014-07-02 19:59:35.454375136 +0200 +--- src/testdir/Make_ming.mak 2014-07-16 16:55:15.311578352 +0200 +*************** +*** 58,63 **** +--- 58,64 ---- + test_autoformat_join.out \ + test_breakindent.out \ + test_listlbr.out \ ++ test_listlbr_utf8.out \ + test_eval.out \ + test_options.out + +*** ../vim-7.4.369/src/testdir/Make_os2.mak 2014-07-02 19:59:35.454375136 +0200 +--- src/testdir/Make_os2.mak 2014-07-16 16:55:15.311578352 +0200 +*************** +*** 40,45 **** +--- 40,46 ---- + test_autoformat_join.out \ + test_eval.out \ + test_breakindent.out \ ++ test_listlbr_utf8.out \ + test_listlbr.out \ + test_options.out + +*** ../vim-7.4.369/src/testdir/Make_vms.mms 2014-07-02 19:59:35.454375136 +0200 +--- src/testdir/Make_vms.mms 2014-07-16 16:55:15.311578352 +0200 +*************** +*** 99,104 **** +--- 99,105 ---- + test_autoformat_join.out \ + test_breakindent.out \ + test_listlbr.out \ ++ test_listlbr_utf8.out \ + test_eval.out \ + test_options.out + +*** ../vim-7.4.369/src/testdir/Makefile 2014-07-02 19:59:35.454375136 +0200 +--- src/testdir/Makefile 2014-07-16 16:55:15.311578352 +0200 +*************** +*** 36,41 **** +--- 36,42 ---- + test_autoformat_join.out \ + test_breakindent.out \ + test_listlbr.out \ ++ test_listlbr_utf8.out \ + test_eval.out \ + test_options.out + +*** ../vim-7.4.369/src/testdir/test_listlbr.in 2014-07-02 19:59:35.454375136 +0200 +--- src/testdir/test_listlbr.in 2014-07-16 16:55:15.311578352 +0200 +*************** +*** 1,10 **** +! Test for linebreak and list option + + STARTTEST + :so small.vim + :if !exists("+linebreak") | e! test.ok | w! test.out | qa! | endif + :10new|:vsp|:vert resize 20 +! :put =\"\tabcdef hijklmn\tpqrstuvwxyz\u00a01060ABCDEFGHIJKLMNOP \" + :norm! zt + :set ts=4 sw=4 sts=4 linebreak sbr=+ wrap + :fu! ScreenChar(width) +--- 1,10 ---- +! Test for linebreak and list option (non-utf8) + + STARTTEST + :so small.vim + :if !exists("+linebreak") | e! test.ok | w! test.out | qa! | endif + :10new|:vsp|:vert resize 20 +! :put =\"\tabcdef hijklmn\tpqrstuvwxyz_1060ABCDEFGHIJKLMNOP \" + :norm! zt + :set ts=4 sw=4 sts=4 linebreak sbr=+ wrap + :fu! ScreenChar(width) +*************** +*** 32,53 **** + :redraw! + :let line=ScreenChar(winwidth(0)) + :call DoRecordScreen() +! :let g:test ="Test 3: set linebreak + set list + fancy listchars" +! :exe "set linebreak list listchars=nbsp:\u2423,tab:\u2595\u2014,trail:\u02d1,eol:\ub6" +! :redraw! +! :let line=ScreenChar(winwidth(0)) +! :call DoRecordScreen() +! :let g:test ="Test 4: set linebreak nolist" + :set nolist linebreak + :redraw! + :let line=ScreenChar(winwidth(0)) + :call DoRecordScreen() +! :let g:test ="Test 5: set nolinebreak list" +! :set list nolinebreak +! :redraw! +! :let line=ScreenChar(winwidth(0)) +! :call DoRecordScreen() +! :let g:test ="Test 6: set linebreak with tab and 1 line as long as screen: should break!" + :set nolist linebreak ts=8 + :let line="1\t".repeat('a', winwidth(0)-2) + :$put =line +--- 32,43 ---- + :redraw! + :let line=ScreenChar(winwidth(0)) + :call DoRecordScreen() +! :let g:test ="Test 3: set linebreak nolist" + :set nolist linebreak + :redraw! + :let line=ScreenChar(winwidth(0)) + :call DoRecordScreen() +! :let g:test ="Test 4: set linebreak with tab and 1 line as long as screen: should break!" + :set nolist linebreak ts=8 + :let line="1\t".repeat('a', winwidth(0)-2) + :$put =line +*** ../vim-7.4.369/src/testdir/test_listlbr.ok 2014-07-02 19:59:35.454375136 +0200 +--- src/testdir/test_listlbr.ok 2014-07-16 16:55:15.315578352 +0200 +*************** +*** 1,38 **** + +! abcdef hijklmn pqrstuvwxyz 1060ABCDEFGHIJKLMNOP + + Test 1: set linebreak + abcdef + +hijklmn +! +pqrstuvwxyz 1060ABC + +DEFGHIJKLMNOP + + Test 2: set linebreak + set list + ^Iabcdef hijklmn^I +! +pqrstuvwxyz 1060ABC + +DEFGHIJKLMNOP + + +! Test 3: set linebreak + set list + fancy listchars +! ▕———abcdef +! +hijklmn▕——— +! +pqrstuvwxyz␣1060ABC +! +DEFGHIJKLMNOPˑ¶ +! +! Test 4: set linebreak nolist + abcdef + +hijklmn +! +pqrstuvwxyz 1060ABC + +DEFGHIJKLMNOP +- +- Test 5: set nolinebreak list +- ▕———abcdef hijklmn▕— +- +pqrstuvwxyz␣1060ABC +- +DEFGHIJKLMNOPˑ¶ +- ¶ + 1 aaaaaaaaaaaaaaaaaa + +! Test 6: set linebreak with tab and 1 line as long as screen: should break! + 1 + +aaaaaaaaaaaaaaaaaa + ~ +--- 1,26 ---- + +! abcdef hijklmn pqrstuvwxyz_1060ABCDEFGHIJKLMNOP + + Test 1: set linebreak + abcdef + +hijklmn +! +pqrstuvwxyz_1060ABC + +DEFGHIJKLMNOP + + Test 2: set linebreak + set list + ^Iabcdef hijklmn^I +! +pqrstuvwxyz_1060ABC + +DEFGHIJKLMNOP + + +! Test 3: set linebreak nolist + abcdef + +hijklmn +! +pqrstuvwxyz_1060ABC + +DEFGHIJKLMNOP + 1 aaaaaaaaaaaaaaaaaa + +! Test 4: set linebreak with tab and 1 line as long as screen: should break! + 1 + +aaaaaaaaaaaaaaaaaa + ~ +*** ../vim-7.4.369/src/testdir/test_listlbr_utf8.in 2014-07-16 17:01:25.415570829 +0200 +--- src/testdir/test_listlbr_utf8.in 2014-07-16 16:55:15.315578352 +0200 +*************** +*** 0 **** +--- 1,41 ---- ++ Test for linebreak and list option in utf-8 mode ++ ++ STARTTEST ++ :so small.vim ++ :if !exists("+linebreak") | e! test.ok | w! test.out | qa! | endif ++ :so mbyte.vim ++ :if &enc !=? 'utf-8'|:e! test.ok|:w! test.out|qa!|endif ++ :10new|:vsp|:vert resize 20 ++ :put =\"\tabcdef hijklmn\tpqrstuvwxyz\u00a01060ABCDEFGHIJKLMNOP \" ++ :norm! zt ++ :set ts=4 sw=4 sts=4 linebreak sbr=+ wrap ++ :fu! ScreenChar(width) ++ : let c='' ++ : for j in range(1,4) ++ : for i in range(1,a:width) ++ : let c.=nr2char(screenchar(j, i)) ++ : endfor ++ : let c.="\n" ++ : endfor ++ : return c ++ :endfu ++ :fu! DoRecordScreen() ++ : wincmd l ++ : $put =printf(\"\n%s\", g:test) ++ : $put =g:line ++ : wincmd p ++ :endfu ++ :let g:test ="Test 1: set linebreak + set list + fancy listchars" ++ :exe "set linebreak list listchars=nbsp:\u2423,tab:\u2595\u2014,trail:\u02d1,eol:\ub6" ++ :redraw! ++ :let line=ScreenChar(winwidth(0)) ++ :call DoRecordScreen() ++ :let g:test ="Test 2: set nolinebreak list" ++ :set list nolinebreak ++ :redraw! ++ :let line=ScreenChar(winwidth(0)) ++ :call DoRecordScreen() ++ :%w! test.out ++ :qa! ++ ENDTEST ++ dummy text +*** ../vim-7.4.369/src/testdir/test_listlbr_utf8.ok 2014-07-16 17:01:25.419570829 +0200 +--- src/testdir/test_listlbr_utf8.ok 2014-07-16 16:55:15.315578352 +0200 +*************** +*** 0 **** +--- 1,14 ---- ++ ++ abcdef hijklmn pqrstuvwxyz 1060ABCDEFGHIJKLMNOP ++ ++ Test 1: set linebreak + set list + fancy listchars ++ ▕———abcdef ++ +hijklmn▕——— ++ +pqrstuvwxyz␣1060ABC ++ +DEFGHIJKLMNOPˑ¶ ++ ++ Test 2: set nolinebreak list ++ ▕———abcdef hijklmn▕— ++ +pqrstuvwxyz␣1060ABC ++ +DEFGHIJKLMNOPˑ¶ ++ ¶ +*** ../vim-7.4.369/src/version.c 2014-07-16 16:30:21.647608710 +0200 +--- src/version.c 2014-07-16 16:56:38.755576656 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 370, + /**/ + +-- + Another bucket of what can only be described as human ordure hits ARTHUR. +ARTHUR: ... Right! (to the KNIGHTS) That settles it! + "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/patches/source/vim/patches/7.4.371 b/patches/source/vim/patches/7.4.371 new file mode 100644 index 000000000..f915a8f4b --- /dev/null +++ b/patches/source/vim/patches/7.4.371 @@ -0,0 +1,59 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.371 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.371 +Problem: When 'linebreak' is set control characters are not correctly + displayed. (Kimmy Lindvall) +Solution: Set n_extra. (Christian Brabandt) +Files: src/screen.c + + +*** ../vim-7.4.370/src/screen.c 2014-07-09 20:20:40.359620108 +0200 +--- src/screen.c 2014-07-16 17:12:38.599557147 +0200 +*************** +*** 4646,4651 **** +--- 4646,4653 ---- + else if (c != NUL) + { + p_extra = transchar(c); ++ if (n_extra == 0) ++ n_extra = byte2cells(c) - 1; + #ifdef FEAT_RIGHTLEFT + if ((dy_flags & DY_UHEX) && wp->w_p_rl) + rl_mirror(p_extra); /* reverse "<12>" */ +*** ../vim-7.4.370/src/version.c 2014-07-16 17:01:38.279570568 +0200 +--- src/version.c 2014-07-16 17:13:21.815556269 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 371, + /**/ + +-- +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/patches/source/vim/patches/7.4.372 b/patches/source/vim/patches/7.4.372 new file mode 100644 index 000000000..11d0254d4 --- /dev/null +++ b/patches/source/vim/patches/7.4.372 @@ -0,0 +1,188 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.372 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.372 +Problem: When 'winminheight' is zero there might not be one line for the + current window. +Solution: Change the size computations. (Yukihiro Nakadaira) +Files: src/window.c + + +*** ../vim-7.4.371/src/window.c 2014-07-16 16:30:21.647608710 +0200 +--- src/window.c 2014-07-16 18:06:53.123491001 +0200 +*************** +*** 688,693 **** +--- 688,695 ---- + int before; + int minwidth; + int minheight; ++ int wmw1; ++ int wmh1; + + if (flags & WSP_TOP) + oldwin = firstwin; +*************** +*** 722,740 **** + * Check if we are able to split the current window and compute its + * width. + */ +! needed = p_wmw + 1; + if (flags & WSP_ROOM) +! needed += p_wiw - p_wmw; + if (p_ea || (flags & (WSP_BOT | WSP_TOP))) + { +! minwidth = frame_minwidth(topframe, NULL); + available = topframe->fr_width; + needed += minwidth; + } + else + { +! minwidth = frame_minwidth(oldwin->w_frame, NULL); +! available = oldwin->w_width; + } + if (available < needed && new_wp == NULL) + { +--- 724,745 ---- + * Check if we are able to split the current window and compute its + * width. + */ +! /* Current window requires at least 1 space. */ +! wmw1 = (p_wmw == 0 ? 1 : p_wmw); +! needed = wmw1 + 1; + if (flags & WSP_ROOM) +! needed += p_wiw - wmw1; + if (p_ea || (flags & (WSP_BOT | WSP_TOP))) + { +! minwidth = frame_minwidth(topframe, NOWIN); + available = topframe->fr_width; + needed += minwidth; + } + else + { +! minwidth = frame_minwidth(oldwin->w_frame, NOWIN); +! available = oldwin->w_frame->fr_width; +! needed += minwidth; + } + if (available < needed && new_wp == NULL) + { +*************** +*** 743,754 **** + } + if (new_size == 0) + new_size = oldwin->w_width / 2; +- if (new_size > oldwin->w_width - p_wmw - 1) +- new_size = oldwin->w_width - p_wmw - 1; + if (new_size > available - minwidth - 1) + new_size = available - minwidth - 1; +! if (new_size < p_wmw) +! new_size = p_wmw; + + /* if it doesn't fit in the current window, need win_equal() */ + if (oldwin->w_width - new_size - 1 < p_wmw) +--- 748,757 ---- + } + if (new_size == 0) + new_size = oldwin->w_width / 2; + if (new_size > available - minwidth - 1) + new_size = available - minwidth - 1; +! if (new_size < wmw1) +! new_size = wmw1; + + /* if it doesn't fit in the current window, need win_equal() */ + if (oldwin->w_width - new_size - 1 < p_wmw) +*************** +*** 789,808 **** + * Check if we are able to split the current window and compute its + * height. + */ +! needed = p_wmh + STATUS_HEIGHT + need_status; + if (flags & WSP_ROOM) +! needed += p_wh - p_wmh; + if (p_ea || (flags & (WSP_BOT | WSP_TOP))) + { +! minheight = frame_minheight(topframe, NULL); + available = topframe->fr_height; + needed += minheight; + } + else + { +! minheight = frame_minheight(oldwin->w_frame, NULL); +! available = oldwin->w_height; +! needed += p_wmh; + } + if (available < needed && new_wp == NULL) + { +--- 792,813 ---- + * Check if we are able to split the current window and compute its + * height. + */ +! /* Current window requires at least 1 space. */ +! wmh1 = (p_wmh == 0 ? 1 : p_wmh); +! needed = wmh1 + STATUS_HEIGHT; + if (flags & WSP_ROOM) +! needed += p_wh - wmh1; + if (p_ea || (flags & (WSP_BOT | WSP_TOP))) + { +! minheight = frame_minheight(topframe, NOWIN) + need_status; + available = topframe->fr_height; + needed += minheight; + } + else + { +! minheight = frame_minheight(oldwin->w_frame, NOWIN) + need_status; +! available = oldwin->w_frame->fr_height; +! needed += minheight; + } + if (available < needed && new_wp == NULL) + { +*************** +*** 817,829 **** + } + if (new_size == 0) + new_size = oldwin_height / 2; +- +- if (new_size > oldwin_height - p_wmh - STATUS_HEIGHT) +- new_size = oldwin_height - p_wmh - STATUS_HEIGHT; + if (new_size > available - minheight - STATUS_HEIGHT) + new_size = available - minheight - STATUS_HEIGHT; +! if (new_size < p_wmh) +! new_size = p_wmh; + + /* if it doesn't fit in the current window, need win_equal() */ + if (oldwin_height - new_size - STATUS_HEIGHT < p_wmh) +--- 822,831 ---- + } + if (new_size == 0) + new_size = oldwin_height / 2; + if (new_size > available - minheight - STATUS_HEIGHT) + new_size = available - minheight - STATUS_HEIGHT; +! if (new_size < wmh1) +! new_size = wmh1; + + /* if it doesn't fit in the current window, need win_equal() */ + if (oldwin_height - new_size - STATUS_HEIGHT < p_wmh) +*** ../vim-7.4.371/src/version.c 2014-07-16 17:29:46.691536252 +0200 +--- src/version.c 2014-07-16 17:34:14.795530803 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 372, + /**/ + +-- + [The rest of the ARMY stand around looking at a loss.] +INSPECTOR END OF FILM: (picks up megaphone) All right! Clear off! Go on! + "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/patches/source/vim/patches/7.4.373 b/patches/source/vim/patches/7.4.373 new file mode 100644 index 000000000..0d2841d6c --- /dev/null +++ b/patches/source/vim/patches/7.4.373 @@ -0,0 +1,98 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.373 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.373 +Problem: Compiler warning for unused argument and unused variable. +Solution: Add UNUSED. Move variable inside #ifdef. +Files: src/charset.c, src/window.c + + +*** ../vim-7.4.372/src/charset.c 2014-07-02 19:59:35.450375136 +0200 +--- src/charset.c 2014-07-16 23:36:51.211088615 +0200 +*************** +*** 1024,1030 **** + */ + int + lbr_chartabsize(line, s, col) +! char_u *line; /* start of the line */ + unsigned char *s; + colnr_T col; + { +--- 1024,1030 ---- + */ + int + lbr_chartabsize(line, s, col) +! char_u *line UNUSED; /* start of the line */ + unsigned char *s; + colnr_T col; + { +*************** +*** 1069,1075 **** + int + win_lbr_chartabsize(wp, line, s, col, headp) + win_T *wp; +! char_u *line; /* start of the line */ + char_u *s; + colnr_T col; + int *headp UNUSED; +--- 1069,1075 ---- + int + win_lbr_chartabsize(wp, line, s, col, headp) + win_T *wp; +! char_u *line UNUSED; /* start of the line */ + char_u *s; + colnr_T col; + int *headp UNUSED; +*** ../vim-7.4.372/src/window.c 2014-07-16 18:19:22.911475762 +0200 +--- src/window.c 2014-07-16 23:38:31.567086575 +0200 +*************** +*** 686,694 **** + int layout; + frame_T *frp, *curfrp; + int before; +- int minwidth; + int minheight; +- int wmw1; + int wmh1; + + if (flags & WSP_TOP) +--- 686,692 ---- +*************** +*** 718,723 **** +--- 716,724 ---- + #ifdef FEAT_VERTSPLIT + if (flags & WSP_VERT) + { ++ int wmw1; ++ int minwidth; ++ + layout = FR_ROW; + + /* +*** ../vim-7.4.372/src/version.c 2014-07-16 18:19:22.915475762 +0200 +--- src/version.c 2014-07-16 23:36:20.775089233 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 373, + /**/ + +-- +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/patches/source/vim/patches/7.4.374 b/patches/source/vim/patches/7.4.374 new file mode 100644 index 000000000..1657477ff --- /dev/null +++ b/patches/source/vim/patches/7.4.374 @@ -0,0 +1,71 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.374 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.374 +Problem: Character after "fb" command not mapped if it might be a composing + character. +Solution: Don't disable mapping when looking for a composing character. + (Jacob Niehus) +Files: src/normal.c + + +*** ../vim-7.4.373/src/normal.c 2014-04-29 12:15:22.856032651 +0200 +--- src/normal.c 2014-07-23 12:26:26.811992854 +0200 +*************** +*** 1076,1082 **** + #ifdef FEAT_MBYTE + /* When getting a text character and the next character is a + * multi-byte character, it could be a composing character. +! * However, don't wait for it to arrive. */ + while (enc_utf8 && lang && (c = vpeekc()) > 0 + && (c >= 0x100 || MB_BYTE2LEN(vpeekc()) > 1)) + { +--- 1076,1085 ---- + #ifdef FEAT_MBYTE + /* When getting a text character and the next character is a + * multi-byte character, it could be a composing character. +! * However, don't wait for it to arrive. Also, do enable mapping, +! * because if it's put back with vungetc() it's too late to apply +! * mapping. */ +! --no_mapping; + while (enc_utf8 && lang && (c = vpeekc()) > 0 + && (c >= 0x100 || MB_BYTE2LEN(vpeekc()) > 1)) + { +*************** +*** 1091,1096 **** +--- 1094,1100 ---- + else + ca.ncharC2 = c; + } ++ ++no_mapping; + #endif + } + --no_mapping; +*** ../vim-7.4.373/src/version.c 2014-07-16 23:39:50.251084976 +0200 +--- src/version.c 2014-07-23 12:27:50.483992253 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 374, + /**/ + +-- +CART DRIVER: Bring out your dead! + There are legs stick out of windows and doors. Two MEN are fighting in the + mud - covered from head to foot in it. Another MAN is on his hands in + knees shovelling mud into his mouth. We just catch sight of a MAN falling + into a well. + "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/patches/source/vim/patches/7.4.375 b/patches/source/vim/patches/7.4.375 new file mode 100644 index 000000000..5ccfecf5b --- /dev/null +++ b/patches/source/vim/patches/7.4.375 @@ -0,0 +1,59 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.375 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.375 +Problem: Test 63 fails when run with GUI-only Vim. +Solution: Add guibg attributes. (suggested by Mike Soyka) +Files: src/testdir/test63.in + + +*** ../vim-7.4.374/src/testdir/test63.in 2014-06-17 17:48:21.784628008 +0200 +--- src/testdir/test63.in 2014-07-23 13:12:20.727973060 +0200 +*************** +*** 6,14 **** + :" --- Check that "matcharg()" returns the correct group and pattern if a match + :" --- is defined. + :let @r = "*** Test 1: " +! :highlight MyGroup1 ctermbg=red +! :highlight MyGroup2 ctermbg=green +! :highlight MyGroup3 ctermbg=blue + :match MyGroup1 /TODO/ + :2match MyGroup2 /FIXME/ + :3match MyGroup3 /XXX/ +--- 6,14 ---- + :" --- Check that "matcharg()" returns the correct group and pattern if a match + :" --- is defined. + :let @r = "*** Test 1: " +! :highlight MyGroup1 ctermbg=red guibg=red +! :highlight MyGroup2 ctermbg=green guibg=green +! :highlight MyGroup3 ctermbg=blue guibg=blue + :match MyGroup1 /TODO/ + :2match MyGroup2 /FIXME/ + :3match MyGroup3 /XXX/ +*** ../vim-7.4.374/src/version.c 2014-07-23 12:31:17.207990767 +0200 +--- src/version.c 2014-07-23 13:13:15.167972669 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 375, + /**/ + +-- +BODY: I'm not dead! +CART DRIVER: 'Ere. He says he's not dead. +LARGE MAN: Yes he is. +BODY: I'm not! + "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/patches/source/vim/patches/7.4.376 b/patches/source/vim/patches/7.4.376 new file mode 100644 index 000000000..93098cb92 --- /dev/null +++ b/patches/source/vim/patches/7.4.376 @@ -0,0 +1,57 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.376 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.376 (after 7.4.367) +Problem: Popup menu flickers too much. +Solution: Remove the forced redraw. (Hirohito Higashi) +Files: src/edit.c + + +*** ../vim-7.4.375/src/edit.c 2014-07-16 14:42:37.923740082 +0200 +--- src/edit.c 2014-07-23 13:49:03.535957228 +0200 +*************** +*** 4593,4601 **** + i = compl_col + (compl_cont_status & CONT_ADDING ? compl_length : 0); + backspace_until_column(i); + +! /* Not sure what is still valid, better redraw everything. */ + changed_cline_bef_curs(); +- redraw_curbuf_later(NOT_VALID); + } + + /* Insert the new text being completed. */ +--- 4593,4601 ---- + i = compl_col + (compl_cont_status & CONT_ADDING ? compl_length : 0); + backspace_until_column(i); + +! /* TODO: is this sufficient for redrawing? Redrawing everything causes +! * flicker, thus we can't do that. */ + changed_cline_bef_curs(); + } + + /* Insert the new text being completed. */ +*** ../vim-7.4.375/src/version.c 2014-07-23 13:16:26.727971292 +0200 +--- src/version.c 2014-07-23 13:48:02.031957670 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 376, + /**/ + +-- +Why I like vim: +> I like VIM because, when I ask a question in this newsgroup, I get a +> one-line answer. With xemacs, I get a 1Kb lisp script with bugs in it ;-) + + /// 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/patches/source/vim/patches/7.4.377 b/patches/source/vim/patches/7.4.377 new file mode 100644 index 000000000..e5d86bd6c --- /dev/null +++ b/patches/source/vim/patches/7.4.377 @@ -0,0 +1,144 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.377 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.377 +Problem: When 'equalalways' is set a split may report "no room" even though + there is plenty of room. +Solution: Compute the available room properly. (Yukihiro Nakadaira) +Files: src/window.c + + +*** ../vim-7.4.376/src/window.c 2014-07-16 23:39:50.251084976 +0200 +--- src/window.c 2014-07-23 15:19:10.491918366 +0200 +*************** +*** 684,690 **** + int available; + int oldwin_height = 0; + int layout; +! frame_T *frp, *curfrp; + int before; + int minheight; + int wmh1; +--- 684,690 ---- + int available; + int oldwin_height = 0; + int layout; +! frame_T *frp, *curfrp, *frp2, *prevfrp; + int before; + int minheight; + int wmh1; +*************** +*** 730,741 **** + needed = wmw1 + 1; + if (flags & WSP_ROOM) + needed += p_wiw - wmw1; +! if (p_ea || (flags & (WSP_BOT | WSP_TOP))) + { + minwidth = frame_minwidth(topframe, NOWIN); + available = topframe->fr_width; + needed += minwidth; + } + else + { + minwidth = frame_minwidth(oldwin->w_frame, NOWIN); +--- 730,758 ---- + needed = wmw1 + 1; + if (flags & WSP_ROOM) + needed += p_wiw - wmw1; +! if (flags & (WSP_BOT | WSP_TOP)) + { + minwidth = frame_minwidth(topframe, NOWIN); + available = topframe->fr_width; + needed += minwidth; + } ++ else if (p_ea) ++ { ++ minwidth = frame_minwidth(oldwin->w_frame, NOWIN); ++ prevfrp = oldwin->w_frame; ++ for (frp = oldwin->w_frame->fr_parent; frp != NULL; ++ frp = frp->fr_parent) ++ { ++ if (frp->fr_layout == FR_ROW) ++ for (frp2 = frp->fr_child; frp2 != NULL; ++ frp2 = frp2->fr_next) ++ if (frp2 != prevfrp) ++ minwidth += frame_minwidth(frp2, NOWIN); ++ prevfrp = frp; ++ } ++ available = topframe->fr_width; ++ needed += minwidth; ++ } + else + { + minwidth = frame_minwidth(oldwin->w_frame, NOWIN); +*************** +*** 798,809 **** + needed = wmh1 + STATUS_HEIGHT; + if (flags & WSP_ROOM) + needed += p_wh - wmh1; +! if (p_ea || (flags & (WSP_BOT | WSP_TOP))) + { + minheight = frame_minheight(topframe, NOWIN) + need_status; + available = topframe->fr_height; + needed += minheight; + } + else + { + minheight = frame_minheight(oldwin->w_frame, NOWIN) + need_status; +--- 815,843 ---- + needed = wmh1 + STATUS_HEIGHT; + if (flags & WSP_ROOM) + needed += p_wh - wmh1; +! if (flags & (WSP_BOT | WSP_TOP)) + { + minheight = frame_minheight(topframe, NOWIN) + need_status; + available = topframe->fr_height; + needed += minheight; + } ++ else if (p_ea) ++ { ++ minheight = frame_minheight(oldwin->w_frame, NOWIN) + need_status; ++ prevfrp = oldwin->w_frame; ++ for (frp = oldwin->w_frame->fr_parent; frp != NULL; ++ frp = frp->fr_parent) ++ { ++ if (frp->fr_layout == FR_COL) ++ for (frp2 = frp->fr_child; frp2 != NULL; ++ frp2 = frp2->fr_next) ++ if (frp2 != prevfrp) ++ minheight += frame_minheight(frp2, NOWIN); ++ prevfrp = frp; ++ } ++ available = topframe->fr_height; ++ needed += minheight; ++ } + else + { + minheight = frame_minheight(oldwin->w_frame, NOWIN) + need_status; +*** ../vim-7.4.376/src/version.c 2014-07-23 13:50:41.839956521 +0200 +--- src/version.c 2014-07-23 15:20:33.227917771 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 377, + /**/ + +-- +LARGE MAN: Who's that then? +CART DRIVER: (Grudgingly) I dunno, Must be a king. +LARGE MAN: Why? +CART DRIVER: He hasn't got shit all over him. + "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/patches/source/vim/patches/7.4.378 b/patches/source/vim/patches/7.4.378 new file mode 100644 index 000000000..659f18f51 --- /dev/null +++ b/patches/source/vim/patches/7.4.378 @@ -0,0 +1,336 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.378 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.378 +Problem: Title of quickfist list is not kept for setqflist(list, 'r'). +Solution: Keep the title. Add a test. (Lcd) +Files: src/quickfix.c, 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/testdir/test_qf_title.in, + src/testdir/test_qf_title.ok + + +*** ../vim-7.4.377/src/quickfix.c 2014-03-27 17:02:22.080660944 +0100 +--- src/quickfix.c 2014-07-23 15:37:30.551910459 +0200 +*************** +*** 107,112 **** +--- 107,113 ---- + }; + + static int qf_init_ext __ARGS((qf_info_T *qi, char_u *efile, buf_T *buf, typval_T *tv, char_u *errorformat, int newlist, linenr_T lnumfirst, linenr_T lnumlast, char_u *qf_title)); ++ static void qf_store_title __ARGS((qf_info_T *qi, char_u *title)); + static void qf_new_list __ARGS((qf_info_T *qi, char_u *qf_title)); + static void ll_free_all __ARGS((qf_info_T **pqi)); + static int qf_add_entry __ARGS((qf_info_T *qi, qfline_T **prevp, char_u *dir, char_u *fname, int bufnum, char_u *mesg, long lnum, int col, int vis_col, char_u *pattern, int nr, int type, int valid)); +*************** +*** 126,132 **** + static win_T *qf_find_win __ARGS((qf_info_T *qi)); + static buf_T *qf_find_buf __ARGS((qf_info_T *qi)); + static void qf_update_buffer __ARGS((qf_info_T *qi)); +! static void qf_set_title __ARGS((qf_info_T *qi)); + static void qf_fill_buffer __ARGS((qf_info_T *qi)); + #endif + static char_u *get_mef_name __ARGS((void)); +--- 127,133 ---- + static win_T *qf_find_win __ARGS((qf_info_T *qi)); + static buf_T *qf_find_buf __ARGS((qf_info_T *qi)); + static void qf_update_buffer __ARGS((qf_info_T *qi)); +! static void qf_set_title_var __ARGS((qf_info_T *qi)); + static void qf_fill_buffer __ARGS((qf_info_T *qi)); + #endif + static char_u *get_mef_name __ARGS((void)); +*************** +*** 884,889 **** +--- 885,905 ---- + return retval; + } + ++ static void ++ qf_store_title(qi, title) ++ qf_info_T *qi; ++ char_u *title; ++ { ++ if (title != NULL) ++ { ++ char_u *p = alloc((int)STRLEN(title) + 2); ++ ++ qi->qf_lists[qi->qf_curlist].qf_title = p; ++ if (p != NULL) ++ sprintf((char *)p, ":%s", (char *)title); ++ } ++ } ++ + /* + * Prepare for adding a new quickfix list. + */ +*************** +*** 895,901 **** + int i; + + /* +! * If the current entry is not the last entry, delete entries below + * the current entry. This makes it possible to browse in a tree-like + * way with ":grep'. + */ +--- 911,917 ---- + int i; + + /* +! * If the current entry is not the last entry, delete entries beyond + * the current entry. This makes it possible to browse in a tree-like + * way with ":grep'. + */ +*************** +*** 916,929 **** + else + qi->qf_curlist = qi->qf_listcount++; + vim_memset(&qi->qf_lists[qi->qf_curlist], 0, (size_t)(sizeof(qf_list_T))); +! if (qf_title != NULL) +! { +! char_u *p = alloc((int)STRLEN(qf_title) + 2); +! +! qi->qf_lists[qi->qf_curlist].qf_title = p; +! if (p != NULL) +! sprintf((char *)p, ":%s", (char *)qf_title); +! } + } + + /* +--- 932,938 ---- + else + qi->qf_curlist = qi->qf_listcount++; + vim_memset(&qi->qf_lists[qi->qf_curlist], 0, (size_t)(sizeof(qf_list_T))); +! qf_store_title(qi, qf_title); + } + + /* +*************** +*** 2444,2450 **** + qf_fill_buffer(qi); + + if (qi->qf_lists[qi->qf_curlist].qf_title != NULL) +! qf_set_title(qi); + + curwin->w_cursor.lnum = qi->qf_lists[qi->qf_curlist].qf_index; + curwin->w_cursor.col = 0; +--- 2453,2459 ---- + qf_fill_buffer(qi); + + if (qi->qf_lists[qi->qf_curlist].qf_title != NULL) +! qf_set_title_var(qi); + + curwin->w_cursor.lnum = qi->qf_lists[qi->qf_curlist].qf_index; + curwin->w_cursor.col = 0; +*************** +*** 2599,2605 **** + { + curwin_save = curwin; + curwin = win; +! qf_set_title(qi); + curwin = curwin_save; + + } +--- 2608,2614 ---- + { + curwin_save = curwin; + curwin = win; +! qf_set_title_var(qi); + curwin = curwin_save; + + } +*************** +*** 2612,2618 **** + } + + static void +! qf_set_title(qi) + qf_info_T *qi; + { + set_internal_string_var((char_u *)"w:quickfix_title", +--- 2621,2627 ---- + } + + static void +! qf_set_title_var(qi) + qf_info_T *qi; + { + set_internal_string_var((char_u *)"w:quickfix_title", +*************** +*** 3845,3851 **** +--- 3854,3863 ---- + prevp->qf_next != prevp; prevp = prevp->qf_next) + ; + else if (action == 'r') ++ { + qf_free(qi, qi->qf_curlist); ++ qf_store_title(qi, title); ++ } + + for (li = list->lv_first; li != NULL; li = li->li_next) + { +*** ../vim-7.4.377/src/testdir/Make_amiga.mak 2014-07-16 17:01:38.275570568 +0200 +--- src/testdir/Make_amiga.mak 2014-07-23 15:26:51.455915053 +0200 +*************** +*** 40,45 **** +--- 40,46 ---- + test_breakindent.out \ + test_listlbr.out \ + test_listlbr_utf8.out \ ++ test_qf_title.out \ + test_eval.out \ + test_options.out + +*************** +*** 169,173 **** +--- 170,175 ---- + test_breakindent.out: test_breakindent.in + test_listlbr.out: test_listlbr.in + test_listlbr_utf8.out: test_listlbr_utf8.in ++ test_qf_title.out: test_qf_title.in + test_eval.out: test_eval.in + test_options.out: test_options.in +*** ../vim-7.4.377/src/testdir/Make_dos.mak 2014-07-16 17:01:38.279570568 +0200 +--- src/testdir/Make_dos.mak 2014-07-23 15:27:01.231914983 +0200 +*************** +*** 39,44 **** +--- 39,45 ---- + test_breakindent.out \ + test_listlbr.out \ + test_listlbr_utf8.out \ ++ test_qf_title.out \ + test_eval.out \ + test_options.out + +*** ../vim-7.4.377/src/testdir/Make_ming.mak 2014-07-16 17:01:38.279570568 +0200 +--- src/testdir/Make_ming.mak 2014-07-23 15:27:13.163914897 +0200 +*************** +*** 59,64 **** +--- 59,65 ---- + test_breakindent.out \ + test_listlbr.out \ + test_listlbr_utf8.out \ ++ test_qf_title.out \ + test_eval.out \ + test_options.out + +*** ../vim-7.4.377/src/testdir/Make_os2.mak 2014-07-16 17:01:38.279570568 +0200 +--- src/testdir/Make_os2.mak 2014-07-23 15:27:25.999914805 +0200 +*************** +*** 40,47 **** + test_autoformat_join.out \ + test_eval.out \ + test_breakindent.out \ +- test_listlbr_utf8.out \ + test_listlbr.out \ + test_options.out + + .SUFFIXES: .in .out +--- 40,48 ---- + test_autoformat_join.out \ + test_eval.out \ + test_breakindent.out \ + test_listlbr.out \ ++ test_listlbr_utf8.out \ ++ test_qf_title.out \ + test_options.out + + .SUFFIXES: .in .out +*** ../vim-7.4.377/src/testdir/Make_vms.mms 2014-07-16 17:01:38.279570568 +0200 +--- src/testdir/Make_vms.mms 2014-07-23 15:27:34.787914741 +0200 +*************** +*** 4,10 **** + # Authors: Zoltan Arpadffy, <arpadffy@polarhome.com> + # Sandor Kopanyi, <sandor.kopanyi@mailbox.hu> + # +! # Last change: 2014 May 28 + # + # 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, <arpadffy@polarhome.com> + # Sandor Kopanyi, <sandor.kopanyi@mailbox.hu> + # +! # Last change: 2014 Jul 23 + # + # 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. +*************** +*** 100,105 **** +--- 100,106 ---- + test_breakindent.out \ + test_listlbr.out \ + test_listlbr_utf8.out \ ++ test_qf_title.out \ + test_eval.out \ + test_options.out + +*** ../vim-7.4.377/src/testdir/Makefile 2014-07-16 17:01:38.279570568 +0200 +--- src/testdir/Makefile 2014-07-23 15:27:46.947914654 +0200 +*************** +*** 37,42 **** +--- 37,43 ---- + test_breakindent.out \ + test_listlbr.out \ + test_listlbr_utf8.out \ ++ test_qf_title.out \ + test_eval.out \ + test_options.out + +*** ../vim-7.4.377/src/testdir/test_qf_title.in 2014-07-23 15:53:26.279903590 +0200 +--- src/testdir/test_qf_title.in 2014-07-23 15:26:02.495915405 +0200 +*************** +*** 0 **** +--- 1,18 ---- ++ Tests for quickfix window's title vim: set ft=vim : ++ ++ STARTTEST ++ :so small.vim ++ :if !has('quickfix') | e! test.ok | wq! test.out | endif ++ :set efm=%E%f:%l:%c:%m ++ :cgetexpr ['file:1:1:message'] ++ :let qflist=getqflist() ++ :call setqflist(qflist, 'r') ++ :copen ++ :let g:quickfix_title=w:quickfix_title ++ :wincmd p ++ :$put =g:quickfix_title ++ :/^Results/,$w test.out ++ :qa! ++ ENDTEST ++ ++ Results of test_qf_title: +*** ../vim-7.4.377/src/testdir/test_qf_title.ok 2014-07-23 15:53:26.283903590 +0200 +--- src/testdir/test_qf_title.ok 2014-07-23 15:25:55.303915456 +0200 +*************** +*** 0 **** +--- 1,2 ---- ++ Results of test_qf_title: ++ :setqflist() +*** ../vim-7.4.377/src/version.c 2014-07-23 15:21:16.247917462 +0200 +--- src/version.c 2014-07-23 15:28:57.251914149 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 378, + /**/ + +-- +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/patches/source/vim/patches/7.4.379 b/patches/source/vim/patches/7.4.379 new file mode 100644 index 000000000..79d859320 --- /dev/null +++ b/patches/source/vim/patches/7.4.379 @@ -0,0 +1,45 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.379 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.379 +Problem: Accessing freed memory after using setqflist(list, 'r'). (Lcd) +Solution: Reset qf_index. +Files: src/quickfix.c + + +*** ../vim-7.4.378/src/quickfix.c 2014-07-23 15:54:43.443903036 +0200 +--- src/quickfix.c 2014-07-23 16:11:59.915895586 +0200 +*************** +*** 2173,2178 **** +--- 2173,2179 ---- + } + vim_free(qi->qf_lists[idx].qf_title); + qi->qf_lists[idx].qf_title = NULL; ++ qi->qf_lists[idx].qf_index = 0; + } + + /* +*** ../vim-7.4.378/src/version.c 2014-07-23 15:54:43.443903036 +0200 +--- src/version.c 2014-07-23 16:14:43.995894407 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 379, + /**/ + +-- +"Lisp has all the visual appeal of oatmeal with nail clippings thrown in." + -- Larry Wall + + /// 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/patches/source/vim/patches/7.4.380 b/patches/source/vim/patches/7.4.380 new file mode 100644 index 000000000..8c93e0772 --- /dev/null +++ b/patches/source/vim/patches/7.4.380 @@ -0,0 +1,115 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.380 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.380 +Problem: Loading python may cause Vim to exit. +Solution: Avoid loading the "site" module. (Taro Muraoka) +Files: src/if_python.c + + +*** ../vim-7.4.379/src/if_python.c 2014-03-30 16:11:37.176530823 +0200 +--- src/if_python.c 2014-07-23 16:46:42.863880615 +0200 +*************** +*** 295,300 **** +--- 295,303 ---- + # define PyCObject_FromVoidPtr dll_PyCObject_FromVoidPtr + # define PyCObject_AsVoidPtr dll_PyCObject_AsVoidPtr + # endif ++ # if defined(PY_VERSION_HEX) && PY_VERSION_HEX >= 0x02070000 ++ # define Py_NoSiteFlag (*dll_Py_NoSiteFlag) ++ # endif + + /* + * Pointers for dynamic link +*************** +*** 440,445 **** +--- 443,451 ---- + static PyObject* (*dll_PyCObject_FromVoidPtr)(void *cobj, void (*destr)(void *)); + static void* (*dll_PyCObject_AsVoidPtr)(PyObject *); + # endif ++ # if defined(PY_VERSION_HEX) && PY_VERSION_HEX >= 0x02070000 ++ static int* dll_Py_NoSiteFlag; ++ # endif + + static HINSTANCE hinstPython = 0; /* Instance of python.dll */ + +*************** +*** 633,638 **** +--- 639,647 ---- + {"PyCObject_FromVoidPtr", (PYTHON_PROC*)&dll_PyCObject_FromVoidPtr}, + {"PyCObject_AsVoidPtr", (PYTHON_PROC*)&dll_PyCObject_AsVoidPtr}, + # endif ++ # if defined(PY_VERSION_HEX) && PY_VERSION_HEX >= 0x02070000 ++ {"Py_NoSiteFlag", (PYTHON_PROC*)&dll_Py_NoSiteFlag}, ++ # endif + {"", NULL}, + }; + +*************** +*** 901,906 **** +--- 910,919 ---- + { + if (!initialised) + { ++ #if defined(PY_VERSION_HEX) && PY_VERSION_HEX >= 0x02070000 ++ PyObject *site; ++ #endif ++ + #ifdef DYNAMIC_PYTHON + if (!python_enabled(TRUE)) + { +*************** +*** 915,925 **** +--- 928,956 ---- + + init_structs(); + ++ #if defined(PY_VERSION_HEX) && PY_VERSION_HEX >= 0x02070000 ++ /* Disable implicit 'import site', because it may cause Vim to exit ++ * when it can't be found. */ ++ Py_NoSiteFlag++; ++ #endif ++ + #if !defined(MACOS) || defined(MACOS_X_UNIX) + Py_Initialize(); + #else + PyMac_Initialize(); + #endif ++ ++ #if defined(PY_VERSION_HEX) && PY_VERSION_HEX >= 0x02070000 ++ /* 'import site' explicitly. */ ++ site = PyImport_ImportModule("site"); ++ if (site == NULL) ++ { ++ EMSG(_("E887: Sorry, this command is disabled, the Python's site module could not be loaded.")); ++ goto fail; ++ } ++ Py_DECREF(site); ++ #endif ++ + /* Initialise threads, and below save the state using + * PyEval_SaveThread. Without the call to PyEval_SaveThread, thread + * specific state (such as the system trace hook), will be lost +*** ../vim-7.4.379/src/version.c 2014-07-23 16:33:04.079886500 +0200 +--- src/version.c 2014-07-23 16:43:47.939881872 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 380, + /**/ + +-- +Looking at Perl through Lisp glasses, Perl looks atrocious. + + /// 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/patches/source/vim/patches/7.4.381 b/patches/source/vim/patches/7.4.381 new file mode 100644 index 000000000..188124e77 --- /dev/null +++ b/patches/source/vim/patches/7.4.381 @@ -0,0 +1,45 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.381 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.381 +Problem: Get u_undo error when backspacing in Insert mode deletes more than + one line break. (Ayberk Ozgur) +Solution: Also decrement Insstart.lnum. +Files: src/edit.c + + +*** ../vim-7.4.380/src/edit.c 2014-07-23 13:50:41.839956521 +0200 +--- src/edit.c 2014-07-23 17:35:05.747859751 +0200 +*************** +*** 8833,8838 **** +--- 8833,8839 ---- + return FALSE; + --Insstart_orig.lnum; + Insstart_orig.col = MAXCOL; ++ Insstart = Insstart_orig; + } + /* + * In replace mode: +*** ../vim-7.4.380/src/version.c 2014-07-23 16:56:56.587876204 +0200 +--- src/version.c 2014-07-23 17:38:54.467858107 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 381, + /**/ + +-- +Friends? I have lots of friends! In fact, I have all episodes ever made. + + /// 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/patches/source/vim/patches/7.4.382 b/patches/source/vim/patches/7.4.382 new file mode 100644 index 000000000..e1ca90b7e --- /dev/null +++ b/patches/source/vim/patches/7.4.382 @@ -0,0 +1,52 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.382 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.382 +Problem: Mapping characters may not work after typing Esc in Insert mode. +Solution: Fix the noremap flags for inserted characters. (Jacob Niehus) +Files: src/getchar.c + + +*** ../vim-7.4.381/src/getchar.c 2014-06-25 14:39:35.102348584 +0200 +--- src/getchar.c 2014-07-23 20:10:25.651792765 +0200 +*************** +*** 2731,2736 **** +--- 2731,2741 ---- + } + if (c < 0) + continue; /* end of input script reached */ ++ ++ /* Allow mapping for just typed characters. When we get here c ++ * is the number of extra bytes and typebuf.tb_len is 1. */ ++ for (n = 1; n <= c; ++n) ++ typebuf.tb_noremap[typebuf.tb_off + n] = RM_YES; + typebuf.tb_len += c; + + /* buffer full, don't map */ +*** ../vim-7.4.381/src/version.c 2014-07-23 17:39:21.815857910 +0200 +--- src/version.c 2014-07-23 18:26:42.663837492 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 382, + /**/ + +-- +DENNIS: Oh, very nice. King, eh! I expect you've got a palace and fine + clothes and courtiers and plenty of food. And how d'you get that? By + exploiting the workers! By hanging on to outdated imperialist dogma + which perpetuates the social and economic differences in our society! + "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/patches/source/vim/patches/7.4.383 b/patches/source/vim/patches/7.4.383 new file mode 100644 index 000000000..f02281221 --- /dev/null +++ b/patches/source/vim/patches/7.4.383 @@ -0,0 +1,52 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.383 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.383 +Problem: Bad interaction between preview window and omnifunc. +Solution: Avoid redrawing the status line. (Hirohito Higashi) +Files: src/popupmnu.c + + +*** ../vim-7.4.382/src/popupmnu.c 2014-07-09 19:58:21.111647328 +0200 +--- src/popupmnu.c 2014-07-23 20:56:17.131772989 +0200 +*************** +*** 643,648 **** +--- 643,654 ---- + + if (curwin != curwin_save && win_valid(curwin_save)) + { ++ /* When the first completion is done and the preview ++ * window is not resized, skip the preview window's ++ * status line redrawing. */ ++ if (ins_compl_active() && !resized) ++ curwin->w_redr_status = FALSE; ++ + /* Return cursor to where we were */ + validate_cursor(); + redraw_later(SOME_VALID); +*** ../vim-7.4.382/src/version.c 2014-07-23 20:41:09.895779510 +0200 +--- src/version.c 2014-07-23 20:58:12.079772163 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 383, + /**/ + +-- +ARTHUR: ... and I am your king .... +OLD WOMAN: Ooooh! I didn't know we had a king. I thought we were an + autonomous collective ... + "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/patches/source/vim/patches/7.4.384 b/patches/source/vim/patches/7.4.384 new file mode 100644 index 000000000..6c2b046cb --- /dev/null +++ b/patches/source/vim/patches/7.4.384 @@ -0,0 +1,47 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.384 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.384 +Problem: Test 102 fails when compiled with small features. +Solution: Source small.vim. (Jacob Niehus) +Files: src/testdir/test102.in + + +*** ../vim-7.4.383/src/testdir/test102.in 2013-11-12 05:28:08.000000000 +0100 +--- src/testdir/test102.in 2014-07-27 21:10:34.881282860 +0200 +*************** +*** 1,6 **** +--- 1,7 ---- + Test if fnameescape is correct for special chars like ! + + STARTTEST ++ :so small.vim + :%d + :let fname = 'Xspa ce' + :try | exe "w! " . fnameescape(fname) | put='Space' | endtry +*** ../vim-7.4.383/src/version.c 2014-07-23 21:10:39.867766788 +0200 +--- src/version.c 2014-07-30 13:15:18.047624849 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 384, + /**/ + +-- +An easy way to determine if you have enough teamwork to be doomed is simply to +measure how long it takes from the time you decide to go to lunch together +until the time you actually eat. + (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/patches/source/vim/patches/7.4.385 b/patches/source/vim/patches/7.4.385 new file mode 100644 index 000000000..8cfe09846 --- /dev/null +++ b/patches/source/vim/patches/7.4.385 @@ -0,0 +1,76 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.385 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.385 +Problem: When building with tiny or small features building the .mo files + fails. +Solution: In autoconf do not setup for building the .mo files when it would + fail. +Files: src/configure.in, src/auto/configure + + +*** ../vim-7.4.384/src/configure.in 2014-05-22 14:44:08.094481148 +0200 +--- src/configure.in 2014-07-27 21:26:39.349275928 +0200 +*************** +*** 3818,3824 **** + else + AC_MSG_RESULT([msgfmt not found - disabled]); + fi +! if test $have_gettext = "yes"; then + AC_DEFINE(HAVE_GETTEXT) + MAKEMO=yes + AC_SUBST(MAKEMO) +--- 3818,3824 ---- + else + AC_MSG_RESULT([msgfmt not found - disabled]); + fi +! if test $have_gettext = "yes" -a "x$features" != "xtiny" -a "x$features" != "xsmall"; then + AC_DEFINE(HAVE_GETTEXT) + MAKEMO=yes + AC_SUBST(MAKEMO) +*** ../vim-7.4.384/src/auto/configure 2014-05-22 14:44:08.098481148 +0200 +--- src/auto/configure 2014-07-27 21:26:41.969275909 +0200 +*************** +*** 12966,12972 **** + { $as_echo "$as_me:${as_lineno-$LINENO}: result: msgfmt not found - disabled" >&5 + $as_echo "msgfmt not found - disabled" >&6; }; + fi +! if test $have_gettext = "yes"; then + $as_echo "#define HAVE_GETTEXT 1" >>confdefs.h + + MAKEMO=yes +--- 12966,12972 ---- + { $as_echo "$as_me:${as_lineno-$LINENO}: result: msgfmt not found - disabled" >&5 + $as_echo "msgfmt not found - disabled" >&6; }; + fi +! if test $have_gettext = "yes" -a "x$features" != "xtiny" -a "x$features" != "xsmall"; then + $as_echo "#define HAVE_GETTEXT 1" >>confdefs.h + + MAKEMO=yes +*** ../vim-7.4.384/src/version.c 2014-07-30 13:20:35.719622565 +0200 +--- src/version.c 2014-07-30 13:22:07.295621907 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 385, + /**/ + +-- +"You're fired." (1980) +"You're laid off." (1985) +"You're downsized." (1990) +"You're rightsized." (1992) + (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/patches/source/vim/patches/7.4.386 b/patches/source/vim/patches/7.4.386 new file mode 100644 index 000000000..2b0db1fa2 --- /dev/null +++ b/patches/source/vim/patches/7.4.386 @@ -0,0 +1,186 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.386 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.386 +Problem: When splitting a window the changelist position is wrong. +Solution: Copy the changelist position. (Jacob Niehus) +Files: src/window.c, 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/testdir/test_changelist.in, + src/testdir/test_changelist.ok + + +*** ../vim-7.4.385/src/window.c 2014-07-23 15:21:16.247917462 +0200 +--- src/window.c 2014-07-30 13:55:49.275607374 +0200 +*************** +*** 1178,1183 **** +--- 1178,1188 ---- + p_wh = size; + } + ++ #ifdef FEAT_JUMPLIST ++ /* Keep same changelist position in new window. */ ++ wp->w_changelistidx = oldwin->w_changelistidx; ++ #endif ++ + /* + * make the new window the current window + */ +*** ../vim-7.4.385/src/testdir/Make_amiga.mak 2014-07-23 15:54:43.443903036 +0200 +--- src/testdir/Make_amiga.mak 2014-07-30 13:54:06.871608110 +0200 +*************** +*** 41,46 **** +--- 41,47 ---- + test_listlbr.out \ + test_listlbr_utf8.out \ + test_qf_title.out \ ++ test_changelist.out \ + test_eval.out \ + test_options.out + +*************** +*** 171,175 **** +--- 172,177 ---- + test_listlbr.out: test_listlbr.in + test_listlbr_utf8.out: test_listlbr_utf8.in + test_qf_title.out: test_qf_title.in ++ test_changelist.out: test_changelist.in + test_eval.out: test_eval.in + test_options.out: test_options.in +*** ../vim-7.4.385/src/testdir/Make_dos.mak 2014-07-23 15:54:43.443903036 +0200 +--- src/testdir/Make_dos.mak 2014-07-30 13:54:16.091608044 +0200 +*************** +*** 40,45 **** +--- 40,46 ---- + test_listlbr.out \ + test_listlbr_utf8.out \ + test_qf_title.out \ ++ test_changelist.out \ + test_eval.out \ + test_options.out + +*** ../vim-7.4.385/src/testdir/Make_ming.mak 2014-07-23 15:54:43.443903036 +0200 +--- src/testdir/Make_ming.mak 2014-07-30 13:54:19.775608018 +0200 +*************** +*** 60,65 **** +--- 60,66 ---- + test_listlbr.out \ + test_listlbr_utf8.out \ + test_qf_title.out \ ++ test_changelist.out \ + test_eval.out \ + test_options.out + +*** ../vim-7.4.385/src/testdir/Make_os2.mak 2014-07-23 15:54:43.443903036 +0200 +--- src/testdir/Make_os2.mak 2014-07-30 13:54:24.207607986 +0200 +*************** +*** 38,43 **** +--- 38,44 ---- + test100.out test101.out test102.out test103.out test104.out \ + test105.out test106.out test107.out \ + test_autoformat_join.out \ ++ test_changelist.out \ + test_eval.out \ + test_breakindent.out \ + test_listlbr.out \ +*** ../vim-7.4.385/src/testdir/Make_vms.mms 2014-07-23 15:54:43.443903036 +0200 +--- src/testdir/Make_vms.mms 2014-07-30 13:54:31.151607936 +0200 +*************** +*** 4,10 **** + # Authors: Zoltan Arpadffy, <arpadffy@polarhome.com> + # Sandor Kopanyi, <sandor.kopanyi@mailbox.hu> + # +! # Last change: 2014 Jul 23 + # + # 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, <arpadffy@polarhome.com> + # Sandor Kopanyi, <sandor.kopanyi@mailbox.hu> + # +! # Last change: 2014 Jul 30 + # + # 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. +*************** +*** 101,106 **** +--- 101,107 ---- + test_listlbr.out \ + test_listlbr_utf8.out \ + test_qf_title.out \ ++ test_changelist.out \ + test_eval.out \ + test_options.out + +*** ../vim-7.4.385/src/testdir/Makefile 2014-07-23 15:54:43.443903036 +0200 +--- src/testdir/Makefile 2014-07-30 13:54:45.291607834 +0200 +*************** +*** 38,43 **** +--- 38,44 ---- + test_listlbr.out \ + test_listlbr_utf8.out \ + test_qf_title.out \ ++ test_changelist.out \ + test_eval.out \ + test_options.out + +*** ../vim-7.4.385/src/testdir/test_changelist.in 2014-07-30 14:04:27.507603650 +0200 +--- src/testdir/test_changelist.in 2014-07-30 13:52:21.363608869 +0200 +*************** +*** 0 **** +--- 1,22 ---- ++ Test changelist position after splitting window ++ Set 'undolevels' to make changelist for sourced file ++ ++ STARTTEST ++ :so small.vim ++ Gkylp:set ul=100 ++ Gylp:set ul=100 ++ gg ++ :vsplit ++ :try ++ : normal g; ++ : normal ggVGcpass ++ :catch ++ : normal ggVGcfail ++ :finally ++ : %w! test.out ++ :endtry ++ :qa! ++ ENDTEST ++ ++ 1 ++ 2 +*** ../vim-7.4.385/src/testdir/test_changelist.ok 2014-07-30 14:04:27.515603650 +0200 +--- src/testdir/test_changelist.ok 2014-07-30 13:53:41.991608289 +0200 +*************** +*** 0 **** +--- 1 ---- ++ pass +*** ../vim-7.4.385/src/version.c 2014-07-30 13:22:48.271621613 +0200 +--- src/version.c 2014-07-30 13:56:49.951606938 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 386, + /**/ + +-- +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/patches/source/vim/patches/7.4.387 b/patches/source/vim/patches/7.4.387 new file mode 100644 index 000000000..ff0b2a0eb --- /dev/null +++ b/patches/source/vim/patches/7.4.387 @@ -0,0 +1,199 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.387 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.387 +Problem: "4gro" replaces one character then executes "ooo". (Urtica Dioica) +Solution: Write the ESC in the second stuff buffer. +Files: src/getchar.c, src/proto/getchar.pro, src/edit.c, + 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/testdir/test_insertcount.in, src/testdir/test_insertcount.ok + + +*** ../vim-7.4.386/src/getchar.c 2014-07-23 20:41:09.891779510 +0200 +--- src/getchar.c 2014-07-30 14:35:08.831590415 +0200 +*************** +*** 678,683 **** +--- 678,694 ---- + add_buff(&readbuf1, s, -1L); + } + ++ /* ++ * Append string "s" to the redo stuff buffer. ++ * CSI and K_SPECIAL must already have been escaped. ++ */ ++ void ++ stuffRedoReadbuff(s) ++ char_u *s; ++ { ++ add_buff(&readbuf2, s, -1L); ++ } ++ + void + stuffReadbuffLen(s, len) + char_u *s; +*** ../vim-7.4.386/src/proto/getchar.pro 2014-02-11 15:10:38.134111836 +0100 +--- src/proto/getchar.pro 2014-07-30 14:36:18.851589912 +0200 +*************** +*** 15,20 **** +--- 15,21 ---- + void AppendCharToRedobuff __ARGS((int c)); + void AppendNumberToRedobuff __ARGS((long n)); + void stuffReadbuff __ARGS((char_u *s)); ++ void stuffRedoReadbuff __ARGS((char_u *s)); + void stuffReadbuffLen __ARGS((char_u *s, long len)); + void stuffReadbuffSpec __ARGS((char_u *s)); + void stuffcharReadbuff __ARGS((int c)); +*** ../vim-7.4.386/src/edit.c 2014-07-23 17:39:21.815857910 +0200 +--- src/edit.c 2014-07-30 14:47:56.875584895 +0200 +*************** +*** 8389,8395 **** + + (void)start_redo_ins(); + if (cmdchar == 'r' || cmdchar == 'v') +! stuffReadbuff(ESC_STR); /* no ESC in redo buffer */ + ++RedrawingDisabled; + disabled_redraw = TRUE; + return FALSE; /* repeat the insert */ +--- 8389,8395 ---- + + (void)start_redo_ins(); + if (cmdchar == 'r' || cmdchar == 'v') +! stuffRedoReadbuff(ESC_STR); /* no ESC in redo buffer */ + ++RedrawingDisabled; + disabled_redraw = TRUE; + return FALSE; /* repeat the insert */ +*** ../vim-7.4.386/src/testdir/Make_amiga.mak 2014-07-30 14:04:49.131603494 +0200 +--- src/testdir/Make_amiga.mak 2014-07-30 15:57:52.819554737 +0200 +*************** +*** 43,48 **** +--- 43,49 ---- + test_qf_title.out \ + test_changelist.out \ + test_eval.out \ ++ test_insertcount.out \ + test_options.out + + .SUFFIXES: .in .out +*************** +*** 174,177 **** +--- 175,179 ---- + test_qf_title.out: test_qf_title.in + test_changelist.out: test_changelist.in + test_eval.out: test_eval.in ++ test_insertcount.out: test_insertcount.in + test_options.out: test_options.in +*** ../vim-7.4.386/src/testdir/Make_dos.mak 2014-07-30 14:04:49.131603494 +0200 +--- src/testdir/Make_dos.mak 2014-07-30 15:57:59.071554692 +0200 +*************** +*** 42,47 **** +--- 42,48 ---- + test_qf_title.out \ + test_changelist.out \ + test_eval.out \ ++ test_insertcount.out \ + test_options.out + + SCRIPTS32 = test50.out test70.out +*** ../vim-7.4.386/src/testdir/Make_ming.mak 2014-07-30 14:04:49.131603494 +0200 +--- src/testdir/Make_ming.mak 2014-07-30 15:58:02.351554669 +0200 +*************** +*** 62,67 **** +--- 62,68 ---- + test_qf_title.out \ + test_changelist.out \ + test_eval.out \ ++ test_insertcount.out \ + test_options.out + + SCRIPTS32 = test50.out test70.out +*** ../vim-7.4.386/src/testdir/Make_os2.mak 2014-07-30 14:04:49.131603494 +0200 +--- src/testdir/Make_os2.mak 2014-07-30 15:58:05.975554643 +0200 +*************** +*** 40,45 **** +--- 40,46 ---- + test_autoformat_join.out \ + test_changelist.out \ + test_eval.out \ ++ test_insertcount.out \ + test_breakindent.out \ + test_listlbr.out \ + test_listlbr_utf8.out \ +*** ../vim-7.4.386/src/testdir/Make_vms.mms 2014-07-30 14:04:49.131603494 +0200 +--- src/testdir/Make_vms.mms 2014-07-30 15:58:10.099554613 +0200 +*************** +*** 103,108 **** +--- 103,109 ---- + test_qf_title.out \ + test_changelist.out \ + test_eval.out \ ++ test_insertcount.out \ + test_options.out + + # Known problems: +*** ../vim-7.4.386/src/testdir/Makefile 2014-07-30 14:04:49.131603494 +0200 +--- src/testdir/Makefile 2014-07-30 15:58:16.539554567 +0200 +*************** +*** 40,45 **** +--- 40,46 ---- + test_qf_title.out \ + test_changelist.out \ + test_eval.out \ ++ test_insertcount.out \ + test_options.out + + SCRIPTS_GUI = test16.out +*** ../vim-7.4.386/src/testdir/test_insertcount.in 2014-07-30 15:56:12.087555461 +0200 +--- src/testdir/test_insertcount.in 2014-07-30 14:47:36.335585043 +0200 +*************** +*** 0 **** +--- 1,14 ---- ++ Tests for repeating insert and replace. ++ ++ STARTTEST ++ :so small.vim ++ :/Second ++ 4gro ++ :/^First/,$wq! test.out ++ :" get here when failed and in Insert mode ++ :.wq! test.out ++ ENDTEST ++ ++ First line ++ Second line ++ Last line +*** ../vim-7.4.386/src/testdir/test_insertcount.ok 2014-07-30 15:56:12.091555461 +0200 +--- src/testdir/test_insertcount.ok 2014-07-30 14:45:43.491585854 +0200 +*************** +*** 0 **** +--- 1,3 ---- ++ First line ++ ooooecond line ++ Last line +*** ../vim-7.4.386/src/version.c 2014-07-30 14:04:49.131603494 +0200 +--- src/version.c 2014-07-30 14:48:45.039584549 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 387, + /**/ + +-- +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/patches/source/vim/patches/7.4.388 b/patches/source/vim/patches/7.4.388 new file mode 100644 index 000000000..21db642a6 --- /dev/null +++ b/patches/source/vim/patches/7.4.388 @@ -0,0 +1,98 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.388 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.388 +Problem: With 'linebreak' set and 'list' unset a Tab is not counted + properly. (Kent Sibilev) +Solution: Check the 'list' option. (Christian Brabandt) +Files: src/screen.c, src/testdir/test_listlbr_utf8.in, + src/testdir/test_listlbr_utf8.ok + + +*** ../vim-7.4.387/src/screen.c 2014-07-16 17:29:46.691536252 +0200 +--- src/screen.c 2014-07-30 16:41:15.167536033 +0200 +*************** +*** 4494,4500 **** + tab_len = (int)wp->w_buffer->b_p_ts + - vcol % (int)wp->w_buffer->b_p_ts - 1; + #ifdef FEAT_LINEBREAK +! if (!wp->w_p_lbr) + #endif + /* tab amount depends on current column */ + n_extra = tab_len; +--- 4494,4500 ---- + tab_len = (int)wp->w_buffer->b_p_ts + - vcol % (int)wp->w_buffer->b_p_ts - 1; + #ifdef FEAT_LINEBREAK +! if (!wp->w_p_lbr || !wp->w_p_list) + #endif + /* tab amount depends on current column */ + n_extra = tab_len; +*** ../vim-7.4.387/src/testdir/test_listlbr_utf8.in 2014-07-16 17:01:38.279570568 +0200 +--- src/testdir/test_listlbr_utf8.in 2014-07-30 16:37:26.703537675 +0200 +*************** +*** 30,40 **** +--- 30,51 ---- + :redraw! + :let line=ScreenChar(winwidth(0)) + :call DoRecordScreen() ++ :" + :let g:test ="Test 2: set nolinebreak list" + :set list nolinebreak + :redraw! + :let line=ScreenChar(winwidth(0)) + :call DoRecordScreen() ++ :" ++ :let g:test ="Test 3: set linebreak nolist" ++ :$put =\"\t*mask = nil;\" ++ :$ ++ :norm! zt ++ :set nolist linebreak ++ :redraw! ++ :let line=ScreenChar(winwidth(0)) ++ :call DoRecordScreen() ++ :" + :%w! test.out + :qa! + ENDTEST +*** ../vim-7.4.387/src/testdir/test_listlbr_utf8.ok 2014-07-16 17:01:38.279570568 +0200 +--- src/testdir/test_listlbr_utf8.ok 2014-07-30 16:40:17.043536451 +0200 +*************** +*** 12,14 **** +--- 12,21 ---- + +pqrstuvwxyz␣1060ABC + +DEFGHIJKLMNOPˑ¶ + ¶ ++ *mask = nil; ++ ++ Test 3: set linebreak nolist ++ *mask = nil; ++ ~ ++ ~ ++ ~ +*** ../vim-7.4.387/src/version.c 2014-07-30 16:00:45.551553496 +0200 +--- src/version.c 2014-07-30 16:40:57.659536159 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 388, + /**/ + +-- +You can test a person's importance in the organization by asking how much RAM +his computer has. Anybody who knows the answer to that question is not a +decision-maker. + (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/patches/source/vim/patches/7.4.389 b/patches/source/vim/patches/7.4.389 new file mode 100644 index 000000000..6778941a1 --- /dev/null +++ b/patches/source/vim/patches/7.4.389 @@ -0,0 +1,490 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.389 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.389 +Problem: Still sometimes Vim enters Replace mode when starting up. +Solution: Use a different solution in detecting the termresponse and + location response. (Hayaki Saito) +Files: src/globals.h, src/os_unix.c, src/term.c, src/proto/term.pro + + +*** ../vim-7.4.388/src/globals.h 2014-06-12 14:01:27.575769788 +0200 +--- src/globals.h 2014-07-30 17:02:57.711526671 +0200 +*************** +*** 1336,1344 **** + #if defined(UNIX) || defined(VMS) + EXTERN int term_is_xterm INIT(= FALSE); /* xterm-like 'term' */ + #endif +- #if defined(UNIX) +- EXTERN int xterm_conflict_mouse INIT(= FALSE); +- #endif + + #ifdef BACKSLASH_IN_FILENAME + EXTERN char psepc INIT(= '\\'); /* normal path separator character */ +--- 1336,1341 ---- +*** ../vim-7.4.388/src/os_unix.c 2014-07-09 19:13:45.007701718 +0200 +--- src/os_unix.c 2014-07-30 17:06:02.375525344 +0200 +*************** +*** 3667,3674 **** + void + check_mouse_termcode() + { +- xterm_conflict_mouse = FALSE; +- + # ifdef FEAT_MOUSE_XTERM + if (use_xterm_mouse() + # ifdef FEAT_MOUSE_URXVT +--- 3667,3672 ---- +*************** +*** 3713,3719 **** + # endif + + # ifdef FEAT_MOUSE_JSB +! /* There is no conflict, but it was disabled for xterm before. */ + if (!use_xterm_mouse() + # ifdef FEAT_GUI + && !gui.in_use +--- 3711,3717 ---- + # endif + + # ifdef FEAT_MOUSE_JSB +! /* Conflicts with xterm mouse: "\033[" and "\033[M" ??? */ + if (!use_xterm_mouse() + # ifdef FEAT_GUI + && !gui.in_use +*************** +*** 3740,3784 **** + # endif + + # ifdef FEAT_MOUSE_DEC +! /* Conflicts with xterm mouse: "\033[" and "\033[M". +! * Also conflicts with the xterm termresponse, skip this if it was +! * requested already. */ + if (!use_xterm_mouse() +- # ifdef FEAT_TERMRESPONSE +- && !did_request_esc_sequence() +- # endif + # ifdef FEAT_GUI + && !gui.in_use + # endif + ) +- { + set_mouse_termcode(KS_DEC_MOUSE, (char_u *)(term_is_8bit(T_NAME) + ? IF_EB("\233", CSI_STR) : IF_EB("\033[", ESC_STR "["))); +- xterm_conflict_mouse = TRUE; +- } + else + del_mouse_termcode(KS_DEC_MOUSE); + # endif + # ifdef FEAT_MOUSE_PTERM +! /* same as the dec mouse */ + if (!use_xterm_mouse() +- # ifdef FEAT_TERMRESPONSE +- && !did_request_esc_sequence() +- # endif + # ifdef FEAT_GUI + && !gui.in_use + # endif + ) +- { + set_mouse_termcode(KS_PTERM_MOUSE, + (char_u *) IF_EB("\033[", ESC_STR "[")); +- xterm_conflict_mouse = TRUE; +- } + else + del_mouse_termcode(KS_PTERM_MOUSE); + # endif + # ifdef FEAT_MOUSE_URXVT +! /* same as the dec mouse */ + if (use_xterm_mouse() == 3 + # ifdef FEAT_GUI + && !gui.in_use +--- 3738,3768 ---- + # endif + + # ifdef FEAT_MOUSE_DEC +! /* Conflicts with xterm mouse: "\033[" and "\033[M" */ + if (!use_xterm_mouse() + # ifdef FEAT_GUI + && !gui.in_use + # endif + ) + set_mouse_termcode(KS_DEC_MOUSE, (char_u *)(term_is_8bit(T_NAME) + ? IF_EB("\233", CSI_STR) : IF_EB("\033[", ESC_STR "["))); + else + del_mouse_termcode(KS_DEC_MOUSE); + # endif + # ifdef FEAT_MOUSE_PTERM +! /* same conflict as the dec mouse */ + if (!use_xterm_mouse() + # ifdef FEAT_GUI + && !gui.in_use + # endif + ) + set_mouse_termcode(KS_PTERM_MOUSE, + (char_u *) IF_EB("\033[", ESC_STR "[")); + else + del_mouse_termcode(KS_PTERM_MOUSE); + # endif + # ifdef FEAT_MOUSE_URXVT +! /* same conflict as the dec mouse */ + if (use_xterm_mouse() == 3 + # ifdef FEAT_GUI + && !gui.in_use +*************** +*** 3794,3801 **** + mch_setmouse(FALSE); + setmouse(); + } +- /* It's OK to request the xterm version for uxterm. */ +- resume_get_esc_sequence(); + } + else + del_mouse_termcode(KS_URXVT_MOUSE); +--- 3778,3783 ---- +*** ../vim-7.4.388/src/term.c 2014-07-09 20:51:04.519583033 +0200 +--- src/term.c 2014-07-30 17:20:54.915518929 +0200 +*************** +*** 153,163 **** + static char_u *vim_tgetstr __ARGS((char *s, char_u **pp)); + #endif /* HAVE_TGETENT */ + +- #if defined(FEAT_TERMRESPONSE) +- static int xt_index_in = 0; +- static int xt_index_out = 0; +- #endif +- + static int detected_8bit = FALSE; /* detected 8-bit terminal */ + + static struct builtin_term builtin_termcaps[] = +--- 153,158 ---- +*************** +*** 3312,3351 **** + } + + #if defined(FEAT_TERMRESPONSE) || defined(PROTO) +- # if defined(UNIX) || defined(PROTO) +- /* +- * Return TRUE when the xterm version was requested or anything else that +- * would send an ESC sequence back to Vim. +- * If not sent yet, prevent it from being sent soon. +- * Used to check whether it is OK to enable checking for DEC mouse codes, +- * which conflict with may xterm ESC sequences. +- */ +- int +- did_request_esc_sequence() +- { +- if (crv_status == CRV_GET) +- crv_status = 0; +- if (u7_status == U7_GET) +- u7_status = 0; +- return crv_status == CRV_SENT || u7_status == U7_SENT +- || xt_index_out > xt_index_in; +- } +- +- /* +- * If requesting the version was disabled in did_request_esc_sequence(), +- * enable it again. +- */ +- void +- resume_get_esc_sequence() +- { +- if (crv_status == 0) +- crv_status = CRV_GET; +- if (u7_status == 0) +- u7_status = U7_GET; +- } +- # endif +- +- + /* + * Request version string (for xterm) when needed. + * Only do this after switching to raw mode, otherwise the result will be +--- 3307,3312 ---- +*************** +*** 3358,3365 **** + * Insert mode. + * On Unix only do it when both output and input are a tty (avoid writing + * request to terminal while reading from a file). +- * Do not do this when a mouse is being detected that starts with the same ESC +- * sequence as the termresponse. + * The result is caught in check_termcode(). + */ + void +--- 3319,3324 ---- +*************** +*** 3373,3379 **** + # ifdef UNIX + && isatty(1) + && isatty(read_cmd_fd) +- && !xterm_conflict_mouse + # endif + && *T_CRV != NUL) + { +--- 3332,3337 ---- +*************** +*** 3742,3749 **** + #if defined(WIN3264) && !defined(FEAT_GUI) + if (s[0] == K_NUL) + { +! STRMOVE(s + 1, s); +! s[1] = 3; + } + #endif + +--- 3700,3707 ---- + #if defined(WIN3264) && !defined(FEAT_GUI) + if (s[0] == K_NUL) + { +! STRMOVE(s + 1, s); +! s[1] = 3; + } + #endif + +*************** +*** 4212,4235 **** + + #ifdef FEAT_TERMRESPONSE + if (key_name[0] == NUL +! /* URXVT mouse uses <ESC>[#;#;#M, but we are matching <ESC>[ */ + || key_name[0] == KS_URXVT_MOUSE +- # ifdef FEAT_MBYTE +- || u7_status == U7_SENT + # endif +! ) + { +! /* Check for some responses from terminal start with "<Esc>[" or +! * CSI. + * +! * - xterm version string: <Esc>[>{x};{vers};{y}c + * Also eat other possible responses to t_RV, rxvt returns + * "<Esc>[?1;2c". Also accept CSI instead of <Esc>[. + * mrxvt has been reported to have "+" in the version. Assume + * the escape sequence ends with a letter or one of "{|}~". + * +! * - cursor position report: <Esc>[{row};{col}R +! * The final byte is 'R'. now it is only used for checking for + * ambiguous-width character state. + */ + p = tp[0] == CSI ? tp + 1 : tp + 2; +--- 4170,4200 ---- + + #ifdef FEAT_TERMRESPONSE + if (key_name[0] == NUL +! /* Mouse codes of DEC, pterm, and URXVT start with <ESC>[. When +! * detecting the start of these mouse codes they might as well be +! * another key code or terminal response. */ +! # ifdef FEAT_MOUSE_DEC +! || key_name[0] == KS_DEC_MOUSE +! # endif +! # ifdef FEAT_MOUSE_PTERM +! || key_name[0] == KS_PTERM_MOUSE +! # endif +! # ifdef FEAT_MOUSE_URXVT + || key_name[0] == KS_URXVT_MOUSE + # endif +! ) + { +! /* Check for some responses from the terminal starting with +! * "<Esc>[" or CSI: + * +! * - Xterm version string: <Esc>[>{x};{vers};{y}c + * Also eat other possible responses to t_RV, rxvt returns + * "<Esc>[?1;2c". Also accept CSI instead of <Esc>[. + * mrxvt has been reported to have "+" in the version. Assume + * the escape sequence ends with a letter or one of "{|}~". + * +! * - Cursor position report: <Esc>[{row};{col}R +! * The final byte must be 'R'. It is used for checking the + * ambiguous-width character state. + */ + p = tp[0] == CSI ? tp + 1 : tp + 2; +*************** +*** 4269,4304 **** + * u7_status is not "sent", it may be from a previous Vim that + * just exited. But not for <S-F3>, it sends something + * similar, check for row and column to make sense. */ +! if (j == 1 && tp[i] == 'R' && row_char == '2' && col >= 2) + { +! char *aw = NULL; + +! LOG_TR("Received U7 status"); +! u7_status = U7_GOT; + # ifdef FEAT_AUTOCMD +! did_cursorhold = TRUE; + # endif +! if (col == 2) +! aw = "single"; +! else if (col == 3) +! aw = "double"; +! if (aw != NULL && STRCMP(aw, p_ambw) != 0) +! { +! /* Setting the option causes a screen redraw. Do that +! * right away if possible, keeping any messages. */ +! set_option_value((char_u *)"ambw", 0L, (char_u *)aw, 0); +! # ifdef DEBUG_TERMRESPONSE + { +! char buf[100]; +! int r = redraw_asap(CLEAR); + +! sprintf(buf, "set 'ambiwidth', redraw_asap(): %d", +! r); +! log_tr(buf); +! } + # else +! redraw_asap(CLEAR); + # endif + } + key_name[0] = (int)KS_EXTRA; + key_name[1] = (int)KE_IGNORE; +--- 4234,4275 ---- + * u7_status is not "sent", it may be from a previous Vim that + * just exited. But not for <S-F3>, it sends something + * similar, check for row and column to make sense. */ +! if (j == 1 && tp[i] == 'R') + { +! if (row_char == '2' && col >= 2) +! { +! char *aw = NULL; + +! LOG_TR("Received U7 status"); +! u7_status = U7_GOT; + # ifdef FEAT_AUTOCMD +! did_cursorhold = TRUE; + # endif +! if (col == 2) +! aw = "single"; +! else if (col == 3) +! aw = "double"; +! if (aw != NULL && STRCMP(aw, p_ambw) != 0) + { +! /* Setting the option causes a screen redraw. Do +! * that right away if possible, keeping any +! * messages. */ +! set_option_value((char_u *)"ambw", 0L, +! (char_u *)aw, 0); +! # ifdef DEBUG_TERMRESPONSE +! { +! char buf[100]; +! int r = redraw_asap(CLEAR); + +! sprintf(buf, +! "set 'ambiwidth', redraw_asap(): %d", +! r); +! log_tr(buf); +! } + # else +! redraw_asap(CLEAR); + # endif ++ } + } + key_name[0] = (int)KS_EXTRA; + key_name[1] = (int)KE_IGNORE; +*************** +*** 4563,4581 **** + return -1; + + /* when mouse reporting is SGR, add 32 to mouse code */ +! if (key_name[0] == KS_SGR_MOUSE) +! mouse_code += 32; + + mouse_col = getdigits(&p) - 1; + if (*p++ != ';') + return -1; + + mouse_row = getdigits(&p) - 1; +! if (key_name[0] == KS_SGR_MOUSE && *p == 'm') + mouse_code |= MOUSE_RELEASE; +! else if (*p != 'M') + return -1; +! p++; + + slen += (int)(p - (tp + slen)); + +--- 4534,4552 ---- + return -1; + + /* when mouse reporting is SGR, add 32 to mouse code */ +! if (key_name[0] == KS_SGR_MOUSE) +! mouse_code += 32; + + mouse_col = getdigits(&p) - 1; + if (*p++ != ';') + return -1; + + mouse_row = getdigits(&p) - 1; +! if (key_name[0] == KS_SGR_MOUSE && *p == 'm') + mouse_code |= MOUSE_RELEASE; +! else if (*p != 'M') + return -1; +! p++; + + slen += (int)(p - (tp + slen)); + +*************** +*** 4592,4598 **** + for (slen2 = slen; slen2 < len; slen2++) + { + if (tp[slen2] == 'M' +! || (key_name[0] == KS_SGR_MOUSE + && tp[slen2] == 'm')) + { + cmd_complete = 1; +--- 4563,4569 ---- + for (slen2 = slen; slen2 < len; slen2++) + { + if (tp[slen2] == 'M' +! || (key_name[0] == KS_SGR_MOUSE + && tp[slen2] == 'm')) + { + cmd_complete = 1; +*************** +*** 5769,5774 **** +--- 5740,5748 ---- + * termcap codes from the terminal itself. + * We get them one by one to avoid a very long response string. + */ ++ static int xt_index_in = 0; ++ static int xt_index_out = 0; ++ + static void + req_codes_from_term() + { +*** ../vim-7.4.388/src/proto/term.pro 2014-07-09 19:13:45.007701718 +0200 +--- src/proto/term.pro 2014-07-30 17:04:40.791525930 +0200 +*************** +*** 34,41 **** + void settmode __ARGS((int tmode)); + void starttermcap __ARGS((void)); + void stoptermcap __ARGS((void)); +- int did_request_esc_sequence __ARGS((void)); +- void resume_get_esc_sequence __ARGS((void)); + void may_req_termresponse __ARGS((void)); + void may_req_ambiguous_char_width __ARGS((void)); + int swapping_screen __ARGS((void)); +--- 34,39 ---- +*** ../vim-7.4.388/src/version.c 2014-07-30 16:44:17.503534723 +0200 +--- src/version.c 2014-07-30 17:03:13.715526556 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 389, + /**/ + +-- +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/patches/source/vim/patches/7.4.390 b/patches/source/vim/patches/7.4.390 new file mode 100644 index 000000000..5dcc9c5c6 --- /dev/null +++ b/patches/source/vim/patches/7.4.390 @@ -0,0 +1,51 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.390 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.390 +Problem: Advancing pointer over end of a string. +Solution: Init quote character to -1 instead of zero. (Dominique Pelle) +Files: src/misc1.c + + +*** ../vim-7.4.389/src/misc1.c 2014-07-03 22:57:51.299862927 +0200 +--- src/misc1.c 2014-08-06 12:43:33.191291602 +0200 +*************** +*** 5503,5509 **** + char_u *text; + { + char_u *s = skipwhite(text); +! int quote = 0; + + if (*s == '\'' || *s == '"') + { +--- 5503,5509 ---- + char_u *text; + { + char_u *s = skipwhite(text); +! int quote = -1; + + if (*s == '\'' || *s == '"') + { +*** ../vim-7.4.389/src/version.c 2014-07-30 17:21:53.819518506 +0200 +--- src/version.c 2014-08-06 12:44:31.643291182 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 390, + /**/ + +-- +A radioactive cat has eighteen half-lives. + + /// 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/patches/source/vim/patches/7.4.391 b/patches/source/vim/patches/7.4.391 new file mode 100644 index 000000000..e2edae0e7 --- /dev/null +++ b/patches/source/vim/patches/7.4.391 @@ -0,0 +1,118 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.391 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.391 +Problem: No 'cursorline' highlighting when the cursor is on a line with + diff highlighting. (Benjamin Fritz) +Solution: Combine the highlight attributes. (Christian Brabandt) +Files: src/screen.c + + +*** ../vim-7.4.390/src/screen.c 2014-07-30 16:44:17.499534723 +0200 +--- src/screen.c 2014-08-06 13:14:02.163278457 +0200 +*************** +*** 3702,3708 **** +--- 3702,3713 ---- + char_attr = 0; /* was: hl_attr(HLF_AT); */ + #ifdef FEAT_DIFF + if (diff_hlf != (hlf_T)0) ++ { + char_attr = hl_attr(diff_hlf); ++ if (wp->w_p_cul && lnum == wp->w_cursor.lnum) ++ char_attr = hl_combine_attr(char_attr, ++ hl_attr(HLF_CUL)); ++ } + #endif + p_extra = NULL; + c_extra = ' '; +*************** +*** 3753,3759 **** + #ifdef FEAT_SYN_HL + /* combine 'showbreak' with 'cursorline' */ + if (wp->w_p_cul && lnum == wp->w_cursor.lnum) +! char_attr = hl_combine_attr(char_attr, HLF_CLN); + #endif + } + # endif +--- 3758,3765 ---- + #ifdef FEAT_SYN_HL + /* combine 'showbreak' with 'cursorline' */ + if (wp->w_p_cul && lnum == wp->w_cursor.lnum) +! char_attr = hl_combine_attr(char_attr, +! hl_attr(HLF_CUL)); + #endif + } + # endif +*************** +*** 3931,3936 **** +--- 3937,3944 ---- + && n_extra == 0) + diff_hlf = HLF_CHD; /* changed line */ + line_attr = hl_attr(diff_hlf); ++ if (wp->w_p_cul && lnum == wp->w_cursor.lnum) ++ line_attr = hl_combine_attr(line_attr, hl_attr(HLF_CUL)); + } + #endif + +*************** +*** 4729,4735 **** +--- 4737,4748 ---- + { + diff_hlf = HLF_CHD; + if (attr == 0 || char_attr != attr) ++ { + char_attr = hl_attr(diff_hlf); ++ if (wp->w_p_cul && lnum == wp->w_cursor.lnum) ++ char_attr = hl_combine_attr(char_attr, ++ hl_attr(HLF_CUL)); ++ } + } + # endif + } +*************** +*** 10174,10182 **** + break; + screen_puts_len(NameBuff, len, 0, col, + #if defined(FEAT_SYN_HL) +! hl_combine_attr(attr, hl_attr(HLF_T)) + #else +! attr + #endif + ); + col += len; +--- 10187,10195 ---- + break; + screen_puts_len(NameBuff, len, 0, col, + #if defined(FEAT_SYN_HL) +! hl_combine_attr(attr, hl_attr(HLF_T)) + #else +! attr + #endif + ); + col += len; +*** ../vim-7.4.390/src/version.c 2014-08-06 12:49:06.711289205 +0200 +--- src/version.c 2014-08-06 13:19:19.135276179 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 391, + /**/ + +-- +It's totally unfair to suggest - as many have - that engineers are socially +inept. Engineers simply have different objectives when it comes to social +interaction. + (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/patches/source/vim/patches/7.4.392 b/patches/source/vim/patches/7.4.392 new file mode 100644 index 000000000..48a73285f --- /dev/null +++ b/patches/source/vim/patches/7.4.392 @@ -0,0 +1,86 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.392 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.392 +Problem: Not easy to detect type of command line window. +Solution: Add the getcmdwintype() function. (Jacob Niehus) +Files: src/eval.c + + +*** ../vim-7.4.391/src/eval.c 2014-07-09 17:51:46.075801693 +0200 +--- src/eval.c 2014-08-06 13:35:59.303268990 +0200 +*************** +*** 554,559 **** +--- 554,560 ---- + static void f_getcmdline __ARGS((typval_T *argvars, typval_T *rettv)); + static void f_getcmdpos __ARGS((typval_T *argvars, typval_T *rettv)); + static void f_getcmdtype __ARGS((typval_T *argvars, typval_T *rettv)); ++ static void f_getcmdwintype __ARGS((typval_T *argvars, typval_T *rettv)); + static void f_getcwd __ARGS((typval_T *argvars, typval_T *rettv)); + static void f_getfontname __ARGS((typval_T *argvars, typval_T *rettv)); + static void f_getfperm __ARGS((typval_T *argvars, typval_T *rettv)); +*************** +*** 7984,7989 **** +--- 7985,7991 ---- + {"getcmdline", 0, 0, f_getcmdline}, + {"getcmdpos", 0, 0, f_getcmdpos}, + {"getcmdtype", 0, 0, f_getcmdtype}, ++ {"getcmdwintype", 0, 0, f_getcmdwintype}, + {"getcurpos", 0, 0, f_getcurpos}, + {"getcwd", 0, 0, f_getcwd}, + {"getfontname", 0, 1, f_getfontname}, +*************** +*** 11503,11508 **** +--- 11505,11530 ---- + } + + /* ++ * "getcmdwintype()" function ++ */ ++ static void ++ f_getcmdwintype(argvars, rettv) ++ typval_T *argvars UNUSED; ++ typval_T *rettv; ++ { ++ rettv->v_type = VAR_STRING; ++ rettv->vval.v_string = NULL; ++ #ifdef FEAT_CMDWIN ++ rettv->vval.v_string = alloc(2); ++ if (rettv->vval.v_string != NULL) ++ { ++ rettv->vval.v_string[0] = cmdwin_type; ++ rettv->vval.v_string[1] = NUL; ++ } ++ #endif ++ } ++ ++ /* + * "getcwd()" function + */ + static void +*** ../vim-7.4.391/src/version.c 2014-08-06 13:20:51.799275513 +0200 +--- src/version.c 2014-08-06 13:34:42.903269539 +0200 +*************** +*** 736,737 **** +--- 736,739 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 392, + /**/ + +-- +I learned the customs and mannerisms of engineers by observing them, much the +way Jane Goodall learned about the great apes, but without the hassle of +grooming. + (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/patches/source/vim/patches/7.4.393 b/patches/source/vim/patches/7.4.393 new file mode 100644 index 000000000..957ce2460 --- /dev/null +++ b/patches/source/vim/patches/7.4.393 @@ -0,0 +1,1946 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.393 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.393 +Problem: Text drawing on newer MS-Windows systems is suboptimal. Some + multi-byte characters are not displayed, even though the same font + in Notepad can display them. (Srinath Avadhanula) +Solution: Add the 'renderoptions' option to enable Direct-X drawing. (Taro + Muraoka) +Files: runtime/doc/eval.txt, runtime/doc/options.txt, + runtime/doc/various.txt, src/Make_cyg.mak, src/Make_ming.mak, + src/Make_mvc.mak, src/eval.c, src/gui_dwrite.cpp, + src/gui_dwrite.h, src/gui_w32.c, src/gui_w48.c, src/option.c, + src/option.h, src/version.c, src/vim.h, src/proto/gui_w32.pro + + +*** ../vim-7.4.392/runtime/doc/eval.txt 2014-06-25 18:15:18.442838249 +0200 +--- runtime/doc/eval.txt 2014-08-06 14:35:24.871243363 +0200 +*************** +*** 6606,6611 **** +--- 6622,6628 ---- + dialog_gui Compiled with GUI dialog support. + diff Compiled with |vimdiff| and 'diff' support. + digraphs Compiled with support for digraphs. ++ directx Compiled with support for Direct-X and 'renderoptions'. + dnd Compiled with support for the "~ register |quote_~|. + dos16 16 bits DOS version of Vim. + dos32 32 bits DOS (DJGPP) version of Vim. +*************** +*** 6744,6750 **** + writebackup Compiled with 'writebackup' default on. + xfontset Compiled with X fontset support |xfontset|. + xim Compiled with X input method support |xim|. +! xpm_w32 Compiled with pixmap support for Win32. + xsmp Compiled with X session management support. + xsmp_interact Compiled with interactive X session management support. + xterm_clipboard Compiled with support for xterm clipboard. +--- 6761,6769 ---- + writebackup Compiled with 'writebackup' default on. + xfontset Compiled with X fontset support |xfontset|. + xim Compiled with X input method support |xim|. +! xpm Compiled with pixmap support. +! xpm_w32 Compiled with pixmap support for Win32. (Only for +! backward compatibility. Use "xpm" instead.) + xsmp Compiled with X session management support. + xsmp_interact Compiled with interactive X session management support. + xterm_clipboard Compiled with support for xterm clipboard. +*** ../vim-7.4.392/runtime/doc/options.txt 2014-07-02 19:59:35.446375136 +0200 +--- runtime/doc/options.txt 2014-08-06 14:36:59.591242682 +0200 +*************** +*** 5647,5652 **** +--- 5650,5726 ---- + this option at the default "on". Only switch it off when working with + old Vi scripts. + ++ *'renderoptions'* *'rop'* ++ 'renderoptions' 'rop' string (default: empty) ++ global ++ {not in Vi} ++ {only available when compiled with GUI and DIRECTX on ++ MS-Windows} ++ Select a text renderer and set its options. The options depend on the ++ renderer. ++ ++ Syntax: > ++ set rop=type:{renderer}(,{name}:{value})* ++ < ++ Currently, only one optional renderer is available. ++ ++ render behavior ~ ++ directx Vim will draw text using DirectX (DirectWrite). It makes ++ drawn glyphs more beautiful than default GDI. ++ It requires 'encoding' is "utf-8", and only works on ++ MS-Windows Vista or newer version. ++ ++ Options: ++ name meaning type value ~ ++ gamma gamma float 1.0 - 2.2 (maybe) ++ contrast enhancedContrast float (unknown) ++ level clearTypeLevel float (unknown) ++ geom pixelGeometry int 0 - 2 (see below) ++ renmode renderingMode int 0 - 6 (see below) ++ taamode textAntialiasMode int 0 - 3 (see below) ++ ++ See this URL for detail: ++ http://msdn.microsoft.com/en-us/library/dd368190.aspx ++ ++ For geom: structure of a device pixel. ++ 0 - DWRITE_PIXEL_GEOMETRY_FLAT ++ 1 - DWRITE_PIXEL_GEOMETRY_RGB ++ 2 - DWRITE_PIXEL_GEOMETRY_BGR ++ ++ See this URL for detail: ++ http://msdn.microsoft.com/en-us/library/dd368114.aspx ++ ++ For renmode: method of rendering glyphs. ++ 0 - DWRITE_RENDERING_MODE_DEFAULT ++ 1 - DWRITE_RENDERING_MODE_ALIASED ++ 2 - DWRITE_RENDERING_MODE_GDI_CLASSIC ++ 3 - DWRITE_RENDERING_MODE_GDI_NATURAL ++ 4 - DWRITE_RENDERING_MODE_NATURAL ++ 5 - DWRITE_RENDERING_MODE_NATURAL_SYMMETRIC ++ 6 - DWRITE_RENDERING_MODE_OUTLINE ++ ++ See this URL for detail: ++ http://msdn.microsoft.com/en-us/library/dd368118.aspx ++ ++ For taamode: antialiasing mode used for drawing text. ++ 0 - D2D1_TEXT_ANTIALIAS_MODE_DEFAULT ++ 1 - D2D1_TEXT_ANTIALIAS_MODE_CLEARTYPE ++ 2 - D2D1_TEXT_ANTIALIAS_MODE_GRAYSCALE ++ 3 - D2D1_TEXT_ANTIALIAS_MODE_ALIASED ++ ++ See this URL for detail: ++ http://msdn.microsoft.com/en-us/library/dd368170.aspx ++ ++ Example: > ++ set encoding=utf-8 ++ set gfn=Ricty_Diminished:h12:cSHIFTJIS ++ set rop=type:directx ++ < ++ If select a raster font (Courier, Terminal or FixedSys) to ++ 'guifont', it fallbacks to be drawn by GDI automatically. ++ ++ Other render types are currently not supported. ++ + *'report'* + 'report' number (default 2) + global +*** ../vim-7.4.392/runtime/doc/various.txt 2013-08-10 13:25:06.000000000 +0200 +--- runtime/doc/various.txt 2014-08-06 14:37:28.843242472 +0200 +*************** +*** 320,325 **** +--- 337,343 ---- + N *+dialog_con_gui* Support for |:confirm| with GUI and console dialog. + N *+diff* |vimdiff| and 'diff' + N *+digraphs* |digraphs| *E196* ++ m *+directx* Win32 GUI only: DirectX and |'renderoptions'| + *+dnd* Support for DnD into the "~ register |quote_~|. + B *+emacs_tags* |emacs-tags| files + N *+eval* expression evaluation |eval.txt| +*************** +*** 426,431 **** +--- 445,451 ---- + m *+writebackup* |'writebackup'| is default on + m *+xim* X input method |xim| + *+xfontset* X fontset support |xfontset| ++ *+xpm* pixmap support + m *+xpm_w32* Win32 GUI only: pixmap support |w32-xpm-support| + *+xsmp* XSMP (X session management) support + *+xsmp_interact* interactive XSMP (X session management) support +*** ../vim-7.4.392/src/Make_cyg.mak 2013-12-11 15:06:36.000000000 +0100 +--- src/Make_cyg.mak 2014-08-06 14:21:57.455249166 +0200 +*************** +*** 8,13 **** +--- 8,14 ---- + # Cygwin application use the Makefile (just like on Unix). + # + # GUI no or yes: set to yes if you want the GUI version (yes) ++ # DIRECTX no or yes: set to yes if you want use DirectWrite (no) + # PERL define to path to Perl dir to get Perl support (not defined) + # PERL_VER define to version of Perl being used (56) + # DYNAMIC_PERL no or yes: set to yes to load the Perl DLL dynamically (yes) +*************** +*** 88,93 **** +--- 89,98 ---- + ARCH = i386 + endif + ++ ifndef DIRECTX ++ DIRECTX = no ++ endif ++ + ifndef WINVER + WINVER = 0x0500 + endif +*************** +*** 470,475 **** +--- 475,489 ---- + endif + + ############################## ++ ifeq (yes, $(DIRECTX)) ++ # Only allow DIRECTX for a GUI build. ++ DEFINES += -DFEAT_DIRECTX -DDYNAMIC_DIRECTX ++ EXTRA_OBJS += $(OUTDIR)/gui_dwrite.o ++ EXTRA_LIBS += -ld2d1 -ldwrite ++ USE_STDCPLUS = yes ++ endif ++ ++ ############################## + ifdef XPM + # Only allow XPM for a GUI build. + DEFINES += -DFEAT_XPM_W32 +*************** +*** 495,505 **** + DEFINES += -DFEAT_OLE + EXTRA_OBJS += $(OUTDIR)/if_ole.o + EXTRA_LIBS += -loleaut32 +! ifeq (yes, $(STATIC_STDCPLUS)) +! EXTRA_LIBS += -Wl,-Bstatic -lstdc++ -Wl,-Bdynamic +! else +! EXTRA_LIBS += -lstdc++ +! endif + endif + + ############################## +--- 509,515 ---- + DEFINES += -DFEAT_OLE + EXTRA_OBJS += $(OUTDIR)/if_ole.o + EXTRA_LIBS += -loleaut32 +! USE_STDCPLUS = yes + endif + + ############################## +*************** +*** 513,518 **** +--- 523,537 ---- + DIRSLASH = \\ + endif + ++ ############################## ++ ifeq (yes, $(USE_STDCPLUS)) ++ ifeq (yes, $(STATIC_STDCPLUS)) ++ EXTRA_LIBS += -Wl,-Bstatic -lstdc++ -Wl,-Bdynamic ++ else ++ EXTRA_LIBS += -lstdc++ ++ endif ++ endif ++ + #>>>>> end of choices + ########################################################################### + +*************** +*** 643,648 **** +--- 662,670 ---- + $(OUTDIR)/gui_w32.o: gui_w32.c gui_w48.c $(INCL) + $(CC) -c $(CFLAGS) gui_w32.c -o $(OUTDIR)/gui_w32.o + ++ $(OUTDIR)/gui_dwrite.o: gui_dwrite.cpp $(INCL) gui_dwrite.h ++ $(CC) -c $(CFLAGS) gui_dwrite.cpp -o $(OUTDIR)/gui_dwrite.o ++ + $(OUTDIR)/if_cscope.o: if_cscope.c $(INCL) if_cscope.h + $(CC) -c $(CFLAGS) if_cscope.c -o $(OUTDIR)/if_cscope.o + +*** ../vim-7.4.392/src/Make_ming.mak 2014-01-06 15:44:59.000000000 +0100 +--- src/Make_ming.mak 2014-08-06 14:21:57.455249166 +0200 +*************** +*** 31,36 **** +--- 31,38 ---- + OPTIMIZE=MAXSPEED + # set to yes to make gvim, no for vim + GUI=yes ++ # set to yes if you want to use DirectWrite (DirectX) ++ DIRECTX=no + # FEATURES=[TINY | SMALL | NORMAL | BIG | HUGE] + # Set to TINY to make minimal version (few features). + FEATURES=BIG +*************** +*** 456,461 **** +--- 458,471 ---- + endif + endif + ++ # DirectWrite (DirectX) ++ ifeq ($(DIRECTX),yes) ++ # Only allow DirectWrite for a GUI build. ++ ifeq (yes, $(GUI)) ++ DEFINES += -DFEAT_DIRECTX -DDYNAMIC_DIRECTX ++ endif ++ endif ++ + # Only allow XPM for a GUI build. + ifeq (yes, $(GUI)) + +*************** +*** 593,598 **** +--- 603,616 ---- + LIB += -lwsock32 + endif + endif ++ ifeq ($(DIRECTX),yes) ++ # Only allow DIRECTX for a GUI build. ++ ifeq (yes, $(GUI)) ++ OBJ += $(OUTDIR)/gui_dwrite.o ++ LIB += -ld2d1 -ldwrite ++ USE_STDCPLUS = yes ++ endif ++ endif + ifdef XPM + # Only allow XPM for a GUI build. + ifeq (yes, $(GUI)) +*************** +*** 650,660 **** + ifeq (yes, $(OLE)) + LIB += -loleaut32 + OBJ += $(OUTDIR)/if_ole.o +! ifeq (yes, $(STATIC_STDCPLUS)) +! LIB += -Wl,-Bstatic -lstdc++ -Wl,-Bdynamic +! else +! LIB += -lstdc++ +! endif + endif + + ifeq (yes, $(MBYTE)) +--- 668,674 ---- + ifeq (yes, $(OLE)) + LIB += -loleaut32 + OBJ += $(OUTDIR)/if_ole.o +! USE_STDCPLUS = yes + endif + + ifeq (yes, $(MBYTE)) +*************** +*** 678,683 **** +--- 692,705 ---- + DEFINES+=-DDYNAMIC_ICONV + endif + ++ ifeq (yes, $(USE_STDCPLUS)) ++ ifeq (yes, $(STATIC_STDCPLUS)) ++ LIB += -Wl,-Bstatic -lstdc++ -Wl,-Bdynamic ++ else ++ LIB += -lstdc++ ++ endif ++ endif ++ + all: $(TARGET) vimrun.exe xxd/xxd.exe install.exe uninstal.exe GvimExt/gvimext.dll + + vimrun.exe: vimrun.c +*************** +*** 751,756 **** +--- 773,781 ---- + $(OUTDIR)/gui_w32.o: gui_w32.c gui_w48.c $(INCL) + $(CC) -c $(CFLAGS) gui_w32.c -o $(OUTDIR)/gui_w32.o + ++ $(OUTDIR)/gui_dwrite.o: gui_dwrite.cpp $(INCL) gui_dwrite.h ++ $(CC) -c $(CFLAGS) gui_dwrite.cpp -o $(OUTDIR)/gui_dwrite.o ++ + $(OUTDIR)/if_cscope.o: if_cscope.c $(INCL) if_cscope.h + $(CC) -c $(CFLAGS) if_cscope.c -o $(OUTDIR)/if_cscope.o + +*** ../vim-7.4.392/src/Make_mvc.mak 2014-05-22 16:29:03.374353200 +0200 +--- src/Make_mvc.mak 2014-08-06 14:21:57.455249166 +0200 +*************** +*** 24,29 **** +--- 24,32 ---- + # + # GUI interface: GUI=yes (default is no) + # ++ # GUI with DirectWrite(DirectX): DIRECTX=yes ++ # (default is no, requires GUI=yes) ++ # + # OLE interface: OLE=yes (usually with GUI=yes) + # + # Multibyte support: MBYTE=yes (default is no) +*************** +*** 168,173 **** +--- 171,179 ---- + !else + OBJDIR = .\ObjC + !endif ++ !if "$(DIRECTX)" == "yes" ++ OBJDIR = $(OBJDIR)X ++ !endif + !if "$(OLE)" == "yes" + OBJDIR = $(OBJDIR)O + !endif +*************** +*** 292,297 **** +--- 298,310 ---- + NETBEANS_LIB = WSock32.lib + !endif + ++ # DirectWrite(DirectX) ++ !if "$(DIRECTX)" == "yes" ++ DIRECTX_DEFS = -DFEAT_DIRECTX -DDYNAMIC_DIRECTX ++ DIRECTX_INCL = gui_dwrite.h ++ DIRECTX_OBJ = $(OUTDIR)\gui_dwrite.obj ++ !endif ++ + !ifndef XPM + # XPM is not set, use the included xpm files, depending on the architecture. + !if "$(CPU)" == "AMD64" +*************** +*** 642,647 **** +--- 655,666 ---- + SUBSYSTEM = console + !endif + ++ !if "$(GUI)" == "yes" && "$(DIRECTX)" == "yes" ++ CFLAGS = $(CFLAGS) $(DIRECTX_DEFS) ++ GUI_INCL = $(GUI_INCL) $(DIRECTX_INCL) ++ GUI_OBJ = $(GUI_OBJ) $(DIRECTX_OBJ) ++ !endif ++ + # iconv.dll library (dynamically loaded) + !ifndef ICONV + ICONV = yes +*************** +*** 1107,1112 **** +--- 1126,1133 ---- + + $(OUTDIR)/gui_w32.obj: $(OUTDIR) gui_w32.c gui_w48.c $(INCL) $(GUI_INCL) + ++ $(OUTDIR)/gui_dwrite.obj: $(OUTDIR) gui_dwrite.cpp $(INCL) $(GUI_INCL) ++ + $(OUTDIR)/if_cscope.obj: $(OUTDIR) if_cscope.c $(INCL) + + $(OUTDIR)/if_lua.obj: $(OUTDIR) if_lua.c $(INCL) +*** ../vim-7.4.392/src/eval.c 2014-08-06 13:36:56.091268582 +0200 +--- src/eval.c 2014-08-06 14:21:57.459249166 +0200 +*************** +*** 12464,12469 **** +--- 12464,12472 ---- + #ifdef FEAT_DIGRAPHS + "digraphs", + #endif ++ #ifdef FEAT_DIRECTX ++ "directx", ++ #endif + #ifdef FEAT_DND + "dnd", + #endif +*** ../vim-7.4.392/src/gui_dwrite.cpp 2014-08-06 14:49:19.663237363 +0200 +--- src/gui_dwrite.cpp 2014-08-06 14:39:48.775241466 +0200 +*************** +*** 0 **** +--- 1,901 ---- ++ /* vi:set ts=8 sts=4 sw=4 noet: */ ++ /* ++ * Author: MURAOKA Taro <koron.kaoriya@gmail.com> ++ * ++ * Contributors: ++ * - Ken Takata ++ * ++ * Copyright (C) 2013 MURAOKA Taro <koron.kaoriya@gmail.com> ++ * THIS FILE IS DISTRIBUTED UNDER THE VIM LICENSE. ++ */ ++ ++ #define WIN32_LEAN_AND_MEAN ++ ++ #ifndef DYNAMIC_DIRECTX ++ # if WINVER < 0x0600 ++ # error WINVER must be 0x0600 or above to use DirectWrite(DirectX) ++ # endif ++ #endif ++ ++ #include <windows.h> ++ #include <crtdbg.h> ++ #include <assert.h> ++ #include <math.h> ++ #include <d2d1.h> ++ #include <d2d1helper.h> ++ #include <dwrite.h> ++ ++ #include "gui_dwrite.h" ++ ++ #ifdef __MINGW32__ ++ # define __maybenull SAL__maybenull ++ # define __in SAL__in ++ # define __out SAL__out ++ #endif ++ ++ #ifdef DYNAMIC_DIRECTX ++ extern "C" HINSTANCE vimLoadLib(char *name); ++ ++ typedef int (WINAPI *PGETUSERDEFAULTLOCALENAME)(LPWSTR, int); ++ typedef HRESULT (WINAPI *PD2D1CREATEFACTORY)(D2D1_FACTORY_TYPE, ++ REFIID, const D2D1_FACTORY_OPTIONS *, void **); ++ typedef HRESULT (WINAPI *PDWRITECREATEFACTORY)(DWRITE_FACTORY_TYPE, ++ REFIID, IUnknown **); ++ ++ static HINSTANCE hD2D1DLL = NULL; ++ static HINSTANCE hDWriteDLL = NULL; ++ ++ static PGETUSERDEFAULTLOCALENAME pGetUserDefaultLocaleName = NULL; ++ static PD2D1CREATEFACTORY pD2D1CreateFactory = NULL; ++ static PDWRITECREATEFACTORY pDWriteCreateFactory = NULL; ++ ++ #define GetUserDefaultLocaleName (*pGetUserDefaultLocaleName) ++ #define D2D1CreateFactory (*pD2D1CreateFactory) ++ #define DWriteCreateFactory (*pDWriteCreateFactory) ++ ++ static void ++ unload(HINSTANCE &hinst) ++ { ++ if (hinst != NULL) ++ { ++ FreeLibrary(hinst); ++ hinst = NULL; ++ } ++ } ++ #endif // DYNAMIC_DIRECTX ++ ++ template <class T> inline void SafeRelease(T **ppT) ++ { ++ if (*ppT) ++ { ++ (*ppT)->Release(); ++ *ppT = NULL; ++ } ++ } ++ ++ struct GdiTextRendererContext ++ { ++ // const fields. ++ COLORREF color; ++ FLOAT cellWidth; ++ ++ // working fields. ++ FLOAT offsetX; ++ }; ++ ++ static DWRITE_PIXEL_GEOMETRY ++ ToPixelGeometry(int value) ++ { ++ switch (value) ++ { ++ default: ++ case 0: ++ return DWRITE_PIXEL_GEOMETRY_FLAT; ++ case 1: ++ return DWRITE_PIXEL_GEOMETRY_RGB; ++ case 2: ++ return DWRITE_PIXEL_GEOMETRY_BGR; ++ } ++ } ++ ++ static int ++ ToInt(DWRITE_PIXEL_GEOMETRY value) ++ { ++ switch (value) ++ { ++ case DWRITE_PIXEL_GEOMETRY_FLAT: ++ return 0; ++ case DWRITE_PIXEL_GEOMETRY_RGB: ++ return 1; ++ case DWRITE_PIXEL_GEOMETRY_BGR: ++ return 2; ++ default: ++ return -1; ++ } ++ } ++ ++ static DWRITE_RENDERING_MODE ++ ToRenderingMode(int value) ++ { ++ switch (value) ++ { ++ default: ++ case 0: ++ return DWRITE_RENDERING_MODE_DEFAULT; ++ case 1: ++ return DWRITE_RENDERING_MODE_ALIASED; ++ case 2: ++ return DWRITE_RENDERING_MODE_CLEARTYPE_GDI_CLASSIC; ++ case 3: ++ return DWRITE_RENDERING_MODE_CLEARTYPE_GDI_NATURAL; ++ case 4: ++ return DWRITE_RENDERING_MODE_CLEARTYPE_NATURAL; ++ case 5: ++ return DWRITE_RENDERING_MODE_CLEARTYPE_NATURAL_SYMMETRIC; ++ case 6: ++ return DWRITE_RENDERING_MODE_OUTLINE; ++ } ++ } ++ ++ static D2D1_TEXT_ANTIALIAS_MODE ++ ToTextAntialiasMode(int value) ++ { ++ switch (value) ++ { ++ default: ++ case 0: ++ return D2D1_TEXT_ANTIALIAS_MODE_DEFAULT; ++ case 1: ++ return D2D1_TEXT_ANTIALIAS_MODE_CLEARTYPE; ++ case 2: ++ return D2D1_TEXT_ANTIALIAS_MODE_GRAYSCALE; ++ case 3: ++ return D2D1_TEXT_ANTIALIAS_MODE_ALIASED; ++ } ++ } ++ ++ static int ++ ToInt(DWRITE_RENDERING_MODE value) ++ { ++ switch (value) ++ { ++ case DWRITE_RENDERING_MODE_DEFAULT: ++ return 0; ++ case DWRITE_RENDERING_MODE_ALIASED: ++ return 1; ++ case DWRITE_RENDERING_MODE_CLEARTYPE_GDI_CLASSIC: ++ return 2; ++ case DWRITE_RENDERING_MODE_CLEARTYPE_GDI_NATURAL: ++ return 3; ++ case DWRITE_RENDERING_MODE_CLEARTYPE_NATURAL: ++ return 4; ++ case DWRITE_RENDERING_MODE_CLEARTYPE_NATURAL_SYMMETRIC: ++ return 5; ++ case DWRITE_RENDERING_MODE_OUTLINE: ++ return 6; ++ default: ++ return -1; ++ } ++ } ++ ++ class AdjustedGlyphRun : public DWRITE_GLYPH_RUN ++ { ++ private: ++ FLOAT mDelta; ++ FLOAT *mAdjustedAdvances; ++ ++ public: ++ AdjustedGlyphRun( ++ const DWRITE_GLYPH_RUN *glyphRun, ++ FLOAT cellWidth) : ++ DWRITE_GLYPH_RUN(*glyphRun), ++ mDelta(0.0f), ++ mAdjustedAdvances(new FLOAT[glyphRun->glyphCount]) ++ { ++ assert(cellWidth != 0.0f); ++ for (UINT32 i = 0; i < glyphRun->glyphCount; ++i) ++ { ++ FLOAT orig = glyphRun->glyphAdvances[i]; ++ FLOAT adjusted = adjustToCell(orig, cellWidth); ++ mAdjustedAdvances[i] = adjusted; ++ mDelta += adjusted - orig; ++ } ++ glyphAdvances = mAdjustedAdvances; ++ } ++ ++ ~AdjustedGlyphRun(void) ++ { ++ delete[] mAdjustedAdvances; ++ } ++ ++ FLOAT getDelta(void) const ++ { ++ return mDelta; ++ } ++ ++ static FLOAT adjustToCell(FLOAT value, FLOAT cellWidth) ++ { ++ int cellCount = (int)floor(value / cellWidth + 0.5f); ++ if (cellCount < 1) ++ cellCount = 1; ++ return cellCount * cellWidth; ++ } ++ }; ++ ++ class GdiTextRenderer : public IDWriteTextRenderer ++ { ++ public: ++ GdiTextRenderer( ++ IDWriteBitmapRenderTarget* bitmapRenderTarget, ++ IDWriteRenderingParams* renderingParams) : ++ cRefCount_(0), ++ pRenderTarget_(bitmapRenderTarget), ++ pRenderingParams_(renderingParams) ++ { ++ pRenderTarget_->AddRef(); ++ pRenderingParams_->AddRef(); ++ AddRef(); ++ } ++ ++ ~GdiTextRenderer() ++ { ++ SafeRelease(&pRenderTarget_); ++ SafeRelease(&pRenderingParams_); ++ } ++ ++ IFACEMETHOD(IsPixelSnappingDisabled)( ++ __maybenull void* clientDrawingContext, ++ __out BOOL* isDisabled) ++ { ++ *isDisabled = FALSE; ++ return S_OK; ++ } ++ ++ IFACEMETHOD(GetCurrentTransform)( ++ __maybenull void* clientDrawingContext, ++ __out DWRITE_MATRIX* transform) ++ { ++ //forward the render target's transform ++ pRenderTarget_->GetCurrentTransform(transform); ++ return S_OK; ++ } ++ ++ IFACEMETHOD(GetPixelsPerDip)( ++ __maybenull void* clientDrawingContext, ++ __out FLOAT* pixelsPerDip) ++ { ++ *pixelsPerDip = pRenderTarget_->GetPixelsPerDip(); ++ return S_OK; ++ } ++ ++ IFACEMETHOD(DrawGlyphRun)( ++ __maybenull void* clientDrawingContext, ++ FLOAT baselineOriginX, ++ FLOAT baselineOriginY, ++ DWRITE_MEASURING_MODE measuringMode, ++ __in DWRITE_GLYPH_RUN const* glyphRun, ++ __in DWRITE_GLYPH_RUN_DESCRIPTION const* glyphRunDescription, ++ IUnknown* clientDrawingEffect) ++ { ++ HRESULT hr = S_OK; ++ ++ GdiTextRendererContext *context = ++ reinterpret_cast<GdiTextRendererContext*>(clientDrawingContext); ++ ++ AdjustedGlyphRun adjustedGlyphRun(glyphRun, context->cellWidth); ++ ++ // Pass on the drawing call to the render target to do the real work. ++ RECT dirtyRect = {0}; ++ ++ hr = pRenderTarget_->DrawGlyphRun( ++ baselineOriginX + context->offsetX, ++ baselineOriginY, ++ measuringMode, ++ &adjustedGlyphRun, ++ pRenderingParams_, ++ context->color, ++ &dirtyRect); ++ ++ context->offsetX += adjustedGlyphRun.getDelta(); ++ ++ return hr; ++ } ++ ++ IFACEMETHOD(DrawUnderline)( ++ __maybenull void* clientDrawingContext, ++ FLOAT baselineOriginX, ++ FLOAT baselineOriginY, ++ __in DWRITE_UNDERLINE const* underline, ++ IUnknown* clientDrawingEffect) ++ { ++ return E_NOTIMPL; ++ } ++ ++ IFACEMETHOD(DrawStrikethrough)( ++ __maybenull void* clientDrawingContext, ++ FLOAT baselineOriginX, ++ FLOAT baselineOriginY, ++ __in DWRITE_STRIKETHROUGH const* strikethrough, ++ IUnknown* clientDrawingEffect) ++ { ++ return E_NOTIMPL; ++ } ++ ++ IFACEMETHOD(DrawInlineObject)( ++ __maybenull void* clientDrawingContext, ++ FLOAT originX, ++ FLOAT originY, ++ IDWriteInlineObject* inlineObject, ++ BOOL isSideways, ++ BOOL isRightToLeft, ++ IUnknown* clientDrawingEffect) ++ { ++ return E_NOTIMPL; ++ } ++ ++ public: ++ IFACEMETHOD_(unsigned long, AddRef) () ++ { ++ return InterlockedIncrement(&cRefCount_); ++ } ++ ++ IFACEMETHOD_(unsigned long, Release) () ++ { ++ long newCount = InterlockedDecrement(&cRefCount_); ++ ++ if (newCount == 0) ++ { ++ delete this; ++ return 0; ++ } ++ return newCount; ++ } ++ ++ IFACEMETHOD(QueryInterface)( ++ IID const& riid, ++ void** ppvObject) ++ { ++ if (__uuidof(IDWriteTextRenderer) == riid) ++ { ++ *ppvObject = this; ++ } ++ else if (__uuidof(IDWritePixelSnapping) == riid) ++ { ++ *ppvObject = this; ++ } ++ else if (__uuidof(IUnknown) == riid) ++ { ++ *ppvObject = this; ++ } ++ else ++ { ++ *ppvObject = NULL; ++ return E_FAIL; ++ } ++ ++ return S_OK; ++ } ++ ++ private: ++ unsigned long cRefCount_; ++ IDWriteBitmapRenderTarget* pRenderTarget_; ++ IDWriteRenderingParams* pRenderingParams_; ++ }; ++ ++ struct DWriteContext { ++ FLOAT mDpiScaleX; ++ FLOAT mDpiScaleY; ++ bool mDrawing; ++ ++ ID2D1Factory *mD2D1Factory; ++ ++ ID2D1DCRenderTarget *mRT; ++ ID2D1SolidColorBrush *mBrush; ++ ++ IDWriteFactory *mDWriteFactory; ++ IDWriteGdiInterop *mGdiInterop; ++ IDWriteRenderingParams *mRenderingParams; ++ IDWriteTextFormat *mTextFormat; ++ ++ HFONT mLastHFont; ++ DWRITE_FONT_WEIGHT mFontWeight; ++ DWRITE_FONT_STYLE mFontStyle; ++ ++ D2D1_TEXT_ANTIALIAS_MODE mTextAntialiasMode; ++ ++ // METHODS ++ ++ DWriteContext(); ++ ++ virtual ~DWriteContext(); ++ ++ HRESULT SetLOGFONT(const LOGFONTW &logFont, float fontSize); ++ ++ void SetFont(HFONT hFont); ++ ++ void SetFont(const LOGFONTW &logFont); ++ ++ void DrawText(HDC hdc, const WCHAR* text, int len, ++ int x, int y, int w, int h, int cellWidth, COLORREF color); ++ ++ float PixelsToDipsX(int x); ++ ++ float PixelsToDipsY(int y); ++ ++ void SetRenderingParams( ++ const DWriteRenderingParams *params); ++ ++ DWriteRenderingParams *GetRenderingParams( ++ DWriteRenderingParams *params); ++ }; ++ ++ DWriteContext::DWriteContext() : ++ mDpiScaleX(1.f), ++ mDpiScaleY(1.f), ++ mDrawing(false), ++ mD2D1Factory(NULL), ++ mRT(NULL), ++ mBrush(NULL), ++ mDWriteFactory(NULL), ++ mGdiInterop(NULL), ++ mRenderingParams(NULL), ++ mTextFormat(NULL), ++ mLastHFont(NULL), ++ mFontWeight(DWRITE_FONT_WEIGHT_NORMAL), ++ mFontStyle(DWRITE_FONT_STYLE_NORMAL), ++ mTextAntialiasMode(D2D1_TEXT_ANTIALIAS_MODE_DEFAULT) ++ { ++ HRESULT hr; ++ ++ HDC screen = ::GetDC(0); ++ mDpiScaleX = ::GetDeviceCaps(screen, LOGPIXELSX) / 96.0f; ++ mDpiScaleY = ::GetDeviceCaps(screen, LOGPIXELSY) / 96.0f; ++ ::ReleaseDC(0, screen); ++ ++ hr = D2D1CreateFactory(D2D1_FACTORY_TYPE_SINGLE_THREADED, ++ __uuidof(ID2D1Factory), NULL, ++ reinterpret_cast<void**>(&mD2D1Factory)); ++ _RPT2(_CRT_WARN, "D2D1CreateFactory: hr=%p p=%p\n", hr, mD2D1Factory); ++ ++ if (SUCCEEDED(hr)) ++ { ++ D2D1_RENDER_TARGET_PROPERTIES props = { ++ D2D1_RENDER_TARGET_TYPE_DEFAULT, ++ { DXGI_FORMAT_B8G8R8A8_UNORM, D2D1_ALPHA_MODE_IGNORE }, ++ 0, 0, ++ D2D1_RENDER_TARGET_USAGE_NONE, ++ D2D1_FEATURE_LEVEL_DEFAULT ++ }; ++ hr = mD2D1Factory->CreateDCRenderTarget(&props, &mRT); ++ _RPT2(_CRT_WARN, "CreateDCRenderTarget: hr=%p p=%p\n", hr, mRT); ++ } ++ ++ if (SUCCEEDED(hr)) ++ { ++ hr = mRT->CreateSolidColorBrush( ++ D2D1::ColorF(D2D1::ColorF::Black), ++ &mBrush); ++ _RPT2(_CRT_WARN, "CreateSolidColorBrush: hr=%p p=%p\n", hr, mBrush); ++ } ++ ++ if (SUCCEEDED(hr)) ++ { ++ hr = DWriteCreateFactory( ++ DWRITE_FACTORY_TYPE_SHARED, ++ __uuidof(IDWriteFactory), ++ reinterpret_cast<IUnknown**>(&mDWriteFactory)); ++ _RPT2(_CRT_WARN, "DWriteCreateFactory: hr=%p p=%p\n", hr, ++ mDWriteFactory); ++ } ++ ++ if (SUCCEEDED(hr)) ++ { ++ hr = mDWriteFactory->GetGdiInterop(&mGdiInterop); ++ _RPT2(_CRT_WARN, "GetGdiInterop: hr=%p p=%p\n", hr, mGdiInterop); ++ } ++ ++ if (SUCCEEDED(hr)) ++ { ++ hr = mDWriteFactory->CreateRenderingParams(&mRenderingParams); ++ _RPT2(_CRT_WARN, "CreateRenderingParams: hr=%p p=%p\n", hr, ++ mRenderingParams); ++ } ++ } ++ ++ DWriteContext::~DWriteContext() ++ { ++ SafeRelease(&mTextFormat); ++ SafeRelease(&mRenderingParams); ++ SafeRelease(&mGdiInterop); ++ SafeRelease(&mDWriteFactory); ++ SafeRelease(&mBrush); ++ SafeRelease(&mRT); ++ SafeRelease(&mD2D1Factory); ++ } ++ ++ HRESULT ++ DWriteContext::SetLOGFONT(const LOGFONTW &logFont, float fontSize) ++ { ++ // Most of this function is copy from: http://msdn.microsoft.com/en-us/library/windows/desktop/dd941783(v=vs.85).aspx ++ HRESULT hr = S_OK; ++ ++ IDWriteFont *font = NULL; ++ IDWriteFontFamily *fontFamily = NULL; ++ IDWriteLocalizedStrings *localizedFamilyNames = NULL; ++ ++ if (SUCCEEDED(hr)) ++ { ++ hr = mGdiInterop->CreateFontFromLOGFONT(&logFont, &font); ++ } ++ ++ // Get the font family to which this font belongs. ++ if (SUCCEEDED(hr)) ++ { ++ hr = font->GetFontFamily(&fontFamily); ++ } ++ ++ // Get the family names. This returns an object that encapsulates one or ++ // more names with the same meaning but in different languages. ++ if (SUCCEEDED(hr)) ++ { ++ hr = fontFamily->GetFamilyNames(&localizedFamilyNames); ++ } ++ ++ // Get the family name at index zero. If we were going to display the name ++ // we'd want to try to find one that matched the use locale, but for ++ // purposes of creating a text format object any language will do. ++ ++ wchar_t familyName[100]; ++ if (SUCCEEDED(hr)) ++ { ++ hr = localizedFamilyNames->GetString(0, familyName, ++ ARRAYSIZE(familyName)); ++ } ++ ++ if (SUCCEEDED(hr)) ++ { ++ // If no font size was passed in use the lfHeight of the LOGFONT. ++ if (fontSize == 0) ++ { ++ // Convert from pixels to DIPs. ++ fontSize = PixelsToDipsY(logFont.lfHeight); ++ if (fontSize < 0) ++ { ++ // Negative lfHeight represents the size of the em unit. ++ fontSize = -fontSize; ++ } ++ else ++ { ++ // Positive lfHeight represents the cell height (ascent + ++ // descent). ++ DWRITE_FONT_METRICS fontMetrics; ++ font->GetMetrics(&fontMetrics); ++ ++ // Convert the cell height (ascent + descent) from design units ++ // to ems. ++ float cellHeight = static_cast<float>( ++ fontMetrics.ascent + fontMetrics.descent) ++ / fontMetrics.designUnitsPerEm; ++ ++ // Divide the font size by the cell height to get the font em ++ // size. ++ fontSize /= cellHeight; ++ } ++ } ++ } ++ ++ // The text format includes a locale name. Ideally, this would be the ++ // language of the text, which may or may not be the same as the primary ++ // language of the user. However, for our purposes the user locale will do. ++ wchar_t localeName[LOCALE_NAME_MAX_LENGTH]; ++ if (SUCCEEDED(hr)) ++ { ++ if (GetUserDefaultLocaleName(localeName, LOCALE_NAME_MAX_LENGTH) == 0) ++ hr = HRESULT_FROM_WIN32(GetLastError()); ++ } ++ ++ if (SUCCEEDED(hr)) ++ { ++ // Create the text format object. ++ hr = mDWriteFactory->CreateTextFormat( ++ familyName, ++ NULL, // no custom font collection ++ font->GetWeight(), ++ font->GetStyle(), ++ font->GetStretch(), ++ fontSize, ++ localeName, ++ &mTextFormat); ++ } ++ ++ if (SUCCEEDED(hr)) ++ { ++ mFontWeight = static_cast<DWRITE_FONT_WEIGHT>(logFont.lfWeight); ++ mFontStyle = logFont.lfItalic ? DWRITE_FONT_STYLE_ITALIC ++ : DWRITE_FONT_STYLE_NORMAL; ++ } ++ ++ SafeRelease(&localizedFamilyNames); ++ SafeRelease(&fontFamily); ++ SafeRelease(&font); ++ ++ return hr; ++ } ++ ++ void ++ DWriteContext::SetFont(HFONT hFont) ++ { ++ if (mLastHFont != hFont) ++ { ++ LOGFONTW lf; ++ if (GetObjectW(hFont, sizeof(lf), &lf)) ++ { ++ SetFont(lf); ++ mLastHFont = hFont; ++ } ++ } ++ } ++ ++ void ++ DWriteContext::SetFont(const LOGFONTW &logFont) ++ { ++ SafeRelease(&mTextFormat); ++ mLastHFont = NULL; ++ ++ HRESULT hr = SetLOGFONT(logFont, 0.f); ++ ++ if (SUCCEEDED(hr)) ++ hr = mTextFormat->SetTextAlignment(DWRITE_TEXT_ALIGNMENT_LEADING); ++ ++ if (SUCCEEDED(hr)) ++ hr = mTextFormat->SetParagraphAlignment( ++ DWRITE_PARAGRAPH_ALIGNMENT_CENTER); ++ ++ if (SUCCEEDED(hr)) ++ hr = mTextFormat->SetWordWrapping(DWRITE_WORD_WRAPPING_NO_WRAP); ++ } ++ ++ void ++ DWriteContext::DrawText(HDC hdc, const WCHAR* text, int len, ++ int x, int y, int w, int h, int cellWidth, COLORREF color) ++ { ++ HRESULT hr = S_OK; ++ IDWriteBitmapRenderTarget *bmpRT = NULL; ++ ++ // Skip when any fonts are not set. ++ if (mTextFormat == NULL) ++ return; ++ ++ // Check possibility of zero divided error. ++ if (cellWidth == 0 || mDpiScaleX == 0.0f || mDpiScaleY == 0.0f) ++ return; ++ ++ if (SUCCEEDED(hr)) ++ hr = mGdiInterop->CreateBitmapRenderTarget(hdc, w, h, &bmpRT); ++ ++ if (SUCCEEDED(hr)) ++ { ++ IDWriteTextLayout *textLayout = NULL; ++ ++ HDC memdc = bmpRT->GetMemoryDC(); ++ BitBlt(memdc, 0, 0, w, h, hdc, x, y, SRCCOPY); ++ ++ hr = mDWriteFactory->CreateGdiCompatibleTextLayout( ++ text, len, mTextFormat, PixelsToDipsX(w), ++ PixelsToDipsY(h), mDpiScaleX, NULL, TRUE, &textLayout); ++ ++ if (SUCCEEDED(hr)) ++ { ++ DWRITE_TEXT_RANGE textRange = { 0, len }; ++ textLayout->SetFontWeight(mFontWeight, textRange); ++ textLayout->SetFontStyle(mFontStyle, textRange); ++ } ++ ++ if (SUCCEEDED(hr)) ++ { ++ GdiTextRenderer *renderer = new GdiTextRenderer(bmpRT, ++ mRenderingParams); ++ GdiTextRendererContext data = { ++ color, ++ PixelsToDipsX(cellWidth), ++ 0.0f ++ }; ++ textLayout->Draw(&data, renderer, 0, 0); ++ SafeRelease(&renderer); ++ } ++ ++ BitBlt(hdc, x, y, w, h, memdc, 0, 0, SRCCOPY); ++ ++ SafeRelease(&textLayout); ++ } ++ ++ SafeRelease(&bmpRT); ++ } ++ ++ float ++ DWriteContext::PixelsToDipsX(int x) ++ { ++ return x / mDpiScaleX; ++ } ++ ++ float ++ DWriteContext::PixelsToDipsY(int y) ++ { ++ return y / mDpiScaleY; ++ } ++ ++ void ++ DWriteContext::SetRenderingParams( ++ const DWriteRenderingParams *params) ++ { ++ if (mDWriteFactory == NULL) ++ return; ++ ++ IDWriteRenderingParams *renderingParams = NULL; ++ D2D1_TEXT_ANTIALIAS_MODE textAntialiasMode = ++ D2D1_TEXT_ANTIALIAS_MODE_DEFAULT; ++ HRESULT hr; ++ if (params != NULL) ++ { ++ hr = mDWriteFactory->CreateCustomRenderingParams(params->gamma, ++ params->enhancedContrast, params->clearTypeLevel, ++ ToPixelGeometry(params->pixelGeometry), ++ ToRenderingMode(params->renderingMode), &renderingParams); ++ textAntialiasMode = ToTextAntialiasMode(params->textAntialiasMode); ++ } ++ else ++ hr = mDWriteFactory->CreateRenderingParams(&renderingParams); ++ if (SUCCEEDED(hr) && renderingParams != NULL) ++ { ++ SafeRelease(&mRenderingParams); ++ mRenderingParams = renderingParams; ++ mTextAntialiasMode = textAntialiasMode; ++ } ++ } ++ ++ DWriteRenderingParams * ++ DWriteContext::GetRenderingParams( ++ DWriteRenderingParams *params) ++ { ++ if (params != NULL && mRenderingParams != NULL) ++ { ++ params->gamma = mRenderingParams->GetGamma(); ++ params->enhancedContrast = mRenderingParams->GetEnhancedContrast(); ++ params->clearTypeLevel = mRenderingParams->GetClearTypeLevel(); ++ params->pixelGeometry = ToInt(mRenderingParams->GetPixelGeometry()); ++ params->renderingMode = ToInt(mRenderingParams->GetRenderingMode()); ++ params->textAntialiasMode = mTextAntialiasMode; ++ } ++ return params; ++ } ++ ++ //////////////////////////////////////////////////////////////////////////// ++ // PUBLIC C INTERFACES ++ ++ void ++ DWrite_Init(void) ++ { ++ #ifdef DYNAMIC_DIRECTX ++ // Load libraries. ++ hD2D1DLL = vimLoadLib(const_cast<char*>("d2d1.dll")); ++ hDWriteDLL = vimLoadLib(const_cast<char*>("dwrite.dll")); ++ if (hD2D1DLL == NULL || hDWriteDLL == NULL) ++ { ++ DWrite_Final(); ++ return; ++ } ++ // Get address of procedures. ++ pGetUserDefaultLocaleName = (PGETUSERDEFAULTLOCALENAME)GetProcAddress( ++ GetModuleHandle("kernel32.dll"), "GetUserDefaultLocaleName"); ++ pD2D1CreateFactory = (PD2D1CREATEFACTORY)GetProcAddress(hD2D1DLL, ++ "D2D1CreateFactory"); ++ pDWriteCreateFactory = (PDWRITECREATEFACTORY)GetProcAddress(hDWriteDLL, ++ "DWriteCreateFactory"); ++ #endif ++ } ++ ++ void ++ DWrite_Final(void) ++ { ++ #ifdef DYNAMIC_DIRECTX ++ pGetUserDefaultLocaleName = NULL; ++ pD2D1CreateFactory = NULL; ++ pDWriteCreateFactory = NULL; ++ unload(hDWriteDLL); ++ unload(hD2D1DLL); ++ #endif ++ } ++ ++ DWriteContext * ++ DWriteContext_Open(void) ++ { ++ #ifdef DYNAMIC_DIRECTX ++ if (pGetUserDefaultLocaleName == NULL || pD2D1CreateFactory == NULL ++ || pDWriteCreateFactory == NULL) ++ return NULL; ++ #endif ++ return new DWriteContext(); ++ } ++ ++ void ++ DWriteContext_BeginDraw(DWriteContext *ctx) ++ { ++ if (ctx != NULL && ctx->mRT != NULL) ++ { ++ ctx->mRT->BeginDraw(); ++ ctx->mRT->SetTransform(D2D1::IdentityMatrix()); ++ ctx->mDrawing = true; ++ } ++ } ++ ++ void ++ DWriteContext_BindDC(DWriteContext *ctx, HDC hdc, RECT *rect) ++ { ++ if (ctx != NULL && ctx->mRT != NULL) ++ { ++ ctx->mRT->BindDC(hdc, rect); ++ ctx->mRT->SetTextAntialiasMode(ctx->mTextAntialiasMode); ++ } ++ } ++ ++ void ++ DWriteContext_SetFont(DWriteContext *ctx, HFONT hFont) ++ { ++ if (ctx != NULL) ++ { ++ ctx->SetFont(hFont); ++ } ++ } ++ ++ void ++ DWriteContext_DrawText( ++ DWriteContext *ctx, ++ HDC hdc, ++ const WCHAR* text, ++ int len, ++ int x, ++ int y, ++ int w, ++ int h, ++ int cellWidth, ++ COLORREF color) ++ { ++ if (ctx != NULL) ++ ctx->DrawText(hdc, text, len, x, y, w, h, cellWidth, color); ++ } ++ ++ void ++ DWriteContext_EndDraw(DWriteContext *ctx) ++ { ++ if (ctx != NULL && ctx->mRT != NULL) ++ { ++ ctx->mRT->EndDraw(); ++ ctx->mDrawing = false; ++ } ++ } ++ ++ void ++ DWriteContext_Close(DWriteContext *ctx) ++ { ++ delete ctx; ++ } ++ ++ void ++ DWriteContext_SetRenderingParams( ++ DWriteContext *ctx, ++ const DWriteRenderingParams *params) ++ { ++ if (ctx != NULL) ++ ctx->SetRenderingParams(params); ++ } ++ ++ DWriteRenderingParams * ++ DWriteContext_GetRenderingParams( ++ DWriteContext *ctx, ++ DWriteRenderingParams *params) ++ { ++ if (ctx != NULL) ++ return ctx->GetRenderingParams(params); ++ else ++ return NULL; ++ } +*** ../vim-7.4.392/src/gui_dwrite.h 2014-08-06 14:49:19.667237363 +0200 +--- src/gui_dwrite.h 2014-08-06 14:21:57.459249166 +0200 +*************** +*** 0 **** +--- 1,85 ---- ++ /* vi:set ts=8 sts=4 sw=4 noet: */ ++ /* ++ * Author: MURAOKA Taro <koron.kaoriya@gmail.com> ++ * ++ * Contributors: ++ * - Ken Takata ++ * ++ * Copyright (C) 2013 MURAOKA Taro <koron.kaoriya@gmail.com> ++ * THIS FILE IS DISTRIBUTED UNDER THE VIM LICENSE. ++ */ ++ ++ #ifndef GUI_DWRITE_H ++ #define GUI_DWRITE_H ++ ++ #ifdef __cplusplus ++ extern "C" { ++ #endif ++ ++ typedef struct DWriteContext DWriteContext; ++ ++ typedef struct DWriteRenderingParams { ++ float gamma; ++ float enhancedContrast; ++ float clearTypeLevel; ++ /* ++ * pixelGeometry: ++ * 0 - DWRITE_PIXEL_GEOMETRY_FLAT ++ * 1 - DWRITE_PIXEL_GEOMETRY_RGB ++ * 2 - DWRITE_PIXEL_GEOMETRY_BGR ++ */ ++ int pixelGeometry; ++ /* ++ * renderingMode: ++ * 0 - DWRITE_RENDERING_MODE_DEFAULT ++ * 1 - DWRITE_RENDERING_MODE_ALIASED ++ * 2 - DWRITE_RENDERING_MODE_CLEARTYPE_GDI_CLASSIC ++ * 3 - DWRITE_RENDERING_MODE_CLEARTYPE_GDI_NATURAL ++ * 4 - DWRITE_RENDERING_MODE_CLEARTYPE_NATURAL ++ * 5 - DWRITE_RENDERING_MODE_CLEARTYPE_NATURAL_SYMMETRIC ++ * 6 - DWRITE_RENDERING_MODE_OUTLINE ++ */ ++ int renderingMode; ++ /* ++ * antialiasMode: ++ * 0 - D2D1_TEXT_ANTIALIAS_MODE_DEFAULT ++ * 1 - D2D1_TEXT_ANTIALIAS_MODE_CLEARTYPE ++ * 2 - D2D1_TEXT_ANTIALIAS_MODE_GRAYSCALE ++ * 3 - D2D1_TEXT_ANTIALIAS_MODE_ALIASED ++ */ ++ int textAntialiasMode; ++ } DWriteRenderingParams; ++ ++ void DWrite_Init(void); ++ void DWrite_Final(void); ++ ++ DWriteContext *DWriteContext_Open(void); ++ void DWriteContext_BeginDraw(DWriteContext *ctx); ++ void DWriteContext_BindDC(DWriteContext *ctx, HDC hdc, RECT *rect); ++ void DWriteContext_SetFont(DWriteContext *ctx, HFONT hFont); ++ void DWriteContext_DrawText( ++ DWriteContext *ctx, ++ HDC hdc, ++ const WCHAR* text, ++ int len, ++ int x, ++ int y, ++ int w, ++ int h, ++ int cellWidth, ++ COLORREF color); ++ void DWriteContext_EndDraw(DWriteContext *ctx); ++ void DWriteContext_Close(DWriteContext *ctx); ++ ++ void DWriteContext_SetRenderingParams( ++ DWriteContext *ctx, ++ const DWriteRenderingParams *params); ++ ++ DWriteRenderingParams *DWriteContext_GetRenderingParams( ++ DWriteContext *ctx, ++ DWriteRenderingParams *params); ++ ++ #ifdef __cplusplus ++ } ++ #endif ++ #endif/*GUI_DWRITE_H*/ +*** ../vim-7.4.392/src/gui_w32.c 2013-08-04 16:15:37.000000000 +0200 +--- src/gui_w32.c 2014-08-06 14:45:43.495238916 +0200 +*************** +*** 25,30 **** +--- 25,169 ---- + + #include "vim.h" + ++ #if defined(FEAT_DIRECTX) ++ # include "gui_dwrite.h" ++ #endif ++ ++ #if defined(FEAT_DIRECTX) || defined(PROTO) ++ static DWriteContext *s_dwc = NULL; ++ static int s_directx_enabled = 0; ++ static int s_directx_load_attempted = 0; ++ # define IS_ENABLE_DIRECTX() (s_directx_enabled && s_dwc != NULL) ++ ++ int ++ directx_enabled(void) ++ { ++ if (s_dwc != NULL) ++ return 1; ++ else if (s_directx_load_attempted) ++ return 0; ++ /* load DirectX */ ++ DWrite_Init(); ++ s_directx_load_attempted = 1; ++ s_dwc = DWriteContext_Open(); ++ return s_dwc != NULL ? 1 : 0; ++ } ++ #endif ++ ++ #if defined(FEAT_RENDER_OPTIONS) || defined(PROTO) ++ int ++ gui_mch_set_rendering_options(char_u *s) ++ { ++ #ifdef FEAT_DIRECTX ++ int retval = FAIL; ++ char_u *p, *q; ++ ++ int dx_enable = 0; ++ int dx_flags = 0; ++ float dx_gamma = 0.0f; ++ float dx_contrast = 0.0f; ++ float dx_level = 0.0f; ++ int dx_geom = 0; ++ int dx_renmode = 0; ++ int dx_taamode = 0; ++ ++ /* parse string as rendering options. */ ++ for (p = s; p != NULL && *p != NUL; ) ++ { ++ char_u item[256]; ++ char_u name[128]; ++ char_u value[128]; ++ ++ copy_option_part(&p, item, sizeof(item), ","); ++ if (p == NULL) ++ break; ++ q = &item[0]; ++ copy_option_part(&q, name, sizeof(name), ":"); ++ if (q == NULL) ++ return FAIL; ++ copy_option_part(&q, value, sizeof(value), ":"); ++ ++ if (STRCMP(name, "type") == 0) ++ { ++ if (STRCMP(value, "directx") == 0) ++ dx_enable = 1; ++ else ++ return FAIL; ++ } ++ else if (STRCMP(name, "gamma") == 0) ++ { ++ dx_flags |= 1 << 0; ++ dx_gamma = (float)atof(value); ++ } ++ else if (STRCMP(name, "contrast") == 0) ++ { ++ dx_flags |= 1 << 1; ++ dx_contrast = (float)atof(value); ++ } ++ else if (STRCMP(name, "level") == 0) ++ { ++ dx_flags |= 1 << 2; ++ dx_level = (float)atof(value); ++ } ++ else if (STRCMP(name, "geom") == 0) ++ { ++ dx_flags |= 1 << 3; ++ dx_geom = atoi(value); ++ if (dx_geom < 0 || dx_geom > 2) ++ return FAIL; ++ } ++ else if (STRCMP(name, "renmode") == 0) ++ { ++ dx_flags |= 1 << 4; ++ dx_renmode = atoi(value); ++ if (dx_renmode < 0 || dx_renmode > 6) ++ return FAIL; ++ } ++ else if (STRCMP(name, "taamode") == 0) ++ { ++ dx_flags |= 1 << 5; ++ dx_taamode = atoi(value); ++ if (dx_taamode < 0 || dx_taamode > 3) ++ return FAIL; ++ } ++ else ++ return FAIL; ++ } ++ ++ /* Enable DirectX/DirectWrite */ ++ if (dx_enable) ++ { ++ if (!directx_enabled()) ++ return FAIL; ++ DWriteContext_SetRenderingParams(s_dwc, NULL); ++ if (dx_flags) ++ { ++ DWriteRenderingParams param; ++ DWriteContext_GetRenderingParams(s_dwc, ¶m); ++ if (dx_flags & (1 << 0)) ++ param.gamma = dx_gamma; ++ if (dx_flags & (1 << 1)) ++ param.enhancedContrast = dx_contrast; ++ if (dx_flags & (1 << 2)) ++ param.clearTypeLevel = dx_level; ++ if (dx_flags & (1 << 3)) ++ param.pixelGeometry = dx_geom; ++ if (dx_flags & (1 << 4)) ++ param.renderingMode = dx_renmode; ++ if (dx_flags & (1 << 5)) ++ param.textAntialiasMode = dx_taamode; ++ DWriteContext_SetRenderingParams(s_dwc, ¶m); ++ } ++ } ++ s_directx_enabled = dx_enable; ++ ++ return OK; ++ #else ++ return FAIL; ++ #endif ++ } ++ #endif ++ + /* + * These are new in Windows ME/XP, only defined in recent compilers. + */ +*************** +*** 1624,1629 **** +--- 1763,1773 ---- + set_vim_var_nr(VV_WINDOWID, HandleToLong(s_hwnd)); + #endif + ++ #ifdef FEAT_RENDER_OPTIONS ++ if (p_rop) ++ (void)gui_mch_set_rendering_options(p_rop); ++ #endif ++ + theend: + /* Display any pending error messages */ + display_errors(); +*************** +*** 1695,1703 **** + + /* compute the size of the outside of the window */ + win_width = width + (GetSystemMetrics(SM_CXFRAME) + +! GetSystemMetrics(SM_CXPADDEDBORDER)) * 2; + win_height = height + (GetSystemMetrics(SM_CYFRAME) + +! GetSystemMetrics(SM_CXPADDEDBORDER)) * 2 + + GetSystemMetrics(SM_CYCAPTION) + #ifdef FEAT_MENU + + gui_mswin_get_menu_height(FALSE) +--- 1839,1847 ---- + + /* compute the size of the outside of the window */ + win_width = width + (GetSystemMetrics(SM_CXFRAME) + +! GetSystemMetrics(SM_CXPADDEDBORDER)) * 2; + win_height = height + (GetSystemMetrics(SM_CYFRAME) + +! GetSystemMetrics(SM_CXPADDEDBORDER)) * 2 + + GetSystemMetrics(SM_CYCAPTION) + #ifdef FEAT_MENU + + gui_mswin_get_menu_height(FALSE) +*************** +*** 2239,2244 **** +--- 2383,2391 ---- + #endif + HPEN hpen, old_pen; + int y; ++ #ifdef FEAT_DIRECTX ++ int font_is_ttf_or_vector = 0; ++ #endif + + #ifndef MSWIN16_FASTTEXT + /* +*************** +*** 2326,2331 **** +--- 2473,2492 ---- + SetTextColor(s_hdc, gui.currFgColor); + SelectFont(s_hdc, gui.currFont); + ++ #ifdef FEAT_DIRECTX ++ if (IS_ENABLE_DIRECTX()) ++ { ++ TEXTMETRIC tm; ++ ++ GetTextMetrics(s_hdc, &tm); ++ if (tm.tmPitchAndFamily & (TMPF_TRUETYPE | TMPF_VECTOR)) ++ { ++ font_is_ttf_or_vector = 1; ++ DWriteContext_SetFont(s_dwc, (HFONT)gui.currFont); ++ } ++ } ++ #endif ++ + if (pad_size != Columns || padding == NULL || padding[0] != gui.char_width) + { + vim_free(padding); +*************** +*** 2360,2365 **** +--- 2521,2534 ---- + if (text[n] >= 0x80) + break; + ++ #if defined(FEAT_DIRECTX) ++ /* Quick hack to enable DirectWrite. To use DirectWrite (antialias), it is ++ * required that unicode drawing routine, currently. So this forces it ++ * enabled. */ ++ if (enc_utf8 && IS_ENABLE_DIRECTX()) ++ n = 0; /* Keep n < len, to enter block for unicode. */ ++ #endif ++ + /* Check if the Unicode buffer exists and is big enough. Create it + * with the same length as the multi-byte string, the number of wide + * characters is always equal or smaller. */ +*************** +*** 2418,2425 **** + i += utfc_ptr2len_len(text + i, len - i); + ++clen; + } +! ExtTextOutW(s_hdc, TEXT_X(col), TEXT_Y(row), +! foptions, pcliprect, unicodebuf, wlen, unicodepdy); + len = cells; /* used for underlining */ + } + else if ((enc_codepage > 0 && (int)GetACP() != enc_codepage) || enc_latin9) +--- 2587,2603 ---- + i += utfc_ptr2len_len(text + i, len - i); + ++clen; + } +! #if defined(FEAT_DIRECTX) +! if (IS_ENABLE_DIRECTX() && font_is_ttf_or_vector) +! { +! DWriteContext_DrawText(s_dwc, s_hdc, unicodebuf, wlen, +! TEXT_X(col), TEXT_Y(row), FILL_X(cells), FILL_Y(1), +! gui.char_width, gui.currFgColor); +! } +! else +! #endif +! ExtTextOutW(s_hdc, TEXT_X(col), TEXT_Y(row), +! foptions, pcliprect, unicodebuf, wlen, unicodepdy); + len = cells; /* used for underlining */ + } + else if ((enc_codepage > 0 && (int)GetACP() != enc_codepage) || enc_latin9) +*************** +*** 2549,2562 **** + + *screen_w = workarea_rect.right - workarea_rect.left + - (GetSystemMetrics(SM_CXFRAME) + +! GetSystemMetrics(SM_CXPADDEDBORDER)) * 2; + + /* FIXME: dirty trick: Because the gui_get_base_height() doesn't include + * the menubar for MSwin, we subtract it from the screen height, so that + * the window size can be made to fit on the screen. */ + *screen_h = workarea_rect.bottom - workarea_rect.top + - (GetSystemMetrics(SM_CYFRAME) + +! GetSystemMetrics(SM_CXPADDEDBORDER)) * 2 + - GetSystemMetrics(SM_CYCAPTION) + #ifdef FEAT_MENU + - gui_mswin_get_menu_height(FALSE) +--- 2727,2740 ---- + + *screen_w = workarea_rect.right - workarea_rect.left + - (GetSystemMetrics(SM_CXFRAME) + +! GetSystemMetrics(SM_CXPADDEDBORDER)) * 2; + + /* FIXME: dirty trick: Because the gui_get_base_height() doesn't include + * the menubar for MSwin, we subtract it from the screen height, so that + * the window size can be made to fit on the screen. */ + *screen_h = workarea_rect.bottom - workarea_rect.top + - (GetSystemMetrics(SM_CYFRAME) + +! GetSystemMetrics(SM_CXPADDEDBORDER)) * 2 + - GetSystemMetrics(SM_CYCAPTION) + #ifdef FEAT_MENU + - gui_mswin_get_menu_height(FALSE) +*************** +*** 3188,3200 **** + GetWindowRect(s_hwnd, &rect); + maxDialogWidth = rect.right - rect.left + - (GetSystemMetrics(SM_CXFRAME) + +! GetSystemMetrics(SM_CXPADDEDBORDER)) * 2; + if (maxDialogWidth < DLG_MIN_MAX_WIDTH) + maxDialogWidth = DLG_MIN_MAX_WIDTH; + + maxDialogHeight = rect.bottom - rect.top + - (GetSystemMetrics(SM_CYFRAME) + +! GetSystemMetrics(SM_CXPADDEDBORDER)) * 4 + - GetSystemMetrics(SM_CYCAPTION); + if (maxDialogHeight < DLG_MIN_MAX_HEIGHT) + maxDialogHeight = DLG_MIN_MAX_HEIGHT; +--- 3366,3378 ---- + GetWindowRect(s_hwnd, &rect); + maxDialogWidth = rect.right - rect.left + - (GetSystemMetrics(SM_CXFRAME) + +! GetSystemMetrics(SM_CXPADDEDBORDER)) * 2; + if (maxDialogWidth < DLG_MIN_MAX_WIDTH) + maxDialogWidth = DLG_MIN_MAX_WIDTH; + + maxDialogHeight = rect.bottom - rect.top + - (GetSystemMetrics(SM_CYFRAME) + +! GetSystemMetrics(SM_CXPADDEDBORDER)) * 4 + - GetSystemMetrics(SM_CYCAPTION); + if (maxDialogHeight < DLG_MIN_MAX_HEIGHT) + maxDialogHeight = DLG_MIN_MAX_HEIGHT; +*************** +*** 3351,3361 **** + /* Restrict the size to a maximum. Causes a scrollbar to show up. */ + if (dlgheight > maxDialogHeight) + { +! msgheight = msgheight - (dlgheight - maxDialogHeight); +! dlgheight = maxDialogHeight; +! scroll_flag = WS_VSCROLL; +! /* Make sure scrollbar doesn't appear in the middle of the dialog */ +! messageWidth = dlgwidth - DLG_ICON_WIDTH - 3 * dlgPaddingX; + } + + add_word(PixelToDialogY(dlgheight)); +--- 3529,3539 ---- + /* Restrict the size to a maximum. Causes a scrollbar to show up. */ + if (dlgheight > maxDialogHeight) + { +! msgheight = msgheight - (dlgheight - maxDialogHeight); +! dlgheight = maxDialogHeight; +! scroll_flag = WS_VSCROLL; +! /* Make sure scrollbar doesn't appear in the middle of the dialog */ +! messageWidth = dlgwidth - DLG_ICON_WIDTH - 3 * dlgPaddingX; + } + + add_word(PixelToDialogY(dlgheight)); +*** ../vim-7.4.392/src/gui_w48.c 2014-03-23 15:12:29.923264336 +0100 +--- src/gui_w48.c 2014-08-06 14:21:57.463249166 +0200 +*************** +*** 2785,2790 **** +--- 2785,2794 ---- + + out_flush(); /* make sure all output has been processed */ + (void)BeginPaint(hwnd, &ps); ++ #if defined(FEAT_DIRECTX) ++ if (IS_ENABLE_DIRECTX()) ++ DWriteContext_BeginDraw(s_dwc); ++ #endif + + #ifdef FEAT_MBYTE + /* prevent multi-byte characters from misprinting on an invalid +*************** +*** 2800,2808 **** +--- 2804,2823 ---- + #endif + + if (!IsRectEmpty(&ps.rcPaint)) ++ { ++ #if defined(FEAT_DIRECTX) ++ if (IS_ENABLE_DIRECTX()) ++ DWriteContext_BindDC(s_dwc, s_hdc, &ps.rcPaint); ++ #endif + gui_redraw(ps.rcPaint.left, ps.rcPaint.top, + ps.rcPaint.right - ps.rcPaint.left + 1, + ps.rcPaint.bottom - ps.rcPaint.top + 1); ++ } ++ ++ #if defined(FEAT_DIRECTX) ++ if (IS_ENABLE_DIRECTX()) ++ DWriteContext_EndDraw(s_dwc); ++ #endif + EndPaint(hwnd, &ps); + } + } +*************** +*** 3043,3048 **** +--- 3058,3069 ---- + void + gui_mch_exit(int rc) + { ++ #if defined(FEAT_DIRECTX) ++ DWriteContext_Close(s_dwc); ++ DWrite_Final(); ++ s_dwc = NULL; ++ #endif ++ + ReleaseDC(s_textArea, s_hdc); + DeleteObject(s_brush); + +*** ../vim-7.4.392/src/option.c 2014-06-25 14:44:04.458358774 +0200 +--- src/option.c 2014-08-06 14:33:24.503244228 +0200 +*************** +*** 2124,2129 **** +--- 2124,2138 ---- + {"remap", NULL, P_BOOL|P_VI_DEF, + (char_u *)&p_remap, PV_NONE, + {(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT}, ++ {"renderoptions", "rop", P_STRING|P_COMMA|P_RCLR|P_VI_DEF, ++ #ifdef FEAT_RENDER_OPTIONS ++ (char_u *)&p_rop, PV_NONE, ++ {(char_u *)"", (char_u *)0L} ++ #else ++ (char_u *)NULL, PV_NONE, ++ {(char_u *)NULL, (char_u *)0L} ++ #endif ++ SCRIPTID_INIT}, + {"report", NULL, P_NUM|P_VI_DEF, + (char_u *)&p_report, PV_NONE, + {(char_u *)2L, (char_u *)0L} SCRIPTID_INIT}, +*************** +*** 6999,7004 **** +--- 7008,7021 ---- + } + #endif + ++ #if defined(FEAT_RENDER_OPTIONS) ++ else if (varp == &p_rop && gui.in_use) ++ { ++ if (!gui_mch_set_rendering_options(p_rop)) ++ errmsg = e_invarg; ++ } ++ #endif ++ + /* Options that are a list of flags. */ + else + { +*** ../vim-7.4.392/src/option.h 2014-06-25 14:39:35.110348584 +0200 +--- src/option.h 2014-08-06 14:23:25.419248534 +0200 +*************** +*** 655,660 **** +--- 655,663 ---- + #endif + EXTERN int p_remap; /* 'remap' */ + EXTERN long p_re; /* 'regexpengine' */ ++ #ifdef FEAT_RENDER_OPTIONS ++ EXTERN char_u *p_rop; /* 'renderoptions' */ ++ #endif + EXTERN long p_report; /* 'report' */ + #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX) + EXTERN long p_pvh; /* 'previewheight' */ +*** ../vim-7.4.392/src/version.c 2014-08-06 13:36:56.091268582 +0200 +--- src/version.c 2014-08-06 14:29:39.183245847 +0200 +*************** +*** 189,194 **** +--- 189,201 ---- + #else + "-digraphs", + #endif ++ #ifdef FEAT_GUI_W32 ++ # ifdef FEAT_DIRECTX ++ "+directx", ++ # else ++ "-directx", ++ # endif ++ #endif + #ifdef FEAT_DND + "+dnd", + #else +*** ../vim-7.4.392/src/vim.h 2014-04-02 19:54:58.275599459 +0200 +--- src/vim.h 2014-08-06 14:21:57.467249166 +0200 +*************** +*** 134,139 **** +--- 134,146 ---- + # endif + #endif + ++ /* Check support for rendering options */ ++ #ifdef FEAT_GUI ++ # if defined(FEAT_DIRECTX) ++ # define FEAT_RENDER_OPTIONS ++ # endif ++ #endif ++ + /* Visual Studio 2005 has 'deprecated' many of the standard CRT functions */ + #if _MSC_VER >= 1400 + # define _CRT_SECURE_NO_DEPRECATE +*** ../vim-7.4.392/src/proto/gui_w32.pro 2013-08-10 13:37:36.000000000 +0200 +--- src/proto/gui_w32.pro 2014-08-06 14:33:04.155244374 +0200 +*************** +*** 1,4 **** +--- 1,6 ---- + /* gui_w32.c */ ++ int directx_enabled __ARGS((void)); ++ int gui_mch_set_rendering_options __ARGS((char_u *s)); + void gui_mch_set_blinking __ARGS((long wait, long on, long off)); + void gui_mch_stop_blink __ARGS((void)); + void gui_mch_start_blink __ARGS((void)); +*** ../vim-7.4.392/src/version.c 2014-08-06 13:36:56.091268582 +0200 +--- src/version.c 2014-08-06 14:29:39.183245847 +0200 +*************** +*** 736,737 **** +--- 743,746 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 393, + /**/ + +-- +A consultant is a person who takes your money and annoys your employees while +tirelessly searching for the best way to extend the consulting contract. + (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/patches/source/vim/patches/7.4.394 b/patches/source/vim/patches/7.4.394 new file mode 100644 index 000000000..fbe199c94 --- /dev/null +++ b/patches/source/vim/patches/7.4.394 @@ -0,0 +1,56 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.394 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.394 (after 7.4.393) +Problem: When using DirectX last italic character is incomplete. +Solution: Add one to the number of cells. (Ken Takata) +Files: src/gui_w32.c + + +*** ../vim-7.4.393/src/gui_w32.c 2014-08-06 14:52:05.043236174 +0200 +--- src/gui_w32.c 2014-08-06 16:45:56.927187071 +0200 +*************** +*** 2590,2597 **** + #if defined(FEAT_DIRECTX) + if (IS_ENABLE_DIRECTX() && font_is_ttf_or_vector) + { + DWriteContext_DrawText(s_dwc, s_hdc, unicodebuf, wlen, +! TEXT_X(col), TEXT_Y(row), FILL_X(cells), FILL_Y(1), + gui.char_width, gui.currFgColor); + } + else +--- 2590,2598 ---- + #if defined(FEAT_DIRECTX) + if (IS_ENABLE_DIRECTX() && font_is_ttf_or_vector) + { ++ /* Add one to "cells" for italics. */ + DWriteContext_DrawText(s_dwc, s_hdc, unicodebuf, wlen, +! TEXT_X(col), TEXT_Y(row), FILL_X(cells + 1), FILL_Y(1), + gui.char_width, gui.currFgColor); + } + else +*** ../vim-7.4.393/src/version.c 2014-08-06 14:52:05.047236174 +0200 +--- src/version.c 2014-08-06 16:46:54.279186658 +0200 +*************** +*** 743,744 **** +--- 743,746 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 394, + /**/ + +-- +The average life of an organization chart is six months. You can safely +ignore any order from your boss that would take six months to complete. + (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/patches/source/vim/patches/7.4.395 b/patches/source/vim/patches/7.4.395 new file mode 100644 index 000000000..943b44e9e --- /dev/null +++ b/patches/source/vim/patches/7.4.395 @@ -0,0 +1,99 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.395 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.395 (after 7.4.355) +Problem: C indent is wrong below an if with wrapped condition followed by + curly braces. (Trevor Powell) +Solution: Make a copy of tryposBrace. +Files: src/misc1.c, src/testdir/test3.in, src/testdir/test3.ok + + +*** ../vim-7.4.394/src/misc1.c 2014-08-06 12:49:06.711289205 +0200 +--- src/misc1.c 2014-08-06 17:35:45.003165594 +0200 +*************** +*** 6995,7000 **** +--- 6995,7001 ---- + char_u *linecopy; + pos_T *trypos; + pos_T *tryposBrace = NULL; ++ pos_T tryposBraceCopy; + pos_T our_paren_pos; + char_u *start; + int start_brace; +*************** +*** 7532,7538 **** +--- 7533,7543 ---- + /* + * We are inside braces, there is a { before this line at the position + * stored in tryposBrace. ++ * Make a copy of tryposBrace, it may point to pos_copy inside ++ * find_start_brace(), which may be changed somewhere. + */ ++ tryposBraceCopy = *tryposBrace; ++ tryposBrace = &tryposBraceCopy; + trypos = tryposBrace; + ourscope = trypos->lnum; + start = ml_get(ourscope); +*** ../vim-7.4.394/src/testdir/test3.in 2014-07-03 22:57:51.299862927 +0200 +--- src/testdir/test3.in 2014-08-06 17:19:41.099172522 +0200 +*************** +*** 464,469 **** +--- 464,477 ---- + asdfasdf + } + ++ { ++ for ( int i = 0; ++ i < 10; i++ ) ++ { ++ } ++ i = 0; ++ } ++ + class bob + { + int foo() {return 1;} +*** ../vim-7.4.394/src/testdir/test3.ok 2014-07-03 22:57:51.299862927 +0200 +--- src/testdir/test3.ok 2014-08-06 17:20:11.867172301 +0200 +*************** +*** 452,457 **** +--- 452,465 ---- + asdfasdf + } + ++ { ++ for ( int i = 0; ++ i < 10; i++ ) ++ { ++ } ++ i = 0; ++ } ++ + class bob + { + int foo() {return 1;} +*** ../vim-7.4.394/src/version.c 2014-08-06 16:49:51.203185387 +0200 +--- src/version.c 2014-08-06 17:43:44.243162150 +0200 +*************** +*** 743,744 **** +--- 743,746 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 395, + /**/ + +-- +An operatingsystem is just a name you give to the rest of bloating +idiosyncratic machine-based-features you left out of your editor. + (author unknown) + + /// 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/patches/source/vim/patches/7.4.396 b/patches/source/vim/patches/7.4.396 new file mode 100644 index 000000000..47b9a0c69 --- /dev/null +++ b/patches/source/vim/patches/7.4.396 @@ -0,0 +1,291 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.396 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.396 +Problem: When 'clipboard' is "unnamed", :g/pat/d is very slow. (Praful) +Solution: Only set the clipboard after the last delete. (Christian Brabandt) +Files: src/ex_cmds.c, src/ex_cmds2.c, src/ex_docmd.c, src/globals.h, + src/ops.c, src/proto/ui.pro, src/ui.c + + +*** ../vim-7.4.395/src/ex_cmds.c 2014-07-09 21:17:59.755550204 +0200 +--- src/ex_cmds.c 2014-08-06 18:06:37.931152276 +0200 +*************** +*** 5514,5520 **** +--- 5514,5528 ---- + smsg((char_u *)_("Pattern not found: %s"), pat); + } + else ++ { ++ #ifdef FEAT_CLIPBOARD ++ start_global_changes(); ++ #endif + global_exe(cmd); ++ #ifdef FEAT_CLIPBOARD ++ end_global_changes(); ++ #endif ++ } + + ml_clearmarked(); /* clear rest of the marks */ + vim_regfree(regmatch.regprog); +*** ../vim-7.4.395/src/ex_cmds2.c 2014-04-05 19:44:36.903160723 +0200 +--- src/ex_cmds2.c 2014-08-06 18:05:07.563152926 +0200 +*************** +*** 2464,2469 **** +--- 2464,2472 ---- + * great speed improvement. */ + save_ei = au_event_disable(",Syntax"); + #endif ++ #ifdef FEAT_CLIPBOARD ++ start_global_changes(); ++ #endif + + if (eap->cmdidx == CMD_windo + || eap->cmdidx == CMD_tabdo +*************** +*** 2591,2596 **** +--- 2594,2602 ---- + curbuf->b_fname, TRUE, curbuf); + } + #endif ++ #ifdef FEAT_CLIPBOARD ++ end_global_changes(); ++ #endif + } + + /* +*************** +*** 2750,2757 **** + * used. + * Returns OK when at least one match found, FAIL otherwise. + * +! * If "name" is NULL calls callback for each entry in runtimepath. Cookie is +! * passed by reference in this case, setting it to NULL indicates that callback + * has done its job. + */ + int +--- 2756,2763 ---- + * used. + * Returns OK when at least one match found, FAIL otherwise. + * +! * If "name" is NULL calls callback for each entry in runtimepath. Cookie is +! * passed by reference in this case, setting it to NULL indicates that callback + * has done its job. + */ + int +*** ../vim-7.4.395/src/ex_docmd.c 2014-06-17 17:48:21.780628008 +0200 +--- src/ex_docmd.c 2014-08-06 18:05:07.563152926 +0200 +*************** +*** 11534,11539 **** +--- 11534,11543 ---- + { + linenr_T lnum; + ++ #ifdef FEAT_CLIPBOARD ++ start_global_changes(); ++ #endif ++ + /* First set the marks for all lines closed/open. */ + for (lnum = eap->line1; lnum <= eap->line2; ++lnum) + if (hasFolding(lnum, NULL, NULL) == (eap->cmdidx == CMD_folddoclosed)) +*************** +*** 11542,11546 **** +--- 11546,11553 ---- + /* Execute the command on the marked lines. */ + global_exe(eap->arg); + ml_clearmarked(); /* clear rest of the marks */ ++ #ifdef FEAT_CLIPBOARD ++ end_global_changes(); ++ #endif + } + #endif +*** ../vim-7.4.395/src/globals.h 2014-07-30 17:21:53.815518506 +0200 +--- src/globals.h 2014-08-06 18:05:07.563152926 +0200 +*************** +*** 533,538 **** +--- 533,540 ---- + EXTERN int clip_autoselectml INIT(= FALSE); + EXTERN int clip_html INIT(= FALSE); + EXTERN regprog_T *clip_exclude_prog INIT(= NULL); ++ EXTERN int clip_did_set_selection INIT(= TRUE); ++ EXTERN int clip_unnamed_saved INIT(= 0); + #endif + + /* +*** ../vim-7.4.395/src/ops.c 2014-06-25 14:39:35.106348584 +0200 +--- src/ops.c 2014-08-06 18:05:07.563152926 +0200 +*************** +*** 1597,1605 **** + { + /* If no reg. specified, and "unnamed" or "unnamedplus" is in 'clipboard', + * use '*' or '+' reg, respectively. "unnamedplus" prevails. */ +! if (*rp == 0 && clip_unnamed != 0) +! *rp = ((clip_unnamed & CLIP_UNNAMED_PLUS) && clip_plus.available) + ? '+' : '*'; + if (!clip_star.available && *rp == '*') + *rp = 0; + if (!clip_plus.available && *rp == '+') +--- 1597,1611 ---- + { + /* If no reg. specified, and "unnamed" or "unnamedplus" is in 'clipboard', + * use '*' or '+' reg, respectively. "unnamedplus" prevails. */ +! if (*rp == 0 && (clip_unnamed != 0 || clip_unnamed_saved != 0)) +! { +! if (clip_unnamed != 0) +! *rp = ((clip_unnamed & CLIP_UNNAMED_PLUS) && clip_plus.available) +! ? '+' : '*'; +! else +! *rp = ((clip_unnamed_saved & CLIP_UNNAMED_PLUS) && clip_plus.available) + ? '+' : '*'; ++ } + if (!clip_star.available && *rp == '*') + *rp = 0; + if (!clip_plus.available && *rp == '+') +*************** +*** 3203,3209 **** + if (clip_star.available + && (curr == &(y_regs[STAR_REGISTER]) + || (!deleting && oap->regname == 0 +! && (clip_unnamed & CLIP_UNNAMED)))) + { + if (curr != &(y_regs[STAR_REGISTER])) + /* Copy the text from register 0 to the clipboard register. */ +--- 3209,3215 ---- + if (clip_star.available + && (curr == &(y_regs[STAR_REGISTER]) + || (!deleting && oap->regname == 0 +! && ((clip_unnamed | clip_unnamed_saved) & CLIP_UNNAMED)))) + { + if (curr != &(y_regs[STAR_REGISTER])) + /* Copy the text from register 0 to the clipboard register. */ +*************** +*** 3224,3230 **** + if (clip_plus.available + && (curr == &(y_regs[PLUS_REGISTER]) + || (!deleting && oap->regname == 0 +! && (clip_unnamed & CLIP_UNNAMED_PLUS)))) + { + if (curr != &(y_regs[PLUS_REGISTER])) + /* Copy the text from register 0 to the clipboard register. */ +--- 3230,3237 ---- + if (clip_plus.available + && (curr == &(y_regs[PLUS_REGISTER]) + || (!deleting && oap->regname == 0 +! && ((clip_unnamed | clip_unnamed_saved) & +! CLIP_UNNAMED_PLUS)))) + { + if (curr != &(y_regs[PLUS_REGISTER])) + /* Copy the text from register 0 to the clipboard register. */ +*** ../vim-7.4.395/src/proto/ui.pro 2013-08-10 13:37:29.000000000 +0200 +--- src/proto/ui.pro 2014-08-06 18:05:07.563152926 +0200 +*************** +*** 14,19 **** +--- 14,21 ---- + void clip_update_selection __ARGS((VimClipboard *clip)); + void clip_own_selection __ARGS((VimClipboard *cbd)); + void clip_lose_selection __ARGS((VimClipboard *cbd)); ++ void start_global_changes __ARGS((void)); ++ void end_global_changes __ARGS((void)); + void clip_auto_select __ARGS((void)); + int clip_isautosel_star __ARGS((void)); + int clip_isautosel_plus __ARGS((void)); +*** ../vim-7.4.395/src/ui.c 2014-06-25 14:39:35.114348584 +0200 +--- src/ui.c 2014-08-06 18:13:13.475149434 +0200 +*************** +*** 558,563 **** +--- 558,608 ---- + } + + /* ++ * Save and restore clip_unnamed before doing possibly many changes. This ++ * prevents accessing the clipboard very often which might slow down Vim ++ * considerably. ++ */ ++ ++ /* ++ * Save clip_unnamed and reset it. ++ */ ++ void ++ start_global_changes() ++ { ++ clip_unnamed_saved = clip_unnamed; ++ ++ if (clip_did_set_selection) ++ { ++ clip_unnamed = FALSE; ++ clip_did_set_selection = FALSE; ++ } ++ } ++ ++ /* ++ * Restore clip_unnamed and set the selection when needed. ++ */ ++ void ++ end_global_changes() ++ { ++ if (!clip_did_set_selection) ++ { ++ clip_did_set_selection = TRUE; ++ clip_unnamed = clip_unnamed_saved; ++ if (clip_unnamed & CLIP_UNNAMED) ++ { ++ clip_own_selection(&clip_star); ++ clip_gen_set_selection(&clip_star); ++ } ++ if (clip_unnamed & CLIP_UNNAMED_PLUS) ++ { ++ clip_own_selection(&clip_plus); ++ clip_gen_set_selection(&clip_plus); ++ } ++ } ++ clip_unnamed_saved = FALSE; ++ } ++ ++ /* + * Called when Visual mode is ended: update the selection. + */ + void +*************** +*** 1428,1433 **** +--- 1473,1487 ---- + clip_gen_set_selection(cbd) + VimClipboard *cbd; + { ++ if (!clip_did_set_selection) ++ { ++ /* Updating postponed, so that accessing the system clipboard won't ++ * hang Vim when accessing it many times (e.g. on a :g comand). */ ++ if (cbd == &clip_plus && (clip_unnamed_saved & CLIP_UNNAMED_PLUS)) ++ return; ++ else if (cbd == &clip_star && (clip_unnamed_saved & CLIP_UNNAMED)) ++ return; ++ } + #ifdef FEAT_XCLIPBOARD + # ifdef FEAT_GUI + if (gui.in_use) +*** ../vim-7.4.395/src/version.c 2014-08-06 17:44:09.867161966 +0200 +--- src/version.c 2014-08-06 18:04:47.359153071 +0200 +*************** +*** 743,744 **** +--- 743,746 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 396, + /**/ + +-- +You have heard the saying that if you put a thousand monkeys in a room with a +thousand typewriters and waited long enough, eventually you would have a room +full of dead monkeys. + (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/patches/source/vim/patches/7.4.397 b/patches/source/vim/patches/7.4.397 new file mode 100644 index 000000000..4d70ca635 --- /dev/null +++ b/patches/source/vim/patches/7.4.397 @@ -0,0 +1,150 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.397 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.397 +Problem: Matchparen only uses the topmost syntax item. +Solution: Go through the syntax stack to find items. (James McCoy) + Also use getcurpos() when possible. +Files: runtime/plugin/matchparen.vim + + +*** ../vim-7.4.396/runtime/plugin/matchparen.vim 2014-06-17 17:48:21.772628007 +0200 +--- runtime/plugin/matchparen.vim 2014-08-06 19:02:04.967128364 +0200 +*************** +*** 1,6 **** + " Vim plugin for showing matching parens + " Maintainer: Bram Moolenaar <Bram@vim.org> +! " Last Change: 2014 Jun 17 + + " Exit quickly when: + " - this plugin was already loaded (or disabled) +--- 1,6 ---- + " Vim plugin for showing matching parens + " Maintainer: Bram Moolenaar <Bram@vim.org> +! " Last Change: 2014 Jul 19 + + " Exit quickly when: + " - this plugin was already loaded (or disabled) +*************** +*** 54,67 **** + let c_col = col('.') + let before = 0 + +! let c = getline(c_lnum)[c_col - 1] + let plist = split(&matchpairs, '.\zs[:,]') + let i = index(plist, c) + if i < 0 + " not found, in Insert mode try character before the cursor + if c_col > 1 && (mode() == 'i' || mode() == 'R') + let before = 1 +! let c = getline(c_lnum)[c_col - 2] + let i = index(plist, c) + endif + if i < 0 +--- 54,68 ---- + let c_col = col('.') + let before = 0 + +! let text = getline(c_lnum) +! let c = text[c_col - 1] + let plist = split(&matchpairs, '.\zs[:,]') + let i = index(plist, c) + if i < 0 + " not found, in Insert mode try character before the cursor + if c_col > 1 && (mode() == 'i' || mode() == 'R') + let before = 1 +! let c = text[c_col - 2] + let i = index(plist, c) + endif + if i < 0 +*************** +*** 87,100 **** + " Find the match. When it was just before the cursor move it there for a + " moment. + if before > 0 +! let save_cursor = winsaveview() + call cursor(c_lnum, c_col - before) + endif + +! " When not in a string or comment ignore matches inside them. + " We match "escape" for special items, such as lispEscapeSpecial. +! let s_skip ='synIDattr(synID(line("."), col("."), 0), "name") ' . +! \ '=~? "string\\|character\\|singlequote\\|escape\\|comment"' + execute 'if' s_skip '| let s_skip = 0 | endif' + + " Limit the search to lines visible in the window. +--- 88,114 ---- + " Find the match. When it was just before the cursor move it there for a + " moment. + if before > 0 +! let has_getcurpos = exists("*getcurpos") +! if has_getcurpos +! " getcurpos() is more efficient but doesn't exist before 7.4.313. +! let save_cursor = getcurpos() +! else +! let save_cursor = winsaveview() +! endif + call cursor(c_lnum, c_col - before) + endif + +! " Build an expression that detects whether the current cursor position is in +! " certain syntax types (string, comment, etc.), for use as searchpairpos()'s +! " skip argument. + " We match "escape" for special items, such as lispEscapeSpecial. +! let s_skip = '!empty(filter(map(synstack(line("."), col(".")), ''synIDattr(v:val, "name")''), ' . +! \ '''v:val =~? "string\\|character\\|singlequote\\|escape\\|comment"''))' +! " If executing the expression determines that the cursor is currently in +! " one of the syntax types, then we want searchpairpos() to find the pair +! " within those syntax types (i.e., not skip). Otherwise, the cursor is +! " outside of the syntax types and s_skip should keep its value so we skip any +! " matching pair inside the syntax types. + execute 'if' s_skip '| let s_skip = 0 | endif' + + " Limit the search to lines visible in the window. +*************** +*** 147,153 **** + endtry + + if before > 0 +! call winrestview(save_cursor) + endif + + " If a match is found setup match highlighting. +--- 161,171 ---- + endtry + + if before > 0 +! if has_getcurpos +! call setpos('.', save_cursor) +! else +! call winrestview(save_cursor) +! endif + endif + + " If a match is found setup match highlighting. +*** ../vim-7.4.396/src/version.c 2014-08-06 18:17:03.475147780 +0200 +--- src/version.c 2014-08-06 19:06:44.627126354 +0200 +*************** +*** 743,744 **** +--- 743,746 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 397, + /**/ + +-- +Often you're less important than your furniture. If you think about it, you +can get fired but your furniture stays behind, gainfully employed at the +company that didn't need _you_ anymore. + (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/patches/source/vim/patches/7.4.398 b/patches/source/vim/patches/7.4.398 new file mode 100644 index 000000000..e710505e5 --- /dev/null +++ b/patches/source/vim/patches/7.4.398 @@ -0,0 +1,52 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.398 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.398 (after 7.4.393) +Problem: Gcc error for the argument of InterlockedIncrement() and + InterlockedDecrement(). (Axel Bender) +Solution: Remove "unsigned" from the cRefCount_ declaration. +Files: src/gui_dwrite.cpp + + +*** ../vim-7.4.397/src/gui_dwrite.cpp 2014-08-06 14:52:05.043236174 +0200 +--- src/gui_dwrite.cpp 2014-08-06 18:39:01.611138306 +0200 +*************** +*** 377,383 **** + } + + private: +! unsigned long cRefCount_; + IDWriteBitmapRenderTarget* pRenderTarget_; + IDWriteRenderingParams* pRenderingParams_; + }; +--- 377,383 ---- + } + + private: +! long cRefCount_; + IDWriteBitmapRenderTarget* pRenderTarget_; + IDWriteRenderingParams* pRenderingParams_; + }; +*** ../vim-7.4.397/src/version.c 2014-08-06 19:08:33.563125571 +0200 +--- src/version.c 2014-08-07 13:54:40.162639943 +0200 +*************** +*** 743,744 **** +--- 743,746 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 398, + /**/ + +-- +A)bort, R)etry, D)o it right this time + + /// 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/patches/source/vim/patches/7.4.399 b/patches/source/vim/patches/7.4.399 new file mode 100644 index 000000000..d50b610de --- /dev/null +++ b/patches/source/vim/patches/7.4.399 @@ -0,0 +1,5059 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.399 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.4.399 +Problem: Encryption implementation is messy. Blowfish encryption has a + weakness. +Solution: Refactor the encryption, store the state in an allocated struct + instead of using a save/restore mechanism. Introduce the + "blowfish2" method, which does not have the weakness and encrypts + the whole undo file. (largely by David Leadbeater) +Files: runtime/doc/editing.txt, runtime/doc/options.txt, src/Makefile, + src/blowfish.c, src/crypt.c, src/crypt_zip.c, src/ex_docmd.c, + src/fileio.c, src/globals.h, src/main.c, src/memline.c, + src/misc2.c, src/option.c, src/proto.h, src/proto/blowfish.pro, + src/proto/crypt.pro, src/proto/crypt_zip.pro, + src/proto/fileio.pro, src/proto/misc2.pro, src/structs.h, + src/undo.c, src/testdir/test71.in, src/testdir/test71.ok, + src/testdir/test71a.in, src/testdir/test72.in, + src/testdir/test72.ok + + +*** ../vim-7.4.398/runtime/doc/editing.txt 2013-08-10 13:24:53.000000000 +0200 +--- runtime/doc/editing.txt 2014-08-09 15:35:40.101354406 +0200 +*************** +*** 1361,1371 **** + {only available when compiled with the |+cryptv| feature} *E833* + + The text in the swap file and the undo file is also encrypted. *E843* + + 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. + + WARNING: If you make a typo when entering the key and then write the file and + exit, the text will be lost! +--- 1362,1382 ---- + {only available when compiled with the |+cryptv| feature} *E833* + + The text in the swap file and the undo file is also encrypted. *E843* ++ However, this is done block-by-block and may reduce the time needed to crack a ++ password. You can disable the swap file, but then a crash will cause you to ++ lose your work. The undo file can be disabled without much disadvantage. > ++ :set noundofile ++ :noswapfile edit secrets + + 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 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,1409 **** + :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 + 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 + The message given for reading and writing a file will show "[crypted]" when +! using zip, "[blowfish]" when using blowfish. + + When writing an undo file, the same key and method will be used for the text + in the undo file. |persistent-undo|. +--- 1403,1427 ---- + :set key= + + You can use the 'cryptmethod' option to select the type of encryption, use one +! 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=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, etc. + + When writing an undo file, the same key and method will be used for the text + in the undo file. |persistent-undo|. +*************** +*** 1438,1444 **** + 0 string VimCrypt~ Vim encrypted file + >9 string 01 - "zip" cryptmethod + >9 string 02 - "blowfish" cryptmethod +! + + Notes: + - Encryption is not possible when doing conversion with 'charconvert'. +--- 1456,1462 ---- + 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,1481 **** + - 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. + - Vim originates from the Netherlands. That is where the sources come from. + Thus the encryption code is not exported from the USA. + + ============================================================================== + 10. Timestamps *timestamp* *timestamps* + +! Vim remembers the modification timestamp of a file when you begin editing it. +! This is used to avoid that you have two different versions of the same file +! (without you knowing this). +! +! After a shell command is run (|:!cmd| |suspend| |:read!| |K|) timestamps are +! compared for all buffers in a window. Vim will run any associated +! |FileChangedShell| autocommands or display a warning for any files that have +! changed. In the GUI this happens when Vim regains input focus. + + *E321* *E462* + If you want to automatically reload a file when it has been changed outside of +--- 1480,1504 ---- + - 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 implmentation 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. + + ============================================================================== + 10. Timestamps *timestamp* *timestamps* + +! Vim remembers the modification timestamp, mode and size of a file when you +! begin editing it. This is used to avoid that you have two different versions +! of the same file (without you knowing this). +! +! After a shell command is run (|:!cmd| |suspend| |:read!| |K|) timestamps, +! file modes and file sizes are compared for all buffers in a window. Vim will +! run any associated |FileChangedShell| autocommands or display a warning for +! any files that have changed. In the GUI this happens when Vim regains input +! focus. + + *E321* *E462* + If you want to automatically reload a file when it has been changed outside of +*** ../vim-7.4.398/runtime/doc/options.txt 2014-08-06 14:52:05.039236174 +0200 +--- runtime/doc/options.txt 2014-08-09 15:36:48.165353916 +0200 +*************** +*** 2229,2238 **** + 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. + + When reading an encrypted file 'cryptmethod' will be set automatically + to the detected method of the file being read. Thus if you write it +--- 2229,2246 ---- + zip PkZip compatible method. A weak kind of encryption. + Backwards compatible with Vim 7.2 and older. + *blowfish* +! 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 +*** ../vim-7.4.398/src/Makefile 2014-05-22 14:54:22.850468654 +0200 +--- src/Makefile 2014-08-09 15:37:19.689353690 +0200 +*************** +*** 1431,1436 **** +--- 1431,1438 ---- + blowfish.c \ + buffer.c \ + charset.c \ ++ crypt.c \ ++ crypt_zip.c \ + diff.c \ + digraph.c \ + edit.c \ +*************** +*** 1520,1525 **** +--- 1522,1529 ---- + 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 \ +*************** +*** 1589,1594 **** +--- 1593,1600 ---- + blowfish.pro \ + buffer.pro \ + charset.pro \ ++ crypt.pro \ ++ crypt_zip.pro \ + diff.pro \ + digraph.pro \ + edit.pro \ +*************** +*** 1753,1762 **** + languages: + @if test -n "$(MAKEMO)" -a -f $(PODIR)/Makefile; then \ + cd $(PODIR); \ +! 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; \ + fi + + # Update the *.po files for changes in the sources. Only run manually. +--- 1759,1769 ---- + languages: + @if test -n "$(MAKEMO)" -a -f $(PODIR)/Makefile; then \ + cd $(PODIR); \ +! 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; \ + fi + + # Update the *.po files for changes in the sources. Only run manually. +*************** +*** 1883,1890 **** +--- 1890,1903 ---- + # Run individual test, assuming that Vim was already compiled. + test1 test2 test3 test4 test5 test6 test7 test8 test9 \ + test_autoformat_join \ ++ test_breakindent \ ++ test_changelist \ + test_eval \ ++ test_insertcount \ ++ test_listlbr \ ++ test_listlbr_utf8 \ + test_options \ ++ 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 \ +*************** +*** 2506,2511 **** +--- 2519,2530 ---- + 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 + +*************** +*** 2855,2860 **** +--- 2874,2887 ---- + 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 \ +*** ../vim-7.4.398/src/blowfish.c 2014-02-11 15:23:27.930123631 +0100 +--- src/blowfish.c 2014-08-09 15:31:32.493356185 +0200 +*************** +*** 9,25 **** + * Blowfish encryption for Vim; in Blowfish cipher feedback mode. + * Contributed by Mohsin Ahmed, http://www.cs.albany.edu/~mosh + * Based on http://www.schneier.com/blowfish.html by Bruce Schneier. + */ + + #include "vim.h" + +! #if defined(FEAT_CRYPT) + + #define ARRAY_LENGTH(A) (sizeof(A)/sizeof(A[0])) + + #define BF_BLOCK 8 + #define BF_BLOCK_MASK 7 +! #define BF_CFB_LEN (8*(BF_BLOCK)) + + typedef union { + UINT32_T ul[2]; +--- 9,33 ---- + * Blowfish encryption for Vim; in Blowfish cipher 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) || defined(PROTO) + + #define ARRAY_LENGTH(A) (sizeof(A)/sizeof(A[0])) + + #define BF_BLOCK 8 + #define BF_BLOCK_MASK 7 +! #define BF_MAX_CFB_LEN (8 * BF_BLOCK) + + typedef union { + UINT32_T ul[2]; +*************** +*** 37,50 **** + # 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)); + static int bf_self_test __ARGS((void)); + + /* Blowfish code */ +! static UINT32_T pax[18]; +! static UINT32_T ipa[18] = { + 0x243f6a88u, 0x85a308d3u, 0x13198a2eu, + 0x03707344u, 0xa4093822u, 0x299f31d0u, + 0x082efa98u, 0xec4e6c89u, 0x452821e6u, +--- 45,70 ---- + # endif + #endif + +! /* 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_init[18] = { + 0x243f6a88u, 0x85a308d3u, 0x13198a2eu, + 0x03707344u, 0xa4093822u, 0x299f31d0u, + 0x082efa98u, 0xec4e6c89u, 0x452821e6u, +*************** +*** 53,60 **** + 0xb5470917u, 0x9216d5d9u, 0x8979fb1bu + }; + +! static UINT32_T sbx[4][256]; +! static UINT32_T sbi[4][256] = { + {0xd1310ba6u, 0x98dfb5acu, 0x2ffd72dbu, 0xd01adfb7u, + 0xb8e1afedu, 0x6a267e96u, 0xba7c9045u, 0xf12c7f99u, + 0x24a19947u, 0xb3916cf7u, 0x0801f2e2u, 0x858efc16u, +--- 73,79 ---- + 0xb5470917u, 0x9216d5d9u, 0x8979fb1bu + }; + +! static UINT32_T sbx_init[4][256] = { + {0xd1310ba6u, 0x98dfb5acu, 0x2ffd72dbu, 0xd01adfb7u, + 0xb8e1afedu, 0x6a267e96u, 0xba7c9045u, 0xf12c7f99u, + 0x24a19947u, 0xb3916cf7u, 0x0801f2e2u, 0x858efc16u, +*************** +*** 314,346 **** + } + }; + +- + #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]; + + #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]; +! + + static void +! bf_e_block(p_xl, p_xr) + 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]; + temp = xl; + xl = xr; + xr = temp; +--- 333,372 ---- + } + }; + + #define F1(i) \ +! 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 ^= 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(bfs, p_xl, p_xr) +! bf_state_T *bfs; + UINT32_T *p_xl; + UINT32_T *p_xr; + { +! 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,369 **** + *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) \ +--- 374,379 ---- +*************** +*** 374,380 **** + #endif + + static void +! bf_e_cblock(block) + char_u *block; + { + block8 bk; +--- 384,391 ---- + #endif + + static void +! bf_e_cblock(bfs, block) +! bf_state_T *bfs; + char_u *block; + { + block8 bk; +*************** +*** 382,416 **** + memcpy(bk.uc, block, 8); + htonl2(bk.ul[0]); + htonl2(bk.ul[1]); +! bf_e_block(&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; + { + int i, j, keypos = 0; + unsigned u; +--- 393,414 ---- + memcpy(bk.uc, block, 8); + htonl2(bk.ul[0]); + htonl2(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); + } + + /* + * Initialize the crypt method using "password" as the encryption key and + * "salt[salt_len]" as the salt. + */ +! 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,424 **** + char_u *key; + int keylen; + +! /* Process the key 1000 times. + * See http://en.wikipedia.org/wiki/Key_strengthening. */ + key = sha256_key(password, salt, salt_len); + for (i = 0; i < 1000; i++) +--- 416,422 ---- + char_u *key; + int keylen; + +! /* 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,488 **** + key[i] = u; + } + +! mch_memmove(sbx, sbi, 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; + } + + 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; + } + + 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 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]; + UINT32_T val; + { + int i, j; + UINT32_T c = 0; + + for (i = 0; i < 18; i++) +! c ^= a_ipa[i]; + for (i = 0; i < 4; i++) + for (j = 0; j < 256; j++) +! c ^= a_sbi[i][j]; + return c == val; + } + +--- 435,488 ---- + key[i] = u; + } + +! /* 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]; +! bfs->pax[i] = pax_init[i] ^ val; + } + + data_l = data_r = 0; + for (i = 0; i < 18; i += 2) + { +! 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(bfs, &data_l, &data_r); +! bfs->sbx[i][j + 0] = data_l; +! bfs->sbx[i][j + 1] = data_r; + } + } + } + + /* +! * Blowfish self-test for corrupted tables or instructions. + */ + static int +! 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 ^= pax[i]; + for (i = 0; i < 4; i++) + for (j = 0; j < 256; j++) +! c ^= sbx[i][j]; + return c == val; + } + +*************** +*** 520,525 **** +--- 520,529 ---- + 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,548 **** + EMSG(_("E820: sizeof(uint32_t) != 4")); + } + +! if (!bf_check_tables(ipa, sbi, 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_test_data[i].salt, + (int)STRLEN(bf_test_data[i].salt)); +! if (!bf_check_tables(pax, 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); + if (memcmp(bk.uc, bf_test_data[i].cryptxt, 8) != 0) + { + if (err == 0 && memcmp(bk.uc, bf_test_data[i].badcryptxt, 8) == 0) +--- 532,552 ---- + EMSG(_("E820: sizeof(uint32_t) != 4")); + } + +! 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(&state, (char_u *)(bf_test_data[i].password), + bf_test_data[i].salt, + (int)STRLEN(bf_test_data[i].salt)); +! 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(&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,596 **** + return err > 0 ? FAIL : OK; + } + +! /* Cipher feedback mode. */ +! static int randbyte_offset = 0; +! static int update_offset = 0; +! static char_u cfb_buffer[BF_CFB_LEN]; /* 64 bytes */ + + /* +! * Initialize with seed "iv[iv_len]". + */ +! void +! bf_cfb_init(iv, iv_len) +! char_u *iv; +! int iv_len; + { + int i, mi; + +! randbyte_offset = update_offset = 0; +! vim_memset(cfb_buffer, 0, BF_CFB_LEN); +! if (iv_len > 0) + { +! mi = iv_len > BF_CFB_LEN ? iv_len : BF_CFB_LEN; + for (i = 0; i < mi; i++) +! cfb_buffer[i % BF_CFB_LEN] ^= iv[i % iv_len]; + } + } + +! #define BF_CFB_UPDATE(c) { \ +! cfb_buffer[update_offset] ^= (char_u)c; \ +! if (++update_offset == BF_CFB_LEN) \ +! update_offset = 0; \ + } + +! #define BF_RANBYTE(t) { \ +! if ((randbyte_offset & BF_BLOCK_MASK) == 0) \ +! bf_e_cblock(&cfb_buffer[randbyte_offset]); \ +! t = cfb_buffer[randbyte_offset]; \ +! if (++randbyte_offset == BF_CFB_LEN) \ +! randbyte_offset = 0; \ + } + + /* +--- 558,600 ---- + return err > 0 ? FAIL : OK; + } + +! /* +! * CFB: Cipher Feedback Mode. +! */ + + /* +! * Initialize with seed "seed[seed_len]". + */ +! static void +! bf_cfb_init(bfs, seed, seed_len) +! bf_state_T *bfs; +! char_u *seed; +! int seed_len; + { + int i, mi; + +! bfs->randbyte_offset = bfs->update_offset = 0; +! vim_memset(bfs->cfb_buffer, 0, bfs->cfb_len); +! if (seed_len > 0) + { +! mi = seed_len > bfs->cfb_len ? seed_len : bfs->cfb_len; + for (i = 0; i < mi; i++) +! bfs->cfb_buffer[i % bfs->cfb_len] ^= seed[i % seed_len]; + } + } + +! #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(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,687 **** + * "from" and "to" can be equal to encrypt in place. + */ + void +! bf_crypt_encode(from, len, to) + char_u *from; + size_t len; + char_u *to; + { + size_t i; + int ztemp, t; + + for (i = 0; i < len; ++i) + { + ztemp = from[i]; +! BF_RANBYTE(t); +! BF_CFB_UPDATE(ztemp); + to[i] = t ^ ztemp; + } + } + + /* +! * Decrypt "ptr[len]" in place. + */ + void +! bf_crypt_decode(ptr, len) +! char_u *ptr; +! long len; + { +! char_u *p; + int t; + +! for (p = ptr; p < ptr + len; ++p) + { +! BF_RANBYTE(t); +! *p ^= t; +! BF_CFB_UPDATE(*p); + } + } + +- /* +- * 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_CFB_UPDATE(*p); +! } +! } + +! static int save_randbyte_offset; +! static int save_update_offset; +! static char_u save_cfb_buffer[BF_CFB_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_cfb_buffer, cfb_buffer, BF_CFB_LEN); +! mch_memmove(save_pax, pax, 4 * 18); +! mch_memmove(save_sbx, sbx, 4 * 4 * 256); +! } + +! /* +! * 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(cfb_buffer, save_cfb_buffer, BF_CFB_LEN); +! mch_memmove(pax, save_pax, 4 * 18); +! mch_memmove(sbx, save_sbx, 4 * 4 * 256); + } + + /* +--- 602,670 ---- + * "from" and "to" can be equal to encrypt in place. + */ + void +! 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(bfs, t); +! BF_CFB_UPDATE(bfs, ztemp); + to[i] = t ^ ztemp; + } + } + + /* +! * Decrypt "from[len]" into "to[len]". + */ + void +! crypt_blowfish_decode(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 t; + +! for (i = 0; i < len; ++i) + { +! BF_RANBYTE(bfs, t); +! to[i] = from[i] ^ t; +! BF_CFB_UPDATE(bfs, to[i]); + } + } + + void +! 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; + +! if (blowfish_self_test() == FAIL) +! return; + +! bf_key_init(bfs, key, salt, salt_len); +! bf_cfb_init(bfs, seed, seed_len); + } + + /* +*** ../vim-7.4.398/src/crypt.c 2014-08-10 13:30:43.816787293 +0200 +--- src/crypt.c 2014-08-09 15:37:46.189353499 +0200 +*************** +*** 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 */ +*** ../vim-7.4.398/src/crypt_zip.c 2014-08-10 13:30:43.824787293 +0200 +--- src/crypt_zip.c 2014-08-09 15:31:32.493356185 +0200 +*************** +*** 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 */ +*** ../vim-7.4.398/src/ex_docmd.c 2014-08-06 18:17:03.475147780 +0200 +--- src/ex_docmd.c 2014-08-09 15:31:32.493356185 +0200 +*************** +*** 11506,11513 **** + ex_X(eap) + exarg_T *eap UNUSED; + { +! if (get_crypt_method(curbuf) == 0 || blowfish_self_test() == OK) +! (void)get_crypt_key(TRUE, TRUE); + } + #endif + +--- 11506,11512 ---- + ex_X(eap) + exarg_T *eap UNUSED; + { +! (void)crypt_get_key(TRUE, TRUE); + } + #endif + +*** ../vim-7.4.398/src/fileio.c 2014-06-12 14:01:27.575769788 +0200 +--- src/fileio.c 2014-08-09 15:31:32.497356185 +0200 +*************** +*** 24,43 **** + #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 + +--- 24,29 ---- +*************** +*** 55,61 **** + 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 +--- 41,46 ---- +*************** +*** 116,121 **** +--- 101,109 ---- + #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,256 **** + #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; +--- 238,243 ---- +*************** +*** 966,978 **** + #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. +--- 953,958 ---- +*************** +*** 1175,1180 **** +--- 1155,1169 ---- + 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,1344 **** +--- 1328,1403 ---- + 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 && 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,1423 **** + } + #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; + +--- 1462,1467 ---- +*************** +*** 1430,1439 **** + */ + if ((filesize == 0 + # ifdef FEAT_CRYPT +! || (filesize == (CRYPT_MAGIC_LEN +! + crypt_salt_len[use_crypt_method] +! + crypt_seed_len[use_crypt_method]) +! && cryptkey != NULL) + # endif + ) + && (fio_flags == FIO_UCSBOM +--- 1474,1482 ---- + */ + if ((filesize == 0 + # ifdef FEAT_CRYPT +! || (cryptkey != NULL +! && filesize == crypt_get_header_len( +! crypt_get_method_nr(curbuf))) + # endif + ) + && (fio_flags == FIO_UCSBOM +*************** +*** 2262,2276 **** + save_file_ff(curbuf); /* remember the current file format */ + + #ifdef FEAT_CRYPT +! crypt_method_used = use_crypt_method; +! if (cryptkey != 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 */ + } + #endif + + #ifdef FEAT_MBYTE +--- 2305,2319 ---- + save_file_ff(curbuf); /* remember the current file format */ + + #ifdef FEAT_CRYPT +! if (curbuf->b_cryptstate != NULL) + { +! 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,2466 **** + #ifdef FEAT_CRYPT + if (cryptkey != NULL) + { +! if (crypt_method_used == 1) +! STRCAT(IObuff, _("[blowfish]")); +! else +! STRCAT(IObuff, _("[crypted]")); + c = TRUE; + } + #endif +--- 2500,2506 ---- + #ifdef FEAT_CRYPT + if (cryptkey != NULL) + { +! crypt_append_msg(curbuf); + c = TRUE; + } + #endif +*************** +*** 2489,2497 **** + #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]); + else + #endif + msg_add_lines(c, (long)linecnt, filesize); +--- 2529,2535 ---- + #ifdef FEAT_CRYPT + if (cryptkey != NULL) + msg_add_lines(c, (long)linecnt, filesize +! - crypt_get_header_len(crypt_get_method_nr(curbuf))); + else + #endif + msg_add_lines(c, (long)linecnt, filesize); +*************** +*** 2882,2914 **** + + #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. +--- 2920,2925 ---- +*************** +*** 2924,2930 **** + 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 b_p_ro = curbuf->b_p_ro; + + if (method >= 0) +--- 2935,2941 ---- + char_u *fname; /* file name to display */ + int *did_ask; /* flag: whether already asked for key */ + { +! int method = crypt_method_nr_from_magic((char *)ptr, *sizep); + int b_p_ro = curbuf->b_p_ro; + + if (method >= 0) +*************** +*** 2933,2941 **** + * Avoids accidentally overwriting the file with garbage. */ + curbuf->b_p_ro = TRUE; + +! set_crypt_method(curbuf, method); +! if (method > 0) +! (void)blowfish_self_test(); + if (cryptkey == NULL && !*did_ask) + { + if (*curbuf->b_p_key) +--- 2944,2950 ---- + * Avoids accidentally overwriting the file with garbage. */ + curbuf->b_p_ro = TRUE; + +! crypt_set_cm_option(curbuf, method); + if (cryptkey == NULL && !*did_ask) + { + if (*curbuf->b_p_key) +*************** +*** 2948,2954 **** + * Happens when retrying to detect encoding. */ + smsg((char_u *)_(need_key_msg), fname); + msg_scroll = TRUE; +! cryptkey = get_crypt_key(newfile, FALSE); + *did_ask = TRUE; + + /* check if empty key entered */ +--- 2957,2963 ---- + * Happens when retrying to detect encoding. */ + smsg((char_u *)_(need_key_msg), fname); + msg_scroll = TRUE; +! cryptkey = crypt_get_key(newfile, FALSE); + *did_ask = TRUE; + + /* check if empty key entered */ +*************** +*** 2963,2986 **** + + if (cryptkey != NULL) + { +! int seed_len = crypt_seed_len[method]; +! int salt_len = crypt_salt_len[method]; + +! 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_cfb_init(ptr + CRYPT_MAGIC_LEN + salt_len, seed_len); +! } + +- /* 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; + } +--- 2972,2989 ---- + + if (cryptkey != NULL) + { +! int header_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); + + /* Restore the read-only flag. */ + curbuf->b_p_ro = b_p_ro; + } +*************** +*** 2992,3076 **** + + 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_cfb_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_cfb_init(seed, seed_len); +- } +- } +- *lenp = CRYPT_MAGIC_LEN + salt_len + seed_len; +- return header; +- } +- + #endif /* FEAT_CRYPT */ + + #ifdef UNIX +--- 2995,3000 ---- +*************** +*** 3224,3232 **** + 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; +--- 3148,3153 ---- +*************** +*** 3262,3267 **** +--- 3183,3191 ---- + 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,4521 **** + #ifdef FEAT_CRYPT + if (*buf->b_p_key != NUL && !filtering) + { +! char_u *header; +! int header_len; + +! header = prepare_crypt_write(buf, &header_len); +! if (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_info.bw_buf = header; + write_info.bw_len = header_len; + write_info.bw_flags = FIO_NOCONVERT; +--- 4429,4445 ---- + #ifdef FEAT_CRYPT + if (*buf->b_p_key != NUL && !filtering) + { +! char_u *header; +! int header_len; + +! 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 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,4780 **** + mch_set_acl(wfname, acl); + #endif + #ifdef FEAT_CRYPT +! crypt_method_used = use_crypt_method; +! if (wb_flags & FIO_ENCRYPTED) +! crypt_pop_state(); + #endif + +- + #if defined(FEAT_MBYTE) && defined(FEAT_EVAL) + if (wfname != fname) + { +--- 4693,4705 ---- + mch_set_acl(wfname, acl); + #endif + #ifdef FEAT_CRYPT +! if (buf->b_cryptstate != NULL) +! { +! crypt_free_state(buf->b_cryptstate); +! buf->b_cryptstate = NULL; +! } + #endif + + #if defined(FEAT_MBYTE) && defined(FEAT_EVAL) + if (wfname != fname) + { +*************** +*** 4924,4933 **** + #ifdef FEAT_CRYPT + if (wb_flags & FIO_ENCRYPTED) + { +! if (crypt_method_used == 1) +! STRCAT(IObuff, _("[blowfish]")); +! else +! STRCAT(IObuff, _("[crypted]")); + c = TRUE; + } + #endif +--- 4849,4855 ---- + #ifdef FEAT_CRYPT + if (wb_flags & FIO_ENCRYPTED) + { +! crypt_append_msg(buf); + c = TRUE; + } + #endif +*************** +*** 5740,5747 **** + #endif /* FEAT_MBYTE */ + + #ifdef FEAT_CRYPT +! if (flags & FIO_ENCRYPTED) /* encrypt the data */ +! crypt_encode(buf, len, buf); + #endif + + wlen = write_eintr(ip->bw_fd, buf, len); +--- 5662,5687 ---- + #endif /* FEAT_MBYTE */ + + #ifdef FEAT_CRYPT +! 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); +*** ../vim-7.4.398/src/globals.h 2014-08-06 18:17:03.475147780 +0200 +--- src/globals.h 2014-08-09 15:31:32.497356185 +0200 +*************** +*** 105,114 **** + + 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 +--- 105,110 ---- +*** ../vim-7.4.398/src/main.c 2014-05-28 18:22:37.876225054 +0200 +--- src/main.c 2014-08-09 15:31:32.497356185 +0200 +*************** +*** 846,853 **** + #ifdef FEAT_CRYPT + if (params.ask_for_key) + { +! (void)blowfish_self_test(); +! (void)get_crypt_key(TRUE, TRUE); + TIME_MSG("getting crypt key"); + } + #endif +--- 846,852 ---- + #ifdef FEAT_CRYPT + if (params.ask_for_key) + { +! (void)crypt_get_key(TRUE, TRUE); + TIME_MSG("getting crypt key"); + } + #endif +*** ../vim-7.4.398/src/memline.c 2014-03-23 16:03:56.171311627 +0100 +--- src/memline.c 2014-08-09 15:39:22.629352806 +0200 +*************** +*** 63,68 **** +--- 63,77 ---- + #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,157 **** + struct block0 + { + char_u b0_id[2]; /* id for block 0: BLOCK0_ID0 and BLOCK0_ID1, +! * BLOCK0_ID1_C0, BLOCK0_ID1_C1 */ + 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 */ +--- 160,166 ---- + struct block0 + { + char_u b0_id[2]; /* id for block 0: BLOCK0_ID0 and BLOCK0_ID1, +! * 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 */ +*************** +*** 256,262 **** + 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)); + #endif + #ifdef FEAT_BYTEOFF + static void ml_updatechunk __ARGS((buf_T *buf, long line, long len, int updtype)); +--- 265,271 ---- + static char_u *make_percent_swname __ARGS((char_u *dir, char_u *name)); + #endif + #ifdef FEAT_CRYPT +! 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)); +*************** +*** 359,366 **** + 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); + #endif + } + +--- 368,374 ---- + b0p->b0_hname[B0_HNAME_SIZE - 1] = NUL; + long_to_char(mch_get_pid(), b0p->b0_pid); + #ifdef FEAT_CRYPT +! ml_set_b0_crypt(buf, b0p); + #endif + } + +*************** +*** 436,446 **** + b0p->b0_id[1] = BLOCK0_ID1; + else + { +! if (get_crypt_method(buf) == 0) +! b0p->b0_id[1] = BLOCK0_ID1_C0; +! else + { +- 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); +--- 444,454 ---- + b0p->b0_id[1] = BLOCK0_ID1; + else + { +! int method_nr = crypt_get_method_nr(buf); +! +! b0p->b0_id[1] = id1_codes[method_nr]; +! if (method_nr > CRYPT_M_ZIP) + { + /* 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); +*************** +*** 887,893 **** + 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) + ) + return FAIL; + return OK; +--- 895,902 ---- + 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_C2) + ) + return FAIL; + return OK; +*************** +*** 1255,1268 **** + } + + #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; + mch_memmove(mfp->mf_seed, &b0p->b0_seed, MF_SEED_LEN); +! } +! set_crypt_method(buf, b0_cm); + #else + if (b0p->b0_id[1] != BLOCK0_ID1) + { +--- 1264,1275 ---- + } + + #ifdef FEAT_CRYPT +! 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); +! crypt_set_cm_option(buf, b0_cm < 0 ? 0 : b0_cm); + #else + if (b0p->b0_id[1] != BLOCK0_ID1) + { +*************** +*** 1389,1395 **** + } + else + smsg((char_u *)_(need_key_msg), fname_used); +! buf->b_p_key = get_crypt_key(FALSE, FALSE); + if (buf->b_p_key == NULL) + buf->b_p_key = curbuf->b_p_key; + else if (*buf->b_p_key == NUL) +--- 1396,1402 ---- + } + else + smsg((char_u *)_(need_key_msg), fname_used); +! 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) +*************** +*** 4816,4821 **** +--- 4823,4829 ---- + char_u *text_start; + char_u *new_data; + int text_len; ++ cryptstate_T *state; + + if (dp->db_id != DATA_ID) + return data; +*************** +*** 4831,4840 **** + 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(); + + /* Clear the gap. */ + if (head_end < text_start) +--- 4839,4847 ---- + mch_memmove(new_data, dp, head_end - (char_u *)dp); + + /* Encrypt the text. */ +! 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) +*************** +*** 4857,4862 **** +--- 4864,4870 ---- + char_u *head_end; + char_u *text_start; + int text_len; ++ cryptstate_T *state; + + if (dp->db_id == DATA_ID) + { +*************** +*** 4869,4885 **** + 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(); + } + } + + /* + * Prepare for encryption/decryption, using the key, seed and offset. + */ +! static void + ml_crypt_prepare(mfp, offset, reading) + memfile_T *mfp; + off_t offset; +--- 4877,4893 ---- + return; /* data was messed up */ + + /* Decrypt the text in place. */ +! 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 cryptstate_T * + ml_crypt_prepare(mfp, offset, reading) + memfile_T *mfp; + off_t offset; +*************** +*** 4887,4924 **** + { + buf_T *buf = mfp->mf_buffer; + char_u salt[50]; +! int method; + 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; + key = mfp->mf_old_key; + seed = mfp->mf_old_seed; + } + else + { +! method = get_crypt_method(buf); + key = buf->b_p_key; + seed = mfp->mf_seed; + } + +! use_crypt_method = method; /* select pkzip or blowfish */ +! if (method == 0) + { + 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_cfb_init(seed, MF_SEED_LEN); + } + } + + #endif +--- 4895,4931 ---- + { + buf_T *buf = mfp->mf_buffer; + char_u salt[50]; +! 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_nr = mfp->mf_old_cm; + key = mfp->mf_old_key; + seed = mfp->mf_old_seed; + } + else + { +! method_nr = crypt_get_method_nr(buf); + key = buf->b_p_key; + seed = mfp->mf_seed; + } + +! 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); +! 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 +*** ../vim-7.4.398/src/misc2.c 2014-06-25 14:39:35.106348584 +0200 +--- src/misc2.c 2014-08-09 15:31:32.501356185 +0200 +*************** +*** 3803,4124 **** + #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 ]-------------------------------------------------*/ + /* +--- 3803,3808 ---- +*************** +*** 6588,6595 **** +--- 6272,6294 ---- + 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,6609 **** + { + if (i + 1 > (int)sizeof(time_t)) + /* ">>" doesn't work well when shifting more bits than avail */ +! putc(0, fd); + else + { + #if defined(SIZEOF_TIME_T) && SIZEOF_TIME_T > 4 +--- 6302,6308 ---- + { + if (i + 1 > (int)sizeof(time_t)) + /* ">>" doesn't work well when shifting more bits than avail */ +! buf[bi++] = 0; + else + { + #if defined(SIZEOF_TIME_T) && SIZEOF_TIME_T > 4 +*************** +*** 6611,6617 **** + #else + c = (int)((long_u)wtime >> (i * 8)); + #endif +! putc(c, fd); + } + } + } +--- 6310,6316 ---- + #else + c = (int)((long_u)wtime >> (i * 8)); + #endif +! buf[bi++] = c; + } + } + } +*** ../vim-7.4.398/src/option.c 2014-08-06 14:52:05.047236174 +0200 +--- src/option.c 2014-08-09 15:39:29.741352755 +0200 +*************** +*** 2989,2995 **** + 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}; + #endif + #ifdef FEAT_CMDL_COMPL + static char *(p_wop_values[]) = {"tagfile", NULL}; +--- 2989,2995 ---- + 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", "blowfish2", NULL}; + #endif + #ifdef FEAT_CMDL_COMPL + static char *(p_wop_values[]) = {"tagfile", NULL}; +*************** +*** 6140,6146 **** + # endif + if (STRCMP(curbuf->b_p_key, oldval) != 0) + /* Need to update the swapfile. */ +! ml_set_crypt_key(curbuf, oldval, get_crypt_method(curbuf)); + } + + else if (gvarp == &p_cm) +--- 6140,6146 ---- + # endif + if (STRCMP(curbuf->b_p_key, oldval) != 0) + /* Need to update the swapfile. */ +! ml_set_crypt_key(curbuf, oldval, crypt_get_method_nr(curbuf)); + } + + else if (gvarp == &p_cm) +*************** +*** 6151,6157 **** + 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) + errmsg = e_invarg; + else + { +--- 6151,6157 ---- + p = p_cm; + if (check_opt_strings(p, p_cm_values, TRUE) != OK) + errmsg = e_invarg; +! else if (crypt_self_test() == FAIL) + errmsg = e_invarg; + else + { +*************** +*** 6177,6183 **** + p = curbuf->b_p_cm; + if (STRCMP(s, p) != 0) + ml_set_crypt_key(curbuf, curbuf->b_p_key, +! crypt_method_from_string(s)); + + /* If the global value changes need to update the swapfile for all + * buffers using that value. */ +--- 6177,6183 ---- + p = curbuf->b_p_cm; + if (STRCMP(s, p) != 0) + ml_set_crypt_key(curbuf, curbuf->b_p_key, +! crypt_method_nr_from_name(s)); + + /* If the global value changes need to update the swapfile for all + * buffers using that value. */ +*************** +*** 6188,6194 **** + 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)); + } + } + } +--- 6188,6194 ---- + 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_nr_from_name(oldval)); + } + } + } +*** ../vim-7.4.398/src/proto.h 2013-02-26 14:18:19.000000000 +0100 +--- src/proto.h 2014-08-09 15:39:39.333352686 +0200 +*************** +*** 70,75 **** +--- 70,77 ---- + + # ifdef FEAT_CRYPT + # include "blowfish.pro" ++ # include "crypt.pro" ++ # include "crypt_zip.pro" + # endif + # include "buffer.pro" + # include "charset.pro" +*** ../vim-7.4.398/src/proto/blowfish.pro 2014-02-11 15:23:27.938123631 +0100 +--- src/proto/blowfish.pro 2014-08-09 15:31:32.501356185 +0200 +*************** +*** 1,10 **** + /* blowfish.c */ +! void bf_key_init __ARGS((char_u *password, char_u *salt, int salt_len)); +! void bf_cfb_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)); + int blowfish_self_test __ARGS((void)); + /* vim: set ft=c : */ +--- 1,6 ---- + /* blowfish.c */ +! 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 : */ +*** ../vim-7.4.398/src/proto/crypt.pro 2014-08-10 13:30:43.880787293 +0200 +--- src/proto/crypt.pro 2014-08-09 15:31:32.501356185 +0200 +*************** +*** 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 : */ +*** ../vim-7.4.398/src/proto/crypt_zip.pro 2014-08-10 13:30:43.884787293 +0200 +--- src/proto/crypt_zip.pro 2014-08-09 15:31:32.501356185 +0200 +*************** +*** 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 : */ +*** ../vim-7.4.398/src/proto/fileio.pro 2013-08-10 13:37:11.000000000 +0200 +--- src/proto/fileio.pro 2014-08-09 15:31:32.501356185 +0200 +*************** +*** 4,11 **** + 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)); +--- 4,9 ---- +*** ../vim-7.4.398/src/proto/misc2.pro 2014-05-07 18:35:25.669216052 +0200 +--- src/proto/misc2.pro 2014-08-09 15:31:32.501356185 +0200 +*************** +*** 84,99 **** + 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)); +--- 84,89 ---- +*************** +*** 116,120 **** +--- 106,111 ---- + 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 : */ +*** ../vim-7.4.398/src/structs.h 2014-06-25 14:39:35.110348584 +0200 +--- src/structs.h 2014-08-09 15:40:08.501352476 +0200 +*************** +*** 1251,1256 **** +--- 1251,1274 ---- + } 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. +*************** +*** 1778,1784 **** + int b_was_netbeans_file;/* TRUE if b_netbeans_file was once set */ + #endif + +! }; + + + #ifdef FEAT_DIFF +--- 1796,1807 ---- + 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 +*** ../vim-7.4.398/src/undo.c 2014-04-02 14:05:33.999887839 +0200 +--- src/undo.c 2014-08-09 16:55:40.541319903 +0200 +*************** +*** 81,88 **** +--- 81,105 ---- + #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,115 **** + #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)); + #endif + + #define U_ALLOC_LINE(size) lalloc((long_u)(size), FALSE) +--- 115,140 ---- + #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 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) +*************** +*** 859,926 **** + } + + /* +! * Like fwrite() but crypt the bytes when 'key' is set. +! * Returns 1 if successful. + */ +! static size_t +! fwrite_crypt(buf, ptr, len, fp) +! buf_T *buf UNUSED; + 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 + { +! 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); + #endif + } + + /* +! * Read a string of length "len" from "fd". +! * When 'key' is set decrypt the bytes. + */ +! static char_u * +! read_string_decrypt(buf, fd, len) +! buf_T *buf UNUSED; +! FILE *fd; + int len; + { +! char_u *ptr; + +! ptr = read_string(fd, len); + #ifdef FEAT_CRYPT +! if (ptr != NULL && *buf->b_p_key != NUL) +! crypt_decode(ptr, len); + #endif + return ptr; + } + + static int +! serialize_header(fp, buf, hash) +! FILE *fp; +! buf_T *buf; + char_u *hash; + { +! int len; + + /* 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) +--- 884,1177 ---- + } + + /* +! * Write a sequence of bytes to the undo file. +! * Buffers and encrypts as needed. +! * Returns OK or FAIL. + */ +! 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_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; + { + #ifdef FEAT_CRYPT + char_u *copy; + char_u small_buf[100]; + size_t i; + +! if (bi->bi_state != NULL && bi->bi_buffer == NULL) + { +! /* 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); + } + + /* +! * Write a number, MSB first, in "len" bytes. +! * Must match with undo_read_?c() functions. +! * Returns OK or FAIL. + */ +! static int +! undo_write_bytes(bi, nr, len) +! bufinfo_T *bi; +! long_u nr; + int len; + { +! 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); +! } +! +! /* +! * 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 (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(bi, hash) +! bufinfo_T *bi; + char_u *hash; + { +! 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) +*************** +*** 934,1041 **** + 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) + return FAIL; + len = (int)fwrite(header, (size_t)header_len, (size_t)1, fp); + vim_free(header); + if (len != 1) + { +! crypt_pop_state(); + return FAIL; + } + } + else + #endif +! put_bytes(fp, (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) + return FAIL; + + /* buffer-specific data */ +! put_bytes(fp, (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) + 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 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); + + /* Optional fields. */ +! putc(4, fp); +! putc(UF_LAST_SAVE_NR, fp); +! put_bytes(fp, (long_u)buf->b_u_save_nr_last, 4); + +! putc(0, fp); /* end marker */ + + return OK; + } + + static int +! serialize_uhp(fp, buf, uhp) +! FILE *fp; +! buf_T *buf; + u_header_T *uhp; + { + int i; + u_entry_T *uep; + +! if (put_bytes(fp, (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); + #ifdef FEAT_VIRTUALEDIT +! put_bytes(fp, (long_u)uhp->uh_cursor_vcol, 4); + #else +! put_bytes(fp, (long_u)0, 4); + #endif +! put_bytes(fp, (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); +! serialize_visualinfo(&uhp->uh_visual, fp); +! put_time(fp, uhp->uh_time); + + /* Optional fields. */ +! putc(4, fp); +! putc(UHP_SAVE_NR, fp); +! put_bytes(fp, (long_u)uhp->uh_save_nr, 4); + +! putc(0, fp); /* 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) + return FAIL; + } +! put_bytes(fp, (long_u)UF_ENTRY_END_MAGIC, 2); + return OK; + } + + static u_header_T * +! unserialize_uhp(fp, file_name) +! FILE *fp; + char_u *file_name; + { + u_header_T *uhp; +--- 1185,1308 ---- + char_u *header; + int header_len; + +! 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_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 +! 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 (undo_write(bi, hash, (size_t)UNDO_HASH_SIZE) == FAIL) + return FAIL; + + /* buffer-specific data */ +! 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; +! 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; +! 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(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. */ +! 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); + +! undo_write_bytes(bi, 0, 1); /* end marker */ + + return OK; + } + + static int +! serialize_uhp(bi, uhp) +! bufinfo_T *bi; + u_header_T *uhp; + { + int i; + u_entry_T *uep; ++ char_u time_buf[8]; + +! if (undo_write_bytes(bi, (long_u)UF_HEADER_MAGIC, 2) == FAIL) + return FAIL; + +! 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 +! undo_write_bytes(bi, (long_u)uhp->uh_cursor_vcol, 4); + #else +! undo_write_bytes(bi, (long_u)0, 4); + #endif +! undo_write_bytes(bi, (long_u)uhp->uh_flags, 2); + /* Assume NMARKS will stay the same. */ + for (i = 0; i < NMARKS; ++i) +! 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. */ +! 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); + +! undo_write_bytes(bi, 0, 1); /* end marker */ + + /* Write all the entries. */ + for (uep = uhp->uh_entry; uep != NULL; uep = uep->ue_next) + { +! undo_write_bytes(bi, (long_u)UF_ENTRY_MAGIC, 2); +! if (serialize_uep(bi, uep) == FAIL) + return FAIL; + } +! undo_write_bytes(bi, (long_u)UF_ENTRY_END_MAGIC, 2); + return OK; + } + + static u_header_T * +! unserialize_uhp(bi, file_name) +! bufinfo_T *bi; + char_u *file_name; + { + u_header_T *uhp; +*************** +*** 1051,1106 **** + #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); + if (uhp->uh_seq <= 0) + { + corruption_error("uh_seq", file_name); + vim_free(uhp); + return NULL; + } +! unserialize_pos(&uhp->uh_cursor, fp); + #ifdef FEAT_VIRTUALEDIT +! uhp->uh_cursor_vcol = get4c(fp); + #else +! (void)get4c(fp); + #endif +! uhp->uh_flags = get2c(fp); + for (i = 0; i < NMARKS; ++i) +! unserialize_pos(&uhp->uh_namedm[i], fp); +! unserialize_visualinfo(&uhp->uh_visual, fp); +! uhp->uh_time = get8ctime(fp); + + /* Optional fields. */ + for (;;) + { +! int len = getc(fp); + int what; + + if (len == 0) + break; +! what = getc(fp); + switch (what) + { + case UHP_SAVE_NR: +! uhp->uh_save_nr = get4c(fp); + break; + default: + /* field not supported, skip */ + while (--len >= 0) +! (void)getc(fp); + } + } + + /* Unserialize the uep list. */ + last_uep = NULL; +! while ((c = get2c(fp)) == UF_ENTRY_MAGIC) + { + error = FALSE; +! uep = unserialize_uep(fp, &error, file_name); + if (last_uep == NULL) + uhp->uh_entry = uep; + else +--- 1318,1373 ---- + #ifdef U_DEBUG + uhp->uh_magic = UH_MAGIC; + #endif +! 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(bi, &uhp->uh_cursor); + #ifdef FEAT_VIRTUALEDIT +! uhp->uh_cursor_vcol = undo_read_4c(bi); + #else +! (void)undo_read_4c(bi); + #endif +! uhp->uh_flags = undo_read_2c(bi); + for (i = 0; i < NMARKS; ++i) +! 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 = undo_read_byte(bi); + int what; + + if (len == 0) + break; +! what = undo_read_byte(bi); + switch (what) + { + case UHP_SAVE_NR: +! uhp->uh_save_nr = undo_read_4c(bi); + break; + default: + /* field not supported, skip */ + while (--len >= 0) +! (void)undo_read_byte(bi); + } + } + + /* Unserialize the uep list. */ + last_uep = NULL; +! while ((c = undo_read_2c(bi)) == UF_ENTRY_MAGIC) + { + error = FALSE; +! uep = unserialize_uep(bi, &error, file_name); + if (last_uep == NULL) + uhp->uh_entry = uep; + else +*************** +*** 1123,1157 **** + } + + /* +! * Serialize "uep" to "fp". + */ + static int +! serialize_uep(fp, buf, uep) +! FILE *fp; +! buf_T *buf; + 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); + for (i = 0; i < uep->ue_size; ++i) + { + len = STRLEN(uep->ue_array[i]); +! if (put_bytes(fp, (long_u)len, 4) == FAIL) + return FAIL; +! if (len > 0 && fwrite_crypt(buf, uep->ue_array[i], len, fp) != 1) + return FAIL; + } + return OK; + } + + static u_entry_T * +! unserialize_uep(fp, error, file_name) +! FILE *fp; + int *error; + char_u *file_name; + { +--- 1390,1423 ---- + } + + /* +! * Serialize "uep". + */ + static int +! serialize_uep(bi, uep) +! bufinfo_T *bi; + u_entry_T *uep; + { + int i; + size_t len; + +! 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 (undo_write_bytes(bi, (long_u)len, 4) == FAIL) + return FAIL; +! if (len > 0 && fwrite_crypt(bi, uep->ue_array[i], len) == FAIL) + return FAIL; + } + return OK; + } + + static u_entry_T * +! unserialize_uep(bi, error, file_name) +! bufinfo_T *bi; + int *error; + char_u *file_name; + { +*************** +*** 1168,1177 **** + #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); + if (uep->ue_size > 0) + { + array = (char_u **)U_ALLOC_LINE(sizeof(char_u *) * uep->ue_size); +--- 1434,1443 ---- + #ifdef U_DEBUG + uep->ue_magic = UE_MAGIC; + #endif +! 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); +*************** +*** 1188,1196 **** + + for (i = 0; i < uep->ue_size; ++i) + { +! line_len = get4c(fp); + if (line_len >= 0) +! line = read_string_decrypt(curbuf, fp, line_len); + else + { + line = NULL; +--- 1454,1462 ---- + + for (i = 0; i < uep->ue_size; ++i) + { +! line_len = undo_read_4c(bi); + if (line_len >= 0) +! line = read_string_decrypt(bi, line_len); + else + { + line = NULL; +*************** +*** 1207,1289 **** + } + + /* +! * Serialize "pos" to "fp". + */ + static void +! serialize_pos(pos, fp) + pos_T pos; +- FILE *fp; + { +! put_bytes(fp, (long_u)pos.lnum, 4); +! put_bytes(fp, (long_u)pos.col, 4); + #ifdef FEAT_VIRTUALEDIT +! put_bytes(fp, (long_u)pos.coladd, 4); + #else +! put_bytes(fp, (long_u)0, 4); + #endif + } + + /* +! * Unserialize the pos_T at the current position in fp. + */ + static void +! unserialize_pos(pos, fp) + pos_T *pos; +- FILE *fp; + { +! pos->lnum = get4c(fp); + if (pos->lnum < 0) + pos->lnum = 0; +! pos->col = get4c(fp); + if (pos->col < 0) + pos->col = 0; + #ifdef FEAT_VIRTUALEDIT +! pos->coladd = get4c(fp); + if (pos->coladd < 0) + pos->coladd = 0; + #else +! (void)get4c(fp); + #endif + } + + /* +! * Serialize "info" to "fp". + */ + static void +! serialize_visualinfo(info, fp) + 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); + } + + /* +! * Unserialize the visualinfo_T at the current position in fp. + */ + static void +! unserialize_visualinfo(info, fp) + 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); + } + + /* +--- 1473,1543 ---- + } + + /* +! * Serialize "pos". + */ + static void +! serialize_pos(bi, pos) +! bufinfo_T *bi; + pos_T pos; + { +! undo_write_bytes(bi, (long_u)pos.lnum, 4); +! undo_write_bytes(bi, (long_u)pos.col, 4); + #ifdef FEAT_VIRTUALEDIT +! undo_write_bytes(bi, (long_u)pos.coladd, 4); + #else +! undo_write_bytes(bi, (long_u)0, 4); + #endif + } + + /* +! * Unserialize the pos_T at the current position. + */ + static void +! unserialize_pos(bi, pos) +! bufinfo_T *bi; + pos_T *pos; + { +! pos->lnum = undo_read_4c(bi); + if (pos->lnum < 0) + pos->lnum = 0; +! pos->col = undo_read_4c(bi); + if (pos->col < 0) + pos->col = 0; + #ifdef FEAT_VIRTUALEDIT +! pos->coladd = undo_read_4c(bi); + if (pos->coladd < 0) + pos->coladd = 0; + #else +! (void)undo_read_4c(bi); + #endif + } + + /* +! * Serialize "info". + */ + static void +! serialize_visualinfo(bi, info) +! bufinfo_T *bi; + visualinfo_T *info; + { +! 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. + */ + static void +! unserialize_visualinfo(bi, info) +! bufinfo_T *bi; + visualinfo_T *info; + { +! 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); + } + + /* +*************** +*** 1317,1324 **** + struct stat st_old; + struct stat st_new; + #endif + #ifdef FEAT_CRYPT +! int do_crypt = FALSE; + #endif + + if (name == NULL) +--- 1571,1581 ---- + struct stat st_old; + struct stat st_new; + #endif ++ bufinfo_T bi; ++ + #ifdef FEAT_CRYPT +! bi.bi_state = NULL; +! bi.bi_buffer = NULL; + #endif + + if (name == NULL) +*************** +*** 1474,1487 **** + u_sync(TRUE); + + /* +! * Write the header. + */ +! if (serialize_header(fp, buf, 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. +--- 1731,1742 ---- + u_sync(TRUE); + + /* +! * Write the header. Initializes encryption, if enabled. + */ +! bi.bi_buf = buf; +! bi.bi_fp = fp; +! if (serialize_header(&bi, hash) == FAIL) + goto write_error; + + /* + * Iteratively serialize UHPs and their UEPs from the top down. +*************** +*** 1497,1503 **** + #ifdef U_DEBUG + ++headers_written; + #endif +! if (serialize_uhp(fp, buf, uhp) == FAIL) + goto write_error; + } + +--- 1752,1758 ---- + #ifdef U_DEBUG + ++headers_written; + #endif +! if (serialize_uhp(&bi, uhp) == FAIL) + goto write_error; + } + +*************** +*** 1516,1522 **** + uhp = uhp->uh_next.ptr; + } + +! if (put_bytes(fp, (long_u)UF_HEADER_END_MAGIC, 2) == OK) + write_ok = TRUE; + #ifdef U_DEBUG + if (headers_written != buf->b_u_numhead) +--- 1771,1777 ---- + uhp = uhp->uh_next.ptr; + } + +! 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) +*************** +*** 1526,1531 **** +--- 1781,1791 ---- + } + #endif + ++ #ifdef FEAT_CRYPT ++ if (bi.bi_state != NULL && undo_flush(&bi) == FAIL) ++ write_ok = FALSE; ++ #endif ++ + write_error: + fclose(fp); + if (!write_ok) +*************** +*** 1551,1558 **** + + theend: + #ifdef FEAT_CRYPT +! if (do_crypt) +! crypt_pop_state(); + #endif + if (file_name != name) + vim_free(file_name); +--- 1811,1819 ---- + + theend: + #ifdef FEAT_CRYPT +! 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); +*************** +*** 1598,1606 **** + struct stat st_orig; + struct stat st_undo; + #endif +! #ifdef FEAT_CRYPT +! int do_decrypt = FALSE; +! #endif + + if (name == NULL) + { +--- 1859,1865 ---- + struct stat st_orig; + struct stat st_undo; + #endif +! bufinfo_T bi; + + if (name == NULL) + { +*************** +*** 1644,1649 **** +--- 1903,1914 ---- + EMSG2(_("E822: Cannot open undo file for reading: %s"), file_name); + goto error; + } ++ bi.bi_buf = curbuf; ++ bi.bi_fp = fp; ++ #ifdef FEAT_CRYPT ++ bi.bi_state = NULL; ++ bi.bi_buffer = NULL; ++ #endif + + /* + * Read the undo file header. +*************** +*** 1664,1675 **** + file_name); + goto error; + } +! if (prepare_crypt_read(fp) == FAIL) + { + EMSG2(_("E826: Undo file decryption failed: %s"), file_name); + goto error; + } +! do_decrypt = TRUE; + #else + EMSG2(_("E827: Undo file is encrypted: %s"), file_name); + goto error; +--- 1929,1952 ---- + file_name); + goto error; + } +! 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; + } +! 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; +*************** +*** 1681,1692 **** + goto error; + } + +! if (fread(read_hash, UNDO_HASH_SIZE, 1, fp) != 1) + { + corruption_error("hash", file_name); + goto error; + } +! line_count = (linenr_T)get4c(fp); + if (memcmp(hash, read_hash, UNDO_HASH_SIZE) != 0 + || line_count != curbuf->b_ml.ml_line_count) + { +--- 1958,1969 ---- + goto error; + } + +! if (undo_read(&bi, read_hash, (size_t)UNDO_HASH_SIZE) == FAIL) + { + corruption_error("hash", file_name); + goto error; + } +! 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) + { +*************** +*** 1703,1715 **** + } + + /* Read undo data for "U" command. */ +! str_len = get4c(fp); + 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); + if (line_lnum < 0 || line_colnr < 0) + { + corruption_error("line lnum/col", file_name); +--- 1980,1992 ---- + } + + /* Read undo data for "U" command. */ +! str_len = undo_read_4c(&bi); + if (str_len < 0) + goto error; + if (str_len > 0) +! 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); +*************** +*** 1717,1748 **** + } + + /* 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); + + /* Optional header fields. */ + for (;;) + { +! int len = getc(fp); + int what; + + if (len == 0 || len == EOF) + break; +! what = getc(fp); + switch (what) + { + case UF_LAST_SAVE_NR: +! last_save_nr = get4c(fp); + break; + default: + /* field not supported, skip */ + while (--len >= 0) +! (void)getc(fp); + } + } + +--- 1994,2025 ---- + } + + /* Begin general undo data */ +! 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 = undo_read_byte(&bi); + int what; + + if (len == 0 || len == EOF) + break; +! what = undo_read_byte(&bi); + switch (what) + { + case UF_LAST_SAVE_NR: +! last_save_nr = undo_read_4c(&bi); + break; + default: + /* field not supported, skip */ + while (--len >= 0) +! (void)undo_read_byte(&bi); + } + } + +*************** +*** 1758,1764 **** + goto error; + } + +! while ((c = get2c(fp)) == UF_HEADER_MAGIC) + { + if (num_read_uhps >= num_head) + { +--- 2035,2041 ---- + goto error; + } + +! while ((c = undo_read_2c(&bi)) == UF_HEADER_MAGIC) + { + if (num_read_uhps >= num_head) + { +*************** +*** 1766,1772 **** + goto error; + } + +! uhp = unserialize_uhp(fp, file_name); + if (uhp == NULL) + goto error; + uhp_table[num_read_uhps++] = uhp; +--- 2043,2049 ---- + goto error; + } + +! uhp = unserialize_uhp(&bi, file_name); + if (uhp == NULL) + goto error; + uhp_table[num_read_uhps++] = uhp; +*************** +*** 1898,1905 **** + + theend: + #ifdef FEAT_CRYPT +! if (do_decrypt) +! crypt_pop_state(); + #endif + if (fp != NULL) + fclose(fp); +--- 2175,2183 ---- + + theend: + #ifdef FEAT_CRYPT +! if (bi.bi_state != NULL) +! crypt_free_state(bi.bi_state); +! vim_free(bi.bi_buffer); + #endif + if (fp != NULL) + fclose(fp); +*** ../vim-7.4.398/src/testdir/test71.in 2013-07-01 20:47:58.000000000 +0200 +--- src/testdir/test71.in 2014-08-09 15:12:57.997364196 +0200 +*************** +*** 13,18 **** +--- 13,20 ---- + :let cm0_bytes = getline('.', '.') + :/^start of cm=blowfish bytes/+1 + :let cm1_bytes = getline('.', '.') ++ :/^start of cm=blowfish2 bytes/+1 ++ :let cm2_bytes = getline('.', '.') + :bwipe! + :call append(0, text_lines) + :$d +*************** +*** 36,41 **** +--- 38,55 ---- + :e Xtestfile + barfoo + :let cm1_read_back = getline('.', '$') ++ :set key= ++ :set cryptmethod=blowfish2 ++ :" If the blowfish test fails 'cryptmethod' will be 'zip' now. ++ :%s/^/\=&cryptmethod == 'blowfish2' ? "OK " : "blowfish test failed "/ ++ :X ++ bar2foo ++ bar2foo ++ :w! Xtestfile ++ :bwipe! ++ :e Xtestfile ++ bar2foo ++ :let cm2_read_back = getline('.', '$') + :bwipe! + :set bin noeol key= + :call append(0, cm0_bytes) +*************** +*** 57,63 **** +--- 71,90 ---- + :set nobin + :e Xtestfile + barbar ++ :let cm1_read_bin = getline('.', '$') ++ :bwipe! ++ :set bin noeol key= ++ :call append(0, cm2_bytes) ++ :$d ++ :set fenc=latin1 ++ :w! Xtestfile ++ :bwipe! ++ :set nobin ++ :e Xtestfile ++ barburp ++ :call append(0, cm1_read_bin) + :call append(0, cm0_read_bin) ++ :call append(0, cm2_read_back) + :call append(0, cm1_read_back) + :call append(0, cm0_read_back) + :set key= fenc=latin1 +*** ../vim-7.4.398/src/testdir/test71.ok 2010-05-21 15:21:48.000000000 +0200 +--- src/testdir/test71.ok 2014-08-09 15:28:07.349357660 +0200 +*************** +*** 4,10 **** +--- 4,15 ---- + OK 01234567890123456789012345678901234567 + OK line 2 foo bar blah + OK line 3 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ++ OK OK 01234567890123456789012345678901234567 ++ OK OK line 2 foo bar blah ++ OK OK line 3 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx + 1234567890 + abbccddeff + asdfasdfasdf + 0001112223333 ++ abcdefghijklmnopqrstuvwxyz ++ !@#$%^&*()_+=-`~ +*** ../vim-7.4.398/src/testdir/test71a.in 2013-07-01 20:45:58.000000000 +0200 +--- src/testdir/test71a.in 2014-08-09 15:49:07.125348605 +0200 +*************** +*** 12,14 **** +--- 12,18 ---- + start of cm=blowfish bytes + VimCrypt~02!k)#S=#MJAͥM!
+ end of cm=blowfish bytes ++ ++ start of cm=blowfish2 bytes ++ VimCrypt~03!N;^C).FS6[T˧ؾ92Q@ߚIv.`$% ++ end of cm=blowfish2 bytes +*** ../vim-7.4.398/src/testdir/test72.in 2014-03-12 16:51:35.060792541 +0100 +--- src/testdir/test72.in 2014-08-09 15:12:58.001364196 +0200 +*************** +*** 81,86 **** +--- 81,87 ---- + :" + :" With encryption, cryptmethod=blowfish + :e! Xtestfile ++ rubbish + :set undofile cm=blowfish + ggdGijan + feb +*************** +*** 100,105 **** +--- 101,132 ---- + :set key= + /bar + :.w >>test.out ++ u:.w >>test.out ++ u:.w >>test.out ++ u:.w >>test.out ++ :" ++ :" With encryption, cryptmethod=blowfish2 ++ :e! Xtestfile ++ rubbish ++ :set undofile cm=blowfish2 ++ 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 +*** ../vim-7.4.398/src/testdir/test72.ok 2012-01-04 19:04:17.000000000 +0100 +--- src/testdir/test72.ok 2014-08-09 15:12:58.001364196 +0200 +*************** +*** 25,27 **** +--- 25,31 ---- + apr + foo mar + mar ++ bar apr ++ apr ++ foo mar ++ mar +*** ../vim-7.4.398/src/version.c 2014-08-07 13:55:05.898639758 +0200 +--- src/version.c 2014-08-09 15:11:28.665364838 +0200 +*************** +*** 743,744 **** +--- 743,746 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 399, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +16. You step out of your room and realize that your parents have moved and + you don't have a clue when it happened. + + /// 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/patches/source/vim/slack-desc.vim b/patches/source/vim/slack-desc.vim new file mode 100644 index 000000000..04b1d5eb4 --- /dev/null +++ b/patches/source/vim/slack-desc.vim @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. Line +# up the first '|' above the ':' following the base package name, and the '|' +# on the right side marks the last column you can put a character in. You must +# make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':'. + + |-----handy-ruler------------------------------------------------------| +vim: vim (Vi IMproved) +vim: +vim: Vim is an almost compatible version of the UNIX editor vi. Many new +vim: features have been added: multi level undo, command line history, +vim: filename completion, block operations, and more. +vim: +vim: Vim's development is led by Bram Moolenaar. +vim: +vim: This package also contains the Exuberant Ctags program +vim: written by Darren Hiebert. +vim: diff --git a/patches/source/vim/slack-desc.vim-gvim b/patches/source/vim/slack-desc.vim-gvim new file mode 100644 index 000000000..27efae73c --- /dev/null +++ b/patches/source/vim/slack-desc.vim-gvim @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. Line +# up the first '|' above the ':' following the base package name, and the '|' +# on the right side marks the last column you can put a character in. You must +# make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':'. + + |-----handy-ruler------------------------------------------------------| +vim-gvim: vim-gvim (gvim, the X/GTK2 enabled version of vim) +vim-gvim: +vim-gvim: Gvim is a graphical version of vim. Vim is an almost compatible +vim-gvim: version of the UNIX editor vi. Many new features have been added, +vim-gvim: such as multi level undo, command line history, filename completion, +vim-gvim: block operations, and more. +vim-gvim: +vim-gvim: The main vim package in the AP series is required to use this package. +vim-gvim: +vim-gvim: Vim's development is led by Bram Moolenaar. +vim-gvim: diff --git a/patches/source/vim/vim-gvim.SlackBuild b/patches/source/vim/vim-gvim.SlackBuild new file mode 100755 index 000000000..ddd555acd --- /dev/null +++ b/patches/source/vim/vim-gvim.SlackBuild @@ -0,0 +1,222 @@ +#!/bin/sh + +# Copyright 2008, 2009, 2010, 2013 Patrick J. Volkerding, Sebeka, Minnesota, USA +# All rights reserved. +# +# Redistribution and use of this script, with or without modification, is +# permitted provided that the following conditions are met: +# +# 1. Redistributions of this script must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +VIMVER=7.4 +# This is the directory in the VIM source archive to cd into. +DIRVER=74 +BUILD=${BUILD:-1_slack14.1} + +# Automatically determine the architecture we're building on: +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) export ARCH=i486 ;; + arm*) export ARCH=arm ;; + # Unless $ARCH is already set, use uname -m for all other archs: + *) export ARCH=$( uname -m ) ;; + esac +fi + +NUMJOBS=${NUMJOBS:-" -j7 "} + +PYVER=$(python -V 2>&1 | cut -f 2 -d' ' | cut -f 1-2 -d.) + +if [ "$ARCH" = "x86_64" ]; then + export SLKCFLAGS="-O2 -fPIC" + export LIBDIRSUFFIX="64" +else + export SLKCFLAGS="-O2" + export LIBDIRSUFFIX="" +fi +export SLKLDFLAGS="-L/usr/lib${LIBDIRSUFFIX}" + +CWD=$(pwd) +TMP=${TMP:-/tmp} +PKG=$TMP/package-vim-gvim + +rm -rf $PKG +mkdir -p $TMP $PKG + +# Determine VIM patchlevel: +if [ -d $CWD/patches ] ; then + cd $CWD/patches + PATCHLEVEL=$(/bin/ls ?.?.????.gz 2> /dev/null | tail -1 | cut -f 3 -d . ) + if [ "$PATCHLEVEL" = "" ]; then + PATCHLEVEL=$(/bin/ls ?.?.???.gz 2> /dev/null | tail -1 | cut -f 3 -d . ) + if [ "$PATCHLEVEL" = "" ]; then + PATCHLEVEL=000 + fi + fi + cd $CWD +fi + +cd $TMP +rm -rf vim$DIRVER +tar xvf $CWD/vim-$VIMVER.tar.?z* || exit 1 + +config_vim() { +CFLAGS="$SLKCFLAGS" LDFLAGS="$SLKLDFLAGS" \ +./configure \ + $* \ + --prefix=/usr \ + --enable-pythoninterp \ + --with-python-config-dir=/usr/lib${LIBDIRSUFFIX}/python$PYVER/config \ + --enable-perlinterp \ + --disable-tclinterp \ + --enable-multibyte \ + --enable-cscope \ + --with-features=huge \ + --with-compiledby="<volkerdi@slackware.com>" \ + --build=$ARCH-slackware-linux + + # I had been adding this, but got 100% complaints and 0% kudos: + # --enable-rubyinterp + +} + +cd $TMP/vim$DIRVER + +# If there's no syntax update, create one: +if ! ls $CWD/vim-runtime-syntax-* 1> /dev/null 2> /dev/null ; then + rm -rf runtime/syntax.orig + cp -a runtime/syntax runtime/syntax.orig + echo "Fetching vim syntax updates from ftp.nluug.nl..." + rsync -avzcP ftp.nluug.nl::Vim/runtime/syntax/ runtime/syntax/ + diff -u -r --new-file runtime/syntax.orig runtime/syntax | gzip -9c > $CWD/vim-runtime-syntax-$(date +%Y%m%d).diff.gz + rm -rf runtime/syntax + mv runtime/syntax.orig runtime/syntax +fi + +# Apply the syntax update: +zcat $CWD/vim-runtime-syntax-*.diff.gz | patch -p0 --verbose || exit 1 + +chown -R root:root . +find . \ + \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ + -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ + -exec chmod 644 {} \; +for file in $CWD/patches/?.?.???.gz $CWD/patches/?.?.????.gz ; do + if [ -f $file ]; then + zcat $file | patch -p0 --verbose || exit 1 + fi +done + +config_vim --with-x --enable-gui=gtk2 +make $NUMJOBS || make || exit 1 +make install DESTDIR=$PKG || exit 1 + +rsync -lprvt $PKG/usr/share/man/ $PKG/usr/man/ +rm -r $PKG/usr/share/man + +# Fix manpage symlinks: +if [ -d $PKG/usr/man ]; then + ( cd $PKG/usr/man + for manpagedir in $(find . -type d -name "man*") ; do + ( cd $manpagedir + for eachpage in $( find . -type l -maxdepth 1) ; do + ln -s $( readlink $eachpage ).gz $eachpage.gz + rm $eachpage + done + gzip -9 *.? + ) + done + ) +fi + +# Legacy binary links: +( cd $PKG/usr/bin ; rm -rf ex ) +( cd $PKG/usr/bin ; ln -sf vim ex ) +( cd $PKG/usr/bin ; rm -rf rview ) +( cd $PKG/usr/bin ; ln -sf vim rview ) +( cd $PKG/usr/bin ; rm -rf rvim ) +( cd $PKG/usr/bin ; ln -sf vim rvim ) +( cd $PKG/usr/bin ; rm -rf view ) +( cd $PKG/usr/bin ; ln -sf vim view ) +( cd $PKG/usr/bin ; rm -rf eview ) +( cd $PKG/usr/bin ; ln -sf vim eview ) +( cd $PKG/usr/bin ; rm -rf evim ) +( cd $PKG/usr/bin ; ln -sf vim evim ) + +mkdir -p $PKG/install +cat $CWD/slack-desc.vim-gvim > $PKG/install/slack-desc +zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh + +find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ + | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null + +# You'll have to run "gvim" to get the graphical version. +# Seems like this is the common way for console and gui versions +# of vim to co-exist. If your "vi" symlink isn't pointed in a +# way that suits you, it is fully user serviceable. :-) +( cd $PKG/usr/bin + rm -f gvim + mv vim gvim + for programlink in $(find . -type l | cut -b3-) ; do + rm $programlink + ln -sf gvim $programlink + done +) +rm -f vimtutor xxd + +# Perfect! +# Now we get rid of everything that's not in the other vim package. +# Let's assume (dangerous ;-) that we just built that in $TMP +# and use it as a reference: +if ! /bin/ls $TMP/vim-${VIMVER}*txz 1> /dev/null 2> /dev/null ; then + echo "FATAL: VIM package needed in $TMP" + exit 1 +fi +mkdir $PKG/vim +( cd $PKG + ( cd vim + echo "Extracting reference package $TMP/vim-${VIMVER}*txz:" + explodepkg $TMP/vim-${VIMVER}*txz 1> /dev/null + sh install/doinst.sh + ) +) +rm -r $PKG/vim/install +( cd $PKG + find vim | cut -b4- | while read sharedfile ; do + if [ ! -d $sharedfile ]; then + rm --verbose $PKG/$sharedfile + fi + done +) + +# Finally, reference purge: +rm -rf $PKG/vim + +# Perhaps we would be better off without this - forcing folks to run kappfinder +# or something. It seems better than starting with nothing, but might force +# people into defaults they don't want. Another nifty catch-22... +mkdir -p $PKG/usr/share/applications +cp -a $CWD/gvim.desktop $PKG/usr/share/applications +mkdir -p $PKG/usr/share/pixmaps +cp -a $CWD/gvim.png $PKG/usr/share/pixmaps + +# Remove empty directories: +find $PKG -type d -exec rmdir -p {} \; 2> /dev/null + +cd $PKG +/sbin/makepkg -l y -c n $TMP/vim-gvim-$VIMVER.$PATCHLEVEL-$ARCH-$BUILD.txz + diff --git a/patches/source/vim/vim-runtime-syntax-20131002.diff b/patches/source/vim/vim-runtime-syntax-20131002.diff new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/patches/source/vim/vim-runtime-syntax-20131002.diff diff --git a/patches/source/vim/vim.SlackBuild b/patches/source/vim/vim.SlackBuild new file mode 100755 index 000000000..91eeb4444 --- /dev/null +++ b/patches/source/vim/vim.SlackBuild @@ -0,0 +1,228 @@ +#!/bin/sh + +# Copyright 2008, 2009, 2010, 2013 Patrick J. Volkerding, Sebeka, Minnesota, USA +# All rights reserved. +# +# Redistribution and use of this script, with or without modification, is +# permitted provided that the following conditions are met: +# +# 1. Redistributions of this script must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +VIMVER=7.4 +CTAGSVER=5.8 +# This is the directory in the VIM source archive to cd into. +DIRVER=74 +BUILD=${BUILD:-1_slack14.1} + +# Automatically determine the architecture we're building on: +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) export ARCH=i486 ;; + arm*) export ARCH=arm ;; + # Unless $ARCH is already set, use uname -m for all other archs: + *) export ARCH=$( uname -m ) ;; + esac +fi + +NUMJOBS=${NUMJOBS:-" -j7 "} + +PYVER=$(python -V 2>&1 | cut -f 2 -d' ' | cut -f 1-2 -d.) + +if [ "$ARCH" = "x86_64" ]; then + export SLKCFLAGS="-O2 -fPIC" + export LIBDIRSUFFIX="64" +else + export SLKCFLAGS="-O2" + export LIBDIRSUFFIX="" +fi +export SLKLDFLAGS="-L/usr/lib${LIBDIRSUFFIX}" + +CWD=$(pwd) +TMP=${TMP:-/tmp} +PKG=$TMP/package-vim + +rm -rf $PKG +mkdir -p $TMP $PKG + +# Determine VIM patchlevel: +if [ -d $CWD/patches ] ; then + cd $CWD/patches + PATCHLEVEL=$(/bin/ls ?.?.????.gz 2> /dev/null | tail -1 | cut -f 3 -d . ) + if [ "$PATCHLEVEL" = "" ]; then + PATCHLEVEL=$(/bin/ls ?.?.???.gz 2> /dev/null | tail -1 | cut -f 3 -d . ) + if [ "$PATCHLEVEL" = "" ]; then + PATCHLEVEL=000 + fi + fi + cd $CWD +fi + +# ctags was once a part of vim, +# but now we have to bundle it in +cd $TMP +rm -rf ctags-$CTAGSVER +tar xvf $CWD/ctags-$CTAGSVER.tar.gz || exit 1 +cd ctags-$CTAGSVER +chown -R root:root . +find . \ + \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ + -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ + -exec chmod 644 {} \; +CFLAGS="$SLKCFLAGS" LDFLAGS="$SLKLDFLAGS" \ +./configure \ + --prefix=/usr \ + --build=$ARCH-slackware-linux +make $NUMJOBS || make || exit 1 +mkdir -p $PKG/usr/bin +cat ctags > $PKG/usr/bin/ctags +chmod 755 $PKG/usr/bin/ctags +mkdir -p $PKG/usr/man/man1 +cat ctags.1 | gzip -9c > $PKG/usr/man/man1/ctags.1.gz +mkdir -p $PKG/usr/doc/ctags-$CTAGSVER +cp -a \ + COPYING EXTENDING.html FAQ INSTALL INSTALL.oth NEWS README \ + $PKG/usr/doc/ctags-$CTAGSVER +chmod 644 $PKG/usr/doc/ctags-$CTAGSVER/* + +cd $TMP +rm -rf vim$DIRVER +tar xvf $CWD/vim-$VIMVER.tar.?z* || exit 1 + +config_vim() { +CFLAGS="$SLKCFLAGS" \ +./configure \ + $* \ + --prefix=/usr \ + --enable-pythoninterp \ + --with-python-config-dir=/usr/lib${LIBDIRSUFFIX}/python$PYVER/config \ + --enable-perlinterp \ + --disable-tclinterp \ + --enable-multibyte \ + --enable-cscope \ + --with-features=huge \ + --with-compiledby="<volkerdi@slackware.com>" \ + --build=$ARCH-slackware-linux + + # I had been adding this, but got 100% complaints and 0% kudos: + # --enable-rubyinterp +} + +cd $TMP/vim$DIRVER + +# If there's no syntax update, create one: +if ! ls $CWD/vim-runtime-syntax-* 1> /dev/null 2> /dev/null ; then + rm -rf runtime/syntax.orig + cp -a runtime/syntax runtime/syntax.orig + echo "Fetching vim syntax updates from ftp.nluug.nl..." + rsync -avzcP ftp.nluug.nl::Vim/runtime/syntax/ runtime/syntax/ + diff -u -r --new-file runtime/syntax.orig runtime/syntax | gzip -9c > $CWD/vim-runtime-syntax-$(date +%Y%m%d).diff.gz + rm -rf runtime/syntax + mv runtime/syntax.orig runtime/syntax +fi + +# Apply the syntax update: +zcat $CWD/vim-runtime-syntax-*.diff.gz | patch -p0 --verbose || exit 1 + +chown -R root:root . +find . \ + \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ + -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ + -exec chmod 644 {} \; +for file in $CWD/patches/?.?.???.gz $CWD/patches/?.?.????.gz ; do + if [ -f $file ]; then + zcat $file | patch -p0 --verbose || exit 1 + fi +done + +config_vim --without-x --disable-gui +make $NUMJOBS || make || exit 1 +make install DESTDIR=$PKG || exit 1 + +rsync -lprvt $PKG/usr/share/man/ $PKG/usr/man/ +rm -r $PKG/usr/share/man + +cp -a runtime/vimrc_example.vim runtime/vimrc.new + +# Don't make backups in /var/spool/cron/*, which fixes "crontab -e": +zcat $CWD/vim.vimrc.diff.gz | patch -p1 --verbose || exit 1 + +# Add patched vimrc to the package: +cat runtime/vimrc.new > $PKG/usr/share/vim/vimrc.new + +# Fix manpage symlinks: +if [ -d $PKG/usr/man ]; then + ( cd $PKG/usr/man + for manpagedir in $(find . -type d -name "man*") ; do + ( cd $manpagedir + for eachpage in $( find . -type l -maxdepth 1) ; do + ln -s $( readlink $eachpage ).gz $eachpage.gz + rm $eachpage + done + gzip -9 *.? + ) + done + ) +fi + +# Legacy binary links: +( cd $PKG/usr/bin ; rm -rf ex ) +( cd $PKG/usr/bin ; ln -sf vim ex ) +( cd $PKG/usr/bin ; rm -rf rview ) +( cd $PKG/usr/bin ; ln -sf vim rview ) +( cd $PKG/usr/bin ; rm -rf rvim ) +( cd $PKG/usr/bin ; ln -sf vim rvim ) +( cd $PKG/usr/bin ; rm -rf view ) +( cd $PKG/usr/bin ; ln -sf vim view ) +( cd $PKG/usr/bin ; rm -rf eview ) +( cd $PKG/usr/bin ; ln -sf vim eview ) +( cd $PKG/usr/bin ; rm -rf evim ) +( cd $PKG/usr/bin ; ln -sf vim evim ) + +mkdir -p $PKG/usr/doc/vim-$VIMVER.$PATCHLEVEL +cp -a README.txt $PKG/usr/doc/vim-$VIMVER.$PATCHLEVEL +find $PKG/usr/doc/vim-$VIMVER.$PATCHLEVEL -type f | xargs chmod 644 +( cd $PKG/usr/doc/vim-$VIMVER.$PATCHLEVEL ; rm -rf doc ) +( cd $PKG/usr/doc/vim-$VIMVER.$PATCHLEVEL ; ln -sf /usr/share/vim/vim$DIRVER doc ) + +mkdir -p $PKG/install +cat $CWD/slack-desc.vim > $PKG/install/slack-desc +cat << EOF > $PKG/install/doinst.sh +#!/bin/sh +config() { + NEW="\$1" + OLD="\$(dirname \$NEW)/\$(basename \$NEW .new)" + # If there's no config file by that name, mv it over: + if [ ! -r \$OLD ]; then + mv \$NEW \$OLD + elif [ "\$(cat \$OLD | md5sum)" = "\$(cat \$NEW | md5sum)" ]; then # toss the redundant copy + rm \$NEW + fi + # Otherwise, we leave the .new copy for the admin to consider... +} +config usr/share/vim/vimrc.new +EOF +zcat $CWD/doinst.sh.gz >> $PKG/install/doinst.sh + +find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ + | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null + +cd $PKG +/sbin/makepkg -l y -c n $TMP/vim-$VIMVER.$PATCHLEVEL-$ARCH-$BUILD.txz + +# Needed to build both packages in one shot for /patches: +cd $CWD +./vim-gvim.SlackBuild diff --git a/patches/source/vim/vim.vimrc.diff b/patches/source/vim/vim.vimrc.diff new file mode 100644 index 000000000..c94104a5f --- /dev/null +++ b/patches/source/vim/vim.vimrc.diff @@ -0,0 +1,12 @@ +--- ./runtime/vimrc.new.orig 2008-07-02 15:11:53.000000000 -0500 ++++ ./runtime/vimrc.new 2009-05-28 13:19:24.000000000 -0500 +@@ -87,6 +87,9 @@ + + endif " has("autocmd") + ++" Make vim work with the 'crontab -e' command ++set backupskip+=/var/spool/cron/* ++ + " Convenient command to see the difference between the current buffer and the + " file it was loaded from, thus the changes you made. + " Only define it when not defined already. |