Skip to content

Commit b6a1a56

Browse files
committed
No need to check for trailing_comma setting when joining
1 parent 57180aa commit b6a1a56

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

autoload/sj/python.vim

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -544,11 +544,7 @@ function! s:JoinList(regex, opening_char, closing_char)
544544
let body = sj#GetMotion('va'.a:opening_char)
545545
let body = substitute(body, '\_s\+', ' ', 'g')
546546
let body = substitute(body, '^'.a:opening_char.'\s\+', a:opening_char, '')
547-
if sj#settings#Read('trailing_comma')
548-
let body = substitute(body, ',\?\s\+'.a:closing_char.'$', a:closing_char, '')
549-
else
550-
let body = substitute(body, '\s\+'.a:closing_char.'$', a:closing_char, '')
551-
endif
547+
let body = substitute(body, ',\?\s\+'.a:closing_char.'$', a:closing_char, '')
552548

553549
call sj#ReplaceMotion('va'.a:opening_char, body)
554550

0 commit comments

Comments
 (0)