From c4dbfece322ffac0ed1a750a575c7fa1f948e8d1 Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Mon, 12 Aug 2013 01:34:14 +0900 Subject: [PATCH] Disallow recursive alignment in blockwise-visual mode --- autoload/easy_align.vim | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/autoload/easy_align.vim b/autoload/easy_align.vim index d7884f7..df844a4 100644 --- a/autoload/easy_align.vim +++ b/autoload/easy_align.vim @@ -478,10 +478,17 @@ function! easy_align#align(just, expr) range if type(ml) == 0 | let ml = repeat(' ', ml) | 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 call s:do_align(just, {}, {}, a:firstline, a:lastline, - \ visualmode() == '' ? min([col("'<"), col("'>")]) : 1, - \ visualmode() == '' ? max([col("'<"), col("'>")]) : 0, + \ bvisual ? min([col("'<"), col("'>")]) : 1, + \ bvisual ? max([col("'<"), col("'>")]) : 0, \ get(dict, 'pattern', ch), \ nth, \ ml,