On Thursday, December 5, 2013 1:18:17 PM UTC+9, Charles Campbell wrote:
> mattn wrote:
>
> > Hi list.
>
> >
>
> > Currently, vim bundle netrw v149. It doesn't work with multi-byte strings.
>
> > This problem occur in v149, 150j both.
>
> >
>
> > Below is a patch for v150j.
>
> >
>
> > --- autoload/netrw.vim.org 2013-11-29 09:51:50.637597900 +0900
>
> > +++ autoload/netrw.vim 2013-11-29 09:53:09.361597900 +0900
>
> > @@ -8608,7 +8608,7 @@
>
> >
>
> > " get the list of files contained in the current directory
>
> > let dirname = b:netrw_curdir
>
> > - let dirnamelen = s:Strlen(b:netrw_curdir)
>
> > + let dirnamelen = strlen(b:netrw_curdir)
>
> > let filelist = glob(s:ComposePath(dirname,"*"),0,1)
>
> > let filelist = filelist + glob(s:ComposePath(dirname,".*"),0,1)
>
> > " call Decho("(LocalListing) filelist=".filelist)
>
>
>
> I'm sorry; I just noticed that you mentioned v150j. The s:Strlen()
>
> function is (by default) using strdisplaywidth(); does this not work?
>
> Please give me an example so I can test things out.
>
>
>
> Thank you,
>
> Charles Campbell
dirnamelen is used for:
let pfile= strpart(pfile,dirnamelen)
* autoload/netrw.vim:L8689
A second argument of strpart should be byte size not display width.
For example, directory name contains multi-byte like follow,
c:/[][][]/foo.txt
* [] is multi-byte.
let pfile = strpart(pfile, length_until_last_slash)
length_until_last_slash should be 10. if using s:Strlen(), it become 7.
So it display broken bytes in netrw.
- Yasuhiro Matsumoto.
--
--
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 [email protected].
For more options, visit https://groups.google.com/groups/opt_out.