small fix in s:get_aligned_rows()
This commit is contained in:
parent
cd25233cc8
commit
4d1bb91dbe
@ -263,6 +263,7 @@ function! s:get_aligned_rows(lnum, col1, col2) "{{{
|
||||
let cells = []
|
||||
let max_lens = {}
|
||||
let lrows = len(rows)
|
||||
let check_all = 1
|
||||
if lrows == depth + 1
|
||||
let i = 1
|
||||
for [lnum, row] in rows
|
||||
@ -271,7 +272,9 @@ function! s:get_aligned_rows(lnum, col1, col2) "{{{
|
||||
endfor
|
||||
let max_lens = s:get_cell_max_lens(a:lnum, cells, startlnum, rows)
|
||||
let fst_lens = s:get_cell_max_lens(a:lnum, cells, startlnum, rows[0:0])
|
||||
if max_lens != fst_lens
|
||||
let check_all = max_lens != fst_lens
|
||||
endif
|
||||
if check_all
|
||||
" all the table must be re-formatted
|
||||
let rows = s:get_rows(a:lnum)
|
||||
let startlnum = rows[0][0]
|
||||
@ -281,7 +284,6 @@ function! s:get_aligned_rows(lnum, col1, col2) "{{{
|
||||
endfor
|
||||
let max_lens = s:get_cell_max_lens(a:lnum, cells, startlnum, rows)
|
||||
endif
|
||||
endif
|
||||
let result = []
|
||||
for [lnum, row] in rows
|
||||
if s:is_separator(row)
|
||||
|
Loading…
Reference in New Issue
Block a user