Skip to content

Commit 77af7e4

Browse files
committed
Fix edit of default layout
Closes tpope#425.
1 parent f694d62 commit 77af7e4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

autoload/rails.vim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2950,15 +2950,15 @@ function! s:viewEdit(cmd, ...) abort
29502950
endif
29512951
endfunction
29522952

2953-
function! s:layoutEdit(cmd,...)
2953+
function! s:layoutEdit(cmd,...) abort
29542954
if a:0
29552955
return s:viewEdit(a:cmd,"layouts/".a:1)
29562956
endif
29572957
let file = s:findlayout('')
29582958
if file ==# ""
29592959
let file = "app/views/layouts/application.html.erb"
29602960
endif
2961-
return s:edit(a:cmd,s:sub(file,'^/',''))
2961+
return s:edit(a:cmd, file)
29622962
endfunction
29632963

29642964
function! s:stylesheetEdit(cmd,...)

0 commit comments

Comments
 (0)