Skip to search.

Breaking News Visit Yahoo! News for the latest.

×Close this window

vimdev · Vim (Vi IMproved) text editor developers list

The Yahoo! Groups Product Blog

Check it out!

Group Information

? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Message search is now enhanced, find messages faster. Take it for a spin.

Messages

Advanced
Messages Help
Messages 67224 - 67253 of 70084   Oldest  |  < Older  |  Newer >  |  Newest
Messages: Show Message Summaries Sort by Date ^  
#67224 From: Dominique Pellé <dominique.pelle@...>
Date: Thu Nov 22, 2012 10:03 pm
Subject: Re: Patch 7.3.715
dominique.pelle@...
Send Email Send Email
 
Ike Devolder wrote:

>> i attach a minimum configuration + testfile where i have consistent
>> segfaults on.
>>
>> within the archive you can find index.php, it has a syntax error, the
>> following steps lead to segfault:
>>
>> vim index.php
>> - :w (with the syntax error, syntastic kicks in)
>> - goto end of phpinfo() and add ; :w (error is gone)
>> - undo u
>> - :w -> segfault
>>
>> uname -a:
>> Linux 3.6.7 #1 SMP PREEMPT Sun Nov 18 09:53:58 CET 2012 x86_64 GNU/Linux
>> distribution Arch Linux
>>
>> configure:
>> ./configure --prefix=/usr --localstatedir=/var/lib/vim \
>>       --mandir=/usr/share/man --with-compiledby=BlackEagle \
>>       --with-features=huge --enable-gpm --enable-acl --with-x=no \
>>       --disable-gui --enable-multibyte --enable-cscope \
>>       --disable-netbeans --enable-perlinterp=dynamic \
>>       --enable-pythoninterp=dynamic --enable-python3interp=dynamic \
>>       --enable-rubyinterp=dynamic --enable-luainterp=dynamic
>>
>> now tested with version 7.3.725, first noticed with 7.3.718 and then
>> detected that the problem went away when going back to 7.3.714
>>
>> to be able to build ruby dynamic on my machine i also needed the patch
>> of Ken Takata in the 7.3.721 thread:
>> https://groups.google.com/forum/?fromgroups=#!topic/vim_dev/-pxkvVyWZdo
>>
>> thx for looking into this
>
> ok i forgot on pre-requisite: you must have php installed so the syntastic
> plugin can run php -l to get the syntax error showing.
>
> --Ike


Hi Ike

I can reproduce the crash using your description with
Vim-7.3.725 on Linux x86_64.

Valgrind gives the following error:

==6815== Invalid read of size 4
==6815==    at 0x58ED64: ex_make (quickfix.c:2869)
==6815==    by 0x4888F1: do_cmdline (ex_docmd.c:2677)
==6815==    by 0x4468BF: call_func (eval.c:22540)
==6815==    by 0x449722: get_func_tv (eval.c:8322)
==6815==    by 0x46A24E: eval7 (eval.c:5158)
==6815==    by 0x468F27: eval6 (eval.c:4810)
==6815==    by 0x468A77: eval5 (eval.c:4626)
==6815==    by 0x4682D0: eval4 (eval.c:4319)
==6815==    by 0x468166: eval3 (eval.c:4231)
==6815==    by 0x444AD4: eval1 (eval.c:4160)
==6815==    by 0x4445D8: eval0 (eval.c:4042)
==6815==    by 0x44769D: ex_let (eval.c:1897)
==6815==    by 0x4888F1: do_cmdline (ex_docmd.c:2677)
==6815==    by 0x4468BF: call_func (eval.c:22540)
==6815==    by 0x449722: get_func_tv (eval.c:8322)
==6815==    by 0x46A24E: eval7 (eval.c:5158)
==6815==    by 0x468F27: eval6 (eval.c:4810)
==6815==    by 0x468A77: eval5 (eval.c:4626)
==6815==    by 0x4682D0: eval4 (eval.c:4319)
==6815==    by 0x468166: eval3 (eval.c:4231)
==6815==    by 0x444AD4: eval1 (eval.c:4160)
==6815==    by 0x4445D8: eval0 (eval.c:4042)
==6815==    by 0x44769D: ex_let (eval.c:1897)
==6815==    by 0x4888F1: do_cmdline (ex_docmd.c:2677)
==6815==    by 0x4468BF: call_func (eval.c:22540)
==6815==    by 0x449722: get_func_tv (eval.c:8322)
==6815==    by 0x448AFD: ex_call (eval.c:3465)
==6815==    by 0x4888F1: do_cmdline (ex_docmd.c:2677)
==6815==    by 0x4468BF: call_func (eval.c:22540)
==6815==    by 0x449722: get_func_tv (eval.c:8322)
==6815==    by 0x448AFD: ex_call (eval.c:3465)
==6815==    by 0x4888F1: do_cmdline (ex_docmd.c:2677)
==6815==    by 0x4BFFE4: apply_autocmds_group (fileio.c:9435)
==6815==    by 0x4BAF27: buf_write (fileio.c:9049)
==6815==    by 0x47355D: do_write (ex_cmds.c:2692)
==6815==    by 0x4888F1: do_cmdline (ex_docmd.c:2677)
==6815==    by 0x54D9DA: nv_colon (normal.c:5417)
==6815==    by 0x543C95: normal_cmd (normal.c:1198)
==6815==    by 0x685ADE: main_loop (main.c:1294)
==6815==    by 0x6854EA: main (main.c:998)
==6815==  Address 0x8 is not stack'd, malloc'd or (recently) free'd


quickfix.c:

2861     if (wp != NULL)
2862         qi = GET_LOC_LIST(wp);
2863 #ifdef FEAT_AUTOCMD
2864     if (au_name != NULL)
2865     {
2866         apply_autocmds(EVENT_QUICKFIXCMDPOST, au_name,
2867                                                curbuf->b_fname,
TRUE, curbuf);
2868         if (qi->qf_curlist < qi->qf_listcount)
2869             res = qi->qf_lists[qi->qf_curlist].qf_count;
2870         else
2871             res = 0;
2872     }

Printing a few pointers just before line quickfix.c:2868, I get this:

*** wp=0xb4bf10 qi=0xdd76d0 wp->w_llist=0xdd76d0 wp->w_llist_ref=(nil)
*** wp=0xb4bf10 qi=0xdd76d0 wp->w_llist=0xdd76d0 wp->w_llist_ref=(nil)
*** wp=0xb4bf10 qi=0xdd76d0 wp->w_llist=0xdd76d0 wp->w_llist_ref=(nil)
*** wp=0xb4bf10 qi=0xdd76d0 wp->w_llist=0xdd76d0 wp->w_llist_ref=(nil)
*** wp=0xb4bf10 qi=(nil) wp->w_llist=(nil) wp->w_llist_ref=(nil)
Vim: Caught deadly signal SEGV
Vim: Finished.
Segmentation fault (core dumped)

I don't know yet why some pointers are NULL but perhaps someone
can make sense of it.

I don't need to do 'undo' to reproduce the crash. This also crashes:

- vim index.php
- :w (with the syntax error, syntastic kicks in)
- goto end of phpinfo() and add ; :w (error is gone)
- remove previously added ;  (by pressing x on ; character in command mode)
- :w to save again -> crash

Regards
-- Dominique

--
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

#67225 From: Christian Brabandt <cblists@...>
Date: Thu Nov 22, 2012 10:28 pm
Subject: Re: Vim expr parsing bug
cblists@...
Send Email Send Email
 
Hi Bram!

On Do, 22 Nov 2012, Bram Moolenaar wrote:

>
> Andy Wokula wrote:
>
> > " Vim Parsing Bug
> >
> > func! Add2(x1, x2)
> >      return a:x1 + a:x2
> > endfunc
> >
> > :echo function('Add2')(2,3)
> > " 5 (ok)
> >
> > " Bug:
> > :echo 1 ? function('Add2')(1,2) : function('Add2')(2,3)
> > :echo 0 ? function('Add2')(1,2) : function('Add2')(2,3)
> >
> > " Error detected while processing D1223.vim:
> > " line   17:
> > " E110: Missing ')'
> > " E15: Invalid expression: (2,3)
> > " line   18:
> > " E109: Missing ':' after '?'
> > " E15: Invalid expression: 0 ? function('Add2')(1,2) : function('Add2')(2,3)
> >
> >
> > Adding parentheses  1 ? (...) : (...)  doesn't help.
>
> Strange.  I'll add it to the todo list.

