Browse files

Fix detection of netrw buffers

  • Loading branch information...
1 parent 5c301bf commit 13b8bb5afa7bc6c65c3d2401314bb1960f161f37 @tpope committed Apr 11, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 plugin/rails.vim
View
2 plugin/rails.vim
@@ -127,7 +127,7 @@ augroup railsPluginDetect
autocmd!
autocmd BufNewFile,BufRead * call s:Detect(expand("<afile>:p"))
autocmd VimEnter * if expand("<amatch>") == "" && !exists("b:rails_root") | call s:Detect(getcwd()) | endif | if exists("b:rails_root") | silent doau User BufEnterRails | endif
- autocmd FileType netrw if !exists("b:rails_root") | call s:Detect(expand("<afile>:p")) | endif | if exists("b:rails_root") | silent doau User BufEnterRails | endif
+ autocmd FileType netrw if !exists("b:rails_root") | call s:Detect(expand("%:p")) | endif | if exists("b:rails_root") | silent doau User BufEnterRails | endif
autocmd BufEnter * if exists("b:rails_root")|silent doau User BufEnterRails|endif
autocmd BufLeave * if exists("b:rails_root")|silent doau User BufLeaveRails|endif
autocmd Syntax railslog if s:autoload()|call rails#log_syntax()|endif

0 comments on commit 13b8bb5

Please sign in to comment.