Something's broken in gvim74-1024.exe

classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

Something's broken in gvim74-1024.exe

'Jürgen Krämer' via vim_use

Hello,

Just now, tried gvim74-1024.exe on Windows 7 64 bit. There is a
particular text file that I have open in Vim always.

This latest vim (and gvim) just sits there unable to open this file.

I uninstalled this release and am now back at Bram's release of Aug 10,
2013.

--Suresh


--
--
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Try this with release gvim74-1024.exe

'Jürgen Krämer' via vim_use

On windows 7, 64 bit, using gvim74-1024.exe from vim.org site (version
is 1023, not 1024!):

The attached archive has the file try_loading_me.txt with the modeline:

    # vim: set ft=notes syntax=off:

The archive also has the following vimfiles associated with filetype notes:

     vimfiles/autoload/notes.vim
     vimfiles/ftplugin/notes.vim
     vimfiles/syntax/notes.vim

The vim and gvim in gvim74-1024.exe are unable to open the file
try_loading_me.txt with vimfiles containing the above 3 files.

(No issues with Bram's release of Aug 10, 2013.)

Please look into this.

Thanks,

--Suresh





--
--
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.

expose_bug_in_vim_1023.7z (4K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Try this with release gvim74-1024.exe

Christian Brabandt
Hi 'Suresh!

On Mo, 11 Jan 2016, 'Suresh Govindachar' via vim_use wrote:

>
> On windows 7, 64 bit, using gvim74-1024.exe from vim.org site
> (version is 1023, not 1024!):
>
> The attached archive has the file try_loading_me.txt with the modeline:
>
>    # vim: set ft=notes syntax=off:
>
> The archive also has the following vimfiles associated with filetype notes:
>
>     vimfiles/autoload/notes.vim
>     vimfiles/ftplugin/notes.vim
>     vimfiles/syntax/notes.vim
>
> The vim and gvim in gvim74-1024.exe are unable to open the file
> try_loading_me.txt with vimfiles containing the above 3 files.

What do you mean with unable? Sounds like a plugin problem, if you need
those vimfiles. Is content visible at all?
What happens if you start with
gvim.exe -u NONE -N

Also please look into this for further debugging this issue:
https://vimhelp.appspot.com/vim_faq.txt.html#faq-2.5

>
> (No issues with Bram's release of Aug 10, 2013.)
>
> Please look into this.

I am not able to reproduce this.

Best,
Christian
--
Kein weiser oder tapferer Mann legt sich auf die Schienen der
Geschichte und wartet, daß der Zug der Zukunft ihn überfährt.
                -- Dwight David Eisenhower

--
--
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Something's broken in gvim74-1024.exe

Bram Moolenaar
In reply to this post by 'Jürgen Krämer' via vim_use

Subject Govindachar wrote:

> Just now, tried gvim74-1024.exe on Windows 7 64 bit. There is a
> particular text file that I have open in Vim always.
>
> This latest vim (and gvim) just sits there unable to open this file.

How do you open the file?  Have you tried another way (first starting
gvim without the file and then using ":edit file"?

> I uninstalled this release and am now back at Bram's release of Aug 10,
> 2013.

I specifically created this version to find out about problems.
Please try to pintpoint where it gets stuck.  If it also happens with
vim.exe, you can try using "vim -V20".

--
CART DRIVER: Bring out your dead!
   There are legs stick out of windows and doors.  Two MEN are fighting in the
   mud - covered from head to foot in it.  Another MAN is on his hands in
   knees shovelling mud into his mouth.  We just catch sight of a MAN falling
   into a well.
                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

 /// Bram Moolenaar -- [hidden email] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for 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_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Try this with release gvim74-1024.exe

Bram Moolenaar
In reply to this post by 'Jürgen Krämer' via vim_use

Suresh Govindachar wrote:

> On windows 7, 64 bit, using gvim74-1024.exe from vim.org site (version
> is 1023, not 1024!):
>
> The attached archive has the file try_loading_me.txt with the modeline:
>
>     # vim: set ft=notes syntax=off:
>
> The archive also has the following vimfiles associated with filetype notes:
>
>      vimfiles/autoload/notes.vim
>      vimfiles/ftplugin/notes.vim
>      vimfiles/syntax/notes.vim
>
> The vim and gvim in gvim74-1024.exe are unable to open the file
> try_loading_me.txt with vimfiles containing the above 3 files.
>
> (No issues with Bram's release of Aug 10, 2013.)
>
> Please look into this.

I can't open a .7z file (netrw doesn't support it).

--
I used to wonder about the meaning of life.  But I looked it
up in the dictionary under "L" and there it was - the meaning
of life.  It was less than I expected.              - Dogbert

 /// Bram Moolenaar -- [hidden email] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for 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_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Try this with release gvim74-1024.exe

'Jürgen Krämer' via vim_use
On 1/12/2016 1:50 PM, Bram Moolenaar wrote [indicating need to send
files archived in a format netrw can read, which isn't .7z]

Summary:  The following reproducible steps work as expected on 7.4.0,
but cause 7.4.1023 to go into an infinite loop!

Setup:  Windows 7, 64 bit
         cd <some_path>
         dir will show folders vim74 and vimfiles:
         vim74\[gvim.exe and other stuff]
         vimfiles\[contains only 3 files, all named notes.vim, in
attached zip]
            vimfiles/autoload/notes.vim
            vimfiles/ftplugin/notes.vim
            vimfiles/syntax/notes.vim

Command: start vim74/gvim.exe -V20  -u none -U NONE

Actions:  :find <path to file try_loading_me.txt, in attached zip]
           :set filetype=notes
           :source vimfiles\ftplugin\notes.vim

Expected result -- seen in 7.4.0:  try_loading_me.txt will have folds

Bug in 7.4.1023:  :source goes into infinite loop and never gets back to
user.

Thanks for investigating this,

--Suresh

--
--
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.

expose_bug_in_vim_1023.zip (7K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Try this with release gvim74-1024.exe

Christian Brabandt
Hi 'Suresh!

On Di, 12 Jan 2016, 'Suresh Govindachar' via vim_use wrote:

> On 1/12/2016 1:50 PM, Bram Moolenaar wrote [indicating need to send
> files archived in a format netrw can read, which isn't .7z]
>
> Summary:  The following reproducible steps work as expected on
> 7.4.0, but cause 7.4.1023 to go into an infinite loop!
>
> Setup:  Windows 7, 64 bit
>         cd <some_path>
>         dir will show folders vim74 and vimfiles:
>         vim74\[gvim.exe and other stuff]
>         vimfiles\[contains only 3 files, all named notes.vim, in
> attached zip]
>            vimfiles/autoload/notes.vim
>            vimfiles/ftplugin/notes.vim
>            vimfiles/syntax/notes.vim
>
> Command: start vim74/gvim.exe -V20  -u none -U NONE
>
> Actions:  :find <path to file try_loading_me.txt, in attached zip]
>           :set filetype=notes
>           :source vimfiles\ftplugin\notes.vim
>
> Expected result -- seen in 7.4.0:  try_loading_me.txt will have folds
>
> Bug in 7.4.1023:  :source goes into infinite loop and never gets
> back to user.
>
> Thanks for investigating this,

You have a problem with your autoload script:

   while(textm =~ '^\s*$')  " will always exit from while
       if cline < i
           break
       endif
       let i = i + 1
       let textm = getline(cline-i)
   endwhile

There is no exit condition, once cline-i is smaller than 1.
In that case getline returns an empty string, which happens to match
your "^\s*$" and therefore the loop happily continues.
Therefore add an extra condition like this:

   while(textm =~ '^\s*$')  " will always exit from while
       if cline < i
           break
       endif
       let i = i + 1
       let textm = getline(cline-i)
   endwhile


Not sure, why this doesn't happen with the old gvim.exe


Best,
Christian
--
Sei gewiß, daß nichts dein Eigentum sei, was du nicht inwendig hast.
                -- Matthias Claudius

--
--
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Try this with release gvim74-1024.exe

h_east
Hi,

2016-1-13(Wed) 15:48:44 UTC+9 Christian Brabandt:

> Hi 'Suresh!
>
> On Di, 12 Jan 2016, 'Suresh Govindachar' via vim_use wrote:
>
> > On 1/12/2016 1:50 PM, Bram Moolenaar wrote [indicating need to send
> > files archived in a format netrw can read, which isn't .7z]
> >
> > Summary:  The following reproducible steps work as expected on
> > 7.4.0, but cause 7.4.1023 to go into an infinite loop!
> >
> > Setup:  Windows 7, 64 bit
> >         cd <some_path>
> >         dir will show folders vim74 and vimfiles:
> >         vim74\[gvim.exe and other stuff]
> >         vimfiles\[contains only 3 files, all named notes.vim, in
> > attached zip]
> >            vimfiles/autoload/notes.vim
> >            vimfiles/ftplugin/notes.vim
> >            vimfiles/syntax/notes.vim
> >
> > Command: start vim74/gvim.exe -V20  -u none -U NONE
> >
> > Actions:  :find <path to file try_loading_me.txt, in attached zip]
> >           :set filetype=notes
> >           :source vimfiles\ftplugin\notes.vim
> >
> > Expected result -- seen in 7.4.0:  try_loading_me.txt will have folds
> >
> > Bug in 7.4.1023:  :source goes into infinite loop and never gets
> > back to user.
> >
> > Thanks for investigating this,
>
> You have a problem with your autoload script:
>
>    while(textm =~ '^\s*$')  " will always exit from while
>        if cline < i
>            break
>        endif
>        let i = i + 1
>        let textm = getline(cline-i)
>    endwhile
>
> There is no exit condition, once cline-i is smaller than 1.
> In that case getline returns an empty string, which happens to match
> your "^\s*$" and therefore the loop happily continues.
> Therefore add an extra condition like this:
>
>    while(textm =~ '^\s*$')  " will always exit from while
>        if cline < i
>            break
>        endif
>        let i = i + 1
>        let textm = getline(cline-i)
>    endwhile
It looks exactly the same thing to me.
I might presbyopia :-P

>
>
> Not sure, why this doesn't happen with the old gvim.exe

--
Best regards,
Hirohito Higashi (a.k.a h_east)

--
--
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Try this with release gvim74-1024.exe

'Jürgen Krämer' via vim_use
In reply to this post by Christian Brabandt
On 1/12/2016 10:48 PM, Christian Brabandt wrote:
...
>
>     while(textm =~ '^\s*$')  " will always exit from while
 >          ...
>         let textm = getline(cline-i)
>     endwhile
>
> There is no exit condition, once cline-i is smaller than 1.
> In that case getline returns an empty string,

Not according to the documentation for :help getline():

     When {lnum} is smaller than 1 or bigger than the
     number of lines in the buffer, an empty string is
     returned.

That is the reason for the comment (will always exit from while).

> which happens to match your "^\s*$" and therefore
 > the loop happily continues.

--Suresh


--
--
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Try this with release gvim74-1024.exe

Christian Brabandt
On Mi, 13 Jan 2016, 'Suresh Govindachar' via vim_use wrote:

> On 1/12/2016 10:48 PM, Christian Brabandt wrote:
> ...
> >
> >    while(textm =~ '^\s*$')  " will always exit from while
> >          ...
> >        let textm = getline(cline-i)
> >    endwhile
> >
> >There is no exit condition, once cline-i is smaller than 1.
> >In that case getline returns an empty string,
>
> Not according to the documentation for :help getline():
>
>     When {lnum} is smaller than 1 or bigger than the
>     number of lines in the buffer, an empty string is
>     returned.
>
> That is the reason for the comment (will always exit from while).

You misunderstood. There is no reason, why the empty string '' should
not match '^$'. (you can basically omit the \s*)

This has been changed by patch 7.4.129, previously getline(-1) returned
-1 and that made your loop break.

Best,
Christian
--
Nichtstun ist besser als mit viel Mühe nichts schaffen.

--
--
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Try this with release gvim74-1024.exe

Charles Campbell
In reply to this post by Christian Brabandt
Christian Brabandt wrote:

> Hi 'Suresh!
>
> On Di, 12 Jan 2016, 'Suresh Govindachar' via vim_use wrote:
>
>> On 1/12/2016 1:50 PM, Bram Moolenaar wrote [indicating need to send
>> files archived in a format netrw can read, which isn't .7z]
>>
>> Summary:  The following reproducible steps work as expected on
>> 7.4.0, but cause 7.4.1023 to go into an infinite loop!
>>
>> Setup:  Windows 7, 64 bit
>>         cd <some_path>
>>         dir will show folders vim74 and vimfiles:
>>         vim74\[gvim.exe and other stuff]
>>         vimfiles\[contains only 3 files, all named notes.vim, in
>> attached zip]
>>            vimfiles/autoload/notes.vim
>>            vimfiles/ftplugin/notes.vim
>>            vimfiles/syntax/notes.vim
>>
>> Command: start vim74/gvim.exe -V20  -u none -U NONE
>>
>> Actions:  :find <path to file try_loading_me.txt, in attached zip]
>>           :set filetype=notes
>>           :source vimfiles\ftplugin\notes.vim
>>
>> Expected result -- seen in 7.4.0:  try_loading_me.txt will have folds
>>
>> Bug in 7.4.1023:  :source goes into infinite loop and never gets
>> back to user.
>>
>> Thanks for investigating this,
> You have a problem with your autoload script:
>
>    while(textm =~ '^\s*$')  " will always exit from while
>        if cline < i
>            break
>        endif
>        let i = i + 1
>        let textm = getline(cline-i)
>    endwhile
>
> There is no exit condition, once cline-i is smaller than 1.
> In that case getline returns an empty string, which happens to match
> your "^\s*$" and therefore the loop happily continues.
> Therefore add an extra condition like this:
>
>    while(textm =~ '^\s*$')  " will always exit from while
>        if cline < i
>            break
>        endif
>        let i = i + 1
>        let textm = getline(cline-i)
>    endwhile
>
>
> Not sure, why this doesn't happen with the old gvim.exe
>
For those who were wondering -- the problematic autoload script fragment
did not have the

  if cline < i
     break
  endif

in it -- that's Christian's "extra condition".

Regards,
Chip Campbell

--
--
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Try this with release gvim74-1024.exe

'Jürgen Krämer' via vim_use
In reply to this post by Christian Brabandt
On 1/13/2016 7:23 AM, Christian Brabandt wrote:
...
> This has been changed by patch 7.4.129, previously getline(-1)
 > returned -1 and that made your loop break.

(In case anyone else stumbles into this issue, prior to patch 7.4.129,
getline(-1) returned 0 -- which is a bug,
https://github.com/ignatenkobrain/vim-rpm/blob/master/7.4.129 ).

And my script was making use of this bug -- in more ways than one
because just making the while loop exit did not result in folds.

Unfortunately, for the time-being, my quickfix is to modify
autoload/notes.vim by introducing:

     function! s:mygetline( num )
        if( a:num < 0 ) | return 0 | endif
        return getline( a:num )
     endfunction

and replacing all other instances of getline() with mygetline().

Thanks,

--Suresh

--
--
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Try this with release gvim74-1024.exe

Tony Mechelynck
On Thu, Jan 14, 2016 at 4:10 AM, 'Suresh Govindachar' via vim_use
<[hidden email]> wrote:

> On 1/13/2016 7:23 AM, Christian Brabandt wrote:
> ...
>>
>> This has been changed by patch 7.4.129, previously getline(-1)
>
>> returned -1 and that made your loop break.
>
> (In case anyone else stumbles into this issue, prior to patch 7.4.129,
> getline(-1) returned 0 -- which is a bug,
> https://github.com/ignatenkobrain/vim-rpm/blob/master/7.4.129 ).
>
> And my script was making use of this bug -- in more ways than one because
> just making the while loop exit did not result in folds.
>
> Unfortunately, for the time-being, my quickfix is to modify
> autoload/notes.vim by introducing:
>
>     function! s:mygetline( num )
>        if( a:num < 0 ) | return 0 | endif
>        return getline( a:num )
>     endfunction
>
> and replacing all other instances of getline() with mygetline().
>
> Thanks,
>
> --Suresh

You could even make that function one line shorter (but not more
elegant) by taking advantage of the fact that when there is no
explicit return, the return value is the number zero, as follows:

function s:mygetline(a:num)
  if a:num > 0 | return getline(a:num) | endif
endfunction

This assumes that when a:num is zero you want 0, not "" , to be
returned. If you do want the empty string as s:mygetline(0), replace
the condition by a:num >= 0


Best regards,
Tony.

--
--
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.