Problem is, in expr1 ? expr2 : expr3
Vim explicitly resets evaluate in the false case which leads to being
rettv.v_type being VAR_UNKNOWN and then handle_subscript doesn't handle
the subscript anymore.

Here is a patch:

diff --git a/src/eval.c b/src/eval.c
--- a/src/eval.c
+++ b/src/eval.c
@@ -19574,7 +19574,7 @@
      while (ret == OK
             && (**arg == '['
                 || (**arg == '.' && rettv->v_type == VAR_DICT)
-               || (**arg == '(' && rettv->v_type == VAR_FUNC))
+               || (**arg == '(' && (rettv->v_type == VAR_FUNC || rettv->v_type
== VAR_UNKNOWN)))
             && !vim_iswhite(*(*arg - 1)))
      {
         if (**arg == '(')


regards,
Christian
--
Niemand ist so gut oder so schlecht, wie er während seiner Scheidung
gemacht wird.
                 -- J.J. Disenberg

--
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

#67226 From: Christian Brabandt <cblists@...>
Date: Thu Nov 22, 2012 10:29 pm
Subject: Re: Patch 7.3.715
cblists@...
Send Email Send Email
 
Hi Dominique!

On Do, 22 Nov 2012, Dominique Pellé wrote:

> quickfix.c:
>
> 2861     if (wp != NULL)
> 2862         qi = GET_LOC_LIST(wp);
> 2863 #ifdef FEAT_AUTOCMD
> 2864     if (au_name != NULL)
> 2865     {
> 2866         apply_autocmds(EVENT_QUICKFIXCMDPOST, au_name,
> 2867                                                curbuf->b_fname,
> TRUE, curbuf);
> 2868         if (qi->qf_curlist < qi->qf_listcount)
> 2869             res = qi->qf_lists[qi->qf_curlist].qf_count;
> 2870         else
> 2871             res = 0;
> 2872     }
>
[…]
> Vim: Caught deadly signal SEGV
> Vim: Finished.
> Segmentation fault (core dumped)
>
> I don't know yet why some pointers are NULL but perhaps someone
> can make sense of it.

I see. Try this patch:
diff --git a/src/quickfix.c b/src/quickfix.c
--- a/src/quickfix.c
+++ b/src/quickfix.c
@@ -2863,7 +2863,7 @@
      {
         apply_autocmds(EVENT_QUICKFIXCMDPOST, au_name,
                                                curbuf->b_fname, TRUE, curbuf);
-       if (qi->qf_curlist < qi->qf_listcount)
+       if (qi != NULL && qi->qf_curlist < qi->qf_listcount)
             res = qi->qf_lists[qi->qf_curlist].qf_count;
         else
             res = 0;


regards,
Christian
--
Je mehr Leute es sind, die eine Sache glauben, desto größer ist die
Wahrscheinlichkeit, daß die Ansicht falsch ist. Menschen, die Recht
haben, stehen meistens allein.
		 -- Søren Kierkegaard

--
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

#67227 From: glts <676c7473@...>
Date: Thu Nov 22, 2012 10:33 pm
Subject: Re: E763: Word characters differ between spell files
676c7473@...
Send Email Send Email
 
On Thursday, November 22, 2012 10:18:42 PM UTC+1, Bram Moolenaar wrote:
> Try replacing the en_gb spell file that you installed long ago with
> one downloaded from the server now.  The files on the site have been
> updated some time ago to fix a mistake.

I was using the "vim-gnome" package on Linux Ubuntu 12.04; I didn't
think of updating the runtime files first.
Anyway, that did it, problem solved, thank you, Bram!

--
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

#67228 From: Dominique Pellé <dominique.pelle@...>
Date: Thu Nov 22, 2012 10:45 pm
Subject: Re: Patch 7.3.715
dominique.pelle@...
Send Email Send Email
 
Christian Brabandt <cblists@...> wrote:

> Hi Dominique!
>
> On Do, 22 Nov 2012, Dominique Pellé wrote:
>
>> quickfix.c:
>>
>> 2861     if (wp != NULL)
>> 2862         qi = GET_LOC_LIST(wp);
>> 2863 #ifdef FEAT_AUTOCMD
>> 2864     if (au_name != NULL)
>> 2865     {
>> 2866         apply_autocmds(EVENT_QUICKFIXCMDPOST, au_name,
>> 2867                                                curbuf->b_fname,
>> TRUE, curbuf);
>> 2868         if (qi->qf_curlist < qi->qf_listcount)
>> 2869             res = qi->qf_lists[qi->qf_curlist].qf_count;
>> 2870         else
>> 2871             res = 0;
>> 2872     }
>>
> […]
>> Vim: Caught deadly signal SEGV
>> Vim: Finished.
>> Segmentation fault (core dumped)
>>
>> I don't know yet why some pointers are NULL but perhaps someone
>> can make sense of it.
>
> I see. Try this patch:
> diff --git a/src/quickfix.c b/src/quickfix.c
> --- a/src/quickfix.c
> +++ b/src/quickfix.c
> @@ -2863,7 +2863,7 @@
>      {
>         apply_autocmds(EVENT_QUICKFIXCMDPOST, au_name,
>                                                curbuf->b_fname, TRUE, curbuf);
> -       if (qi->qf_curlist < qi->qf_listcount)
> +       if (qi != NULL && qi->qf_curlist < qi->qf_listcount)
>             res = qi->qf_lists[qi->qf_curlist].qf_count;
>         else
>             res = 0;
>
>
> regards,
> Christian

Hi Christian

I can't tell whether that's the right fix, but I confirm that
your proposed change avoids the crash at least.

wp->w_llist was set to NULL at line quickfix.c:914 which
was introduced by chane 3918 according to hg annotate:

  911 vimboss  644:     if (qi->qf_listcount == LISTCOUNT)
  912 vimboss    7:     {
  913    bram 3918:   if (wp != NULL && wp->w_llist == qi)
  914    bram 3918:       wp->w_llist = NULL;
  915 vimboss  644:   qf_free(qi, 0);

===
changeset:   3918:4f0ddf4137ee
tag:         v7-3-715
user:        Bram Moolenaar <bram@...>
date:        Wed Nov 14 22:38:08 2012 +0100
files:       src/quickfix.c src/testdir/test49.ok
src/testdir/test49.vim src/version.c
description:
updated for version 7.3.715
Problem:    Crash when calling setloclist() in BufUnload autocmd. (Marcin
	     Szamotulski)
Solution:   Set w_llist to NULL when it was freed.  Also add a test.
	     (Christian Brabandt)
===

I find it odd that a function called qf_new_list() clears
wp->w_llist (set it to NULL) and does not set it back
to something else. The name of the function "qf_new_list()"
suggests that it should create another list, so perhaps
it should set wp->w_llist to something else. But I don't
understand the code here.

Regards
-- Dominique

--
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

#67229 From: Andy Wokula <anwoku@...>
Date: Fri Nov 23, 2012 12:03 am
Subject: Re: Vim expr parsing bug
anwoku@...
Send Email Send Email
 
Am 22.11.2012 23:28, schrieb Christian Brabandt:
> Problem is, in expr1 ? expr2 : expr3
> Vim explicitly resets evaluate in the false case which leads to being
> rettv.v_type being VAR_UNKNOWN and then handle_subscript doesn't handle
> the subscript anymore.
>
> Here is a patch:
>
> diff --git a/src/eval.c b/src/eval.c
> --- a/src/eval.c
> +++ b/src/eval.c
> @@ -19574,7 +19574,7 @@
>       while (ret == OK
>              && (**arg == '['
>                  || (**arg == '.' && rettv->v_type == VAR_DICT)
> -               || (**arg == '(' && rettv->v_type == VAR_FUNC))
> +               || (**arg == '(' && (rettv->v_type == VAR_FUNC ||
rettv->v_type == VAR_UNKNOWN)))
>              && !vim_iswhite(*(*arg - 1)))
>       {
>          if (**arg == '(')

Now gVim crashes.

--
Andy

--
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

#67230 From: Ken Takata <kentkt@...>
Date: Fri Nov 23, 2012 1:49 am
Subject: Re: Can't compile latest Vim using Make_cyg.mak
kentkt@...
Send Email Send Email
 
Hi,

I think that Make_cyg.mak needs some additional include dirs for ruby 1.9.
After applying the attached patch, I can compile with the following command:

$  make -f Make_cyg.mak CC=gcc-3 CXX=g++-3 RUBY='/path/to/ruby1.9.3' RUBY_VER=19
RUBY_VER_LONG=1.9.1

Using i686-pc-mingw32-gcc instead of gcc-3 also works,
but i686-w64-mingw32-gcc doesn't seem to work for ruby interface.

Best regards,
Ken Takata

--
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

#67231 From: "Christian J. Robinson" <heptite@...>
Date: Fri Nov 23, 2012 2:50 am
Subject: Re: Can't compile latest Vim using Make_cyg.mak
heptite@...
Send Email Send Email
 
On Thu, 22 Nov 2012, Ken Takata wrote:

> I think that Make_cyg.mak needs some additional include dirs for
> ruby 1.9.
> After applying the attached patch, I can compile with the following command:
>
> $  make -f Make_cyg.mak CC=gcc-3 CXX=g++-3 RUBY='/path/to/ruby1.9.3'
RUBY_VER=19 RUBY_VER_LONG=1.9.1
>
> Using i686-pc-mingw32-gcc instead of gcc-3 also works,
> but i686-w64-mingw32-gcc doesn't seem to work for ruby interface.

And yet I still get the undefined reference to _pow error, regardless
of which version of gcc I use.

- Christian

--
"We are what we pretend to be, so we must be careful what we pretend to be."
                                -- Kurt Vonnegut
Christian J. Robinson <heptite@...>      http://christianrobinson.name/

--
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

#67232 From: Cade Foster <ahx2323@...>
Date: Fri Nov 23, 2012 5:25 am
Subject: [fix] small fixes for src/GvimExt/Makefile
ahx2323@...
Send Email Send Email
 

Hi.
This patch fix "fatal error U1052: file 'Win32.mak' not found" error
Thanks for great editor!


--
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

#67233 From: Sergey Khorev <sergey.khorev@...>
Date: Fri Nov 23, 2012 5:28 am
Subject: Re: Update for MzScheme interface
sergey.khorev@...
Send Email Send Email
 
>> > Yes, autoconf has run.  As I said, I don't see MZSCHEME_GENERATE_BASE
>> > defined in the configure script anywhere.
>>
>> I tested this on a fresh install of Ubuntu 12.10.
>> Speaking of the error message, it specifically refers to MinGW because
>> I wasn't able to write anything more or less automatic for MinGW. On
>> Unix systems this is handled like below.
>>
>> auto/configure:
>> ---
>>     if test -d $vi_cv_path_mzscheme_pfx/lib/plt/collects; then
>>       SCHEME_COLLECTS=lib/plt/
>>     else
>>       if test -d $vi_cv_path_mzscheme_pfx/lib/racket/collects; then
>>       SCHEME_COLLECTS=lib/racket/
>>       else
>>       if test -d $vi_cv_path_mzscheme_pfx/share/racket/collects; then
>>         SCHEME_COLLECTS=share/racket/
>>       fi
>>       fi
>>     fi
>>     if test -f
"${vi_cv_path_mzscheme_pfx}/${SCHEME_COLLECTS}collects/scheme/base.ss"
>> ; then
>>       MZSCHEME_EXTRA="mzscheme_base.c"
>>     else
>>       if test -f
>> "${vi_cv_path_mzscheme_pfx}/${SCHEME_COLLECTS}collects/scheme/base.rkt"
>> ; then
>>       MZSCHEME_EXTRA="mzscheme_base.c"
>>       fi
>>     fi
>>     if test "X$MZSCHEME_EXTRA" != "X" ; then
>>       dnl need to generate bytecode for MzScheme base
>>       MZSCHEME_CFLAGS="${MZSCHEME_CFLAGS} -DINCLUDE_MZSCHEME_BASE"
>>       MZSCHEME_MZC="${vi_cv_path_mzscheme_pfx}/bin/mzc"
>>     fi
>> ---
>>
>> and then this code in Makefile is triggered with
>> -DINCLUDE_MZSCHEME_BASE making it include mzscheme_base.c
>> ---
>> objects/if_mzsch.o: if_mzsch.c $(MZSCHEME_EXTRA)
>>       $(CCC) -o $@ $(MZSCHEME_CFLAGS_EXTRA) if_mzsch.c
>>
>> mzscheme_base.c:
>>       $(MZSCHEME_MZC) --c-mods mzscheme_base.c ++lib scheme/base
>> ---
>
> Configure never defines INCLUDE_MZSCHEME_BASE, right?  Thus in this
> code:
>
> /* need to put it here for dynamic stuff to work */
> #if defined(INCLUDE_MZSCHEME_BASE)
> # include "mzscheme_base.c"
> #elif MZSCHEME_VERSION_MAJOR >= 400
> # error MzScheme 4.x must include mzscheme_base.c, for MinGW32 you need to
define MZSCHEME_GENERATE_BASE=yes
> #endif
>
>
> When MZSCHEME_VERSION_MAJOR is 400 or larger, it will fail.
>
> What MzScheme pacakge do you have installed?  I could not find anything
> for "mzscheme" so I installed plt-scheme with racket, version 5.2.1

I installed just racket package. If your installation was upgraded
from an earlier version, can you check if you still have
/usr/lib/racket/collects directory? At some point in time, Debian
changed collects directory from /usr/lib/racket/collects to
/usr/share/racket/collects

The logic of configure is as follows: supposing mzscheme executable
was found in {pfx} it tries to check if {pfx}/lib/collects exists. If
so, it assumes it is the main directory for collections. Otherwise it
tries {pfx}/share/collects.
Then it checks if scheme/base.ss or scheme/base.rkt exist. If found,
it assumes we need to generate mzscheme_base.c and defines
MZSCHEME_EXTRA and adds -DINCLUDE_MZSCHEME_BASE to MZSCHEME_CFLAGS

Apparently it found /usr/lib/racket/collects on your system but the
directory is empty.

--
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

#67234 From: Nate Soares <nate@...>
Date: Fri Nov 23, 2012 6:33 am
Subject: Re: Functions with [range] do not preserve the cursor line
nate@...
Send Email Send Email
 
+ docs


On Thu, Nov 22, 2012 at 9:46 AM, Andy Wokula <anwoku@...> wrote:
Am 22.11.2012 07:27, schrieb Christian Brabandt:

On Thu, November 22, 2012 04:42, Nate Soares wrote:
Here's a patch that adds the "stay" argument to the :function command.
Thoughts?

That is nice.

,----[ :h todo.txt ]-
| ":function f(x) keepjumps" creates a function where every command is
| executed like it has ":keepjumps" before it.
`----

I wonder, if one should combine the keepjumps and stay functions into one
special argument or make 2 of it.

No.

E.g. you want to make a change at the cursor position and
take [range] lines into account to compute the change.
And you don't want :keepjumps for it.

Even without use case:
"Sooner or later, everyone wants everything as an option."
The new `stay' argument is an example for it!
So, `no' again ^^.

--
Andy


--
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 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

#67235 From: Ken Takata <kentkt@...>
Date: Fri Nov 23, 2012 6:46 am
Subject: Re: Errors compiling with Python 3.3 on Windows
kentkt@...
Send Email Send Email
 
Hi David,

2012/11/23 Fri 0:42:51 UTC+9 David Fishburn:
> Python requested (version 33) - root dir is "C:\Python33"
> Python DLL will be loaded dynamically
> Perl requested (version 510) - root dir is "C:\Perl"
> Perl DLL will be loaded dynamically

It seems that you set PYTHON=C:\Python33 instead of PYTHON3=C:\Python33.
If you use Python 3.x, you should set PYTHON3, PYTHON3_VER and
DYNAMIC3_PYTHON.

Thanks,
Ken Takata

--
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

#67236 From: Christian Brabandt <cblists@...>
Date: Fri Nov 23, 2012 7:42 am
Subject: Re: Vim expr parsing bug
cblists@...
Send Email Send Email
 
Hi Andy!

On Fr, 23 Nov 2012, Andy Wokula wrote:

> Am 22.11.2012 23:28, schrieb Christian Brabandt:
> >Problem is, in expr1 ? expr2 : expr3
> >Vim explicitly resets evaluate in the false case which leads to being
> >rettv.v_type being VAR_UNKNOWN and then handle_subscript doesn't handle
> >the subscript anymore.
> >
> >Here is a patch:
> >
> >diff --git a/src/eval.c b/src/eval.c
> >--- a/src/eval.c
> >+++ b/src/eval.c
> >@@ -19574,7 +19574,7 @@
> >      while (ret == OK
> >             && (**arg == '['
> >                 || (**arg == '.' && rettv->v_type == VAR_DICT)
> >-               || (**arg == '(' && rettv->v_type == VAR_FUNC))
> >+               || (**arg == '(' && (rettv->v_type == VAR_FUNC ||
rettv->v_type == VAR_UNKNOWN)))
> >             && !vim_iswhite(*(*arg - 1)))
> >      {
> >         if (**arg == '(')
>
> Now gVim crashes.

Hm, interesting. For me it passes all tests. Can you get me a stack
trace?

regards,
Christian
--

--
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

#67237 From: Christian Brabandt <cblists@...>
Date: Fri Nov 23, 2012 7:44 am
Subject: Re: Functions with [range] do not preserve the cursor line
cblists@...
Send Email Send Email
 
Hi Andy!

On Do, 22 Nov 2012, Andy Wokula wrote:

> E.g. you want to make a change at the cursor position and
> take [range] lines into account to compute the change.
> And you don't want :keepjumps for it.
>
> Even without use case:
> "Sooner or later, everyone wants everything as an option."
> The new `stay' argument is an example for it!
> So, `no' again ^^.

Fine with me, I was just thinking loud.

regards,
Christian
--
Es ist erstaunlich, wie vorurteilsfrei wir zu denken vermögen, wenn es
gilt, eine Dummheit vor uns selbst zu rechtfertigen.
		 -- Karl Heinrich Waggerl

--
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

#67238 From: Christian Brabandt <cblists@...>
Date: Fri Nov 23, 2012 8:19 am
Subject: Re: Patch 7.3.715
cblists@...
Send Email Send Email
 
Hi Dominique!

On Do, 22 Nov 2012, Dominique Pellé wrote:

> I can't tell whether that's the right fix, but I confirm that
> your proposed change avoids the crash at least.
>
> wp->w_llist was set to NULL at line quickfix.c:914 which
> was introduced by chane 3918 according to hg annotate:
>
>  911 vimboss  644:     if (qi->qf_listcount == LISTCOUNT)
>  912 vimboss    7:     {
>  913    bram 3918:   if (wp != NULL && wp->w_llist == qi)
>  914    bram 3918:       wp->w_llist = NULL;
>  915 vimboss  644:   qf_free(qi, 0);
>
> ===
> changeset:   3918:4f0ddf4137ee
> tag:         v7-3-715
> user:        Bram Moolenaar <bram@...>
> date:        Wed Nov 14 22:38:08 2012 +0100
> files:       src/quickfix.c src/testdir/test49.ok
> src/testdir/test49.vim src/version.c
> description:
> updated for version 7.3.715
> Problem:    Crash when calling setloclist() in BufUnload autocmd. (Marcin
> 	    Szamotulski)
> Solution:   Set w_llist to NULL when it was freed.  Also add a test.
> 	    (Christian Brabandt)
> ===
>
> I find it odd that a function called qf_new_list() clears
> wp->w_llist (set it to NULL) and does not set it back
> to something else. The name of the function "qf_new_list()"
> suggests that it should create another list, so perhaps
> it should set wp->w_llist to something else. But I don't
> understand the code here.

Indeed. I think GET_LOC_LIST should be defined as
ll_get_or_alloc_list(wp)

regards,
Christian

--
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

#67239 From: Marcin Szamotulski <mszamot@...>
Date: Fri Nov 23, 2012 10:16 am
Subject: "- register
mszamot@...
Send Email Send Email
 
Dear vim_dev,

I have found a strange behaviour of "- register, with the following
setting:

set clipboard=unnamed,autoselect,exclude:cons\|linux

(unnamed added at the beginning)

Let say that I have a file with:

foo, bar

Let us try to interchange foo with bar.  Use 'de' to delete the 'foo', which
is placed in the "- register, then I go to "bar" and type '^ve"-p', i.e.
I try to paste from the visual mode the contents of the "- register and
nothing happens.  Vim overwrites the "- register before the p command is
executed.  If I do '^v<esc>' (go back and forth to the visual mode) the
"- register is not overwritten.  This suggest that the command
p overwrites "- register before pasting.  When there is no 'unnamed' in
the cb setting this works fine.  When 'unnamed' is changed to
'unnamedplus' it also works fine.  I would rather think that "- should
not be overwritten at all.

Best regards,
     Marcin

--
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

#67240 From: Bram Moolenaar <Bram@...>
Date: Fri Nov 23, 2012 1:24 pm
Subject: Re: Update for MzScheme interface
Bram@...
Send Email Send Email
 
Sergey Khorev wrote:

> >> > Yes, autoconf has run.  As I said, I don't see MZSCHEME_GENERATE_BASE
> >> > defined in the configure script anywhere.
> >>
> >> I tested this on a fresh install of Ubuntu 12.10.
> >> Speaking of the error message, it specifically refers to MinGW because
> >> I wasn't able to write anything more or less automatic for MinGW. On
> >> Unix systems this is handled like below.
> >>
> >> auto/configure:
> >> ---
> >>     if test -d $vi_cv_path_mzscheme_pfx/lib/plt/collects; then
> >>       SCHEME_COLLECTS=lib/plt/
> >>     else
> >>       if test -d $vi_cv_path_mzscheme_pfx/lib/racket/collects; then
> >>       SCHEME_COLLECTS=lib/racket/
> >>       else
> >>       if test -d $vi_cv_path_mzscheme_pfx/share/racket/collects; then
> >>         SCHEME_COLLECTS=share/racket/
> >>       fi
> >>       fi
> >>     fi
> >>     if test -f
"${vi_cv_path_mzscheme_pfx}/${SCHEME_COLLECTS}collects/scheme/base.ss"
> >> ; then
> >>       MZSCHEME_EXTRA="mzscheme_base.c"
> >>     else
> >>       if test -f
> >> "${vi_cv_path_mzscheme_pfx}/${SCHEME_COLLECTS}collects/scheme/base.rkt"
> >> ; then
> >>       MZSCHEME_EXTRA="mzscheme_base.c"
> >>       fi
> >>     fi
> >>     if test "X$MZSCHEME_EXTRA" != "X" ; then
> >>       dnl need to generate bytecode for MzScheme base
> >>       MZSCHEME_CFLAGS="${MZSCHEME_CFLAGS} -DINCLUDE_MZSCHEME_BASE"
> >>       MZSCHEME_MZC="${vi_cv_path_mzscheme_pfx}/bin/mzc"
> >>     fi
> >> ---
> >>
> >> and then this code in Makefile is triggered with
> >> -DINCLUDE_MZSCHEME_BASE making it include mzscheme_base.c
> >> ---
> >> objects/if_mzsch.o: if_mzsch.c $(MZSCHEME_EXTRA)
> >>       $(CCC) -o $@ $(MZSCHEME_CFLAGS_EXTRA) if_mzsch.c
> >>
> >> mzscheme_base.c:
> >>       $(MZSCHEME_MZC) --c-mods mzscheme_base.c ++lib scheme/base
> >> ---
> >
> > Configure never defines INCLUDE_MZSCHEME_BASE, right?  Thus in this
> > code:
> >
> > /* need to put it here for dynamic stuff to work */
> > #if defined(INCLUDE_MZSCHEME_BASE)
> > # include "mzscheme_base.c"
> > #elif MZSCHEME_VERSION_MAJOR >= 400
> > # error MzScheme 4.x must include mzscheme_base.c, for MinGW32 you need to
define MZSCHEME_GENERATE_BASE=yes
> > #endif
> >
> >
> > When MZSCHEME_VERSION_MAJOR is 400 or larger, it will fail.
> >
> > What MzScheme pacakge do you have installed?  I could not find anything
> > for "mzscheme" so I installed plt-scheme with racket, version 5.2.1
>
> I installed just racket package. If your installation was upgraded
> from an earlier version, can you check if you still have
> /usr/lib/racket/collects directory? At some point in time, Debian
> changed collects directory from /usr/lib/racket/collects to
> /usr/share/racket/collects
>
> The logic of configure is as follows: supposing mzscheme executable
> was found in {pfx} it tries to check if {pfx}/lib/collects exists. If
> so, it assumes it is the main directory for collections. Otherwise it
> tries {pfx}/share/collects.
> Then it checks if scheme/base.ss or scheme/base.rkt exist. If found,
> it assumes we need to generate mzscheme_base.c and defines
> MZSCHEME_EXTRA and adds -DINCLUDE_MZSCHEME_BASE to MZSCHEME_CFLAGS
>
> Apparently it found /usr/lib/racket/collects on your system but the
> directory is empty.

No, the directory is /share/collects.  Configure doesn't find it.  I
have changed configure.in and now it seems to work.  I'll do some more
checks and send out the patch.

--
Keyboard not found.  Think ENTER to continue.

  /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for 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

#67241 From: Ravindra yadav <yadav.ravindra666@...>
Date: Fri Nov 23, 2012 9:46 am
Subject: How to copy text from Xmig to windows
yadav.ravindra666@...
Send Email Send Email
 
I am not able copy anything from Xming to windows , i tried lots of things but
still not able to do so, Can anyone help me .....

--
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

#67242 From: Bram Moolenaar <Bram@...>
Date: Fri Nov 23, 2012 4:13 pm
Subject: Re: Vim expr parsing bug
Bram@...
Send Email Send Email
 
Christian Brabandt wrote:

> On Do, 22 Nov 2012, Bram Moolenaar wrote:
>
> >
> > Andy Wokula wrote:
> >
> > > " Vim Parsing Bug
> > >
> > > func! Add2(x1, x2)
> > >      return a:x1 + a:x2
> > > endfunc
> > >
> > > :echo function('Add2')(2,3)
> > > " 5 (ok)
> > >
> > > " Bug:
> > > :echo 1 ? function('Add2')(1,2) : function('Add2')(2,3)
> > > :echo 0 ? function('Add2')(1,2) : function('Add2')(2,3)
> > >
> > > " Error detected while processing D1223.vim:
> > > " line   17:
> > > " E110: Missing ')'
> > > " E15: Invalid expression: (2,3)
> > > " line   18:
> > > " E109: Missing ':' after '?'
> > > " E15: Invalid expression: 0 ? function('Add2')(1,2) :
function('Add2')(2,3)
> > >
> > >
> > > Adding parentheses  1 ? (...) : (...)  doesn't help.
> >
> > Strange.  I'll add it to the todo list.
>
> Problem is, in expr1 ? expr2 : expr3
> Vim explicitly resets evaluate in the false case which leads to being
> rettv.v_type being VAR_UNKNOWN and then handle_subscript doesn't handle
> the subscript anymore.
>
> Here is a patch:
>
> diff --git a/src/eval.c b/src/eval.c
> --- a/src/eval.c
> +++ b/src/eval.c
> @@ -19574,7 +19574,7 @@
>      while (ret == OK
>             && (**arg == '['
>                 || (**arg == '.' && rettv->v_type == VAR_DICT)
> -               || (**arg == '(' && rettv->v_type == VAR_FUNC))
> +               || (**arg == '(' && (rettv->v_type == VAR_FUNC ||
rettv->v_type == VAR_UNKNOWN)))
>             && !vim_iswhite(*(*arg - 1)))
>      {
>         if (**arg == '(')

Thanks for the quick fix.

Now, how about a test?

--
Be thankful to be in a traffic jam, because it means you own a car.

  /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for 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

#67243 From: David Fishburn <dfishburn.vim@...>
Date: Fri Nov 23, 2012 4:47 pm
Subject: Re: Errors compiling with Python 3.3 on Windows
dfishburn.vim@...
Send Email Send Email
 



On Fri, Nov 23, 2012 at 1:46 AM, Ken Takata <kentkt@...> wrote:
Hi David,

2012/11/23 Fri 0:42:51 UTC+9 David Fishburn:
> Python requested (version 33) - root dir is "C:\Python33"
> Python DLL will be loaded dynamically
> Perl requested (version 510) - root dir is "C:\Perl"
> Perl DLL will be loaded dynamically

It seems that you set PYTHON=C:\Python33 instead of PYTHON3=C:\Python33.
If you use Python 3.x, you should set PYTHON3, PYTHON3_VER and
DYNAMIC3_PYTHON.

Yes, that was it.

Thanks Ken, up and running now.

David

--
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

#67244 From: Christian Brabandt <cblists@...>
Date: Fri Nov 23, 2012 8:39 pm
Subject: Re: Vim expr parsing bug
cblists@...
Send Email Send Email
 
Hi Bram!

On Fr, 23 Nov 2012, Bram Moolenaar wrote:

>
> Christian Brabandt wrote:
>
> > On Do, 22 Nov 2012, Bram Moolenaar wrote:
> >
> > >
> > > Andy Wokula wrote:
> > >
> > > > " Vim Parsing Bug
> > > >
> > > > func! Add2(x1, x2)
> > > >      return a:x1 + a:x2
> > > > endfunc
> > > >
> > > > :echo function('Add2')(2,3)
> > > > " 5 (ok)
> > > >
> > > > " Bug:
> > > > :echo 1 ? function('Add2')(1,2) : function('Add2')(2,3)
> > > > :echo 0 ? function('Add2')(1,2) : function('Add2')(2,3)
> > > >
> > > > " Error detected while processing D1223.vim:
> > > > " line   17:
> > > > " E110: Missing ')'
> > > > " E15: Invalid expression: (2,3)
> > > > " line   18:
> > > > " E109: Missing ':' after '?'
> > > > " E15: Invalid expression: 0 ? function('Add2')(1,2) :
function('Add2')(2,3)
> > > >
> > > >
> > > > Adding parentheses  1 ? (...) : (...)  doesn't help.
> > >
> > > Strange.  I'll add it to the todo list.
> >
> > Problem is, in expr1 ? expr2 : expr3
> > Vim explicitly resets evaluate in the false case which leads to being
> > rettv.v_type being VAR_UNKNOWN and then handle_subscript doesn't handle
> > the subscript anymore.
> >
> > Here is a patch:
> >
> > diff --git a/src/eval.c b/src/eval.c
> > --- a/src/eval.c
> > +++ b/src/eval.c
> > @@ -19574,7 +19574,7 @@
> >      while (ret == OK
> >             && (**arg == '['
> >                 || (**arg == '.' && rettv->v_type == VAR_DICT)
> > -               || (**arg == '(' && rettv->v_type == VAR_FUNC))
> > +               || (**arg == '(' && (rettv->v_type == VAR_FUNC ||
rettv->v_type == VAR_UNKNOWN)))
> >             && !vim_iswhite(*(*arg - 1)))
> >      {
> >         if (**arg == '(')
>
> Thanks for the quick fix.
>
> Now, how about a test?

Well, I am not sure, what caused the segfault for Andy. But I have been
checking with him privately, that this patch works and added some tests.
So here we go, a different patch, including a test.

regards,
Christian
--

--
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

#67245 From: Bram Moolenaar <Bram@...>
Date: Fri Nov 23, 2012 8:44 pm
Subject: Re: Patch 7.3.715
Bram@...
Send Email Send Email
 
Christian Brabandt wrote:

> Hi Dominique!
>
> On Do, 22 Nov 2012, Dominique Pellé wrote:
>
> > I can't tell whether that's the right fix, but I confirm that
> > your proposed change avoids the crash at least.
> >
> > wp->w_llist was set to NULL at line quickfix.c:914 which
> > was introduced by chane 3918 according to hg annotate:
> >
> >  911 vimboss  644:     if (qi->qf_listcount == LISTCOUNT)
> >  912 vimboss    7:     {
> >  913    bram 3918:   if (wp != NULL && wp->w_llist == qi)
> >  914    bram 3918:       wp->w_llist = NULL;
> >  915 vimboss  644:   qf_free(qi, 0);
> >
> > ===
> > changeset:   3918:4f0ddf4137ee
> > tag:         v7-3-715
> > user:        Bram Moolenaar <bram@...>
> > date:        Wed Nov 14 22:38:08 2012 +0100
> > files:       src/quickfix.c src/testdir/test49.ok
> > src/testdir/test49.vim src/version.c
> > description:
> > updated for version 7.3.715
> > Problem:    Crash when calling setloclist() in BufUnload autocmd. (Marcin
> > 	    Szamotulski)
> > Solution:   Set w_llist to NULL when it was freed.  Also add a test.
> > 	    (Christian Brabandt)
> > ===
> >
> > I find it odd that a function called qf_new_list() clears
> > wp->w_llist (set it to NULL) and does not set it back
> > to something else. The name of the function "qf_new_list()"
> > suggests that it should create another list, so perhaps
> > it should set wp->w_llist to something else. But I don't
> > understand the code here.
>
> Indeed. I think GET_LOC_LIST should be defined as
> ll_get_or_alloc_list(wp)

ll_get_or_alloc_list() can still return NULL, thus your check is needed
anyway.

--
hundred-and-one symptoms of being an internet addict:
59. Your wife says communication is important in a marriage...so you buy
     another computer and install a second phone line so the two of you can
     chat.

  /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for 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

#67246 From: Bram Moolenaar <Bram@...>
Date: Fri Nov 23, 2012 8:44 pm
Subject: Re: Can't compile latest Vim using Make_cyg.mak
Bram@...
Send Email Send Email
 
Ken Takata wrote:

> I think that Make_cyg.mak needs some additional include dirs for ruby 1.9.
> After applying the attached patch, I can compile with the following command:
>
> $  make -f Make_cyg.mak CC=gcc-3 CXX=g++-3 RUBY='/path/to/ruby1.9.3'
RUBY_VER=19 RUBY_VER_LONG=1.9.1
>
> Using i686-pc-mingw32-gcc instead of gcc-3 also works,
> but i686-w64-mingw32-gcc doesn't seem to work for ruby interface.

Looking at Make_mvc.mak, the extra directories are only used when the
Ruby version is 1.9 or later.  Not for 1.8.


--
hundred-and-one symptoms of being an internet addict:
58. You turn on your computer and turn off your wife.

  /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for 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

#67247 From: Bram Moolenaar <Bram@...>
Date: Fri Nov 23, 2012 8:45 pm
Subject: Patch 7.3.726
Bram@...
Send Email Send Email
 
Patch 7.3.726
Problem:    Typos and duplicate info in README.
Solution:   Fix the text.
Files:     README.txt


*** ../vim-7.3.725/README.txt 2012-11-20 17:18:56.000000000 +0100
--- README.txt 2012-11-21 12:28:58.000000000 +0100
***************
*** 97,111 ****
   If you have problems, have a look at the Vim FAQ:
  	 http://vimdoc.sf.net/vimfaq.html

! If you still have problems, use one of the maillists to discuss t with Vim
! users and developers:
  	 http://www.vim.org/maillist.php

   If nothing else works, report bugs directly:
  	 Bram Moolenaar <Bram@...>

- There are several mailing lists for Vim, see http://www.vim.org/maillist.php.
-

   MAIN AUTHOR

--- 97,109 ----
   If you have problems, have a look at the Vim FAQ:
  	 http://vimdoc.sf.net/vimfaq.html

! If you still have problems or any other questions, use one of the mailing
! lists to discuss them with Vim users and developers:
  	 http://www.vim.org/maillist.php

   If nothing else works, report bugs directly:
  	 Bram Moolenaar <Bram@...>


   MAIN AUTHOR

*** ../vim-7.3.725/src/version.c 2012-11-20 17:55:06.000000000 +0100
--- src/version.c 2012-11-23 21:44:38.000000000 +0100
***************
*** 727,728 ****
--- 727,730 ----
   {   /* Add new patch number below this line */
+ /**/
+     726,
   /**/

--
Q: Should I clean my house or work on Vim?
A: Whatever contains more bugs.

  /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for 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

#67248 From: Christian Brabandt <cblists@...>
Date: Fri Nov 23, 2012 8:47 pm
Subject: Re: Patch 7.3.715
cblists@...
Send Email Send Email
 
Hi Bram!

On Fr, 23 Nov 2012, Bram Moolenaar wrote:

>
> Christian Brabandt wrote:
>
> > Hi Dominique!
> >
> > On Do, 22 Nov 2012, Dominique Pellé wrote:
> >
> > > I can't tell whether that's the right fix, but I confirm that
> > > your proposed change avoids the crash at least.
> > >
> > > wp->w_llist was set to NULL at line quickfix.c:914 which
> > > was introduced by chane 3918 according to hg annotate:
> > >
> > >  911 vimboss  644:     if (qi->qf_listcount == LISTCOUNT)
> > >  912 vimboss    7:     {
> > >  913    bram 3918:   if (wp != NULL && wp->w_llist == qi)
> > >  914    bram 3918:       wp->w_llist = NULL;
> > >  915 vimboss  644:   qf_free(qi, 0);
> > >
> > > ===
> > > changeset:   3918:4f0ddf4137ee
> > > tag:         v7-3-715
> > > user:        Bram Moolenaar <bram@...>
> > > date:        Wed Nov 14 22:38:08 2012 +0100
> > > files:       src/quickfix.c src/testdir/test49.ok
> > > src/testdir/test49.vim src/version.c
> > > description:
> > > updated for version 7.3.715
> > > Problem:    Crash when calling setloclist() in BufUnload autocmd. (Marcin
> > > 	    Szamotulski)
> > > Solution:   Set w_llist to NULL when it was freed.  Also add a test.
> > > 	    (Christian Brabandt)
> > > ===
> > >
> > > I find it odd that a function called qf_new_list() clears
> > > wp->w_llist (set it to NULL) and does not set it back
> > > to something else. The name of the function "qf_new_list()"
> > > suggests that it should create another list, so perhaps
> > > it should set wp->w_llist to something else. But I don't
> > > understand the code here.
> >
> > Indeed. I think GET_LOC_LIST should be defined as
> > ll_get_or_alloc_list(wp)
>
> ll_get_or_alloc_list() can still return NULL, thus your check is needed
> anyway.

It is still not right so. I'll look into it later.

regards,
Christian
--

--
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

#67249 From: Bram Moolenaar <Bram@...>
Date: Fri Nov 23, 2012 8:47 pm
Subject: Patch 7.3.727
Bram@...
Send Email Send Email
 
Patch 7.3.727
Problem:    Can't always find Win32.mak when building GvimExt.
Solution:   Use same mechanism as in Make_mvc.mak. (Cade Foster)
Files:     src/GvimExt/Makefile


*** ../vim-7.3.726/src/GvimExt/Makefile 2010-08-15 21:57:29.000000000 +0200
--- src/GvimExt/Makefile 2012-11-21 19:53:02.000000000 +0100
***************
*** 10,16 ****
   NODEBUG = 1
   !endif

! !include <win32.mak>

   all: gvimext.dll

--- 10,20 ----
   NODEBUG = 1
   !endif

! !ifdef SDK_INCLUDE_DIR
! !include $(SDK_INCLUDE_DIR)\Win32.mak
! !else
! !include <Win32.mak>
! !endif

   all: gvimext.dll

*** ../vim-7.3.726/src/version.c 2012-11-23 21:45:20.000000000 +0100
--- src/version.c 2012-11-23 21:46:35.000000000 +0100
***************
*** 727,728 ****
--- 727,730 ----
   {   /* Add new patch number below this line */
+ /**/
+     727,
   /**/

--
Time is money.  Especially if you make clocks.

  /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for 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

#67250 From: Bram Moolenaar <Bram@...>
Date: Fri Nov 23, 2012 8:55 pm
Subject: Patch 7.3.728
Bram@...
Send Email Send Email
 
Patch 7.3.728
Problem:    Cannot compile with MzScheme interface on Ubuntu 12.10.
Solution:   Find the collects directory under /usr/share.
Files:     src/configure.in, src/auto/configure


*** ../vim-7.3.727/src/configure.in 2012-10-03 21:09:33.000000000 +0200
--- src/configure.in 2012-11-23 21:51:39.000000000 +0100
***************
*** 650,666 ****
  	 MZSCHEME_LIBS="${MZSCHEME_LIBS} -R ${vi_cv_path_mzscheme_pfx}/lib"
         fi
       fi
       if test -d $vi_cv_path_mzscheme_pfx/lib/plt/collects; then
!       SCHEME_COLLECTS=lib/plt/
       else
         if test -d $vi_cv_path_mzscheme_pfx/lib/racket/collects; then
!  SCHEME_COLLECTS=lib/racket/
         fi
       fi
!     if test -f
"${vi_cv_path_mzscheme_pfx}/${SCHEME_COLLECTS}collects/scheme/base.ss" ; then
         MZSCHEME_EXTRA="mzscheme_base.c"
       else
!       if test -f
"${vi_cv_path_mzscheme_pfx}/${SCHEME_COLLECTS}collects/scheme/base.rkt" ; then
  	 MZSCHEME_EXTRA="mzscheme_base.c"
         fi
       fi
--- 650,679 ----
  	 MZSCHEME_LIBS="${MZSCHEME_LIBS} -R ${vi_cv_path_mzscheme_pfx}/lib"
         fi
       fi
+
+     AC_MSG_CHECKING(for racket collects directory)
       if test -d $vi_cv_path_mzscheme_pfx/lib/plt/collects; then
!       SCHEME_COLLECTS=$vi_cv_path_mzscheme_pfx/lib/plt/
       else
         if test -d $vi_cv_path_mzscheme_pfx/lib/racket/collects; then
!  SCHEME_COLLECTS=$vi_cv_path_mzscheme_pfx/lib/racket/
!       else
!  if test -d $vi_cv_path_mzscheme_pfx/share/racket/collects; then
! 	  SCHEME_COLLECTS=$vi_cv_path_mzscheme_pfx/share/racket/
!  fi
         fi
       fi
!     if test "X$SCHEME_COLLECTS" != "X" ; then
!       AC_MSG_RESULT(${SCHEME_COLLECTS})
!     else
!       AC_MSG_RESULT(not found)
!     fi
!
!     AC_MSG_CHECKING(for mzscheme_base.c)
!     if test -f "${SCHEME_COLLECTS}collects/scheme/base.ss" ; then
         MZSCHEME_EXTRA="mzscheme_base.c"
       else
!       if test -f "${SCHEME_COLLECTS}collects/scheme/base.rkt" ; then
  	 MZSCHEME_EXTRA="mzscheme_base.c"
         fi
       fi
***************
*** 668,676 ****
         dnl need to generate bytecode for MzScheme base
         MZSCHEME_CFLAGS="${MZSCHEME_CFLAGS} -DINCLUDE_MZSCHEME_BASE"
         MZSCHEME_MZC="${vi_cv_path_mzscheme_pfx}/bin/mzc"
       fi
       MZSCHEME_CFLAGS="${MZSCHEME_CFLAGS} -I${SCHEME_INC} \
!      
-DMZSCHEME_COLLECTS='\"${vi_cv_path_mzscheme_pfx}/${SCHEME_COLLECTS}collects\"'"
       MZSCHEME_SRC="if_mzsch.c"
       MZSCHEME_OBJ="objects/if_mzsch.o"
       MZSCHEME_PRO="if_mzsch.pro"
--- 681,693 ----
         dnl need to generate bytecode for MzScheme base
         MZSCHEME_CFLAGS="${MZSCHEME_CFLAGS} -DINCLUDE_MZSCHEME_BASE"
         MZSCHEME_MZC="${vi_cv_path_mzscheme_pfx}/bin/mzc"
+       AC_MSG_RESULT(needed)
+     else
+       AC_MSG_RESULT(not needed)
       fi
+
       MZSCHEME_CFLAGS="${MZSCHEME_CFLAGS} -I${SCHEME_INC} \
!       -DMZSCHEME_COLLECTS='\"${SCHEME_COLLECTS}collects\"'"
       MZSCHEME_SRC="if_mzsch.c"
       MZSCHEME_OBJ="objects/if_mzsch.o"
       MZSCHEME_PRO="if_mzsch.pro"
*** ../vim-7.3.727/src/auto/configure 2012-10-03 21:09:33.000000000 +0200
--- src/auto/configure 2012-11-23 21:51:42.000000000 +0100
***************
*** 4957,4982 ****
  	 MZSCHEME_LIBS="${MZSCHEME_LIBS} -R ${vi_cv_path_mzscheme_pfx}/lib"
         fi
       fi
       if test -d $vi_cv_path_mzscheme_pfx/lib/plt/collects; then
!       SCHEME_COLLECTS=lib/plt/
       else
         if test -d $vi_cv_path_mzscheme_pfx/lib/racket/collects; then
!  SCHEME_COLLECTS=lib/racket/
         fi
       fi
!     if test -f
"${vi_cv_path_mzscheme_pfx}/${SCHEME_COLLECTS}collects/scheme/base.ss" ; then
         MZSCHEME_EXTRA="mzscheme_base.c"
       else
!       if test -f
"${vi_cv_path_mzscheme_pfx}/${SCHEME_COLLECTS}collects/scheme/base.rkt" ; then
  	 MZSCHEME_EXTRA="mzscheme_base.c"
         fi
       fi
       if test "X$MZSCHEME_EXTRA" != "X" ; then
               MZSCHEME_CFLAGS="${MZSCHEME_CFLAGS} -DINCLUDE_MZSCHEME_BASE"
         MZSCHEME_MZC="${vi_cv_path_mzscheme_pfx}/bin/mzc"
       fi
       MZSCHEME_CFLAGS="${MZSCHEME_CFLAGS} -I${SCHEME_INC} \
!      
-DMZSCHEME_COLLECTS='\"${vi_cv_path_mzscheme_pfx}/${SCHEME_COLLECTS}collects\"'"
       MZSCHEME_SRC="if_mzsch.c"
       MZSCHEME_OBJ="objects/if_mzsch.o"
       MZSCHEME_PRO="if_mzsch.pro"
--- 4957,5005 ----
  	 MZSCHEME_LIBS="${MZSCHEME_LIBS} -R ${vi_cv_path_mzscheme_pfx}/lib"
         fi
       fi
+
+     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for racket collects
directory" >&5
+ $as_echo_n "checking for racket collects directory... " >&6; }
       if test -d $vi_cv_path_mzscheme_pfx/lib/plt/collects; then
!       SCHEME_COLLECTS=$vi_cv_path_mzscheme_pfx/lib/plt/
       else
         if test -d $vi_cv_path_mzscheme_pfx/lib/racket/collects; then
!  SCHEME_COLLECTS=$vi_cv_path_mzscheme_pfx/lib/racket/
!       else
!  if test -d $vi_cv_path_mzscheme_pfx/share/racket/collects; then
! 	  SCHEME_COLLECTS=$vi_cv_path_mzscheme_pfx/share/racket/
!  fi
         fi
       fi
!     if test "X$SCHEME_COLLECTS" != "X" ; then
!       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${SCHEME_COLLECTS}" >&5
! $as_echo "${SCHEME_COLLECTS}" >&6; }
!     else
!       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
! $as_echo "not found" >&6; }
!     fi
!
!     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mzscheme_base.c" >&5
! $as_echo_n "checking for mzscheme_base.c... " >&6; }
!     if test -f "${SCHEME_COLLECTS}collects/scheme/base.ss" ; then
         MZSCHEME_EXTRA="mzscheme_base.c"
       else
!       if test -f "${SCHEME_COLLECTS}collects/scheme/base.rkt" ; then
  	 MZSCHEME_EXTRA="mzscheme_base.c"
         fi
       fi
       if test "X$MZSCHEME_EXTRA" != "X" ; then
               MZSCHEME_CFLAGS="${MZSCHEME_CFLAGS} -DINCLUDE_MZSCHEME_BASE"
         MZSCHEME_MZC="${vi_cv_path_mzscheme_pfx}/bin/mzc"
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: needed" >&5
+ $as_echo "needed" >&6; }
+     else
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not needed" >&5
+ $as_echo "not needed" >&6; }
       fi
+
       MZSCHEME_CFLAGS="${MZSCHEME_CFLAGS} -I${SCHEME_INC} \
!       -DMZSCHEME_COLLECTS='\"${SCHEME_COLLECTS}collects\"'"
       MZSCHEME_SRC="if_mzsch.c"
       MZSCHEME_OBJ="objects/if_mzsch.o"
       MZSCHEME_PRO="if_mzsch.pro"
*** ../vim-7.3.727/src/version.c 2012-11-23 21:47:18.000000000 +0100
--- src/version.c 2012-11-23 21:54:13.000000000 +0100
***************
*** 727,728 ****
--- 727,730 ----
   {   /* Add new patch number below this line */
+ /**/
+     728,
   /**/

--
hundred-and-one symptoms of being an internet addict:
60. As your car crashes through the guardrail on a mountain road, your first
     instinct is to search for the "back" button.

  /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for 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

#67251 From: Bram Moolenaar <Bram@...>
Date: Fri Nov 23, 2012 9:09 pm
Subject: Re: Vim expr parsing bug
Bram@...
Send Email Send Email
 
Christian Brabandt wrote:

> On Fr, 23 Nov 2012, Bram Moolenaar wrote:
>
> > Christian Brabandt wrote:
> >
> > > On Do, 22 Nov 2012, Bram Moolenaar wrote:
> > >
> > > >
> > > > Andy Wokula wrote:
> > > >
> > > > > " Vim Parsing Bug
> > > > >
> > > > > func! Add2(x1, x2)
> > > > >      return a:x1 + a:x2
> > > > > endfunc
> > > > >
> > > > > :echo function('Add2')(2,3)
> > > > > " 5 (ok)
> > > > >
> > > > > " Bug:
> > > > > :echo 1 ? function('Add2')(1,2) : function('Add2')(2,3)
> > > > > :echo 0 ? function('Add2')(1,2) : function('Add2')(2,3)
> > > > >
> > > > > " Error detected while processing D1223.vim:
> > > > > " line   17:
> > > > > " E110: Missing ')'
> > > > > " E15: Invalid expression: (2,3)
> > > > > " line   18:
> > > > > " E109: Missing ':' after '?'
> > > > > " E15: Invalid expression: 0 ? function('Add2')(1,2) :
function('Add2')(2,3)
> > > > >
> > > > >
> > > > > Adding parentheses  1 ? (...) : (...)  doesn't help.
> > > >
> > > > Strange.  I'll add it to the todo list.
> > >
> > > Problem is, in expr1 ? expr2 : expr3
> > > Vim explicitly resets evaluate in the false case which leads to being
> > > rettv.v_type being VAR_UNKNOWN and then handle_subscript doesn't handle
> > > the subscript anymore.
> > >
> > > Here is a patch:
> > >
> > > diff --git a/src/eval.c b/src/eval.c
> > > --- a/src/eval.c
> > > +++ b/src/eval.c
> > > @@ -19574,7 +19574,7 @@
> > >      while (ret == OK
> > >             && (**arg == '['
> > >                 || (**arg == '.' && rettv->v_type == VAR_DICT)
> > > -               || (**arg == '(' && rettv->v_type == VAR_FUNC))
> > > +               || (**arg == '(' && (rettv->v_type == VAR_FUNC ||
rettv->v_type == VAR_UNKNOWN)))
> > >             && !vim_iswhite(*(*arg - 1)))
> > >      {
> > >         if (**arg == '(')
> >
> > Thanks for the quick fix.
> >
> > Now, how about a test?
>
> Well, I am not sure, what caused the segfault for Andy. But I have been
> checking with him privately, that this patch works and added some tests.
> So here we go, a different patch, including a test.

Thanks!

--
hundred-and-one symptoms of being an internet addict:
62. If your doorbell rings, you think that new mail has arrived.  And then
     you're disappointed that it's only someone at the door.

  /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for 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

#67252 From: Ike Devolder <ike.devolder@...>
Date: Fri Nov 23, 2012 9:38 pm
Subject: Re: Patch 7.3.715
ike.devolder@...
Send Email Send Email
 
Op vrijdag 23 november 2012 21:47:47 schreef Christian Brabandt:
> Hi Bram!
>
> On Fr, 23 Nov 2012, Bram Moolenaar wrote:
> > Christian Brabandt wrote:
> > > Hi Dominique!
> > >
> > > On Do, 22 Nov 2012, Dominique Pellé wrote:
> > > > I can't tell whether that's the right fix, but I confirm that
> > > > your proposed change avoids the crash at least.
> > > >
> > > > wp->w_llist was set to NULL at line quickfix.c:914 which
> > > >
> > > > was introduced by chane 3918 according to hg annotate:
> > > >  911 vimboss  644:     if (qi->qf_listcount == LISTCOUNT)
> > > >  912 vimboss    7:     {
> > > >  913    bram 3918:   if (wp != NULL && wp->w_llist == qi)
> > > >  914    bram 3918:       wp->w_llist = NULL;
> > > >  915 vimboss  644:   qf_free(qi, 0);
> > > >
> > > > ===
> > > > changeset:   3918:4f0ddf4137ee
> > > > tag:         v7-3-715
> > > > user:        Bram Moolenaar <bram@...>
> > > > date:        Wed Nov 14 22:38:08 2012 +0100
> > > > files:       src/quickfix.c src/testdir/test49.ok
> > > > src/testdir/test49.vim src/version.c
> > > > description:
> > > > updated for version 7.3.715
> > > > Problem:    Crash when calling setloclist() in BufUnload autocmd.
> > > > (Marcin
> > > >
> > > > 	    Szamotulski)
> > > >
> > > > Solution:   Set w_llist to NULL when it was freed.  Also add a test.
> > > >
> > > > 	    (Christian Brabandt)
> > > >
> > > > ===
> > > >
> > > > I find it odd that a function called qf_new_list() clears
> > > > wp->w_llist (set it to NULL) and does not set it back
> > > > to something else. The name of the function "qf_new_list()"
> > > > suggests that it should create another list, so perhaps
> > > > it should set wp->w_llist to something else. But I don't
> > > > understand the code here.
> > >
> > > Indeed. I think GET_LOC_LIST should be defined as
> > > ll_get_or_alloc_list(wp)
> >
> > ll_get_or_alloc_list() can still return NULL, thus your check is needed
> > anyway.
>
> It is still not right so. I'll look into it later.
>
> regards,
> Christian

I have tested the patch on top of 725
had one segfault already (could not yet reproduce)

but the following i can reproduce every time:

same configuration as before, same file (index.php)
- open index.php (it still has the syntax error
- :w (syntastic kicks in)
- fix the error by adding ; after phpinfo()
- :w (no more error in the file)
- remove the ; again
- :w (syntastic kicks in)
- :w ->E776: No location list

"index.php" 2L, 16C written
Error detected while processing function
<SNR>31_UpdateErrors..<SNR>31_AutoToggleLocList..<SNR>31_ShowLocList:
line    3:
E776: No location list
Press ENTER or type command to continue

no crash in this case, if i continue after this issue i get a second quickfix
buffer.

thx for the intermediate fix it is definatly an improvement.

--Ike

--
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

#67253 From: Cesar Romani <cesar.romani@...>
Date: Sat Nov 24, 2012 12:28 am
Subject: compile error by updating from 7.3.718 to 7.3.728
cesar.romani@...
Send Email Send Email
 
I'm building vim on windows 7 with mingw.
By updating it from 7.3.718 to 7.3.728 I got:

--------------------
[...]
if_ruby.c:339:21: error: static declaration of 'rb_num2long_stub'
follows non-static declaration
c:/ruby193/include/ruby-1.9.1/ruby/ruby.h:502:14: note: previous
declaration of 'rb_num2long_stub' was here
if_ruby.c:343:14: error: static declaration of 'rb_int2big_stub' follows
non-static declaration
c:/ruby193/include/ruby-1.9.1/ruby/intern.h:96:7: note: previous
declaration of 'rb_int2big_stub' was here
make: *** [gobjZi386/if_ruby.o] Error 1
Error by compiling gvim.exe
--------------------

Many thanks in advance,

--
Cesar


--
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

Messages 67224 - 67253 of 70084   Oldest  |  < Older  |  Newer >  |  Newest
Add to My Yahoo!      XML What's This?

Copyright © 2010 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines NEW - Help