From cf355aa88e19da8d881cad5ab9c2d1d12d174071 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 15 Apr 2013 17:01:58 +0200 Subject: [PATCH 01/82] - patchlevel 823 --- 7.3.823 | 69 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 7.3.823 diff --git a/7.3.823 b/7.3.823 new file mode 100644 index 00000000..59a36014 --- /dev/null +++ b/7.3.823 @@ -0,0 +1,69 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.823 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.823 (after 7.3.821) +Problem: Building with Cygwin: '-lsupc++' is not needed. +Solution: Remove it. (Ken Takata) +Files: src/Make_cyg.mak + + +*** ../vim-7.3.822/src/Make_cyg.mak 2013-02-16 18:16:11.000000000 +0100 +--- src/Make_cyg.mak 2013-02-17 15:04:05.000000000 +0100 +*************** +*** 1,6 **** + # + # Makefile for VIM on Win32, using Cygnus gcc +! # Last updated by Dan Sharp. Last Change: 2012 Jun 30 + # + # Also read INSTALLpc.txt! + # +--- 1,6 ---- + # + # Makefile for VIM on Win32, using Cygnus gcc +! # Last updated by Dan Sharp. Last Change: 2013 Feb 17 + # + # Also read INSTALLpc.txt! + # +*************** +*** 487,493 **** + EXTRA_OBJS += $(OUTDIR)/if_ole.o + EXTRA_LIBS += -loleaut32 + ifeq (yes, $(STATIC_STDCPLUS)) +! EXTRA_LIBS += -Wl,-Bstatic -lstdc++ -lsupc++ -Wl,-Bdynamic + else + EXTRA_LIBS += -lstdc++ + endif +--- 487,493 ---- + 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 +*** ../vim-7.3.822/src/version.c 2013-02-17 15:45:34.000000000 +0100 +--- src/version.c 2013-02-20 13:33:42.000000000 +0100 +*************** +*** 727,728 **** +--- 727,730 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 823, + /**/ + +-- +ARTHUR: Now stand aside worthy adversary. +BLACK KNIGHT: (Glancing at his shoulder) 'Tis but a scratch. +ARTHUR: A scratch? Your arm's off. + "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 /// From 075a8f851d16906841abee4dce5bbbd3695b2d1a Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 15 Apr 2013 17:01:59 +0200 Subject: [PATCH 02/82] - patchlevel 824 --- 7.3.824 | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 7.3.824 diff --git a/7.3.824 b/7.3.824 new file mode 100644 index 00000000..7881aed0 --- /dev/null +++ b/7.3.824 @@ -0,0 +1,49 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.824 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.824 +Problem: Can redefine builtin functions. (ZyX) +Solution: Disallow adding a function to g:. +Files: src/eval.c + + +*** ../vim-7.3.823/src/eval.c 2013-02-14 22:11:31.000000000 +0100 +--- src/eval.c 2013-02-20 15:17:50.000000000 +0100 +*************** +*** 21164,21169 **** +--- 21164,21172 ---- + if (arg[j] != NUL) + emsg_funcname((char *)e_invarg2, arg); + } ++ /* Disallow using the g: dict. */ ++ if (fudi.fd_dict != NULL && fudi.fd_dict->dv_scope == VAR_DEF_SCOPE) ++ EMSG(_("E862: Cannot use g: here")); + } + + /* +*** ../vim-7.3.823/src/version.c 2013-02-20 13:34:14.000000000 +0100 +--- src/version.c 2013-02-20 14:11:01.000000000 +0100 +*************** +*** 727,728 **** +--- 727,730 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 824, + /**/ + +-- +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 /// From b5ebfe20ebf948a5143c7ae0862efbc7dbd2d11f Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 15 Apr 2013 17:01:59 +0200 Subject: [PATCH 03/82] - patchlevel 825 --- 7.3.825 | 125 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 125 insertions(+) create mode 100644 7.3.825 diff --git a/7.3.825 b/7.3.825 new file mode 100644 index 00000000..6a8c29b1 --- /dev/null +++ b/7.3.825 @@ -0,0 +1,125 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.825 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.825 +Problem: With Python errors are not always clear. +Solution: Print the stack trace, unless :silent is used. (ZyX) +Files: src/if_python3.c, src/if_python.c + + +*** ../vim-7.3.824/src/if_python3.c 2013-02-13 14:17:00.000000000 +0100 +--- src/if_python3.c 2013-02-20 15:26:03.000000000 +0100 +*************** +*** 122,127 **** +--- 122,128 ---- + # define PyDict_SetItemString py3_PyDict_SetItemString + # define PyErr_BadArgument py3_PyErr_BadArgument + # define PyErr_Clear py3_PyErr_Clear ++ # define PyErr_PrintEx py3_PyErr_PrintEx + # define PyErr_NoMemory py3_PyErr_NoMemory + # define PyErr_Occurred py3_PyErr_Occurred + # define PyErr_SetNone py3_PyErr_SetNone +*************** +*** 279,284 **** +--- 280,286 ---- + static void* (*py3_PyMem_Malloc)(size_t); + static int (*py3_Py_IsInitialized)(void); + static void (*py3_PyErr_Clear)(void); ++ static void (*py3_PyErr_PrintEx)(int); + static PyObject*(*py3__PyObject_Init)(PyObject *, PyTypeObject *); + static iternextfunc py3__PyObject_NextNotImplemented; + static PyObject* py3__Py_NoneStruct; +*************** +*** 403,408 **** +--- 405,411 ---- + {"_Py_FalseStruct", (PYTHON_PROC*)&py3__Py_FalseStruct}, + {"_Py_TrueStruct", (PYTHON_PROC*)&py3__Py_TrueStruct}, + {"PyErr_Clear", (PYTHON_PROC*)&py3_PyErr_Clear}, ++ {"PyErr_PrintEx", (PYTHON_PROC*)&py3_PyErr_PrintEx}, + {"PyObject_Init", (PYTHON_PROC*)&py3__PyObject_Init}, + {"PyModule_AddObject", (PYTHON_PROC*)&py3_PyModule_AddObject}, + {"PyImport_AppendInittab", (PYTHON_PROC*)&py3_PyImport_AppendInittab}, +*************** +*** 842,848 **** +--- 845,855 ---- + r = PyRun_String(PyBytes_AsString(cmdbytes), Py_eval_input, + globals, globals); + if (r == NULL) ++ { ++ if (PyErr_Occurred() && !msg_silent) ++ PyErr_PrintEx(0); + EMSG(_("E860: Eval did not return a valid python 3 object")); ++ } + else + { + if (ConvertFromPyObject(r, rettv) == -1) +*** ../vim-7.3.824/src/if_python.c 2013-02-13 14:17:00.000000000 +0100 +--- src/if_python.c 2013-02-20 15:26:03.000000000 +0100 +*************** +*** 148,153 **** +--- 148,154 ---- + # define PyDict_SetItemString dll_PyDict_SetItemString + # define PyErr_BadArgument dll_PyErr_BadArgument + # define PyErr_Clear dll_PyErr_Clear ++ # define PyErr_PrintEx dll_PyErr_PrintEx + # define PyErr_NoMemory dll_PyErr_NoMemory + # define PyErr_Occurred dll_PyErr_Occurred + # define PyErr_SetNone dll_PyErr_SetNone +*************** +*** 251,256 **** +--- 252,258 ---- + static int(*dll_PyDict_SetItemString)(PyObject *dp, char *key, PyObject *item); + static int(*dll_PyErr_BadArgument)(void); + static void(*dll_PyErr_Clear)(void); ++ static void(*dll_PyErr_PrintEx)(int); + static PyObject*(*dll_PyErr_NoMemory)(void); + static PyObject*(*dll_PyErr_Occurred)(void); + static void(*dll_PyErr_SetNone)(PyObject *); +*************** +*** 380,385 **** +--- 382,388 ---- + {"PyDict_SetItemString", (PYTHON_PROC*)&dll_PyDict_SetItemString}, + {"PyErr_BadArgument", (PYTHON_PROC*)&dll_PyErr_BadArgument}, + {"PyErr_Clear", (PYTHON_PROC*)&dll_PyErr_Clear}, ++ {"PyErr_PrintEx", (PYTHON_PROC*)&dll_PyErr_PrintEx}, + {"PyErr_NoMemory", (PYTHON_PROC*)&dll_PyErr_NoMemory}, + {"PyErr_Occurred", (PYTHON_PROC*)&dll_PyErr_Occurred}, + {"PyErr_SetNone", (PYTHON_PROC*)&dll_PyErr_SetNone}, +*************** +*** 856,862 **** +--- 859,869 ---- + + r = PyRun_String((char *)(cmd), Py_eval_input, globals, globals); + if (r == NULL) ++ { ++ if (PyErr_Occurred() && !msg_silent) ++ PyErr_PrintEx(0); + EMSG(_("E858: Eval did not return a valid python object")); ++ } + else + { + if (ConvertFromPyObject(r, rettv) == -1) +*** ../vim-7.3.824/src/version.c 2013-02-20 15:19:38.000000000 +0100 +--- src/version.c 2013-02-20 15:27:20.000000000 +0100 +*************** +*** 727,728 **** +--- 727,730 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 825, + /**/ + +-- +ARTHUR: What are you going to do. bleed on 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 /// From 787ee8378abfb9a2ad01e3f25f323bdc6d39cab4 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 15 Apr 2013 17:02:00 +0200 Subject: [PATCH 04/82] - patchlevel 826 --- 7.3.826 | 155 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 155 insertions(+) create mode 100644 7.3.826 diff --git a/7.3.826 b/7.3.826 new file mode 100644 index 00000000..2235e228 --- /dev/null +++ b/7.3.826 @@ -0,0 +1,155 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.826 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.826 +Problem: List of features in :version output is hard to read. +Solution: Make columns. (Nazri Ramliy) +Files: src/version.c + + +*** ../vim-7.3.825/src/version.c 2013-02-20 16:09:35.000000000 +0100 +--- src/version.c 2013-02-20 16:27:44.000000000 +0100 +*************** +*** 34,39 **** +--- 34,42 ---- + # if (defined(VMS) && defined(VAXC)) || defined(PROTO) + char longVersion[sizeof(VIM_VERSION_LONG_DATE) + sizeof(__DATE__) + + sizeof(__TIME__) + 3]; ++ ++ static void list_features __ARGS((void)); ++ + void + make_version() + { +*************** +*** 2435,2440 **** +--- 2440,2513 ---- + } + } + ++ /* ++ * List all features aligned in columns, dictionary style. ++ */ ++ static void ++ list_features() ++ { ++ int i; ++ int ncol; ++ int nrow; ++ int nfeat = 0; ++ int width = 0; ++ ++ /* Find the length of the longest feature name, use that + 1 as the column ++ * width */ ++ for (i = 0; features[i] != NULL; ++i) ++ { ++ int l = STRLEN(features[i]); ++ ++ if (l > width) ++ width = l; ++ ++nfeat; ++ } ++ width += 1; ++ ++ if (Columns < width) ++ { ++ /* Not enough screen columns - show one per line */ ++ for (i = 0; features[i] != NULL; ++i) ++ { ++ version_msg(features[i]); ++ if (msg_col > 0) ++ msg_putchar('\n'); ++ } ++ return; ++ } ++ ++ ncol = (int) Columns / width; ++ /* The rightmost column doesn't need a separator. ++ * Sacrifice it to fit in one more column if possible. */ ++ if (Columns % width == width - 1) ++ ncol++; ++ ++ nrow = nfeat / ncol + (nfeat % ncol ? 1 : 0); ++ ++ for (i = 0; !got_int && i < nrow * ncol; ++i) ++ { ++ int idx = (i / ncol) + (i % ncol) * nrow; ++ ++ if (idx < nfeat) ++ { ++ int last_col = (i + 1) % ncol == 0; ++ ++ msg_puts((char_u *)features[idx]); ++ if (last_col) ++ { ++ if (msg_col > 0) ++ msg_putchar('\n'); ++ } ++ else ++ { ++ while (msg_col % width) ++ msg_putchar(' '); ++ } ++ } ++ else ++ msg_putchar('\n'); ++ } ++ } + void + list_version() + { +*************** +*** 2632,2646 **** + #endif + version_msg(_(" Features included (+) or not (-):\n")); + +! /* print all the features */ +! for (i = 0; features[i] != NULL; ++i) +! { +! version_msg(features[i]); +! if (msg_col > 0) +! version_msg(" "); +! } + +- version_msg("\n"); + #ifdef SYS_VIMRC_FILE + version_msg(_(" system vimrc file: \"")); + version_msg(SYS_VIMRC_FILE); +--- 2705,2712 ---- + #endif + version_msg(_(" Features included (+) or not (-):\n")); + +! list_features(); + + #ifdef SYS_VIMRC_FILE + version_msg(_(" system vimrc file: \"")); + version_msg(SYS_VIMRC_FILE); +*** ../vim-7.3.825/src/version.c 2013-02-20 16:09:35.000000000 +0100 +--- src/version.c 2013-02-20 16:27:44.000000000 +0100 +*************** +*** 727,728 **** +--- 730,733 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 826, + /**/ + +-- +Mrs Abbott: I'm a paediatrician. + Basil: Feet? +Mrs Abbott: Children. + Sybil: Oh, Basil! + Basil: Well, children have feet, don't they? That's how they move + around, my dear. You must take a look next time, it's most + interesting. (Fawlty Towers) + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From cf2fbf49a973b7a12fbf0ffc66c3d3bb72abede1 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 15 Apr 2013 17:02:01 +0200 Subject: [PATCH 05/82] - patchlevel 827 --- 7.3.827 | 94 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 7.3.827 diff --git a/7.3.827 b/7.3.827 new file mode 100644 index 00000000..d37e30f2 --- /dev/null +++ b/7.3.827 @@ -0,0 +1,94 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.827 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.827 (after 7.3.825) +Problem: Python tests fail. +Solution: Adjust the output for the stack trace. +Files: src/testdir/test86.in, src/testdir/test86.ok, + src/testdir/test87.ok + + +*** ../vim-7.3.826/src/testdir/test86.in 2013-02-13 14:17:00.000000000 +0100 +--- src/testdir/test86.in 2013-02-17 21:16:13.000000000 +0100 +*************** +*** 1,5 **** +--- 1,11 ---- + Tests for various python features. vim: set ft=vim : + ++ NOTE: This will cause errors when run under valgrind. ++ This would require recompiling Python with: ++ ./configure --without-pymalloc ++ See http://svn.python.org/view/python/trunk/Misc/README.valgrind?view=markup ++ ++ + STARTTEST + :so small.vim + :if !has('python') | e! test.ok | wq! test.out | endif +*** ../vim-7.3.826/src/testdir/test86.ok 2013-02-13 14:17:00.000000000 +0100 +--- src/testdir/test86.ok 2013-02-20 16:33:20.000000000 +0100 +*************** +*** 61,67 **** + 0.0 + "\0": Vim(let):E859: + {"\0": 1}: Vim(let):E859: +! undefined_name: Vim(let):E858: + vim: Vim(let):E859: + [1] + [1, 10, 11, 10, 11, 10, 11, 10, 11, 10, 11, 10, 1] +--- 61,67 ---- + 0.0 + "\0": Vim(let):E859: + {"\0": 1}: Vim(let):E859: +! undefined_name: Vim(let):Trace + vim: Vim(let):E859: + [1] + [1, 10, 11, 10, 11, 10, 11, 10, 11, 10, 11, 10, 1] +*** ../vim-7.3.826/src/testdir/test87.ok 2013-02-13 14:17:00.000000000 +0100 +--- src/testdir/test87.ok 2013-02-20 16:33:31.000000000 +0100 +*************** +*** 61,67 **** + 0.0 + "\0": Vim(let):E861: + {"\0": 1}: Vim(let):E861: +! undefined_name: Vim(let):E860: + vim: Vim(let):E861: + [1] + [1, 10, 11, 10, 11, 10, 11, 10, 11, 10, 11, 10, 1] +--- 61,67 ---- + 0.0 + "\0": Vim(let):E861: + {"\0": 1}: Vim(let):E861: +! undefined_name: Vim(let):Trace + vim: Vim(let):E861: + [1] + [1, 10, 11, 10, 11, 10, 11, 10, 11, 10, 11, 10, 1] +*** ../vim-7.3.826/src/version.c 2013-02-20 16:46:52.000000000 +0100 +--- src/version.c 2013-02-20 16:48:39.000000000 +0100 +*************** +*** 730,731 **** +--- 730,733 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 827, + /**/ + +-- +Any resemblance between the above views and those of my employer, my terminal, +or the view out my window are purely coincidental. Any resemblance between +the above and my own views is non-deterministic. The question of the +existence of views in the absence of anyone to hold them is left as an +exercise for the reader. The question of the existence of the reader is left +as an exercise for the second god coefficient. (A discussion of +non-orthogonal, non-integral polytheism is beyond the scope of this article.) + (Ralph Jennings) + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From aeecf43da818a9aa6c2a6271a09bb920a6c3db0c Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 15 Apr 2013 17:02:01 +0200 Subject: [PATCH 06/82] - patchlevel 828 --- 7.3.828 | 131 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 131 insertions(+) create mode 100644 7.3.828 diff --git a/7.3.828 b/7.3.828 new file mode 100644 index 00000000..cdcb950f --- /dev/null +++ b/7.3.828 @@ -0,0 +1,131 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.828 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.828 +Problem: Mappings are not aware of wildmenu mode. +Solution: Add wildmenumode(). (Christian Brabandt) +Files: src/eval.c, runtime/doc/eval.txt + + +*** ../vim-7.3.827/src/eval.c 2013-02-20 15:19:38.000000000 +0100 +--- src/eval.c 2013-02-20 17:45:19.000000000 +0100 +*************** +*** 751,756 **** +--- 751,757 ---- + 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)); ++ static void f_wildmenumode __ARGS((typval_T *argvars, typval_T *rettv)); + static void f_winbufnr __ARGS((typval_T *argvars, typval_T *rettv)); + static void f_wincol __ARGS((typval_T *argvars, typval_T *rettv)); + static void f_winheight __ARGS((typval_T *argvars, typval_T *rettv)); +*************** +*** 8121,8126 **** +--- 8122,8128 ---- + {"values", 1, 1, f_values}, + {"virtcol", 1, 1, f_virtcol}, + {"visualmode", 0, 1, f_visualmode}, ++ {"wildmenumode", 0, 0, f_wildmenumode}, + {"winbufnr", 1, 1, f_winbufnr}, + {"wincol", 0, 0, f_wincol}, + {"winheight", 1, 1, f_winheight}, +*************** +*** 18576,18581 **** +--- 18578,18597 ---- + #endif + } + ++ /* ++ * "wildmenumode()" function ++ */ ++ static void ++ f_wildmenumode(argvars, rettv) ++ typval_T *argvars UNUSED; ++ typval_T *rettv UNUSED; ++ { ++ #ifdef FEAT_WILDMENU ++ if (wild_menu_showing) ++ rettv->vval.v_number = 1; ++ #endif ++ } ++ + /* + * "winbufnr(nr)" function + */ +*** ../vim-7.3.827/runtime/doc/eval.txt 2013-02-13 17:34:59.000000000 +0100 +--- runtime/doc/eval.txt 2013-02-20 17:43:23.000000000 +0100 +*************** +*** 1974,1986 **** + toupper( {expr}) String the String {expr} switched to uppercase + tr( {src}, {fromstr}, {tostr}) String translate chars of {src} in {fromstr} + to chars in {tostr} +! trunc( {expr} Float truncate Float {expr} + type( {name}) Number type of variable {name} + undofile( {name}) String undo file name for {name} + undotree() List undo file tree + values( {dict}) List values in {dict} + virtcol( {expr}) Number screen column of cursor or mark + visualmode( [expr]) String last visual mode used + winbufnr( {nr}) Number buffer number of window {nr} + wincol() Number window column of the cursor + winheight( {nr}) Number height of window {nr} +--- 1986,1999 ---- + toupper( {expr}) String the String {expr} switched to uppercase + tr( {src}, {fromstr}, {tostr}) String translate chars of {src} in {fromstr} + to chars in {tostr} +! trunc( {expr}) Float truncate Float {expr} + type( {name}) Number type of variable {name} + undofile( {name}) String undo file name for {name} + undotree() List undo file tree + values( {dict}) List values in {dict} + virtcol( {expr}) Number screen column of cursor or mark + visualmode( [expr]) String last visual mode used ++ wildmenumode() Number whether 'wildmenu' mode is active + winbufnr( {nr}) Number buffer number of window {nr} + wincol() Number window column of the cursor + winheight( {nr}) Number height of window {nr} +*************** +*** 6121,6126 **** +--- 6163,6180 ---- + Dictionary or Float is not a Number or String, thus does not + cause the mode to be cleared. + ++ wildmenumode() *wildmenumode()* ++ Returns non-zero when the wildmenu is active and zero ++ otherwise. See 'wildmenu' and 'wildmode'. ++ This can be used in mappings to handle the 'wildcharm' option ++ gracefully. (Makes only sense with |mapmode-c| mappings). ++ ++ For example to make work like in wildmode, use: > ++ :cnoremap wildmenumode() ? "\\" : "\" ++ < ++ (Note, this needs the 'wildcharm' option set appropriately). ++ ++ + *winbufnr()* + winbufnr({nr}) The result is a Number, which is the number of the buffer + associated with window {nr}. When {nr} is zero, the number of +*** ../vim-7.3.827/src/version.c 2013-02-20 16:54:24.000000000 +0100 +--- src/version.c 2013-02-20 17:41:17.000000000 +0100 +*************** +*** 730,731 **** +--- 730,733 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 828, + /**/ + +-- +"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 /// From e68389f0810785ffba6c7c8ea0ece8ecf257c48f Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 15 Apr 2013 17:02:02 +0200 Subject: [PATCH 07/82] - patchlevel 829 --- 7.3.829 | 83 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 7.3.829 diff --git a/7.3.829 b/7.3.829 new file mode 100644 index 00000000..4cd795fa --- /dev/null +++ b/7.3.829 @@ -0,0 +1,83 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.829 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.829 +Problem: When compiled with the +rightleft feature 'showmatch' also shows a + match for the opening paren. When 'revins' is set the screen may + scroll. +Solution: Only check the opening paren when the +rightleft feature was + enabled. Do not show a match that is not visible. (partly by + Christian Brabandt) +Files: src/search.c + + +*** ../vim-7.3.828/src/search.c 2013-01-23 16:43:07.000000000 +0100 +--- src/search.c 2013-02-20 18:33:33.000000000 +0100 +*************** +*** 2431,2442 **** + /* 'matchpairs' is "x:y,x:y" */ + for (p = curbuf->b_p_mps; *p != NUL; ++p) + { +- if (PTR2CHAR(p) == c + #ifdef FEAT_RIGHTLEFT +! && (curwin->w_p_rl ^ p_ri) +! #endif +! ) + break; + p += MB_PTR2LEN(p) + 1; + if (PTR2CHAR(p) == c + #ifdef FEAT_RIGHTLEFT +--- 2431,2440 ---- + /* 'matchpairs' is "x:y,x:y" */ + for (p = curbuf->b_p_mps; *p != NUL; ++p) + { + #ifdef FEAT_RIGHTLEFT +! if (PTR2CHAR(p) == c && (curwin->w_p_rl ^ p_ri)) + break; ++ #endif + p += MB_PTR2LEN(p) + 1; + if (PTR2CHAR(p) == c + #ifdef FEAT_RIGHTLEFT +*************** +*** 2451,2457 **** + + if ((lpos = findmatch(NULL, NUL)) == NULL) /* no match, so beep */ + vim_beep(); +! else if (lpos->lnum >= curwin->w_topline) + { + if (!curwin->w_p_wrap) + getvcol(curwin, lpos, NULL, &vcol, NULL); +--- 2449,2455 ---- + + if ((lpos = findmatch(NULL, NUL)) == NULL) /* no match, so beep */ + vim_beep(); +! else if (lpos->lnum >= curwin->w_topline && lpos->lnum < curwin->w_botline) + { + if (!curwin->w_p_wrap) + getvcol(curwin, lpos, NULL, &vcol, NULL); +*** ../vim-7.3.828/src/version.c 2013-02-20 17:58:01.000000000 +0100 +--- src/version.c 2013-02-20 18:35:12.000000000 +0100 +*************** +*** 730,731 **** +--- 730,733 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 829, + /**/ + +-- +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 /// From dd7ab95564450d68215e902a16ad7f8377390494 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 15 Apr 2013 17:02:02 +0200 Subject: [PATCH 08/82] - patchlevel 830 --- 7.3.830 | 88 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100644 7.3.830 diff --git a/7.3.830 b/7.3.830 new file mode 100644 index 00000000..be9edebf --- /dev/null +++ b/7.3.830 @@ -0,0 +1,88 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.830 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.830 +Problem: :mksession confuses bytes, columns and characters when positioning + the cursor. +Solution: Use w_virtcol with "|" instead of w_cursor.col with "l". +Files: src/ex_docmd.c + + +*** ../vim-7.3.829/src/ex_docmd.c 2013-02-14 22:11:31.000000000 +0100 +--- src/ex_docmd.c 2013-02-20 19:13:21.000000000 +0100 +*************** +*** 10829,10852 **** + { + if (fprintf(fd, + "let s:c = %ld - ((%ld * winwidth(0) + %ld) / %ld)", +! (long)wp->w_cursor.col, +! (long)(wp->w_cursor.col - wp->w_leftcol), + (long)wp->w_width / 2, (long)wp->w_width) < 0 + || put_eol(fd) == FAIL + || put_line(fd, "if s:c > 0") == FAIL + || fprintf(fd, +! " exe 'normal! 0' . s:c . 'lzs' . (%ld - s:c) . 'l'", +! (long)wp->w_cursor.col) < 0 + || put_eol(fd) == FAIL + || put_line(fd, "else") == FAIL +! || fprintf(fd, " normal! 0%dl", wp->w_cursor.col) < 0 + || put_eol(fd) == FAIL + || put_line(fd, "endif") == FAIL) + return FAIL; + } + else + { +! if (fprintf(fd, "normal! 0%dl", wp->w_cursor.col) < 0 + || put_eol(fd) == FAIL) + return FAIL; + } +--- 10829,10852 ---- + { + if (fprintf(fd, + "let s:c = %ld - ((%ld * winwidth(0) + %ld) / %ld)", +! (long)wp->w_virtcol + 1, +! (long)(wp->w_virtcol - wp->w_leftcol), + (long)wp->w_width / 2, (long)wp->w_width) < 0 + || put_eol(fd) == FAIL + || put_line(fd, "if s:c > 0") == FAIL + || fprintf(fd, +! " exe 'normal! ' . s:c . '|zs' . %ld . '|'", +! (long)wp->w_virtcol + 1) < 0 + || put_eol(fd) == FAIL + || put_line(fd, "else") == FAIL +! || fprintf(fd, " normal! %d|", wp->w_virtcol + 1) < 0 + || put_eol(fd) == FAIL + || put_line(fd, "endif") == FAIL) + return FAIL; + } + else + { +! if (fprintf(fd, "normal! 0%d|", wp->w_virtcol + 1) < 0 + || put_eol(fd) == FAIL) + return FAIL; + } +*** ../vim-7.3.829/src/version.c 2013-02-20 18:39:07.000000000 +0100 +--- src/version.c 2013-02-20 19:14:18.000000000 +0100 +*************** +*** 730,731 **** +--- 730,733 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 830, + /**/ + +-- +Westheimer's Discovery: + A couple of months in the laboratory can + frequently save a couple of hours in the library. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From a2599182a773a68bc3d2df714518f7b3143534c9 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 15 Apr 2013 17:02:03 +0200 Subject: [PATCH 09/82] - patchlevel 831 --- 7.3.831 | 609 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 609 insertions(+) create mode 100644 7.3.831 diff --git a/7.3.831 b/7.3.831 new file mode 100644 index 00000000..431b588a --- /dev/null +++ b/7.3.831 @@ -0,0 +1,609 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.831 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.831 +Problem: Clumsy to handle the situation that a variable does not exist. +Solution: Add default value to getbufvar() et al. (Shougo Matsushita, + Hirohito Higashi) +Files: runtime/doc/eval.txt, src/eval.c src/testdir/test91.in, + src/testdir/test91.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.3.830/runtime/doc/eval.txt 2013-02-20 17:58:01.000000000 +0100 +--- runtime/doc/eval.txt 2013-02-20 20:53:50.000000000 +0100 +*************** +*** 1761,1772 **** + foldtextresult( {lnum}) String text for closed fold at {lnum} + foreground( ) Number bring the Vim window to the foreground + function( {name}) Funcref reference to function {name} +! garbagecollect( [at_exit]) none free memory, breaking cyclic references + get( {list}, {idx} [, {def}]) any get item {idx} from {list} or {def} + get( {dict}, {key} [, {def}]) any get item {key} from {dict} or {def} + getbufline( {expr}, {lnum} [, {end}]) + List lines {lnum} to {end} of buffer {expr} +! getbufvar( {expr}, {varname}) any variable {varname} in buffer {expr} + getchar( [expr]) Number get one character from the user + getcharmod( ) Number modifiers for the last typed character + getcmdline() String return the current command-line +--- 1772,1784 ---- + foldtextresult( {lnum}) String text for closed fold at {lnum} + foreground( ) Number bring the Vim window to the foreground + function( {name}) Funcref reference to function {name} +! garbagecollect( [{atexit}]) none free memory, breaking cyclic references + get( {list}, {idx} [, {def}]) any get item {idx} from {list} or {def} + get( {dict}, {key} [, {def}]) any get item {key} from {dict} or {def} + getbufline( {expr}, {lnum} [, {end}]) + List lines {lnum} to {end} of buffer {expr} +! getbufvar( {expr}, {varname} [, {def}]) +! any variable {varname} in buffer {expr} + getchar( [expr]) Number get one character from the user + getcharmod( ) Number modifiers for the last typed character + getcmdline() String return the current command-line +*************** +*** 1787,1798 **** + getqflist() List list of quickfix items + getreg( [{regname} [, 1]]) String contents of register + getregtype( [{regname}]) String type of register +! gettabvar( {nr}, {varname}) any variable {varname} in tab {nr} +! gettabwinvar( {tabnr}, {winnr}, {name}) + any {name} in {winnr} in tab page {tabnr} + getwinposx() Number X coord in pixels of GUI Vim window + getwinposy() Number Y coord in pixels of GUI Vim window +! getwinvar( {nr}, {varname}) any variable {varname} in window {nr} + glob( {expr} [, {nosuf} [, {list}]]) + any expand file wildcards in {expr} + globpath( {path}, {expr} [, {flag}]) +--- 1799,1812 ---- + 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} +! gettabwinvar( {tabnr}, {winnr}, {name} [, {def}]) + any {name} in {winnr} in tab page {tabnr} + getwinposx() Number X coord in pixels of GUI Vim window + getwinposy() Number Y coord in pixels of GUI Vim window +! getwinvar( {nr}, {varname} [, {def}]) +! any variable {varname} in window {nr} + glob( {expr} [, {nosuf} [, {list}]]) + any expand file wildcards in {expr} + globpath( {path}, {expr} [, {flag}]) +*************** +*** 3131,3137 **** + Example: > + :let lines = getbufline(bufnr("myfile"), 1, "$") + +! getbufvar({expr}, {varname}) *getbufvar()* + The result is the value of option or local buffer variable + {varname} in buffer {expr}. Note that the name without "b:" + must be used. +--- 3146,3152 ---- + Example: > + :let lines = getbufline(bufnr("myfile"), 1, "$") + +! getbufvar({expr}, {varname} [, {def}]) *getbufvar()* + The result is the value of option or local buffer variable + {varname} in buffer {expr}. Note that the name without "b:" + must be used. +*************** +*** 3141,3148 **** + doesn't work for a global variable, window-local variable or + window-local option. + For the use of {expr}, see |bufname()| above. +! When the buffer or variable doesn't exist an empty string is +! returned, there is no error message. + Examples: > + :let bufmodified = getbufvar(1, "&mod") + :echo "todo myvar = " . getbufvar("todo", "myvar") +--- 3156,3163 ---- + doesn't work for a global variable, window-local variable or + window-local option. + For the use of {expr}, see |bufname()| above. +! When the buffer or variable doesn't exist {def} or an empty +! string is returned, there is no error message. + Examples: > + :let bufmodified = getbufvar(1, "&mod") + :echo "todo myvar = " . getbufvar("todo", "myvar") +*************** +*** 3414,3439 **** + is one character with value 0x16. + If {regname} is not specified, |v:register| is used. + +! gettabvar({tabnr}, {varname}) *gettabvar()* + Get the value of a tab-local variable {varname} in tab page + {tabnr}. |t:var| + Tabs are numbered starting with one. + Note that the name without "t:" must be used. + +! gettabwinvar({tabnr}, {winnr}, {varname}) *gettabwinvar()* + Get the value of window-local variable {varname} in window + {winnr} in tab page {tabnr}. + When {varname} starts with "&" get the value of a window-local + option. + Tabs are numbered starting with one. For the current tabpage + use |getwinvar()|. + When {winnr} is zero the current window is used. + This also works for a global option, buffer-local option and + window-local option, but it doesn't work for a global variable + or buffer-local variable. +! When {varname} is empty a dictionary with all window-local +! variables is returned. +! Note that {varname} must be the name without "w:". + Examples: > + :let list_is_on = gettabwinvar(1, 2, '&list') + :echo "myvar = " . gettabwinvar(3, 1, 'myvar') +--- 3434,3463 ---- + is one character with value 0x16. + If {regname} is not specified, |v:register| is used. + +! gettabvar({tabnr}, {varname} [, {def}]) *gettabvar()* + Get the value of a tab-local variable {varname} in tab page + {tabnr}. |t:var| + Tabs are numbered starting with one. + Note that the name without "t:" must be used. ++ When the tab or variable doesn't exist {def} or an empty ++ string is returned, there is no error message. + +! gettabwinvar({tabnr}, {winnr}, {varname} [, {def}]) *gettabwinvar()* + Get the value of window-local variable {varname} in window + {winnr} in tab page {tabnr}. + When {varname} starts with "&" get the value of a window-local + option. ++ When {varname} is empty a dictionary with all window-local ++ variables is returned. ++ Note that {varname} must be the name without "w:". + Tabs are numbered starting with one. For the current tabpage + use |getwinvar()|. + When {winnr} is zero the current window is used. + This also works for a global option, buffer-local option and + window-local option, but it doesn't work for a global variable + or buffer-local variable. +! When the tab, window or variable doesn't exist {def} or an +! empty string is returned, there is no error message. + Examples: > + :let list_is_on = gettabwinvar(1, 2, '&list') + :echo "myvar = " . gettabwinvar(3, 1, 'myvar') +*************** +*** 3448,3454 **** + the top of the GUI Vim window. The result will be -1 if the + information is not available. + +! getwinvar({winnr}, {varname}) *getwinvar()* + Like |gettabwinvar()| for the current tabpage. + Examples: > + :let list_is_on = getwinvar(2, '&list') +--- 3472,3478 ---- + the top of the GUI Vim window. The result will be -1 if the + information is not available. + +! getwinvar({winnr}, {varname} [, {def}]) *getwinvar()* + Like |gettabwinvar()| for the current tabpage. + Examples: > + :let list_is_on = getwinvar(2, '&list') +*** ../vim-7.3.830/src/eval.c 2013-02-20 17:58:01.000000000 +0100 +--- src/eval.c 2013-02-20 20:52:09.000000000 +0100 +*************** +*** 7916,7922 **** + {"garbagecollect", 0, 1, f_garbagecollect}, + {"get", 2, 3, f_get}, + {"getbufline", 2, 3, f_getbufline}, +! {"getbufvar", 2, 2, f_getbufvar}, + {"getchar", 0, 1, f_getchar}, + {"getcharmod", 0, 0, f_getcharmod}, + {"getcmdline", 0, 0, f_getcmdline}, +--- 7916,7922 ---- + {"garbagecollect", 0, 1, f_garbagecollect}, + {"get", 2, 3, f_get}, + {"getbufline", 2, 3, f_getbufline}, +! {"getbufvar", 2, 3, f_getbufvar}, + {"getchar", 0, 1, f_getchar}, + {"getcharmod", 0, 0, f_getcharmod}, + {"getcmdline", 0, 0, f_getcmdline}, +*************** +*** 7936,7946 **** + {"getqflist", 0, 0, f_getqflist}, + {"getreg", 0, 2, f_getreg}, + {"getregtype", 0, 1, f_getregtype}, +! {"gettabvar", 2, 2, f_gettabvar}, +! {"gettabwinvar", 3, 3, f_gettabwinvar}, + {"getwinposx", 0, 0, f_getwinposx}, + {"getwinposy", 0, 0, f_getwinposy}, +! {"getwinvar", 2, 2, f_getwinvar}, + {"glob", 1, 3, f_glob}, + {"globpath", 2, 3, f_globpath}, + {"has", 1, 1, f_has}, +--- 7936,7946 ---- + {"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}, + {"getwinposx", 0, 0, f_getwinposx}, + {"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}, +*************** +*** 11115,11122 **** + ++emsg_off; + buf = get_buf_tv(&argvars[0]); + +! rettv->v_type = VAR_STRING; +! rettv->vval.v_string = NULL; + + if (buf != NULL && varname != NULL) + { +--- 11115,11128 ---- + ++emsg_off; + buf = get_buf_tv(&argvars[0]); + +! if (argvars[2].v_type != VAR_UNKNOWN) +! /* set the default value */ +! copy_tv(&argvars[2], rettv); +! else +! { +! rettv->v_type = VAR_STRING; +! rettv->vval.v_string = NULL; +! } + + if (buf != NULL && varname != NULL) + { +*************** +*** 11785,11791 **** +--- 11791,11801 ---- + v = find_var_in_ht(&tp->tp_vars.dv_hashtab, varname, FALSE); + if (v != NULL) + copy_tv(&v->di_tv, rettv); ++ else if (argvars[2].v_type != VAR_UNKNOWN) ++ copy_tv(&argvars[2], rettv); + } ++ else if (argvars[2].v_type != VAR_UNKNOWN) ++ copy_tv(&argvars[2], rettv); + } + + /* +*************** +*** 11907,11914 **** + varname = get_tv_string_chk(&argvars[off + 1]); + ++emsg_off; + +! rettv->v_type = VAR_STRING; +! rettv->vval.v_string = NULL; + + if (win != NULL && varname != NULL) + { +--- 11917,11930 ---- + varname = get_tv_string_chk(&argvars[off + 1]); + ++emsg_off; + +! if (argvars[off + 2].v_type != VAR_UNKNOWN) +! /* set the default return value */ +! copy_tv(&argvars[off + 2], rettv); +! else +! { +! rettv->v_type = VAR_STRING; +! rettv->vval.v_string = NULL; +! } + + if (win != NULL && varname != NULL) + { +*** ../vim-7.3.830/src/testdir/test91.in 2013-02-20 21:09:20.000000000 +0100 +--- src/testdir/test91.in 2013-02-20 20:57:49.000000000 +0100 +*************** +*** 0 **** +--- 1,98 ---- ++ Tests for getbufvar(), getwinvar(), gettabvar() and gettabwinvar(). ++ vim: set ft=vim : ++ ++ STARTTEST ++ :so small.vim ++ :" ++ :" test for getbufvar() ++ :let b:var_num = 1234 ++ :let def_num = 5678 ++ :$put =string(getbufvar(1, 'var_num')) ++ :$put =string(getbufvar(1, 'var_num', def_num)) ++ :$put =string(getbufvar(1, '')) ++ :$put =string(getbufvar(1, '', def_num)) ++ :unlet b:var_num ++ :$put =string(getbufvar(1, 'var_num', def_num)) ++ :$put =string(getbufvar(1, '')) ++ :$put =string(getbufvar(1, '', def_num)) ++ :$put =string(getbufvar(9, '')) ++ :$put =string(getbufvar(9, '', def_num)) ++ :unlet def_num ++ :$put =string(getbufvar(1, '&autoindent')) ++ :$put =string(getbufvar(1, '&autoindent', 1)) ++ :" ++ :" test for getwinvar() ++ :let w:var_str = "Dance" ++ :let def_str = "Chance" ++ :$put =string(getwinvar(1, 'var_str')) ++ :$put =string(getwinvar(1, 'var_str', def_str)) ++ :$put =string(getwinvar(1, '')) ++ :$put =string(getwinvar(1, '', def_str)) ++ :unlet w:var_str ++ :$put =string(getwinvar(1, 'var_str', def_str)) ++ :$put =string(getwinvar(1, '')) ++ :$put =string(getwinvar(1, '', def_str)) ++ :$put =string(getwinvar(9, '')) ++ :$put =string(getwinvar(9, '', def_str)) ++ :$put =string(getwinvar(1, '&nu')) ++ :$put =string(getwinvar(1, '&nu', 1)) ++ :unlet def_str ++ :" ++ :" test for gettabvar() ++ :tabnew ++ :tabnew ++ :let t:var_list = [1, 2, 3] ++ :let def_list = [4, 5, 6, 7] ++ :tabrewind ++ :$put =string(gettabvar(3, 'var_list')) ++ :$put =string(gettabvar(3, 'var_list', def_list)) ++ :$put =string(gettabvar(3, '')) ++ :$put =string(gettabvar(3, '', def_list)) ++ :tablast ++ :unlet t:var_list ++ :tabrewind ++ :$put =string(gettabvar(3, 'var_list', def_list)) ++ :$put =string(gettabvar(9, '')) ++ :$put =string(gettabvar(9, '', def_list)) ++ :$put =string(gettabvar(3, '&nu')) ++ :$put =string(gettabvar(3, '&nu', def_list)) ++ :unlet def_list ++ :tabonly ++ :" ++ :" test for gettabwinvar() ++ :tabnew ++ :tabnew ++ :tabprev ++ :split ++ :split ++ :wincmd w ++ :vert split ++ :wincmd w ++ :let w:var_dict = {'dict': 'tabwin'} ++ :let def_dict = {'dict2': 'newval'} ++ :wincmd b ++ :tabrewind ++ :$put =string(gettabwinvar(2, 3, 'var_dict')) ++ :$put =string(gettabwinvar(2, 3, 'var_dict', def_dict)) ++ :$put =string(gettabwinvar(2, 3, '')) ++ :$put =string(gettabwinvar(2, 3, '', def_dict)) ++ :tabnext ++ :3wincmd w ++ :unlet w:var_dict ++ :tabrewind ++ :$put =string(gettabwinvar(2, 3, 'var_dict', def_dict)) ++ :$put =string(gettabwinvar(2, 3, '')) ++ :$put =string(gettabwinvar(2, 3, '', def_dict)) ++ :$put =string(gettabwinvar(2, 9, '')) ++ :$put =string(gettabwinvar(2, 9, '', def_dict)) ++ :$put =string(gettabwinvar(9, 3, '')) ++ :$put =string(gettabwinvar(9, 3, '', def_dict)) ++ :unlet def_dict ++ :$put =string(gettabwinvar(2, 3, '&nux')) ++ :$put =string(gettabwinvar(2, 3, '&nux', 1)) ++ :tabonly ++ :" ++ :/^start/,$wq! test.out ++ ENDTEST ++ ++ start: +*** ../vim-7.3.830/src/testdir/test91.ok 2013-02-20 21:09:20.000000000 +0100 +--- src/testdir/test91.ok 2013-02-20 20:57:45.000000000 +0100 +*************** +*** 0 **** +--- 1,45 ---- ++ start: ++ 1234 ++ 1234 ++ {'var_num': 1234} ++ {'var_num': 1234} ++ 5678 ++ {} ++ {} ++ '' ++ 5678 ++ 0 ++ 0 ++ 'Dance' ++ 'Dance' ++ {'var_str': 'Dance'} ++ {'var_str': 'Dance'} ++ 'Chance' ++ {} ++ {} ++ '' ++ 'Chance' ++ 0 ++ 0 ++ [1, 2, 3] ++ [1, 2, 3] ++ '' ++ [4, 5, 6, 7] ++ [4, 5, 6, 7] ++ '' ++ [4, 5, 6, 7] ++ '' ++ [4, 5, 6, 7] ++ {'dict': 'tabwin'} ++ {'dict': 'tabwin'} ++ {'var_dict': {'dict': 'tabwin'}} ++ {'var_dict': {'dict': 'tabwin'}} ++ {'dict2': 'newval'} ++ {} ++ {} ++ '' ++ {'dict2': 'newval'} ++ '' ++ {'dict2': 'newval'} ++ '' ++ 1 +*** ../vim-7.3.830/src/testdir/Make_amiga.mak 2013-02-13 17:34:59.000000000 +0100 +--- src/testdir/Make_amiga.mak 2013-02-20 20:21:03.000000000 +0100 +*************** +*** 32,38 **** + test71.out test72.out test73.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 + + .SUFFIXES: .in .out + +--- 32,38 ---- + test71.out test72.out test73.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 + + .SUFFIXES: .in .out + +*************** +*** 139,141 **** +--- 139,142 ---- + test88.out: test88.in + test89.out: test89.in + test90.out: test90.in ++ test91.out: test91.in +*** ../vim-7.3.830/src/testdir/Make_dos.mak 2013-02-13 17:34:59.000000000 +0100 +--- src/testdir/Make_dos.mak 2013-02-20 20:21:13.000000000 +0100 +*************** +*** 31,37 **** + test74.out test75.out test76.out test77.out test78.out \ + test79.out test80.out test81.out test82.out test83.out \ + test84.out test85.out test86.out test87.out test88.out \ +! test89.out test90.out + + SCRIPTS32 = test50.out test70.out + +--- 31,37 ---- + test74.out test75.out test76.out test77.out test78.out \ + 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 + + SCRIPTS32 = test50.out test70.out + +*** ../vim-7.3.830/src/testdir/Make_ming.mak 2013-02-13 17:34:59.000000000 +0100 +--- src/testdir/Make_ming.mak 2013-02-20 20:21:19.000000000 +0100 +*************** +*** 51,57 **** + test74.out test75.out test76.out test77.out test78.out \ + test79.out test80.out test81.out test82.out test83.out \ + test84.out test85.out test86.out test87.out test88.out \ +! test89.out test90.out + + SCRIPTS32 = test50.out test70.out + +--- 51,57 ---- + test74.out test75.out test76.out test77.out test78.out \ + 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 + + SCRIPTS32 = test50.out test70.out + +*** ../vim-7.3.830/src/testdir/Make_os2.mak 2013-02-13 17:34:59.000000000 +0100 +--- src/testdir/Make_os2.mak 2013-02-20 20:21:25.000000000 +0100 +*************** +*** 32,38 **** + test71.out test72.out test73.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 + + .SUFFIXES: .in .out + +--- 32,38 ---- + test71.out test72.out test73.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 + + .SUFFIXES: .in .out + +*** ../vim-7.3.830/src/testdir/Make_vms.mms 2013-02-13 17:34:59.000000000 +0100 +--- src/testdir/Make_vms.mms 2013-02-20 20:21:31.000000000 +0100 +*************** +*** 4,10 **** + # Authors: Zoltan Arpadffy, + # Sandor Kopanyi, + # +! # Last change: 2013 Feb 13 + # + # This has been tested on VMS 6.2 to 8.3 on DEC Alpha, VAX and IA64. + # Edit the lines in the Configuration section below to select. +--- 4,10 ---- + # Authors: Zoltan Arpadffy, + # Sandor Kopanyi, + # +! # Last change: 2013 Feb 20 + # + # 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. +*************** +*** 77,83 **** + 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 + + # Known problems: + # Test 30: a problem around mac format - unknown reason +--- 77,83 ---- + 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 + + # Known problems: + # Test 30: a problem around mac format - unknown reason +*** ../vim-7.3.830/src/testdir/Makefile 2013-02-13 17:34:59.000000000 +0100 +--- src/testdir/Makefile 2013-02-20 20:21:47.000000000 +0100 +*************** +*** 28,34 **** + test74.out test75.out test76.out test77.out test78.out \ + test79.out test80.out test81.out test82.out test83.out \ + test84.out test85.out test86.out test87.out test88.out \ +! test89.out test90.out + + SCRIPTS_GUI = test16.out + +--- 28,34 ---- + test74.out test75.out test76.out test77.out test78.out \ + 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 + + SCRIPTS_GUI = test16.out + +*** ../vim-7.3.830/src/version.c 2013-02-20 19:26:24.000000000 +0100 +--- src/version.c 2013-02-20 21:08:40.000000000 +0100 +*************** +*** 730,731 **** +--- 730,733 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 831, + /**/ + +-- + | + +Ceci n'est pas une pipe. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 8a98aa1d989cb04cc5c2d5ed64e8ace17702f75c Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 15 Apr 2013 17:02:04 +0200 Subject: [PATCH 10/82] - patchlevel 832 --- 7.3.832 | 66 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 7.3.832 diff --git a/7.3.832 b/7.3.832 new file mode 100644 index 00000000..1a389406 --- /dev/null +++ b/7.3.832 @@ -0,0 +1,66 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.832 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.832 +Problem: Compiler warning. +Solution: Add type cast. (Mike Williams) +Files: src/version.c + + +*** ../vim-7.3.831/src/version.c 2013-02-20 21:11:14.000000000 +0100 +--- src/version.c 2013-02-26 11:21:41.000000000 +0100 +*************** +*** 2466,2472 **** + * width */ + for (i = 0; features[i] != NULL; ++i) + { +! int l = STRLEN(features[i]); + + if (l > width) + width = l; +--- 2468,2474 ---- + * width */ + for (i = 0; features[i] != NULL; ++i) + { +! int l = (int)STRLEN(features[i]); + + if (l > width) + width = l; +*************** +*** 2518,2523 **** +--- 2520,2526 ---- + msg_putchar('\n'); + } + } ++ + void + list_version() + { +*** ../vim-7.3.831/src/version.c 2013-02-20 21:11:14.000000000 +0100 +--- src/version.c 2013-02-26 11:21:41.000000000 +0100 +*************** +*** 730,731 **** +--- 730,733 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 832, + /**/ + +-- +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 /// From 1ae198ba72b760669e489a1fb9c99539941c6630 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 15 Apr 2013 17:02:04 +0200 Subject: [PATCH 11/82] - patchlevel 833 --- 7.3.833 | 118 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 118 insertions(+) create mode 100644 7.3.833 diff --git a/7.3.833 b/7.3.833 new file mode 100644 index 00000000..b28af4f9 --- /dev/null +++ b/7.3.833 @@ -0,0 +1,118 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.833 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.833 +Problem: In the terminal the scroll wheel always scrolls the active window. +Solution: Scroll the window under the mouse pointer, like in the GUI. + (Bradie Rao) +Files: src/edit.c, src/normal.c + + +*** ../vim-7.3.832/src/edit.c 2013-02-13 16:30:17.000000000 +0100 +--- src/edit.c 2013-02-26 11:20:31.000000000 +0100 +*************** +*** 9139,9147 **** + + tpos = curwin->w_cursor; + +! # if defined(FEAT_GUI) && defined(FEAT_WINDOWS) +! /* Currently the mouse coordinates are only known in the GUI. */ +! if (gui.in_use && mouse_row >= 0 && mouse_col >= 0) + { + int row, col; + +--- 9139,9146 ---- + + tpos = curwin->w_cursor; + +! # ifdef FEAT_WINDOWS +! if (mouse_row >= 0 && mouse_col >= 0) + { + int row, col; + +*************** +*** 9191,9197 **** + # endif + } + +! # if defined(FEAT_GUI) && defined(FEAT_WINDOWS) + curwin->w_redr_status = TRUE; + + curwin = old_curwin; +--- 9190,9196 ---- + # endif + } + +! # ifdef FEAT_WINDOWS + curwin->w_redr_status = TRUE; + + curwin = old_curwin; +*** ../vim-7.3.832/src/normal.c 2013-02-14 22:11:31.000000000 +0100 +--- src/normal.c 2013-02-26 11:20:31.000000000 +0100 +*************** +*** 4649,4659 **** + nv_mousescroll(cap) + cmdarg_T *cap; + { +! # if defined(FEAT_GUI) && defined(FEAT_WINDOWS) + win_T *old_curwin = curwin; + +! /* Currently we only get the mouse coordinates in the GUI. */ +! if (gui.in_use && mouse_row >= 0 && mouse_col >= 0) + { + int row, col; + +--- 4649,4658 ---- + nv_mousescroll(cap) + cmdarg_T *cap; + { +! # ifdef FEAT_WINDOWS + win_T *old_curwin = curwin; + +! if (mouse_row >= 0 && mouse_col >= 0) + { + int row, col; + +*************** +*** 4698,4704 **** + } + # endif + +! # if defined(FEAT_GUI) && defined(FEAT_WINDOWS) + curwin->w_redr_status = TRUE; + + curwin = old_curwin; +--- 4697,4703 ---- + } + # endif + +! # ifdef FEAT_WINDOWS + curwin->w_redr_status = TRUE; + + curwin = old_curwin; +*** ../vim-7.3.832/src/version.c 2013-02-26 11:25:28.000000000 +0100 +--- src/version.c 2013-02-26 13:28:51.000000000 +0100 +*************** +*** 730,731 **** +--- 730,733 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 833, + /**/ + +-- +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 /// From 1ce0605ae6e613b953803959d7519168bf8f2a00 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 15 Apr 2013 17:02:05 +0200 Subject: [PATCH 12/82] - patchlevel 834 --- 7.3.834 | 83 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 7.3.834 diff --git a/7.3.834 b/7.3.834 new file mode 100644 index 00000000..b95610e8 --- /dev/null +++ b/7.3.834 @@ -0,0 +1,83 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.834 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.834 +Problem: Ruby 2.0 has a few API changes. +Solution: Add handling of Ruby 2.0. (Yasuhiro Matsumoto) +Files: src/if_ruby.c + + +*** ../vim-7.3.833/src/if_ruby.c 2013-02-14 22:19:47.000000000 +0100 +--- src/if_ruby.c 2013-02-26 13:41:24.000000000 +0100 +*************** +*** 189,195 **** +--- 189,197 ---- + #ifndef RUBY19_OR_LATER + #define rb_num2long dll_rb_num2long + #endif ++ #if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER <= 19 + #define rb_num2ulong dll_rb_num2ulong ++ #endif + #define rb_obj_alloc dll_rb_obj_alloc + #define rb_obj_as_string dll_rb_obj_as_string + #define rb_obj_id dll_rb_obj_id +*************** +*** 344,349 **** +--- 346,362 ---- + { + return dll_rb_int2big(x); + } ++ #if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 20 ++ VALUE ++ rb_float_new_in_heap(double d) ++ { ++ return dll_rb_float_new(d); ++ } ++ unsigned long rb_num2ulong(VALUE x) ++ { ++ return (long)RSHIFT((SIGNED_VALUE)(x),1); ++ } ++ #endif + #endif + + static HINSTANCE hinstRuby = NULL; /* Instance of ruby.dll */ +*************** +*** 434,440 **** +--- 447,457 ---- + #endif + #if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 18 + {"rb_string_value_ptr", (RUBY_PROC*)&dll_rb_string_value_ptr}, ++ # if DYNAMIC_RUBY_VER <= 19 + {"rb_float_new", (RUBY_PROC*)&dll_rb_float_new}, ++ # else ++ {"rb_float_new_in_heap", (RUBY_PROC*)&dll_rb_float_new}, ++ # endif + {"rb_ary_new", (RUBY_PROC*)&dll_rb_ary_new}, + {"rb_ary_push", (RUBY_PROC*)&dll_rb_ary_push}, + #endif +*** ../vim-7.3.833/src/version.c 2013-02-26 13:30:28.000000000 +0100 +--- src/version.c 2013-02-26 13:33:34.000000000 +0100 +*************** +*** 730,731 **** +--- 730,733 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 834, + /**/ + +-- +An alien life briefly visits earth. Just before departing it leaves a +message in the dust on the back of a white van. The world is shocked +and wants to know what it means. After months of studies the worlds +best linguistic scientists are able to decipher the message: "Wash 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 /// From f4766d776c326603764f32316ebf99456ff0eebb Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 15 Apr 2013 17:02:06 +0200 Subject: [PATCH 13/82] - patchlevel 835 --- 7.3.835 | 60 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 7.3.835 diff --git a/7.3.835 b/7.3.835 new file mode 100644 index 00000000..61991bb9 --- /dev/null +++ b/7.3.835 @@ -0,0 +1,60 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.835 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.835 +Problem: "xxd -i" fails on an empty file. +Solution: Do output the closing } for an empty file. (partly by Lawrence + Woodman) +Files: src/xxd/xxd.c + + +*** ../vim-7.3.834/src/xxd/xxd.c 2011-04-11 21:35:03.000000000 +0200 +--- src/xxd/xxd.c 2013-02-26 14:08:48.000000000 +0100 +*************** +*** 729,737 **** + if (c == EOF && ferror(fp)) + die(2); + +! if (p) +! if (fputs("\n};\n" + 3 * (fp == stdin), fpo) == EOF) +! die(3); + + if (fp != stdin) + { +--- 729,738 ---- + if (c == EOF && ferror(fp)) + die(2); + +! if (p && fputs("\n", fpo) == EOF) +! die(3); +! if (fputs("};\n" + 3 * (fp == stdin), fpo) == EOF) +! die(3); + + if (fp != stdin) + { +*** ../vim-7.3.834/src/version.c 2013-02-26 13:41:31.000000000 +0100 +--- src/version.c 2013-02-26 14:11:21.000000000 +0100 +*************** +*** 730,731 **** +--- 730,733 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 835, + /**/ + +-- +For society, it's probably a good thing that engineers value function over +appearance. For example, you wouldn't want engineers to build nuclear power +plants that only _look_ like they would keep all the radiation inside. + (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 /// From e373ee4808a75f0938a2d32ada796190c5b54b30 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 15 Apr 2013 17:02:06 +0200 Subject: [PATCH 14/82] - patchlevel 836 --- 7.3.836 | 2071 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 2071 insertions(+) create mode 100644 7.3.836 diff --git a/7.3.836 b/7.3.836 new file mode 100644 index 00000000..712e2b3d --- /dev/null +++ b/7.3.836 @@ -0,0 +1,2071 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.836 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.836 +Problem: Clipboard does not work on Win32 when compiled with Cygwin. +Solution: Move the Win32 clipboard code to a separate file and use it when + building with os_unix.c. (Frodak Baksik, Ken Takata) +Files: src/Make_bc5.mak, src/Make_cyg.mak, src/Make_ivc.mak, + src/Make_ming.mak, src/Make_mvc.mak, src/Make_w16.mak, + src/Makefile, src/config.h.in, src/configure.in, + src/auto/configure, src/feature.h, src/globals.h, src/mbyte.c, + src/os_mswin.c, src/os_unix.c, src/os_win32.c, src/proto.h, + src/proto/os_mswin.pro, src/proto/winclip.pro, src/term.c, + src/vim.h, src/winclip.c + + +*** ../vim-7.3.835/src/Make_bc5.mak 2010-08-15 21:57:32.000000000 +0200 +--- src/Make_bc5.mak 2013-02-26 14:18:19.000000000 +0100 +*************** +*** 694,700 **** + + !if ($(OSTYPE)==WIN32) + vimobj = $(vimobj) \ +! $(OBJDIR)\os_win32.obj $(OBJDIR)\os_mswin.obj + !elif ($(OSTYPE)==DOS16) + vimobj = $(vimobj) \ + $(OBJDIR)\os_msdos.obj +--- 694,700 ---- + + !if ($(OSTYPE)==WIN32) + vimobj = $(vimobj) \ +! $(OBJDIR)\os_win32.obj $(OBJDIR)\os_mswin.obj $(OBJDIR)\winclip.obj + !elif ($(OSTYPE)==DOS16) + vimobj = $(vimobj) \ + $(OBJDIR)\os_msdos.obj +*** ../vim-7.3.835/src/Make_cyg.mak 2013-02-20 13:34:14.000000000 +0100 +--- src/Make_cyg.mak 2013-02-26 14:18:19.000000000 +0100 +*************** +*** 547,552 **** +--- 547,553 ---- + $(OUTDIR)/option.o \ + $(OUTDIR)/os_win32.o \ + $(OUTDIR)/os_mswin.o \ ++ $(OUTDIR)/winclip.o \ + $(OUTDIR)/pathdef.o \ + $(OUTDIR)/popupmnu.o \ + $(OUTDIR)/quickfix.o \ +*** ../vim-7.3.835/src/Make_ivc.mak 2010-08-15 21:57:28.000000000 +0200 +--- src/Make_ivc.mak 2013-02-26 14:18:19.000000000 +0100 +*************** +*** 241,246 **** +--- 241,247 ---- + "$(INTDIR)/ops.obj" \ + "$(INTDIR)/option.obj" \ + "$(INTDIR)/os_mswin.obj" \ ++ "$(INTDIR)/winclip.obj" \ + "$(INTDIR)/os_win32.obj" \ + "$(INTDIR)/popupmnu.obj" \ + "$(INTDIR)/quickfix.obj" \ +*************** +*** 600,605 **** +--- 601,610 ---- + # End Source File + # Begin Source File + ++ SOURCE=.\winclip.c ++ # End Source File ++ # Begin Source File ++ + SOURCE=.\os_win32.c + # End Source File + # Begin Source File +*** ../vim-7.3.835/src/Make_ming.mak 2013-01-30 14:55:35.000000000 +0100 +--- src/Make_ming.mak 2013-02-26 14:18:19.000000000 +0100 +*************** +*** 523,528 **** +--- 523,529 ---- + $(OUTDIR)/option.o \ + $(OUTDIR)/os_win32.o \ + $(OUTDIR)/os_mswin.o \ ++ $(OUTDIR)/winclip.o \ + $(OUTDIR)/pathdef.o \ + $(OUTDIR)/popupmnu.o \ + $(OUTDIR)/quickfix.o \ +*** ../vim-7.3.835/src/Make_mvc.mak 2013-01-30 14:55:35.000000000 +0100 +--- src/Make_mvc.mak 2013-02-26 14:29:05.000000000 +0100 +*************** +*** 543,548 **** +--- 543,549 ---- + $(OUTDIR)\ops.obj \ + $(OUTDIR)\option.obj \ + $(OUTDIR)\os_mswin.obj \ ++ $(OUTDIR)\winclip.obj \ + $(OUTDIR)\os_win32.obj \ + $(OUTDIR)\pathdef.obj \ + $(OUTDIR)\popupmnu.obj \ +*************** +*** 1149,1154 **** +--- 1150,1157 ---- + + $(OUTDIR)/os_mswin.obj: $(OUTDIR) os_mswin.c $(INCL) + ++ $(OUTDIR)/winclip.obj: $(OUTDIR) winclip.c $(INCL) ++ + $(OUTDIR)/os_win32.obj: $(OUTDIR) os_win32.c $(INCL) os_win32.h + + $(OUTDIR)/os_w32exe.obj: $(OUTDIR) os_w32exe.c $(INCL) +*************** +*** 1256,1261 **** +--- 1259,1265 ---- + proto/ops.pro \ + proto/option.pro \ + proto/os_mswin.pro \ ++ proto/winclip.pro \ + proto/os_win32.pro \ + proto/popupmnu.pro \ + proto/quickfix.pro \ +*** ../vim-7.3.835/src/Make_w16.mak 2010-08-15 21:57:27.000000000 +0200 +--- src/Make_w16.mak 2013-02-26 14:18:19.000000000 +0100 +*************** +*** 107,112 **** +--- 107,113 ---- + $(INTDIR)\os_win16.obj\ + $(INTDIR)\os_msdos.obj\ + $(INTDIR)\os_mswin.obj\ ++ $(INTDIR)\winclip.obj\ + $(INTDIR)\popupmnu.obj\ + $(INTDIR)\quickfix.obj\ + $(INTDIR)\regexp.obj\ +*** ../vim-7.3.835/src/Makefile 2013-01-30 17:41:43.000000000 +0100 +--- src/Makefile 2013-02-26 14:54:51.000000000 +0100 +*************** +*** 1638,1644 **** + RSRC_DIR = os_mac_rsrc + + PRO_MANUAL = os_amiga.pro os_msdos.pro os_win16.pro os_win32.pro \ +! os_mswin.pro os_beos.pro os_vms.pro $(PERL_PRO) + + # Default target is making the executable and tools + all: $(VIMTARGET) $(TOOLS) languages $(GUI_BUNDLE) +--- 1638,1644 ---- + RSRC_DIR = os_mac_rsrc + + PRO_MANUAL = os_amiga.pro os_msdos.pro os_win16.pro os_win32.pro \ +! os_mswin.pro winclip.pro os_beos.pro os_vms.pro $(PERL_PRO) + + # Default target is making the executable and tools + all: $(VIMTARGET) $(TOOLS) languages $(GUI_BUNDLE) +*************** +*** 1792,1797 **** +--- 1792,1801 ---- + $(CPROTO) -DWIN16 -DWIN32 -UHAVE_CONFIG_H $< > proto/$@ + echo "/* vim: set ft=c : */" >> proto/$@ + ++ winclip.pro: winclip.c ++ $(CPROTO) -DWIN16 -DWIN32 -UHAVE_CONFIG_H $< > proto/$@ ++ echo "/* vim: set ft=c : */" >> proto/$@ ++ + os_beos.pro: os_beos.c + $(CPROTO) -D__BEOS__ -UHAVE_CONFIG_H $< > proto/$@ + echo "/* vim: set ft=c : */" >> proto/$@ +*************** +*** 2642,2647 **** +--- 2646,2657 ---- + objects/os_unix.o: os_unix.c + $(CCC) -o $@ os_unix.c + ++ objects/os_mswin.o: os_mswin.c ++ $(CCC) -o $@ os_mswin.c ++ ++ objects/winclip.o: winclip.c ++ $(CCC) -o $@ winclip.c ++ + objects/pathdef.o: auto/pathdef.c + $(CCC) -o $@ auto/pathdef.c + +*************** +*** 2970,2975 **** +--- 2980,2989 ---- + 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 version.h ++ objects/winclip.o: winclip.c vimio.h 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 ex_cmds.h proto.h globals.h farsi.h arabic.h \ ++ proto/winclip.pro + objects/window.o: window.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.3.835/src/config.h.in 2012-08-15 14:04:50.000000000 +0200 +--- src/config.h.in 2013-02-26 14:18:19.000000000 +0100 +*************** +*** 439,441 **** +--- 439,444 ---- + + /* Define if fcntl()'s F_SETFD command knows about FD_CLOEXEC */ + #undef HAVE_FD_CLOEXEC ++ ++ /* Define if you want Cygwin to use the WIN32 clipboard, not compatible with X11*/ ++ #undef FEAT_CYGWIN_WIN32_CLIPBOARD +*** ../vim-7.3.835/src/configure.in 2013-02-06 19:49:37.000000000 +0100 +--- src/configure.in 2013-02-26 14:18:19.000000000 +0100 +*************** +*** 2474,2479 **** +--- 2474,2494 ---- + dnl end of GUI-checking + dnl --------------------------------------------------------------------------- + ++ dnl Check for Cygwin, which needs an extra source file if not using X11 ++ AC_MSG_CHECKING(for CYGWIN environment) ++ case `uname` in ++ CYGWIN*) CYGWIN=yes; AC_MSG_RESULT(yes) ++ AC_MSG_CHECKING(for CYGWIN clipboard support) ++ if test "x$with_x" = "xno" ; then ++ OS_EXTRA_SRC=winclip.c; OS_EXTRA_OBJ=objects/winclip.o ++ AC_MSG_RESULT(yes) ++ AC_DEFINE(FEAT_CYGWIN_WIN32_CLIPBOARD) ++ else ++ AC_MSG_RESULT(no - using X11) ++ fi ;; ++ ++ *) CYGWIN=no; AC_MSG_RESULT(no);; ++ esac + + dnl Only really enable hangul input when GUI and XFONTSET are available + if test "$enable_hangulinput" = "yes"; then +*** ../vim-7.3.835/src/auto/configure 2013-02-06 19:49:38.000000000 +0100 +--- src/auto/configure 2013-02-26 14:22:16.000000000 +0100 +*************** +*** 8846,8851 **** +--- 8846,8872 ---- + + + ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGWIN environment" >&5 ++ $as_echo_n "checking for CYGWIN environment... " >&6; } ++ case `uname` in ++ CYGWIN*) CYGWIN=yes; { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 ++ $as_echo "yes" >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGWIN clipboard support" >&5 ++ $as_echo_n "checking for CYGWIN clipboard support... " >&6; } ++ if test "x$with_x" = "xno" ; then ++ OS_EXTRA_SRC=winclip.c; OS_EXTRA_OBJ=objects/winclip.o ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 ++ $as_echo "yes" >&6; } ++ $as_echo "#define FEAT_CYGWIN_WIN32_CLIPBOARD 1" >>confdefs.h ++ ++ else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no - using X11" >&5 ++ $as_echo "no - using X11" >&6; } ++ fi ;; ++ ++ *) CYGWIN=no; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++ $as_echo "no" >&6; };; ++ esac + + if test "$enable_hangulinput" = "yes"; then + if test "x$GUITYPE" = "xNONE"; then +*** ../vim-7.3.835/src/feature.h 2013-02-14 22:11:31.000000000 +0100 +--- src/feature.h 2013-02-26 14:18:19.000000000 +0100 +*************** +*** 1129,1134 **** +--- 1129,1139 ---- + * +xterm_clipboard Unix only: Include code for handling the clipboard + * in an xterm like in the GUI. + */ ++ ++ #ifdef FEAT_CYGWIN_WIN32_CLIPBOARD ++ # define FEAT_CLIPBOARD ++ #endif ++ + #ifdef FEAT_GUI + # ifndef FEAT_CLIPBOARD + # define FEAT_CLIPBOARD +*** ../vim-7.3.835/src/globals.h 2012-08-23 18:43:06.000000000 +0200 +--- src/globals.h 2013-02-26 14:18:19.000000000 +0100 +*************** +*** 802,808 **** + EXTERN int enc_unicode INIT(= 0); /* 2: UCS-2 or UTF-16, 4: UCS-4 */ + EXTERN int enc_utf8 INIT(= FALSE); /* UTF-8 encoded Unicode */ + EXTERN int enc_latin1like INIT(= TRUE); /* 'encoding' is latin1 comp. */ +! # ifdef WIN3264 + /* Codepage nr of 'encoding'. Negative means it's not been set yet, zero + * means 'encoding' is not a valid codepage. */ + EXTERN int enc_codepage INIT(= -1); +--- 802,808 ---- + EXTERN int enc_unicode INIT(= 0); /* 2: UCS-2 or UTF-16, 4: UCS-4 */ + EXTERN int enc_utf8 INIT(= FALSE); /* UTF-8 encoded Unicode */ + EXTERN int enc_latin1like INIT(= TRUE); /* 'encoding' is latin1 comp. */ +! # if defined(WIN3264) || defined(FEAT_CYGWIN_WIN32_CLIPBOARD) + /* Codepage nr of 'encoding'. Negative means it's not been set yet, zero + * means 'encoding' is not a valid codepage. */ + EXTERN int enc_codepage INIT(= -1); +*** ../vim-7.3.835/src/mbyte.c 2013-02-13 16:49:54.000000000 +0100 +--- src/mbyte.c 2013-02-26 14:18:19.000000000 +0100 +*************** +*** 613,619 **** + enc_dbcs = enc_dbcs_new; + has_mbyte = (enc_dbcs != 0 || enc_utf8); + +! #ifdef WIN3264 + enc_codepage = encname2codepage(p_enc); + enc_latin9 = (STRCMP(p_enc, "iso-8859-15") == 0); + #endif +--- 613,619 ---- + enc_dbcs = enc_dbcs_new; + has_mbyte = (enc_dbcs != 0 || enc_utf8); + +! #if defined(WIN3264) || defined(FEAT_CYGWIN_WIN32_CLIPBOARD) + enc_codepage = encname2codepage(p_enc); + enc_latin9 = (STRCMP(p_enc, "iso-8859-15") == 0); + #endif +*************** +*** 4089,4095 **** + return enc_canonize((char_u *)buf); + } + +! #if defined(WIN3264) || defined(PROTO) + /* + * Convert an encoding name to an MS-Windows codepage. + * Returns zero if no codepage can be figured out. +--- 4089,4095 ---- + return enc_canonize((char_u *)buf); + } + +! #if defined(WIN3264) || defined(PROTO) || defined(FEAT_CYGWIN_WIN32_CLIPBOARD) + /* + * Convert an encoding name to an MS-Windows codepage. + * Returns zero if no codepage can be figured out. +*** ../vim-7.3.835/src/os_mswin.c 2012-11-20 16:53:34.000000000 +0100 +--- src/os_mswin.c 2013-02-26 14:18:19.000000000 +0100 +*************** +*** 905,1640 **** + } + #endif + +- #if defined(FEAT_MBYTE) || defined(PROTO) +- /* +- * Convert an UTF-8 string to UTF-16. +- * "instr[inlen]" is the input. "inlen" is in bytes. +- * When "outstr" is NULL only return the number of UTF-16 words produced. +- * Otherwise "outstr" must be a buffer of sufficient size. +- * Returns the number of UTF-16 words produced. +- */ +- int +- utf8_to_utf16(char_u *instr, int inlen, short_u *outstr, int *unconvlenp) +- { +- int outlen = 0; +- char_u *p = instr; +- int todo = inlen; +- int l; +- int ch; +- +- while (todo > 0) +- { +- /* Only convert if we have a complete sequence. */ +- l = utf_ptr2len_len(p, todo); +- if (l > todo) +- { +- /* Return length of incomplete sequence. */ +- if (unconvlenp != NULL) +- *unconvlenp = todo; +- break; +- } +- +- ch = utf_ptr2char(p); +- if (ch >= 0x10000) +- { +- /* non-BMP character, encoding with surrogate pairs */ +- ++outlen; +- if (outstr != NULL) +- { +- *outstr++ = (0xD800 - (0x10000 >> 10)) + (ch >> 10); +- *outstr++ = 0xDC00 | (ch & 0x3FF); +- } +- } +- else if (outstr != NULL) +- *outstr++ = ch; +- ++outlen; +- p += l; +- todo -= l; +- } +- +- return outlen; +- } +- +- /* +- * Convert an UTF-16 string to UTF-8. +- * The input is "instr[inlen]" with "inlen" in number of UTF-16 words. +- * When "outstr" is NULL only return the required number of bytes. +- * Otherwise "outstr" must be a buffer of sufficient size. +- * Return the number of bytes produced. +- */ +- int +- utf16_to_utf8(short_u *instr, int inlen, char_u *outstr) +- { +- int outlen = 0; +- int todo = inlen; +- short_u *p = instr; +- int l; +- int ch, ch2; +- +- while (todo > 0) +- { +- ch = *p; +- if (ch >= 0xD800 && ch <= 0xDBFF && todo > 1) +- { +- /* surrogate pairs handling */ +- ch2 = p[1]; +- if (ch2 >= 0xDC00 && ch2 <= 0xDFFF) +- { +- ch = ((ch - 0xD800) << 10) + (ch2 & 0x3FF) + 0x10000; +- ++p; +- --todo; +- } +- } +- if (outstr != NULL) +- { +- l = utf_char2bytes(ch, outstr); +- outstr += l; +- } +- else +- l = utf_char2len(ch); +- ++p; +- outlen += l; +- --todo; +- } +- +- return outlen; +- } +- +- /* +- * Call MultiByteToWideChar() and allocate memory for the result. +- * Returns the result in "*out[*outlen]" with an extra zero appended. +- * "outlen" is in words. +- */ +- void +- MultiByteToWideChar_alloc(UINT cp, DWORD flags, +- LPCSTR in, int inlen, +- LPWSTR *out, int *outlen) +- { +- *outlen = MultiByteToWideChar(cp, flags, in, inlen, 0, 0); +- /* Add one one word to avoid a zero-length alloc(). */ +- *out = (LPWSTR)alloc(sizeof(WCHAR) * (*outlen + 1)); +- if (*out != NULL) +- { +- MultiByteToWideChar(cp, flags, in, inlen, *out, *outlen); +- (*out)[*outlen] = 0; +- } +- } +- +- /* +- * Call WideCharToMultiByte() and allocate memory for the result. +- * Returns the result in "*out[*outlen]" with an extra NUL appended. +- */ +- void +- WideCharToMultiByte_alloc(UINT cp, DWORD flags, +- LPCWSTR in, int inlen, +- LPSTR *out, int *outlen, +- LPCSTR def, LPBOOL useddef) +- { +- *outlen = WideCharToMultiByte(cp, flags, in, inlen, NULL, 0, def, useddef); +- /* Add one one byte to avoid a zero-length alloc(). */ +- *out = alloc((unsigned)*outlen + 1); +- if (*out != NULL) +- { +- WideCharToMultiByte(cp, flags, in, inlen, *out, *outlen, def, useddef); +- (*out)[*outlen] = 0; +- } +- } +- +- #endif /* FEAT_MBYTE */ +- +- #ifdef FEAT_CLIPBOARD +- /* +- * Clipboard stuff, for cutting and pasting text to other windows. +- */ +- +- /* Type used for the clipboard type of Vim's data. */ +- typedef struct +- { +- int type; /* MCHAR, MBLOCK or MLINE */ +- int txtlen; /* length of CF_TEXT in bytes */ +- int ucslen; /* length of CF_UNICODETEXT in words */ +- int rawlen; /* length of clip_star.format_raw, including encoding, +- excluding terminating NUL */ +- } VimClipType_t; +- +- /* +- * Make vim the owner of the current selection. Return OK upon success. +- */ +- /*ARGSUSED*/ +- int +- clip_mch_own_selection(VimClipboard *cbd) +- { +- /* +- * Never actually own the clipboard. If another application sets the +- * clipboard, we don't want to think that we still own it. +- */ +- return FAIL; +- } +- +- /* +- * Make vim NOT the owner of the current selection. +- */ +- /*ARGSUSED*/ +- void +- clip_mch_lose_selection(VimClipboard *cbd) +- { +- /* Nothing needs to be done here */ +- } +- +- /* +- * Copy "str[*size]" into allocated memory, changing CR-NL to NL. +- * Return the allocated result and the size in "*size". +- * Returns NULL when out of memory. +- */ +- static char_u * +- crnl_to_nl(const char_u *str, int *size) +- { +- int pos = 0; +- int str_len = *size; +- char_u *ret; +- char_u *retp; +- +- /* Avoid allocating zero bytes, it generates an error message. */ +- ret = lalloc((long_u)(str_len == 0 ? 1 : str_len), TRUE); +- if (ret != NULL) +- { +- retp = ret; +- for (pos = 0; pos < str_len; ++pos) +- { +- if (str[pos] == '\r' && str[pos + 1] == '\n') +- { +- ++pos; +- --(*size); +- } +- *retp++ = str[pos]; +- } +- } +- +- return ret; +- } +- +- /* +- * Wait for another process to Close the Clipboard. +- * Returns TRUE for success. +- */ +- static int +- vim_open_clipboard(void) +- { +- int delay = 10; +- +- while (!OpenClipboard(NULL)) +- { +- if (delay > 500) +- return FALSE; /* waited too long, give up */ +- Sleep(delay); +- delay *= 2; /* wait for 10, 20, 40, 80, etc. msec */ +- } +- return TRUE; +- } +- +- /* +- * Get the current selection and put it in the clipboard register. +- * +- * NOTE: Must use GlobalLock/Unlock here to ensure Win32s compatibility. +- * On NT/W95 the clipboard data is a fixed global memory object and +- * so its handle = its pointer. +- * On Win32s, however, co-operation with the Win16 system means that +- * the clipboard data is moveable and its handle is not a pointer at all, +- * so we can't just cast the return value of GetClipboardData to (char_u*). +- * +- */ +- void +- clip_mch_request_selection(VimClipboard *cbd) +- { +- VimClipType_t metadata = { -1, -1, -1, -1 }; +- HGLOBAL hMem = NULL; +- char_u *str = NULL; +- #if defined(FEAT_MBYTE) && defined(WIN3264) +- char_u *to_free = NULL; +- #endif +- #ifdef FEAT_MBYTE +- HGLOBAL rawh = NULL; +- #endif +- int str_size = 0; +- int maxlen; +- size_t n; +- +- /* +- * Don't pass GetActiveWindow() as an argument to OpenClipboard() because +- * then we can't paste back into the same window for some reason - webb. +- */ +- if (!vim_open_clipboard()) +- return; +- +- /* Check for vim's own clipboard format first. This only gets the type of +- * the data, still need to use CF_UNICODETEXT or CF_TEXT for the text. */ +- if (IsClipboardFormatAvailable(cbd->format)) +- { +- VimClipType_t *meta_p; +- HGLOBAL meta_h; +- +- /* We have metadata on the clipboard; try to get it. */ +- if ((meta_h = GetClipboardData(cbd->format)) != NULL +- && (meta_p = (VimClipType_t *)GlobalLock(meta_h)) != NULL) +- { +- /* The size of "VimClipType_t" changed, "rawlen" was added later. +- * Only copy what is available for backwards compatibility. */ +- n = sizeof(VimClipType_t); +- if (GlobalSize(meta_h) < n) +- n = GlobalSize(meta_h); +- memcpy(&metadata, meta_p, n); +- GlobalUnlock(meta_h); +- } +- } +- +- #ifdef FEAT_MBYTE +- /* Check for Vim's raw clipboard format first. This is used without +- * conversion, but only if 'encoding' matches. */ +- if (IsClipboardFormatAvailable(cbd->format_raw) +- && metadata.rawlen > (int)STRLEN(p_enc)) +- { +- /* We have raw data on the clipboard; try to get it. */ +- if ((rawh = GetClipboardData(cbd->format_raw)) != NULL) +- { +- char_u *rawp; +- +- rawp = (char_u *)GlobalLock(rawh); +- if (rawp != NULL && STRCMP(p_enc, rawp) == 0) +- { +- n = STRLEN(p_enc) + 1; +- str = rawp + n; +- str_size = (int)(metadata.rawlen - n); +- } +- else +- { +- GlobalUnlock(rawh); +- rawh = NULL; +- } +- } +- } +- if (str == NULL) +- { +- #endif +- +- #if defined(FEAT_MBYTE) && defined(WIN3264) +- /* Try to get the clipboard in Unicode if it's not an empty string. */ +- if (IsClipboardFormatAvailable(CF_UNICODETEXT) && metadata.ucslen != 0) +- { +- HGLOBAL hMemW; +- +- if ((hMemW = GetClipboardData(CF_UNICODETEXT)) != NULL) +- { +- WCHAR *hMemWstr = (WCHAR *)GlobalLock(hMemW); +- +- /* Use the length of our metadata if possible, but limit it to the +- * GlobalSize() for safety. */ +- maxlen = (int)(GlobalSize(hMemW) / sizeof(WCHAR)); +- if (metadata.ucslen >= 0) +- { +- if (metadata.ucslen > maxlen) +- str_size = maxlen; +- else +- str_size = metadata.ucslen; +- } +- else +- { +- for (str_size = 0; str_size < maxlen; ++str_size) +- if (hMemWstr[str_size] == NUL) +- break; +- } +- to_free = str = utf16_to_enc((short_u *)hMemWstr, &str_size); +- GlobalUnlock(hMemW); +- } +- } +- else +- #endif +- /* Get the clipboard in the Active codepage. */ +- if (IsClipboardFormatAvailable(CF_TEXT)) +- { +- if ((hMem = GetClipboardData(CF_TEXT)) != NULL) +- { +- str = (char_u *)GlobalLock(hMem); +- +- /* The length is either what our metadata says or the strlen(). +- * But limit it to the GlobalSize() for safety. */ +- maxlen = (int)GlobalSize(hMem); +- if (metadata.txtlen >= 0) +- { +- if (metadata.txtlen > maxlen) +- str_size = maxlen; +- else +- str_size = metadata.txtlen; +- } +- else +- { +- for (str_size = 0; str_size < maxlen; ++str_size) +- if (str[str_size] == NUL) +- break; +- } +- +- # if defined(FEAT_MBYTE) && defined(WIN3264) +- /* The text is in the active codepage. Convert to 'encoding', +- * going through UTF-16. */ +- acp_to_enc(str, str_size, &to_free, &maxlen); +- if (to_free != NULL) +- { +- str_size = maxlen; +- str = to_free; +- } +- # endif +- } +- } +- #ifdef FEAT_MBYTE +- } +- #endif +- +- if (str != NULL && *str != NUL) +- { +- char_u *temp_clipboard; +- +- /* If the type is not known detect it. */ +- if (metadata.type == -1) +- metadata.type = MAUTO; +- +- /* Translate into . */ +- temp_clipboard = crnl_to_nl(str, &str_size); +- if (temp_clipboard != NULL) +- { +- clip_yank_selection(metadata.type, temp_clipboard, str_size, cbd); +- vim_free(temp_clipboard); +- } +- } +- +- /* unlock the global object */ +- if (hMem != NULL) +- GlobalUnlock(hMem); +- #ifdef FEAT_MBYTE +- if (rawh != NULL) +- GlobalUnlock(rawh); +- #endif +- CloseClipboard(); +- #if defined(FEAT_MBYTE) && defined(WIN3264) +- vim_free(to_free); +- #endif +- } +- +- /* +- * Send the current selection to the clipboard. +- */ +- void +- clip_mch_set_selection(VimClipboard *cbd) +- { +- char_u *str = NULL; +- VimClipType_t metadata; +- long_u txtlen; +- HGLOBAL hMemRaw = NULL; +- HGLOBAL hMem = NULL; +- HGLOBAL hMemVim = NULL; +- # if defined(FEAT_MBYTE) && defined(WIN3264) +- HGLOBAL hMemW = NULL; +- # endif +- +- /* If the '*' register isn't already filled in, fill it in now */ +- cbd->owned = TRUE; +- clip_get_selection(cbd); +- cbd->owned = FALSE; +- +- /* Get the text to be put on the clipboard, with CR-LF. */ +- metadata.type = clip_convert_selection(&str, &txtlen, cbd); +- if (metadata.type < 0) +- return; +- metadata.txtlen = (int)txtlen; +- metadata.ucslen = 0; +- metadata.rawlen = 0; +- +- #ifdef FEAT_MBYTE +- /* Always set the raw bytes: 'encoding', NUL and the text. This is used +- * when copy/paste from/to Vim with the same 'encoding', so that illegal +- * bytes can also be copied and no conversion is needed. */ +- { +- LPSTR lpszMemRaw; +- +- metadata.rawlen = (int)(txtlen + STRLEN(p_enc) + 1); +- hMemRaw = (LPSTR)GlobalAlloc(GMEM_MOVEABLE | GMEM_DDESHARE, +- metadata.rawlen + 1); +- lpszMemRaw = (LPSTR)GlobalLock(hMemRaw); +- if (lpszMemRaw != NULL) +- { +- STRCPY(lpszMemRaw, p_enc); +- memcpy(lpszMemRaw + STRLEN(p_enc) + 1, str, txtlen + 1); +- GlobalUnlock(hMemRaw); +- } +- else +- metadata.rawlen = 0; +- } +- #endif +- +- # if defined(FEAT_MBYTE) && defined(WIN3264) +- { +- WCHAR *out; +- int len = metadata.txtlen; +- +- /* Convert the text to UTF-16. This is put on the clipboard as +- * CF_UNICODETEXT. */ +- out = (WCHAR *)enc_to_utf16(str, &len); +- if (out != NULL) +- { +- WCHAR *lpszMemW; +- +- /* Convert the text for CF_TEXT to Active codepage. Otherwise it's +- * p_enc, which has no relation to the Active codepage. */ +- metadata.txtlen = WideCharToMultiByte(GetACP(), 0, out, len, +- NULL, 0, 0, 0); +- vim_free(str); +- str = (char_u *)alloc((unsigned)(metadata.txtlen == 0 ? 1 +- : metadata.txtlen)); +- if (str == NULL) +- { +- vim_free(out); +- return; /* out of memory */ +- } +- WideCharToMultiByte(GetACP(), 0, out, len, +- str, metadata.txtlen, 0, 0); +- +- /* Allocate memory for the UTF-16 text, add one NUL word to +- * terminate the string. */ +- hMemW = (LPSTR)GlobalAlloc(GMEM_MOVEABLE | GMEM_DDESHARE, +- (len + 1) * sizeof(WCHAR)); +- lpszMemW = (WCHAR *)GlobalLock(hMemW); +- if (lpszMemW != NULL) +- { +- memcpy(lpszMemW, out, len * sizeof(WCHAR)); +- lpszMemW[len] = NUL; +- GlobalUnlock(hMemW); +- } +- vim_free(out); +- metadata.ucslen = len; +- } +- } +- # endif +- +- /* Allocate memory for the text, add one NUL byte to terminate the string. +- */ +- hMem = GlobalAlloc(GMEM_MOVEABLE | GMEM_DDESHARE, metadata.txtlen + 1); +- { +- LPSTR lpszMem = (LPSTR)GlobalLock(hMem); +- +- if (lpszMem) +- { +- vim_strncpy(lpszMem, str, metadata.txtlen); +- GlobalUnlock(hMem); +- } +- } +- +- /* Set up metadata: */ +- { +- VimClipType_t *lpszMemVim = NULL; +- +- hMemVim = GlobalAlloc(GMEM_MOVEABLE|GMEM_DDESHARE, +- sizeof(VimClipType_t)); +- lpszMemVim = (VimClipType_t *)GlobalLock(hMemVim); +- memcpy(lpszMemVim, &metadata, sizeof(metadata)); +- GlobalUnlock(hMemVim); +- } +- +- /* +- * Open the clipboard, clear it and put our text on it. +- * Always set our Vim format. Put Unicode and plain text on it. +- * +- * Don't pass GetActiveWindow() as an argument to OpenClipboard() +- * because then we can't paste back into the same window for some +- * reason - webb. +- */ +- if (vim_open_clipboard()) +- { +- if (EmptyClipboard()) +- { +- SetClipboardData(cbd->format, hMemVim); +- hMemVim = 0; +- # if defined(FEAT_MBYTE) && defined(WIN3264) +- if (hMemW != NULL) +- { +- if (SetClipboardData(CF_UNICODETEXT, hMemW) != NULL) +- hMemW = NULL; +- } +- # endif +- /* Always use CF_TEXT. On Win98 Notepad won't obtain the +- * CF_UNICODETEXT text, only CF_TEXT. */ +- SetClipboardData(CF_TEXT, hMem); +- hMem = 0; +- } +- CloseClipboard(); +- } +- +- vim_free(str); +- /* Free any allocations we didn't give to the clipboard: */ +- if (hMemRaw) +- GlobalFree(hMemRaw); +- if (hMem) +- GlobalFree(hMem); +- # if defined(FEAT_MBYTE) && defined(WIN3264) +- if (hMemW) +- GlobalFree(hMemW); +- # endif +- if (hMemVim) +- GlobalFree(hMemVim); +- } +- +- #endif /* FEAT_CLIPBOARD */ +- +- #if defined(FEAT_MBYTE) || defined(PROTO) +- /* +- * Note: the following two functions are only guaranteed to work when using +- * valid MS-Windows codepages or when iconv() is available. +- */ +- +- /* +- * Convert "str" from 'encoding' to UTF-16. +- * Input in "str" with length "*lenp". When "lenp" is NULL, use strlen(). +- * Output is returned as an allocated string. "*lenp" is set to the length of +- * the result. A trailing NUL is always added. +- * Returns NULL when out of memory. +- */ +- short_u * +- enc_to_utf16(char_u *str, int *lenp) +- { +- vimconv_T conv; +- WCHAR *ret; +- char_u *allocbuf = NULL; +- int len_loc; +- int length; +- +- if (lenp == NULL) +- { +- len_loc = (int)STRLEN(str) + 1; +- lenp = &len_loc; +- } +- +- if (enc_codepage > 0) +- { +- /* We can do any CP### -> UTF-16 in one pass, and we can do it +- * without iconv() (convert_* may need iconv). */ +- MultiByteToWideChar_alloc(enc_codepage, 0, str, *lenp, &ret, &length); +- } +- else +- { +- /* Use "latin1" by default, we might be called before we have p_enc +- * set up. Convert to utf-8 first, works better with iconv(). Does +- * nothing if 'encoding' is "utf-8". */ +- conv.vc_type = CONV_NONE; +- if (convert_setup(&conv, p_enc ? p_enc : (char_u *)"latin1", +- (char_u *)"utf-8") == FAIL) +- return NULL; +- if (conv.vc_type != CONV_NONE) +- { +- str = allocbuf = string_convert(&conv, str, lenp); +- if (str == NULL) +- return NULL; +- } +- convert_setup(&conv, NULL, NULL); +- +- length = utf8_to_utf16(str, *lenp, NULL, NULL); +- ret = (WCHAR *)alloc((unsigned)((length + 1) * sizeof(WCHAR))); +- if (ret != NULL) +- { +- utf8_to_utf16(str, *lenp, (short_u *)ret, NULL); +- ret[length] = 0; +- } +- +- vim_free(allocbuf); +- } +- +- *lenp = length; +- return (short_u *)ret; +- } +- +- /* +- * Convert an UTF-16 string to 'encoding'. +- * Input in "str" with length (counted in wide characters) "*lenp". When +- * "lenp" is NULL, use wcslen(). +- * Output is returned as an allocated string. If "*lenp" is not NULL it is +- * set to the length of the result. +- * Returns NULL when out of memory. +- */ +- char_u * +- utf16_to_enc(short_u *str, int *lenp) +- { +- vimconv_T conv; +- char_u *utf8_str = NULL, *enc_str = NULL; +- int len_loc; +- +- if (lenp == NULL) +- { +- len_loc = (int)wcslen(str) + 1; +- lenp = &len_loc; +- } +- +- if (enc_codepage > 0) +- { +- /* We can do any UTF-16 -> CP### in one pass. */ +- int length; +- +- WideCharToMultiByte_alloc(enc_codepage, 0, str, *lenp, +- (LPSTR *)&enc_str, &length, 0, 0); +- *lenp = length; +- return enc_str; +- } +- +- /* Avoid allocating zero bytes, it generates an error message. */ +- utf8_str = alloc(utf16_to_utf8(str, *lenp == 0 ? 1 : *lenp, NULL)); +- if (utf8_str != NULL) +- { +- *lenp = utf16_to_utf8(str, *lenp, utf8_str); +- +- /* We might be called before we have p_enc set up. */ +- conv.vc_type = CONV_NONE; +- convert_setup(&conv, (char_u *)"utf-8", +- p_enc? p_enc: (char_u *)"latin1"); +- if (conv.vc_type == CONV_NONE) +- { +- /* p_enc is utf-8, so we're done. */ +- enc_str = utf8_str; +- } +- else +- { +- enc_str = string_convert(&conv, utf8_str, lenp); +- vim_free(utf8_str); +- } +- +- convert_setup(&conv, NULL, NULL); +- } +- +- return enc_str; +- } +- #endif /* FEAT_MBYTE */ +- +- #if (defined(FEAT_MBYTE) && defined(WIN3264)) || defined(PROTO) +- /* +- * Convert from the active codepage to 'encoding'. +- * Input is "str[str_size]". +- * The result is in allocated memory: "out[outlen]". With terminating NUL. +- */ +- void +- acp_to_enc(str, str_size, out, outlen) +- char_u *str; +- int str_size; +- char_u **out; +- int *outlen; +- +- { +- LPWSTR widestr; +- +- MultiByteToWideChar_alloc(GetACP(), 0, str, str_size, &widestr, outlen); +- if (widestr != NULL) +- { +- ++*outlen; /* Include the 0 after the string */ +- *out = utf16_to_enc((short_u *)widestr, outlen); +- vim_free(widestr); +- } +- } +- #endif +- +- + /* + * Debugging helper: expose the MCH_WRITE_DUMP stuff to other modules + */ +--- 905,910 ---- +*** ../vim-7.3.835/src/os_unix.c 2013-01-30 14:55:35.000000000 +0100 +--- src/os_unix.c 2013-02-26 14:31:32.000000000 +0100 +*************** +*** 61,66 **** +--- 61,71 ---- + # include + # include /* for cygwin_conv_to_posix_path() and/or + * for cygwin_conv_path() */ ++ # ifdef FEAT_CYGWIN_WIN32_CLIPBOARD ++ # define WIN32_LEAN_AND_MEAN ++ # include ++ # include "winclip.pro" ++ # endif + # endif + #endif + +*************** +*** 1223,1228 **** +--- 1228,1236 ---- + #ifdef MACOS_CONVERT + mac_conv_init(); + #endif ++ #ifdef FEAT_CYGWIN_WIN32_CLIPBOARD ++ win_clip_init(); ++ #endif + } + + static void +*** ../vim-7.3.835/src/os_win32.c 2013-02-13 16:49:54.000000000 +0100 +--- src/os_win32.c 2013-02-26 14:18:19.000000000 +0100 +*************** +*** 1851,1866 **** + set_option_value((char_u *)"grepprg", 0, (char_u *)"grep -n", 0); + + #ifdef FEAT_CLIPBOARD +! clip_init(TRUE); +! +! /* +! * Vim's own clipboard format recognises whether the text is char, line, +! * or rectangular block. Only useful for copying between two Vims. +! * "VimClipboard" was used for previous versions, using the first +! * character to specify MCHAR, MLINE or MBLOCK. +! */ +! clip_star.format = RegisterClipboardFormat("VimClipboard2"); +! clip_star.format_raw = RegisterClipboardFormat("VimRawBytes"); + #endif + } + +--- 1851,1857 ---- + set_option_value((char_u *)"grepprg", 0, (char_u *)"grep -n", 0); + + #ifdef FEAT_CLIPBOARD +! win_clip_init(); + #endif + } + +*************** +*** 2345,2360 **** + #endif + + #ifdef FEAT_CLIPBOARD +! clip_init(TRUE); +! +! /* +! * Vim's own clipboard format recognises whether the text is char, line, or +! * rectangular block. Only useful for copying between two Vims. +! * "VimClipboard" was used for previous versions, using the first +! * character to specify MCHAR, MLINE or MBLOCK. +! */ +! clip_star.format = RegisterClipboardFormat("VimClipboard2"); +! clip_star.format_raw = RegisterClipboardFormat("VimRawBytes"); + #endif + + /* This will be NULL on anything but NT 4.0 */ +--- 2336,2342 ---- + #endif + + #ifdef FEAT_CLIPBOARD +! win_clip_init(); + #endif + + /* This will be NULL on anything but NT 4.0 */ +*** ../vim-7.3.835/src/proto.h 2011-05-10 16:41:13.000000000 +0200 +--- src/proto.h 2013-02-26 14:18:19.000000000 +0100 +*************** +*** 47,56 **** +--- 47,58 ---- + typedef int LPBOOL; + # include "os_win16.pro" + # include "os_mswin.pro" ++ # include "winclip.pro" + # endif + # ifdef WIN3264 + # include "os_win32.pro" + # include "os_mswin.pro" ++ # include "winclip.pro" + # if (defined(__GNUC__) && !defined(__MINGW32__)) \ + || (defined(__BORLANDC__) && __BORLANDC__ < 0x502) + extern int _stricoll __ARGS((char *a, char *b)); +*** ../vim-7.3.835/src/proto/os_mswin.pro 2012-11-20 16:56:49.000000000 +0100 +--- src/proto/os_mswin.pro 2013-02-26 14:18:19.000000000 +0100 +*************** +*** 22,38 **** + int can_end_termcap_mode __ARGS((int give_msg)); + int mch_screenmode __ARGS((char_u *arg)); + int mch_libcall __ARGS((char_u *libname, char_u *funcname, char_u *argstring, int argint, char_u **string_result, int *number_result)); +- int utf8_to_utf16 __ARGS((char_u *instr, int inlen, short_u *outstr, int *unconvlenp)); +- int utf16_to_utf8 __ARGS((short_u *instr, int inlen, char_u *outstr)); +- void MultiByteToWideChar_alloc __ARGS((UINT cp, DWORD flags, LPCSTR in, int inlen, LPWSTR *out, int *outlen)); +- void WideCharToMultiByte_alloc __ARGS((UINT cp, DWORD flags, LPCWSTR in, int inlen, LPSTR *out, int *outlen, LPCSTR def, LPBOOL useddef)); +- int clip_mch_own_selection __ARGS((VimClipboard *cbd)); +- void clip_mch_lose_selection __ARGS((VimClipboard *cbd)); +- void clip_mch_request_selection __ARGS((VimClipboard *cbd)); +- void clip_mch_set_selection __ARGS((VimClipboard *cbd)); +- 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 DumpPutS __ARGS((const char *psz)); + int mch_get_winpos __ARGS((int *x, int *y)); + void mch_set_winpos __ARGS((int x, int y)); +--- 22,27 ---- +*** ../vim-7.3.835/src/proto/winclip.pro 2013-02-26 14:55:20.000000000 +0100 +--- src/proto/winclip.pro 2013-02-26 14:32:52.000000000 +0100 +*************** +*** 0 **** +--- 1,14 ---- ++ /* winclip.c */ ++ int utf8_to_utf16 __ARGS((char_u *instr, int inlen, short_u *outstr, int *unconvlenp)); ++ int utf16_to_utf8 __ARGS((short_u *instr, int inlen, char_u *outstr)); ++ void MultiByteToWideChar_alloc __ARGS((UINT cp, DWORD flags, LPCSTR in, int inlen, LPWSTR *out, int *outlen)); ++ void WideCharToMultiByte_alloc __ARGS((UINT cp, DWORD flags, LPCWSTR in, int inlen, LPSTR *out, int *outlen, LPCSTR def, LPBOOL useddef)); ++ void win_clip_init __ARGS((void)); ++ int clip_mch_own_selection __ARGS((VimClipboard *cbd)); ++ void clip_mch_lose_selection __ARGS((VimClipboard *cbd)); ++ void clip_mch_request_selection __ARGS((VimClipboard *cbd)); ++ void clip_mch_set_selection __ARGS((VimClipboard *cbd)); ++ 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)); ++ /* vim: set ft=c : */ +*** ../vim-7.3.835/src/term.c 2013-02-13 15:53:15.000000000 +0100 +--- src/term.c 2013-02-26 14:18:19.000000000 +0100 +*************** +*** 1853,1859 **** +--- 1853,1861 ---- + # ifdef FEAT_GUI + if (!gui.in_use) + # endif ++ # ifndef FEAT_CYGWIN_WIN32_CLIPBOARD + clip_init(FALSE); ++ # endif + # endif + if (use_xterm_like_mouse(term)) + { +*** ../vim-7.3.835/src/vim.h 2013-01-17 17:17:21.000000000 +0100 +--- src/vim.h 2013-02-26 14:18:19.000000000 +0100 +*************** +*** 1927,1933 **** + GdkAtom gtk_sel_atom; /* PRIMARY/CLIPBOARD selection ID */ + # endif + +! # ifdef MSWIN + int_u format; /* Vim's own special clipboard format */ + int_u format_raw; /* Vim's raw text clipboard format */ + # endif +--- 1927,1933 ---- + GdkAtom gtk_sel_atom; /* PRIMARY/CLIPBOARD selection ID */ + # endif + +! # if defined(MSWIN) || defined(FEAT_CYGWIN_WIN32_CLIPBOARD) + int_u format; /* Vim's own special clipboard format */ + int_u format_raw; /* Vim's raw text clipboard format */ + # endif +*** ../vim-7.3.835/src/winclip.c 2013-02-26 14:55:20.000000000 +0100 +--- src/winclip.c 2013-02-26 14:32:42.000000000 +0100 +*************** +*** 0 **** +--- 1,798 ---- ++ /* 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. ++ */ ++ ++ /* ++ * winclip.c ++ * ++ * Routines common to both Win16 and Win32 for clipboard handling. ++ * Also used by Cygwin, using os_unix.c. ++ */ ++ ++ #ifdef WIN16 ++ # ifdef __BORLANDC__ ++ # pragma warn -par ++ # pragma warn -ucp ++ # pragma warn -use ++ # pragma warn -aus ++ # endif ++ #endif ++ ++ #include "vimio.h" ++ #include "vim.h" ++ ++ /* ++ * Compile only the clipboard handling features when compiling for cygwin ++ * posix environment. ++ */ ++ #ifdef FEAT_CYGWIN_WIN32_CLIPBOARD ++ # define WIN3264 ++ # define WIN32_LEAN_AND_MEAN ++ # include ++ # include "winclip.pro" ++ #endif ++ ++ /* ++ * When generating prototypes for Win32 on Unix, these lines make the syntax ++ * errors disappear. They do not need to be correct. ++ */ ++ #ifdef PROTO ++ #define WINAPI ++ #define WINBASEAPI ++ typedef int DWORD; ++ typedef int LPBOOL; ++ typedef int LPCSTR; ++ typedef int LPCWSTR; ++ typedef int LPSTR; ++ typedef int LPWSTR; ++ typedef int UINT; ++ #endif ++ ++ #if defined(FEAT_MBYTE) || defined(PROTO) ++ /* ++ * Convert an UTF-8 string to UTF-16. ++ * "instr[inlen]" is the input. "inlen" is in bytes. ++ * When "outstr" is NULL only return the number of UTF-16 words produced. ++ * Otherwise "outstr" must be a buffer of sufficient size. ++ * Returns the number of UTF-16 words produced. ++ */ ++ int ++ utf8_to_utf16(char_u *instr, int inlen, short_u *outstr, int *unconvlenp) ++ { ++ int outlen = 0; ++ char_u *p = instr; ++ int todo = inlen; ++ int l; ++ int ch; ++ ++ while (todo > 0) ++ { ++ /* Only convert if we have a complete sequence. */ ++ l = utf_ptr2len_len(p, todo); ++ if (l > todo) ++ { ++ /* Return length of incomplete sequence. */ ++ if (unconvlenp != NULL) ++ *unconvlenp = todo; ++ break; ++ } ++ ++ ch = utf_ptr2char(p); ++ if (ch >= 0x10000) ++ { ++ /* non-BMP character, encoding with surrogate pairs */ ++ ++outlen; ++ if (outstr != NULL) ++ { ++ *outstr++ = (0xD800 - (0x10000 >> 10)) + (ch >> 10); ++ *outstr++ = 0xDC00 | (ch & 0x3FF); ++ } ++ } ++ else if (outstr != NULL) ++ *outstr++ = ch; ++ ++outlen; ++ p += l; ++ todo -= l; ++ } ++ ++ return outlen; ++ } ++ ++ /* ++ * Convert an UTF-16 string to UTF-8. ++ * The input is "instr[inlen]" with "inlen" in number of UTF-16 words. ++ * When "outstr" is NULL only return the required number of bytes. ++ * Otherwise "outstr" must be a buffer of sufficient size. ++ * Return the number of bytes produced. ++ */ ++ int ++ utf16_to_utf8(short_u *instr, int inlen, char_u *outstr) ++ { ++ int outlen = 0; ++ int todo = inlen; ++ short_u *p = instr; ++ int l; ++ int ch, ch2; ++ ++ while (todo > 0) ++ { ++ ch = *p; ++ if (ch >= 0xD800 && ch <= 0xDBFF && todo > 1) ++ { ++ /* surrogate pairs handling */ ++ ch2 = p[1]; ++ if (ch2 >= 0xDC00 && ch2 <= 0xDFFF) ++ { ++ ch = ((ch - 0xD800) << 10) + (ch2 & 0x3FF) + 0x10000; ++ ++p; ++ --todo; ++ } ++ } ++ if (outstr != NULL) ++ { ++ l = utf_char2bytes(ch, outstr); ++ outstr += l; ++ } ++ else ++ l = utf_char2len(ch); ++ ++p; ++ outlen += l; ++ --todo; ++ } ++ ++ return outlen; ++ } ++ ++ /* ++ * Call MultiByteToWideChar() and allocate memory for the result. ++ * Returns the result in "*out[*outlen]" with an extra zero appended. ++ * "outlen" is in words. ++ */ ++ void ++ MultiByteToWideChar_alloc(UINT cp, DWORD flags, ++ LPCSTR in, int inlen, ++ LPWSTR *out, int *outlen) ++ { ++ *outlen = MultiByteToWideChar(cp, flags, in, inlen, 0, 0); ++ /* Add one one word to avoid a zero-length alloc(). */ ++ *out = (LPWSTR)alloc(sizeof(WCHAR) * (*outlen + 1)); ++ if (*out != NULL) ++ { ++ MultiByteToWideChar(cp, flags, in, inlen, *out, *outlen); ++ (*out)[*outlen] = 0; ++ } ++ } ++ ++ /* ++ * Call WideCharToMultiByte() and allocate memory for the result. ++ * Returns the result in "*out[*outlen]" with an extra NUL appended. ++ */ ++ void ++ WideCharToMultiByte_alloc(UINT cp, DWORD flags, ++ LPCWSTR in, int inlen, ++ LPSTR *out, int *outlen, ++ LPCSTR def, LPBOOL useddef) ++ { ++ *outlen = WideCharToMultiByte(cp, flags, in, inlen, NULL, 0, def, useddef); ++ /* Add one one byte to avoid a zero-length alloc(). */ ++ *out = alloc((unsigned)*outlen + 1); ++ if (*out != NULL) ++ { ++ WideCharToMultiByte(cp, flags, in, inlen, *out, *outlen, def, useddef); ++ (*out)[*outlen] = 0; ++ } ++ } ++ ++ #endif /* FEAT_MBYTE */ ++ ++ #ifdef FEAT_CLIPBOARD ++ /* ++ * Clipboard stuff, for cutting and pasting text to other windows. ++ */ ++ ++ void ++ win_clip_init(void) ++ { ++ clip_init(TRUE); ++ ++ /* ++ * Vim's own clipboard format recognises whether the text is char, line, ++ * or rectangular block. Only useful for copying between two Vims. ++ * "VimClipboard" was used for previous versions, using the first ++ * character to specify MCHAR, MLINE or MBLOCK. ++ */ ++ clip_star.format = RegisterClipboardFormat("VimClipboard2"); ++ clip_star.format_raw = RegisterClipboardFormat("VimRawBytes"); ++ } ++ ++ /* Type used for the clipboard type of Vim's data. */ ++ typedef struct ++ { ++ int type; /* MCHAR, MBLOCK or MLINE */ ++ int txtlen; /* length of CF_TEXT in bytes */ ++ int ucslen; /* length of CF_UNICODETEXT in words */ ++ int rawlen; /* length of clip_star.format_raw, including encoding, ++ excluding terminating NUL */ ++ } VimClipType_t; ++ ++ /* ++ * Make vim the owner of the current selection. Return OK upon success. ++ */ ++ /*ARGSUSED*/ ++ int ++ clip_mch_own_selection(VimClipboard *cbd) ++ { ++ /* ++ * Never actually own the clipboard. If another application sets the ++ * clipboard, we don't want to think that we still own it. ++ */ ++ return FAIL; ++ } ++ ++ /* ++ * Make vim NOT the owner of the current selection. ++ */ ++ /*ARGSUSED*/ ++ void ++ clip_mch_lose_selection(VimClipboard *cbd) ++ { ++ /* Nothing needs to be done here */ ++ } ++ ++ /* ++ * Copy "str[*size]" into allocated memory, changing CR-NL to NL. ++ * Return the allocated result and the size in "*size". ++ * Returns NULL when out of memory. ++ */ ++ static char_u * ++ crnl_to_nl(const char_u *str, int *size) ++ { ++ int pos = 0; ++ int str_len = *size; ++ char_u *ret; ++ char_u *retp; ++ ++ /* Avoid allocating zero bytes, it generates an error message. */ ++ ret = lalloc((long_u)(str_len == 0 ? 1 : str_len), TRUE); ++ if (ret != NULL) ++ { ++ retp = ret; ++ for (pos = 0; pos < str_len; ++pos) ++ { ++ if (str[pos] == '\r' && str[pos + 1] == '\n') ++ { ++ ++pos; ++ --(*size); ++ } ++ *retp++ = str[pos]; ++ } ++ } ++ ++ return ret; ++ } ++ ++ /* ++ * Wait for another process to Close the Clipboard. ++ * Returns TRUE for success. ++ */ ++ static int ++ vim_open_clipboard(void) ++ { ++ int delay = 10; ++ ++ while (!OpenClipboard(NULL)) ++ { ++ if (delay > 500) ++ return FALSE; /* waited too long, give up */ ++ Sleep(delay); ++ delay *= 2; /* wait for 10, 20, 40, 80, etc. msec */ ++ } ++ return TRUE; ++ } ++ ++ /* ++ * Get the current selection and put it in the clipboard register. ++ * ++ * NOTE: Must use GlobalLock/Unlock here to ensure Win32s compatibility. ++ * On NT/W95 the clipboard data is a fixed global memory object and ++ * so its handle = its pointer. ++ * On Win32s, however, co-operation with the Win16 system means that ++ * the clipboard data is moveable and its handle is not a pointer at all, ++ * so we can't just cast the return value of GetClipboardData to (char_u*). ++ * ++ */ ++ void ++ clip_mch_request_selection(VimClipboard *cbd) ++ { ++ VimClipType_t metadata = { -1, -1, -1, -1 }; ++ HGLOBAL hMem = NULL; ++ char_u *str = NULL; ++ #if defined(FEAT_MBYTE) && defined(WIN3264) ++ char_u *to_free = NULL; ++ #endif ++ #ifdef FEAT_MBYTE ++ HGLOBAL rawh = NULL; ++ #endif ++ int str_size = 0; ++ int maxlen; ++ size_t n; ++ ++ /* ++ * Don't pass GetActiveWindow() as an argument to OpenClipboard() because ++ * then we can't paste back into the same window for some reason - webb. ++ */ ++ if (!vim_open_clipboard()) ++ return; ++ ++ /* Check for vim's own clipboard format first. This only gets the type of ++ * the data, still need to use CF_UNICODETEXT or CF_TEXT for the text. */ ++ if (IsClipboardFormatAvailable(cbd->format)) ++ { ++ VimClipType_t *meta_p; ++ HGLOBAL meta_h; ++ ++ /* We have metadata on the clipboard; try to get it. */ ++ if ((meta_h = GetClipboardData(cbd->format)) != NULL ++ && (meta_p = (VimClipType_t *)GlobalLock(meta_h)) != NULL) ++ { ++ /* The size of "VimClipType_t" changed, "rawlen" was added later. ++ * Only copy what is available for backwards compatibility. */ ++ n = sizeof(VimClipType_t); ++ if (GlobalSize(meta_h) < n) ++ n = GlobalSize(meta_h); ++ memcpy(&metadata, meta_p, n); ++ GlobalUnlock(meta_h); ++ } ++ } ++ ++ #ifdef FEAT_MBYTE ++ /* Check for Vim's raw clipboard format first. This is used without ++ * conversion, but only if 'encoding' matches. */ ++ if (IsClipboardFormatAvailable(cbd->format_raw) ++ && metadata.rawlen > (int)STRLEN(p_enc)) ++ { ++ /* We have raw data on the clipboard; try to get it. */ ++ if ((rawh = GetClipboardData(cbd->format_raw)) != NULL) ++ { ++ char_u *rawp; ++ ++ rawp = (char_u *)GlobalLock(rawh); ++ if (rawp != NULL && STRCMP(p_enc, rawp) == 0) ++ { ++ n = STRLEN(p_enc) + 1; ++ str = rawp + n; ++ str_size = (int)(metadata.rawlen - n); ++ } ++ else ++ { ++ GlobalUnlock(rawh); ++ rawh = NULL; ++ } ++ } ++ } ++ if (str == NULL) ++ { ++ #endif ++ ++ #if defined(FEAT_MBYTE) && defined(WIN3264) ++ /* Try to get the clipboard in Unicode if it's not an empty string. */ ++ if (IsClipboardFormatAvailable(CF_UNICODETEXT) && metadata.ucslen != 0) ++ { ++ HGLOBAL hMemW; ++ ++ if ((hMemW = GetClipboardData(CF_UNICODETEXT)) != NULL) ++ { ++ WCHAR *hMemWstr = (WCHAR *)GlobalLock(hMemW); ++ ++ /* Use the length of our metadata if possible, but limit it to the ++ * GlobalSize() for safety. */ ++ maxlen = (int)(GlobalSize(hMemW) / sizeof(WCHAR)); ++ if (metadata.ucslen >= 0) ++ { ++ if (metadata.ucslen > maxlen) ++ str_size = maxlen; ++ else ++ str_size = metadata.ucslen; ++ } ++ else ++ { ++ for (str_size = 0; str_size < maxlen; ++str_size) ++ if (hMemWstr[str_size] == NUL) ++ break; ++ } ++ to_free = str = utf16_to_enc((short_u *)hMemWstr, &str_size); ++ GlobalUnlock(hMemW); ++ } ++ } ++ else ++ #endif ++ /* Get the clipboard in the Active codepage. */ ++ if (IsClipboardFormatAvailable(CF_TEXT)) ++ { ++ if ((hMem = GetClipboardData(CF_TEXT)) != NULL) ++ { ++ str = (char_u *)GlobalLock(hMem); ++ ++ /* The length is either what our metadata says or the strlen(). ++ * But limit it to the GlobalSize() for safety. */ ++ maxlen = (int)GlobalSize(hMem); ++ if (metadata.txtlen >= 0) ++ { ++ if (metadata.txtlen > maxlen) ++ str_size = maxlen; ++ else ++ str_size = metadata.txtlen; ++ } ++ else ++ { ++ for (str_size = 0; str_size < maxlen; ++str_size) ++ if (str[str_size] == NUL) ++ break; ++ } ++ ++ # if defined(FEAT_MBYTE) && defined(WIN3264) ++ /* The text is in the active codepage. Convert to 'encoding', ++ * going through UTF-16. */ ++ acp_to_enc(str, str_size, &to_free, &maxlen); ++ if (to_free != NULL) ++ { ++ str_size = maxlen; ++ str = to_free; ++ } ++ # endif ++ } ++ } ++ #ifdef FEAT_MBYTE ++ } ++ #endif ++ ++ if (str != NULL && *str != NUL) ++ { ++ char_u *temp_clipboard; ++ ++ /* If the type is not known detect it. */ ++ if (metadata.type == -1) ++ metadata.type = MAUTO; ++ ++ /* Translate into . */ ++ temp_clipboard = crnl_to_nl(str, &str_size); ++ if (temp_clipboard != NULL) ++ { ++ clip_yank_selection(metadata.type, temp_clipboard, str_size, cbd); ++ vim_free(temp_clipboard); ++ } ++ } ++ ++ /* unlock the global object */ ++ if (hMem != NULL) ++ GlobalUnlock(hMem); ++ #ifdef FEAT_MBYTE ++ if (rawh != NULL) ++ GlobalUnlock(rawh); ++ #endif ++ CloseClipboard(); ++ #if defined(FEAT_MBYTE) && defined(WIN3264) ++ vim_free(to_free); ++ #endif ++ } ++ ++ /* ++ * Send the current selection to the clipboard. ++ */ ++ void ++ clip_mch_set_selection(VimClipboard *cbd) ++ { ++ char_u *str = NULL; ++ VimClipType_t metadata; ++ long_u txtlen; ++ HGLOBAL hMemRaw = NULL; ++ HGLOBAL hMem = NULL; ++ HGLOBAL hMemVim = NULL; ++ # if defined(FEAT_MBYTE) && defined(WIN3264) ++ HGLOBAL hMemW = NULL; ++ # endif ++ ++ /* If the '*' register isn't already filled in, fill it in now */ ++ cbd->owned = TRUE; ++ clip_get_selection(cbd); ++ cbd->owned = FALSE; ++ ++ /* Get the text to be put on the clipboard, with CR-LF. */ ++ metadata.type = clip_convert_selection(&str, &txtlen, cbd); ++ if (metadata.type < 0) ++ return; ++ metadata.txtlen = (int)txtlen; ++ metadata.ucslen = 0; ++ metadata.rawlen = 0; ++ ++ #ifdef FEAT_MBYTE ++ /* Always set the raw bytes: 'encoding', NUL and the text. This is used ++ * when copy/paste from/to Vim with the same 'encoding', so that illegal ++ * bytes can also be copied and no conversion is needed. */ ++ { ++ LPSTR lpszMemRaw; ++ ++ metadata.rawlen = (int)(txtlen + STRLEN(p_enc) + 1); ++ hMemRaw = (LPSTR)GlobalAlloc(GMEM_MOVEABLE | GMEM_DDESHARE, ++ metadata.rawlen + 1); ++ lpszMemRaw = (LPSTR)GlobalLock(hMemRaw); ++ if (lpszMemRaw != NULL) ++ { ++ STRCPY(lpszMemRaw, p_enc); ++ memcpy(lpszMemRaw + STRLEN(p_enc) + 1, str, txtlen + 1); ++ GlobalUnlock(hMemRaw); ++ } ++ else ++ metadata.rawlen = 0; ++ } ++ #endif ++ ++ # if defined(FEAT_MBYTE) && defined(WIN3264) ++ { ++ WCHAR *out; ++ int len = metadata.txtlen; ++ ++ /* Convert the text to UTF-16. This is put on the clipboard as ++ * CF_UNICODETEXT. */ ++ out = (WCHAR *)enc_to_utf16(str, &len); ++ if (out != NULL) ++ { ++ WCHAR *lpszMemW; ++ ++ /* Convert the text for CF_TEXT to Active codepage. Otherwise it's ++ * p_enc, which has no relation to the Active codepage. */ ++ metadata.txtlen = WideCharToMultiByte(GetACP(), 0, out, len, ++ NULL, 0, 0, 0); ++ vim_free(str); ++ str = (char_u *)alloc((unsigned)(metadata.txtlen == 0 ? 1 ++ : metadata.txtlen)); ++ if (str == NULL) ++ { ++ vim_free(out); ++ return; /* out of memory */ ++ } ++ WideCharToMultiByte(GetACP(), 0, out, len, ++ str, metadata.txtlen, 0, 0); ++ ++ /* Allocate memory for the UTF-16 text, add one NUL word to ++ * terminate the string. */ ++ hMemW = (LPSTR)GlobalAlloc(GMEM_MOVEABLE | GMEM_DDESHARE, ++ (len + 1) * sizeof(WCHAR)); ++ lpszMemW = (WCHAR *)GlobalLock(hMemW); ++ if (lpszMemW != NULL) ++ { ++ memcpy(lpszMemW, out, len * sizeof(WCHAR)); ++ lpszMemW[len] = NUL; ++ GlobalUnlock(hMemW); ++ } ++ vim_free(out); ++ metadata.ucslen = len; ++ } ++ } ++ # endif ++ ++ /* Allocate memory for the text, add one NUL byte to terminate the string. ++ */ ++ hMem = GlobalAlloc(GMEM_MOVEABLE | GMEM_DDESHARE, metadata.txtlen + 1); ++ { ++ LPSTR lpszMem = (LPSTR)GlobalLock(hMem); ++ ++ if (lpszMem) ++ { ++ vim_strncpy(lpszMem, str, metadata.txtlen); ++ GlobalUnlock(hMem); ++ } ++ } ++ ++ /* Set up metadata: */ ++ { ++ VimClipType_t *lpszMemVim = NULL; ++ ++ hMemVim = GlobalAlloc(GMEM_MOVEABLE|GMEM_DDESHARE, ++ sizeof(VimClipType_t)); ++ lpszMemVim = (VimClipType_t *)GlobalLock(hMemVim); ++ memcpy(lpszMemVim, &metadata, sizeof(metadata)); ++ GlobalUnlock(hMemVim); ++ } ++ ++ /* ++ * Open the clipboard, clear it and put our text on it. ++ * Always set our Vim format. Put Unicode and plain text on it. ++ * ++ * Don't pass GetActiveWindow() as an argument to OpenClipboard() ++ * because then we can't paste back into the same window for some ++ * reason - webb. ++ */ ++ if (vim_open_clipboard()) ++ { ++ if (EmptyClipboard()) ++ { ++ SetClipboardData(cbd->format, hMemVim); ++ hMemVim = 0; ++ # if defined(FEAT_MBYTE) && defined(WIN3264) ++ if (hMemW != NULL) ++ { ++ if (SetClipboardData(CF_UNICODETEXT, hMemW) != NULL) ++ hMemW = NULL; ++ } ++ # endif ++ /* Always use CF_TEXT. On Win98 Notepad won't obtain the ++ * CF_UNICODETEXT text, only CF_TEXT. */ ++ SetClipboardData(CF_TEXT, hMem); ++ hMem = 0; ++ } ++ CloseClipboard(); ++ } ++ ++ vim_free(str); ++ /* Free any allocations we didn't give to the clipboard: */ ++ if (hMemRaw) ++ GlobalFree(hMemRaw); ++ if (hMem) ++ GlobalFree(hMem); ++ # if defined(FEAT_MBYTE) && defined(WIN3264) ++ if (hMemW) ++ GlobalFree(hMemW); ++ # endif ++ if (hMemVim) ++ GlobalFree(hMemVim); ++ } ++ ++ #endif /* FEAT_CLIPBOARD */ ++ ++ #if defined(FEAT_MBYTE) || defined(PROTO) ++ /* ++ * Note: the following two functions are only guaranteed to work when using ++ * valid MS-Windows codepages or when iconv() is available. ++ */ ++ ++ /* ++ * Convert "str" from 'encoding' to UTF-16. ++ * Input in "str" with length "*lenp". When "lenp" is NULL, use strlen(). ++ * Output is returned as an allocated string. "*lenp" is set to the length of ++ * the result. A trailing NUL is always added. ++ * Returns NULL when out of memory. ++ */ ++ short_u * ++ enc_to_utf16(char_u *str, int *lenp) ++ { ++ vimconv_T conv; ++ WCHAR *ret; ++ char_u *allocbuf = NULL; ++ int len_loc; ++ int length; ++ ++ if (lenp == NULL) ++ { ++ len_loc = (int)STRLEN(str) + 1; ++ lenp = &len_loc; ++ } ++ ++ if (enc_codepage > 0) ++ { ++ /* We can do any CP### -> UTF-16 in one pass, and we can do it ++ * without iconv() (convert_* may need iconv). */ ++ MultiByteToWideChar_alloc(enc_codepage, 0, str, *lenp, &ret, &length); ++ } ++ else ++ { ++ /* Use "latin1" by default, we might be called before we have p_enc ++ * set up. Convert to utf-8 first, works better with iconv(). Does ++ * nothing if 'encoding' is "utf-8". */ ++ conv.vc_type = CONV_NONE; ++ if (convert_setup(&conv, p_enc ? p_enc : (char_u *)"latin1", ++ (char_u *)"utf-8") == FAIL) ++ return NULL; ++ if (conv.vc_type != CONV_NONE) ++ { ++ str = allocbuf = string_convert(&conv, str, lenp); ++ if (str == NULL) ++ return NULL; ++ } ++ convert_setup(&conv, NULL, NULL); ++ ++ length = utf8_to_utf16(str, *lenp, NULL, NULL); ++ ret = (WCHAR *)alloc((unsigned)((length + 1) * sizeof(WCHAR))); ++ if (ret != NULL) ++ { ++ utf8_to_utf16(str, *lenp, (short_u *)ret, NULL); ++ ret[length] = 0; ++ } ++ ++ vim_free(allocbuf); ++ } ++ ++ *lenp = length; ++ return (short_u *)ret; ++ } ++ ++ /* ++ * Convert an UTF-16 string to 'encoding'. ++ * Input in "str" with length (counted in wide characters) "*lenp". When ++ * "lenp" is NULL, use wcslen(). ++ * Output is returned as an allocated string. If "*lenp" is not NULL it is ++ * set to the length of the result. ++ * Returns NULL when out of memory. ++ */ ++ char_u * ++ utf16_to_enc(short_u *str, int *lenp) ++ { ++ vimconv_T conv; ++ char_u *utf8_str = NULL, *enc_str = NULL; ++ int len_loc; ++ ++ if (lenp == NULL) ++ { ++ len_loc = (int)wcslen(str) + 1; ++ lenp = &len_loc; ++ } ++ ++ if (enc_codepage > 0) ++ { ++ /* We can do any UTF-16 -> CP### in one pass. */ ++ int length; ++ ++ WideCharToMultiByte_alloc(enc_codepage, 0, str, *lenp, ++ (LPSTR *)&enc_str, &length, 0, 0); ++ *lenp = length; ++ return enc_str; ++ } ++ ++ /* Avoid allocating zero bytes, it generates an error message. */ ++ utf8_str = alloc(utf16_to_utf8(str, *lenp == 0 ? 1 : *lenp, NULL)); ++ if (utf8_str != NULL) ++ { ++ *lenp = utf16_to_utf8(str, *lenp, utf8_str); ++ ++ /* We might be called before we have p_enc set up. */ ++ conv.vc_type = CONV_NONE; ++ convert_setup(&conv, (char_u *)"utf-8", ++ p_enc? p_enc: (char_u *)"latin1"); ++ if (conv.vc_type == CONV_NONE) ++ { ++ /* p_enc is utf-8, so we're done. */ ++ enc_str = utf8_str; ++ } ++ else ++ { ++ enc_str = string_convert(&conv, utf8_str, lenp); ++ vim_free(utf8_str); ++ } ++ ++ convert_setup(&conv, NULL, NULL); ++ } ++ ++ return enc_str; ++ } ++ #endif /* FEAT_MBYTE */ ++ ++ #if (defined(FEAT_MBYTE) && defined(WIN3264)) || defined(PROTO) ++ /* ++ * Convert from the active codepage to 'encoding'. ++ * Input is "str[str_size]". ++ * The result is in allocated memory: "out[outlen]". With terminating NUL. ++ */ ++ void ++ acp_to_enc(str, str_size, out, outlen) ++ char_u *str; ++ int str_size; ++ char_u **out; ++ int *outlen; ++ ++ { ++ LPWSTR widestr; ++ ++ MultiByteToWideChar_alloc(GetACP(), 0, str, str_size, &widestr, outlen); ++ if (widestr != NULL) ++ { ++ ++*outlen; /* Include the 0 after the string */ ++ *out = utf16_to_enc((short_u *)widestr, outlen); ++ vim_free(widestr); ++ } ++ } ++ #endif +*** ../vim-7.3.835/src/version.c 2013-02-26 14:14:01.000000000 +0100 +--- src/version.c 2013-02-26 14:43:36.000000000 +0100 +*************** +*** 730,731 **** +--- 730,733 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 836, + /**/ + +-- +Engineers understand that their appearance only bothers other people and +therefore it is not worth optimizing. + (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 /// From 523ed1e25fcd94e2275e041d46cd3d8094d5d0fa Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 15 Apr 2013 17:02:07 +0200 Subject: [PATCH 15/82] - patchlevel 837 --- 7.3.837 | 84 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 84 insertions(+) create mode 100644 7.3.837 diff --git a/7.3.837 b/7.3.837 new file mode 100644 index 00000000..7e7ed417 --- /dev/null +++ b/7.3.837 @@ -0,0 +1,84 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.837 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.837 (after 7.3.826) +Problem: Empty lines in :version output when 'columns' is 320. +Solution: Simplify the logic of making columns. (Nazri Ramliy, Roland + Eggner) +Files: src/version.c + + +*** ../vim-7.3.836/src/version.c 2013-02-26 14:56:24.000000000 +0100 +--- src/version.c 2013-02-26 15:10:56.000000000 +0100 +*************** +*** 2496,2509 **** + return; + } + +- ncol = (int) Columns / width; + /* The rightmost column doesn't need a separator. + * Sacrifice it to fit in one more column if possible. */ +! if (Columns % width == width - 1) +! ncol++; +! + nrow = nfeat / ncol + (nfeat % ncol ? 1 : 0); + + for (i = 0; !got_int && i < nrow * ncol; ++i) + { + int idx = (i / ncol) + (i % ncol) * nrow; +--- 2498,2509 ---- + return; + } + + /* The rightmost column doesn't need a separator. + * Sacrifice it to fit in one more column if possible. */ +! ncol = (int) (Columns + 1) / width; + nrow = nfeat / ncol + (nfeat % ncol ? 1 : 0); + ++ /* i counts columns then rows. idx counts rows then columns. */ + for (i = 0; !got_int && i < nrow * ncol; ++i) + { + int idx = (i / ncol) + (i % ncol) * nrow; +*************** +*** 2525,2531 **** + } + } + else +! msg_putchar('\n'); + } + } + +--- 2525,2534 ---- + } + } + else +! { +! if (msg_col > 0) +! msg_putchar('\n'); +! } + } + } + +*** ../vim-7.3.836/src/version.c 2013-02-26 14:56:24.000000000 +0100 +--- src/version.c 2013-02-26 15:10:56.000000000 +0100 +*************** +*** 730,731 **** +--- 730,733 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 837, + /**/ + +-- +Imagine a world without hypothetical situations. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 9d213938c6bf47a984ccbb0670d0377fc7a062d9 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 15 Apr 2013 17:02:08 +0200 Subject: [PATCH 16/82] - patchlevel 838 --- 7.3.838 | 364 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 364 insertions(+) create mode 100644 7.3.838 diff --git a/7.3.838 b/7.3.838 new file mode 100644 index 00000000..02ad2ae2 --- /dev/null +++ b/7.3.838 @@ -0,0 +1,364 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.838 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.838 (after 7.3.830) +Problem: Insufficient testing for mksession. +Solution: Add tests. (mostly by Roland Eggner) +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/test92.in, src/testdir/test92.ok, + src/testdir/test93.in, src/testdir/test93.ok, + src/ex_docmd.c + + +*** ../vim-7.3.837/src/testdir/Make_amiga.mak 2013-02-20 21:11:14.000000000 +0100 +--- src/testdir/Make_amiga.mak 2013-02-26 15:30:10.000000000 +0100 +*************** +*** 32,38 **** + test71.out test72.out test73.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 + + .SUFFIXES: .in .out + +--- 32,38 ---- + test71.out test72.out test73.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 + + .SUFFIXES: .in .out + +*************** +*** 140,142 **** +--- 140,144 ---- + test89.out: test89.in + test90.out: test90.in + test91.out: test91.in ++ test92.out: test92.in ++ test93.out: test93.in +*** ../vim-7.3.837/src/testdir/Make_dos.mak 2013-02-20 21:11:14.000000000 +0100 +--- src/testdir/Make_dos.mak 2013-02-26 15:30:10.000000000 +0100 +*************** +*** 31,37 **** + test74.out test75.out test76.out test77.out test78.out \ + 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 + + SCRIPTS32 = test50.out test70.out + +--- 31,37 ---- + test74.out test75.out test76.out test77.out test78.out \ + 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 + + SCRIPTS32 = test50.out test70.out + +*** ../vim-7.3.837/src/testdir/Make_ming.mak 2013-02-20 21:11:14.000000000 +0100 +--- src/testdir/Make_ming.mak 2013-02-26 15:30:10.000000000 +0100 +*************** +*** 51,57 **** + test74.out test75.out test76.out test77.out test78.out \ + 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 + + SCRIPTS32 = test50.out test70.out + +--- 51,57 ---- + test74.out test75.out test76.out test77.out test78.out \ + 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 + + SCRIPTS32 = test50.out test70.out + +*** ../vim-7.3.837/src/testdir/Make_os2.mak 2013-02-20 21:11:14.000000000 +0100 +--- src/testdir/Make_os2.mak 2013-02-26 15:30:10.000000000 +0100 +*************** +*** 32,38 **** + test71.out test72.out test73.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 + + .SUFFIXES: .in .out + +--- 32,38 ---- + test71.out test72.out test73.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 + + .SUFFIXES: .in .out + +*** ../vim-7.3.837/src/testdir/Make_vms.mms 2013-02-20 21:11:14.000000000 +0100 +--- src/testdir/Make_vms.mms 2013-02-26 15:30:10.000000000 +0100 +*************** +*** 4,10 **** + # Authors: Zoltan Arpadffy, + # Sandor Kopanyi, + # +! # Last change: 2013 Feb 20 + # + # This has been tested on VMS 6.2 to 8.3 on DEC Alpha, VAX and IA64. + # Edit the lines in the Configuration section below to select. +--- 4,10 ---- + # Authors: Zoltan Arpadffy, + # Sandor Kopanyi, + # +! # Last change: 2013-02-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. +*************** +*** 77,83 **** + 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 + + # Known problems: + # Test 30: a problem around mac format - unknown reason +--- 77,83 ---- + 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 + + # Known problems: + # Test 30: a problem around mac format - unknown reason +*** ../vim-7.3.837/src/testdir/Makefile 2013-02-20 21:11:14.000000000 +0100 +--- src/testdir/Makefile 2013-02-26 15:30:10.000000000 +0100 +*************** +*** 28,34 **** + test74.out test75.out test76.out test77.out test78.out \ + 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 + + SCRIPTS_GUI = test16.out + +--- 28,34 ---- + test74.out test75.out test76.out test77.out test78.out \ + 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 + + SCRIPTS_GUI = test16.out + +*** ../vim-7.3.837/src/testdir/test92.in 2013-02-26 17:20:44.000000000 +0100 +--- src/testdir/test92.in 2013-02-26 16:27:55.000000000 +0100 +*************** +*** 0 **** +--- 1,48 ---- ++ vim: set ft=vim fenc=utf-8: ++ ++ Tests if :mksession saves cursor columns correctly in presence of tab and ++ multibyte characters when fileencoding=utf-8. ++ ++ STARTTEST ++ :so mbyte.vim ++ :if !has('mksession') ++ : e! test.ok ++ : wq! test.out ++ :endif ++ :set sessionoptions=buffers splitbelow fileencoding=utf-8 ++ /^start: ++ :vsplit ++ j16|:split ++ j16|:split ++ j16|:split ++ j8|:split ++ j8|:split ++ j16|:split ++ j16|:split ++ j16|:wincmd l ++ /^start: ++ :set nowrap ++ j16|3zl:split ++ j016|3zl:split ++ j016|3zl:split ++ j08|3zl:split ++ j08|3zl:split ++ j016|3zl:split ++ j016|3zl:split ++ j016|3zl:split ++ :mksession! test.out ++ :new test.out ++ :v/\(^ *normal! 0\|^ *exe 'normal!\)/d ++ :w ++ :qa! ++ ENDTEST ++ ++ start: ++ no multibyte chAracter ++ one leaDing tab ++ four leadinG spaces ++ two consecutive tabs ++ two tabs in one line ++ one … multibyteCharacter ++ a “b” two multiByte characters ++ “c”1€ three mulTibyte characters +*** ../vim-7.3.837/src/testdir/test92.ok 2013-02-26 17:20:44.000000000 +0100 +--- src/testdir/test92.ok 2013-02-26 17:13:48.000000000 +0100 +*************** +*** 0 **** +--- 1,26 ---- ++ normal! 016| ++ normal! 016| ++ normal! 016| ++ normal! 08| ++ normal! 08| ++ normal! 016| ++ normal! 016| ++ normal! 016| ++ exe 'normal! ' . s:c . '|zs' . 16 . '|' ++ normal! 016| ++ exe 'normal! ' . s:c . '|zs' . 16 . '|' ++ normal! 016| ++ exe 'normal! ' . s:c . '|zs' . 16 . '|' ++ normal! 016| ++ exe 'normal! ' . s:c . '|zs' . 8 . '|' ++ normal! 08| ++ exe 'normal! ' . s:c . '|zs' . 8 . '|' ++ normal! 08| ++ exe 'normal! ' . s:c . '|zs' . 16 . '|' ++ normal! 016| ++ exe 'normal! ' . s:c . '|zs' . 16 . '|' ++ normal! 016| ++ exe 'normal! ' . s:c . '|zs' . 16 . '|' ++ normal! 016| ++ exe 'normal! ' . s:c . '|zs' . 16 . '|' ++ normal! 016| +*** ../vim-7.3.837/src/testdir/test93.in 2013-02-26 17:20:44.000000000 +0100 +--- src/testdir/test93.in 2013-02-26 17:13:01.000000000 +0100 +*************** +*** 0 **** +--- 1,48 ---- ++ vim: set ft=vim fenc=latin1: ++ ++ Tests if :mksession saves cursor columns correctly in presence of tab and ++ multibyte characters when fileencoding=latin1. ++ ++ STARTTEST ++ :so mbyte.vim ++ :if !has('mksession') ++ : e! test.ok ++ : wq! test.out ++ :endif ++ :set sessionoptions=buffers splitbelow fileencoding=latin1 ++ /^start: ++ :vsplit ++ j16|:split ++ j16|:split ++ j16|:split ++ j8|:split ++ j8|:split ++ j16|:split ++ j16|:split ++ j16|:wincmd l ++ /^start: ++ :set nowrap ++ j16|3zl:split ++ j016|3zl:split ++ j016|3zl:split ++ j08|3zl:split ++ j08|3zl:split ++ j016|3zl:split ++ j016|3zl:split ++ j016|3zl:split ++ :mksession! test.out ++ :new test.out ++ :v/\(^ *normal! 0\|^ *exe 'normal!\)/d ++ :w ++ :qa! ++ ENDTEST ++ ++ start: ++ no multibyte chAracter ++ one leaDing tab ++ four leadinG spaces ++ two consecutive tabs ++ two tabs in one line ++ one ä multibyteCharacter ++ aä Ä two multiByte characters ++ Aäöü three mulTibyte characters +*** ../vim-7.3.837/src/testdir/test93.ok 2013-02-26 17:20:44.000000000 +0100 +--- src/testdir/test93.ok 2013-02-26 17:14:02.000000000 +0100 +*************** +*** 0 **** +--- 1,26 ---- ++ normal! 016| ++ normal! 016| ++ normal! 016| ++ normal! 08| ++ normal! 08| ++ normal! 016| ++ normal! 016| ++ normal! 016| ++ exe 'normal! ' . s:c . '|zs' . 16 . '|' ++ normal! 016| ++ exe 'normal! ' . s:c . '|zs' . 16 . '|' ++ normal! 016| ++ exe 'normal! ' . s:c . '|zs' . 16 . '|' ++ normal! 016| ++ exe 'normal! ' . s:c . '|zs' . 8 . '|' ++ normal! 08| ++ exe 'normal! ' . s:c . '|zs' . 8 . '|' ++ normal! 08| ++ exe 'normal! ' . s:c . '|zs' . 16 . '|' ++ normal! 016| ++ exe 'normal! ' . s:c . '|zs' . 16 . '|' ++ normal! 016| ++ exe 'normal! ' . s:c . '|zs' . 16 . '|' ++ normal! 016| ++ exe 'normal! ' . s:c . '|zs' . 16 . '|' ++ normal! 016| +*** ../vim-7.3.837/src/ex_docmd.c 2013-02-20 19:26:24.000000000 +0100 +--- src/ex_docmd.c 2013-02-26 16:14:07.000000000 +0100 +*************** +*** 10839,10845 **** + (long)wp->w_virtcol + 1) < 0 + || put_eol(fd) == FAIL + || put_line(fd, "else") == FAIL +! || fprintf(fd, " normal! %d|", wp->w_virtcol + 1) < 0 + || put_eol(fd) == FAIL + || put_line(fd, "endif") == FAIL) + return FAIL; +--- 10839,10845 ---- + (long)wp->w_virtcol + 1) < 0 + || put_eol(fd) == FAIL + || put_line(fd, "else") == FAIL +! || fprintf(fd, " normal! 0%d|", wp->w_virtcol + 1) < 0 + || put_eol(fd) == FAIL + || put_line(fd, "endif") == FAIL) + return FAIL; +*** ../vim-7.3.837/src/version.c 2013-02-26 15:27:20.000000000 +0100 +--- src/version.c 2013-02-26 15:31:06.000000000 +0100 +*************** +*** 730,731 **** +--- 730,733 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 838, + /**/ + +-- +It doesn't really matter what you are able to do if you don't do it. + (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 /// From 7264c3a635eea3bf02372b4f5c35baf7cd47c0a8 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 15 Apr 2013 17:02:08 +0200 Subject: [PATCH 17/82] - patchlevel 839 --- 7.3.839 | 76 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 7.3.839 diff --git a/7.3.839 b/7.3.839 new file mode 100644 index 00000000..2c4eb78c --- /dev/null +++ b/7.3.839 @@ -0,0 +1,76 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.839 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.839 +Problem: Some files missing in the list of distributed files. +Solution: Add lines for new files. +Files: Filelist + + +*** ../vim-7.3.838/Filelist 2012-10-03 21:48:38.000000000 +0200 +--- Filelist 2013-02-26 17:55:17.000000000 +0100 +*************** +*** 73,78 **** +--- 73,79 ---- + src/version.c \ + src/version.h \ + src/vim.h \ ++ src/winclip.c \ + src/window.c \ + src/xxd/xxd.c \ + src/main.aap \ +*************** +*** 83,88 **** +--- 84,90 ---- + src/testdir/test60.vim \ + src/testdir/test83-tags? \ + src/proto.h \ ++ src/proto/arabic.pro \ + src/proto/blowfish.pro \ + src/proto/buffer.pro \ + src/proto/charset.pro \ +*************** +*** 130,135 **** +--- 132,138 ---- + src/proto/ui.pro \ + src/proto/undo.pro \ + src/proto/version.pro \ ++ src/proto/winclip.pro \ + src/proto/window.pro \ + + +*************** +*** 444,449 **** +--- 447,453 ---- + src/os_beos.c \ + src/os_beos.h \ + src/os_beos.rsrc \ ++ src/proto/os_beos.pro \ + src/os_mint.h \ + src/os_vms_fix.com \ + src/toolbar.phi \ +*** ../vim-7.3.838/src/version.c 2013-02-26 17:21:15.000000000 +0100 +--- src/version.c 2013-02-26 17:56:40.000000000 +0100 +*************** +*** 730,731 **** +--- 730,733 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 839, + /**/ + +-- +Normal people believe that if it ain't broke, don't fix it. Engineers believe +that if it ain't broke, it doesn't have enough features yet. + (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 /// From 4fabf59821b95ebce50f77cfd4fcc7283d8f699f Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 15 Apr 2013 17:02:09 +0200 Subject: [PATCH 18/82] - patchlevel 840 --- 7.3.840 | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 7.3.840 diff --git a/7.3.840 b/7.3.840 new file mode 100644 index 00000000..d68c9fbf --- /dev/null +++ b/7.3.840 @@ -0,0 +1,54 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.840 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.840 +Problem: "\@rs_un.regsave.rs_u.pos.col -= ++ (*mb_head_off)(regline, regline ++ + rp->rs_un.regsave.rs_u.pos.col - 1) + 1; ++ else ++ #endif + --rp->rs_un.regsave.rs_u.pos.col; + } + else +*** ../vim-7.3.839/src/version.c 2013-02-26 17:59:37.000000000 +0100 +--- src/version.c 2013-02-26 18:39:28.000000000 +0100 +*************** +*** 730,731 **** +--- 730,733 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 840, + /**/ + +-- +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 /// From 3bed6c4f45fb137330a64c7111ae8d0a695bcda7 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 15 Apr 2013 17:02:09 +0200 Subject: [PATCH 19/82] - patchlevel 841 --- 7.3.841 | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 7.3.841 diff --git a/7.3.841 b/7.3.841 new file mode 100644 index 00000000..abe5bf7b --- /dev/null +++ b/7.3.841 @@ -0,0 +1,59 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.841 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.841 +Problem: When a "cond ? one : two" expression has a subscript it is not + parsed correctly. (Andy Wokula) +Solution: Handle a subscript also when the type is unknown. (Christian + Brabandt) +Files: src/eval.c + + +*** ../vim-7.3.840/src/eval.c 2013-02-20 21:11:14.000000000 +0100 +--- src/eval.c 2013-02-26 19:27:59.000000000 +0100 +*************** +*** 5164,5169 **** +--- 5164,5179 ---- + ret = get_func_tv(s, len, rettv, arg, + curwin->w_cursor.lnum, curwin->w_cursor.lnum, + &len, evaluate, NULL); ++ ++ /* If evaluate is FALSE rettv->v_type was not set in ++ * get_func_tv, but it's needed in handle_subscript() to parse ++ * what follows. So set it here. */ ++ if (rettv->v_type == VAR_UNKNOWN && !evaluate && **arg == '(') ++ { ++ rettv->vval.v_string = vim_strsave(""); ++ rettv->v_type = VAR_FUNC; ++ } ++ + /* Stop the expression evaluation when immediately + * aborting on error, or when an interrupt occurred or + * an exception was thrown but not caught. */ +*** ../vim-7.3.840/src/version.c 2013-02-26 18:45:49.000000000 +0100 +--- src/version.c 2013-02-26 19:35:36.000000000 +0100 +*************** +*** 730,731 **** +--- 730,733 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 841, + /**/ + +-- +If someone questions your market projections, simply point out that your +target market is "People who are nuts" and "People who will buy any damn +thing". Nobody is going to tell you there aren't enough of those people +to go around. + (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 /// From f07892961f75c1ad34ba68e7698f71dec0c6a487 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 15 Apr 2013 17:02:10 +0200 Subject: [PATCH 20/82] - patchlevel 842 --- 7.3.842 | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 7.3.842 diff --git a/7.3.842 b/7.3.842 new file mode 100644 index 00000000..895c783b --- /dev/null +++ b/7.3.842 @@ -0,0 +1,54 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.842 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.842 +Problem: Compiler warning for signed/unsigned pointer. +Solution: Add type cast. (Christian Brabandt) +Files: src/eval.c + + +*** ../vim-7.3.841/src/eval.c 2013-02-26 19:36:03.000000000 +0100 +--- src/eval.c 2013-02-26 21:41:24.000000000 +0100 +*************** +*** 5170,5176 **** + * what follows. So set it here. */ + if (rettv->v_type == VAR_UNKNOWN && !evaluate && **arg == '(') + { +! rettv->vval.v_string = vim_strsave(""); + rettv->v_type = VAR_FUNC; + } + +--- 5170,5176 ---- + * what follows. So set it here. */ + if (rettv->v_type == VAR_UNKNOWN && !evaluate && **arg == '(') + { +! rettv->vval.v_string = vim_strsave((char_u *)""); + rettv->v_type = VAR_FUNC; + } + +*** ../vim-7.3.841/src/version.c 2013-02-26 19:36:03.000000000 +0100 +--- src/version.c 2013-02-26 21:43:21.000000000 +0100 +*************** +*** 730,731 **** +--- 730,733 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 842, + /**/ + +-- +The process for understanding customers primarily involves sitting around with +other marketing people and talking about what you would to if you were dumb +enough to be a customer. + (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 /// From 50186aef3c08a43bd62a7e992279907724b3f0de Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 15 Apr 2013 17:02:11 +0200 Subject: [PATCH 21/82] - patchlevel 843 --- 7.3.843 | 111 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 111 insertions(+) create mode 100644 7.3.843 diff --git a/7.3.843 b/7.3.843 new file mode 100644 index 00000000..ebb369d5 --- /dev/null +++ b/7.3.843 @@ -0,0 +1,111 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.843 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.843 (after 7.3.841) +Problem: Missing test file changes. +Solution: Change the tests. +Files: src/testdir/test49.vim, src/testdir/test49.ok + + +*** ../vim-7.3.842/src/testdir/test49.vim 2012-12-05 19:00:03.000000000 +0100 +--- src/testdir/test49.vim 2013-02-26 19:22:36.000000000 +0100 +*************** +*** 9624,9630 **** + Xcheck 0 + + "------------------------------------------------------------------------------- +! " Test 87: $VIMNOERRTHROW and $VIMNOINTTHROW support {{{1 + " + " It is possible to configure Vim for throwing exceptions on error + " or interrupt, controlled by variables $VIMNOERRTHROW and +--- 9624,9661 ---- + Xcheck 0 + + "------------------------------------------------------------------------------- +! " Test 87 using (expr) ? funcref : funcref {{{1 +! " +! " Vim needs to correctly parse the funcref and even when it does +! " not execute the funcref, it needs to consume the trailing () +! "------------------------------------------------------------------------------- +! +! XpathINIT +! +! func Add2(x1, x2) +! return a:x1 + a:x2 +! endfu +! +! func GetStr() +! return "abcdefghijklmnopqrstuvwxyp" +! endfu +! +! echo function('Add2')(2,3) +! +! Xout 1 ? function('Add2')(1,2) : function('Add2')(2,3) +! Xout 0 ? function('Add2')(1,2) : function('Add2')(2,3) +! " Make sure, GetStr() still works. +! Xout GetStr()[0:10] +! +! +! delfunction GetStr +! delfunction Add2 +! Xout "Successfully executed funcref Add2" +! +! Xcheck 0 +! +! "------------------------------------------------------------------------------- +! " Test 88: $VIMNOERRTHROW and $VIMNOINTTHROW support {{{1 + " + " It is possible to configure Vim for throwing exceptions on error + " or interrupt, controlled by variables $VIMNOERRTHROW and +*** ../vim-7.3.842/src/testdir/test49.ok 2012-11-14 22:38:04.000000000 +0100 +--- src/testdir/test49.ok 2013-02-26 19:22:36.000000000 +0100 +*************** +*** 87,94 **** + *** Test 85: OK (198689) + --- Test 86: No Crash for vimgrep on BufUnload + *** Test 86: OK (0) +! --- Test 87: All tests were run with throwing exceptions on error. + The $VIMNOERRTHROW control is not configured. +! --- Test 87: All tests were run with throwing exceptions on interrupt. + The $VIMNOINTTHROW control is not configured. +! *** Test 87: OK (50443995) +--- 87,99 ---- + *** Test 85: OK (198689) + --- Test 86: No Crash for vimgrep on BufUnload + *** Test 86: OK (0) +! --- Test 87: 3 +! --- Test 87: 5 +! --- Test 87: abcdefghijk +! --- Test 87: Successfully executed funcref Add2 +! *** Test 87: OK (0) +! --- Test 88: All tests were run with throwing exceptions on error. + The $VIMNOERRTHROW control is not configured. +! --- Test 88: All tests were run with throwing exceptions on interrupt. + The $VIMNOINTTHROW control is not configured. +! *** Test 88: OK (50443995) +*** ../vim-7.3.842/src/version.c 2013-02-26 21:43:28.000000000 +0100 +--- src/version.c 2013-02-26 22:53:13.000000000 +0100 +*************** +*** 730,731 **** +--- 730,733 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 843, + /**/ + +-- +Never enter the boss's office unless it's absolutely necessary. Every boss +saves one corner of the desk for useless assignments that are doled out like +Halloween candy to each visitor. + (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 /// From 348c77da12bba828496a28205606f93967547bb5 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 15 Apr 2013 17:02:11 +0200 Subject: [PATCH 22/82] - patchlevel 844 --- 7.3.844 | 197 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 197 insertions(+) create mode 100644 7.3.844 diff --git a/7.3.844 b/7.3.844 new file mode 100644 index 00000000..015a0b56 --- /dev/null +++ b/7.3.844 @@ -0,0 +1,197 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.844 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.844 +Problem: Enum is not indented correctly with "public" etc. +Solution: Skip "public", "private" and "protected". (Hong Xu) +Files: src/misc1.c + + +*** ../vim-7.3.843/src/misc1.c 2013-02-13 16:10:13.000000000 +0100 +--- src/misc1.c 2013-03-07 12:59:45.000000000 +0100 +*************** +*** 5275,5280 **** +--- 5275,5281 ---- + 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)); +*************** +*** 5446,5469 **** + } + + /* +! * Recognize structure initialization and enumerations. +! * Q&D-Implementation: +! * check for "=" at end or "[typedef] enum" at beginning of line. + */ + static int + cin_isinit(void) + { + char_u *s; + + s = cin_skipcomment(ml_get_curline()); + +! if (STRNCMP(s, "typedef", 7) == 0 && !vim_isIDc(s[7])) + s = cin_skipcomment(s + 7); + +! if (STRNCMP(s, "static", 6) == 0 && !vim_isIDc(s[6])) +! s = cin_skipcomment(s + 6); + +! if (STRNCMP(s, "enum", 4) == 0 && !vim_isIDc(s[4])) + return TRUE; + + if (cin_ends_in(s, (char_u *)"=", (char_u *)"{")) +--- 5447,5486 ---- + } + + /* +! * Recognize structure initialization and enumerations: +! * "[typedef] [static|public|protected|private] enum" +! * "[typedef] [static|public|protected|private] = {" + */ + static int + cin_isinit(void) + { + char_u *s; ++ static char *skip[] = {"static", "public", "protected", "private"}; + + s = cin_skipcomment(ml_get_curline()); + +! if (cin_starts_with(s, "typedef")) + s = cin_skipcomment(s + 7); + +! for (;;) +! { +! int i, l; +! +! for (i = 0; i < (int)(sizeof(skip) / sizeof(char *)); ++i) +! { +! l = strlen(skip[i]); +! if (cin_starts_with(s, skip[i])) +! { +! s = cin_skipcomment(s + l); +! l = 0; +! break; +! } +! } +! if (l != 0) +! break; +! } + +! if (cin_starts_with(s, "enum")) + return TRUE; + + if (cin_ends_in(s, (char_u *)"=", (char_u *)"{")) +*************** +*** 5481,5487 **** + int strict; /* Allow relaxed check of case statement for JS */ + { + s = cin_skipcomment(s); +! if (STRNCMP(s, "case", 4) == 0 && !vim_isIDc(s[4])) + { + for (s += 4; *s; ++s) + { +--- 5498,5504 ---- + int strict; /* Allow relaxed check of case statement for JS */ + { + s = cin_skipcomment(s); +! if (cin_starts_with(s, "case")) + { + for (s += 4; *s; ++s) + { +*************** +*** 6049,6055 **** + p = cin_skipcomment(p); + if (*p == '}') /* accept "} while (cond);" */ + p = cin_skipcomment(p + 1); +! if (STRNCMP(p, "while", 5) == 0 && !vim_isIDc(p[5])) + { + cursor_save = curwin->w_cursor; + curwin->w_cursor.lnum = lnum; +--- 6066,6072 ---- + p = cin_skipcomment(p); + if (*p == '}') /* accept "} while (cond);" */ + p = cin_skipcomment(p + 1); +! if (cin_starts_with(p, "while")) + { + cursor_save = curwin->w_cursor; + curwin->w_cursor.lnum = lnum; +*************** +*** 6156,6162 **** + s = cin_skipcomment(ml_get(trypos->lnum)); + if (*s == '}') /* accept "} while (cond);" */ + s = cin_skipcomment(s + 1); +! if (STRNCMP(s, "while", 5) == 0 && !vim_isIDc(s[5])) + { + curwin->w_cursor.lnum = trypos->lnum; + return TRUE; +--- 6173,6179 ---- + s = cin_skipcomment(ml_get(trypos->lnum)); + if (*s == '}') /* accept "} while (cond);" */ + s = cin_skipcomment(s + 1); +! if (cin_starts_with(s, "while")) + { + curwin->w_cursor.lnum = trypos->lnum; + return TRUE; +*************** +*** 6406,6411 **** +--- 6423,6441 ---- + } + + /* ++ * Return TRUE when "s" starts with "word" and then a non-ID character. ++ */ ++ static int ++ cin_starts_with(s, word) ++ char_u *s; ++ char *word; ++ { ++ int l = STRLEN(word); ++ ++ return (STRNCMP(s, word, l) == 0 && !vim_isIDc(s[l])); ++ } ++ ++ /* + * Skip strings, chars and comments until at or past "trypos". + * Return the column found. + */ +*** ../vim-7.3.843/src/version.c 2013-02-26 22:54:06.000000000 +0100 +--- src/version.c 2013-03-07 13:12:20.000000000 +0100 +*************** +*** 730,731 **** +--- 730,733 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 844, + /**/ + +-- +Now it is such a bizarrely improbable coincidence that anything as +mind-bogglingly useful as the Babel fish could have evolved purely by chance +that some thinkers have chosen to see it as a final and clinching proof of the +NON-existence of God. +The argument goes something like this: 'I refuse to prove that I exist,' says +God, 'for proof denies faith, and without faith I am nothing.' +'But,' says Man, 'the Babel fish is a dead giveaway, isn't it? It could not +have evolved by chance. It proves you exist, and so therefore, by your own +arguments, you don't. QED.' +'Oh dear,' says God, 'I hadn't thought of that,' and promptly vanishes in a +puff of logic. +'Oh, that was easy,' says Man, and for an encore goes on to prove that black +is white and gets himself killed on the next pedestrian crossing. + -- 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 /// From 312157ace0267077c8518bca2b155e3d50e4c0ee Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 15 Apr 2013 17:02:12 +0200 Subject: [PATCH 23/82] - patchlevel 845 --- 7.3.845 | 88 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100644 7.3.845 diff --git a/7.3.845 b/7.3.845 new file mode 100644 index 00000000..d9acfefb --- /dev/null +++ b/7.3.845 @@ -0,0 +1,88 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.845 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.845 (after 7.3.844) +Problem: Enum indenting is not tested. +Solution: Add tests. (Hong Xu) +Files: src/testdir/test3.in, src/testdir/test3.ok + + +*** ../vim-7.3.844/src/testdir/test3.in 2012-06-13 13:40:45.000000000 +0200 +--- src/testdir/test3.in 2013-03-07 12:39:35.000000000 +0100 +*************** +*** 318,323 **** +--- 318,337 ---- + maybe + } soppie; + ++ public static enum ++ { ++ yes = 0, ++ no, ++ maybe ++ } soppie; ++ ++ static private enum ++ { ++ yes = 0, ++ no, ++ maybe ++ } soppie; ++ + { + int a, + b; +*** ../vim-7.3.844/src/testdir/test3.ok 2012-06-13 13:40:45.000000000 +0200 +--- src/testdir/test3.ok 2013-03-07 12:40:03.000000000 +0100 +*************** +*** 306,311 **** +--- 306,325 ---- + maybe + } soppie; + ++ public static enum ++ { ++ yes = 0, ++ no, ++ maybe ++ } soppie; ++ ++ static private enum ++ { ++ yes = 0, ++ no, ++ maybe ++ } soppie; ++ + { + int a, + b; +*** ../vim-7.3.844/src/version.c 2013-03-07 13:13:45.000000000 +0100 +--- src/version.c 2013-03-07 13:18:49.000000000 +0100 +*************** +*** 730,731 **** +--- 730,733 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 845, + /**/ + +-- +"So this is it," said Arthur, "we are going to die." +"Yes," said Ford, "except...no! Wait a minute!" He suddenly lunged across +the chamber at something behind Arthur's line of vision. "What's this +switch?" he cried. +"What? Where?" cried Arthur, twisting around. +"No, I was only fooling," said Ford, "we are going to die after all." + -- 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 /// From 26ce66b13982816905fe886eccb8f7471ae1efd1 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 15 Apr 2013 17:02:12 +0200 Subject: [PATCH 24/82] - patchlevel 846 --- 7.3.846 | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 7.3.846 diff --git a/7.3.846 b/7.3.846 new file mode 100644 index 00000000..da52ef59 --- /dev/null +++ b/7.3.846 @@ -0,0 +1,46 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.846 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.846 +Problem: Missing proto file, listing a non-existing proto file. +Solution: Remove the file. Add os_beos.pro only in Mercurial. +Files: Filelist + + +*** ../vim-7.3.845/Filelist 2013-02-26 17:59:37.000000000 +0100 +--- Filelist 2013-03-07 13:27:30.000000000 +0100 +*************** +*** 84,90 **** + src/testdir/test60.vim \ + src/testdir/test83-tags? \ + src/proto.h \ +- src/proto/arabic.pro \ + src/proto/blowfish.pro \ + src/proto/buffer.pro \ + src/proto/charset.pro \ +--- 84,89 ---- +*** ../vim-7.3.845/src/version.c 2013-03-07 13:21:28.000000000 +0100 +--- src/version.c 2013-03-07 13:23:02.000000000 +0100 +*************** +*** 730,731 **** +--- 730,733 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 846, + /**/ + +-- +I am also told that there is a logical proof out there somewhere +that demonstrates that there is no task which duct tape cannot handle. + -- Paul Brannan + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From d2126a04240ee2c1b7117b891ae5bb4b44f23b4d Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 15 Apr 2013 17:02:13 +0200 Subject: [PATCH 25/82] - patchlevel 847 --- 7.3.847 | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 7.3.847 diff --git a/7.3.847 b/7.3.847 new file mode 100644 index 00000000..a9bb4267 --- /dev/null +++ b/7.3.847 @@ -0,0 +1,47 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.847 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.847 +Problem: Test 55 fails when messages are translated. +Solution: Set language to C. (Ken Takata) +Files: src/testdir/test55.in + + +*** ../vim-7.3.846/src/testdir/test55.in 2012-08-29 16:55:09.000000000 +0200 +--- src/testdir/test55.in 2013-03-07 14:33:12.000000000 +0100 +*************** +*** 3,8 **** +--- 3,9 ---- + STARTTEST + :so small.vim + :fun Test(...) ++ :lang C + :" Creating List directly with different types + :let l = [1, 'as''d', [1, 2, function("strlen")], {'a': 1},] + :$put =string(l) +*** ../vim-7.3.846/src/version.c 2013-03-07 13:32:03.000000000 +0100 +--- src/version.c 2013-03-07 14:49:57.000000000 +0100 +*************** +*** 730,731 **** +--- 730,733 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 847, + /**/ + +-- +"Space is big. Really big. You just won't believe how vastly hugely mind- +bogglingly big it is. I mean, you may think it's a long way down the +road to the chemist, but that's just peanuts to space." + -- 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 /// From 4c79b2ba49fec4c34fc2eb328e106852de48445d Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 15 Apr 2013 17:02:14 +0200 Subject: [PATCH 26/82] - patchlevel 848 --- 7.3.848 | 153 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 153 insertions(+) create mode 100644 7.3.848 diff --git a/7.3.848 b/7.3.848 new file mode 100644 index 00000000..aaf8401c --- /dev/null +++ b/7.3.848 @@ -0,0 +1,153 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.848 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.848 +Problem: Can't build with Ruby 2.0 when using MinGW x64 or MSVC10. +Solution: Fix it. Also detect RUBY_PLATFORM and RUBY_INSTALL_NAME for x64. + (Ken Takata) +Files: src/Make_cyg.mak, src/Make_ming.mak, src/if_ruby.c + + +*** ../vim-7.3.847/src/Make_cyg.mak 2013-02-26 14:56:24.000000000 +0100 +--- src/Make_cyg.mak 2013-03-07 14:56:29.000000000 +0100 +*************** +*** 229,246 **** +--- 229,254 ---- + ifneq ($(wildcard $(RUBY)/lib/ruby/$(RUBY_VER_LONG)/i386-mingw32),) + RUBY_PLATFORM = i386-mingw32 + else ++ ifneq ($(wildcard $(RUBY)/lib/ruby/$(RUBY_VER_LONG)/x64-mingw32),) ++ RUBY_PLATFORM = x64-mingw32 ++ else + RUBY_PLATFORM = i386-mswin32 + endif + endif + endif ++ endif + + ifndef RUBY_INSTALL_NAME + ifeq ($(RUBY_VER), 16) + RUBY_INSTALL_NAME = mswin32-ruby$(RUBY_API_VER) + else ++ ifeq ($(ARCH),x86-64) ++ RUBY_INSTALL_NAME = x64-msvcrt-ruby$(RUBY_API_VER) ++ else + RUBY_INSTALL_NAME = msvcrt-ruby$(RUBY_API_VER) + endif + endif ++ endif + + ifeq (19, $(word 1,$(sort 19 $(RUBY_VER)))) + RUBY_19_OR_LATER = 1 +*** ../vim-7.3.847/src/Make_ming.mak 2013-02-26 14:56:24.000000000 +0100 +--- src/Make_ming.mak 2013-03-07 14:56:29.000000000 +0100 +*************** +*** 288,305 **** +--- 288,313 ---- + ifneq ($(wildcard $(RUBY)/lib/ruby/$(RUBY_VER_LONG)/i386-mingw32),) + RUBY_PLATFORM = i386-mingw32 + else ++ ifneq ($(wildcard $(RUBY)/lib/ruby/$(RUBY_VER_LONG)/x64-mingw32),) ++ RUBY_PLATFORM = x64-mingw32 ++ else + RUBY_PLATFORM = i386-mswin32 + endif + endif + endif ++ endif + + ifndef RUBY_INSTALL_NAME + ifeq ($(RUBY_VER), 16) + RUBY_INSTALL_NAME = mswin32-ruby$(RUBY_API_VER) + else ++ ifeq ($(ARCH),x86-64) ++ RUBY_INSTALL_NAME = x64-msvcrt-ruby$(RUBY_API_VER) ++ else + RUBY_INSTALL_NAME = msvcrt-ruby$(RUBY_API_VER) + endif + endif ++ endif + + ifeq (19, $(word 1,$(sort 19 $(RUBY_VER)))) + RUBY_19_OR_LATER = 1 +*** ../vim-7.3.847/src/if_ruby.c 2013-02-26 13:41:31.000000000 +0100 +--- src/if_ruby.c 2013-03-07 14:56:29.000000000 +0100 +*************** +*** 39,44 **** +--- 39,47 ---- + */ + # define rb_cFalseClass (*dll_rb_cFalseClass) + # define rb_cFixnum (*dll_rb_cFixnum) ++ # if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 20 ++ # define rb_cFloat (*dll_rb_cFloat) ++ # endif + # define rb_cNilClass (*dll_rb_cNilClass) + # define rb_cSymbol (*dll_rb_cSymbol) + # define rb_cTrueClass (*dll_rb_cTrueClass) +*************** +*** 249,254 **** +--- 252,260 ---- + static VALUE (*dll_rb_assoc_new) (VALUE, VALUE); + VALUE *dll_rb_cFalseClass; + VALUE *dll_rb_cFixnum; ++ #if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 20 ++ VALUE *dll_rb_cFloat; ++ #endif + VALUE *dll_rb_cNilClass; + static VALUE *dll_rb_cObject; + VALUE *dll_rb_cSymbol; +*************** +*** 352,358 **** + { + return dll_rb_float_new(d); + } +! unsigned long rb_num2ulong(VALUE x) + { + return (long)RSHIFT((SIGNED_VALUE)(x),1); + } +--- 358,364 ---- + { + return dll_rb_float_new(d); + } +! VALUE rb_num2ulong(VALUE x) + { + return (long)RSHIFT((SIGNED_VALUE)(x),1); + } +*************** +*** 373,378 **** +--- 379,387 ---- + {"rb_assoc_new", (RUBY_PROC*)&dll_rb_assoc_new}, + {"rb_cFalseClass", (RUBY_PROC*)&dll_rb_cFalseClass}, + {"rb_cFixnum", (RUBY_PROC*)&dll_rb_cFixnum}, ++ #if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 20 ++ {"rb_cFloat", (RUBY_PROC*)&dll_rb_cFloat}, ++ #endif + {"rb_cNilClass", (RUBY_PROC*)&dll_rb_cNilClass}, + {"rb_cObject", (RUBY_PROC*)&dll_rb_cObject}, + {"rb_cSymbol", (RUBY_PROC*)&dll_rb_cSymbol}, +*** ../vim-7.3.847/src/version.c 2013-03-07 14:50:30.000000000 +0100 +--- src/version.c 2013-03-07 14:57:03.000000000 +0100 +*************** +*** 730,731 **** +--- 730,733 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 848, + /**/ + +-- +`The Guide says there is an art to flying,' said Ford, `or at least a +knack. The knack lies in learning how to throw yourself at the ground +and miss.' He smiled weakly. + -- 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 /// From e24c92a7ffec3f5f145f1b3ed2df2172ece1cc0e Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 15 Apr 2013 17:02:14 +0200 Subject: [PATCH 27/82] - patchlevel 849 --- 7.3.849 | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 7.3.849 diff --git a/7.3.849 b/7.3.849 new file mode 100644 index 00000000..b97cc74c --- /dev/null +++ b/7.3.849 @@ -0,0 +1,55 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.849 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.849 +Problem: ":g//" gives "Pattern not found error" with E486. Should not use + the error number, it's not a regular error message. +Solution: Use a normal message. (David Bürgin) +Files: src/ex_cmds.c + + +*** ../vim-7.3.848/src/ex_cmds.c 2013-02-06 18:23:58.000000000 +0100 +--- src/ex_cmds.c 2013-03-07 16:05:49.000000000 +0100 +*************** +*** 5411,5417 **** + if (type == 'v') + smsg((char_u *)_("Pattern found in every line: %s"), pat); + else +! smsg((char_u *)_(e_patnotf2), pat); + } + else + global_exe(cmd); +--- 5411,5417 ---- + if (type == 'v') + smsg((char_u *)_("Pattern found in every line: %s"), pat); + else +! smsg((char_u *)_("Pattern not found: %s"), pat); + } + else + global_exe(cmd); +*** ../vim-7.3.848/src/version.c 2013-03-07 15:16:16.000000000 +0100 +--- src/version.c 2013-03-07 16:03:57.000000000 +0100 +*************** +*** 730,731 **** +--- 730,733 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 849, + /**/ + +-- +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 /// From 1cd6cc7334cf5c1df4e9136a186d3c048fc1e440 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 15 Apr 2013 17:02:15 +0200 Subject: [PATCH 28/82] - patchlevel 850 --- 7.3.850 | 82 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 7.3.850 diff --git a/7.3.850 b/7.3.850 new file mode 100644 index 00000000..325b5ee7 --- /dev/null +++ b/7.3.850 @@ -0,0 +1,82 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.850 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.850 +Problem: ":vimgrep //" matches everywhere. +Solution: Make it use the previous search pattern. (David Bürgin) +Files: runtime/doc/quickfix.txt, src/quickfix.c + + +*** ../vim-7.3.849/runtime/doc/quickfix.txt 2010-08-15 21:57:19.000000000 +0200 +--- runtime/doc/quickfix.txt 2013-03-07 16:17:39.000000000 +0100 +*************** +*** 563,568 **** +--- 574,581 ---- + 'ignorecase' applies. To overrule it put |/\c| in the + pattern to ignore case or |/\C| to match case. + 'smartcase' is not used. ++ If {pattern} is empty (e.g. // is specified), the last ++ used search pattern is used. |last-pattern| + + When a number is put before the command this is used + as the maximum number of matches to find. Use +*** ../vim-7.3.849/src/quickfix.c 2012-12-12 15:55:16.000000000 +0100 +--- src/quickfix.c 2013-03-07 16:21:17.000000000 +0100 +*************** +*** 3179,3185 **** + EMSG(_(e_invalpat)); + goto theend; + } +! regmatch.regprog = vim_regcomp(s, RE_MAGIC); + if (regmatch.regprog == NULL) + goto theend; + regmatch.rmm_ic = p_ic; +--- 3179,3198 ---- + EMSG(_(e_invalpat)); + goto theend; + } +! +! if (s != NULL && *s == NUL) +! { +! /* Pattern is empty, use last search pattern. */ +! if (last_search_pat() == NULL) +! { +! EMSG(_(e_noprevre)); +! goto theend; +! } +! regmatch.regprog = vim_regcomp(last_search_pat(), RE_MAGIC); +! } +! else +! regmatch.regprog = vim_regcomp(s, RE_MAGIC); +! + if (regmatch.regprog == NULL) + goto theend; + regmatch.rmm_ic = p_ic; +*** ../vim-7.3.849/src/version.c 2013-03-07 16:08:31.000000000 +0100 +--- src/version.c 2013-03-07 16:16:26.000000000 +0100 +*************** +*** 730,731 **** +--- 730,733 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 850, + /**/ + +-- +The technology involved in making anything invisible is so infinitely +complex that nine hundred and ninety-nine billion, nine hundred and +ninety-nine million, nine hundred and ninety-nine thousand, nine hundred +and ninety-nine times out of a trillion it is much simpler and more +effective just to take the thing away and do without it. + -- 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 /// From 12f5c18472257647a37397f4e5133c33d7f75f5d Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 15 Apr 2013 17:02:15 +0200 Subject: [PATCH 29/82] - patchlevel 851 --- 7.3.851 | 67 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 7.3.851 diff --git a/7.3.851 b/7.3.851 new file mode 100644 index 00000000..87ff27d1 --- /dev/null +++ b/7.3.851 @@ -0,0 +1,67 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.851 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.851 +Problem: Using an empty pattern with :sort silently continues when there is + no previous search pattern. +Solution: Give an error message. +Files: src/ex_cmds.c + + +*** ../vim-7.3.850/src/ex_cmds.c 2013-03-07 16:08:31.000000000 +0100 +--- src/ex_cmds.c 2013-03-07 16:25:28.000000000 +0100 +*************** +*** 415,422 **** + } + *s = NUL; + /* Use last search pattern if sort pattern is empty. */ +! if (s == p + 1 && last_search_pat() != NULL) + regmatch.regprog = vim_regcomp(last_search_pat(), RE_MAGIC); + else + regmatch.regprog = vim_regcomp(p + 1, RE_MAGIC); + if (regmatch.regprog == NULL) +--- 415,429 ---- + } + *s = NUL; + /* Use last search pattern if sort pattern is empty. */ +! if (s == p + 1) +! { +! if (last_search_pat() == NULL) +! { +! EMSG(_(e_noprevre)); +! goto sortend; +! } + regmatch.regprog = vim_regcomp(last_search_pat(), RE_MAGIC); ++ } + else + regmatch.regprog = vim_regcomp(p + 1, RE_MAGIC); + if (regmatch.regprog == NULL) +*** ../vim-7.3.850/src/version.c 2013-03-07 16:32:49.000000000 +0100 +--- src/version.c 2013-03-07 16:38:49.000000000 +0100 +*************** +*** 730,731 **** +--- 730,733 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 851, + /**/ + +-- +This planet has -- or rather had -- a problem, which was this: most +of the people living on it were unhappy for pretty much of the time. +Many solutions were suggested for this problem, but most of these +were largely concerned with the movements of small green pieces of +paper, which is odd because on the whole it wasn't the small green +pieces of paper that were unhappy. + -- 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 /// From 0c1b460c7ffda39862ec091a14c164887660ec0e Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 15 Apr 2013 17:02:16 +0200 Subject: [PATCH 30/82] - patchlevel 852 --- 7.3.852 | 124 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 124 insertions(+) create mode 100644 7.3.852 diff --git a/7.3.852 b/7.3.852 new file mode 100644 index 00000000..50906577 --- /dev/null +++ b/7.3.852 @@ -0,0 +1,124 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.852 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.852 +Problem: system() breaks clipboard text. (Yukihiro Nakadaira) +Solution: Use Xutf8TextPropertyToTextList(). (Christian Brabandt) + Also do not put the text in the clip buffer if conversion fails. +Files: src/ui.c, src/ops.c + + +*** ../vim-7.3.851/src/ui.c 2012-10-21 00:58:34.000000000 +0200 +--- src/ui.c 2013-03-07 17:30:37.000000000 +0100 +*************** +*** 2119,2125 **** + text_prop.encoding = *type; + text_prop.format = *format; + text_prop.nitems = len; +! status = XmbTextPropertyToTextList(X_DISPLAY, &text_prop, + &text_list, &n_text); + if (status != Success || n_text < 1) + { +--- 2119,2131 ---- + text_prop.encoding = *type; + text_prop.format = *format; + text_prop.nitems = len; +! #ifdef FEAT_MBYTE +! if (*type == utf8_atom) +! status = Xutf8TextPropertyToTextList(X_DISPLAY, &text_prop, +! &text_list, &n_text); +! else +! #endif +! status = XmbTextPropertyToTextList(X_DISPLAY, &text_prop, + &text_list, &n_text); + if (status != Success || n_text < 1) + { +*** ../vim-7.3.851/src/ops.c 2012-12-12 16:11:28.000000000 +0100 +--- src/ops.c 2013-03-07 17:55:59.000000000 +0100 +*************** +*** 5828,5833 **** +--- 5828,5835 ---- + && len < 1024*1024 && len > 0) + { + #ifdef FEAT_MBYTE ++ int ok = TRUE; ++ + /* The CUT_BUFFER0 is supposed to always contain latin1. Convert from + * 'enc' when it is a multi-byte encoding. When 'enc' is an 8-bit + * encoding conversion usually doesn't work, so keep the text as-is. +*************** +*** 5842,5847 **** +--- 5844,5850 ---- + int intlen = len; + char_u *conv_str; + ++ vc.vc_fail = TRUE; + conv_str = string_convert(&vc, str, &intlen); + len = intlen; + if (conv_str != NULL) +*************** +*** 5849,5860 **** + vim_free(str); + str = conv_str; + } + convert_setup(&vc, NULL, NULL); + } + } + #endif +! XStoreBuffer(dpy, (char *)str, (int)len, 0); +! XFlush(dpy); + } + + vim_free(str); +--- 5852,5877 ---- + vim_free(str); + str = conv_str; + } ++ else ++ { ++ ok = FALSE; ++ } + convert_setup(&vc, NULL, NULL); + } ++ else ++ { ++ ok = FALSE; ++ } + } ++ ++ /* Do not store the string if conversion failed. Better to use any ++ * other selection than garbled text. */ ++ if (ok) + #endif +! { +! XStoreBuffer(dpy, (char *)str, (int)len, 0); +! XFlush(dpy); +! } + } + + vim_free(str); +*** ../vim-7.3.851/src/version.c 2013-03-07 16:41:26.000000000 +0100 +--- src/version.c 2013-03-07 18:01:08.000000000 +0100 +*************** +*** 730,731 **** +--- 730,733 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 852, + /**/ + +-- +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 /// From ceaab2aead323b60f1b35c557fb9369c5a477772 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 15 Apr 2013 17:02:17 +0200 Subject: [PATCH 31/82] - patchlevel 853 --- 7.3.853 | 96 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 96 insertions(+) create mode 100644 7.3.853 diff --git a/7.3.853 b/7.3.853 new file mode 100644 index 00000000..6ccb0f4a --- /dev/null +++ b/7.3.853 @@ -0,0 +1,96 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.853 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.853 +Problem: Using "ra" in multiple lines on multi-byte characters leaves a few + characters not replaced. +Solution: Adjust the end column only in the last line. (Yasuhiro Matsumoto) +Files: src/testdir/test69.in, src/testdir/test69.ok, src/ops.c + + +*** ../vim-7.3.852/src/testdir/test69.in 2013-01-17 17:01:57.000000000 +0100 +--- src/testdir/test69.in 2013-03-07 18:30:50.000000000 +0100 +*************** +*** 1,5 **** +--- 1,6 ---- + Test for multi-byte text formatting. + Also test, that 'mps' with multibyte chars works. ++ And test "ra" on multi-byte characters. + + STARTTEST + :so mbyte.vim +*************** +*** 144,149 **** +--- 145,159 ---- + ‘ two three ’ four + } + STARTTEST ++ /^ra test ++ jVjra ++ ENDTEST ++ ++ ra test ++ abba ++ aab ++ ++ STARTTEST + :g/^STARTTEST/.,/^ENDTEST/d + :1;/^Results/,$wq! test.out + ENDTEST +*** ../vim-7.3.852/src/testdir/test69.ok 2013-01-17 17:01:57.000000000 +0100 +--- src/testdir/test69.ok 2013-03-07 18:31:32.000000000 +0100 +*************** +*** 144,146 **** +--- 144,151 ---- + { + four + } ++ ++ ra test ++ aaaa ++ aaa ++ +*** ../vim-7.3.852/src/ops.c 2013-03-07 18:02:27.000000000 +0100 +--- src/ops.c 2013-03-07 18:35:01.000000000 +0100 +*************** +*** 2194,2200 **** + { + /* This is slow, but it handles replacing a single-byte + * with a multi-byte and the other way around. */ +! oap->end.col += (*mb_char2len)(c) - (*mb_char2len)(n); + n = State; + State = REPLACE; + ins_char(c); +--- 2194,2201 ---- + { + /* This is slow, but it handles replacing a single-byte + * with a multi-byte and the other way around. */ +! if (curwin->w_cursor.lnum == oap->end.lnum) +! oap->end.col += (*mb_char2len)(c) - (*mb_char2len)(n); + n = State; + State = REPLACE; + ins_char(c); +*** ../vim-7.3.852/src/version.c 2013-03-07 18:02:27.000000000 +0100 +--- src/version.c 2013-03-07 18:36:46.000000000 +0100 +*************** +*** 730,731 **** +--- 730,733 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 853, + /**/ + +-- +What a wonderfully exciting cough! Do you mind if I join you? + -- 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 /// From 823a007e5becdc66c8157356d3be6cd839d16aeb Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 15 Apr 2013 17:02:17 +0200 Subject: [PATCH 32/82] - patchlevel 854 --- 7.3.854 | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 7.3.854 diff --git a/7.3.854 b/7.3.854 new file mode 100644 index 00000000..6bc4717f --- /dev/null +++ b/7.3.854 @@ -0,0 +1,49 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.854 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.854 +Problem: After using backspace in insert mode completion, CTRL-N and CTRL-P + do not highlight the right entry. (Olivier Teuliere) +Solution: Set the current item to the shown item after using backspace. +Files: src/edit.c + + +*** ../vim-7.3.853/src/edit.c 2013-02-26 13:30:28.000000000 +0100 +--- src/edit.c 2013-03-07 19:31:46.000000000 +0100 +*************** +*** 3380,3385 **** +--- 3380,3388 ---- + if (compl_leader != NULL) + { + ins_compl_new_leader(); ++ if (compl_shown_match != NULL) ++ /* Make sure current match is not a hidden item. */ ++ compl_curr_match = compl_shown_match; + return NUL; + } + return K_BS; +*** ../vim-7.3.853/src/version.c 2013-03-07 18:50:52.000000000 +0100 +--- src/version.c 2013-03-07 19:34:32.000000000 +0100 +*************** +*** 730,731 **** +--- 730,733 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 854, + /**/ + +-- +If you put 7 of the most talented OSS developers in a room for a week +and asked them to fix a bug in a spreadsheet program, in 1 week +you'd have 2 new mail readers and a text-based web browser. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 1983f939aac8f598d561712df4dd2fffbe5b9ff9 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 15 Apr 2013 17:02:18 +0200 Subject: [PATCH 33/82] - patchlevel 855 --- 7.3.855 | 69 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 7.3.855 diff --git a/7.3.855 b/7.3.855 new file mode 100644 index 00000000..06b315d5 --- /dev/null +++ b/7.3.855 @@ -0,0 +1,69 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.855 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.855 +Problem: Compiler warnings. +Solution: Add type casts. (Mike Williams) +Files: src/misc1.c + + +*** ../vim-7.3.854/src/misc1.c 2013-03-07 13:13:45.000000000 +0100 +--- src/misc1.c 2013-03-13 16:58:12.000000000 +0100 +*************** +*** 5468,5474 **** + + for (i = 0; i < (int)(sizeof(skip) / sizeof(char *)); ++i) + { +! l = strlen(skip[i]); + if (cin_starts_with(s, skip[i])) + { + s = cin_skipcomment(s + l); +--- 5468,5474 ---- + + for (i = 0; i < (int)(sizeof(skip) / sizeof(char *)); ++i) + { +! l = (int)strlen(skip[i]); + if (cin_starts_with(s, skip[i])) + { + s = cin_skipcomment(s + l); +*************** +*** 6430,6436 **** + char_u *s; + char *word; + { +! int l = STRLEN(word); + + return (STRNCMP(s, word, l) == 0 && !vim_isIDc(s[l])); + } +--- 6430,6436 ---- + char_u *s; + char *word; + { +! int l = (int)STRLEN(word); + + return (STRNCMP(s, word, l) == 0 && !vim_isIDc(s[l])); + } +*** ../vim-7.3.854/src/version.c 2013-03-07 19:38:49.000000000 +0100 +--- src/version.c 2013-03-13 16:59:02.000000000 +0100 +*************** +*** 730,731 **** +--- 730,733 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 855, + /**/ + +-- +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 /// From 9644463c847473505024ab45c432cdced69fc347 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 15 Apr 2013 17:02:18 +0200 Subject: [PATCH 34/82] - patchlevel 856 --- 7.3.856 | 311 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 311 insertions(+) create mode 100644 7.3.856 diff --git a/7.3.856 b/7.3.856 new file mode 100644 index 00000000..b9f28a47 --- /dev/null +++ b/7.3.856 @@ -0,0 +1,311 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.856 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.856 +Problem: When calling system() multi-byte clipboard contents is garbled. +Solution: Save and restore the clipboard contents. (Yukihiro Nakadaira) +Files: src/gui_gtk_x11.c, src/proto/gui_gtk_x11.pro, src/ops.c, + src/proto/ops.pro, src/os_unix.c, src/proto/ui.pro, src/ui.c + + +*** ../vim-7.3.855/src/gui_gtk_x11.c 2013-02-14 22:11:31.000000000 +0100 +--- src/gui_gtk_x11.c 2013-03-13 17:28:00.000000000 +0100 +*************** +*** 5674,5685 **** + void + clip_mch_lose_selection(VimClipboard *cbd UNUSED) + { +! /* WEIRD: when using NULL to actually disown the selection, we lose the +! * selection the first time we own it. */ +! /* +! gtk_selection_owner_set(NULL, cbd->gtk_sel_atom, (guint32)GDK_CURRENT_TIME); + gui_mch_update(); +- */ + } + + /* +--- 5674,5681 ---- + void + clip_mch_lose_selection(VimClipboard *cbd UNUSED) + { +! gtk_selection_owner_set(NULL, cbd->gtk_sel_atom, gui.event_time); + gui_mch_update(); + } + + /* +*************** +*** 5705,5710 **** +--- 5701,5712 ---- + { + } + ++ int ++ clip_gtk_owner_exists(VimClipboard *cbd) ++ { ++ return gdk_selection_owner_get(cbd->gtk_sel_atom) != NULL; ++ } ++ + + #if defined(FEAT_MENU) || defined(PROTO) + /* +*** ../vim-7.3.855/src/proto/gui_gtk_x11.pro 2012-05-18 17:03:14.000000000 +0200 +--- src/proto/gui_gtk_x11.pro 2013-03-13 17:35:17.000000000 +0100 +*************** +*** 59,64 **** +--- 59,65 ---- + void clip_mch_lose_selection __ARGS((VimClipboard *cbd)); + int clip_mch_own_selection __ARGS((VimClipboard *cbd)); + void clip_mch_set_selection __ARGS((VimClipboard *cbd)); ++ int clip_gtk_owner_exists __ARGS((VimClipboard *cbd)); + void gui_mch_menu_grey __ARGS((vimmenu_T *menu, int grey)); + void gui_mch_menu_hidden __ARGS((vimmenu_T *menu, int hidden)); + void gui_mch_draw_menubar __ARGS((void)); +*** ../vim-7.3.855/src/ops.c 2013-03-07 18:50:52.000000000 +0100 +--- src/ops.c 2013-03-13 17:30:50.000000000 +0100 +*************** +*** 1017,1022 **** +--- 1017,1035 ---- + may_set_selection(); + # endif + } ++ ++ void ++ free_register(reg) ++ void *reg; ++ { ++ struct yankreg tmp; ++ ++ tmp = *y_current; ++ *y_current = *(struct yankreg *)reg; ++ free_yank_all(); ++ vim_free(reg); ++ *y_current = tmp; ++ } + #endif + + #if defined(FEAT_MOUSE) || defined(PROTO) +*** ../vim-7.3.855/src/proto/ops.pro 2012-06-06 16:12:54.000000000 +0200 +--- src/proto/ops.pro 2013-03-13 17:35:04.000000000 +0100 +*************** +*** 15,20 **** +--- 15,21 ---- + int may_get_selection __ARGS((int regname)); + void *get_register __ARGS((int name, int copy)); + void put_register __ARGS((int name, void *reg)); ++ void free_register __ARGS((void *reg)); + int yank_register_mline __ARGS((int regname)); + int do_record __ARGS((int c)); + int do_execreg __ARGS((int regname, int colon, int addcr, int silent)); +*** ../vim-7.3.855/src/os_unix.c 2013-02-26 14:56:24.000000000 +0100 +--- src/os_unix.c 2013-03-13 17:33:00.000000000 +0100 +*************** +*** 1138,1143 **** +--- 1138,1148 ---- + + # if defined(FEAT_CLIPBOARD) && defined(FEAT_X11) + static void loose_clipboard __ARGS((void)); ++ static void save_clipboard __ARGS((void)); ++ static void restore_clipboard __ARGS((void)); ++ ++ static void *clip_star_save = NULL; ++ static void *clip_plus_save = NULL; + + /* + * Called when Vim is going to sleep or execute a shell command. +*************** +*** 1158,1163 **** +--- 1163,1204 ---- + XFlush(x11_display); + } + } ++ ++ /* ++ * Save clipboard text to restore later. ++ */ ++ static void ++ save_clipboard() ++ { ++ if (clip_star.owned) ++ clip_star_save = get_register('*', TRUE); ++ if (clip_plus.owned) ++ clip_plus_save = get_register('+', TRUE); ++ } ++ ++ /* ++ * Restore clipboard text if no one own the X selection. ++ */ ++ static void ++ restore_clipboard() ++ { ++ if (clip_star_save != NULL) ++ { ++ if (!clip_gen_owner_exists(&clip_star)) ++ put_register('*', clip_star_save); ++ else ++ free_register(clip_star_save); ++ clip_star_save = NULL; ++ } ++ if (clip_plus_save != NULL) ++ { ++ if (!clip_gen_owner_exists(&clip_plus)) ++ put_register('+', clip_plus_save); ++ else ++ free_register(clip_plus_save); ++ clip_plus_save = NULL; ++ } ++ } + #endif + + /* +*************** +*** 3844,3849 **** +--- 3885,3891 ---- + settmode(TMODE_COOK); /* set to normal mode */ + + # if defined(FEAT_CLIPBOARD) && defined(FEAT_X11) ++ save_clipboard(); + loose_clipboard(); + # endif + +*************** +*** 3917,3922 **** +--- 3959,3967 ---- + # ifdef FEAT_TITLE + resettitle(); + # endif ++ # if defined(FEAT_CLIPBOARD) && defined(FEAT_X11) ++ restore_clipboard(); ++ # endif + return x; + + #else /* USE_SYSTEM */ /* don't use system(), use fork()/exec() */ +*************** +*** 3965,3970 **** +--- 4010,4018 ---- + settmode(TMODE_COOK); /* set to normal mode */ + + # if defined(FEAT_CLIPBOARD) && defined(FEAT_X11) ++ /* Disown the clipboard, because is the executed command tries to obtain a ++ * selection and we own it we get a deadlock. */ ++ save_clipboard(); + loose_clipboard(); + # endif + +*************** +*** 4836,4841 **** +--- 4884,4892 ---- + # ifdef FEAT_TITLE + resettitle(); + # endif ++ # if defined(FEAT_CLIPBOARD) && defined(FEAT_X11) ++ restore_clipboard(); ++ # endif + vim_free(newcmd); + + return retval; +*** ../vim-7.3.855/src/proto/ui.pro 2012-07-10 16:49:08.000000000 +0200 +--- src/proto/ui.pro 2013-03-13 17:35:08.000000000 +0100 +*************** +*** 29,34 **** +--- 29,35 ---- + void clip_gen_lose_selection __ARGS((VimClipboard *cbd)); + void clip_gen_set_selection __ARGS((VimClipboard *cbd)); + void clip_gen_request_selection __ARGS((VimClipboard *cbd)); ++ int clip_gen_owner_exists __ARGS((VimClipboard *cbd)); + int vim_is_input_buf_full __ARGS((void)); + int vim_is_input_buf_empty __ARGS((void)); + int vim_free_in_input_buf __ARGS((void)); +*************** +*** 52,57 **** +--- 53,59 ---- + void clip_x11_lose_selection __ARGS((Widget myShell, VimClipboard *cbd)); + int clip_x11_own_selection __ARGS((Widget myShell, VimClipboard *cbd)); + void clip_x11_set_selection __ARGS((VimClipboard *cbd)); ++ int clip_x11_owner_exists __ARGS((VimClipboard *cbd)); + void yank_cut_buffer0 __ARGS((Display *dpy, VimClipboard *cbd)); + int jump_to_mouse __ARGS((int flags, int *inclusive, int which_button)); + int mouse_comp_pos __ARGS((win_T *win, int *rowp, int *colp, linenr_T *lnump)); +*** ../vim-7.3.855/src/ui.c 2013-03-07 18:02:27.000000000 +0100 +--- src/ui.c 2013-03-13 17:31:31.000000000 +0100 +*************** +*** 1456,1461 **** +--- 1456,1476 ---- + #endif + } + ++ int ++ clip_gen_owner_exists(cbd) ++ VimClipboard *cbd; ++ { ++ #ifdef FEAT_XCLIPBOARD ++ # ifdef FEAT_GUI_GTK ++ if (gui.in_use) ++ return clip_gtk_owner_exists(cbd); ++ else ++ # endif ++ return clip_x11_owner_exists(cbd); ++ #endif ++ return TRUE; ++ } ++ + #endif /* FEAT_CLIPBOARD */ + + /***************************************************************************** +*************** +*** 2398,2404 **** + Widget myShell; + VimClipboard *cbd; + { +! XtDisownSelection(myShell, cbd->sel_atom, CurrentTime); + } + + int +--- 2413,2420 ---- + Widget myShell; + VimClipboard *cbd; + { +! XtDisownSelection(myShell, cbd->sel_atom, +! XtLastTimestampProcessed(XtDisplay(myShell))); + } + + int +*************** +*** 2440,2445 **** +--- 2456,2468 ---- + VimClipboard *cbd UNUSED; + { + } ++ ++ int ++ clip_x11_owner_exists(cbd) ++ VimClipboard *cbd; ++ { ++ return XGetSelectionOwner(X_DISPLAY, cbd->sel_atom) != None; ++ } + #endif + + #if defined(FEAT_XCLIPBOARD) || defined(FEAT_GUI_X11) \ +*** ../vim-7.3.855/src/version.c 2013-03-13 17:01:47.000000000 +0100 +--- src/version.c 2013-03-13 17:45:25.000000000 +0100 +*************** +*** 730,731 **** +--- 730,733 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 856, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +39. You move into a new house and decide to Netscape before you landscape. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From ce9b31f8a388dc44d283f0e65ba39f8c91424b06 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 15 Apr 2013 17:02:19 +0200 Subject: [PATCH 35/82] - patchlevel 857 --- 7.3.857 | 91 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100644 7.3.857 diff --git a/7.3.857 b/7.3.857 new file mode 100644 index 00000000..1c3ca8c5 --- /dev/null +++ b/7.3.857 @@ -0,0 +1,91 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.857 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.857 +Problem: The QuitPre autocommand event does not trigger for :qa and :wq. +Solution: Trigger the event. (Tatsuro Fujii) +Files: src/ex_docmd.c + + +*** ../vim-7.3.856/src/ex_docmd.c 2013-02-26 17:21:15.000000000 +0100 +--- src/ex_docmd.c 2013-03-13 18:14:56.000000000 +0100 +*************** +*** 6526,6532 **** + } + #ifdef FEAT_AUTOCMD + apply_autocmds(EVENT_QUITPRE, NULL, NULL, FALSE, curbuf); +! /* Refuse to quick when locked or when the buffer in the last window is + * being closed (can only happen in autocommands). */ + if (curbuf_locked() || (curbuf->b_nwindows == 1 && curbuf->b_closing)) + return; +--- 6526,6532 ---- + } + #ifdef FEAT_AUTOCMD + apply_autocmds(EVENT_QUITPRE, NULL, NULL, FALSE, curbuf); +! /* Refuse to quit when locked or when the buffer in the last window is + * being closed (can only happen in autocommands). */ + if (curbuf_locked() || (curbuf->b_nwindows == 1 && curbuf->b_closing)) + return; +*************** +*** 6600,6606 **** + return; + } + #ifdef FEAT_AUTOCMD +! if (curbuf_locked()) + return; + #endif + +--- 6600,6609 ---- + return; + } + #ifdef FEAT_AUTOCMD +! apply_autocmds(EVENT_QUITPRE, NULL, NULL, FALSE, curbuf); +! /* Refuse to quit when locked or when the buffer in the last window is +! * being closed (can only happen in autocommands). */ +! if (curbuf_locked() || (curbuf->b_nwindows == 1 && curbuf->b_closing)) + return; + #endif + +*************** +*** 6936,6942 **** + return; + } + #ifdef FEAT_AUTOCMD +! if (curbuf_locked()) + return; + #endif + +--- 6939,6948 ---- + return; + } + #ifdef FEAT_AUTOCMD +! apply_autocmds(EVENT_QUITPRE, NULL, NULL, FALSE, curbuf); +! /* Refuse to quit when locked or when the buffer in the last window is +! * being closed (can only happen in autocommands). */ +! if (curbuf_locked() || (curbuf->b_nwindows == 1 && curbuf->b_closing)) + return; + #endif + +*** ../vim-7.3.856/src/version.c 2013-03-13 17:50:20.000000000 +0100 +--- src/version.c 2013-03-13 18:26:13.000000000 +0100 +*************** +*** 730,731 **** +--- 730,733 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 857, + /**/ + +-- +The future isn't what it used to be. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 9716d7cd8839ce9863d05b9d706caa810746360f Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 15 Apr 2013 17:02:20 +0200 Subject: [PATCH 36/82] - patchlevel 858 --- 7.3.858 | 159 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 159 insertions(+) create mode 100644 7.3.858 diff --git a/7.3.858 b/7.3.858 new file mode 100644 index 00000000..a03c0158 --- /dev/null +++ b/7.3.858 @@ -0,0 +1,159 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.858 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.858 +Problem: "gv" selects the wrong area after some operators. +Solution: Save and restore the type of selection. (Christian Brabandt) +Files: src/testdir/test66.in, src/testdir/test66.ok, src/normal.c + + +*** ../vim-7.3.857/src/testdir/test66.in 2010-08-15 21:57:29.000000000 +0200 +--- src/testdir/test66.in 2013-03-13 18:42:46.000000000 +0100 +*************** +*** 3,14 **** + + STARTTEST + :so small.vim + /^abcdefgh + 4jI j<<11|D + 7|a  + 7|a  + 7|a 4k13|4j< +! :$-4,$w! test.out + :$-4,$s/\s\+//g + 4kI j<< + 7|a  +--- 3,16 ---- + + STARTTEST + :so small.vim ++ /^one ++ fe4jRugvr1:'<,'>w! test.out + /^abcdefgh + 4jI j<<11|D + 7|a  + 7|a  + 7|a 4k13|4j< +! :$-5,$w >> test.out + :$-4,$s/\s\+//g + 4kI j<< + 7|a  +*************** +*** 18,23 **** +--- 20,31 ---- + :qa! + ENDTEST + ++ one two three ++ one two three ++ one two three ++ one two three ++ one two three ++ + abcdefghijklmnopqrstuvwxyz + abcdefghijklmnopqrstuvwxyz + abcdefghijklmnopqrstuvwxyz +*** ../vim-7.3.857/src/testdir/test66.ok 2010-08-15 21:57:29.000000000 +0200 +--- src/testdir/test66.ok 2013-03-13 18:42:46.000000000 +0100 +*************** +*** 1,3 **** +--- 1,9 ---- ++ on1 two three ++ on1 two three ++ on1 two three ++ on1 two three ++ on1 two three ++ + abcdefghijklmnopqrstuvwxyz + abcdefghij + abc defghijklmnopqrstuvwxyz +*** ../vim-7.3.857/src/normal.c 2013-02-26 13:30:28.000000000 +0100 +--- src/normal.c 2013-03-13 18:47:49.000000000 +0100 +*************** +*** 21,26 **** +--- 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 +*************** +*** 1594,1599 **** +--- 1595,1605 ---- + curbuf->b_visual.vi_start = VIsual; + curbuf->b_visual.vi_end = curwin->w_cursor; + curbuf->b_visual.vi_mode = VIsual_mode; ++ if (VIsual_mode_orig != NUL) ++ { ++ curbuf->b_visual.vi_mode = VIsual_mode_orig; ++ VIsual_mode_orig = NUL; ++ } + curbuf->b_visual.vi_curswant = curwin->w_curswant; + # ifdef FEAT_EVAL + curbuf->b_visual_mode_eval = VIsual_mode; +*************** +*** 7230,7235 **** +--- 7236,7242 ---- + { + cap->cmdchar = 'c'; + cap->nchar = NUL; ++ VIsual_mode_orig = VIsual_mode; /* remember original area for gv */ + VIsual_mode = 'V'; + nv_operator(cap); + } +*************** +*** 7429,7435 **** +--- 7436,7445 ---- + if (isupper(cap->cmdchar)) + { + if (VIsual_mode != Ctrl_V) ++ { ++ VIsual_mode_orig = VIsual_mode; + VIsual_mode = 'V'; ++ } + else if (cap->cmdchar == 'C' || cap->cmdchar == 'D') + curwin->w_curswant = MAXCOL; + } +*************** +*** 7449,7455 **** +--- 7459,7468 ---- + if (VIsual_active) /* "vs" and "vS" are the same as "vc" */ + { + if (cap->cmdchar == 'S') ++ { ++ VIsual_mode_orig = VIsual_mode; + VIsual_mode = 'V'; ++ } + cap->cmdchar = 'c'; + nv_operator(cap); + } +*** ../vim-7.3.857/src/version.c 2013-03-13 18:30:39.000000000 +0100 +--- src/version.c 2013-03-13 18:48:50.000000000 +0100 +*************** +*** 730,731 **** +--- 730,733 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 858, + /**/ + +-- +"Oh, no! NOT the Spanish Inquisition!" +"NOBODY expects the Spanish Inquisition!!!" + -- Monty Python sketch -- +"Oh, no! NOT another option!" +"EVERYBODY expects another option!!!" + -- Discussion in vim-dev mailing 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 /// From 599fe65eec33ad5a6d730ae1a9cca22839704d3a Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 15 Apr 2013 17:02:20 +0200 Subject: [PATCH 37/82] - patchlevel 859 --- 7.3.859 | 316 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 316 insertions(+) create mode 100644 7.3.859 diff --git a/7.3.859 b/7.3.859 new file mode 100644 index 00000000..e1714c4b --- /dev/null +++ b/7.3.859 @@ -0,0 +1,316 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.859 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.859 +Problem: 'ambiwidth' must be set by the user. +Solution: Detects East Asian ambiguous width (UAX #11) state of the terminal + at the start-up time and 'ambiwidth' accordingly. (Hayaki Saito) +Files: src/main.c, src/option.c, src/term.c, src/term.h, + src/proto/term.pro + + +*** ../vim-7.3.858/src/main.c 2013-01-17 13:59:56.000000000 +0100 +--- src/main.c 2013-03-13 19:09:03.000000000 +0100 +*************** +*** 804,809 **** +--- 804,812 ---- + + 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 + setmouse(); /* may start using the mouse */ +*** ../vim-7.3.858/src/option.c 2013-02-13 15:44:22.000000000 +0100 +--- src/option.c 2013-03-13 19:09:03.000000000 +0100 +*************** +*** 2900,2905 **** +--- 2900,2906 ---- + p_term("t_op", T_OP) + p_term("t_RI", T_CRI) + p_term("t_RV", T_CRV) ++ p_term("t_u7", T_U7) + p_term("t_Sb", T_CSB) + p_term("t_Sf", T_CSF) + p_term("t_se", T_SE) +*** ../vim-7.3.858/src/term.c 2013-02-26 14:56:24.000000000 +0100 +--- src/term.c 2013-03-13 19:18:22.000000000 +0100 +*************** +*** 111,116 **** +--- 111,121 ---- + # define CRV_SENT 2 /* did send T_CRV, waiting for answer */ + # define CRV_GOT 3 /* received T_CRV response */ + static int crv_status = CRV_GET; ++ /* Request Cursor position report: */ ++ # define U7_GET 1 /* send T_U7 when switched to RAW mode */ ++ # define U7_SENT 2 /* did send T_U7, waiting for answer */ ++ # define U7_GOT 3 /* received T_U7 response */ ++ static int u7_status = U7_GET; + # endif + + /* +*************** +*** 933,938 **** +--- 938,944 ---- + {(int)KS_CWP, IF_EB("\033[3;%d;%dt", ESC_STR "[3;%d;%dt")}, + # endif + {(int)KS_CRV, IF_EB("\033[>c", ESC_STR "[>c")}, ++ {(int)KS_U7, IF_EB("\033[6n", ESC_STR "[6n")}, + + {K_UP, IF_EB("\033O*A", ESC_STR "O*A")}, + {K_DOWN, IF_EB("\033O*B", ESC_STR "O*B")}, +*************** +*** 1221,1226 **** +--- 1227,1233 ---- + {(int)KS_CWP, "[%dCWP%d]"}, + # endif + {(int)KS_CRV, "[CRV]"}, ++ {(int)KS_U7, "[U7]"}, + {K_UP, "[KU]"}, + {K_DOWN, "[KD]"}, + {K_LEFT, "[KL]"}, +*************** +*** 1596,1601 **** +--- 1603,1609 ---- + {KS_TS, "ts"}, {KS_FS, "fs"}, + {KS_CWP, "WP"}, {KS_CWS, "WS"}, + {KS_CSI, "SI"}, {KS_CEI, "EI"}, ++ {KS_U7, "u7"}, + {(enum SpecialKey)0, NULL} + }; + +*************** +*** 3183,3189 **** + /* May need to check for T_CRV response and termcodes, it + * doesn't work in Cooked mode, an external program may get + * them. */ +! if (tmode != TMODE_RAW && crv_status == CRV_SENT) + (void)vpeekc_nomap(); + check_for_codes_from_term(); + } +--- 3191,3198 ---- + /* May need to check for T_CRV response and termcodes, it + * doesn't work in Cooked mode, an external program may get + * them. */ +! if (tmode != TMODE_RAW && (crv_status == CRV_SENT +! || u7_status == U7_SENT)) + (void)vpeekc_nomap(); + check_for_codes_from_term(); + } +*************** +*** 3245,3251 **** + # endif + { + /* May need to check for T_CRV response. */ +! if (crv_status == CRV_SENT) + (void)vpeekc_nomap(); + /* Check for termcodes first, otherwise an external program may + * get them. */ +--- 3254,3260 ---- + # endif + { + /* May need to check for T_CRV response. */ +! if (crv_status == CRV_SENT || u7_status == U7_SENT) + (void)vpeekc_nomap(); + /* Check for termcodes first, otherwise an external program may + * get them. */ +*************** +*** 3299,3304 **** +--- 3308,3355 ---- + (void)vpeekc_nomap(); + } + } ++ ++ # if defined(FEAT_MBYTE) || defined(PROTO) ++ /* ++ * Check how the terminal treats ambiguous character width (UAX #11). ++ * First, we move the cursor to (0, 0) and print a test ambiguous character ++ * \u25bd (WHITE DOWN-POINTING TRIANGLE) and query current cursor position. ++ * If the terminal treats \u25bd as single width, the position is (0, 1), ++ * or if it is treated as double width, that will be (0, 2). ++ * This function has the side effect that changes cursor position, so ++ * it must be called immediately after entering termcap mode. ++ */ ++ void ++ may_req_ambiguous_character_width() ++ { ++ if (u7_status == U7_GET ++ && cur_tmode == TMODE_RAW ++ && termcap_active ++ && p_ek ++ # ifdef UNIX ++ && isatty(1) ++ && isatty(read_cmd_fd) ++ # endif ++ && *T_U7 != NUL ++ && !option_was_set((char_u *)"ambiwidth")) ++ { ++ char_u buf[16]; ++ ++ term_windgoto(0, 0); ++ buf[mb_char2bytes(0x25bd, buf)] = 0; ++ 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 ++ * get_keystroke() */ ++ out_flush(); ++ (void)vpeekc_nomap(); ++ } ++ } ++ # endif + #endif + + /* +*************** +*** 4049,4061 **** + /* URXVT mouse uses [#;#;#M, but we are matching [ */ + || key_name[0] == KS_URXVT_MOUSE) + { +! /* Check for xterm version string: "[>{x};{vers};{y}c". Also +! * eat other possible responses to t_RV, rxvt returns +! * "[?1;2c". Also accept CSI instead of [. +! * mrxvt has been reported to have "+" in the version. Assume +! * the escape sequence ends with a letter or one of "{|}~". */ +! if (*T_CRV != NUL && ((tp[0] == ESC && tp[1] == '[' && len >= 3) +! || (tp[0] == CSI && len >= 2))) + { + j = 0; + extra = 0; +--- 4100,4121 ---- + /* URXVT mouse uses [#;#;#M, but we are matching [ */ + || key_name[0] == KS_URXVT_MOUSE) + { +! /* Check for some responses from terminal start with "[" or +! * CSI. +! * +! * - xterm version string: [>{x};{vers};{y}c +! * Also eat other possible responses to t_RV, rxvt returns +! * "[?1;2c". Also accept CSI instead of [. +! * mrxvt has been reported to have "+" in the version. Assume +! * the escape sequence ends with a letter or one of "{|}~". +! * +! * - cursor position report: [{row};{col}R +! * The final byte is 'R'. now it is only used for checking for +! * ambiguous-width character state. +! */ +! if ((*T_CRV != NUL || *T_U7 != NUL) +! && ((tp[0] == ESC && tp[1] == '[' && len >= 3) +! || (tp[0] == CSI && len >= 2))) + { + j = 0; + extra = 0; +*************** +*** 4067,4074 **** + if (i == len) + return -1; /* not enough characters */ + + /* eat it when at least one digit and ending in 'c' */ +! if (i > 2 + (tp[0] != CSI) && tp[i] == 'c') + { + crv_status = CRV_GOT; + +--- 4127,4153 ---- + if (i == len) + return -1; /* not enough characters */ + ++ #ifdef FEAT_MBYTE ++ /* eat it when it has 2 arguments and ends in 'R' */ ++ if (u7_status == U7_SENT && j == 1 && tp[i] == 'R') ++ { ++ char *p = NULL; ++ ++ u7_status = U7_GOT; ++ if (extra == 2) ++ p = "single"; ++ else if (extra == 3) ++ p = "double"; ++ if (p != NULL) ++ set_option_value((char_u *)"ambw", 0L, (char_u *)p, 0); ++ key_name[0] = (int)KS_EXTRA; ++ key_name[1] = (int)KE_IGNORE; ++ slen = i + 1; ++ } ++ else ++ #endif + /* eat it when at least one digit and ending in 'c' */ +! if (*T_CRV != NUL && i > 2 + (tp[0] != CSI) && tp[i] == 'c') + { + crv_status = CRV_GOT; + +*** ../vim-7.3.858/src/term.h 2010-08-15 21:57:25.000000000 +0200 +--- src/term.h 2013-03-13 19:09:03.000000000 +0100 +*************** +*** 83,92 **** + #ifdef FEAT_VERTSPLIT + KS_CSV, /* scroll region vertical */ + #endif +! KS_OP /* original color pair */ + }; + +! #define KS_LAST KS_OP + + /* + * the terminal capabilities are stored in this array +--- 83,93 ---- + #ifdef FEAT_VERTSPLIT + KS_CSV, /* scroll region vertical */ + #endif +! KS_OP, /* original color pair */ +! KS_U7 /* request cursor position */ + }; + +! #define KS_LAST KS_U7 + + /* + * the terminal capabilities are stored in this array +*************** +*** 158,163 **** +--- 159,165 ---- + #define T_CEI (term_str(KS_CEI)) /* end insert mode */ + #define T_CRV (term_str(KS_CRV)) /* request version string */ + #define T_OP (term_str(KS_OP)) /* original color pair */ ++ #define T_U7 (term_str(KS_U7)) /* request cursor position */ + + #define TMODE_COOK 0 /* terminal mode for external cmds and Ex mode */ + #define TMODE_SLEEP 1 /* terminal mode for sleeping (cooked but no echo) */ +*** ../vim-7.3.858/src/proto/term.pro 2012-02-05 22:05:44.000000000 +0100 +--- src/proto/term.pro 2013-03-13 19:09:54.000000000 +0100 +*************** +*** 34,39 **** +--- 34,40 ---- + 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)); +*** ../vim-7.3.858/src/version.c 2013-03-13 19:02:37.000000000 +0100 +--- src/version.c 2013-03-13 19:27:31.000000000 +0100 +*************** +*** 730,731 **** +--- 730,733 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 859, + /**/ + +-- +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 /// From 13d1cd872af463a041745c574af6372b016122ab Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 15 Apr 2013 17:02:21 +0200 Subject: [PATCH 38/82] - patchlevel 860 --- 7.3.860 | 85 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 7.3.860 diff --git a/7.3.860 b/7.3.860 new file mode 100644 index 00000000..fbcab261 --- /dev/null +++ b/7.3.860 @@ -0,0 +1,85 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.860 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.860 +Problem: When using --remote-expr try/catch does not work. (Andrey Radev) +Solution: Set emsg_silent instead of emsg_skip. +Files: src/main.c + + +*** ../vim-7.3.859/src/main.c 2013-03-13 19:29:24.000000000 +0100 +--- src/main.c 2013-03-13 19:46:03.000000000 +0100 +*************** +*** 4025,4032 **** + + /* + * Evaluate an expression that the client sent to a string. +- * Handles disabling error messages and disables debugging, otherwise Vim +- * hangs, waiting for "cont" to be typed. + */ + char_u * + eval_client_expr_to_string(expr) +--- 4025,4030 ---- +*************** +*** 4036,4050 **** + int save_dbl = debug_break_level; + int save_ro = redir_off; + + debug_break_level = -1; + redir_off = 0; +! ++emsg_skip; + + res = eval_to_string(expr, NULL, TRUE); + + debug_break_level = save_dbl; + redir_off = save_ro; +! --emsg_skip; + + /* A client can tell us to redraw, but not to display the cursor, so do + * that here. */ +--- 4034,4054 ---- + int save_dbl = debug_break_level; + int save_ro = redir_off; + ++ /* Disable debugging, otherwise Vim hangs, waiting for "cont" to be ++ * typed. */ + debug_break_level = -1; + redir_off = 0; +! /* Do not display error message, otherwise Vim hangs, waiting for "cont" +! * to be typed. Do generate errors so that try/catch works. */ +! ++emsg_silent; + + res = eval_to_string(expr, NULL, TRUE); + + debug_break_level = save_dbl; + redir_off = save_ro; +! --emsg_silent; +! if (emsg_silent < 0) +! emsg_silent = 0; + + /* A client can tell us to redraw, but not to display the cursor, so do + * that here. */ +*** ../vim-7.3.859/src/version.c 2013-03-13 19:29:24.000000000 +0100 +--- src/version.c 2013-03-13 20:09:47.000000000 +0100 +*************** +*** 730,731 **** +--- 730,733 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 860, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +42. Your virtual girlfriend finds a new net sweetheart with a larger bandwidth. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From ee4e8f4f3a87ddf33f2eea8281c6ff97939d0491 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 15 Apr 2013 17:02:22 +0200 Subject: [PATCH 39/82] - patchlevel 861 --- 7.3.861 | 165 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 165 insertions(+) create mode 100644 7.3.861 diff --git a/7.3.861 b/7.3.861 new file mode 100644 index 00000000..aa91d583 --- /dev/null +++ b/7.3.861 @@ -0,0 +1,165 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.861 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.861 +Problem: ":setlocal number" clears global value of 'relativenumber'. +Solution: Do it properly. (Markus Heidelberg) +Files: src/testdir/test89.in, src/testdir/test89.ok, src/option.c + + +*** ../vim-7.3.860/src/testdir/test89.in 2013-02-14 20:10:28.000000000 +0100 +--- src/testdir/test89.in 2013-03-13 20:27:10.000000000 +0100 +*************** +*** 10,15 **** +--- 10,52 ---- + :$put ='results:' + :$put a + :$put b ++ :" ++ :set nonu nornu ++ :setglobal nu ++ :setlocal rnu ++ :redir @c | setglobal nu? | redir END ++ :set nonu nornu ++ :setglobal rnu ++ :setlocal nu ++ :redir @d | setglobal rnu? | redir END ++ :$put =':setlocal must NOT reset the other global value' ++ :$put c ++ :$put d ++ :" ++ :set nonu nornu ++ :setglobal nu ++ :setglobal rnu ++ :redir @e | setglobal nu? | redir END ++ :set nonu nornu ++ :setglobal rnu ++ :setglobal nu ++ :redir @f | setglobal rnu? | redir END ++ :$put =':setglobal MUST reset the other global value' ++ :$put e ++ :$put f ++ :" ++ :set nonu nornu ++ :set nu ++ :set rnu ++ :redir @g | setglobal nu? | redir END ++ :set nonu nornu ++ :set rnu ++ :set nu ++ :redir @h | setglobal rnu? | redir END ++ :$put =':set MUST reset the other global value' ++ :$put g ++ :$put h ++ :" + :/^results/,$w! test.out + :q! + ENDTEST +*** ../vim-7.3.860/src/testdir/test89.ok 2013-02-13 15:44:22.000000000 +0100 +--- src/testdir/test89.ok 2013-03-13 20:27:10.000000000 +0100 +*************** +*** 5,7 **** +--- 5,22 ---- + + nonumber + relativenumber ++ :setlocal must NOT reset the other global value ++ ++ number ++ ++ relativenumber ++ :setglobal MUST reset the other global value ++ ++ nonumber ++ ++ norelativenumber ++ :set MUST reset the other global value ++ ++ nonumber ++ ++ norelativenumber +*** ../vim-7.3.860/src/option.c 2013-03-13 19:29:24.000000000 +0100 +--- src/option.c 2013-03-13 20:35:20.000000000 +0100 +*************** +*** 7631,7652 **** + } + #endif + +! /* 'number', 'relativenumber' */ +! else if ((int *)varp == &curwin->w_p_nu +! || (int *)varp == &curwin->w_p_rnu) + { +! /* If 'number' is set, reset 'relativenumber'. */ +! /* If 'relativenumber' is set, reset 'number'. */ +! if ((int *)varp == &curwin->w_p_nu && curwin->w_p_nu) +! { +! curwin->w_p_rnu = FALSE; + curwin->w_allbuf_opt.wo_rnu = FALSE; +! } +! if ((int *)varp == &curwin->w_p_rnu && curwin->w_p_rnu) +! { +! curwin->w_p_nu = FALSE; + curwin->w_allbuf_opt.wo_nu = FALSE; +! } + } + + else if ((int *)varp == &curbuf->b_p_ro) +--- 7631,7663 ---- + } + #endif + +! /* If 'number' is set, reset 'relativenumber'. */ +! /* If 'relativenumber' is set, reset 'number'. */ +! else if ((int *)varp == &curwin->w_p_nu && curwin->w_p_nu) + { +! curwin->w_p_rnu = FALSE; +! +! /* Only reset the global value if the own value is set globally. */ +! if (((opt_flags & (OPT_LOCAL | OPT_GLOBAL)) == 0)) + curwin->w_allbuf_opt.wo_rnu = FALSE; +! } +! else if ((int *)varp == &curwin->w_p_rnu && curwin->w_p_rnu) +! { +! curwin->w_p_nu = FALSE; +! +! /* Only reset the global value if the own value is set globally. */ +! if (((opt_flags & (OPT_LOCAL | OPT_GLOBAL)) == 0)) + curwin->w_allbuf_opt.wo_nu = FALSE; +! } +! else if ((int *)varp == &curwin->w_allbuf_opt.wo_nu +! && curwin->w_allbuf_opt.wo_nu) +! { +! curwin->w_allbuf_opt.wo_rnu = FALSE; +! } +! else if ((int *)varp == &curwin->w_allbuf_opt.wo_rnu +! && curwin->w_allbuf_opt.wo_rnu) +! { +! curwin->w_allbuf_opt.wo_nu = FALSE; + } + + else if ((int *)varp == &curbuf->b_p_ro) +*** ../vim-7.3.860/src/version.c 2013-03-13 20:23:17.000000000 +0100 +--- src/version.c 2013-03-13 20:42:09.000000000 +0100 +*************** +*** 730,731 **** +--- 730,733 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 861, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +43. You tell the kids they can't use the computer because "Daddy's got work to + do" and you don't even have a job. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 6e5bc62eae8576a7111350b200d362031a8ebcbb Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 15 Apr 2013 17:02:22 +0200 Subject: [PATCH 40/82] - patchlevel 862 --- 7.3.862 | 215 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 215 insertions(+) create mode 100644 7.3.862 diff --git a/7.3.862 b/7.3.862 new file mode 100644 index 00000000..3ad18363 --- /dev/null +++ b/7.3.862 @@ -0,0 +1,215 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.862 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.862 +Problem: Dragging the status line can be slow. +Solution: Look ahead and drop the drag event if there is a next one. +Files: src/eval.c, src/misc1.c, src/proto/misc1.pro, src/normal.c + + +*** ../vim-7.3.861/src/eval.c 2013-02-26 21:43:28.000000000 +0100 +--- src/eval.c 2013-03-16 14:02:36.000000000 +0100 +*************** +*** 11238,11264 **** + rettv->vval.v_string = vim_strsave(temp); + + #ifdef FEAT_MOUSE +! if (n == K_LEFTMOUSE +! || n == K_LEFTMOUSE_NM +! || n == K_LEFTDRAG +! || n == K_LEFTRELEASE +! || n == K_LEFTRELEASE_NM +! || n == K_MIDDLEMOUSE +! || n == K_MIDDLEDRAG +! || n == K_MIDDLERELEASE +! || n == K_RIGHTMOUSE +! || n == K_RIGHTDRAG +! || n == K_RIGHTRELEASE +! || n == K_X1MOUSE +! || n == K_X1DRAG +! || n == K_X1RELEASE +! || n == K_X2MOUSE +! || n == K_X2DRAG +! || n == K_X2RELEASE +! || n == K_MOUSELEFT +! || n == K_MOUSERIGHT +! || n == K_MOUSEDOWN +! || n == K_MOUSEUP) + { + int row = mouse_row; + int col = mouse_col; +--- 11238,11244 ---- + rettv->vval.v_string = vim_strsave(temp); + + #ifdef FEAT_MOUSE +! if (is_mouse_key(n)) + { + int row = mouse_row; + int col = mouse_col; +*** ../vim-7.3.861/src/misc1.c 2013-03-13 17:01:47.000000000 +0100 +--- src/misc1.c 2013-03-16 14:08:05.000000000 +0100 +*************** +*** 3288,3293 **** +--- 3288,3325 ---- + return r; + } + ++ #if defined(FEAT_MOUSE) || defined(PROTO) ++ /* ++ * Return TRUE if "c" is a mouse key. ++ */ ++ int ++ is_mouse_key(c) ++ int c; ++ { ++ return c == K_LEFTMOUSE ++ || c == K_LEFTMOUSE_NM ++ || c == K_LEFTDRAG ++ || c == K_LEFTRELEASE ++ || c == K_LEFTRELEASE_NM ++ || c == K_MIDDLEMOUSE ++ || c == K_MIDDLEDRAG ++ || c == K_MIDDLERELEASE ++ || c == K_RIGHTMOUSE ++ || c == K_RIGHTDRAG ++ || c == K_RIGHTRELEASE ++ || c == K_MOUSEDOWN ++ || c == K_MOUSEUP ++ || c == K_MOUSELEFT ++ || c == K_MOUSERIGHT ++ || c == K_X1MOUSE ++ || c == K_X1DRAG ++ || c == K_X1RELEASE ++ || c == K_X2MOUSE ++ || c == K_X2DRAG ++ || c == K_X2RELEASE; ++ } ++ #endif ++ + /* + * Get a key stroke directly from the user. + * Ignores mouse clicks and scrollbar events, except a click for the left +*************** +*** 3373,3403 **** + n = TO_SPECIAL(buf[1], buf[2]); + if (buf[1] == KS_MODIFIER + || n == K_IGNORE +! #ifdef FEAT_MOUSE +! || n == K_LEFTMOUSE_NM +! || n == K_LEFTDRAG +! || n == K_LEFTRELEASE +! || n == K_LEFTRELEASE_NM +! || n == K_MIDDLEMOUSE +! || n == K_MIDDLEDRAG +! || n == K_MIDDLERELEASE +! || n == K_RIGHTMOUSE +! || n == K_RIGHTDRAG +! || n == K_RIGHTRELEASE +! || n == K_MOUSEDOWN +! || n == K_MOUSEUP +! || n == K_MOUSELEFT +! || n == K_MOUSERIGHT +! || n == K_X1MOUSE +! || n == K_X1DRAG +! || n == K_X1RELEASE +! || n == K_X2MOUSE +! || n == K_X2DRAG +! || n == K_X2RELEASE +! # ifdef FEAT_GUI + || n == K_VER_SCROLLBAR + || n == K_HOR_SCROLLBAR +- # endif + #endif + ) + { +--- 3405,3414 ---- + n = TO_SPECIAL(buf[1], buf[2]); + if (buf[1] == KS_MODIFIER + || n == K_IGNORE +! || (is_mouse_key(n) && n != K_LEFTMOUSE) +! #ifdef FEAT_GUI + || n == K_VER_SCROLLBAR + || n == K_HOR_SCROLLBAR + #endif + ) + { +*** ../vim-7.3.861/src/proto/misc1.pro 2012-11-20 16:56:49.000000000 +0100 +--- src/proto/misc1.pro 2013-03-16 14:02:33.000000000 +0100 +*************** +*** 42,47 **** +--- 42,48 ---- + void check_status __ARGS((buf_T *buf)); + void change_warning __ARGS((int col)); + int ask_yesno __ARGS((char_u *str, int direct)); ++ int is_mouse_key __ARGS((int c)); + int get_keystroke __ARGS((void)); + int get_number __ARGS((int colon, int *mouse_used)); + int prompt_for_number __ARGS((int *mouse_used)); +*** ../vim-7.3.861/src/normal.c 2013-03-13 19:02:37.000000000 +0100 +--- src/normal.c 2013-03-16 14:09:34.000000000 +0100 +*************** +*** 2443,2449 **** + return FALSE; + } + +! which_button = get_mouse_button(KEY2TERMCAP1(c), &is_click, &is_drag); + + #ifdef FEAT_MOUSESHAPE + /* May have stopped dragging the status or separator line. The pointer is +--- 2443,2473 ---- + return FALSE; + } + +! for (;;) +! { +! which_button = get_mouse_button(KEY2TERMCAP1(c), &is_click, &is_drag); +! if (is_drag) +! { +! /* If the next character is the same mouse event then use that +! * one. Speeds up dragging the status line. */ +! if (vpeekc() != NUL) +! { +! int nc; +! int save_mouse_row = mouse_row; +! int save_mouse_col = mouse_col; +! +! /* Need to get the character, peeking doesn't get the actual +! * one. */ +! nc = safe_vgetc(); +! if (c == nc) +! continue; +! vungetc(nc); +! mouse_row = save_mouse_row; +! mouse_col = save_mouse_col; +! } +! } +! break; +! } + + #ifdef FEAT_MOUSESHAPE + /* May have stopped dragging the status or separator line. The pointer is +*** ../vim-7.3.861/src/version.c 2013-03-13 20:42:28.000000000 +0100 +--- src/version.c 2013-03-16 14:18:36.000000000 +0100 +*************** +*** 730,731 **** +--- 730,733 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 862, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +53. To find out what time it is, you send yourself an e-mail and check the + "Date:" field. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 9259b4aafd82b8d4195838fef3e3545221b8cf59 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 15 Apr 2013 17:02:23 +0200 Subject: [PATCH 41/82] - patchlevel 863 --- 7.3.863 | 91 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100644 7.3.863 diff --git a/7.3.863 b/7.3.863 new file mode 100644 index 00000000..64bd9ba1 --- /dev/null +++ b/7.3.863 @@ -0,0 +1,91 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.863 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.863 (after 7.3.859) +Problem: Problem with 'ambiwidth' detection for ANSI terminal. +Solution: Work around not recognizing a term response. (Hayaki Saito) +Files: src/term.c + + +*** ../vim-7.3.862/src/term.c 2013-03-13 19:29:24.000000000 +0100 +--- src/term.c 2013-03-16 14:29:00.000000000 +0100 +*************** +*** 3926,3933 **** + * Check at several positions in typebuf.tb_buf[], to catch something like + * "x" that can be mapped. Stop at max_offset, because characters + * after that cannot be used for mapping, and with @r commands +! * typebuf.tb_buf[] +! * can become very long. + * This is used often, KEEP IT FAST! + */ + for (offset = 0; offset < max_offset; ++offset) +--- 3926,3932 ---- + * Check at several positions in typebuf.tb_buf[], to catch something like + * "x" that can be mapped. Stop at max_offset, because characters + * after that cannot be used for mapping, and with @r commands +! * typebuf.tb_buf[] can become very long. + * This is used often, KEEP IT FAST! + */ + for (offset = 0; offset < max_offset; ++offset) +*************** +*** 4098,4104 **** + #ifdef FEAT_TERMRESPONSE + if (key_name[0] == NUL + /* URXVT mouse uses [#;#;#M, but we are matching [ */ +! || key_name[0] == KS_URXVT_MOUSE) + { + /* Check for some responses from terminal start with "[" or + * CSI. +--- 4097,4107 ---- + #ifdef FEAT_TERMRESPONSE + if (key_name[0] == NUL + /* URXVT mouse uses [#;#;#M, but we are matching [ */ +! || key_name[0] == KS_URXVT_MOUSE +! # ifdef FEAT_MBYTE +! || u7_status == U7_SENT +! # endif +! ) + { + /* Check for some responses from terminal start with "[" or + * CSI. +*************** +*** 4129,4135 **** + + #ifdef FEAT_MBYTE + /* eat it when it has 2 arguments and ends in 'R' */ +! if (u7_status == U7_SENT && j == 1 && tp[i] == 'R') + { + char *p = NULL; + +--- 4132,4138 ---- + + #ifdef FEAT_MBYTE + /* eat it when it has 2 arguments and ends in 'R' */ +! if (j == 1 && tp[i] == 'R') + { + char *p = NULL; + +*** ../vim-7.3.862/src/version.c 2013-03-16 14:20:45.000000000 +0100 +--- src/version.c 2013-03-16 14:33:16.000000000 +0100 +*************** +*** 730,731 **** +--- 730,733 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 863, + /**/ + +-- +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 /// From aaee7ef92a728a8a209dfb0a2ceb43938f5a58f9 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 15 Apr 2013 17:02:23 +0200 Subject: [PATCH 42/82] - patchlevel 864 --- 7.3.864 | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 7.3.864 diff --git a/7.3.864 b/7.3.864 new file mode 100644 index 00000000..c8d0e201 --- /dev/null +++ b/7.3.864 @@ -0,0 +1,48 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.864 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.864 (after 7.3.862) +Problem: Can't build without the mouse feature. +Solution: Add an #ifdef. (Ike Devolder) +Files: src/misc1.c + + +*** ../vim-7.3.863/src/misc1.c 2013-03-16 14:20:45.000000000 +0100 +--- src/misc1.c 2013-03-16 21:33:08.000000000 +0100 +*************** +*** 3405,3411 **** +--- 3405,3413 ---- + n = TO_SPECIAL(buf[1], buf[2]); + if (buf[1] == KS_MODIFIER + || n == K_IGNORE ++ #ifdef FEAT_MOUSE + || (is_mouse_key(n) && n != K_LEFTMOUSE) ++ #endif + #ifdef FEAT_GUI + || n == K_VER_SCROLLBAR + || n == K_HOR_SCROLLBAR +*** ../vim-7.3.863/src/version.c 2013-03-16 14:33:32.000000000 +0100 +--- src/version.c 2013-03-16 21:34:15.000000000 +0100 +*************** +*** 730,731 **** +--- 730,733 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 864, + /**/ + +-- +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 /// From be0e497d550ad1ab9c3f4a2aa4d42c1bda67cdb3 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 15 Apr 2013 17:02:24 +0200 Subject: [PATCH 43/82] - patchlevel 865 --- 7.3.865 | 74 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 7.3.865 diff --git a/7.3.865 b/7.3.865 new file mode 100644 index 00000000..faffde0f --- /dev/null +++ b/7.3.865 @@ -0,0 +1,74 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.865 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.865 (after 7.3.862) +Problem: Mouse position may be wrong. +Solution: Let vungetc() restore the mouse position. +Files: src/getchar.c + + +*** ../vim-7.3.864/src/getchar.c 2012-06-06 12:06:10.000000000 +0200 +--- src/getchar.c 2013-03-16 21:41:02.000000000 +0100 +*************** +*** 1337,1342 **** +--- 1337,1346 ---- + + static int old_char = -1; /* character put back by vungetc() */ + static int old_mod_mask; /* mod_mask for ungotten character */ ++ #ifdef FEAT_MOUSE ++ static int old_mouse_row; /* mouse_row related to old_char */ ++ static int old_mouse_col; /* mouse_col related to old_char */ ++ #endif + + #if defined(FEAT_EVAL) || defined(FEAT_EX_EXTRA) || defined(PROTO) + +*************** +*** 1567,1572 **** +--- 1571,1580 ---- + c = old_char; + old_char = -1; + mod_mask = old_mod_mask; ++ #ifdef FEAT_MOUSE ++ mouse_row = old_mouse_row; ++ mouse_col = old_mouse_col; ++ #endif + } + else + { +*************** +*** 1877,1882 **** +--- 1885,1894 ---- + { + old_char = c; + old_mod_mask = mod_mask; ++ #ifdef FEAT_MOUSE ++ old_mouse_row = mouse_row; ++ old_mouse_col = mouse_col; ++ #endif + } + + /* +*** ../vim-7.3.864/src/version.c 2013-03-16 21:35:28.000000000 +0100 +--- src/version.c 2013-03-16 21:38:44.000000000 +0100 +*************** +*** 730,731 **** +--- 730,733 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 865, + /**/ + +-- +Creating the world with Emacs: M-x let-there-be-light +Creating the world with Vim: :make world + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 219fed690413ced179a058b815962fabce8b32d7 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 15 Apr 2013 17:02:25 +0200 Subject: [PATCH 44/82] - patchlevel 866 --- 7.3.866 | 196 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 196 insertions(+) create mode 100644 7.3.866 diff --git a/7.3.866 b/7.3.866 new file mode 100644 index 00000000..c0da32d2 --- /dev/null +++ b/7.3.866 @@ -0,0 +1,196 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.866 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.866 +Problem: Not serving the X selection during system() isn't nice. +Solution: When using fork() do not loose the selection, keep serving it. + Add a loop similar to handling I/O. (Yukihiro Nakadaira) +Files: src/os_unix.c + + +*** ../vim-7.3.865/src/os_unix.c 2013-03-13 17:50:20.000000000 +0100 +--- src/os_unix.c 2013-03-19 12:34:04.000000000 +0100 +*************** +*** 132,137 **** +--- 132,138 ---- + # include + # include + static Widget xterm_Shell = (Widget)0; ++ static void clip_update __ARGS((void)); + static void xterm_update __ARGS((void)); + # endif + +*************** +*** 1138,1148 **** +--- 1139,1151 ---- + + # if defined(FEAT_CLIPBOARD) && defined(FEAT_X11) + static void loose_clipboard __ARGS((void)); ++ # ifdef USE_SYSTEM + static void save_clipboard __ARGS((void)); + static void restore_clipboard __ARGS((void)); + + static void *clip_star_save = NULL; + static void *clip_plus_save = NULL; ++ # endif + + /* + * Called when Vim is going to sleep or execute a shell command. +*************** +*** 1164,1169 **** +--- 1167,1173 ---- + } + } + ++ # ifdef USE_SYSTEM + /* + * Save clipboard text to restore later. + */ +*************** +*** 1199,1204 **** +--- 1203,1209 ---- + clip_plus_save = NULL; + } + } ++ # endif + #endif + + /* +*************** +*** 4009,4021 **** + if (options & SHELL_COOKED) + settmode(TMODE_COOK); /* set to normal mode */ + +- # if defined(FEAT_CLIPBOARD) && defined(FEAT_X11) +- /* Disown the clipboard, because is the executed command tries to obtain a +- * selection and we own it we get a deadlock. */ +- save_clipboard(); +- loose_clipboard(); +- # endif +- + /* + * Do this loop twice: + * 1: find number of arguments +--- 4014,4019 ---- +*************** +*** 4788,4793 **** +--- 4786,4796 ---- + } + else + wait_pid = 0; ++ ++ # if defined(FEAT_CLIPBOARD) && defined(FEAT_X11) ++ /* Handle any X events, e.g. serving the clipboard. */ ++ clip_update(); ++ # endif + } + finished: + p_more = p_more_save; +*************** +*** 4814,4819 **** +--- 4817,4861 ---- + close(toshell_fd); + close(fromshell_fd); + } ++ # if defined(FEAT_CLIPBOARD) && defined(FEAT_X11) ++ else ++ { ++ /* ++ * Similar to the loop above, but only handle X events, no ++ * I/O. ++ */ ++ for (;;) ++ { ++ if (got_int) ++ { ++ /* CTRL-C sends a signal to the child, we ignore it ++ * ourselves */ ++ # ifdef HAVE_SETSID ++ kill(-pid, SIGINT); ++ # else ++ kill(0, SIGINT); ++ # endif ++ got_int = FALSE; ++ } ++ # ifdef __NeXT__ ++ wait_pid = wait4(pid, &status, WNOHANG, (struct rusage *)0); ++ # else ++ wait_pid = waitpid(pid, &status, WNOHANG); ++ # endif ++ if ((wait_pid == (pid_t)-1 && errno == ECHILD) ++ || (wait_pid == pid && WIFEXITED(status))) ++ { ++ wait_pid = pid; ++ break; ++ } ++ ++ /* Handle any X events, e.g. serving the clipboard. */ ++ clip_update(); ++ ++ mch_delay(10L, TRUE); ++ } ++ } ++ # endif + + /* + * Wait until our child has exited. +*************** +*** 4884,4892 **** + # ifdef FEAT_TITLE + resettitle(); + # endif +- # if defined(FEAT_CLIPBOARD) && defined(FEAT_X11) +- restore_clipboard(); +- # endif + vim_free(newcmd); + + return retval; +--- 4926,4931 ---- +*************** +*** 6868,6873 **** +--- 6907,6927 ---- + # endif + + /* ++ * Catch up with GUI or X events. ++ */ ++ static void ++ clip_update() ++ { ++ # ifdef FEAT_GUI ++ if (gui.in_use) ++ gui_mch_update(); ++ else ++ # endif ++ if (xterm_Shell != (Widget)0) ++ xterm_update(); ++ } ++ ++ /* + * Catch up with any queued X events. This may put keyboard input into the + * input buffer, call resize call-backs, trigger timers etc. If there is + * nothing in the X event queue (& no timers pending), then we return +*** ../vim-7.3.865/src/version.c 2013-03-16 21:42:12.000000000 +0100 +--- src/version.c 2013-03-19 12:30:16.000000000 +0100 +*************** +*** 730,731 **** +--- 730,733 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 866, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +71. You wonder how people walk + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 7f399bb764f8aa7a8b5c0b68db8862c003f83511 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 15 Apr 2013 17:02:25 +0200 Subject: [PATCH 45/82] - patchlevel 867 --- 7.3.867 | 279 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 279 insertions(+) create mode 100644 7.3.867 diff --git a/7.3.867 b/7.3.867 new file mode 100644 index 00000000..68f4312b --- /dev/null +++ b/7.3.867 @@ -0,0 +1,279 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.867 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.867 +Problem: Matchparen does not update match when using auto-indenting. + (Marc Aldorasi) +Solution: Add the TextChanged and TextChangedI autocommand events. +Files: runtime/plugin/matchparen.vim, src/main.c, src/edit.c, + src/globals.h, src/vim.h, src/fileio.c, src/proto/fileio.pro, + runtime/doc/autocmd.txt + + +*** ../vim-7.3.866/runtime/plugin/matchparen.vim 2010-08-15 21:57:19.000000000 +0200 +--- runtime/plugin/matchparen.vim 2013-03-19 13:16:46.000000000 +0100 +*************** +*** 1,6 **** + " Vim plugin for showing matching parens + " Maintainer: Bram Moolenaar +! " Last Change: 2008 Sep 03 + + " Exit quickly when: + " - this plugin was already loaded (or disabled) +--- 1,6 ---- + " Vim plugin for showing matching parens + " Maintainer: Bram Moolenaar +! " Last Change: 2013 Mar 19 + + " Exit quickly when: + " - this plugin was already loaded (or disabled) +*************** +*** 14,19 **** +--- 14,22 ---- + augroup matchparen + " Replace all matchparen autocommands + autocmd! CursorMoved,CursorMovedI,WinEnter * call s:Highlight_Matching_Pair() ++ if exists('##TextChanged') ++ autocmd! TextChanged,TextChangedI * call s:Highlight_Matching_Pair() ++ endif + augroup END + + " Skip the rest if it was already done. +*************** +*** 82,89 **** + endif + + " When not in a string or comment ignore matches inside them. + let s_skip ='synIDattr(synID(line("."), col("."), 0), "name") ' . +! \ '=~? "string\\|character\\|singlequote\\|comment"' + execute 'if' s_skip '| let s_skip = 0 | endif' + + " Limit the search to lines visible in the window. +--- 85,93 ---- + 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. +*** ../vim-7.3.866/src/main.c 2013-03-13 20:23:17.000000000 +0100 +--- src/main.c 2013-03-19 13:00:34.000000000 +0100 +*************** +*** 1168,1173 **** +--- 1168,1186 ---- + } + #endif + ++ #ifdef FEAT_AUTOCMD ++ /* Trigger TextChanged if b_changedtick differs. */ ++ if (!finish_op && has_textchanged() ++ && last_changedtick != curbuf->b_changedtick) ++ { ++ if (last_changedtick_buf == curbuf) ++ apply_autocmds(EVENT_TEXTCHANGED, NULL, NULL, ++ FALSE, curbuf); ++ last_changedtick_buf = curbuf; ++ last_changedtick = curbuf->b_changedtick; ++ } ++ #endif ++ + #if defined(FEAT_DIFF) && defined(FEAT_SCROLLBIND) + /* Scroll-binding for diff mode may have been postponed until + * here. Avoids doing it for every change. */ +*** ../vim-7.3.866/src/edit.c 2013-03-07 19:38:49.000000000 +0100 +--- src/edit.c 2013-03-19 13:08:46.000000000 +0100 +*************** +*** 1593,1598 **** +--- 1593,1613 ---- + 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) +*** ../vim-7.3.866/src/globals.h 2013-02-26 14:56:24.000000000 +0100 +--- src/globals.h 2013-03-19 13:11:35.000000000 +0100 +*************** +*** 1057,1067 **** + EXTERN int autocmd_bufnr INIT(= 0); /* fnum for on cmdline */ + EXTERN char_u *autocmd_match INIT(= NULL); /* name for on cmdline */ + EXTERN int did_cursorhold INIT(= FALSE); /* set when CursorHold t'gerd */ +! EXTERN pos_T last_cursormoved /* for CursorMoved event */ + # ifdef DO_INIT + = INIT_POS_T(0, 0, 0) + # endif + ; + #endif + + #ifdef FEAT_WINDOWS +--- 1057,1069 ---- + EXTERN int autocmd_bufnr INIT(= 0); /* fnum for on cmdline */ + EXTERN char_u *autocmd_match INIT(= NULL); /* name for on cmdline */ + EXTERN int did_cursorhold INIT(= FALSE); /* set when CursorHold t'gerd */ +! EXTERN pos_T last_cursormoved /* for CursorMoved event */ + # ifdef DO_INIT + = INIT_POS_T(0, 0, 0) + # endif + ; ++ EXTERN int last_changedtick INIT(= 0); /* for TextChanged event */ ++ EXTERN buf_T *last_changedtick_buf INIT(= NULL); + #endif + + #ifdef FEAT_WINDOWS +*** ../vim-7.3.866/src/vim.h 2013-02-26 14:56:24.000000000 +0100 +--- src/vim.h 2013-03-19 13:07:00.000000000 +0100 +*************** +*** 1300,1305 **** +--- 1300,1307 ---- + EVENT_TABENTER, /* after entering a tab page */ + EVENT_SHELLCMDPOST, /* after ":!cmd" */ + EVENT_SHELLFILTERPOST, /* after ":1,2!cmd", ":w !cmd", ":r !cmd". */ ++ EVENT_TEXTCHANGED, /* text was modified */ ++ EVENT_TEXTCHANGEDI, /* text was modified in Insert mode*/ + NUM_EVENTS /* MUST be the last one */ + }; + +*** ../vim-7.3.866/src/fileio.c 2013-01-30 14:13:52.000000000 +0100 +--- src/fileio.c 2013-03-19 13:08:31.000000000 +0100 +*************** +*** 7713,7718 **** +--- 7713,7720 ---- + {"TabLeave", EVENT_TABLEAVE}, + {"TermChanged", EVENT_TERMCHANGED}, + {"TermResponse", EVENT_TERMRESPONSE}, ++ {"TextChanged", EVENT_TEXTCHANGED}, ++ {"TextChangedI", EVENT_TEXTCHANGEDI}, + {"User", EVENT_USER}, + {"VimEnter", EVENT_VIMENTER}, + {"VimLeave", EVENT_VIMLEAVE}, +*************** +*** 9138,9143 **** +--- 9140,9163 ---- + } + + /* ++ * Return TRUE when there is a TextChanged autocommand defined. ++ */ ++ int ++ has_textchanged() ++ { ++ return (first_autopat[(int)EVENT_TEXTCHANGED] != NULL); ++ } ++ ++ /* ++ * Return TRUE when there is a TextChangedI autocommand defined. ++ */ ++ int ++ has_textchangedI() ++ { ++ return (first_autopat[(int)EVENT_TEXTCHANGEDI] != NULL); ++ } ++ ++ /* + * Return TRUE when there is an InsertCharPre autocommand defined. + */ + int +*** ../vim-7.3.866/src/proto/fileio.pro 2012-12-05 19:13:11.000000000 +0100 +--- src/proto/fileio.pro 2013-03-19 13:10:13.000000000 +0100 +*************** +*** 44,49 **** +--- 44,51 ---- + int trigger_cursorhold __ARGS((void)); + int has_cursormoved __ARGS((void)); + int has_cursormovedI __ARGS((void)); ++ int has_textchanged __ARGS((void)); ++ int has_textchangedI __ARGS((void)); + int has_insertcharpre __ARGS((void)); + void block_autocmds __ARGS((void)); + void unblock_autocmds __ARGS((void)); +*** ../vim-7.3.866/runtime/doc/autocmd.txt 2012-03-07 20:13:44.000000000 +0100 +--- runtime/doc/autocmd.txt 2013-03-19 13:22:37.000000000 +0100 +*************** +*** 805,817 **** + TermResponse After the response to |t_RV| is received from + the terminal. The value of |v:termresponse| + can be used to do things depending on the +! terminal version. + *User* + User Never executed automatically. To be used for + autocommands that are only executed with + ":doautocmd". + *UserGettingBored* +! UserGettingBored When the user hits CTRL-C. Just kidding! :-) + *VimEnter* + VimEnter After doing all the startup stuff, including + loading .vimrc files, executing the "-c cmd" +--- 828,858 ---- + TermResponse After the response to |t_RV| is received from + the terminal. The value of |v:termresponse| + can be used to do things depending on the +! terminal version. Note that this event may be +! triggered halfway executing another event, +! especially if file I/O, a shell command or +! anything else that takes time is involved. +! *TextChanged* +! TextChanged After a change was made to the text in the +! current buffer in Normal mode. That is when +! |b:changedtick| has changed. +! Not triggered when there is typeahead or when +! an operator is pending. +! Careful: This is triggered very often, don't +! do anything that the user does not expect or +! that is slow. +! *TextChangedI* +! TextChangedI After a change was made to the text in the +! current buffer in Insert mode. +! Not triggered when the popup menu is visible. +! Otherwise the same as TextChanged. + *User* + User Never executed automatically. To be used for + autocommands that are only executed with + ":doautocmd". + *UserGettingBored* +! UserGettingBored When the user presses the same key 42 times. +! Just kidding! :-) + *VimEnter* + VimEnter After doing all the startup stuff, including + loading .vimrc files, executing the "-c cmd" +*** ../vim-7.3.866/src/version.c 2013-03-19 12:35:33.000000000 +0100 +--- src/version.c 2013-03-19 13:29:58.000000000 +0100 +*************** +*** 730,731 **** +--- 730,733 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 867, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +73. You give your dog used motherboards instead of bones + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 20d8e8e0d2d51eec682732788bc5cf92e4b6a755 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 15 Apr 2013 17:02:26 +0200 Subject: [PATCH 46/82] - patchlevel 868 --- 7.3.868 | 90 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 7.3.868 diff --git a/7.3.868 b/7.3.868 new file mode 100644 index 00000000..56a0225e --- /dev/null +++ b/7.3.868 @@ -0,0 +1,90 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.868 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.868 +Problem: When at the hit-return prompt and using "k" while no text has + scrolled off screen, then using "j", an empty line is displayed. +Solution: Only act on "k" when text scrolled off screen. Also accept + page-up and page-down. (cptstubing) +Files: src/message.c + + +*** ../vim-7.3.867/src/message.c 2012-11-14 18:10:49.000000000 +0100 +--- src/message.c 2013-03-19 13:50:16.000000000 +0100 +*************** +*** 976,985 **** + */ + if (p_more && !p_cp) + { +! if (c == 'b' || c == 'k' || c == 'u' || c == 'g' || c == K_UP) + { +! /* scroll back to show older messages */ +! do_more_prompt(c); + if (quit_more) + { + c = CAR; /* just pretend CR was hit */ +--- 976,997 ---- + */ + if (p_more && !p_cp) + { +! if (c == 'b' || c == 'k' || c == 'u' || c == 'g' +! || c == K_UP || c == K_PAGEUP) + { +! if (msg_scrolled > Rows) +! /* scroll back to show older messages */ +! do_more_prompt(c); +! else +! { +! msg_didout = FALSE; +! c = K_IGNORE; +! msg_col = +! #ifdef FEAT_RIGHTLEFT +! cmdmsg_rl ? Columns - 1 : +! #endif +! 0; +! } + if (quit_more) + { + c = CAR; /* just pretend CR was hit */ +*************** +*** 993,999 **** + } + } + else if (msg_scrolled > Rows - 2 +! && (c == 'j' || c == K_DOWN || c == 'd' || c == 'f')) + c = K_IGNORE; + } + } while ((had_got_int && c == Ctrl_C) +--- 1005,1012 ---- + } + } + else if (msg_scrolled > Rows - 2 +! && (c == 'j' || c == 'd' || c == 'f' +! || c == K_DOWN || c == K_PAGEDOWN)) + c = K_IGNORE; + } + } while ((had_got_int && c == Ctrl_C) +*** ../vim-7.3.867/src/version.c 2013-03-19 13:33:18.000000000 +0100 +--- src/version.c 2013-03-19 13:53:02.000000000 +0100 +*************** +*** 730,731 **** +--- 730,733 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 868, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +74. Your most erotic dreams are about cybersex + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 4e368ca8dbb940cd3ab80e8556567e74de557e41 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 15 Apr 2013 17:02:26 +0200 Subject: [PATCH 47/82] - patchlevel 869 --- 7.3.869 | 358 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 358 insertions(+) create mode 100644 7.3.869 diff --git a/7.3.869 b/7.3.869 new file mode 100644 index 00000000..a848f0cd --- /dev/null +++ b/7.3.869 @@ -0,0 +1,358 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.869 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.869 +Problem: bufwinnr() matches buffers in other tabs. +Solution: For bufwinnr() and ? only match buffers in the current tab. + (Alexey Radkov) +Files: src/buffer.c, src/diff.c, src/eval.c, src/ex_docmd.c, + src/if_perl.xs, src/proto/buffer.pro + + +*** ../vim-7.3.868/src/buffer.c 2013-02-17 15:45:34.000000000 +0100 +--- src/buffer.c 2013-03-19 14:19:17.000000000 +0100 +*************** +*** 928,934 **** + if (!VIM_ISDIGIT(*arg)) + { + p = skiptowhite_esc(arg); +! bnr = buflist_findpat(arg, p, command == DOBUF_WIPE, FALSE); + if (bnr < 0) /* failed */ + break; + arg = p; +--- 928,935 ---- + if (!VIM_ISDIGIT(*arg)) + { + p = skiptowhite_esc(arg); +! bnr = buflist_findpat(arg, p, command == DOBUF_WIPE, +! FALSE, FALSE); + if (bnr < 0) /* failed */ + break; + arg = p; +*************** +*** 2129,2146 **** + return NULL; + } + +! #if defined(FEAT_LISTCMDS) || defined(FEAT_EVAL) || defined(FEAT_PERL) || defined(PROTO) + /* + * Find file in buffer list by a regexp pattern. + * Return fnum of the found buffer. + * Return < 0 for error. + */ + int +! buflist_findpat(pattern, pattern_end, unlisted, diffmode) + char_u *pattern; + char_u *pattern_end; /* pointer to first char after pattern */ + int unlisted; /* find unlisted buffers */ + int diffmode UNUSED; /* find diff-mode buffers only */ + { + buf_T *buf; + regprog_T *prog; +--- 2130,2149 ---- + return NULL; + } + +! #if defined(FEAT_LISTCMDS) || defined(FEAT_EVAL) || defined(FEAT_PERL) \ +! || defined(PROTO) + /* + * Find file in buffer list by a regexp pattern. + * Return fnum of the found buffer. + * Return < 0 for error. + */ + int +! buflist_findpat(pattern, pattern_end, unlisted, diffmode, curtab_only) + char_u *pattern; + char_u *pattern_end; /* pointer to first char after pattern */ + int unlisted; /* find unlisted buffers */ + int diffmode UNUSED; /* find diff-mode buffers only */ ++ int curtab_only; /* find buffers in current tab only */ + { + buf_T *buf; + regprog_T *prog; +*************** +*** 2208,2213 **** +--- 2211,2233 ---- + #endif + && buflist_match(prog, buf) != NULL) + { ++ if (curtab_only) ++ { ++ /* Ignore the match if the buffer is not open in ++ * the current tab. */ ++ #ifdef FEAT_WINDOWS ++ win_T *wp; ++ ++ for (wp = firstwin; wp != NULL; wp = wp->w_next) ++ if (wp->w_buffer == buf) ++ break; ++ if (wp == NULL) ++ continue; ++ #else ++ if (curwin->w_buffer != buf) ++ continue; ++ #endif ++ } + if (match >= 0) /* already found a match */ + { + match = -2; +*** ../vim-7.3.868/src/diff.c 2012-10-21 22:18:17.000000000 +0200 +--- src/diff.c 2013-03-19 14:11:40.000000000 +0100 +*************** +*** 2152,2158 **** + i = atol((char *)eap->arg); + else + { +! i = buflist_findpat(eap->arg, p, FALSE, TRUE); + if (i < 0) + return; /* error message already given */ + } +--- 2152,2158 ---- + i = atol((char *)eap->arg); + else + { +! i = buflist_findpat(eap->arg, p, FALSE, TRUE, FALSE); + if (i < 0) + return; /* error message already given */ + } +*** ../vim-7.3.868/src/eval.c 2013-03-16 14:20:45.000000000 +0100 +--- src/eval.c 2013-03-19 14:11:40.000000000 +0100 +*************** +*** 9019,9032 **** + rettv->vval.v_number = (buf != NULL && buf->b_ml.ml_mfp != NULL); + } + +! static buf_T *get_buf_tv __ARGS((typval_T *tv)); + + /* + * Get buffer by number or pattern. + */ + static buf_T * +! get_buf_tv(tv) + typval_T *tv; + { + char_u *name = tv->vval.v_string; + int save_magic; +--- 9019,9033 ---- + rettv->vval.v_number = (buf != NULL && buf->b_ml.ml_mfp != NULL); + } + +! static buf_T *get_buf_tv __ARGS((typval_T *tv, int curtab_only)); + + /* + * Get buffer by number or pattern. + */ + static buf_T * +! get_buf_tv(tv, curtab_only) + typval_T *tv; ++ int curtab_only; + { + char_u *name = tv->vval.v_string; + int save_magic; +*************** +*** 9049,9055 **** + p_cpo = (char_u *)""; + + buf = buflist_findnr(buflist_findpat(name, name + STRLEN(name), +! TRUE, FALSE)); + + p_magic = save_magic; + p_cpo = save_cpo; +--- 9050,9056 ---- + p_cpo = (char_u *)""; + + buf = buflist_findnr(buflist_findpat(name, name + STRLEN(name), +! TRUE, FALSE, curtab_only)); + + p_magic = save_magic; + p_cpo = save_cpo; +*************** +*** 9073,9079 **** + + (void)get_tv_number(&argvars[0]); /* issue errmsg if type error */ + ++emsg_off; +! buf = get_buf_tv(&argvars[0]); + rettv->v_type = VAR_STRING; + if (buf != NULL && buf->b_fname != NULL) + rettv->vval.v_string = vim_strsave(buf->b_fname); +--- 9074,9080 ---- + + (void)get_tv_number(&argvars[0]); /* issue errmsg if type error */ + ++emsg_off; +! buf = get_buf_tv(&argvars[0], FALSE); + rettv->v_type = VAR_STRING; + if (buf != NULL && buf->b_fname != NULL) + rettv->vval.v_string = vim_strsave(buf->b_fname); +*************** +*** 9096,9102 **** + + (void)get_tv_number(&argvars[0]); /* issue errmsg if type error */ + ++emsg_off; +! buf = get_buf_tv(&argvars[0]); + --emsg_off; + + /* If the buffer isn't found and the second argument is not zero create a +--- 9097,9103 ---- + + (void)get_tv_number(&argvars[0]); /* issue errmsg if type error */ + ++emsg_off; +! buf = get_buf_tv(&argvars[0], FALSE); + --emsg_off; + + /* If the buffer isn't found and the second argument is not zero create a +*************** +*** 9131,9137 **** + + (void)get_tv_number(&argvars[0]); /* issue errmsg if type error */ + ++emsg_off; +! buf = get_buf_tv(&argvars[0]); + #ifdef FEAT_WINDOWS + for (wp = firstwin; wp; wp = wp->w_next) + { +--- 9132,9138 ---- + + (void)get_tv_number(&argvars[0]); /* issue errmsg if type error */ + ++emsg_off; +! buf = get_buf_tv(&argvars[0], TRUE); + #ifdef FEAT_WINDOWS + for (wp = firstwin; wp; wp = wp->w_next) + { +*************** +*** 11095,11101 **** + + (void)get_tv_number(&argvars[0]); /* issue errmsg if type error */ + ++emsg_off; +! buf = get_buf_tv(&argvars[0]); + --emsg_off; + + lnum = get_tv_lnum_buf(&argvars[1], buf); +--- 11096,11102 ---- + + (void)get_tv_number(&argvars[0]); /* issue errmsg if type error */ + ++emsg_off; +! buf = get_buf_tv(&argvars[0], FALSE); + --emsg_off; + + lnum = get_tv_lnum_buf(&argvars[1], buf); +*************** +*** 11123,11129 **** + (void)get_tv_number(&argvars[0]); /* issue errmsg if type error */ + varname = get_tv_string_chk(&argvars[1]); + ++emsg_off; +! buf = get_buf_tv(&argvars[0]); + + if (argvars[2].v_type != VAR_UNKNOWN) + /* set the default value */ +--- 11124,11130 ---- + (void)get_tv_number(&argvars[0]); /* issue errmsg if type error */ + varname = get_tv_string_chk(&argvars[1]); + ++emsg_off; +! buf = get_buf_tv(&argvars[0], FALSE); + + if (argvars[2].v_type != VAR_UNKNOWN) + /* set the default value */ +*************** +*** 16216,16222 **** + return; + (void)get_tv_number(&argvars[0]); /* issue errmsg if type error */ + varname = get_tv_string_chk(&argvars[1]); +! buf = get_buf_tv(&argvars[0]); + varp = &argvars[2]; + + if (buf != NULL && varname != NULL && varp != NULL) +--- 16217,16223 ---- + return; + (void)get_tv_number(&argvars[0]); /* issue errmsg if type error */ + varname = get_tv_string_chk(&argvars[1]); +! buf = get_buf_tv(&argvars[0], FALSE); + varp = &argvars[2]; + + if (buf != NULL && varname != NULL && varp != NULL) +*** ../vim-7.3.868/src/ex_docmd.c 2013-03-13 18:30:39.000000000 +0100 +--- src/ex_docmd.c 2013-03-19 14:15:17.000000000 +0100 +*************** +*** 2645,2651 **** + while (p > ea.arg && vim_iswhite(p[-1])) + --p; + } +! ea.line2 = buflist_findpat(ea.arg, p, (ea.argt & BUFUNL) != 0, FALSE); + if (ea.line2 < 0) /* failed */ + goto doend; + ea.addr_count = 1; +--- 2645,2652 ---- + while (p > ea.arg && vim_iswhite(p[-1])) + --p; + } +! ea.line2 = buflist_findpat(ea.arg, p, (ea.argt & BUFUNL) != 0, +! FALSE, FALSE); + if (ea.line2 < 0) /* failed */ + goto doend; + ea.addr_count = 1; +*** ../vim-7.3.868/src/if_perl.xs 2013-02-14 22:19:47.000000000 +0100 +--- src/if_perl.xs 2013-03-19 14:15:46.000000000 +0100 +*************** +*** 1056,1062 **** + + pat = (char_u *)SvPV(sv, len); + ++emsg_off; +! b = buflist_findpat(pat, pat+len, FALSE, FALSE); + --emsg_off; + } + +--- 1056,1062 ---- + + pat = (char_u *)SvPV(sv, len); + ++emsg_off; +! b = buflist_findpat(pat, pat+len, FALSE, FALSE, FALSE); + --emsg_off; + } + +*** ../vim-7.3.868/src/proto/buffer.pro 2012-10-03 18:24:55.000000000 +0200 +--- src/proto/buffer.pro 2013-03-19 14:16:22.000000000 +0100 +*************** +*** 17,23 **** + void buflist_getfpos __ARGS((void)); + buf_T *buflist_findname_exp __ARGS((char_u *fname)); + buf_T *buflist_findname __ARGS((char_u *ffname)); +! int buflist_findpat __ARGS((char_u *pattern, char_u *pattern_end, int unlisted, int diffmode)); + int ExpandBufnames __ARGS((char_u *pat, int *num_file, char_u ***file, int options)); + buf_T *buflist_findnr __ARGS((int nr)); + char_u *buflist_nr2name __ARGS((int n, int fullname, int helptail)); +--- 17,23 ---- + void buflist_getfpos __ARGS((void)); + buf_T *buflist_findname_exp __ARGS((char_u *fname)); + buf_T *buflist_findname __ARGS((char_u *ffname)); +! int buflist_findpat __ARGS((char_u *pattern, char_u *pattern_end, int unlisted, int diffmode, int curtab_only)); + int ExpandBufnames __ARGS((char_u *pat, int *num_file, char_u ***file, int options)); + buf_T *buflist_findnr __ARGS((int nr)); + char_u *buflist_nr2name __ARGS((int n, int fullname, int helptail)); +*** ../vim-7.3.868/src/version.c 2013-03-19 13:56:03.000000000 +0100 +--- src/version.c 2013-03-19 14:23:42.000000000 +0100 +*************** +*** 730,731 **** +--- 730,733 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 869, + /**/ + +-- +Proof techniques #2: Proof by Oddity. + SAMPLE: To prove that horses have an infinite number of legs. +(1) Horses have an even number of legs. +(2) They have two legs in back and fore legs in front. +(3) This makes a total of six legs, which certainly is an odd number of + legs for a horse. +(4) But the only number that is both odd and even is infinity. +(5) Therefore, horses must have an infinite number of legs. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 9197e4b739317b03fddbeb33bc4611be5d7963fd Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 15 Apr 2013 17:02:27 +0200 Subject: [PATCH 48/82] - patchlevel 870 --- 7.3.870 | 203 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 203 insertions(+) create mode 100644 7.3.870 diff --git a/7.3.870 b/7.3.870 new file mode 100644 index 00000000..38bb219f --- /dev/null +++ b/7.3.870 @@ -0,0 +1,203 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.870 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.870 +Problem: Compiler warnings when using MingW 4.5.3. +Solution: Do not use MAKEINTRESOURCE. Adjust #if. (Ken Takata) +Files: src/gui_w32.c, src/gui_w48.c, src/os_mswin.c, src/os_win32.c, + src/os_win32.h + + +*** ../vim-7.3.869/src/gui_w32.c 2012-11-20 16:53:34.000000000 +0100 +--- src/gui_w32.c 2013-03-19 14:45:24.000000000 +0100 +*************** +*** 1614,1620 **** + #endif + + #ifdef FEAT_EVAL +! # if _MSC_VER < 1400 + /* HandleToLong() only exists in compilers that can do 64 bit builds */ + # define HandleToLong(h) ((long)(h)) + # endif +--- 1614,1620 ---- + #endif + + #ifdef FEAT_EVAL +! # ifndef HandleToLong + /* HandleToLong() only exists in compilers that can do 64 bit builds */ + # define HandleToLong(h) ((long)(h)) + # endif +*** ../vim-7.3.869/src/gui_w48.c 2013-01-25 19:28:34.000000000 +0100 +--- src/gui_w48.c 2013-03-19 14:46:35.000000000 +0100 +*************** +*** 3265,3291 **** + * misc2.c! */ + static LPCSTR mshape_idcs[] = + { +! MAKEINTRESOURCE(IDC_ARROW), /* arrow */ +! MAKEINTRESOURCE(0), /* blank */ +! MAKEINTRESOURCE(IDC_IBEAM), /* beam */ +! MAKEINTRESOURCE(IDC_SIZENS), /* updown */ +! MAKEINTRESOURCE(IDC_SIZENS), /* udsizing */ +! MAKEINTRESOURCE(IDC_SIZEWE), /* leftright */ +! MAKEINTRESOURCE(IDC_SIZEWE), /* lrsizing */ +! MAKEINTRESOURCE(IDC_WAIT), /* busy */ + #ifdef WIN3264 +! MAKEINTRESOURCE(IDC_NO), /* no */ + #else +! MAKEINTRESOURCE(IDC_ICON), /* no */ + #endif +! MAKEINTRESOURCE(IDC_ARROW), /* crosshair */ +! MAKEINTRESOURCE(IDC_ARROW), /* hand1 */ +! MAKEINTRESOURCE(IDC_ARROW), /* hand2 */ +! MAKEINTRESOURCE(IDC_ARROW), /* pencil */ +! MAKEINTRESOURCE(IDC_ARROW), /* question */ +! MAKEINTRESOURCE(IDC_ARROW), /* right-arrow */ +! MAKEINTRESOURCE(IDC_UPARROW), /* up-arrow */ +! MAKEINTRESOURCE(IDC_ARROW) /* last one */ + }; + + void +--- 3265,3291 ---- + * misc2.c! */ + static LPCSTR mshape_idcs[] = + { +! IDC_ARROW, /* arrow */ +! MAKEINTRESOURCE(0), /* blank */ +! IDC_IBEAM, /* beam */ +! IDC_SIZENS, /* updown */ +! IDC_SIZENS, /* udsizing */ +! IDC_SIZEWE, /* leftright */ +! IDC_SIZEWE, /* lrsizing */ +! IDC_WAIT, /* busy */ + #ifdef WIN3264 +! IDC_NO, /* no */ + #else +! IDC_ICON, /* no */ + #endif +! IDC_ARROW, /* crosshair */ +! IDC_ARROW, /* hand1 */ +! IDC_ARROW, /* hand2 */ +! IDC_ARROW, /* pencil */ +! IDC_ARROW, /* question */ +! IDC_ARROW, /* right-arrow */ +! IDC_UPARROW, /* up-arrow */ +! IDC_ARROW /* last one */ + }; + + void +*************** +*** 3298,3304 **** + else + { + if (shape >= MSHAPE_NUMBERED) +! idc = MAKEINTRESOURCE(IDC_ARROW); + else + idc = mshape_idcs[shape]; + #ifdef SetClassLongPtr +--- 3298,3304 ---- + else + { + if (shape >= MSHAPE_NUMBERED) +! idc = IDC_ARROW; + else + idc = mshape_idcs[shape]; + #ifdef SetClassLongPtr +*** ../vim-7.3.869/src/os_mswin.c 2013-02-26 14:56:24.000000000 +0100 +--- src/os_mswin.c 2013-03-19 14:45:24.000000000 +0100 +*************** +*** 184,195 **** +--- 184,197 ---- + } + # endif + ++ # if !defined(__MINGW32__) || (__GNUC__ < 4) + int _chdrive(int drive) + { + char temp [3] = "-:"; + temp[0] = drive + 'A' - 1; + return !SetCurrentDirectory(temp); + } ++ # endif + #else + # ifdef __BORLANDC__ + /* being a more ANSI compliant compiler, BorlandC doesn't define _stricoll: +*** ../vim-7.3.869/src/os_win32.c 2013-02-26 14:56:24.000000000 +0100 +--- src/os_win32.c 2013-03-19 14:45:24.000000000 +0100 +*************** +*** 163,169 **** + + /* Enable common dialogs input unicode from IME if posible. */ + #ifdef FEAT_MBYTE +! LRESULT (WINAPI *pDispatchMessage)(LPMSG) = DispatchMessage; + BOOL (WINAPI *pGetMessage)(LPMSG, HWND, UINT, UINT) = GetMessage; + BOOL (WINAPI *pIsDialogMessage)(HWND, LPMSG) = IsDialogMessage; + BOOL (WINAPI *pPeekMessage)(LPMSG, HWND, UINT, UINT, UINT) = PeekMessage; +--- 163,169 ---- + + /* Enable common dialogs input unicode from IME if posible. */ + #ifdef FEAT_MBYTE +! LRESULT (WINAPI *pDispatchMessage)(CONST MSG *) = DispatchMessage; + BOOL (WINAPI *pGetMessage)(LPMSG, HWND, UINT, UINT) = GetMessage; + BOOL (WINAPI *pIsDialogMessage)(HWND, LPMSG) = IsDialogMessage; + BOOL (WINAPI *pPeekMessage)(LPMSG, HWND, UINT, UINT, UINT) = PeekMessage; +*************** +*** 3464,3470 **** + && (lnum != curbuf->b_ml.ml_line_count + || curbuf->b_p_eol))) + { +! WriteFile(g_hChildStd_IN_Wr, "\n", 1, &ignored, NULL); + } + + ++lnum; +--- 3464,3470 ---- + && (lnum != curbuf->b_ml.ml_line_count + || curbuf->b_p_eol))) + { +! WriteFile(g_hChildStd_IN_Wr, "\n", 1, (LPDWORD)&ignored, NULL); + } + + ++lnum; +*** ../vim-7.3.869/src/os_win32.h 2012-11-20 16:53:34.000000000 +0100 +--- src/os_win32.h 2013-03-19 14:45:24.000000000 +0100 +*************** +*** 204,210 **** + /* Enable common dialogs input unicode from IME if posible. */ + #ifdef FEAT_MBYTE + /* The variables are defined in os_win32.c. */ +! extern LRESULT (WINAPI *pDispatchMessage)(LPMSG); + extern BOOL (WINAPI *pGetMessage)(LPMSG, HWND, UINT, UINT); + extern BOOL (WINAPI *pIsDialogMessage)(HWND, LPMSG); + extern BOOL (WINAPI *pPeekMessage)(LPMSG, HWND, UINT, UINT, UINT); +--- 204,210 ---- + /* Enable common dialogs input unicode from IME if posible. */ + #ifdef FEAT_MBYTE + /* The variables are defined in os_win32.c. */ +! extern LRESULT (WINAPI *pDispatchMessage)(CONST MSG *); + extern BOOL (WINAPI *pGetMessage)(LPMSG, HWND, UINT, UINT); + extern BOOL (WINAPI *pIsDialogMessage)(HWND, LPMSG); + extern BOOL (WINAPI *pPeekMessage)(LPMSG, HWND, UINT, UINT, UINT); +*** ../vim-7.3.869/src/version.c 2013-03-19 14:25:50.000000000 +0100 +--- src/version.c 2013-03-19 14:45:42.000000000 +0100 +*************** +*** 730,731 **** +--- 730,733 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 870, + /**/ + +-- +Q: How many legs does a giraffe have? +A: Eight: two in front, two behind, two on the left and two on the right + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 9681cac6fc0777b081a1503227d3ae207487f47e Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 15 Apr 2013 17:02:28 +0200 Subject: [PATCH 49/82] - patchlevel 871 --- 7.3.871 | 102 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100644 7.3.871 diff --git a/7.3.871 b/7.3.871 new file mode 100644 index 00000000..25ab1dd0 --- /dev/null +++ b/7.3.871 @@ -0,0 +1,102 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.871 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.871 +Problem: search('^$', 'c') does not use the empty match under the cursor. +Solution: Special handling of the 'c' flag. (Christian Brabandt) + Add tests. +Files: src/search.c, src/testdir/test14.in, src/testdir/test14.ok + + +*** ../vim-7.3.870/src/search.c 2013-02-20 18:39:07.000000000 +0100 +--- src/search.c 2013-03-19 15:23:13.000000000 +0100 +*************** +*** 727,732 **** +--- 727,734 ---- + ++matchcol; + } + } ++ if (options & SEARCH_START) ++ break; + if (ptr[matchcol] == NUL + || (nmatched = vim_regexec_multi(®match, + win, buf, lnum + matchpos.lnum, +*** ../vim-7.3.870/src/testdir/test14.in 2010-08-15 21:57:29.000000000 +0200 +--- src/testdir/test14.in 2013-03-19 15:21:54.000000000 +0100 +*************** +*** 2,7 **** +--- 2,8 ---- + Also test ":s/pat/sub/" with different ~s in sub. + Also test for ^Vxff and ^Vo123 in Insert mode. + Also test "[m", "]m", "[M" and "]M" ++ Also test search() + + STARTTEST + :so small.vim +*************** +*** 34,39 **** +--- 35,50 ---- + 2[MaJ:.w >>test.out + k[MaK:.w >>test.out + 3[MaL:.w >>test.out ++ :" ++ /^foobar ++ :let startline = line('.') ++ :call search('foobar', 'c') ++ :call append(line('$'), line('.') - startline) ++ j:call search('^$', 'c') ++ :call append(line('$'), line('.') - startline) ++ :call search('^$', 'bc') ++ :call append(line('$'), line('.') - startline) ++ :/^search()/,$w >>test.out + :qa! + ENDTEST + +*************** +*** 64,66 **** +--- 75,82 ---- + } + } e3 + } ++ ++ foobar ++ ++ ++ search() +*** ../vim-7.3.870/src/testdir/test14.ok 2010-08-15 21:57:29.000000000 +0200 +--- src/testdir/test14.ok 2013-03-19 15:26:18.000000000 +0100 +*************** +*** 15,17 **** +--- 15,21 ---- + }JH e3 + }K e2 + {LF ++ search() ++ 0 ++ 1 ++ 1 +*** ../vim-7.3.870/src/version.c 2013-03-19 14:48:25.000000000 +0100 +--- src/version.c 2013-03-19 15:26:38.000000000 +0100 +*************** +*** 730,731 **** +--- 730,733 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 871, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +75. You start wondering whether you could actually upgrade your brain + with a Pentium Pro microprocessor 80. The upgrade works just fine. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 30914c92e24edb2b1f5090ba1382fb0e317760d4 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 15 Apr 2013 17:02:28 +0200 Subject: [PATCH 50/82] - patchlevel 872 --- 7.3.872 | 524 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 524 insertions(+) create mode 100644 7.3.872 diff --git a/7.3.872 b/7.3.872 new file mode 100644 index 00000000..0e407f45 --- /dev/null +++ b/7.3.872 @@ -0,0 +1,524 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.872 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.872 +Problem: On some systems case of file names is always ignored, on others + never. +Solution: Add the 'fileignorecase' option to control this at runtime. + Implies 'wildignorecase'. +Files: src/buffer.c, src/edit.c, src/ex_cmds2.c, src/ex_getln.c, + src/fileio.c, src/misc1.c, src/misc2.c, src/option.c, + src/option.h, src/vim.h, runtime/doc/options.txt + + +*** ../vim-7.3.871/src/buffer.c 2013-03-19 14:25:50.000000000 +0100 +--- src/buffer.c 2013-03-19 16:03:42.000000000 +0100 +*************** +*** 2401,2412 **** + if (name != NULL) + { + regmatch.regprog = prog; +! #ifdef CASE_INSENSITIVE_FILENAME +! regmatch.rm_ic = TRUE; /* Always ignore case */ +! #else +! regmatch.rm_ic = FALSE; /* Never ignore case */ +! #endif +! + if (vim_regexec(®match, name, (colnr_T)0)) + match = name; + else +--- 2401,2407 ---- + if (name != NULL) + { + regmatch.regprog = prog; +! regmatch.rm_ic = p_fic; /* ignore case when 'fileignorecase' is set */ + if (vim_regexec(®match, name, (colnr_T)0)) + match = name; + else +*** ../vim-7.3.871/src/edit.c 2013-03-19 13:33:18.000000000 +0100 +--- src/edit.c 2013-03-19 15:43:19.000000000 +0100 +*************** +*** 4336,4348 **** + + /* May change home directory back to "~". */ + tilde_replace(compl_pattern, num_matches, matches); +! ins_compl_add_matches(num_matches, matches, +! #ifdef CASE_INSENSITIVE_FILENAME +! TRUE +! #else +! FALSE +! #endif +! ); + } + break; + +--- 4336,4342 ---- + + /* May change home directory back to "~". */ + tilde_replace(compl_pattern, num_matches, matches); +! ins_compl_add_matches(num_matches, matches, p_fic || p_wic); + } + break; + +*** ../vim-7.3.871/src/ex_cmds2.c 2012-10-03 18:24:55.000000000 +0200 +--- src/ex_cmds2.c 2013-03-19 16:03:50.000000000 +0100 +*************** +*** 1926,1936 **** + * Delete the items: use each item as a regexp and find a match in the + * argument list. + */ +! #ifdef CASE_INSENSITIVE_FILENAME +! regmatch.rm_ic = TRUE; /* Always ignore case */ +! #else +! regmatch.rm_ic = FALSE; /* Never ignore case */ +! #endif + for (i = 0; i < new_ga.ga_len && !got_int; ++i) + { + p = ((char_u **)new_ga.ga_data)[i]; +--- 1926,1932 ---- + * Delete the items: use each item as a regexp and find a match in the + * argument list. + */ +! regmatch.rm_ic = p_fic; /* ignore case when 'fileignorecase' is set */ + for (i = 0; i < new_ga.ga_len && !got_int; ++i) + { + p = ((char_u **)new_ga.ga_data)[i]; +*** ../vim-7.3.871/src/ex_getln.c 2012-11-28 16:49:53.000000000 +0100 +--- src/ex_getln.c 2013-03-19 16:03:53.000000000 +0100 +*************** +*** 3653,3671 **** + { + for (i = 0; i < xp->xp_numfiles; ++i) + { +! #ifdef CASE_INSENSITIVE_FILENAME +! if (xp->xp_context == EXPAND_DIRECTORIES + || xp->xp_context == EXPAND_FILES + || xp->xp_context == EXPAND_SHELLCMD +! || xp->xp_context == EXPAND_BUFFERS) + { + if (TOLOWER_LOC(xp->xp_files[i][len]) != + TOLOWER_LOC(xp->xp_files[0][len])) + break; + } +! else +! #endif +! if (xp->xp_files[i][len] != xp->xp_files[0][len]) + break; + } + if (i < xp->xp_numfiles) +--- 3653,3668 ---- + { + for (i = 0; i < xp->xp_numfiles; ++i) + { +! if (p_fic && (xp->xp_context == EXPAND_DIRECTORIES + || xp->xp_context == EXPAND_FILES + || xp->xp_context == EXPAND_SHELLCMD +! || xp->xp_context == EXPAND_BUFFERS)) + { + if (TOLOWER_LOC(xp->xp_files[i][len]) != + TOLOWER_LOC(xp->xp_files[0][len])) + break; + } +! else if (xp->xp_files[i][len] != xp->xp_files[0][len]) + break; + } + if (i < xp->xp_numfiles) +*** ../vim-7.3.871/src/fileio.c 2013-03-19 13:33:18.000000000 +0100 +--- src/fileio.c 2013-03-19 15:49:28.000000000 +0100 +*************** +*** 6485,6493 **** + #ifdef HAVE_ACL + vim_acl_T acl; /* ACL from original file */ + #endif +- #if defined(UNIX) || defined(CASE_INSENSITIVE_FILENAME) + int use_tmp_file = FALSE; +- #endif + + /* + * When the names are identical, there is nothing to do. When they refer +--- 6485,6491 ---- +*************** +*** 6496,6506 **** + */ + if (fnamecmp(from, to) == 0) + { +! #ifdef CASE_INSENSITIVE_FILENAME +! if (STRCMP(gettail(from), gettail(to)) != 0) + use_tmp_file = TRUE; + else +- #endif + return 0; + } + +--- 6494,6502 ---- + */ + if (fnamecmp(from, to) == 0) + { +! if (p_fic && STRCMP(gettail(from), gettail(to)) != 0) + use_tmp_file = TRUE; + else + return 0; + } + +*************** +*** 6539,6545 **** + } + #endif + +- #if defined(UNIX) || defined(CASE_INSENSITIVE_FILENAME) + if (use_tmp_file) + { + char tempname[MAXPATHL + 1]; +--- 6535,6540 ---- +*************** +*** 6572,6578 **** + } + return -1; + } +- #endif + + /* + * Delete the "to" file, this is required on some systems to make the +--- 6567,6572 ---- +*************** +*** 10007,10017 **** + int match = FALSE; + #endif + +! #ifdef CASE_INSENSITIVE_FILENAME +! regmatch.rm_ic = TRUE; /* Always ignore case */ +! #else +! regmatch.rm_ic = FALSE; /* Don't ever ignore case */ +! #endif + #ifdef FEAT_OSFILETYPE + if (*pattern == '<') + { +--- 10001,10007 ---- + int match = FALSE; + #endif + +! regmatch.rm_ic = p_fic; /* ignore case if 'fileignorecase' is set */ + #ifdef FEAT_OSFILETYPE + if (*pattern == '<') + { +*** ../vim-7.3.871/src/misc1.c 2013-03-16 21:35:28.000000000 +0100 +--- src/misc1.c 2013-03-19 16:16:24.000000000 +0100 +*************** +*** 5026,5041 **** + return retval; + } + +- #if (defined(CASE_INSENSITIVE_FILENAME) && defined(BACKSLASH_IN_FILENAME)) \ +- || defined(PROTO) + /* +! * Versions of fnamecmp() and fnamencmp() that handle '/' and '\' equally. + */ + int + vim_fnamecmp(x, y) + char_u *x, *y; + { + return vim_fnamencmp(x, y, MAXPATHL); + } + + int +--- 5026,5046 ---- + return retval; + } + + /* +! * Versions of fnamecmp() and fnamencmp() that handle '/' and '\' equally +! * and deal with 'fileignorecase'. + */ + int + vim_fnamecmp(x, y) + char_u *x, *y; + { ++ #ifdef BACKSLASH_IN_FILENAME + return vim_fnamencmp(x, y, MAXPATHL); ++ #else ++ if (p_fic) ++ return MB_STRICMP(x, y); ++ return STRCMP(x, y); ++ #endif + } + + int +*************** +*** 5043,5051 **** + char_u *x, *y; + size_t len; + { + while (len > 0 && *x && *y) + { +! if (TOLOWER_LOC(*x) != TOLOWER_LOC(*y) + && !(*x == '/' && *y == '\\') + && !(*x == '\\' && *y == '/')) + break; +--- 5048,5058 ---- + char_u *x, *y; + size_t len; + { ++ #ifdef BACKSLASH_IN_FILENAME ++ /* TODO: multi-byte characters. */ + while (len > 0 && *x && *y) + { +! if ((p_fic ? TOLOWER_LOC(*x) != TOLOWER_LOC(*y) : *x != *y) + && !(*x == '/' && *y == '\\') + && !(*x == '\\' && *y == '/')) + break; +*************** +*** 5056,5063 **** + if (len == 0) + return 0; + return (*x - *y); +! } + #endif + + /* + * Concatenate file names fname1 and fname2 into allocated memory. +--- 5063,5074 ---- + if (len == 0) + return 0; + return (*x - *y); +! #else +! if (p_fic) +! return MB_STRNICMP(x, y, len); +! return STRNCMP(x, y, len); + #endif ++ } + + /* + * Concatenate file names fname1 and fname2 into allocated memory. +*************** +*** 9835,9845 **** + } + else if (path_end >= path + wildoff + && (vim_strchr((char_u *)"*?[{~$", *path_end) != NULL +! #ifndef CASE_INSENSITIVE_FILENAME +! || ((flags & EW_ICASE) +! && isalpha(PTR2CHAR(path_end))) +! #endif +! )) + e = p; + #ifdef FEAT_MBYTE + if (has_mbyte) +--- 9846,9853 ---- + } + else if (path_end >= path + wildoff + && (vim_strchr((char_u *)"*?[{~$", *path_end) != NULL +! || (!p_fic && (flags & EW_ICASE) +! && isalpha(PTR2CHAR(path_end))))) + e = p; + #ifdef FEAT_MBYTE + if (has_mbyte) +*************** +*** 9882,9895 **** + } + + /* compile the regexp into a program */ +- #ifdef CASE_INSENSITIVE_FILENAME +- regmatch.rm_ic = TRUE; /* Behave like Terminal.app */ +- #else + if (flags & EW_ICASE) + regmatch.rm_ic = TRUE; /* 'wildignorecase' set */ + else +! regmatch.rm_ic = FALSE; /* Don't ignore case */ +! #endif + if (flags & (EW_NOERROR | EW_NOTWILD)) + ++emsg_silent; + regmatch.regprog = vim_regcomp(pat, RE_MAGIC); +--- 9890,9899 ---- + } + + /* compile the regexp into a program */ + if (flags & EW_ICASE) + regmatch.rm_ic = TRUE; /* 'wildignorecase' set */ + else +! regmatch.rm_ic = p_fic; /* ignore case when 'fileignorecase' is set */ + if (flags & (EW_NOERROR | EW_NOTWILD)) + ++emsg_silent; + regmatch.regprog = vim_regcomp(pat, RE_MAGIC); +*** ../vim-7.3.871/src/misc2.c 2012-11-28 18:31:49.000000000 +0100 +--- src/misc2.c 2013-03-19 16:39:56.000000000 +0100 +*************** +*** 5362,5374 **** + if (STRLEN(s1) != STRLEN(s2)) + return FAIL; + + for (i = 0; s1[i] != NUL && s2[i] != NUL; i++) + { + if (s1[i] != s2[i] +! #ifdef CASE_INSENSITIVE_FILENAME +! && TOUPPER_LOC(s1[i]) != TOUPPER_LOC(s2[i]) +! #endif +! ) + { + if (i >= 2) + if (s1[i-1] == '*' && s1[i-2] == '*') +--- 5362,5372 ---- + if (STRLEN(s1) != STRLEN(s2)) + return FAIL; + ++ /* TODO: handle multi-byte characters. */ + for (i = 0; s1[i] != NUL && s2[i] != NUL; i++) + { + if (s1[i] != s2[i] +! && (!p_fic || TOUPPER_LOC(s1[i]) != TOUPPER_LOC(s2[i]))) + { + if (i >= 2) + if (s1[i-1] == '*' && s1[i-2] == '*') +*************** +*** 6123,6134 **** + break; + } + +! if ( +! #ifdef CASE_INSENSITIVE_FILENAME +! TOUPPER_LOC(p[i]) != TOUPPER_LOC(q[i]) +! #else +! p[i] != q[i] +! #endif + #ifdef BACKSLASH_IN_FILENAME + /* consider '/' and '\\' to be equal */ + && !((p[i] == '/' && q[i] == '\\') +--- 6121,6127 ---- + break; + } + +! if ((p_fic ? TOUPPER_LOC(p[i]) != TOUPPER_LOC(q[i]) : p[i] != q[i]) + #ifdef BACKSLASH_IN_FILENAME + /* consider '/' and '\\' to be equal */ + && !((p[i] == '/' && q[i] == '\\') +*** ../vim-7.3.871/src/option.c 2013-03-13 20:42:28.000000000 +0100 +--- src/option.c 2013-03-19 15:40:25.000000000 +0100 +*************** +*** 1108,1113 **** +--- 1108,1122 ---- + (char_u *)&p_ffs, PV_NONE, + {(char_u *)DFLT_FFS_VI, (char_u *)DFLT_FFS_VIM} + SCRIPTID_INIT}, ++ {"fileignorecase", "fic", P_BOOL|P_VI_DEF, ++ (char_u *)&p_fic, PV_NONE, ++ { ++ #ifdef CASE_INSENSITIVE_FILENAME ++ (char_u *)TRUE, ++ #else ++ (char_u *)FALSE, ++ #endif ++ (char_u *)0L} SCRIPTID_INIT}, + {"filetype", "ft", P_STRING|P_ALLOCED|P_VI_DEF|P_NOGLOB|P_NFNAME, + #ifdef FEAT_AUTOCMD + (char_u *)&p_ft, PV_FT, +*** ../vim-7.3.871/src/option.h 2012-08-15 16:20:59.000000000 +0200 +--- src/option.h 2013-03-19 15:42:24.000000000 +0100 +*************** +*** 453,458 **** +--- 453,459 ---- + EXTERN char_u *p_fencs; /* 'fileencodings' */ + #endif + EXTERN char_u *p_ffs; /* 'fileformats' */ ++ EXTERN long p_fic; /* 'fileignorecase' */ + #ifdef FEAT_FOLDING + EXTERN char_u *p_fcl; /* 'foldclose' */ + EXTERN long p_fdls; /* 'foldlevelstart' */ +*** ../vim-7.3.871/src/vim.h 2013-03-19 13:33:18.000000000 +0100 +--- src/vim.h 2013-03-19 16:14:29.000000000 +0100 +*************** +*** 1627,1644 **** + * (this does not account for maximum name lengths and things like "../dir", + * thus it is not 100% accurate!) + */ +! #ifdef CASE_INSENSITIVE_FILENAME +! # ifdef BACKSLASH_IN_FILENAME +! # define fnamecmp(x, y) vim_fnamecmp((x), (y)) +! # define fnamencmp(x, y, n) vim_fnamencmp((x), (y), (size_t)(n)) +! # else +! # define fnamecmp(x, y) MB_STRICMP((x), (y)) +! # define fnamencmp(x, y, n) MB_STRNICMP((x), (y), (n)) +! # endif +! #else +! # define fnamecmp(x, y) strcmp((char *)(x), (char *)(y)) +! # define fnamencmp(x, y, n) strncmp((char *)(x), (char *)(y), (size_t)(n)) +! #endif + + #ifdef HAVE_MEMSET + # define vim_memset(ptr, c, size) memset((ptr), (c), (size)) +--- 1627,1634 ---- + * (this does not account for maximum name lengths and things like "../dir", + * thus it is not 100% accurate!) + */ +! #define fnamecmp(x, y) vim_fnamecmp((char_u *)(x), (char_u *)(y)) +! #define fnamencmp(x, y, n) vim_fnamencmp((char_u *)(x), (char_u *)(y), (size_t)(n)) + + #ifdef HAVE_MEMSET + # define vim_memset(ptr, c, size) memset((ptr), (c), (size)) +*** ../vim-7.3.871/runtime/doc/options.txt 2013-01-23 18:37:31.000000000 +0100 +--- runtime/doc/options.txt 2013-03-19 16:25:49.000000000 +0100 +*************** +*** 2895,2900 **** +--- 2941,2954 ---- + NOTE: This option is set to the Vi default value when 'compatible' is + set and to the Vim default value when 'compatible' is reset. + ++ *'fileignorecase'* *'wic'* *'nofileignorecase'* *'nowic'* ++ 'fileignorecase' 'wic' boolean (default on for systems where case in file ++ names is normally ignored. ++ global ++ {not in Vi} ++ When set case is ignored when using file names and directories. ++ See 'wildignorecase' for only ignoring case when doing completion. ++ + *'filetype'* *'ft'* + 'filetype' 'ft' string (default: "") + local to buffer +*************** +*** 7832,7843 **** + uses another default. + + +! *'wildignorecase* *'wic'* *'nowildignorecase* *'nowic'* + 'wildignorecase' 'wic' boolean (default off) + global + {not in Vi} + When set case is ignored when completing file names and directories. +! Has no effect on systems where file name case is generally ignored. + Does not apply when the shell is used to expand wildcards, which + happens when there are special characters. + +--- 7906,7917 ---- + uses another default. + + +! *'wildignorecase'* *'wic'* *'nowildignorecase'* *'nowic'* + 'wildignorecase' 'wic' boolean (default off) + global + {not in Vi} + When set case is ignored when completing file names and directories. +! Has no effect when 'fileignorecase' is set. + Does not apply when the shell is used to expand wildcards, which + happens when there are special characters. + +*** ../vim-7.3.871/src/version.c 2013-03-19 15:27:43.000000000 +0100 +--- src/version.c 2013-03-19 16:22:46.000000000 +0100 +*************** +*** 730,731 **** +--- 730,733 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 872, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +76. Your ISP regards you as a business partner rather than as a customer. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 31a88b7740602cc9dee2d50537b8734d7822c5c8 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 15 Apr 2013 17:02:29 +0200 Subject: [PATCH 51/82] - patchlevel 873 --- 7.3.873 | Bin 0 -> 5967 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 7.3.873 diff --git a/7.3.873 b/7.3.873 new file mode 100644 index 0000000000000000000000000000000000000000..dbb636522de863509795ff0e986878acd762c1a6 GIT binary patch literal 5967 zcmcIo>yz3>63@p&RrfWYJ5DP55_%xCfPB8nX2V{bTBlrIz-CL8Eg=SwEomq{c-WQy z{klg;h}U|TBq|Uy!*owSe$zeE9d5zQ3m%4S_S2a2vCqa4Pp7fs@<6&v2OpW6Sn$?K z+zB)kLuob)>Be;};At}83+X1}fdxNDP5^H>_gUyT5&VbxKLvST30d-A>5Uh#YL7*+ z$3qKrMU$?1n6NOZc9v6SLBbY^I`thddUM6b&Go#<3F8rqs_oF_LoXa# z&>VP)R4qM{v?=S`h!1>*BI0xHgdtCWIkD$2A&nVWF(e!U=M#g(OMC{d6Ej7+<9?b5 zF#&#cW(;1~w|4phA{M890$y024X3|30gK^{d(D?;(v9b{*s9QaapbBI8?(h!ab?j< zSey*KNTuIKOYy?J!~Byh6%5KGO>Hj;4)afvB%Pn1gQBSD&T8hWnpzg2Qqy#!s@1Bs zOVFEE-L&d0Mav(!&~!~BTW-j`A~LFa3-pF%n3l0igbSA+2|Lixo2J~*TRPBR64?XL za!IA)zTD_-c0&%YpsK%=z7qtaX%anjDx)-Xar`vvp8ejvz0H~UUdTe4>gI; z!SVeag?3ba;33lFSn)eh3E3gq^Jb+|xShuW52Wo8h(#W2%w`M< z)E;5J%JIluOTUfXdJBWEsTb+L!0y*fa2TCOtM)X6t_}GFj2yXTEoH=1tAZdvF8%k@*`mfFatJM@q$)q)@8g0V2h5<|Get8{i^Gl zA?sRm?GasT$+~`-3-&zqh4McNZNH8|{^_q^u%LcE25WV>)>>;t}dqoDO2FA*2aAJ(=}pCo-J$@MXWS2lfl>oY0kM&)oU@ zIn8~a&9xt$yZEr6xgWB*Q9k!#AKyOB6fcS(%l?ugi0GpvdnxXTLcA!t+<(5O=<=Bc zh3x7d85B^BQnV>=eQb;UaM_R>wKXg*F?SZ5Y>x#ny3rzCe4(|%T&um-`Wq~}S9db0 zu1eh25y;eN}<^^>DbIf<xFFaEti2=$lCKK^{ZzyFM5+2^rn@mT6fk$k9?v|`5Em3i7KUKr3>z1|~S@xm5VbFDNRpuhL*?^G;!Y_D- z!(-3Ya0nrr!&H<~u~ao+5eyjKfARW-w>~Q9(B10-CyO7t`(d?JM*YPI-l9O7q~S1P z!>SVwt5h6{m%%jQK@5C^%&;U1PDoWY7Gcd5oZ-;J@~zZpD$wUCjJ$9NOP*qF)gQso zb8yiyynYLrILHMnn|K$TPLQ`ENua9gc5N4>5Y^qH+Dp}4)D Date: Mon, 15 Apr 2013 17:02:29 +0200 Subject: [PATCH 52/82] - patchlevel 874 --- 7.3.874 | 139 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 139 insertions(+) create mode 100644 7.3.874 diff --git a/7.3.874 b/7.3.874 new file mode 100644 index 00000000..3b0f51b1 --- /dev/null +++ b/7.3.874 @@ -0,0 +1,139 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.874 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.874 +Problem: Comparing file names does not handle multi-byte characters + properly. +Solution: Implement multi-byte handling. +Files: src/misc1.c, src/misc2.c + + +*** ../vim-7.3.873/src/misc1.c 2013-03-19 16:46:59.000000000 +0100 +--- src/misc1.c 2013-03-19 18:30:52.000000000 +0100 +*************** +*** 5049,5068 **** + size_t len; + { + #ifdef BACKSLASH_IN_FILENAME + /* TODO: multi-byte characters. */ +! while (len > 0 && *x && *y) + { +! if ((p_fic ? TOLOWER_LOC(*x) != TOLOWER_LOC(*y) : *x != *y) +! && !(*x == '/' && *y == '\\') +! && !(*x == '\\' && *y == '/')) + break; +! ++x; +! ++y; +! --len; + } + if (len == 0) + return 0; +! return (*x - *y); + #else + if (p_fic) + return MB_STRNICMP(x, y, len); +--- 5049,5076 ---- + size_t len; + { + #ifdef BACKSLASH_IN_FILENAME ++ char_u *px = x; ++ char_u *py = y; ++ int cx = NUL; ++ int cy = NUL; ++ + /* TODO: multi-byte characters. */ +! while (len > 0) + { +! cx = PTR2CHAR(px); +! cy = PTR2CHAR(py); +! if (cx == NUL || cy == NUL +! || ((p_fic ? MB_TOLOWER(cx) != MB_TOLOWER(cy) : cx != cy) +! && !(cx == '/' && cy == '\\') +! && !(cx == '\\' && cy == '/'))) + break; +! len -= MB_PTR2LEN(px); +! px += MB_PTR2LEN(px); +! py += MB_PTR2LEN(py); + } + if (len == 0) + return 0; +! return (cx - cy); + #else + if (p_fic) + return MB_STRNICMP(x, y, len); +*** ../vim-7.3.873/src/misc2.c 2013-03-19 16:46:59.000000000 +0100 +--- src/misc2.c 2013-03-19 18:22:29.000000000 +0100 +*************** +*** 5352,5357 **** +--- 5352,5359 ---- + char_u *s2; + { + int i; ++ int prev1 = NUL; ++ int prev2 = NUL; + + if (s1 == s2) + return TRUE; +*************** +*** 5362,5381 **** + if (STRLEN(s1) != STRLEN(s2)) + return FAIL; + +! /* TODO: handle multi-byte characters. */ +! for (i = 0; s1[i] != NUL && s2[i] != NUL; i++) + { +! if (s1[i] != s2[i] +! && (!p_fic || TOUPPER_LOC(s1[i]) != TOUPPER_LOC(s2[i]))) +! { +! if (i >= 2) +! if (s1[i-1] == '*' && s1[i-2] == '*') +! continue; +! else +! return FAIL; +! else +! return FAIL; +! } + } + return TRUE; + } +--- 5364,5379 ---- + if (STRLEN(s1) != STRLEN(s2)) + return FAIL; + +! for (i = 0; s1[i] != NUL && s2[i] != NUL; i += MB_PTR2LEN(s1 + i)) + { +! int c1 = PTR2CHAR(s1 + i); +! int c2 = PTR2CHAR(s2 + i); +! +! if ((p_fic ? MB_TOLOWER(c1) != MB_TOLOWER(c2) : c1 != c2) +! && (prev1 != '*' || prev2 != '*')) +! return FAIL; +! prev2 = prev1; +! prev1 = c1; + } + return TRUE; + } +*** ../vim-7.3.873/src/version.c 2013-03-19 17:42:10.000000000 +0100 +--- src/version.c 2013-03-19 18:24:57.000000000 +0100 +*************** +*** 730,731 **** +--- 730,733 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 874, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +80. At parties, you introduce your spouse as your "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 /// From 5c4a61c945d0a0e012ff6a21d1be8803b79f045d Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 15 Apr 2013 17:02:30 +0200 Subject: [PATCH 53/82] - patchlevel 875 --- 7.3.875 | 69 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 7.3.875 diff --git a/7.3.875 b/7.3.875 new file mode 100644 index 00000000..155d6567 --- /dev/null +++ b/7.3.875 @@ -0,0 +1,69 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.875 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.875 (after 7.3.866) +Problem: Build problem with some combination of features. +Solution: Use FEAT_XCLIPBOARD instead of FEAT_CLIPBOARD. +Files: src/os_unix.c + + +*** ../vim-7.3.874/src/os_unix.c 2013-03-19 12:35:33.000000000 +0100 +--- src/os_unix.c 2013-03-21 21:43:37.000000000 +0100 +*************** +*** 4787,4793 **** + else + wait_pid = 0; + +! # if defined(FEAT_CLIPBOARD) && defined(FEAT_X11) + /* Handle any X events, e.g. serving the clipboard. */ + clip_update(); + # endif +--- 4787,4793 ---- + else + wait_pid = 0; + +! # if defined(FEAT_XCLIPBOARD) && defined(FEAT_X11) + /* Handle any X events, e.g. serving the clipboard. */ + clip_update(); + # endif +*************** +*** 4817,4823 **** + close(toshell_fd); + close(fromshell_fd); + } +! # if defined(FEAT_CLIPBOARD) && defined(FEAT_X11) + else + { + /* +--- 4817,4823 ---- + close(toshell_fd); + close(fromshell_fd); + } +! # if defined(FEAT_XCLIPBOARD) && defined(FEAT_X11) + else + { + /* +*** ../vim-7.3.874/src/version.c 2013-03-19 18:31:45.000000000 +0100 +--- src/version.c 2013-03-21 22:05:59.000000000 +0100 +*************** +*** 730,731 **** +--- 730,733 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 875, + /**/ + +-- +From "know your smileys": + O:-) Saint + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 9013d9abcb096e6b648b0bb555cc6cb08ea57285 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 15 Apr 2013 17:02:31 +0200 Subject: [PATCH 54/82] - patchlevel 876 --- 7.3.876 | 80 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 7.3.876 diff --git a/7.3.876 b/7.3.876 new file mode 100644 index 00000000..573df0da --- /dev/null +++ b/7.3.876 @@ -0,0 +1,80 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.876 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.876 +Problem: #if indents are off. +Solution: Insert a space where appropriate. (Taro Muraoka) +Files: src/gui.c + + +*** ../vim-7.3.875/src/gui.c 2013-01-23 18:37:31.000000000 +0100 +--- src/gui.c 2013-03-27 22:44:19.000000000 +0100 +*************** +*** 991,997 **** + } + + gui_mch_free_font(gui.wide_font); +! #ifdef FEAT_GUI_GTK + /* Avoid unnecessary overhead if 'guifontwide' is equal to 'guifont'. */ + if (font != NOFONT && gui.norm_font != NOFONT + && pango_font_description_equal(font, gui.norm_font)) +--- 991,997 ---- + } + + gui_mch_free_font(gui.wide_font); +! # ifdef FEAT_GUI_GTK + /* Avoid unnecessary overhead if 'guifontwide' is equal to 'guifont'. */ + if (font != NOFONT && gui.norm_font != NOFONT + && pango_font_description_equal(font, gui.norm_font)) +*************** +*** 1000,1010 **** + gui_mch_free_font(font); + } + else +! #endif + gui.wide_font = font; +! #ifdef FEAT_GUI_MSWIN + gui_mch_wide_font_changed(); +! #endif + return OK; + } + #endif +--- 1000,1010 ---- + gui_mch_free_font(font); + } + else +! # endif + gui.wide_font = font; +! # ifdef FEAT_GUI_MSWIN + gui_mch_wide_font_changed(); +! # endif + return OK; + } + #endif +*** ../vim-7.3.875/src/version.c 2013-03-21 22:53:45.000000000 +0100 +--- src/version.c 2013-04-03 21:10:44.000000000 +0200 +*************** +*** 730,731 **** +--- 730,733 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 876, + /**/ + +-- +Nobody will ever need more than 640 kB RAM. + -- Bill Gates, 1983 +Windows 98 requires 16 MB RAM. + -- Bill Gates, 1999 +Logical conclusion: Nobody will ever need Windows 98. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 74c289cb457afdae7d1fc0156fb5e31e0fb32fb6 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 15 Apr 2013 17:02:31 +0200 Subject: [PATCH 55/82] - patchlevel 877 --- 7.3.877 | 100 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 7.3.877 diff --git a/7.3.877 b/7.3.877 new file mode 100644 index 00000000..7a563997 --- /dev/null +++ b/7.3.877 @@ -0,0 +1,100 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.877 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.877 (after 7.3.871) +Problem: Forward searching with search() is broken. +Solution: Fix it and add tests. (Sung Pae) +Files: src/search.c, src/testdir/test14.in, src/testdir/test14.ok + + +*** ../vim-7.3.876/src/search.c 2013-03-19 15:27:43.000000000 +0100 +--- src/search.c 2013-04-03 21:07:11.000000000 +0200 +*************** +*** 727,733 **** + ++matchcol; + } + } +! if (options & SEARCH_START) + break; + if (ptr[matchcol] == NUL + || (nmatched = vim_regexec_multi(®match, +--- 727,733 ---- + ++matchcol; + } + } +! if (matchcol == 0 && (options & SEARCH_START)) + break; + if (ptr[matchcol] == NUL + || (nmatched = vim_regexec_multi(®match, +*************** +*** 869,875 **** + /* With the SEARCH_END option move to the last character + * of the match. Don't do it for an empty match, end + * should be same as start then. */ +! if (options & SEARCH_END && !(options & SEARCH_NOOF) + && !(matchpos.lnum == endpos.lnum + && matchpos.col == endpos.col)) + { +--- 869,875 ---- + /* With the SEARCH_END option move to the last character + * of the match. Don't do it for an empty match, end + * should be same as start then. */ +! if ((options & SEARCH_END) && !(options & SEARCH_NOOF) + && !(matchpos.lnum == endpos.lnum + && matchpos.col == endpos.col)) + { +*** ../vim-7.3.876/src/testdir/test14.in 2013-03-19 15:27:43.000000000 +0100 +--- src/testdir/test14.in 2013-04-03 20:59:14.000000000 +0200 +*************** +*** 44,49 **** +--- 44,52 ---- + :call append(line('$'), line('.') - startline) + :call search('^$', 'bc') + :call append(line('$'), line('.') - startline) ++ /two ++ :call search('.', 'c') ++ :call append(line('$'), getline('.')[col('.') - 1:]) + :/^search()/,$w >>test.out + :qa! + ENDTEST +*************** +*** 79,82 **** +--- 82,86 ---- + foobar + + ++ one two + search() +*** ../vim-7.3.876/src/testdir/test14.ok 2013-03-19 15:27:43.000000000 +0100 +--- src/testdir/test14.ok 2013-04-03 20:59:14.000000000 +0200 +*************** +*** 19,21 **** +--- 19,22 ---- + 0 + 1 + 1 ++ two +*** ../vim-7.3.876/src/version.c 2013-04-03 21:11:33.000000000 +0200 +--- src/version.c 2013-04-03 21:12:50.000000000 +0200 +*************** +*** 730,731 **** +--- 730,733 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 877, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +113. You are asked about a bus schedule, you wonder if it is 16 or 32 bits. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 02330313a883beb6c9144ce8fed829d99a8f0d99 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 15 Apr 2013 17:02:32 +0200 Subject: [PATCH 56/82] - patchlevel 878 --- 7.3.878 | 78 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 7.3.878 diff --git a/7.3.878 b/7.3.878 new file mode 100644 index 00000000..1669ec40 --- /dev/null +++ b/7.3.878 @@ -0,0 +1,78 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.878 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.878 +Problem: 'fileignorecase' is missing in options window and quickref. +Solution: Add the option. +Files: runtime/optwin.vim, runtime/doc/quickref.txt + + +*** ../vim-7.3.877/runtime/optwin.vim 2010-08-15 21:57:20.000000000 +0200 +--- runtime/optwin.vim 2013-04-05 15:35:22.000000000 +0200 +*************** +*** 1042,1047 **** +--- 1035,1044 ---- + call append("$", "wildignore\tlist of patterns to ignore files for file name completion") + call OptionG("wig", &wig) + endif ++ call append("$", "fileignorecase\tignore case when using file names") ++ call BinOptionG("fic", &fic) ++ call append("$", "wildignorecase\tignore case when completing file names") ++ call BinOptionG("wic", &wic) + if has("wildmenu") + call append("$", "wildmenu\tcommand-line completion shows a list of matches") + call BinOptionG("wmnu", &wmnu) +*************** +*** 1340,1342 **** +--- 1339,1343 ---- + let &sc = s:old_sc + let &cpo = s:cpo_save + unlet s:old_title s:old_icon s:old_ru s:old_sc s:cpo_save s:idx s:lnum ++ ++ " vim: ts=8 sw=2 sts=2 +*** ../vim-7.3.877/runtime/doc/quickref.txt 2010-08-15 21:57:17.000000000 +0200 +--- runtime/doc/quickref.txt 2013-04-05 15:36:35.000000000 +0200 +*************** +*** 690,695 **** +--- 691,697 ---- + 'fileencodings' 'fencs' automatically detected character encodings + 'fileformat' 'ff' file format used for file I/O + 'fileformats' 'ffs' automatically detected values for 'fileformat' ++ 'fileignorecase' 'fic' ignore case when using file names + 'filetype' 'ft' type of file, used for autocommands + 'fillchars' 'fcs' characters to use for displaying special items + 'fkmap' 'fk' Farsi keyboard mapping +*************** +*** 934,939 **** +--- 937,943 ---- + 'wildchar' 'wc' command-line character for wildcard expansion + 'wildcharm' 'wcm' like 'wildchar' but also works when mapped + 'wildignore' 'wig' files matching these patterns are not completed ++ 'wildignorecase' 'wic' ignore case when completing file names + 'wildmenu' 'wmnu' use menu for command line completion + 'wildmode' 'wim' mode for 'wildchar' command-line expansion + 'wildoptions' 'wop' specifies how command line completion is done +*** ../vim-7.3.877/src/version.c 2013-04-03 21:14:25.000000000 +0200 +--- src/version.c 2013-04-05 15:37:09.000000000 +0200 +*************** +*** 730,731 **** +--- 730,733 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 878, + /**/ + +-- +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 /// From f23d95e4707db295016e3929098f68c46194e517 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 15 Apr 2013 17:02:32 +0200 Subject: [PATCH 57/82] - patchlevel 879 --- 7.3.879 | 97 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 97 insertions(+) create mode 100644 7.3.879 diff --git a/7.3.879 b/7.3.879 new file mode 100644 index 00000000..bb642dd8 --- /dev/null +++ b/7.3.879 @@ -0,0 +1,97 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.879 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.879 +Problem: When using an ex command in operator pending mode, using Esc to + abort the command still executes the operator. (David Bürgin) +Solution: Clear the operator when the ex command fails. (Christian Brabandt) +Files: src/normal.c + + +*** ../vim-7.3.878/src/normal.c 2013-03-16 14:20:45.000000000 +0100 +--- src/normal.c 2013-04-05 16:54:13.000000000 +0200 +*************** +*** 5418,5423 **** +--- 5418,5424 ---- + cmdarg_T *cap; + { + int old_p_im; ++ int cmd_result; + + #ifdef FEAT_VISUAL + if (VIsual_active) +*************** +*** 5449,5455 **** + old_p_im = p_im; + + /* get a command line and execute it */ +! do_cmdline(NULL, getexline, NULL, + cap->oap->op_type != OP_NOP ? DOCMD_KEEPLINE : 0); + + /* If 'insertmode' changed, enter or exit Insert mode */ +--- 5450,5456 ---- + old_p_im = p_im; + + /* get a command line and execute it */ +! cmd_result = do_cmdline(NULL, getexline, NULL, + cap->oap->op_type != OP_NOP ? DOCMD_KEEPLINE : 0); + + /* If 'insertmode' changed, enter or exit Insert mode */ +*************** +*** 5461,5472 **** + restart_edit = 0; + } + +! /* The start of the operator may have become invalid by the Ex +! * command. */ +! if (cap->oap->op_type != OP_NOP + && (cap->oap->start.lnum > curbuf->b_ml.ml_line_count + || cap->oap->start.col > +! (colnr_T)STRLEN(ml_get(cap->oap->start.lnum)))) + clearopbeep(cap->oap); + } + } +--- 5462,5478 ---- + restart_edit = 0; + } + +! if (cmd_result == FAIL) +! /* The Ex command failed, do not execute the operator. */ +! clearop(cap->oap); +! else if (cap->oap->op_type != OP_NOP + && (cap->oap->start.lnum > curbuf->b_ml.ml_line_count + || cap->oap->start.col > +! (colnr_T)STRLEN(ml_get(cap->oap->start.lnum)) +! || did_emsg +! )) +! /* The start of the operator has become invalid by the Ex command. +! */ + clearopbeep(cap->oap); + } + } +*** ../vim-7.3.878/src/version.c 2013-04-05 15:39:41.000000000 +0200 +--- src/version.c 2013-04-05 16:56:43.000000000 +0200 +*************** +*** 730,731 **** +--- 730,733 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 879, + /**/ + +-- +~ +~ +~ +".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 /// From bd0f9e2f6fc17b207147c17f12c17afe4d25fd3d Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 15 Apr 2013 17:02:33 +0200 Subject: [PATCH 58/82] - patchlevel 880 --- 7.3.880 | 287 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 287 insertions(+) create mode 100644 7.3.880 diff --git a/7.3.880 b/7.3.880 new file mode 100644 index 00000000..14a93846 --- /dev/null +++ b/7.3.880 @@ -0,0 +1,287 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.880 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.880 +Problem: When writing viminfo, old history lines may replace lines written + more recently by another Vim instance. +Solution: Mark history entries that were read from viminfo and overwrite + them when merging with the current viminfo. +Files: src/ex_getln.c + + +*** ../vim-7.3.879/src/ex_getln.c 2013-03-19 16:46:59.000000000 +0100 +--- src/ex_getln.c 2013-04-05 18:56:08.000000000 +0200 +*************** +*** 56,61 **** +--- 56,62 ---- + typedef struct hist_entry + { + int hisnum; /* identifying number */ ++ int viminfo; /* when TRUE hisstr comes from viminfo */ + char_u *hisstr; /* actual entry, separator char after the NUL */ + } histentry_T; + +*************** +*** 113,118 **** +--- 114,120 ---- + static int ExpandRTDir __ARGS((char_u *pat, int *num_file, char_u ***file, char *dirname[])); + # ifdef FEAT_CMDHIST + static char_u *get_history_arg __ARGS((expand_T *xp, int idx)); ++ static void clear_hist_entry __ARGS((histentry_T *hisptr)); + # endif + # if defined(FEAT_USR_CMDS) && defined(FEAT_EVAL) + static int ExpandUserDefined __ARGS((expand_T *xp, regmatch_T *regmatch, int *num_file, char_u ***file)); +*************** +*** 5343,5352 **** + if (hisidx[type] < 0) /* there are no entries yet */ + { + for (i = 0; i < newlen; ++i) +! { +! temp[i].hisnum = 0; +! temp[i].hisstr = NULL; +! } + } + else if (newlen > hislen) /* array becomes bigger */ + { +--- 5345,5351 ---- + if (hisidx[type] < 0) /* there are no entries yet */ + { + for (i = 0; i < newlen; ++i) +! clear_hist_entry(&temp[i]); + } + else if (newlen > hislen) /* array becomes bigger */ + { +*************** +*** 5354,5363 **** + temp[i] = history[type][i]; + j = i; + for ( ; i <= newlen - (hislen - hisidx[type]); ++i) +! { +! temp[i].hisnum = 0; +! temp[i].hisstr = NULL; +! } + for ( ; j < hislen; ++i, ++j) + temp[i] = history[type][j]; + } +--- 5353,5359 ---- + temp[i] = history[type][i]; + j = i; + for ( ; i <= newlen - (hislen - hisidx[type]); ++i) +! clear_hist_entry(&temp[i]); + for ( ; j < hislen; ++i, ++j) + temp[i] = history[type][j]; + } +*************** +*** 5385,5390 **** +--- 5381,5395 ---- + } + } + ++ static void ++ clear_hist_entry(hisptr) ++ histentry_T *hisptr; ++ { ++ hisptr->hisnum = 0; ++ hisptr->viminfo = FALSE; ++ hisptr->hisstr = NULL; ++ } ++ + /* + * Check if command line 'str' is already in history. + * If 'move_to_front' is TRUE, matching entry is moved to end of history. +*************** +*** 5433,5440 **** + history[type][last_i] = history[type][i]; + last_i = i; + } +- history[type][i].hisstr = str; + history[type][i].hisnum = ++hisnum[type]; + return TRUE; + } + return FALSE; +--- 5438,5446 ---- + history[type][last_i] = history[type][i]; + last_i = i; + } + history[type][i].hisnum = ++hisnum[type]; ++ history[type][i].viminfo = FALSE; ++ history[type][i].hisstr = str; + return TRUE; + } + return FALSE; +*************** +*** 5498,5505 **** + /* Current line is from the same mapping, remove it */ + hisptr = &history[HIST_SEARCH][hisidx[HIST_SEARCH]]; + vim_free(hisptr->hisstr); +! hisptr->hisstr = NULL; +! hisptr->hisnum = 0; + --hisnum[histype]; + if (--hisidx[HIST_SEARCH] < 0) + hisidx[HIST_SEARCH] = hislen - 1; +--- 5504,5510 ---- + /* Current line is from the same mapping, remove it */ + hisptr = &history[HIST_SEARCH][hisidx[HIST_SEARCH]]; + vim_free(hisptr->hisstr); +! clear_hist_entry(hisptr); + --hisnum[histype]; + if (--hisidx[HIST_SEARCH] < 0) + hisidx[HIST_SEARCH] = hislen - 1; +*************** +*** 5520,5525 **** +--- 5525,5531 ---- + hisptr->hisstr[len + 1] = sep; + + hisptr->hisnum = ++hisnum[histype]; ++ hisptr->viminfo = FALSE; + if (histype == HIST_SEARCH && in_map) + last_maptick = maptick; + } +*************** +*** 5709,5716 **** + for (i = hislen; i--;) + { + vim_free(hisptr->hisstr); +! hisptr->hisnum = 0; +! hisptr++->hisstr = NULL; + } + hisidx[histype] = -1; /* mark history as cleared */ + hisnum[histype] = 0; /* reset identifier counter */ +--- 5715,5721 ---- + for (i = hislen; i--;) + { + vim_free(hisptr->hisstr); +! clear_hist_entry(hisptr); + } + hisidx[histype] = -1; /* mark history as cleared */ + hisnum[histype] = 0; /* reset identifier counter */ +*************** +*** 5755,5770 **** + { + found = TRUE; + vim_free(hisptr->hisstr); +! hisptr->hisstr = NULL; +! hisptr->hisnum = 0; + } + else + { + if (i != last) + { + history[histype][last] = *hisptr; +! hisptr->hisstr = NULL; +! hisptr->hisnum = 0; + } + if (--last < 0) + last += hislen; +--- 5760,5773 ---- + { + found = TRUE; + vim_free(hisptr->hisstr); +! clear_hist_entry(hisptr); + } + else + { + if (i != last) + { + history[histype][last] = *hisptr; +! clear_hist_entry(hisptr); + } + if (--last < 0) + last += hislen; +*************** +*** 5808,5815 **** + history[histype][i] = history[histype][j]; + i = j; + } +! history[histype][i].hisstr = NULL; +! history[histype][i].hisnum = 0; + if (--i < 0) + i += hislen; + hisidx[histype] = i; +--- 5811,5817 ---- + history[histype][i] = history[histype][j]; + i = j; + } +! clear_hist_entry(&history[histype][i]); + if (--i < 0) + i += hislen; + hisidx[histype] = i; +*************** +*** 6043,6054 **** + + for (type = 0; type < HIST_COUNT; ++type) + { +! /* +! * Count the number of empty spaces in the history list. If there are +! * more spaces available than we request, then fill them up. +! */ + for (i = 0, num = 0; i < hislen; i++) +! if (history[type][i].hisstr == NULL) + num++; + len = asklen; + if (num > len) +--- 6045,6055 ---- + + for (type = 0; type < HIST_COUNT; ++type) + { +! /* Count the number of empty spaces in the history list. Entries read +! * from viminfo previously are also considered empty. If there are +! * more spaces available than we request, then fill them up. */ + for (i = 0, num = 0; i < hislen; i++) +! if (history[type][i].hisstr == NULL || history[type][i].viminfo) + num++; + len = asklen; + if (num > len) +*************** +*** 6141,6147 **** + hisidx[type] = hislen - 1; + do + { +! if (history[type][idx].hisstr != NULL) + break; + if (++idx == hislen) + idx = 0; +--- 6142,6149 ---- + hisidx[type] = hislen - 1; + do + { +! if (history[type][idx].hisstr != NULL +! || history[type][idx].viminfo) + break; + if (++idx == hislen) + idx = 0; +*************** +*** 6153,6158 **** +--- 6155,6161 ---- + { + vim_free(history[type][idx].hisstr); + history[type][idx].hisstr = viminfo_history[type][i]; ++ history[type][idx].viminfo = TRUE; + if (--idx < 0) + idx = hislen - 1; + } +*** ../vim-7.3.879/src/version.c 2013-04-05 17:43:10.000000000 +0200 +--- src/version.c 2013-04-05 18:54:11.000000000 +0200 +*************** +*** 730,731 **** +--- 730,733 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 880, + /**/ + +-- +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 /// From 7be4c3d652263d03c1c07198d3a90c75e67cb8c5 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 15 Apr 2013 17:02:34 +0200 Subject: [PATCH 59/82] - patchlevel 881 --- 7.3.881 | 108 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 108 insertions(+) create mode 100644 7.3.881 diff --git a/7.3.881 b/7.3.881 new file mode 100644 index 00000000..d0ca99b0 --- /dev/null +++ b/7.3.881 @@ -0,0 +1,108 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.881 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.881 +Problem: Python list does not work correctly. +Solution: Fix it and add a test. (Yukihiro Nakadaira) +Files: src/testdir/test86.in, src/testdir/test86.ok, src/if_py_both.h + + +*** ../vim-7.3.880/src/testdir/test86.in 2013-02-20 16:54:24.000000000 +0100 +--- src/testdir/test86.in 2013-04-05 19:18:48.000000000 +0200 +*************** +*** 321,326 **** +--- 321,351 ---- + :py trace_main() + :py sys.settrace(None) + :$put =string(l) ++ :" ++ :" Slice ++ :py ll = vim.bindeval('[0, 1, 2, 3, 4, 5]') ++ :py l = ll[:4] ++ :$put =string(pyeval('l')) ++ :py l = ll[2:] ++ :$put =string(pyeval('l')) ++ :py l = ll[:-4] ++ :$put =string(pyeval('l')) ++ :py l = ll[-2:] ++ :$put =string(pyeval('l')) ++ :py l = ll[2:4] ++ :$put =string(pyeval('l')) ++ :py l = ll[4:2] ++ :$put =string(pyeval('l')) ++ :py l = ll[-4:-2] ++ :$put =string(pyeval('l')) ++ :py l = ll[-2:-4] ++ :$put =string(pyeval('l')) ++ :py l = ll[:] ++ :$put =string(pyeval('l')) ++ :py l = ll[0:6] ++ :$put =string(pyeval('l')) ++ :py l = ll[-10:10] ++ :$put =string(pyeval('l')) + :endfun + :" + :call Test() +*** ../vim-7.3.880/src/testdir/test86.ok 2013-02-20 16:54:24.000000000 +0100 +--- src/testdir/test86.ok 2013-04-05 19:18:48.000000000 +0200 +*************** +*** 65,67 **** +--- 65,78 ---- + 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] +*** ../vim-7.3.880/src/if_py_both.h 2013-02-14 22:11:31.000000000 +0100 +--- src/if_py_both.h 2013-04-05 19:27:46.000000000 +0200 +*************** +*** 1139,1145 **** + + for (i = 0; i < n; ++i) + { +! PyObject *item = ListItem(self, i); + if (item == NULL) + { + Py_DECREF(list); +--- 1139,1145 ---- + + for (i = 0; i < n; ++i) + { +! PyObject *item = ListItem(self, first + i); + if (item == NULL) + { + Py_DECREF(list); +*** ../vim-7.3.880/src/version.c 2013-04-05 18:58:42.000000000 +0200 +--- src/version.c 2013-04-05 19:31:59.000000000 +0200 +*************** +*** 730,731 **** +--- 730,733 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 881, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +123. You ask the car dealer to install an extra cigarette lighter + on your new car to power your notebook. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From fa0ab21248b070b66cac0ad855888c525b3bfbb3 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 15 Apr 2013 17:02:34 +0200 Subject: [PATCH 60/82] - patchlevel 882 --- 7.3.882 | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 7.3.882 diff --git a/7.3.882 b/7.3.882 new file mode 100644 index 00000000..bfc348b4 --- /dev/null +++ b/7.3.882 @@ -0,0 +1,59 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.882 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.882 +Problem: CursorHold may trigger after receiving the termresponse. +Solution: Set the did_cursorhold flag. (Hayaki Saito) +Files: src/term.c + + +*** ../vim-7.3.881/src/term.c 2013-03-16 14:33:32.000000000 +0100 +--- src/term.c 2013-04-05 19:49:58.000000000 +0200 +*************** +*** 4137,4142 **** +--- 4137,4145 ---- + char *p = NULL; + + u7_status = U7_GOT; ++ # ifdef FEAT_AUTOCMD ++ did_cursorhold = TRUE; ++ # endif + if (extra == 2) + p = "single"; + else if (extra == 3) +*************** +*** 4153,4158 **** +--- 4156,4164 ---- + if (*T_CRV != NUL && i > 2 + (tp[0] != CSI) && tp[i] == 'c') + { + crv_status = CRV_GOT; ++ # ifdef FEAT_AUTOCMD ++ did_cursorhold = TRUE; ++ # endif + + /* If this code starts with CSI, you can bet that the + * terminal uses 8-bit codes. */ +*** ../vim-7.3.881/src/version.c 2013-04-05 19:32:30.000000000 +0200 +--- src/version.c 2013-04-05 19:46:21.000000000 +0200 +*************** +*** 730,731 **** +--- 730,733 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 882, + /**/ + +-- +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 /// From 90f0bb5dcf30d4a7dd44fe027f259e223e3855b8 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 15 Apr 2013 17:02:35 +0200 Subject: [PATCH 61/82] - patchlevel 883 --- 7.3.883 | 65 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 7.3.883 diff --git a/7.3.883 b/7.3.883 new file mode 100644 index 00000000..984e5d4c --- /dev/null +++ b/7.3.883 @@ -0,0 +1,65 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.883 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.883 (after 7.3.880) +Problem: Can't build with some combination of features. +Solution: Adjust #ifdefs. +Files: src/ex_getln.c + + +*** ../vim-7.3.882/src/ex_getln.c 2013-04-05 18:58:41.000000000 +0200 +--- src/ex_getln.c 2013-04-06 13:24:22.000000000 +0200 +*************** +*** 114,126 **** + static int ExpandRTDir __ARGS((char_u *pat, int *num_file, char_u ***file, char *dirname[])); + # ifdef FEAT_CMDHIST + static char_u *get_history_arg __ARGS((expand_T *xp, int idx)); +- static void clear_hist_entry __ARGS((histentry_T *hisptr)); + # endif + # if defined(FEAT_USR_CMDS) && defined(FEAT_EVAL) + static int ExpandUserDefined __ARGS((expand_T *xp, regmatch_T *regmatch, int *num_file, char_u ***file)); + static int ExpandUserList __ARGS((expand_T *xp, int *num_file, char_u ***file)); + # endif + #endif + + #ifdef FEAT_CMDWIN + static int ex_window __ARGS((void)); +--- 114,128 ---- + static int ExpandRTDir __ARGS((char_u *pat, int *num_file, char_u ***file, char *dirname[])); + # ifdef FEAT_CMDHIST + static char_u *get_history_arg __ARGS((expand_T *xp, int idx)); + # endif + # if defined(FEAT_USR_CMDS) && defined(FEAT_EVAL) + static int ExpandUserDefined __ARGS((expand_T *xp, regmatch_T *regmatch, int *num_file, char_u ***file)); + static int ExpandUserList __ARGS((expand_T *xp, int *num_file, char_u ***file)); + # endif + #endif ++ #ifdef FEAT_CMDHIST ++ static void clear_hist_entry __ARGS((histentry_T *hisptr)); ++ #endif + + #ifdef FEAT_CMDWIN + static int ex_window __ARGS((void)); +*** ../vim-7.3.882/src/version.c 2013-04-05 19:50:12.000000000 +0200 +--- src/version.c 2013-04-06 14:28:41.000000000 +0200 +*************** +*** 730,731 **** +--- 730,733 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 883, + /**/ + +-- +Why is it called "Windows"? "Gates" would be more appropriate... + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From a7d73c0395fc7d4fed846f5686a6c5e9c6b345a0 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 15 Apr 2013 17:02:36 +0200 Subject: [PATCH 62/82] - patchlevel 884 --- 7.3.884 | 73 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 7.3.884 diff --git a/7.3.884 b/7.3.884 new file mode 100644 index 00000000..31d2e7f3 --- /dev/null +++ b/7.3.884 @@ -0,0 +1,73 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.884 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.884 +Problem: Compiler warning for variable shadowing another. (John Little) +Solution: Rename the variable. (Christian Brabandt) +Files: src/term.c + + +*** ../vim-7.3.883/src/term.c 2013-04-05 19:50:12.000000000 +0200 +--- src/term.c 2013-04-06 13:27:59.000000000 +0200 +*************** +*** 4134,4151 **** + /* eat it when it has 2 arguments and ends in 'R' */ + if (j == 1 && tp[i] == 'R') + { +! char *p = NULL; + + u7_status = U7_GOT; + # ifdef FEAT_AUTOCMD + did_cursorhold = TRUE; + # endif + if (extra == 2) +! p = "single"; + else if (extra == 3) +! p = "double"; +! if (p != NULL) +! set_option_value((char_u *)"ambw", 0L, (char_u *)p, 0); + key_name[0] = (int)KS_EXTRA; + key_name[1] = (int)KE_IGNORE; + slen = i + 1; +--- 4134,4151 ---- + /* eat it when it has 2 arguments and ends in 'R' */ + if (j == 1 && tp[i] == 'R') + { +! char *aw = NULL; + + u7_status = U7_GOT; + # ifdef FEAT_AUTOCMD + did_cursorhold = TRUE; + # endif + if (extra == 2) +! aw = "single"; + else if (extra == 3) +! aw = "double"; +! if (aw != NULL) +! set_option_value((char_u *)"ambw", 0L, (char_u *)aw, 0); + key_name[0] = (int)KS_EXTRA; + key_name[1] = (int)KE_IGNORE; + slen = i + 1; +*** ../vim-7.3.883/src/version.c 2013-04-06 14:28:56.000000000 +0200 +--- src/version.c 2013-04-06 14:30:05.000000000 +0200 +*************** +*** 730,731 **** +--- 730,733 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 884, + /**/ + +-- +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 /// From b46193c5cdc90b13bed6c9e802eceb22df9b1f87 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 15 Apr 2013 17:02:36 +0200 Subject: [PATCH 63/82] - patchlevel 885 --- 7.3.885 | 88 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100644 7.3.885 diff --git a/7.3.885 b/7.3.885 new file mode 100644 index 00000000..f7fdbd52 --- /dev/null +++ b/7.3.885 @@ -0,0 +1,88 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.885 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.885 +Problem: Double free for list and dict in Lua. (Shougo Matsu) +Solution: Do not unref list and dict. (Yasuhiro Matsumoto) +Files: src/if_lua.c + + +*** ../vim-7.3.884/src/if_lua.c 2013-02-14 22:19:47.000000000 +0100 +--- src/if_lua.c 2013-04-12 11:42:56.000000000 +0200 +*************** +*** 665,677 **** + luaV_type_tostring(list, LUAVIM_LIST) + + static int +- luaV_list_gc (lua_State *L) +- { +- list_unref(luaV_unbox(L, luaV_List, 1)); +- return 0; +- } +- +- static int + luaV_list_len (lua_State *L) + { + list_T *l = luaV_unbox(L, luaV_List, 1); +--- 665,670 ---- +*************** +*** 801,807 **** + + static const luaL_Reg luaV_List_mt[] = { + {"__tostring", luaV_list_tostring}, +- {"__gc", luaV_list_gc}, + {"__len", luaV_list_len}, + {"__call", luaV_list_call}, + {"__index", luaV_list_index}, +--- 794,799 ---- +*************** +*** 830,842 **** + luaV_type_tostring(dict, LUAVIM_DICT) + + static int +- luaV_dict_gc (lua_State *L) +- { +- dict_unref(luaV_unbox(L, luaV_Dict, 1)); +- return 0; +- } +- +- static int + luaV_dict_len (lua_State *L) + { + dict_T *d = luaV_unbox(L, luaV_Dict, 1); +--- 822,827 ---- +*************** +*** 929,935 **** + + static const luaL_Reg luaV_Dict_mt[] = { + {"__tostring", luaV_dict_tostring}, +- {"__gc", luaV_dict_gc}, + {"__len", luaV_dict_len}, + {"__call", luaV_dict_call}, + {"__index", luaV_dict_index}, +--- 914,919 ---- +*** ../vim-7.3.884/src/version.c 2013-04-06 14:30:35.000000000 +0200 +--- src/version.c 2013-04-12 11:44:45.000000000 +0200 +*************** +*** 730,731 **** +--- 730,733 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 885, + /**/ + +-- +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 /// From 9b9b87f6c555cfde8656741a59c58eb75c9c2def Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 15 Apr 2013 17:02:37 +0200 Subject: [PATCH 64/82] - patchlevel 886 --- 7.3.886 | 93 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 93 insertions(+) create mode 100644 7.3.886 diff --git a/7.3.886 b/7.3.886 new file mode 100644 index 00000000..a823507e --- /dev/null +++ b/7.3.886 @@ -0,0 +1,93 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.886 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.886 +Problem: Can't build with multi-byte on Solaris 10. +Solution: Add #ifdef X_HAVE_UTF8_STRING. (Laurent Blume) +Files: src/ui.c + + +*** ../vim-7.3.885/src/ui.c 2013-03-13 17:50:20.000000000 +0100 +--- src/ui.c 2013-04-12 12:24:10.000000000 +0200 +*************** +*** 1458,1464 **** + + int + clip_gen_owner_exists(cbd) +! VimClipboard *cbd; + { + #ifdef FEAT_XCLIPBOARD + # ifdef FEAT_GUI_GTK +--- 1458,1464 ---- + + int + clip_gen_owner_exists(cbd) +! VimClipboard *cbd UNUSED; + { + #ifdef FEAT_XCLIPBOARD + # ifdef FEAT_GUI_GTK +*************** +*** 2134,2140 **** + text_prop.encoding = *type; + text_prop.format = *format; + text_prop.nitems = len; +! #ifdef FEAT_MBYTE + if (*type == utf8_atom) + status = Xutf8TextPropertyToTextList(X_DISPLAY, &text_prop, + &text_list, &n_text); +--- 2134,2140 ---- + text_prop.encoding = *type; + text_prop.format = *format; + text_prop.nitems = len; +! #if defined(FEAT_MBYTE) && defined(X_HAVE_UTF8_STRING) + if (*type == utf8_atom) + status = Xutf8TextPropertyToTextList(X_DISPLAY, &text_prop, + &text_list, &n_text); +*************** +*** 2196,2203 **** + default: type = XA_STRING; + } + #ifdef FEAT_MBYTE +! if (type == utf8_atom && !enc_utf8) +! /* Only request utf-8 when 'encoding' is utf8. */ + continue; + #endif + success = MAYBE; +--- 2196,2208 ---- + default: type = XA_STRING; + } + #ifdef FEAT_MBYTE +! if (type == utf8_atom +! # if defined(X_HAVE_UTF8_STRING) +! && !enc_utf8 +! # endif +! ) +! /* Only request utf-8 when 'encoding' is utf8 and +! * Xutf8TextPropertyToTextList is available. */ + continue; + #endif + success = MAYBE; +*** ../vim-7.3.885/src/version.c 2013-04-12 12:18:43.000000000 +0200 +--- src/version.c 2013-04-12 12:25:44.000000000 +0200 +*************** +*** 730,731 **** +--- 730,733 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 886, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +149. You find your computer sexier than your girlfriend + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 1e450b9070776e73f63af7ba46e17ebcfe4a040c Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 15 Apr 2013 17:02:37 +0200 Subject: [PATCH 65/82] - patchlevel 887 --- 7.3.887 | 308 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 308 insertions(+) create mode 100644 7.3.887 diff --git a/7.3.887 b/7.3.887 new file mode 100644 index 00000000..228845f6 --- /dev/null +++ b/7.3.887 @@ -0,0 +1,308 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.887 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.887 +Problem: No tests for Visual mode operators, what 7.3.879 fixes. +Solution: Add a new test file. (David Bürgin) +Files: src/testdir/test94.in, src/testdir/test94.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.3.886/src/testdir/test94.in 2013-04-12 13:44:19.000000000 +0200 +--- src/testdir/test94.in 2013-04-12 13:37:12.000000000 +0200 +*************** +*** 0 **** +--- 1,98 ---- ++ Test for Visual mode and operators ++ ++ Tests for the two kinds of operations: Those executed with Visual mode ++ followed by an operator and those executed via Operator-pending mode. Also ++ part of the test are mappings, counts, and repetition with the . command. ++ ++ Test cases: ++ - Visual modes (v V CTRL-V) followed by an operator; count; repeating ++ - Visual mode maps; count; repeating ++ - Simple ++ - With an Ex command (custom text object) ++ - Operator-pending mode maps ++ - Simple ++ - With Ex command moving the cursor ++ - With Ex command and Visual selection (custom text object) ++ - Patch 7.3.879: Properly abort Ex command in Operator-pending mode ++ ++ STARTTEST ++ :so small.vim ++ :set nocp ++ : ++ :" User functions ++ :function MoveToCap() ++ : call search('\u', 'W') ++ :endfunction ++ :function SelectInCaps() ++ : let [line1, col1] = searchpos('\u', 'bcnW') ++ : let [line2, col2] = searchpos('.\u', 'nW') ++ : call setpos("'<", [0, line1, col1, 0]) ++ : call setpos("'>", [0, line2, col2, 0]) ++ : normal! gv ++ :endfunction ++ :function MoveToEndCount(count) ++ : normal! v:count . e ++ :endfunction ++ : ++ :" Visual modes followed by operator ++ /^apple ++ lvld.l3vd.: ++ /^line 1 ++ Vcnewlinej.j2Vd.: ++ /^xxxx ++ jlc l.l2c----l.: ++ : ++ :" Visual mode maps (movement and text object) ++ :vnoremap W /\u/s-1 ++ :vnoremap iW :call SelectInCaps() ++ /^Kiwi ++ vWcNol.fD2vd.: ++ /^Jambu ++ llviWc-l.l2vdl.: ++ : ++ :" Operator-pending mode maps (movement and text object) ++ :onoremap W /\u/ ++ :onoremap W :call MoveToCap() ++ :onoremap iW :call SelectInCaps() ++ /^Pineapple ++ cW-l.l2.l.: ++ /^Juniper ++ g?\WfD.: ++ /^Lemon ++ yiWPlciWNew: ++ : ++ :" Patch 7.3.879: Properly abort Operator-pending mode for "dv:" etc. ++ /^zzzz ++ dV: dv: :set noma | let v:errmsg = '' ++ d: :set ma | put = v:errmsg =~# '^E21' ? 'ok' : 'failed' ++ dv:dV::set noma | let v:errmsg = '' ++ d::set ma | put = v:errmsg =~# '^E21' ? 'failed' : 'ok' ++ :/^start:/+2,$w! test.out ++ :q! ++ ENDTEST ++ ++ start: ++ ++ apple banana cherry ++ ++ line 1 line 1 ++ line 2 line 2 ++ line 3 line 3 ++ line 4 line 4 ++ line 5 line 5 ++ line 6 line 6 ++ ++ xxxxxxxxxxxxx ++ xxxxxxxxxxxxx ++ xxxxxxxxxxxxx ++ xxxxxxxxxxxxx ++ ++ KiwiRaspberryDateWatermelonPeach ++ JambuRambutanBananaTangerineMango ++ ++ PineappleQuinceLoganberryOrangeGrapefruitKiwiZ ++ JuniperDurianZ ++ LemonNectarineZ ++ ++ zzzz ++ zzzz +*** ../vim-7.3.886/src/testdir/test94.ok 2013-04-12 13:44:19.000000000 +0200 +--- src/testdir/test94.ok 2013-04-12 13:37:12.000000000 +0200 +*************** +*** 0 **** +--- 1,20 ---- ++ a y ++ ++ newline ++ newline ++ ++ --------x ++ --------x ++ xxxx--------x ++ xxxx--------x ++ ++ NoNoberryach ++ --ago ++ ++ ----Z ++ WhavcreQhevnaZ ++ LemonNewNectarineZ ++ ++ zzz ++ ok ++ ok +*** ../vim-7.3.886/src/testdir/Make_amiga.mak 2013-02-26 17:21:15.000000000 +0100 +--- src/testdir/Make_amiga.mak 2013-04-12 13:39:47.000000000 +0200 +*************** +*** 32,38 **** + test71.out test72.out test73.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 + + .SUFFIXES: .in .out + +--- 32,39 ---- + test71.out test72.out test73.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 + + .SUFFIXES: .in .out + +*************** +*** 142,144 **** +--- 143,146 ---- + test91.out: test91.in + test92.out: test92.in + test93.out: test93.in ++ test94.out: test94.in +*** ../vim-7.3.886/src/testdir/Make_dos.mak 2013-02-26 17:21:15.000000000 +0100 +--- src/testdir/Make_dos.mak 2013-04-12 13:39:56.000000000 +0200 +*************** +*** 31,37 **** + test74.out test75.out test76.out test77.out test78.out \ + 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 + + SCRIPTS32 = test50.out test70.out + +--- 31,38 ---- + test74.out test75.out test76.out test77.out test78.out \ + 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 + + SCRIPTS32 = test50.out test70.out + +*** ../vim-7.3.886/src/testdir/Make_ming.mak 2013-02-26 17:21:15.000000000 +0100 +--- src/testdir/Make_ming.mak 2013-04-12 13:40:06.000000000 +0200 +*************** +*** 51,57 **** + test74.out test75.out test76.out test77.out test78.out \ + 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 + + SCRIPTS32 = test50.out test70.out + +--- 51,58 ---- + test74.out test75.out test76.out test77.out test78.out \ + 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 + + SCRIPTS32 = test50.out test70.out + +*** ../vim-7.3.886/src/testdir/Make_os2.mak 2013-02-26 17:21:15.000000000 +0100 +--- src/testdir/Make_os2.mak 2013-04-12 13:40:13.000000000 +0200 +*************** +*** 32,38 **** + test71.out test72.out test73.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 + + .SUFFIXES: .in .out + +--- 32,39 ---- + test71.out test72.out test73.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 + + .SUFFIXES: .in .out + +*** ../vim-7.3.886/src/testdir/Make_vms.mms 2013-02-26 17:21:15.000000000 +0100 +--- src/testdir/Make_vms.mms 2013-04-12 13:40:24.000000000 +0200 +*************** +*** 4,10 **** + # Authors: Zoltan Arpadffy, + # Sandor Kopanyi, + # +! # Last change: 2013-02-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, + # Sandor Kopanyi, + # +! # Last change: 2013 Apr 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. +*************** +*** 77,83 **** + 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 + + # Known problems: + # Test 30: a problem around mac format - unknown reason +--- 77,83 ---- + 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 + + # Known problems: + # Test 30: a problem around mac format - unknown reason +*** ../vim-7.3.886/src/testdir/Makefile 2013-02-26 17:21:15.000000000 +0100 +--- src/testdir/Makefile 2013-04-12 13:40:32.000000000 +0200 +*************** +*** 28,34 **** + test74.out test75.out test76.out test77.out test78.out \ + 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 + + SCRIPTS_GUI = test16.out + +--- 28,35 ---- + test74.out test75.out test76.out test77.out test78.out \ + 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 + + SCRIPTS_GUI = test16.out + +*** ../vim-7.3.886/src/version.c 2013-04-12 12:27:24.000000000 +0200 +--- src/version.c 2013-04-12 13:43:34.000000000 +0200 +*************** +*** 730,731 **** +--- 730,733 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 887, + /**/ + +-- +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 /// From bc1559fb71ea49bc83c95a4c3ff99a929ae218b0 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 15 Apr 2013 17:02:38 +0200 Subject: [PATCH 66/82] - patchlevel 888 --- 7.3.888 | 150 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 150 insertions(+) create mode 100644 7.3.888 diff --git a/7.3.888 b/7.3.888 new file mode 100644 index 00000000..6707f8a0 --- /dev/null +++ b/7.3.888 @@ -0,0 +1,150 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.888 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.888 +Problem: Filename completion with 'fileignorecase' does not work for + multi-byte characters. +Solution: Make 'fileignorecase' work properly. (Hirohito Higashi) +Files: src/misc2.c + + +*** ../vim-7.3.887/src/misc2.c 2013-03-19 18:31:45.000000000 +0100 +--- src/misc2.c 2013-04-12 14:15:03.000000000 +0200 +*************** +*** 6099,6150 **** + int maxlen; + { + int i; + const char *s = NULL; + +! for (i = 0; maxlen < 0 || i < maxlen; ++i) + { + /* End of "p": check if "q" also ends or just has a slash. */ +! if (p[i] == NUL) + { +! if (q[i] == NUL) /* full match */ + return 0; + s = q; + break; + } + + /* End of "q": check if "p" just has a slash. */ +! if (q[i] == NUL) + { + s = p; + break; + } + +! if ((p_fic ? TOUPPER_LOC(p[i]) != TOUPPER_LOC(q[i]) : p[i] != q[i]) + #ifdef BACKSLASH_IN_FILENAME + /* consider '/' and '\\' to be equal */ +! && !((p[i] == '/' && q[i] == '\\') +! || (p[i] == '\\' && q[i] == '/')) + #endif + ) + { +! if (vim_ispathsep(p[i])) + return -1; +! if (vim_ispathsep(q[i])) + return 1; +! return ((char_u *)p)[i] - ((char_u *)q)[i]; /* no match */ + } + } + if (s == NULL) /* "i" ran into "maxlen" */ + return 0; + + /* ignore a trailing slash, but not "//" or ":/" */ +! if (s[i + 1] == NUL + && i > 0 + && !after_pathsep((char_u *)s, (char_u *)s + i) + #ifdef BACKSLASH_IN_FILENAME +! && (s[i] == '/' || s[i] == '\\') + #else +! && s[i] == '/' + #endif + ) + return 0; /* match with trailing slash */ +--- 6099,6157 ---- + int maxlen; + { + int i; ++ int c1, c2; + const char *s = NULL; + +! for (i = 0; maxlen < 0 || i < maxlen; i += MB_PTR2LEN((char_u *)p + i)) + { ++ c1 = PTR2CHAR((char_u *)p + i); ++ c2 = PTR2CHAR((char_u *)q + i); ++ + /* End of "p": check if "q" also ends or just has a slash. */ +! if (c1 == NUL) + { +! if (c2 == NUL) /* full match */ + return 0; + s = q; + break; + } + + /* End of "q": check if "p" just has a slash. */ +! if (c2 == NUL) + { + s = p; + break; + } + +! if ((p_fic ? MB_TOUPPER(c1) != MB_TOUPPER(c2) : c1 != c2) + #ifdef BACKSLASH_IN_FILENAME + /* consider '/' and '\\' to be equal */ +! && !((c1 == '/' && c2 == '\\') +! || (c1 == '\\' && c2 == '/')) + #endif + ) + { +! if (vim_ispathsep(c1)) + return -1; +! if (vim_ispathsep(c2)) + return 1; +! return p_fic ? MB_TOUPPER(c1) - MB_TOUPPER(c2) +! : c1 - c2; /* no match */ + } + } + if (s == NULL) /* "i" ran into "maxlen" */ + return 0; + ++ c1 = PTR2CHAR((char_u *)s + i); ++ c2 = PTR2CHAR((char_u *)s + i + MB_PTR2LEN((char_u *)s + i)); + /* ignore a trailing slash, but not "//" or ":/" */ +! if (c2 == NUL + && i > 0 + && !after_pathsep((char_u *)s, (char_u *)s + i) + #ifdef BACKSLASH_IN_FILENAME +! && (c1 == '/' || c1 == '\\') + #else +! && c1 == '/' + #endif + ) + return 0; /* match with trailing slash */ +*** ../vim-7.3.887/src/version.c 2013-04-12 13:44:49.000000000 +0200 +--- src/version.c 2013-04-12 14:10:41.000000000 +0200 +*************** +*** 730,731 **** +--- 730,733 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 888, + /**/ + +-- +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 /// From ca6833753916270c2d09b3d5577aa32939661f9b Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 15 Apr 2013 17:02:39 +0200 Subject: [PATCH 67/82] - patchlevel 889 --- 7.3.889 | 71 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 7.3.889 diff --git a/7.3.889 b/7.3.889 new file mode 100644 index 00000000..f63ce355 --- /dev/null +++ b/7.3.889 @@ -0,0 +1,71 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.889 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.889 +Problem: Can't build with Ruby 2.0 on a 64 bit system. +Solution: Define rb_fix2int and rb_num2int. (Kohei Suzuki) +Files: src/if_ruby.c + + +*** ../vim-7.3.888/src/if_ruby.c 2013-03-07 15:16:16.000000000 +0100 +--- src/if_ruby.c 2013-04-12 15:25:26.000000000 +0200 +*************** +*** 88,93 **** +--- 88,101 ---- + # define rb_int2big rb_int2big_stub + #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 ++ + #include + #ifdef RUBY19_OR_LATER + # include +*************** +*** 352,357 **** +--- 360,376 ---- + { + 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); ++ } ++ long rb_num2int_stub(VALUE x) ++ { ++ return dll_rb_num2int(x); ++ } ++ #endif + #if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 20 + VALUE + rb_float_new_in_heap(double d) +*** ../vim-7.3.888/src/version.c 2013-04-12 14:42:35.000000000 +0200 +--- src/version.c 2013-04-12 15:24:15.000000000 +0200 +*************** +*** 730,731 **** +--- 730,733 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 889, + /**/ + +-- +"Hit any key to continue" is very confusing when you have two keyboards. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 20f7953208b27e37689f1acbe27206d636bdbe52 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 15 Apr 2013 17:02:39 +0200 Subject: [PATCH 68/82] - patchlevel 890 --- 7.3.890 | 60 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 7.3.890 diff --git a/7.3.890 b/7.3.890 new file mode 100644 index 00000000..a7bcbca7 --- /dev/null +++ b/7.3.890 @@ -0,0 +1,60 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.890 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.890 +Problem: Test 79 fails on Windows. (Michael Soyka) +Solution: Add comment below line causing an error. +Files: src/testdir/test79.in + + +*** ../vim-7.3.889/src/testdir/test79.in 2013-03-19 17:42:10.000000000 +0100 +--- src/testdir/test79.in 2013-04-13 11:16:38.000000000 +0200 +*************** +*** 206,216 **** + STARTTEST + :set magic& + :set cpo& +! /^TEST/ + j:s/A./\=submatch(0)/ + j:s/B./\=submatch(0)/ + /^Q$ + :s/Q[^\n]Q/\=submatch(0)."foobar"/ + ENDTEST + + TEST_7: +--- 206,217 ---- + STARTTEST + :set magic& + :set cpo& +! /^TEST_7/ + j:s/A./\=submatch(0)/ + j:s/B./\=submatch(0)/ + /^Q$ + :s/Q[^\n]Q/\=submatch(0)."foobar"/ ++ :" Avoid :s error breaks dotest map on Windows. + ENDTEST + + TEST_7: +*** ../vim-7.3.889/src/version.c 2013-04-14 16:18:52.000000000 +0200 +--- src/version.c 2013-04-14 16:21:14.000000000 +0200 +*************** +*** 730,731 **** +--- 730,733 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 890, + /**/ + +-- +"Hit any key to continue" it said, but nothing happened after F sharp. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 042920f49ff30cb808c13773ac923e1ebd6dd9f1 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 15 Apr 2013 17:02:40 +0200 Subject: [PATCH 69/82] - patchlevel 891 --- 7.3.891 | 142 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 142 insertions(+) create mode 100644 7.3.891 diff --git a/7.3.891 b/7.3.891 new file mode 100644 index 00000000..456410f4 --- /dev/null +++ b/7.3.891 @@ -0,0 +1,142 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.891 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.891 +Problem: Merging viminfo history doesn't work well. +Solution: Don't stop when one type of history is empty. Don't merge history + when writing viminfo. +Files: src/ex_getln.c + + +*** ../vim-7.3.890/src/ex_getln.c 2013-04-06 14:28:56.000000000 +0200 +--- src/ex_getln.c 2013-04-14 16:25:28.000000000 +0200 +*************** +*** 6130,6136 **** + for (type = 0; type < HIST_COUNT; ++type) + { + if (history[type] == NULL) +! return; + idx = hisidx[type] + viminfo_hisidx[type]; + if (idx >= hislen) + idx -= hislen; +--- 6130,6136 ---- + for (type = 0; type < HIST_COUNT; ++type) + { + if (history[type] == NULL) +! continue; + idx = hisidx[type] + viminfo_hisidx[type]; + if (idx >= hislen) + idx -= hislen; +*************** +*** 6182,6187 **** +--- 6182,6188 ---- + int num_saved; + char_u *p; + int c; ++ int round; + + init_history(); + if (hislen == 0) +*************** +*** 6200,6225 **** + _("Input Line")); + if (num_saved > hislen) + num_saved = hislen; +! i = hisidx[type]; +! if (i >= 0) +! while (num_saved--) +! { +! p = history[type][i].hisstr; +! if (p != NULL) + { +! fputc(hist_type2char(type, TRUE), fp); +! /* For the search history: put the separator in the second +! * column; use a space if there isn't one. */ +! if (type == HIST_SEARCH) + { +! c = p[STRLEN(p) + 1]; +! putc(c == NUL ? ' ' : c, fp); + } +- viminfo_writestring(fp, p); + } +! if (--i < 0) +! i = hislen - 1; +! } + } + } + #endif /* FEAT_VIMINFO */ +--- 6201,6250 ---- + _("Input Line")); + if (num_saved > hislen) + num_saved = hislen; +! +! /* +! * Merge typed and viminfo history: +! * round 1: history of typed commands. +! * round 2: history from recently read viminfo. +! */ +! for (round = 1; round <= 2; ++round) +! { +! i = round == 1 ? hisidx[type] : 0; +! if (i >= 0) +! while (num_saved > 0 +! && !(round == 2 && i >= viminfo_hisidx[type])) + { +! p = round == 1 ? history[type][i].hisstr +! : viminfo_history[type][i]; +! if (p != NULL) + { +! --num_saved; +! fputc(hist_type2char(type, TRUE), fp); +! /* For the search history: put the separator in the +! * second column; use a space if there isn't one. */ +! if (type == HIST_SEARCH) +! { +! c = p[STRLEN(p) + 1]; +! putc(c == NUL ? ' ' : c, fp); +! } +! viminfo_writestring(fp, p); +! } +! if (round == 1) +! { +! /* Decrement index, loop around and stop when back at +! * the start. */ +! if (--i < 0) +! i = hislen - 1; +! if (i == hisidx[type]) +! break; +! } +! else +! { +! /* Increment index. Stop at the end in the while. */ +! ++i; + } + } +! } + } + } + #endif /* FEAT_VIMINFO */ +*** ../vim-7.3.890/src/version.c 2013-04-14 16:21:30.000000000 +0200 +--- src/version.c 2013-04-14 16:23:17.000000000 +0200 +*************** +*** 730,731 **** +--- 730,733 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 891, + /**/ + +-- +"The question of whether computers can think is just like the question +of whether submarines can swim." -- Edsger W. Dijkstra + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 7c0976d098455ffea616e52e6ed5aed7e6c43936 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 15 Apr 2013 17:02:41 +0200 Subject: [PATCH 70/82] - patchlevel 892 --- 7.3.892 | 295 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 295 insertions(+) create mode 100644 7.3.892 diff --git a/7.3.892 b/7.3.892 new file mode 100644 index 00000000..4031d4df --- /dev/null +++ b/7.3.892 @@ -0,0 +1,295 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.892 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.892 (after 7.3.891) +Problem: Still merging problems for viminfo history. +Solution: Do not merge lines when writing, don't write old viminfo lines. +Files: src/ex_getln.c, src/ex_cmds.c, src/proto/ex_getln.pro + + +*** ../vim-7.3.891/src/ex_getln.c 2013-04-14 16:26:08.000000000 +0200 +--- src/ex_getln.c 2013-04-14 23:12:37.000000000 +0200 +*************** +*** 68,74 **** + + static int hist_char2type __ARGS((int c)); + +! static int in_history __ARGS((int, char_u *, int, int)); + # ifdef FEAT_EVAL + static int calc_hist_idx __ARGS((int histype, int num)); + # endif +--- 68,74 ---- + + static int hist_char2type __ARGS((int c)); + +! static int in_history __ARGS((int, char_u *, int, int, int)); + # ifdef FEAT_EVAL + static int calc_hist_idx __ARGS((int histype, int num)); + # endif +*************** +*** 5397,5407 **** + * If 'move_to_front' is TRUE, matching entry is moved to end of history. + */ + static int +! in_history(type, str, move_to_front, sep) + int type; + char_u *str; + int move_to_front; /* Move the entry to the front if it exists */ + int sep; + { + int i; + int last_i = -1; +--- 5397,5408 ---- + * If 'move_to_front' is TRUE, matching entry is moved to end of history. + */ + static int +! in_history(type, str, move_to_front, sep, writing) + int type; + char_u *str; + int move_to_front; /* Move the entry to the front if it exists */ + int sep; ++ int writing; /* ignore entries read from viminfo */ + { + int i; + int last_i = -1; +*************** +*** 5419,5424 **** +--- 5420,5426 ---- + * well. */ + p = history[type][i].hisstr; + if (STRCMP(str, p) == 0 ++ && !(writing && history[type][i].viminfo) + && (type != HIST_SEARCH || sep == p[STRLEN(p) + 1])) + { + if (!move_to_front) +*************** +*** 5513,5519 **** + } + last_maptick = -1; + } +! if (!in_history(histype, new_entry, TRUE, sep)) + { + if (++hisidx[histype] == hislen) + hisidx[histype] = 0; +--- 5515,5521 ---- + } + last_maptick = -1; + } +! if (!in_history(histype, new_entry, TRUE, sep, FALSE)) + { + if (++hisidx[histype] == hislen) + hisidx[histype] = 0; +*************** +*** 6032,6039 **** + * This allocates history arrays to store the read history lines. + */ + void +! prepare_viminfo_history(asklen) + int asklen; + { + int i; + int num; +--- 6034,6042 ---- + * This allocates history arrays to store the read history lines. + */ + void +! prepare_viminfo_history(asklen, writing) + int asklen; ++ int writing; + { + int i; + int num; +*************** +*** 6041,6047 **** + int len; + + init_history(); +! viminfo_add_at_front = (asklen != 0); + if (asklen > hislen) + asklen = hislen; + +--- 6044,6050 ---- + int len; + + init_history(); +! viminfo_add_at_front = (asklen != 0 && !writing); + if (asklen > hislen) + asklen = hislen; + +*************** +*** 6073,6080 **** + * new. + */ + int +! read_viminfo_history(virp) + vir_T *virp; + { + int type; + long_u len; +--- 6076,6084 ---- + * new. + */ + int +! read_viminfo_history(virp, writing) + vir_T *virp; ++ int writing; + { + int type; + long_u len; +*************** +*** 6090,6096 **** + int sep = (*val == ' ' ? NUL : *val); + + if (!in_history(type, val + (type == HIST_SEARCH), +! viminfo_add_at_front, sep)) + { + /* Need to re-allocate to append the separator byte. */ + len = STRLEN(val); +--- 6094,6100 ---- + int sep = (*val == ' ' ? NUL : *val); + + if (!in_history(type, val + (type == HIST_SEARCH), +! viminfo_add_at_front, sep, writing)) + { + /* Need to re-allocate to append the separator byte. */ + len = STRLEN(val); +*************** +*** 6120,6125 **** +--- 6124,6132 ---- + return viminfo_readline(virp); + } + ++ /* ++ * Finish reading history lines from viminfo. Not used when writing viminfo. ++ */ + void + finish_viminfo_history() + { +*************** +*** 6216,6222 **** + { + p = round == 1 ? history[type][i].hisstr + : viminfo_history[type][i]; +! if (p != NULL) + { + --num_saved; + fputc(hist_type2char(type, TRUE), fp); +--- 6223,6229 ---- + { + p = round == 1 ? history[type][i].hisstr + : viminfo_history[type][i]; +! if (p != NULL && (round == 2 || !history[type][i].viminfo)) + { + --num_saved; + fputc(hist_type2char(type, TRUE), fp); +*************** +*** 6245,6250 **** +--- 6252,6261 ---- + } + } + } ++ for (i = 0; i < viminfo_hisidx[type]; ++i) ++ vim_free(viminfo_history[type][i]); ++ vim_free(viminfo_history[type]); ++ viminfo_history[type] = NULL; + } + } + #endif /* FEAT_VIMINFO */ +*** ../vim-7.3.891/src/ex_cmds.c 2013-03-07 16:41:26.000000000 +0100 +--- src/ex_cmds.c 2013-04-14 23:08:26.000000000 +0200 +*************** +*** 2113,2119 **** + buf_T *buf; + + #ifdef FEAT_CMDHIST +! prepare_viminfo_history(forceit ? 9999 : 0); + #endif + eof = viminfo_readline(virp); + while (!eof && virp->vir_line[0] != '>') +--- 2113,2119 ---- + buf_T *buf; + + #ifdef FEAT_CMDHIST +! prepare_viminfo_history(forceit ? 9999 : 0, writing); + #endif + eof = viminfo_readline(virp); + while (!eof && virp->vir_line[0] != '>') +*************** +*** 2161,2167 **** + case '=': + case '@': + #ifdef FEAT_CMDHIST +! eof = read_viminfo_history(virp); + #else + eof = viminfo_readline(virp); + #endif +--- 2161,2167 ---- + case '=': + case '@': + #ifdef FEAT_CMDHIST +! eof = read_viminfo_history(virp, writing); + #else + eof = viminfo_readline(virp); + #endif +*************** +*** 2182,2188 **** + + #ifdef FEAT_CMDHIST + /* Finish reading history items. */ +! finish_viminfo_history(); + #endif + + /* Change file names to buffer numbers for fmarks. */ +--- 2182,2189 ---- + + #ifdef FEAT_CMDHIST + /* Finish reading history items. */ +! if (!writing) +! finish_viminfo_history(); + #endif + + /* Change file names to buffer numbers for fmarks. */ +*** ../vim-7.3.891/src/proto/ex_getln.pro 2011-05-19 18:26:34.000000000 +0200 +--- src/proto/ex_getln.pro 2013-04-14 23:12:02.000000000 +0200 +*************** +*** 48,55 **** + void remove_key_from_history __ARGS((void)); + int get_list_range __ARGS((char_u **str, int *num1, int *num2)); + void ex_history __ARGS((exarg_T *eap)); +! void prepare_viminfo_history __ARGS((int asklen)); +! int read_viminfo_history __ARGS((vir_T *virp)); + void finish_viminfo_history __ARGS((void)); + void write_viminfo_history __ARGS((FILE *fp)); + void cmd_pchar __ARGS((int c, int offset)); +--- 48,55 ---- + void remove_key_from_history __ARGS((void)); + int get_list_range __ARGS((char_u **str, int *num1, int *num2)); + void ex_history __ARGS((exarg_T *eap)); +! void prepare_viminfo_history __ARGS((int asklen, int writing)); +! int read_viminfo_history __ARGS((vir_T *virp, int writing)); + void finish_viminfo_history __ARGS((void)); + void write_viminfo_history __ARGS((FILE *fp)); + void cmd_pchar __ARGS((int c, int offset)); +*** ../vim-7.3.891/src/version.c 2013-04-14 16:26:08.000000000 +0200 +--- src/version.c 2013-04-14 22:53:04.000000000 +0200 +*************** +*** 730,731 **** +--- 730,733 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 892, + /**/ + +-- +"Hit any key to continue" is a lie. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 520a3cb1179ae0c810ccb1eb62f46e8f6abda83d Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 15 Apr 2013 17:02:42 +0200 Subject: [PATCH 71/82] - patchlevel 893 --- 7.3.893 | 718 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 718 insertions(+) create mode 100644 7.3.893 diff --git a/7.3.893 b/7.3.893 new file mode 100644 index 00000000..5dd71ba7 --- /dev/null +++ b/7.3.893 @@ -0,0 +1,718 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.893 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.893 +Problem: Crash when using b:, w: or t: after closing the buffer, window or + tabpage. +Solution: Allocate the dictionary instead of having it part of the + buffer/window/tabpage struct. (Yukihiro Nakadaira) +Files: src/buffer.c, src/eval.c, src/fileio.c, src/structs.h, + src/window.c, src/proto/eval.pro + + +*** ../vim-7.3.892/src/buffer.c 2013-03-19 16:46:59.000000000 +0100 +--- src/buffer.c 2013-04-15 12:07:07.000000000 +0200 +*************** +*** 648,653 **** +--- 648,656 ---- + buf_T *buf; + { + free_buffer_stuff(buf, TRUE); ++ #ifdef FEAT_EVAL ++ unref_var_dict(buf->b_vars); ++ #endif + #ifdef FEAT_LUA + lua_buffer_free(buf); + #endif +*************** +*** 689,696 **** + #endif + } + #ifdef FEAT_EVAL +! vars_clear(&buf->b_vars.dv_hashtab); /* free all internal variables */ +! hash_init(&buf->b_vars.dv_hashtab); + #endif + #ifdef FEAT_USR_CMDS + uc_clear(&buf->b_ucmds); /* clear local user commands */ +--- 692,699 ---- + #endif + } + #ifdef FEAT_EVAL +! vars_clear(&buf->b_vars->dv_hashtab); /* free all internal variables */ +! hash_init(&buf->b_vars->dv_hashtab); + #endif + #ifdef FEAT_USR_CMDS + uc_clear(&buf->b_ucmds); /* clear local user commands */ +*************** +*** 1694,1699 **** +--- 1697,1713 ---- + vim_free(ffname); + return NULL; + } ++ #ifdef FEAT_EVAL ++ /* init b: variables */ ++ buf->b_vars = dict_alloc(); ++ if (buf->b_vars == NULL) ++ { ++ vim_free(ffname); ++ vim_free(buf); ++ return NULL; ++ } ++ init_var_dict(buf->b_vars, &buf->b_bufvar, VAR_SCOPE); ++ #endif + } + + if (ffname != NULL) +*************** +*** 1778,1787 **** + buf->b_wininfo->wi_fpos.lnum = lnum; + buf->b_wininfo->wi_win = curwin; + +- #ifdef FEAT_EVAL +- /* init b: variables */ +- init_var_dict(&buf->b_vars, &buf->b_bufvar, VAR_SCOPE); +- #endif + #ifdef FEAT_SYN_HL + hash_init(&buf->b_s.b_keywtab); + hash_init(&buf->b_s.b_keywtab_ic); +--- 1792,1797 ---- +*** ../vim-7.3.892/src/eval.c 2013-03-19 14:25:50.000000000 +0100 +--- src/eval.c 2013-04-15 12:26:33.000000000 +0200 +*************** +*** 2131,2137 **** + { + char_u numbuf[NUMBUFLEN]; + +! list_hashtable_vars(&curbuf->b_vars.dv_hashtab, (char_u *)"b:", + TRUE, first); + + sprintf((char *)numbuf, "%ld", (long)curbuf->b_changedtick); +--- 2131,2137 ---- + { + char_u numbuf[NUMBUFLEN]; + +! list_hashtable_vars(&curbuf->b_vars->dv_hashtab, (char_u *)"b:", + TRUE, first); + + sprintf((char *)numbuf, "%ld", (long)curbuf->b_changedtick); +*************** +*** 2146,2152 **** + list_win_vars(first) + int *first; + { +! list_hashtable_vars(&curwin->w_vars.dv_hashtab, + (char_u *)"w:", TRUE, first); + } + +--- 2146,2152 ---- + list_win_vars(first) + int *first; + { +! list_hashtable_vars(&curwin->w_vars->dv_hashtab, + (char_u *)"w:", TRUE, first); + } + +*************** +*** 2158,2164 **** + list_tab_vars(first) + int *first; + { +! list_hashtable_vars(&curtab->tp_vars.dv_hashtab, + (char_u *)"t:", TRUE, first); + } + #endif +--- 2158,2164 ---- + list_tab_vars(first) + int *first; + { +! list_hashtable_vars(&curtab->tp_vars->dv_hashtab, + (char_u *)"t:", TRUE, first); + } + #endif +*************** +*** 3948,3954 **** + } + + /* b: variables */ +! ht = &curbuf->b_vars.dv_hashtab; + if (bdone < ht->ht_used) + { + if (bdone++ == 0) +--- 3948,3954 ---- + } + + /* b: variables */ +! ht = &curbuf->b_vars->dv_hashtab; + if (bdone < ht->ht_used) + { + if (bdone++ == 0) +*************** +*** 3966,3972 **** + } + + /* w: variables */ +! ht = &curwin->w_vars.dv_hashtab; + if (wdone < ht->ht_used) + { + if (wdone++ == 0) +--- 3966,3972 ---- + } + + /* w: variables */ +! ht = &curwin->w_vars->dv_hashtab; + if (wdone < ht->ht_used) + { + if (wdone++ == 0) +*************** +*** 3980,3986 **** + + #ifdef FEAT_WINDOWS + /* t: variables */ +! ht = &curtab->tp_vars.dv_hashtab; + if (tdone < ht->ht_used) + { + if (tdone++ == 0) +--- 3980,3986 ---- + + #ifdef FEAT_WINDOWS + /* t: variables */ +! ht = &curtab->tp_vars->dv_hashtab; + if (tdone < ht->ht_used) + { + if (tdone++ == 0) +*************** +*** 6787,6802 **** + + /* buffer-local variables */ + for (buf = firstbuf; buf != NULL; buf = buf->b_next) +! set_ref_in_ht(&buf->b_vars.dv_hashtab, copyID); + + /* window-local variables */ + FOR_ALL_TAB_WINDOWS(tp, wp) +! set_ref_in_ht(&wp->w_vars.dv_hashtab, copyID); + + #ifdef FEAT_WINDOWS + /* tabpage-local variables */ + for (tp = first_tabpage; tp != NULL; tp = tp->tp_next) +! set_ref_in_ht(&tp->tp_vars.dv_hashtab, copyID); + #endif + + /* global variables */ +--- 6787,6802 ---- + + /* buffer-local variables */ + for (buf = firstbuf; buf != NULL; buf = buf->b_next) +! set_ref_in_item(&buf->b_bufvar.di_tv, copyID); + + /* window-local variables */ + FOR_ALL_TAB_WINDOWS(tp, wp) +! set_ref_in_item(&wp->w_winvar.di_tv, copyID); + + #ifdef FEAT_WINDOWS + /* tabpage-local variables */ + for (tp = first_tabpage; tp != NULL; tp = tp->tp_next) +! set_ref_in_item(&tp->tp_winvar.di_tv, copyID); + #endif + + /* global variables */ +*************** +*** 11156,11162 **** + * find_var_in_ht(). */ + varname = (char_u *)"b:" + 2; + /* look up the variable */ +! v = find_var_in_ht(&curbuf->b_vars.dv_hashtab, varname, FALSE); + if (v != NULL) + copy_tv(&v->di_tv, rettv); + } +--- 11156,11162 ---- + * find_var_in_ht(). */ + varname = (char_u *)"b:" + 2; + /* look up the variable */ +! v = find_var_in_ht(&curbuf->b_vars->dv_hashtab, varname, FALSE); + if (v != NULL) + copy_tv(&v->di_tv, rettv); + } +*************** +*** 11779,11785 **** + if (tp != NULL && varname != NULL) + { + /* look up the variable */ +! v = find_var_in_ht(&tp->tp_vars.dv_hashtab, varname, FALSE); + if (v != NULL) + copy_tv(&v->di_tv, rettv); + else if (argvars[2].v_type != VAR_UNKNOWN) +--- 11779,11785 ---- + if (tp != NULL && varname != NULL) + { + /* look up the variable */ +! v = find_var_in_ht(&tp->tp_vars->dv_hashtab, varname, FALSE); + if (v != NULL) + copy_tv(&v->di_tv, rettv); + else if (argvars[2].v_type != VAR_UNKNOWN) +*************** +*** 11935,11941 **** + * find_var_in_ht(). */ + varname = (char_u *)"w:" + 2; + /* look up the variable */ +! v = find_var_in_ht(&win->w_vars.dv_hashtab, varname, FALSE); + if (v != NULL) + copy_tv(&v->di_tv, rettv); + } +--- 11935,11941 ---- + * find_var_in_ht(). */ + varname = (char_u *)"w:" + 2; + /* look up the variable */ +! v = find_var_in_ht(&win->w_vars->dv_hashtab, varname, FALSE); + if (v != NULL) + copy_tv(&v->di_tv, rettv); + } +*************** +*** 14333,14339 **** + rettv->v_type = VAR_STRING; + } + +! #ifdef FEAT_MZSCHEME + /* + * "mzeval()" function + */ +--- 14333,14339 ---- + rettv->v_type = VAR_STRING; + } + +! #if defined(FEAT_MZSCHEME) || defined(PROTO) + /* + * "mzeval()" function + */ +*************** +*** 20134,20145 **** + || vim_strchr(name + 2, AUTOLOAD_CHAR) != NULL) + return NULL; + if (*name == 'b') /* buffer variable */ +! return &curbuf->b_vars.dv_hashtab; + if (*name == 'w') /* window variable */ +! return &curwin->w_vars.dv_hashtab; + #ifdef FEAT_WINDOWS + if (*name == 't') /* tab page variable */ +! return &curtab->tp_vars.dv_hashtab; + #endif + if (*name == 'v') /* v: variable */ + return &vimvarht; +--- 20134,20145 ---- + || vim_strchr(name + 2, AUTOLOAD_CHAR) != NULL) + return NULL; + if (*name == 'b') /* buffer variable */ +! return &curbuf->b_vars->dv_hashtab; + if (*name == 'w') /* window variable */ +! return &curwin->w_vars->dv_hashtab; + #ifdef FEAT_WINDOWS + if (*name == 't') /* tab page variable */ +! return &curtab->tp_vars->dv_hashtab; + #endif + if (*name == 'v') /* v: variable */ + return &vimvarht; +*************** +*** 20229,20234 **** +--- 20229,20247 ---- + } + + /* ++ * Unreference a dictionary initialized by init_var_dict(). ++ */ ++ void ++ unref_var_dict(dict) ++ dict_T *dict; ++ { ++ /* Now the dict needs to be freed if no one else is using it, go back to ++ * normal reference counting. */ ++ dict->dv_refcount -= DO_NOT_FREE_CNT - 1; ++ dict_unref(dict); ++ } ++ ++ /* + * Clean up a list of internal variables. + * Frees all allocated variables and the value they contain. + * Clears hashtab "ht", does not free it. +*** ../vim-7.3.892/src/fileio.c 2013-03-19 16:46:59.000000000 +0100 +--- src/fileio.c 2013-04-15 11:52:34.000000000 +0200 +*************** +*** 8955,8962 **** + /* Hmm, original window disappeared. Just use the first one. */ + curwin = firstwin; + # ifdef FEAT_EVAL +! vars_clear(&aucmd_win->w_vars.dv_hashtab); /* free all w: variables */ +! hash_init(&aucmd_win->w_vars.dv_hashtab); /* re-use the hashtab */ + # endif + #else + curwin = aco->save_curwin; +--- 8955,8962 ---- + /* Hmm, original window disappeared. Just use the first one. */ + curwin = firstwin; + # ifdef FEAT_EVAL +! vars_clear(&aucmd_win->w_vars->dv_hashtab); /* free all w: variables */ +! hash_init(&aucmd_win->w_vars->dv_hashtab); /* re-use the hashtab */ + # endif + #else + curwin = aco->save_curwin; +*** ../vim-7.3.892/src/structs.h 2012-07-16 17:31:48.000000000 +0200 +--- src/structs.h 2013-04-15 11:52:34.000000000 +0200 +*************** +*** 1611,1617 **** + + #ifdef FEAT_EVAL + dictitem_T b_bufvar; /* variable for "b:" Dictionary */ +! dict_T b_vars; /* internal variables, local to buffer */ + #endif + + #if defined(FEAT_BEVAL) && defined(FEAT_EVAL) +--- 1611,1617 ---- + + #ifdef FEAT_EVAL + dictitem_T b_bufvar; /* variable for "b:" Dictionary */ +! dict_T *b_vars; /* internal variables, local to buffer */ + #endif + + #if defined(FEAT_BEVAL) && defined(FEAT_EVAL) +*************** +*** 1757,1763 **** + frame_T *(tp_snapshot[SNAP_COUNT]); /* window layout snapshots */ + #ifdef FEAT_EVAL + dictitem_T tp_winvar; /* variable for "t:" Dictionary */ +! dict_T tp_vars; /* internal variables, local to tab page */ + #endif + }; + +--- 1757,1763 ---- + frame_T *(tp_snapshot[SNAP_COUNT]); /* window layout snapshots */ + #ifdef FEAT_EVAL + dictitem_T tp_winvar; /* variable for "t:" Dictionary */ +! dict_T *tp_vars; /* internal variables, local to tab page */ + #endif + }; + +*************** +*** 2080,2086 **** + + #ifdef FEAT_EVAL + dictitem_T w_winvar; /* variable for "w:" Dictionary */ +! dict_T w_vars; /* internal variables, local to window */ + #endif + + #if defined(FEAT_RIGHTLEFT) && defined(FEAT_FKMAP) +--- 2080,2086 ---- + + #ifdef FEAT_EVAL + dictitem_T w_winvar; /* variable for "w:" Dictionary */ +! dict_T *w_vars; /* internal variables, local to window */ + #endif + + #if defined(FEAT_RIGHTLEFT) && defined(FEAT_FKMAP) +*** ../vim-7.3.892/src/window.c 2013-02-06 13:37:58.000000000 +0100 +--- src/window.c 2013-04-15 12:20:09.000000000 +0200 +*************** +*** 3457,3481 **** + alloc_tabpage() + { + tabpage_T *tp; + + tp = (tabpage_T *)alloc_clear((unsigned)sizeof(tabpage_T)); +! if (tp != NULL) + { +! # ifdef FEAT_GUI +! int i; + +! for (i = 0; i < 3; i++) +! tp->tp_prev_which_scrollbars[i] = -1; + # endif + # ifdef FEAT_DIFF +! tp->tp_diff_invalid = TRUE; + # endif +! #ifdef FEAT_EVAL +! /* init t: variables */ +! init_var_dict(&tp->tp_vars, &tp->tp_winvar, VAR_SCOPE); +! #endif +! tp->tp_ch_used = p_ch; +! } + return tp; + } + +--- 3457,3491 ---- + alloc_tabpage() + { + tabpage_T *tp; ++ # ifdef FEAT_GUI ++ int i; ++ # endif ++ + + tp = (tabpage_T *)alloc_clear((unsigned)sizeof(tabpage_T)); +! if (tp == NULL) +! return NULL; +! +! # ifdef FEAT_EVAL +! /* init t: variables */ +! tp->tp_vars = dict_alloc(); +! if (tp->tp_vars == NULL) + { +! vim_free(tp); +! return NULL; +! } +! init_var_dict(tp->tp_vars, &tp->tp_winvar, VAR_SCOPE); +! # endif + +! # ifdef FEAT_GUI +! for (i = 0; i < 3; i++) +! tp->tp_prev_which_scrollbars[i] = -1; + # endif + # ifdef FEAT_DIFF +! tp->tp_diff_invalid = TRUE; + # endif +! tp->tp_ch_used = p_ch; +! + return tp; + } + +*************** +*** 3491,3497 **** + for (idx = 0; idx < SNAP_COUNT; ++idx) + clear_snapshot(tp, idx); + #ifdef FEAT_EVAL +! vars_clear(&tp->tp_vars.dv_hashtab); /* free all t: variables */ + #endif + vim_free(tp); + } +--- 3501,3509 ---- + for (idx = 0; idx < SNAP_COUNT; ++idx) + clear_snapshot(tp, idx); + #ifdef FEAT_EVAL +! vars_clear(&tp->tp_vars->dv_hashtab); /* free all t: variables */ +! hash_init(&tp->tp_vars->dv_hashtab); +! unref_var_dict(tp->tp_vars); + #endif + vim_free(tp); + } +*************** +*** 4363,4433 **** + * allocate window structure and linesizes arrays + */ + new_wp = (win_T *)alloc_clear((unsigned)sizeof(win_T)); +! if (new_wp != NULL && win_alloc_lines(new_wp) == FAIL) + { + vim_free(new_wp); +! new_wp = NULL; + } + +! if (new_wp != NULL) + { + #ifdef FEAT_AUTOCMD +! /* Don't execute autocommands while the window is not properly +! * initialized yet. gui_create_scrollbar() may trigger a FocusGained +! * event. */ +! block_autocmds(); + #endif +! /* +! * link the window in the window list +! */ + #ifdef FEAT_WINDOWS +! if (!hidden) +! win_append(after, new_wp); + #endif + #ifdef FEAT_VERTSPLIT +! new_wp->w_wincol = 0; +! new_wp->w_width = Columns; + #endif + +! /* position the display and the cursor at the top of the file. */ +! new_wp->w_topline = 1; + #ifdef FEAT_DIFF +! new_wp->w_topfill = 0; + #endif +! new_wp->w_botline = 2; +! new_wp->w_cursor.lnum = 1; + #ifdef FEAT_SCROLLBIND +! new_wp->w_scbind_pos = 1; + #endif + +! /* We won't calculate w_fraction until resizing the window */ +! new_wp->w_fraction = 0; +! new_wp->w_prev_fraction_row = -1; + + #ifdef FEAT_GUI +! if (gui.in_use) +! { +! gui_create_scrollbar(&new_wp->w_scrollbars[SBAR_LEFT], +! SBAR_LEFT, new_wp); +! gui_create_scrollbar(&new_wp->w_scrollbars[SBAR_RIGHT], +! SBAR_RIGHT, new_wp); +! } +! #endif +! #ifdef FEAT_EVAL +! /* init w: variables */ +! init_var_dict(&new_wp->w_vars, &new_wp->w_winvar, VAR_SCOPE); + #endif + #ifdef FEAT_FOLDING +! foldInitWin(new_wp); + #endif + #ifdef FEAT_AUTOCMD +! unblock_autocmds(); + #endif + #ifdef FEAT_SEARCH_EXTRA +! new_wp->w_match_head = NULL; +! new_wp->w_next_match_id = 4; + #endif +- } + return new_wp; + } + +--- 4375,4453 ---- + * allocate window structure and linesizes arrays + */ + new_wp = (win_T *)alloc_clear((unsigned)sizeof(win_T)); +! if (new_wp == NULL) +! return NULL; +! +! if (win_alloc_lines(new_wp) == FAIL) + { + vim_free(new_wp); +! return NULL; + } + +! #ifdef FEAT_EVAL +! /* init w: variables */ +! new_wp->w_vars = dict_alloc(); +! if (new_wp->w_vars == NULL) + { ++ win_free_lsize(new_wp); ++ vim_free(new_wp); ++ return NULL; ++ } ++ init_var_dict(new_wp->w_vars, &new_wp->w_winvar, VAR_SCOPE); ++ #endif ++ + #ifdef FEAT_AUTOCMD +! /* Don't execute autocommands while the window is not properly +! * initialized yet. gui_create_scrollbar() may trigger a FocusGained +! * event. */ +! block_autocmds(); + #endif +! /* +! * link the window in the window list +! */ + #ifdef FEAT_WINDOWS +! if (!hidden) +! win_append(after, new_wp); + #endif + #ifdef FEAT_VERTSPLIT +! new_wp->w_wincol = 0; +! new_wp->w_width = Columns; + #endif + +! /* position the display and the cursor at the top of the file. */ +! new_wp->w_topline = 1; + #ifdef FEAT_DIFF +! new_wp->w_topfill = 0; + #endif +! new_wp->w_botline = 2; +! new_wp->w_cursor.lnum = 1; + #ifdef FEAT_SCROLLBIND +! new_wp->w_scbind_pos = 1; + #endif + +! /* We won't calculate w_fraction until resizing the window */ +! new_wp->w_fraction = 0; +! new_wp->w_prev_fraction_row = -1; + + #ifdef FEAT_GUI +! if (gui.in_use) +! { +! gui_create_scrollbar(&new_wp->w_scrollbars[SBAR_LEFT], +! SBAR_LEFT, new_wp); +! gui_create_scrollbar(&new_wp->w_scrollbars[SBAR_RIGHT], +! SBAR_RIGHT, new_wp); +! } + #endif + #ifdef FEAT_FOLDING +! foldInitWin(new_wp); + #endif + #ifdef FEAT_AUTOCMD +! unblock_autocmds(); + #endif + #ifdef FEAT_SEARCH_EXTRA +! new_wp->w_match_head = NULL; +! new_wp->w_next_match_id = 4; + #endif + return new_wp; + } + +*************** +*** 4488,4494 **** + clear_winopt(&wp->w_allbuf_opt); + + #ifdef FEAT_EVAL +! vars_clear(&wp->w_vars.dv_hashtab); /* free all w: variables */ + #endif + + if (prevwin == wp) +--- 4508,4516 ---- + clear_winopt(&wp->w_allbuf_opt); + + #ifdef FEAT_EVAL +! vars_clear(&wp->w_vars->dv_hashtab); /* free all w: variables */ +! hash_init(&wp->w_vars->dv_hashtab); +! unref_var_dict(wp->w_vars); + #endif + + if (prevwin == wp) +*** ../vim-7.3.892/src/proto/eval.pro 2013-01-30 14:55:35.000000000 +0100 +--- src/proto/eval.pro 2013-04-15 12:26:39.000000000 +0200 +*************** +*** 24,31 **** + int get_spellword __ARGS((list_T *list, char_u **pp)); + typval_T *eval_expr __ARGS((char_u *arg, char_u **nextcmd)); + int call_vim_function __ARGS((char_u *func, int argc, char_u **argv, int safe, int str_arg_only, typval_T *rettv)); +- void *call_func_retstr __ARGS((char_u *func, int argc, char_u **argv, int safe)); + long call_func_retnr __ARGS((char_u *func, int argc, char_u **argv, int safe)); + void *call_func_retlist __ARGS((char_u *func, int argc, char_u **argv, int safe)); + void *save_funccal __ARGS((void)); + void restore_funccal __ARGS((void *vfc)); +--- 24,31 ---- + int get_spellword __ARGS((list_T *list, char_u **pp)); + typval_T *eval_expr __ARGS((char_u *arg, char_u **nextcmd)); + int call_vim_function __ARGS((char_u *func, int argc, char_u **argv, int safe, int str_arg_only, typval_T *rettv)); + long call_func_retnr __ARGS((char_u *func, int argc, char_u **argv, int safe)); ++ void *call_func_retstr __ARGS((char_u *func, int argc, char_u **argv, int safe)); + void *call_func_retlist __ARGS((char_u *func, int argc, char_u **argv, int safe)); + void *save_funccal __ARGS((void)); + void restore_funccal __ARGS((void *vfc)); +*************** +*** 95,100 **** +--- 95,101 ---- + char_u *get_var_value __ARGS((char_u *name)); + void new_script_vars __ARGS((scid_T id)); + void init_var_dict __ARGS((dict_T *dict, dictitem_T *dict_var, int scope)); ++ void unref_var_dict __ARGS((dict_T *dict)); + void vars_clear __ARGS((hashtab_T *ht)); + void copy_tv __ARGS((typval_T *from, typval_T *to)); + void ex_echo __ARGS((exarg_T *eap)); +*** ../vim-7.3.892/src/version.c 2013-04-14 23:19:32.000000000 +0200 +--- src/version.c 2013-04-15 12:19:17.000000000 +0200 +*************** +*** 730,731 **** +--- 730,733 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 893, + /**/ + +-- +Apathy Error: Don't bother striking any key. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From be2e68872fb1a5f2e0bdb530a6a0c0789ece9dab Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 15 Apr 2013 17:02:42 +0200 Subject: [PATCH 72/82] - patchlevel 894 --- 7.3.894 | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 7.3.894 diff --git a/7.3.894 b/7.3.894 new file mode 100644 index 00000000..8b435fee --- /dev/null +++ b/7.3.894 @@ -0,0 +1,47 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.894 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.894 +Problem: Using wrong RUBY_VER causing Ruby build to break. +Solution: Correct the RUBY_VER value. (Yongwei Wu) +Files: src/bigvim.bat + + +*** ../vim-7.3.893/src/bigvim.bat 2012-08-29 14:18:26.000000000 +0200 +--- src/bigvim.bat 2013-04-15 12:32:08.000000000 +0200 +*************** +*** 1,5 **** + :: command to build big Vim with OLE, Perl, Python, Ruby and Tcl + SET VCDIR="C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\" + SET TOOLDIR=E:\ +! %VCDIR%nmake -f Make_mvc.mak GUI=yes OLE=yes PERL=E:\perl514 DYNAMIC_PERL=yes PERL_VER=514 PYTHON=%TOOLDIR%python27 DYNAMIC_PYTHON=yes PYTHON_VER=27 PYTHON3=%TOOLDIR%python32 DYNAMIC_PYTHON3=yes PYTHON3_VER=32 RUBY=%TOOLDIR%ruby192 DYNAMIC_RUBY=yes RUBY_VER=192 RUBY_VER_LONG=1.9.2 TCL=%TOOLDIR%tcl TCL_VER=85 TCL_VER_LONG=8.5 DYNAMIC_TCL=yes %1 IME=yes CSCOPE=yes + +--- 1,5 ---- + :: command to build big Vim with OLE, Perl, Python, Ruby and Tcl + SET VCDIR="C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\" + SET TOOLDIR=E:\ +! %VCDIR%nmake -f Make_mvc.mak GUI=yes OLE=yes PERL=E:\perl514 DYNAMIC_PERL=yes PERL_VER=514 PYTHON=%TOOLDIR%python27 DYNAMIC_PYTHON=yes PYTHON_VER=27 PYTHON3=%TOOLDIR%python32 DYNAMIC_PYTHON3=yes PYTHON3_VER=32 RUBY=%TOOLDIR%ruby192 DYNAMIC_RUBY=yes RUBY_VER=19 RUBY_VER_LONG=1.9.2 TCL=%TOOLDIR%tcl TCL_VER=85 TCL_VER_LONG=8.5 DYNAMIC_TCL=yes %1 IME=yes CSCOPE=yes + +*** ../vim-7.3.893/src/version.c 2013-04-15 12:27:30.000000000 +0200 +--- src/version.c 2013-04-15 12:34:36.000000000 +0200 +*************** +*** 730,731 **** +--- 730,733 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 894, + /**/ + +-- +Did you ever see a "Hit any key to continue" message in a music piece? + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From d1aaf17c79160dba71d21e40f33537c3ee3e1faf Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 15 Apr 2013 17:02:43 +0200 Subject: [PATCH 73/82] - patchlevel 895 --- 7.3.895 | 189 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 189 insertions(+) create mode 100644 7.3.895 diff --git a/7.3.895 b/7.3.895 new file mode 100644 index 00000000..676c972e --- /dev/null +++ b/7.3.895 @@ -0,0 +1,189 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.895 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.895 +Problem: Valgrind error in test 91. (Issue 128) +Solution: Pass scope name to find_var_in_ht(). +Files: src/eval.c + + +*** ../vim-7.3.894/src/eval.c 2013-04-15 12:27:30.000000000 +0200 +--- src/eval.c 2013-04-15 13:00:44.000000000 +0200 +*************** +*** 788,794 **** + 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, 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)); +--- 788,794 ---- + 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)); +*************** +*** 11150,11162 **** + } + else + { +! if (*varname == NUL) +! /* let getbufvar({nr}, "") return the "b:" dictionary. The +! * scope prefix before the NUL byte is required by +! * find_var_in_ht(). */ +! varname = (char_u *)"b:" + 2; +! /* look up the variable */ +! v = find_var_in_ht(&curbuf->b_vars->dv_hashtab, varname, FALSE); + if (v != NULL) + copy_tv(&v->di_tv, rettv); + } +--- 11150,11159 ---- + } + else + { +! /* Look up the variable. */ +! /* Let getbufvar({nr}, "") return the "b:" dictionary. */ +! v = find_var_in_ht(&curbuf->b_vars->dv_hashtab, +! 'b', varname, FALSE); + if (v != NULL) + copy_tv(&v->di_tv, rettv); + } +*************** +*** 11779,11785 **** + if (tp != NULL && varname != NULL) + { + /* look up the variable */ +! v = find_var_in_ht(&tp->tp_vars->dv_hashtab, varname, FALSE); + if (v != NULL) + copy_tv(&v->di_tv, rettv); + else if (argvars[2].v_type != VAR_UNKNOWN) +--- 11776,11782 ---- + if (tp != NULL && varname != NULL) + { + /* look up the variable */ +! v = find_var_in_ht(&tp->tp_vars->dv_hashtab, 0, varname, FALSE); + if (v != NULL) + copy_tv(&v->di_tv, rettv); + else if (argvars[2].v_type != VAR_UNKNOWN) +*************** +*** 11929,11941 **** + get_option_tv(&varname, rettv, 1); + else + { +! if (*varname == NUL) +! /* let getwinvar({nr}, "") return the "w:" dictionary. The +! * scope prefix before the NUL byte is required by +! * find_var_in_ht(). */ +! varname = (char_u *)"w:" + 2; +! /* look up the variable */ +! v = find_var_in_ht(&win->w_vars->dv_hashtab, varname, FALSE); + if (v != NULL) + copy_tv(&v->di_tv, rettv); + } +--- 11926,11934 ---- + get_option_tv(&varname, rettv, 1); + else + { +! /* Look up the variable. */ +! /* Let getwinvar({nr}, "") return the "w:" dictionary. */ +! v = find_var_in_ht(&win->w_vars->dv_hashtab, 'w', varname, FALSE); + if (v != NULL) + copy_tv(&v->di_tv, rettv); + } +*************** +*** 20041,20056 **** + *htp = ht; + if (ht == NULL) + return NULL; +! return find_var_in_ht(ht, varname, htp != NULL); + } + + /* +! * Find variable "varname" in hashtab "ht". + * Returns NULL if not found. + */ + static dictitem_T * +! find_var_in_ht(ht, varname, writing) + hashtab_T *ht; + char_u *varname; + int writing; + { +--- 20034,20050 ---- + *htp = ht; + if (ht == NULL) + return NULL; +! return find_var_in_ht(ht, *name, varname, htp != NULL); + } + + /* +! * Find variable "varname" in hashtab "ht" with name "htname". + * 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; + { +*************** +*** 20059,20065 **** + if (*varname == NUL) + { + /* Must be something like "s:", otherwise "ht" would be NULL. */ +! switch (varname[-2]) + { + case 's': return &SCRIPT_SV(current_SID)->sv_var; + case 'g': return &globvars_var; +--- 20053,20059 ---- + if (*varname == NUL) + { + /* Must be something like "s:", otherwise "ht" would be NULL. */ +! switch (htname) + { + case 's': return &SCRIPT_SV(current_SID)->sv_var; + case 'g': return &globvars_var; +*************** +*** 20389,20395 **** + EMSG2(_(e_illvar), name); + return; + } +! v = find_var_in_ht(ht, varname, TRUE); + + if (tv->v_type == VAR_FUNC && var_check_func_name(name, v == NULL)) + return; +--- 20383,20389 ---- + EMSG2(_(e_illvar), name); + return; + } +! v = find_var_in_ht(ht, 0, varname, TRUE); + + if (tv->v_type == VAR_FUNC && var_check_func_name(name, v == NULL)) + return; +*** ../vim-7.3.894/src/version.c 2013-04-15 12:36:14.000000000 +0200 +--- src/version.c 2013-04-15 13:04:54.000000000 +0200 +*************** +*** 730,731 **** +--- 730,733 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 895, + /**/ + +-- + 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 /// From 9785c117e89e9f4d922cde01c6bac5cb1dd9ebda Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 15 Apr 2013 17:02:43 +0200 Subject: [PATCH 74/82] - patchlevel 896 --- 7.3.896 | 206 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 206 insertions(+) create mode 100644 7.3.896 diff --git a/7.3.896 b/7.3.896 new file mode 100644 index 00000000..e7f33ccc --- /dev/null +++ b/7.3.896 @@ -0,0 +1,206 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.896 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.896 +Problem: Memory leaks in Lua interface. +Solution: Fix the leaks, add tests. (Yukihiro Nakadaira) +Files: src/testdir/test85.in, src/testdir/test85.ok, src/if_lua.c + + +*** ../vim-7.3.895/src/testdir/test85.in 2012-04-05 16:56:38.000000000 +0200 +--- src/testdir/test85.in 2013-04-15 13:12:43.000000000 +0200 +*************** +*** 33,38 **** +--- 33,81 ---- + :let res = "FAILED" + :endif + :call setline(search("^3"), "circular test " . res) ++ ++ :let l = [] ++ :lua l = vim.eval("l") ++ :lua l:add(123) ++ :lua l:add("abc") ++ :lua l:add(vim.eval("[1, 2, 3]")) ++ :lua l:add(vim.eval("{'a':1, 'b':2, 'c':3}")) ++ :lua l:insert(123) ++ :lua l:insert("abc") ++ :lua l:insert(vim.eval("[1, 2, 3]")) ++ :lua l:insert(vim.eval("{'a':1, 'b':2, 'c':3}")) ++ :lua l[0] = l[0] ++ :lua l[1] = l[1] ++ :lua l[2] = l[2] ++ :lua l[3] = l[3] ++ :lua l[0] = 123 ++ :lua l[1] = "abc" ++ :lua l[2] = vim.eval("[1, 2, 3]") ++ :lua l[3] = vim.eval("{'a':1, 'b':2, 'c':3}") ++ :lua l[3] = nil ++ :lua l[2] = nil ++ :lua l[1] = nil ++ :lua l[0] = nil ++ :lua l = nil ++ :$put =string(l) ++ ++ :let d = {} ++ :lua d = vim.eval("d") ++ :lua d[0] = 123 ++ :lua d[1] = "abc" ++ :lua d[2] = vim.eval("[1, 2, 3]") ++ :lua d[3] = vim.eval("{'a':1, 'b':2, 'c':3}") ++ :lua d[4] = d[0] ++ :lua d[5] = d[1] ++ :lua d[6] = d[2] ++ :lua d[7] = d[3] ++ :lua d[3] = nil ++ :lua d[2] = nil ++ :lua d[1] = nil ++ :lua d[0] = nil ++ :lua d = nil ++ :$put =string(d) ++ + :?^1?,$w! test.out + :qa! + ENDTEST +*** ../vim-7.3.895/src/testdir/test85.ok 2012-04-05 16:56:38.000000000 +0200 +--- src/testdir/test85.ok 2013-04-15 13:12:47.000000000 +0200 +*************** +*** 3,5 **** +--- 3,7 ---- + 2 line 2 + dictionary with list OK + circular test OK ++ [123.0, 'abc', [1, 2, 3], {'a': 1, 'b': 2, 'c': 3}] ++ {'4': 123.0, '5': 'abc', '6': [1, 2, 3], '7': {'a': 1, 'b': 2, 'c': 3}} +*** ../vim-7.3.895/src/if_lua.c 2013-04-12 12:18:43.000000000 +0200 +--- src/if_lua.c 2013-04-15 13:35:40.000000000 +0200 +*************** +*** 709,716 **** + { + const char *s = lua_tostring(L, 2); + if (strncmp(s, "add", 3) == 0 +! || strncmp(s, "insert", 6) == 0 +! || strncmp(s, "extend", 6) == 0) + { + lua_getmetatable(L, 1); + lua_getfield(L, -1, s); +--- 709,715 ---- + { + const char *s = lua_tostring(L, 2); + if (strncmp(s, "add", 3) == 0 +! || strncmp(s, "insert", 6) == 0) + { + lua_getmetatable(L, 1); + lua_getfield(L, -1, s); +*************** +*** 745,750 **** +--- 744,750 ---- + luaV_totypval(L, 3, &v); + clear_tv(&li->li_tv); + copy_tv(&v, &li->li_tv); ++ clear_tv(&v); + } + return 0; + } +*************** +*** 754,770 **** + { + luaV_List *lis = luaV_checkudata(L, 1, LUAVIM_LIST); + list_T *l = (list_T *) luaV_checkcache(L, (void *) *lis); +! listitem_T *li; + if (l->lv_lock) + luaL_error(L, "list is locked"); +! li = listitem_alloc(); +! if (li != NULL) + { +! typval_T v; +! lua_settop(L, 2); +! luaV_totypval(L, 2, &v); +! list_append_tv(l, &v); + } + lua_settop(L, 1); + return 1; + } +--- 754,770 ---- + { + luaV_List *lis = luaV_checkudata(L, 1, LUAVIM_LIST); + list_T *l = (list_T *) luaV_checkcache(L, (void *) *lis); +! typval_T v; + if (l->lv_lock) + luaL_error(L, "list is locked"); +! lua_settop(L, 2); +! luaV_totypval(L, 2, &v); +! if (list_append_tv(l, &v) == FAIL) + { +! clear_tv(&v); +! luaL_error(L, "Failed to add item to list"); + } ++ clear_tv(&v); + lua_settop(L, 1); + return 1; + } +*************** +*** 787,793 **** + } + lua_settop(L, 2); + luaV_totypval(L, 2, &v); +! list_insert_tv(l, &v, li); + lua_settop(L, 1); + return 1; + } +--- 787,798 ---- + } + lua_settop(L, 2); + luaV_totypval(L, 2, &v); +! if (list_insert_tv(l, &v, li) == FAIL) +! { +! clear_tv(&v); +! luaL_error(L, "Failed to add item to list"); +! } +! clear_tv(&v); + lua_settop(L, 1); + return 1; + } +*************** +*** 908,913 **** +--- 913,919 ---- + typval_T v; + luaV_totypval(L, 3, &v); + copy_tv(&v, &di->di_tv); ++ clear_tv(&v); + } + return 0; + } +*************** +*** 1323,1328 **** +--- 1329,1335 ---- + typval_T *tv = eval_expr((char_u *) luaL_checkstring(L, 1), NULL); + if (tv == NULL) luaL_error(L, "invalid expression"); + luaV_pushtypval(L, tv); ++ free_tv(tv); + return 1; + } + +*** ../vim-7.3.895/src/version.c 2013-04-15 13:06:15.000000000 +0200 +--- src/version.c 2013-04-15 13:48:21.000000000 +0200 +*************** +*** 730,731 **** +--- 730,733 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 896, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +172. You join listservers just for the extra 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 /// From a37a4c9ed70c49119ba2e26fd40610c790496eb0 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 15 Apr 2013 17:02:44 +0200 Subject: [PATCH 75/82] - patchlevel 897 --- 7.3.897 | 126 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 126 insertions(+) create mode 100644 7.3.897 diff --git a/7.3.897 b/7.3.897 new file mode 100644 index 00000000..ae4813cb --- /dev/null +++ b/7.3.897 @@ -0,0 +1,126 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.897 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.897 +Problem: Configure doesn't always find the shared library. +Solution: Change the configure script. (Ken Takata) +Files: src/configure.in, src/auto/configure + + +*** ../vim-7.3.896/src/configure.in 2013-02-26 14:56:24.000000000 +0100 +--- src/configure.in 2013-04-15 14:28:02.000000000 +0200 +*************** +*** 494,510 **** + if test -f "${vi_cv_path_lua_pfx}/bin/cyglua-${vi_cv_version_lua}.dll"; then + vi_cv_dll_name_lua="cyglua-${vi_cv_version_lua}.dll" + else +! dnl Determine the SONAME for the current version, but fallback to +! dnl liblua${vi_cv_version_lua}.so if no SONAME-versioned file is found. +! for LUA_SOVER in "${vi_cv_version_lua}.so" ".so.${vi_cv_version_lua}"; do +! for i in 0 1 2 3 4 5 6 7 8 9; do +! if test -f "${vi_cv_path_lua_pfx}/lib/liblua${LUA_SOVER}.$i"; then +! LUA_SONAME=".$i" +! break +! fi + done +- vi_cv_dll_name_lua="liblua${LUA_SOVER}$LUA_SONAME" + done + fi + AC_DEFINE(DYNAMIC_LUA) + LUA_LIBS="" +--- 494,519 ---- + if test -f "${vi_cv_path_lua_pfx}/bin/cyglua-${vi_cv_version_lua}.dll"; then + vi_cv_dll_name_lua="cyglua-${vi_cv_version_lua}.dll" + else +! multiarch=`dpkg-architecture -qDEB_HOST_MULTIARCH 2> /dev/null` +! if test "X$multiarch" != "X"; then +! lib_multiarch="lib/${multiarch}" +! fi +! dnl Determine the sover for the current version, but fallback to +! dnl liblua${vi_cv_version_lua}.so if no sover-versioned file is found. +! for subdir in "${lib_multiarch}" lib64 lib; do +! if test -z "$subdir"; then +! continue +! fi +! for sover in "${vi_cv_version_lua}.so" "-${vi_cv_version_lua}.so" ".so.${vi_cv_version_lua}"; do +! for i in .0 .1 .2 .3 .4 .5 .6 .7 .8 .9 ""; do +! if test -f "${vi_cv_path_lua_pfx}/${subdir}/liblua${sover}$i"; then +! sover2="$i" +! break 3 +! fi +! done + done + done ++ vi_cv_dll_name_lua="liblua${sover}$sover2" + fi + AC_DEFINE(DYNAMIC_LUA) + LUA_LIBS="" +*** ../vim-7.3.896/src/auto/configure 2013-02-26 14:56:24.000000000 +0100 +--- src/auto/configure 2013-04-15 14:28:06.000000000 +0200 +*************** +*** 4737,4751 **** + if test -f "${vi_cv_path_lua_pfx}/bin/cyglua-${vi_cv_version_lua}.dll"; then + vi_cv_dll_name_lua="cyglua-${vi_cv_version_lua}.dll" + else +! for LUA_SOVER in "${vi_cv_version_lua}.so" ".so.${vi_cv_version_lua}"; do +! for i in 0 1 2 3 4 5 6 7 8 9; do +! if test -f "${vi_cv_path_lua_pfx}/lib/liblua${LUA_SOVER}.$i"; then +! LUA_SONAME=".$i" +! break +! fi + done +- vi_cv_dll_name_lua="liblua${LUA_SOVER}$LUA_SONAME" + done + fi + $as_echo "#define DYNAMIC_LUA 1" >>confdefs.h + +--- 4737,4760 ---- + if test -f "${vi_cv_path_lua_pfx}/bin/cyglua-${vi_cv_version_lua}.dll"; then + vi_cv_dll_name_lua="cyglua-${vi_cv_version_lua}.dll" + else +! multiarch=`dpkg-architecture -qDEB_HOST_MULTIARCH 2> /dev/null` +! if test "X$multiarch" != "X"; then +! lib_multiarch="lib/${multiarch}" +! fi +! for subdir in "${lib_multiarch}" lib64 lib; do +! if test -z "$subdir"; then +! continue +! fi +! for sover in "${vi_cv_version_lua}.so" "-${vi_cv_version_lua}.so" ".so.${vi_cv_version_lua}"; do +! for i in .0 .1 .2 .3 .4 .5 .6 .7 .8 .9 ""; do +! if test -f "${vi_cv_path_lua_pfx}/${subdir}/liblua${sover}$i"; then +! sover2="$i" +! break 3 +! fi +! done + done + done ++ vi_cv_dll_name_lua="liblua${sover}$sover2" + fi + $as_echo "#define DYNAMIC_LUA 1" >>confdefs.h + +*** ../vim-7.3.896/src/version.c 2013-04-15 13:49:17.000000000 +0200 +--- src/version.c 2013-04-15 14:43:52.000000000 +0200 +*************** +*** 730,731 **** +--- 730,733 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 897, + /**/ + +-- +If Microsoft would build a car... +... the oil, water temperature, and alternator warning lights would +all be replaced by a single "General Protection Fault" warning light. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 4c9a90575b1c6abfb21afae10653578b4fbaef75 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 15 Apr 2013 17:02:45 +0200 Subject: [PATCH 76/82] - patchlevel 898 --- 7.3.898 | 304 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 304 insertions(+) create mode 100644 7.3.898 diff --git a/7.3.898 b/7.3.898 new file mode 100644 index 00000000..d2530a55 --- /dev/null +++ b/7.3.898 @@ -0,0 +1,304 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.898 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.898 +Problem: Memory leak reported by valgrind in test 91. +Solution: Only use default argument when needed. +Files: src/eval.c, src/testdir/test91.in, src/testdir/test91.ok + + +*** ../vim-7.3.897/src/eval.c 2013-04-15 13:06:15.000000000 +0200 +--- src/eval.c 2013-04-15 15:09:17.000000000 +0200 +*************** +*** 11120,11139 **** + buf_T *save_curbuf; + char_u *varname; + dictitem_T *v; + + (void)get_tv_number(&argvars[0]); /* issue errmsg if type error */ + varname = get_tv_string_chk(&argvars[1]); + ++emsg_off; + buf = get_buf_tv(&argvars[0], FALSE); + +! if (argvars[2].v_type != VAR_UNKNOWN) +! /* set the default value */ +! copy_tv(&argvars[2], rettv); +! else +! { +! rettv->v_type = VAR_STRING; +! rettv->vval.v_string = NULL; +! } + + if (buf != NULL && varname != NULL) + { +--- 11120,11134 ---- + buf_T *save_curbuf; + char_u *varname; + dictitem_T *v; ++ int done = FALSE; + + (void)get_tv_number(&argvars[0]); /* issue errmsg if type error */ + varname = get_tv_string_chk(&argvars[1]); + ++emsg_off; + buf = get_buf_tv(&argvars[0], FALSE); + +! rettv->v_type = VAR_STRING; +! rettv->vval.v_string = NULL; + + if (buf != NULL && varname != NULL) + { +*************** +*** 11142,11152 **** + curbuf = buf; + + if (*varname == '&') /* buffer-local-option */ +! get_option_tv(&varname, rettv, TRUE); + else if (STRCMP(varname, "changedtick") == 0) + { + rettv->v_type = VAR_NUMBER; + rettv->vval.v_number = curbuf->b_changedtick; + } + else + { +--- 11137,11151 ---- + curbuf = buf; + + if (*varname == '&') /* buffer-local-option */ +! { +! if (get_option_tv(&varname, rettv, TRUE) == OK) +! done = TRUE; +! } + else if (STRCMP(varname, "changedtick") == 0) + { + rettv->v_type = VAR_NUMBER; + rettv->vval.v_number = curbuf->b_changedtick; ++ done = TRUE; + } + else + { +*************** +*** 11155,11167 **** +--- 11154,11173 ---- + v = find_var_in_ht(&curbuf->b_vars->dv_hashtab, + 'b', varname, FALSE); + if (v != NULL) ++ { + copy_tv(&v->di_tv, rettv); ++ done = TRUE; ++ } + } + + /* restore previous notion of curbuf */ + curbuf = save_curbuf; + } + ++ if (!done && argvars[2].v_type != VAR_UNKNOWN) ++ /* use the default value */ ++ copy_tv(&argvars[2], rettv); ++ + --emsg_off; + } + +*************** +*** 11767,11772 **** +--- 11773,11779 ---- + tabpage_T *tp; + dictitem_T *v; + char_u *varname; ++ int done = FALSE; + + rettv->v_type = VAR_STRING; + rettv->vval.v_string = NULL; +*************** +*** 11778,11788 **** + /* look up the variable */ + v = find_var_in_ht(&tp->tp_vars->dv_hashtab, 0, varname, FALSE); + if (v != NULL) + copy_tv(&v->di_tv, rettv); +! else if (argvars[2].v_type != VAR_UNKNOWN) +! copy_tv(&argvars[2], rettv); + } +! else if (argvars[2].v_type != VAR_UNKNOWN) + copy_tv(&argvars[2], rettv); + } + +--- 11785,11797 ---- + /* look up the variable */ + v = find_var_in_ht(&tp->tp_vars->dv_hashtab, 0, varname, FALSE); + if (v != NULL) ++ { + copy_tv(&v->di_tv, rettv); +! done = TRUE; +! } + } +! +! if (!done && argvars[2].v_type != VAR_UNKNOWN) + copy_tv(&argvars[2], rettv); + } + +*************** +*** 11894,11899 **** +--- 11903,11909 ---- + char_u *varname; + dictitem_T *v; + tabpage_T *tp; ++ int done = FALSE; + + #ifdef FEAT_WINDOWS + if (off == 1) +*************** +*** 11905,11918 **** + varname = get_tv_string_chk(&argvars[off + 1]); + ++emsg_off; + +! if (argvars[off + 2].v_type != VAR_UNKNOWN) +! /* set the default return value */ +! copy_tv(&argvars[off + 2], rettv); +! else +! { +! rettv->v_type = VAR_STRING; +! rettv->vval.v_string = NULL; +! } + + if (win != NULL && varname != NULL) + { +--- 11915,11922 ---- + varname = get_tv_string_chk(&argvars[off + 1]); + ++emsg_off; + +! rettv->v_type = VAR_STRING; +! rettv->vval.v_string = NULL; + + if (win != NULL && varname != NULL) + { +*************** +*** 11923,11936 **** + curbuf = win->w_buffer; + + if (*varname == '&') /* window-local-option */ +! get_option_tv(&varname, rettv, 1); + else + { + /* Look up the variable. */ + /* Let getwinvar({nr}, "") return the "w:" dictionary. */ + v = find_var_in_ht(&win->w_vars->dv_hashtab, 'w', varname, FALSE); + if (v != NULL) + copy_tv(&v->di_tv, rettv); + } + + /* restore previous notion of curwin */ +--- 11927,11946 ---- + curbuf = win->w_buffer; + + if (*varname == '&') /* window-local-option */ +! { +! if (get_option_tv(&varname, rettv, 1) == OK) +! done = TRUE; +! } + else + { + /* Look up the variable. */ + /* Let getwinvar({nr}, "") return the "w:" dictionary. */ + v = find_var_in_ht(&win->w_vars->dv_hashtab, 'w', varname, FALSE); + if (v != NULL) ++ { + copy_tv(&v->di_tv, rettv); ++ done = TRUE; ++ } + } + + /* restore previous notion of curwin */ +*************** +*** 11938,11943 **** +--- 11948,11957 ---- + curbuf = curwin->w_buffer; + } + ++ if (!done && argvars[off + 2].v_type != VAR_UNKNOWN) ++ /* use the default return value */ ++ copy_tv(&argvars[off + 2], rettv); ++ + --emsg_off; + } + +*** ../vim-7.3.897/src/testdir/test91.in 2013-02-20 21:11:14.000000000 +0100 +--- src/testdir/test91.in 2013-04-15 14:59:31.000000000 +0200 +*************** +*** 4,12 **** + STARTTEST + :so small.vim + :" +! :" test for getbufvar() +! :let b:var_num = 1234 +! :let def_num = 5678 + :$put =string(getbufvar(1, 'var_num')) + :$put =string(getbufvar(1, 'var_num', def_num)) + :$put =string(getbufvar(1, '')) +--- 4,13 ---- + STARTTEST + :so small.vim + :" +! :" Test for getbufvar() +! :" Use strings to test for memory leaks. +! :let b:var_num = '1234' +! :let def_num = '5678' + :$put =string(getbufvar(1, 'var_num')) + :$put =string(getbufvar(1, 'var_num', def_num)) + :$put =string(getbufvar(1, '')) +*** ../vim-7.3.897/src/testdir/test91.ok 2013-02-20 21:11:14.000000000 +0100 +--- src/testdir/test91.ok 2013-04-15 15:02:45.000000000 +0200 +*************** +*** 1,13 **** + start: +! 1234 +! 1234 +! {'var_num': 1234} +! {'var_num': 1234} +! 5678 + {} + {} + '' +! 5678 + 0 + 0 + 'Dance' +--- 1,13 ---- + start: +! '1234' +! '1234' +! {'var_num': '1234'} +! {'var_num': '1234'} +! '5678' + {} + {} + '' +! '5678' + 0 + 0 + 'Dance' +*** ../vim-7.3.897/src/version.c 2013-04-15 14:44:53.000000000 +0200 +--- src/version.c 2013-04-15 15:14:22.000000000 +0200 +*************** +*** 730,731 **** +--- 730,733 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 898, + /**/ + +-- +If Apple would build a car... +... it would be powered by the sun, be reliable, five times +as fast and twice as easy to drive; but would only run on +five percent of the roads. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 368259d1647cfe6551dc4a533cc8e89774c86176 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 15 Apr 2013 17:02:45 +0200 Subject: [PATCH 77/82] - patchlevel 899 --- 7.3.899 | 67 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 7.3.899 diff --git a/7.3.899 b/7.3.899 new file mode 100644 index 00000000..46fceb79 --- /dev/null +++ b/7.3.899 @@ -0,0 +1,67 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.899 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.899 +Problem: #if indents are off. +Solution: Fix the indents. +Files: src/os_unix.c + + +*** ../vim-7.3.898/src/os_unix.c 2013-03-21 22:53:45.000000000 +0100 +--- src/os_unix.c 2013-04-15 15:28:01.000000000 +0200 +*************** +*** 3493,3505 **** + * 4 = Windows Cross Hair + * 5 = Windows UP Arrow + */ +! #ifdef JSBTERM_MOUSE_NONADVANCED /* Disables full feedback of pointer movements */ + out_str_nf((char_u *)IF_EB("\033[0~ZwLMRK1Q\033\\", + ESC_STR "[0~ZwLMRK1Q" ESC_STR "\\")); +! #else + out_str_nf((char_u *)IF_EB("\033[0~ZwLMRK+1Q\033\\", + ESC_STR "[0~ZwLMRK+1Q" ESC_STR "\\")); +! #endif + ison = TRUE; + } + else +--- 3493,3506 ---- + * 4 = Windows Cross Hair + * 5 = Windows UP Arrow + */ +! # ifdef JSBTERM_MOUSE_NONADVANCED +! /* Disables full feedback of pointer movements */ + out_str_nf((char_u *)IF_EB("\033[0~ZwLMRK1Q\033\\", + ESC_STR "[0~ZwLMRK1Q" ESC_STR "\\")); +! # else + out_str_nf((char_u *)IF_EB("\033[0~ZwLMRK+1Q\033\\", + ESC_STR "[0~ZwLMRK+1Q" ESC_STR "\\")); +! # endif + ison = TRUE; + } + else +*** ../vim-7.3.898/src/version.c 2013-04-15 15:15:31.000000000 +0200 +--- src/version.c 2013-04-15 15:31:43.000000000 +0200 +*************** +*** 730,731 **** +--- 730,733 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 899, + /**/ + +-- +If Microsoft would build a car... +... Occasionally, executing a maneuver such as a left turn +would cause your car to shut down and refuse to restart, in +which case you would have to reinstall the engine. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 3a74ebae0207dd4c5065feb688978855d88fc462 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 15 Apr 2013 17:02:46 +0200 Subject: [PATCH 78/82] - patchlevel 900 --- 7.3.900 | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 7.3.900 diff --git a/7.3.900 b/7.3.900 new file mode 100644 index 00000000..e19e0f23 --- /dev/null +++ b/7.3.900 @@ -0,0 +1,55 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.900 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.900 +Problem: Not obvious that some mouse features are mutual-exclusive. +Solution: Add a comment. +Files: src/feature.h + + +*** ../vim-7.3.899/src/feature.h 2013-02-26 14:56:24.000000000 +0100 +--- src/feature.h 2013-04-15 15:29:17.000000000 +0200 +*************** +*** 1088,1093 **** +--- 1088,1100 ---- + # endif + #endif + ++ /* ++ * Note: Only one of the following may be defined: ++ * FEAT_MOUSE_GPM ++ * FEAT_SYSMOUSE ++ * FEAT_MOUSE_JSB ++ * FEAT_MOUSE_PTERM ++ */ + #if defined(FEAT_NORMAL) && defined(HAVE_GPM) + # define FEAT_MOUSE_GPM + #endif +*** ../vim-7.3.899/src/version.c 2013-04-15 15:32:20.000000000 +0200 +--- src/version.c 2013-04-15 15:39:10.000000000 +0200 +*************** +*** 730,731 **** +--- 730,733 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 900, + /**/ + +-- +If Microsoft would build a car... +... Occasionally your car would die on the freeway for no +reason. You would have to pull over to the side of the road, +close all of the car windows, shut it off, restart it, and +reopen the windows before you could continue. For some reason +you would simply accept this. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 48b30d5d00c90ea5d0eb61d1248a92b786a7101c Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 15 Apr 2013 17:02:46 +0200 Subject: [PATCH 79/82] - patchlevel 901 --- 7.3.901 | 95 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 7.3.901 diff --git a/7.3.901 b/7.3.901 new file mode 100644 index 00000000..b3ddf886 --- /dev/null +++ b/7.3.901 @@ -0,0 +1,95 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.901 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.901 +Problem: Outdated comment, ugly condition. +Solution: Update a few comments, break line. +Files: src/getchar.c, src/misc1.c, src/undo.c + + +*** ../vim-7.3.900/src/getchar.c 2013-03-16 21:42:12.000000000 +0100 +--- src/getchar.c 2013-04-12 15:01:39.000000000 +0200 +*************** +*** 444,450 **** + typebuf.tb_off = MAXMAPLEN; + typebuf.tb_len = 0; + } +! else /* remove mapped characters only */ + { + typebuf.tb_off += typebuf.tb_maplen; + typebuf.tb_len -= typebuf.tb_maplen; +--- 444,450 ---- + typebuf.tb_off = MAXMAPLEN; + typebuf.tb_len = 0; + } +! else /* remove mapped characters at the start only */ + { + typebuf.tb_off += typebuf.tb_maplen; + typebuf.tb_len -= typebuf.tb_maplen; +*** ../vim-7.3.900/src/misc1.c 2013-03-19 18:31:45.000000000 +0100 +--- src/misc1.c 2013-03-19 20:43:48.000000000 +0100 +*************** +*** 5054,5060 **** + int cx = NUL; + int cy = NUL; + +- /* TODO: multi-byte characters. */ + while (len > 0) + { + cx = PTR2CHAR(px); +--- 5054,5059 ---- +*** ../vim-7.3.900/src/undo.c 2012-08-23 12:58:56.000000000 +0200 +--- src/undo.c 2012-12-12 16:00:19.000000000 +0100 +*************** +*** 216,221 **** +--- 216,222 ---- + + /* + * Save the current line for both the "u" and "U" command. ++ * Careful: may trigger autocommands that reload the buffer. + * Returns OK or FAIL. + */ + int +*************** +*** 238,245 **** + if (undo_off) + return OK; + +! if (top > curbuf->b_ml.ml_line_count || +! top >= bot || bot > curbuf->b_ml.ml_line_count + 1) + return FALSE; /* rely on caller to do error messages */ + + if (top + 2 == bot) +--- 239,247 ---- + if (undo_off) + return OK; + +! if (top > curbuf->b_ml.ml_line_count +! || top >= bot +! || bot > curbuf->b_ml.ml_line_count + 1) + return FALSE; /* rely on caller to do error messages */ + + if (top + 2 == bot) +*** ../vim-7.3.900/src/version.c 2013-04-15 15:40:08.000000000 +0200 +--- src/version.c 2013-04-15 15:46:37.000000000 +0200 +*************** +*** 730,731 **** +--- 730,733 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 901, + /**/ + +-- +The CIA drives around in cars with the "Intel inside" logo. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 8247408c843674fe3acd5dc871284dad3aca1cee Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 15 Apr 2013 17:02:47 +0200 Subject: [PATCH 80/82] - patchlevel 902 --- 7.3.902 | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 7.3.902 diff --git a/7.3.902 b/7.3.902 new file mode 100644 index 00000000..4fd627ba --- /dev/null +++ b/7.3.902 @@ -0,0 +1,45 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.902 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.902 +Problem: When deleting last buffer in other tab the tabline is not updated. +Solution: Set the redraw_tabline flag. (Yukihiro Nakadaira) +Files: src/window.c + + +*** ../vim-7.3.901/src/window.c 2013-04-15 12:27:30.000000000 +0200 +--- src/window.c 2013-04-15 15:52:46.000000000 +0200 +*************** +*** 2070,2075 **** +--- 2070,2076 ---- + + --RedrawingDisabled; + ++ redraw_tabline = TRUE; + if (h != tabline_height()) + shell_new_rows(); + } +*** ../vim-7.3.901/src/version.c 2013-04-15 15:47:07.000000000 +0200 +--- src/version.c 2013-04-15 15:54:42.000000000 +0200 +*************** +*** 730,731 **** +--- 730,733 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 902, + /**/ + +-- +If Microsoft would build a car... +... The airbag system would ask "are you SURE?" before deploying. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 82f2388acc625ee1f66e6c41ad4989d967fece69 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 15 Apr 2013 17:02:48 +0200 Subject: [PATCH 81/82] - patchlevel 903 --- 7.3.903 | 60 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 7.3.903 diff --git a/7.3.903 b/7.3.903 new file mode 100644 index 00000000..42858619 --- /dev/null +++ b/7.3.903 @@ -0,0 +1,60 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.903 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.903 (after 7.3.892) +Problem: Crash on exit writing viminfo. (Ron Aaron) +Solution: Check for the history to be empty. +Files: src/ex_getln.c + + +*** ../vim-7.3.902/src/ex_getln.c 2013-04-14 23:19:32.000000000 +0200 +--- src/ex_getln.c 2013-04-15 16:13:56.000000000 +0200 +*************** +*** 6216,6222 **** + */ + for (round = 1; round <= 2; ++round) + { +! i = round == 1 ? hisidx[type] : 0; + if (i >= 0) + while (num_saved > 0 + && !(round == 2 && i >= viminfo_hisidx[type])) +--- 6216,6230 ---- + */ + for (round = 1; round <= 2; ++round) + { +! if (round == 1) +! /* start at newest entry, somewhere in the list */ +! i = hisidx[type]; +! else if (viminfo_hisidx[type] > 0) +! /* start at newest entry, first in the list */ +! i = 0; +! else +! /* empty list */ +! i = -1; + if (i >= 0) + while (num_saved > 0 + && !(round == 2 && i >= viminfo_hisidx[type])) +*** ../vim-7.3.902/src/version.c 2013-04-15 15:55:15.000000000 +0200 +--- src/version.c 2013-04-15 16:11:08.000000000 +0200 +*************** +*** 730,731 **** +--- 730,733 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 903, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +176. You lie, even to user-friends, about how long you were online yesterday. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// From 410624c31ae7b73a69b8f2c63c75676fb0b92265 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 15 Apr 2013 17:02:49 +0200 Subject: [PATCH 82/82] - patchlevel 903 --- README.patches | 81 ++++++++++++++++++++++++ vim.spec | 167 ++++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 247 insertions(+), 1 deletion(-) diff --git a/README.patches b/README.patches index d50252b1..a82d9d62 100644 --- a/README.patches +++ b/README.patches @@ -854,3 +854,84 @@ Individual patches for Vim 7.3: 3295 7.3.820 errors when building with small features and Lua, Perl or Ruby 2199 7.3.821 build with OLE and Cygwin is broken 4013 7.3.822 (after 7.3.799) crash when accessing freed buffer + 2051 7.3.823 (after 7.3.821) building with Cygwin: '-lsupc++' is not needed + 1566 7.3.824 can redefine builtin functions + 4540 7.3.825 with Python errors are not always clear + 3807 7.3.826 list of features in :version output is hard to read + 3112 7.3.827 (after 7.3.825) Python tests fail + 4780 7.3.828 mappings are not aware of wildmenu mode + 2664 7.3.829 'showmatch' shows wrong match and may scroll the screen + 2841 7.3.830 :mksession confuses bytes and characters when placing cursor + 20653 7.3.831 clumsy to handle the situation that a variable does not exist + 1830 7.3.832 compiler warning + 2985 7.3.833 In the terminal scroll wheel always scrolls the active window + 2556 7.3.834 Ruby 2.0 has a few API changes + 1755 7.3.835 "xxd -i" fails on an empty file + 59985 7.3.836 clipboard does not work on Win32 when compiled with Cygwin + 2221 7.3.837 empty lines in :version output when 'columns' is 320 + 11082 7.3.838 (after 7.3.830) insufficient testing for mksession + 2012 7.3.839 some files missing in the list of distributed files + 1652 7.3.840 "\@ 1 line + 1630 7.3.854 after BS in insert mode completion current entry is wrong + 1831 7.3.855 compiler warnings + 8587 7.3.856 system() garbles multi-byte clipboard contents + 2763 7.3.857 QuitPre autocommand event does not trigger for :qa and :wq + 4120 7.3.858 "gv" selects the wrong area after some operators + 9955 7.3.859 'ambiwidth' must be set by the user + 2602 7.3.860 in --remote-expr try/catch does not work + 4494 7.3.861 ":setlocal number" clears global value of 'relativenumber' + 5831 7.3.862 dragging the status line can be slow + 3025 7.3.863 (after 7.3.859) 'ambiwidth' detection for ANSI terminal + 1516 7.3.864 (after 7.3.862) can't build without the mouse feature + 2015 7.3.865 (after 7.3.862) mouse position can be wrong + 4745 7.3.866 not serving the X selection during system() isn't nice + 9641 7.3.867 matchparen does not update match when using auto-indenting + 2567 7.3.868 empty line at hit-return prompt with few lines of text + 11112 7.3.869 bufwinnr() matches buffers in other tabs + 6562 7.3.870 compiler warnings when using MingW 4.5.3 + 2741 7.3.871 search('^$', 'c') does not use empty match under the cursor + 14914 7.3.872 on some systems file name case is always ignored + 5967 7.3.873 cannot easily use :s to make title case + 3480 7.3.874 comparing file names does not handle multi-byte chars properly + 1865 7.3.875 (after 7.3.866) build problem with a combination of features + 2182 7.3.876 #if indents are off + 3069 7.3.877 (after 7.3.871) forward searching with search() is broken + 3124 7.3.878 'fileignorecase' is missing in options window and quickref + 2792 7.3.879 aborting an ex command does not abort a pending operator + 7907 7.3.880 new viminfo history lines may be replacd with old lines + 2849 7.3.881 Python list does not work correctly + 1714 7.3.882 CursorHold may trigger after receiving the termresponse + 2350 7.3.883 (after 7.3.880) can't build with some combination of features + 2150 7.3.884 compiler warning for variable shadowing another + 2408 7.3.885 double free for list and dict in Lua + 2567 7.3.886 can't build with multi-byte on Solaris 10 + 9601 7.3.887 no tests for Visual mode operators, what 7.3.879 fixes + 3933 7.3.888 filename completion with 'fic' does not work for multi-byte + 2040 7.3.889 can't build with Ruby 2.0 on a 64 bit system + 1563 7.3.890 test 79 fails on Windows + 3761 7.3.891 merging viminfo history doesn't work well + 7984 7.3.892 (after 7.3.891) still merging problems for viminfo history + 19606 7.3.893 crash when using b:, w: or t: after closing the buffer etc. + 2219 7.3.894 using wrong RUBY_VER causing Ruby build to break + 5927 7.3.895 valgrind error in test 91 + 5208 7.3.896 memory leaks in Lua interface + 4487 7.3.897 configure doesn't always find the shared library + 7367 7.3.898 memory leak reported by valgrind in test 91 + 2116 7.3.899 #if indents are off + 1639 7.3.900 not obvious that some mouse features are mutual-exclusive + 2748 7.3.901 outdated comment, ugly condition + 1345 7.3.902 tabline not updated when deleting last buffer in other tab + 1827 7.3.903 (after 7.3.892) crash on exit writing viminfo diff --git a/vim.spec b/vim.spec index a29ca949..dcc04fbb 100644 --- a/vim.spec +++ b/vim.spec @@ -18,7 +18,7 @@ #used for pre-releases: %define beta %{nil} %define vimdir vim73%{?beta} -%define patchlevel 822 +%define patchlevel 903 Summary: The VIM editor URL: http://www.vim.org/ @@ -879,6 +879,87 @@ Patch819: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.819 Patch820: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.820 Patch821: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.821 Patch822: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.822 +Patch823: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.823 +Patch824: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.824 +Patch825: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.825 +Patch826: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.826 +Patch827: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.827 +Patch828: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.828 +Patch829: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.829 +Patch830: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.830 +Patch831: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.831 +Patch832: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.832 +Patch833: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.833 +Patch834: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.834 +Patch835: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.835 +Patch836: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.836 +Patch837: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.837 +Patch838: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.838 +Patch839: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.839 +Patch840: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.840 +Patch841: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.841 +Patch842: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.842 +Patch843: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.843 +Patch844: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.844 +Patch845: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.845 +Patch846: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.846 +Patch847: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.847 +Patch848: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.848 +Patch849: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.849 +Patch850: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.850 +Patch851: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.851 +Patch852: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.852 +Patch853: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.853 +Patch854: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.854 +Patch855: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.855 +Patch856: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.856 +Patch857: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.857 +Patch858: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.858 +Patch859: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.859 +Patch860: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.860 +Patch861: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.861 +Patch862: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.862 +Patch863: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.863 +Patch864: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.864 +Patch865: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.865 +Patch866: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.866 +Patch867: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.867 +Patch868: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.868 +Patch869: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.869 +Patch870: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.870 +Patch871: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.871 +Patch872: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.872 +Patch873: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.873 +Patch874: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.874 +Patch875: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.875 +Patch876: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.876 +Patch877: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.877 +Patch878: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.878 +Patch879: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.879 +Patch880: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.880 +Patch881: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.881 +Patch882: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.882 +Patch883: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.883 +Patch884: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.884 +Patch885: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.885 +Patch886: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.886 +Patch887: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.887 +Patch888: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.888 +Patch889: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.889 +Patch890: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.890 +Patch891: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.891 +Patch892: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.892 +Patch893: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.893 +Patch894: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.894 +Patch895: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.895 +Patch896: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.896 +Patch897: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.897 +Patch898: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.898 +Patch899: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.899 +Patch900: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.900 +Patch901: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.901 +Patch902: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.902 +Patch903: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.903 Patch3000: vim-7.3-syntax.patch Patch3002: vim-7.1-nowarnings.patch @@ -1847,6 +1928,87 @@ perl -pi -e "s,bin/nawk,bin/awk,g" runtime/tools/mve.awk %patch820 -p0 %patch821 -p0 %patch822 -p0 +%patch823 -p0 +%patch824 -p0 +%patch825 -p0 +%patch826 -p0 +%patch827 -p0 +%patch828 -p0 +%patch829 -p0 +%patch830 -p0 +%patch831 -p0 +%patch832 -p0 +%patch833 -p0 +%patch834 -p0 +%patch835 -p0 +%patch836 -p0 +%patch837 -p0 +%patch838 -p0 +%patch839 -p0 +%patch840 -p0 +%patch841 -p0 +%patch842 -p0 +%patch843 -p0 +%patch844 -p0 +%patch845 -p0 +%patch846 -p0 +%patch847 -p0 +%patch848 -p0 +%patch849 -p0 +%patch850 -p0 +%patch851 -p0 +%patch852 -p0 +%patch853 -p0 +%patch854 -p0 +%patch855 -p0 +%patch856 -p0 +%patch857 -p0 +%patch858 -p0 +%patch859 -p0 +%patch860 -p0 +%patch861 -p0 +%patch862 -p0 +%patch863 -p0 +%patch864 -p0 +%patch865 -p0 +%patch866 -p0 +%patch867 -p0 +%patch868 -p0 +%patch869 -p0 +%patch870 -p0 +%patch871 -p0 +%patch872 -p0 +%patch873 -p0 +%patch874 -p0 +%patch875 -p0 +%patch876 -p0 +%patch877 -p0 +%patch878 -p0 +%patch879 -p0 +%patch880 -p0 +%patch881 -p0 +%patch882 -p0 +%patch883 -p0 +%patch884 -p0 +%patch885 -p0 +%patch886 -p0 +%patch887 -p0 +%patch888 -p0 +%patch889 -p0 +%patch890 -p0 +%patch891 -p0 +%patch892 -p0 +%patch893 -p0 +%patch894 -p0 +%patch895 -p0 +%patch896 -p0 +%patch897 -p0 +%patch898 -p0 +%patch899 -p0 +%patch900 -p0 +%patch901 -p0 +%patch902 -p0 +%patch903 -p0 # install spell files @@ -2322,6 +2484,9 @@ rm -rf $RPM_BUILD_ROOT %{_datadir}/icons/hicolor/*/apps/* %changelog +* Mon Apr 15 2013 Karsten Hopp 7.3.903-1 +- patchlevel 903 + * Mon Feb 18 2013 Karsten Hopp 7.3.822-1 - patchlevel 822