We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 297c0df commit 9bb338cCopy full SHA for 9bb338c
1 file changed
autoload/sj/python.vim
@@ -317,6 +317,7 @@ endfunction
317
function! sj#python#JoinTernaryAssignment()
318
let include_syntax = sj#IncludeSyntax(['pythonConditional'])
319
let start_lineno = line('.')
320
+ let indent = indent('.')
321
normal! 0
322
323
if sj#SearchSkip('^\s*\zsif\>', include_syntax, 'Wc', line('.')) <= 0
@@ -356,6 +357,7 @@ function! sj#python#JoinTernaryAssignment()
356
357
358
let body = lhs_if_true . ' ' . body_if_true . ' ' . if_clause . ' else ' . body_if_false
359
call sj#ReplaceLines(start_lineno, start_lineno + 3, body)
360
+ call sj#SetIndent(start_lineno, start_lineno, indent)
361
362
return 1
363
endfunction
0 commit comments