Skip to content

Commit

Permalink
fixing error caused by trailing newline from dirname
Browse files Browse the repository at this point in the history
  • Loading branch information
kassens committed Feb 7, 2011
1 parent c42aded commit 98510cd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gvimrc
Expand Up @@ -188,7 +188,7 @@ ruby << RUBY
home = pwd == File.expand_path("~")

if home || Regexp.new("^" + Regexp.escape(pwd)) !~ destination
VIM.command(%{call ChangeDirectory(system("dirname " . shellescape(a:file, 1)), 0)})
VIM.command(%{call ChangeDirectory(fnamemodify(a:file, ":h"), 0)})
end
RUBY
endfunction
Expand Down

0 comments on commit 98510cd

Please sign in to comment.