Skip to content

Commit 61d26f4

Browse files
committed
Fix error on JavaScript projections
Closes tpope#235.
1 parent 570a768 commit 61d26f4

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
@@ -3039,7 +3039,7 @@ function! s:readable_open_command(cmd, argument, name, projections) dict abort
30393039
\ 'o': rails#singularize(root),
30403040
\ '%': '%'}
30413041
if suffix =~# '\.js\>'
3042-
let placeholders.S = s:gsub(placeholders.S, '::', '.')
3042+
let ph.S = s:gsub(ph.S, '::', '.')
30433043
endif
30443044
call map(template, 's:expand_placeholders(v:val, ph)')
30453045
call map(template, 's:gsub(v:val, "\t", " ")')
@@ -4427,7 +4427,7 @@ function! s:readable_projected(key, ...) dict abort
44274427
\ 'o': rails#singularize(root),
44284428
\ '%': '%'}, a:0 ? a:1 : {})
44294429
if suffix =~# '\.js\>'
4430-
let placeholders.S = s:gsub(placeholders.S, '::', '.')
4430+
let ph.S = s:gsub(ph.S, '::', '.')
44314431
endif
44324432
let mine += map(s:getlist(all[pattern], a:key), 's:expand_placeholders(v:val, ph)')
44334433
endif

0 commit comments

Comments
 (0)