Skip to content

Commit a852fc0

Browse files
committed
Accept nested array for template projection
This is intended as the canonical representation, to allow for strings to be interpreted as a filename.
1 parent 83e1767 commit a852fc0

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

autoload/rails.vim

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3532,6 +3532,9 @@ function! s:AR(cmd,related,line1,line2,count,...) abort
35323532
elseif a:cmd =~# 'D'
35333533
let modified = &l:modified
35343534
let template = s:split(get(rails#buffer().projected('template'), 0, []))
3535+
if type(get(template, 0)) == v:t_list
3536+
let template = template[0]
3537+
endif
35353538
call map(template, 's:gsub(v:val, "\t", " ")')
35363539
if a:line2 == a:count
35373540
call append(a:line2, template)

0 commit comments

Comments
 (0)