From b04a2efffb909945a089d5467e55353c811d89bc Mon Sep 17 00:00:00 2001 From: Sidney Liebrand Date: Wed, 7 Apr 2021 21:34:36 +0200 Subject: [PATCH] fixes #141 csv no longer removes empty values and shifts headers --- autoload/mkdx.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoload/mkdx.vim b/autoload/mkdx.vim index cd06815..34277be 100644 --- a/autoload/mkdx.vim +++ b/autoload/mkdx.vim @@ -1652,7 +1652,7 @@ fun! mkdx#Tableize() range endfor for linec in linecount - if !empty(filter(lines[linec], {idx, val -> !empty(val)})) + if !empty(filter(copy(lines[linec]), {idx, val -> !empty(val)})) let tmp = map(range(0, len(col_idx) - 1), {idx, val -> get(lines[linec], idx, '')}) call setline(a:firstline + linec, \ ld[1:2] . join(map(tmp, {key, val -> s:util.AlignString(val, get(col_align, get(col_idx, key, ''), 'center'), col_maxlen[key])}), ld) . ld[0:1])