Hi!

I've just upgraded to Vim 7.0.219 and netrw version 107, and under
WIndows 98 it doesn't go to upper directory (neither by pressing "-"
nor by pressing <cr> on "../" line). I've guessed that reason is in
this lines:

  elseif !g:netrw_cygwin && (has("win32") || has("win95") ||
has("win64") || has("win16"))
   " windows
   if a:islocal
    let dirname= substitute(dirname,'^\(\a:\\\)\=\(.*\)\\\([^\]\+$\)','\2','')
   else
    let dirname=
substitute(dirname,'^\(\a:\\\)\=\(.*\\\)\([^\]\+\\$\)','\2','')
   endif

First, this code supposes that directory separator is "\" while a few
lines before it was replaced with "/". Second, this code cuts off
drive letter and backslash after them making directory relative
instead of absolute. My workaround follows:

  elseif !g:netrw_cygwin && (has("win32") || has("win95") ||
has("win64") || has("win16"))
   " windows
   if a:islocal
    let dirname=
substitute(dirname,'^\(\a:[\\/]\)\=\(.*\)[\\/]\([^\\/]\+$\)','\1\2','')
   else
    let dirname=
substitute(dirname,'^\(\a:[\\/]\)\=\(.*[\\/]\)\([^\\/]\+[\\/]$\)','\1\2','')
   endif

This works for me.

--
Cyril Slobin <[EMAIL PROTECTED]> `When I use a word,' Humpty Dumpty said,
<http://45.free.net/~slobin> `it means just what I choose it to mean'

Reply via email to