Skip to content

Commit

Permalink
support -conceal in vimcat #134
Browse files Browse the repository at this point in the history
Check if the value returned by synconcealed is empty because the conceal
feature is not abled, and set it to [0] in this case.
  • Loading branch information
rkitover committed Jan 30, 2016
1 parent 6f85485 commit 2010892
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions vimcat
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 2010892

Please sign in to comment.