Loading ...
Sorry, an error occurred while loading the content.

67383Re: Netrw failure with latest Vim

Expand Messages
  • John Little
    Dec 2, 2012
    • 0 Attachment
      I've just spent a few hours trying to track this down. It was very frustrating as vim's behaviour became unpredictable, though I think I know the cause. Using :Decho went bananas until I found the comment that explained that DechoTabOn was necessary, but even that was subject to weirdness caused by the autocommands running the code being debugged, which interacted with the problem I was trying to find.

      Anyway, to cut a long story short, in V147b the variable g:netrw_xstrlen is used when it doesn't exist in the function s:Strlen in autoload/netrw.vim, when it is called in s:LocalListing. Maybe there's :silent on the way to that point, but s:Strlen's execution is abandoned; trace statements towards the end (such at the call Dret) are not executed, and the listing code uses a directory length of 0. If g:netrw_xstrlen or g:Align_xstrlen or g:drawit_xstrlen is defined, the problem does not occur. Perhaps Dr Chip you have one of those set.

      I'm not sure, but I think the code that checks the existence of g:netrw_xstrlen should look like

      if !exists("g:netrw_xstrlen")
      if exists("g:Align_xstrlen")
      let g:netrw_xstrlen= g:Align_xstrlen
      if !exists("g:drawit_xstrlen")
      if &enc == "latin1" || !has("multi_byte")
      let g:drawit_xstrlen= 0
      let g:drawit_xstrlen= 1
      let g:netrw_xstrlen= g:drawit_xstrlen

      Regards, John

      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
    • Show all 13 messages in this topic