mirror of
https://github.com/junegunn/vim-easy-align.git
synced 2025-11-10 19:03:50 -05:00
Disallow recursive alignment in blockwise-visual mode
This commit is contained in:
@@ -478,10 +478,17 @@ function! easy_align#align(just, expr) range
|
|||||||
if type(ml) == 0 | let ml = repeat(' ', ml) | endif
|
if type(ml) == 0 | let ml = repeat(' ', ml) | endif
|
||||||
if type(mr) == 0 | let mr = repeat(' ', mr) | endif
|
if type(mr) == 0 | let mr = repeat(' ', mr) | endif
|
||||||
|
|
||||||
|
let bvisual = visualmode() == ''
|
||||||
|
|
||||||
|
if recur && bvisual
|
||||||
|
echon "\rRecursive alignment is currently not supported in blockwise-visual mode"
|
||||||
|
return
|
||||||
|
endif
|
||||||
|
|
||||||
try
|
try
|
||||||
call s:do_align(just, {}, {}, a:firstline, a:lastline,
|
call s:do_align(just, {}, {}, a:firstline, a:lastline,
|
||||||
\ visualmode() == '' ? min([col("'<"), col("'>")]) : 1,
|
\ bvisual ? min([col("'<"), col("'>")]) : 1,
|
||||||
\ visualmode() == '' ? max([col("'<"), col("'>")]) : 0,
|
\ bvisual ? max([col("'<"), col("'>")]) : 0,
|
||||||
\ get(dict, 'pattern', ch),
|
\ get(dict, 'pattern', ch),
|
||||||
\ nth,
|
\ nth,
|
||||||
\ ml,
|
\ ml,
|
||||||
|
|||||||
Reference in New Issue
Block a user