mirror of
https://github.com/junegunn/vim-easy-align.git
synced 2025-11-15 05:13:48 -05:00
Do not attach margin_left string before phantom token
This commit is contained in:
@@ -507,14 +507,15 @@ function! s:do_align(todo, modes, all_tokens, all_delims, fl, ll, fc, lc, nth, r
|
||||
endif
|
||||
|
||||
" Before and after the range (for blockwise visual mode)
|
||||
let cline = getline(line)
|
||||
let before = strpart(cline, 0, a:fc - 1)
|
||||
let after = a:lc ? strpart(cline, a:lc) : ''
|
||||
let cline = getline(line)
|
||||
let before = strpart(cline, 0, a:fc - 1)
|
||||
let after = a:lc ? strpart(cline, a:lc) : ''
|
||||
|
||||
" Determine the left and right margin around the delimiter
|
||||
let rest = join(tokens[nth + 1 : -1], '')
|
||||
let ml = empty(prefix . token) ? '' : d.ml
|
||||
let mr = empty(rest.after) ? '' : d.mr
|
||||
let rest = join(tokens[nth + 1 : -1], '')
|
||||
let nomore = empty(rest.after)
|
||||
let ml = (empty(prefix . token) || empty(delim) && nomore) ? '' : d.ml
|
||||
let mr = nomore ? '' : d.mr
|
||||
|
||||
" Adjust indentation of the lines starting with a delimiter
|
||||
let lpad = ''
|
||||
|
||||
Reference in New Issue
Block a user