fix to process unmatched tokens in right-justficiation mode

This commit is contained in:
Junegunn Choi
2013-05-06 00:28:31 +09:00
parent 078e8b08fd
commit 8591c888bf
3 changed files with 4 additions and 3 deletions

View File

@@ -97,7 +97,7 @@ let g:easy_align_delimiters = {
Handling unmatched lines Handling unmatched lines
------------------------ ------------------------
EasyAlign by default ignores lines without the matching delimiters. EasyAlign by default ignores lines without the matching delimiters (except in right-justification mode).
This is to ignore interleaved comments commonly found in code. This is to ignore interleaved comments commonly found in code.
For example, when aligning the following code block, For example, when aligning the following code block,

View File

@@ -47,7 +47,7 @@ function! s:do_align(just, fl, ll, fc, lc, pattern, nth, ml, mr, stick_to_left,
let suffix = join(tokens[nth + 1: -1], '') let suffix = join(tokens[nth + 1: -1], '')
if match(last, pattern.'$') == -1 if match(last, pattern.'$') == -1
if !exists("g:easy_align_ignore_unmatched") || g:easy_align_ignore_unmatched if a:just == 0 && (!exists("g:easy_align_ignore_unmatched") || g:easy_align_ignore_unmatched)
continue continue
else else
let delim = '' let delim = ''

View File

@@ -79,7 +79,8 @@ Defining custom alignment rules *g:easy_align_delimiters*
Handling unmatched lines *g:easy_align_ignore_unmatched* Handling unmatched lines *g:easy_align_ignore_unmatched*
------------------------------------------------------------------------- -------------------------------------------------------------------------
EasyAlign by default ignores lines without the matching delimiters. EasyAlign by default ignores lines without the matching delimiters
(except in right-justification mode).
This is to ignore interleaved comments commonly found in code. This is to ignore interleaved comments commonly found in code.
For example, when aligning the following code, For example, when aligning the following code,