Re: Command line completion doesn't use . and ,, in path: Bug?
On Mon, Apr 15, 2013 at 1:56 PM, Nazri Ramliy ayieh...@gmail.com wrote: Is there anything different in my settings here that might not show the problem that you're seeing? I forgot to add my vim version (it's older than yours): VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Oct 27 2010 17:59:02) MS-Windows 32-bit GUI version with OLE support Included patches: 1-46 nazri -- -- You received this message from the vim_dev maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups vim_dev group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
python/python3 quit with raise SystemExit
When :py raise SystemExit, vim exit immediately. I know this is a spec of python. But most of users don't want this behavior. Below is a patch. https://gist.github.com/mattn/5385037 diff -r 73bdb401d109 src/if_python.c --- a/src/if_python.c Fri Apr 12 12:27:30 2013 +0200 +++ b/src/if_python.c Mon Apr 15 10:22:23 2013 +0900 @@ -151,6 +151,7 @@ # define PyErr_PrintEx dll_PyErr_PrintEx # define PyErr_NoMemory dll_PyErr_NoMemory # define PyErr_Occurred dll_PyErr_Occurred +# define PyErr_ExceptionMatches dll_PyErr_ExceptionMatches # define PyErr_SetNone dll_PyErr_SetNone # define PyErr_SetString dll_PyErr_SetString # define PyEval_InitThreads dll_PyEval_InitThreads @@ -255,6 +256,7 @@ static void(*dll_PyErr_PrintEx)(int); static PyObject*(*dll_PyErr_NoMemory)(void); static PyObject*(*dll_PyErr_Occurred)(void); +static PyObject*(*dll_PyErr_ExceptionMatches)(PyObject *); static void(*dll_PyErr_SetNone)(PyObject *); static void(*dll_PyErr_SetString)(PyObject *, const char *); static void(*dll_PyEval_InitThreads)(void); @@ -351,12 +353,14 @@ static PyObject *imp_PyExc_KeyboardInterrupt; static PyObject *imp_PyExc_TypeError; static PyObject *imp_PyExc_ValueError; +static PyObject *imp_PyExc_SystemExit; # define PyExc_AttributeError imp_PyExc_AttributeError # define PyExc_IndexError imp_PyExc_IndexError # define PyExc_KeyboardInterrupt imp_PyExc_KeyboardInterrupt # define PyExc_TypeError imp_PyExc_TypeError # define PyExc_ValueError imp_PyExc_ValueError +# define PyExc_SystemExit imp_PyExc_SystemExit /* * Table of name to function pointer of python. @@ -385,6 +389,7 @@ {PyErr_PrintEx, (PYTHON_PROC*)dll_PyErr_PrintEx}, {PyErr_NoMemory, (PYTHON_PROC*)dll_PyErr_NoMemory}, {PyErr_Occurred, (PYTHON_PROC*)dll_PyErr_Occurred}, +{PyErr_ExceptionMatches, (PYTHON_PROC*)dll_PyErr_ExceptionMatches}, {PyErr_SetNone, (PYTHON_PROC*)dll_PyErr_SetNone}, {PyErr_SetString, (PYTHON_PROC*)dll_PyErr_SetString}, {PyEval_InitThreads, (PYTHON_PROC*)dll_PyEval_InitThreads}, @@ -582,11 +587,13 @@ imp_PyExc_KeyboardInterrupt = PyDict_GetItemString(exdict, KeyboardInterrupt); imp_PyExc_TypeError = PyDict_GetItemString(exdict, TypeError); imp_PyExc_ValueError = PyDict_GetItemString(exdict, ValueError); +imp_PyExc_SystemExit = PyDict_GetItemString(exdict, SystemExit); Py_XINCREF(imp_PyExc_AttributeError); Py_XINCREF(imp_PyExc_IndexError); Py_XINCREF(imp_PyExc_KeyboardInterrupt); Py_XINCREF(imp_PyExc_TypeError); Py_XINCREF(imp_PyExc_ValueError); +Py_XINCREF(imp_PyExc_SystemExit); Py_XDECREF(exmod); } #endif /* DYNAMIC_PYTHON */ @@ -805,6 +812,7 @@ #if defined(HAVE_LOCALE_H) || defined(X_LOCALE) char *saved_locale; #endif +PyObject *r; #ifndef PY_CAN_RECURSE if (recursive) @@ -851,27 +859,29 @@ Python_RestoreThread();/* enter python */ -if (rettv == NULL) - PyRun_SimpleString((char *)(cmd)); +r = PyRun_String((char *)(cmd), Py_single_input, globals, globals); +if (r == NULL) +{ + if (PyErr_Occurred()) + { + if (PyErr_ExceptionMatches(PyExc_SystemExit)) + { + EMSG(_(E863: Can't handle SystemExit of python exception in vim)); + PyErr_Clear(); + } + if (!msg_silent) + PyErr_PrintEx(0); + } + if (rettv != NULL) + EMSG(_(E858: Eval did not return a valid python object)); +} else { - PyObject*r; - - 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) - EMSG(_(E859: Failed to convert returned python object to vim value)); - Py_DECREF(r); - } - PyErr_Clear(); + if (rettv != NULL ConvertFromPyObject(r, rettv) == -1) + EMSG(_(E859: Failed to convert returned python object to vim value)); + Py_DECREF(r); } +PyErr_Clear(); Python_SaveThread(); /* leave python */ diff -r 73bdb401d109 src/if_python3.c --- a/src/if_python3.c Fri Apr 12 12:27:30 2013 +0200 +++ b/src/if_python3.c Mon Apr 15 10:22:23 2013 +0900 @@ -125,6 +125,7 @@ # define PyErr_PrintEx py3_PyErr_PrintEx # define PyErr_NoMemory py3_PyErr_NoMemory # define PyErr_Occurred py3_PyErr_Occurred +# define PyErr_ExceptionMatches py3_PyErr_ExceptionMatches # define PyErr_SetNone py3_PyErr_SetNone # define PyErr_SetString py3_PyErr_SetString # define PyEval_InitThreads py3_PyEval_InitThreads @@ -255,6 +256,7 @@ static PyObject* (*py3_PyImport_AddModule)(const char *); static int (*py3_PyErr_BadArgument)(void); static PyObject* (*py3_PyErr_Occurred)(void); +static PyObject*
Patch 7.3.893
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.0 +0100 --- src/buffer.c2013-04-15 12:07:07.0 +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.0 +0100 --- src/eval.c 2013-04-15 12:26:33.0 +0200 *** *** 2131,2137 { char_unumbuf[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_unumbuf[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 =
Patch 7.3.894
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.0 +0200 --- src/bigvim.bat 2013-04-15 12:32:08.0 +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.c2013-04-15 12:27:30.0 +0200 --- src/version.c 2013-04-15 12:34:36.0 +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 -- b...@moolenaar.net -- http://www.Moolenaar.net \\\ ///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org/// \\\help me help AIDS victims -- http://ICCF-Holland.org/// -- -- You received this message from the vim_dev maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups vim_dev group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: Command line completion doesn't use . and ,, in path: Bug?
On 4/14/2013 10:56 PM, Nazri Ramliy wrote: Hi Suresh! On Mon, Apr 15, 2013 at 10:22 AM, Suresh Govindachar sgovindac...@yahoo.com wrote: Hitting tab after entering a partial argument to :find will offer suggestions for completing the command line by searching inside non-trivial components of the 'path' -- but it does not search in . and in ,, components of the path. Here's what I see: On vim's command line, the following finds the possible completions :find ./foo/blah/blee[hit the tab key] but the following (without the leading ./) will not: :find foo/blah/blee[hit the tab key] I'm trying to reproduce the problem but couldn't: My setup: As indicated below, your setup is different from mine: d:\foodir /s (i leave out the . and .. entries to slim down the lines below) Directory of D:\foo 15/04/2013 01:41 PM 9 foo.txt 15/04/2013 01:41 PM10 food.txt 15/04/2013 01:32 PMDIR opt Directory of D:\foo\opt 15/04/2013 01:44 PMDIR vim Directory of D:\foo\opt\vim 15/04/2013 01:32 PM11 700_vimrc 15/04/2013 01:33 PM10 fish.txt 15/04/2013 01:33 PM12 finger.txt d:\foogvim -u NONE -U NONE Start gvim from d: :set cp wildchar=Tab wildmode=list:longest,full :set path=.,,d:/foo/opt/vim,d:/foo/opt/vim/** My c:\opt is not below the pwd. Anyway, for the test, leave path at the default value of .,,. :pwd D:\foo When starting from d:, :pwd will show d:\ Now doing In gvim, open file d:\foo\opt\vim\fish.txt Then try the following :find foo[hit tab] and :find *foo*[hit tab] Thanks, --Suresh -- -- You received this message from the vim_dev maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups vim_dev group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: python/python3 quit with raise SystemExit
Yasuhiro Matsumoto wrote: When :py raise SystemExit, vim exit immediately. I know this is a spec of python. But most of users don't want this behavior. Below is a patch. Thanks. A few remarks. Please define the messages that appear more than once in one place. That avoids problems with translations and duplication isn't good anyway. These usually are in globals.h, but perhaps if_py_both.h could be used for these. It would be good to explain to the user that SystemExit is the wrong way to exit Vim and mention the right way. Most users don't read the source code :-). -- hundred-and-one symptoms of being an internet addict: 170. You introduce your wife as my_l...@home.wife and refer to your children as forked processes. /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net \\\ ///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org/// \\\help me help AIDS victims -- http://ICCF-Holland.org/// -- -- You received this message from the vim_dev maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups vim_dev group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Patch 7.3.895
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.0 +0200 --- src/eval.c 2013-04-15 13:00:44.0 +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. */ !
Re: Issue 128 in vim: valgrind error Invalid read of size 1 in find_var_in_ht (eval.c:20062) in test91
Updates: Status: Fixed Comment #1 on issue 128 by brammool...@gmail.com: valgrind error Invalid read of size 1 in find_var_in_ht (eval.c:20062) in test91 http://code.google.com/p/vim/issues/detail?id=128 Patch 7.3.895 should fix this. -- You received this message because this project is configured to send all issue notifications to this address. You may adjust your notification preferences at: https://code.google.com/hosting/settings -- -- You received this message from the vim_dev maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups vim_dev group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Patch 7.3.896
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.in2012-04-05 16:56:38.0 +0200 --- src/testdir/test85.in 2013-04-15 13:12:43.0 +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.ok2012-04-05 16:56:38.0 +0200 --- src/testdir/test85.ok 2013-04-15 13:12:47.0 +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.0 +0200 --- src/if_lua.c2013-04-15 13:35:40.0 +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.c2013-04-15 13:06:15.0 +0200 --- src/version.c 2013-04-15 13:48:21.0 +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 -- b...@moolenaar.net -- http://www.Moolenaar.net \\\ ///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an
Re: [patch] Store vimrc and gvimrc in your ~/.vim, ~\vimfiles\ directory
Lech Lorens wrote: On 13-Apr-2013 Bram Moolenaar b...@moolenaar.net wrote: Thanks. Thus only when ~/.vimrc does not exist then ~/.vim/vimrc will be used. That should work for places where a new Vim is installed. For older Vim versions one would have to create a ~/.vimrc file that sources ~/.vim/vimrc. Do we want to change the priority? I meant not to confuse people if by any chance they have both ~/.vimrc and ~/.vim/vimrc. In my opinion, when a user sees a ~/.vimrc he expects it to be used and would be very surprised when it is skipped. That is both for existing Vim users and any generic Unix user. Far fewer people would know about the possibility for a ~/.vim/vimrc to exist. -- hundred-and-one symptoms of being an internet addict: 171. You invent another person and chat with yourself in empty chat rooms. /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net \\\ ///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org/// \\\help me help AIDS victims -- http://ICCF-Holland.org/// -- -- You received this message from the vim_dev maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups vim_dev group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Patch 7.3.897
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.0 +0100 --- src/configure.in2013-04-15 14:28:02.0 +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.0 +0100 --- src/auto/configure 2013-04-15 14:28:06.0 +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.c2013-04-15 13:49:17.0 +0200 --- src/version.c 2013-04-15 14:43:52.0 +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 -- b...@moolenaar.net -- http://www.Moolenaar.net \\\ ///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org/// \\\help me help AIDS victims -- http://ICCF-Holland.org/// -- -- You received this message from the vim_dev maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups vim_dev group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. For more
Patch 7.3.898
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.0 +0200 --- src/eval.c 2013-04-15 15:09:17.0 +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 */
Patch 7.3.899
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.c2013-03-21 22:53:45.0 +0100 --- src/os_unix.c 2013-04-15 15:28:01.0 +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.c2013-04-15 15:15:31.0 +0200 --- src/version.c 2013-04-15 15:31:43.0 +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 -- b...@moolenaar.net -- http://www.Moolenaar.net \\\ ///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org/// \\\help me help AIDS victims -- http://ICCF-Holland.org/// -- -- You received this message from the vim_dev maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups vim_dev group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Patch 7.3.900
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.h2013-02-26 14:56:24.0 +0100 --- src/feature.h 2013-04-15 15:29:17.0 +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.c2013-04-15 15:32:20.0 +0200 --- src/version.c 2013-04-15 15:39:10.0 +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 -- b...@moolenaar.net -- http://www.Moolenaar.net \\\ ///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org/// \\\help me help AIDS victims -- http://ICCF-Holland.org/// -- -- You received this message from the vim_dev maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups vim_dev group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: Patch 7.3.903
Same place. The viminfo_history has zeroes: (gdb) l 6228if (i = 0) 6229while (num_saved 0 6230 !(round == 2 i = viminfo_hisidx[type])) 6231{ 6232p = round == 1 ? history[type][i].hisstr 6233 : viminfo_history[type][i]; 6234if (p != NULL (round == 2 || !history[type][i].viminfo)) 6235{ 6236--num_saved; 6237fputc(hist_type2char(type, TRUE), fp); (gdb) p history $1 = {0x848c000, 0x848d400, 0x848ca00, 0x848f200, 0x848e800} (gdb) p viminfo_history $2 = {0x0, 0x0, 0x0, 0x0, 0x0} -- -- You received this message from the vim_dev maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups vim_dev group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: Rgrep not working on vim 64-bit, win7
On Monday, April 15, 2013 8:41:54 AM UTC-5, Darek wrote: I have did some debugging and looks like the error appears on the system() call in grep.vim:407. If I copy-n-paste system()'s argument to cmd.exe - it works as expected. Looks like there is a bug with the system() function on 64-bit Windows with 64-bit vim. Did anyone encountered such behavior? As noted in your vim_use thread, I doubt very much that it's a bug in system(). More likely it's a problem with your system path or use of 32-bit calls in a 64-bit application. We can't debug the command unless you tell us what it is. -- -- You received this message from the vim_dev maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups vim_dev group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: Patch 7.3.903
Ron Aaron wrote: Same place. The viminfo_history has zeroes: (gdb) l 6228 if (i = 0) 6229 while (num_saved 0 6230 !(round == 2 i = viminfo_hisidx[type])) 6231 { 6232 p = round == 1 ? history[type][i].hisstr 6233 : viminfo_history[type][i]; 6234 if (p != NULL (round == 2 || !history[type][i].viminfo)) 6235 { 6236 --num_saved; 6237 fputc(hist_type2char(type, TRUE), fp); (gdb) p history $1 = {0x848c000, 0x848d400, 0x848ca00, 0x848f200, 0x848e800} (gdb) p viminfo_history $2 = {0x0, 0x0, 0x0, 0x0, 0x0} I don't understand how it can get there. When the pointer is NULL then viminfo_hisidx[type] must be zero and the if (i = 0) must be false. Perhaps a stack trace will help. Or setting a breakpoint at write_viminfo_history() and stepping through it. And check that finish_viminfo_history() isn't called. You did include the change in ex_cmds.c, right? -- hundred-and-one symptoms of being an internet addict: 178. You look for an icon to double-click to open your bedroom window. /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net \\\ ///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org/// \\\help me help AIDS victims -- http://ICCF-Holland.org/// -- -- You received this message from the vim_dev maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups vim_dev group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: Rgrep not working on vim 64-bit, win7
Hi, On Mon, Apr 15, 2013 at 6:41 AM, Darek dgadom...@gmail.com wrote: Hi, This question has already been posted to vim_use list, but since I suspect this to be a bug in vim (or in Windows ;) ), this is probably a more appropriate place for it. I experience a strange problem with 64-bit vim/gvim on 64-bit Windows 7. When I use Rgrep on 32-bit vim build everything works perfectly fine: :Rgrep TODO *.cpp Quickfix opens with list of all my todos. The problem is when I use a 64-bit build of vim (I need it to have YouCompleteMe running): Error detected while processing function SNR61_RunGrepRecursive..SNR61_RunGrepCmd: line1: E484: Can't open file C:\Users\MyUser\AppData\Local\Temp\VIo2E04.tmp The temporary file is not there, the location is accessible (since it works for 32-bit version). I have also tried to change temp location to: let $TMP='C:/tmp' but the result was always the same - the error. I have tried Haroogan's builds (https://bitbucket.org/Haroogan/64-bit-vim-builds-for-windows-64-bit/wiki/Home) and also compiled my own from hg a couple of hours ago with VS2012. Both have Rgrep unusable. I have did some debugging and looks like the error appears on the system() call in grep.vim:407. If I copy-n-paste system()'s argument to cmd.exe - it works as expected. Looks like there is a bug with the system() function on 64-bit Windows with 64-bit vim. Did anyone encountered such behavior? This problem is caused by the shell command line quote escape character in MS-Windows. I have a fix for this issue. I will update the grep plugin and release a new version. - Yegappan -- -- You received this message from the vim_dev maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups vim_dev group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Patch 7.3.904
Patch 7.3.904 (after 7.3.893) Problem:Using memory freed by the garbage collector. Solution: Mark items in aucmd_win as used. Files: src/eval.c *** ../vim-7.3.903/src/eval.c 2013-04-15 15:15:31.0 +0200 --- src/eval.c 2013-04-15 18:20:35.0 +0200 *** *** 6792,6797 --- 6792,6801 /* window-local variables */ FOR_ALL_TAB_WINDOWS(tp, wp) set_ref_in_item(wp-w_winvar.di_tv, copyID); + #ifdef FEAT_AUTOCMD + if (aucmd_win != NULL) + set_ref_in_item(aucmd_win-w_winvar.di_tv, copyID); + #endif #ifdef FEAT_WINDOWS /* tabpage-local variables */ *** ../vim-7.3.903/src/version.c2013-04-15 16:14:15.0 +0200 --- src/version.c 2013-04-15 18:21:49.0 +0200 *** *** 730,731 --- 730,733 { /* Add new patch number below this line */ + /**/ + 904, /**/ -- Rule #1: Don't give somebody a tool that he's going to hurt himself with. /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net \\\ ///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org/// \\\help me help AIDS victims -- http://ICCF-Holland.org/// -- -- You received this message from the vim_dev maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups vim_dev group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: Patch 7.3.903
Perhaps a stack trace will help. Or setting a breakpoint at write_viminfo_history() and stepping through it. And check that finish_viminfo_history() isn't called. You did include the change in ex_cmds.c, right? I verified manually that the patch contents of 7.3.903 were applied; but there's not changes to ex_cmds.c that I can find. The 'write_viminfo_history()' happens twice and in the second iteration this happens: 6230 !(round == 2 i = viminfo_hisidx[type])) (gdb) 6232p = round == 1 ? history[type][i].hisstr (gdb) 6233 : viminfo_history[type][i]; (gdb) 6234if (p != NULL (round == 2 || !history[type][i].viminfo)) (gdb) 6251if (--i 0) (gdb) 6253if (i == hisidx[type]) (gdb) c Continuing. Program received signal SIGSEGV, Segmentation fault. 0x080bdcfe in write_viminfo_history (fp=fp@entry=0x83ec2c0) at ex_getln.c:6233 6233 : viminfo_history[type][i]; (gdb) l 6228if (i = 0) 6229while (num_saved 0 6230 !(round == 2 i = viminfo_hisidx[type])) 6231{ 6232p = round == 1 ? history[type][i].hisstr 6233 : viminfo_history[type][i]; 6234if (p != NULL (round == 2 || !history[type][i].viminfo)) 6235{ 6236--num_saved; 6237fputc(hist_type2char(type, TRUE), fp); (gdb) p num_saved $11 = 199 (gdb) p i $12 = 0 (gdb) p viminfo_history $13 = {0x0, 0x0, 0x0, 0x0, 0x0} (gdb) p viminfo_hisidx $14 = {199, 200, 4, 55, 0} -- -- You received this message from the vim_dev maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups vim_dev group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: Patch 7.3.903
Ron Aaron wrote: Perhaps a stack trace will help. Or setting a breakpoint at write_viminfo_history() and stepping through it. And check that finish_viminfo_history() isn't called. You did include the change in ex_cmds.c, right? I verified manually that the patch contents of 7.3.903 were applied; but there's not changes to ex_cmds.c that I can find. It was in an earlier patch, 7.3.892. The 'write_viminfo_history()' happens twice and in the second iteration this happens: Hmm, it's only be prepared to called once after prepare_viminfo_history(). Can you find out where the two calls are coming from? 6230 !(round == 2 i = viminfo_hisidx[type])) (gdb) 6232 p = round == 1 ? history[type][i].hisstr (gdb) 6233 : viminfo_history[type][i]; (gdb) 6234 if (p != NULL (round == 2 || !history[type][i].viminfo)) (gdb) 6251 if (--i 0) (gdb) 6253 if (i == hisidx[type]) (gdb) c Continuing. Program received signal SIGSEGV, Segmentation fault. 0x080bdcfe in write_viminfo_history (fp=fp@entry=0x83ec2c0) at ex_getln.c:6233 6233 : viminfo_history[type][i]; (gdb) l 6228 if (i = 0) 6229 while (num_saved 0 6230 !(round == 2 i = viminfo_hisidx[type])) 6231 { 6232 p = round == 1 ? history[type][i].hisstr 6233 : viminfo_history[type][i]; 6234 if (p != NULL (round == 2 || !history[type][i].viminfo)) 6235 { 6236 --num_saved; 6237 fputc(hist_type2char(type, TRUE), fp); (gdb) p num_saved $11 = 199 (gdb) p i $12 = 0 (gdb) p viminfo_history $13 = {0x0, 0x0, 0x0, 0x0, 0x0} (gdb) p viminfo_hisidx $14 = {199, 200, 4, 55, 0} I can clear viminfo_hisidx to avoid this. I would still like to find out why this is needed. -- hundred-and-one symptoms of being an internet addict: 179. You wonder why your household garbage can doesn't have an empty recycle bin button. /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net \\\ ///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org/// \\\help me help AIDS victims -- http://ICCF-Holland.org/// -- -- You received this message from the vim_dev maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups vim_dev group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: Patch 7.3.905
Thank you, this patch works fine. -- -- You received this message from the vim_dev maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups vim_dev group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.