summaryrefslogtreecommitdiffstats
path: root/autoload/csv.vim
diff options
context:
space:
mode:
Diffstat (limited to 'autoload/csv.vim')
-rw-r--r--autoload/csv.vim6
1 files changed, 5 insertions, 1 deletions
diff --git a/autoload/csv.vim b/autoload/csv.vim
index 1fbf7c2a..5d63a24d 100644
--- a/autoload/csv.vim
+++ b/autoload/csv.vim
@@ -635,8 +635,12 @@ fu! csv#ArrangeCol(first, last, bang, limit, ...) range "{{{3
return
endif
let cur=winsaveview()
+ " be sure, that b:col_width is actually valid
+ if exists("b:col_width") && eval(join(b:col_width, '+')) == 0
+ unlet! b:col_width
+ endif
" Force recalculation of Column width
- let row = exists("a:1") ? a:1 : line('$')
+ let row = exists("a:1") && !empty(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