From 2010892d9b0a37d739a417165406c40782f5bf60 Mon Sep 17 00:00:00 2001 From: Rafael Kitover Date: Sat, 30 Jan 2016 07:54:45 -0500 Subject: [PATCH] support -conceal in vimcat #134 Check if the value returned by synconcealed is empty because the conceal feature is not abled, and set it to [0] in this case. --- vimcat | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/vimcat b/vimcat index 3d3162e..237a002 100755 --- a/vimcat +++ b/vimcat @@ -385,6 +385,10 @@ function! AnsiHighlight(output_file) let concealed = synconcealed(lnum, cnum) + if empty(concealed) " no conceal feature + let concealed = [0] + endif + if concealed[0] !=# 1 && synIDtrans(synID(lnum, cnum, 1)) != last let last = synIDtrans(synID(lnum, cnum, 1)) let output .= s:GroupToAnsi(last)