This commit is contained in:
Adam Stankiewicz
2019-12-31 14:05:09 +01:00
parent cea0d08a06
commit b8a5504021
29 changed files with 529 additions and 153 deletions

View File

@@ -122,7 +122,7 @@ fu! csv#Init(start, end, ...) "{{{3
" Enable vartabs for tab delimited files
if b:delimiter=="\t" && has("vartabs")&& !exists("b:csv_fixed_width_cols")
if get(b:, 'col_width', []) ==# []
call csv#CalculateColumnWidth(line('$'))
call csv#CalculateColumnWidth(line('$'), 1)
endif
let &l:vts=join(b:col_width, ',')
let g:csv_no_conceal=1
@@ -636,7 +636,7 @@ fu! csv#ArrangeCol(first, last, bang, limit, ...) range "{{{3
endif
let cur=winsaveview()
" Force recalculation of Column width
let row = exists("a:1") ? a:1 : ''
let row = exists("a:1") ? a:1 : line('$')
if a:bang || !empty(row)
if a:bang && exists("b:col_width")
" Unarrange, so that if csv_arrange_align has changed
@@ -670,7 +670,7 @@ fu! csv#ArrangeCol(first, last, bang, limit, ...) range "{{{3
endif
if !exists("b:col_width")
call csv#CalculateColumnWidth(row)
call csv#CalculateColumnWidth(row, 1)
endif
" abort on empty file