Skip to content

Commit

Permalink
Use join() to build commands 🍯
Browse files Browse the repository at this point in the history
  • Loading branch information
pmeinhardt committed Apr 19, 2024
1 parent 5a78e74 commit 4b08160
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions plugin/maxdown.vim
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,7 @@ function! s:convert() abort
\ '-',
\ ]

for arg in args
let cmd .= ' ' . arg
endfor

execute '%!' . cmd
execute '%!' . join([cmd] + args)
endfunction

function! s:invoke(dest, source, bnum) abort
Expand All @@ -51,11 +47,7 @@ function! s:invoke(dest, source, bnum) abort
\ '-'
\ ]

for arg in args
let cmd .= ' ' . arg
endfor

call s:exec(cmd, a:bnum)
call s:exec(join([cmd] + args), a:bnum)
endfunction

function! s:show(fpath, title) abort
Expand Down

0 comments on commit 4b08160

Please sign in to comment.