mirror of
https://github.com/dhruvasagar/vim-table-mode.git
synced 2025-11-08 11:03:47 -05:00
Fixed header creation as first line of table
This commit is contained in:
@@ -168,6 +168,8 @@ function! tablemode#align#Align(lines) "{{{2
|
|||||||
|
|
||||||
if len(tline) <= 1 | continue | endif
|
if len(tline) <= 1 | continue | endif
|
||||||
for jdx in range(len(tline))
|
for jdx in range(len(tline))
|
||||||
|
" Dealing with the header being the first line
|
||||||
|
if jdx >= len(alignments) | call add(alignments, 'l') | endif
|
||||||
let field = s:Padding(tline[jdx], maxes[jdx], alignments[jdx])
|
let field = s:Padding(tline[jdx], maxes[jdx], alignments[jdx])
|
||||||
let tline[jdx] = field . (jdx == 0 || jdx == len(tline) ? '' : ' ')
|
let tline[jdx] = field . (jdx == 0 || jdx == len(tline) ? '' : ' ')
|
||||||
endfor
|
endfor
|
||||||
|
|||||||
Reference in New Issue
Block a user