diff options
| author | ryanss | 2015-02-08 19:30:12 -0500 |
|---|---|---|
| committer | ryanss | 2015-02-08 19:30:12 -0500 |
| commit | fb1416bb7a3ce41c971be0f5c4bd8929ec3897e6 (patch) | |
| tree | 7bc7857151f12cab97a91d2c79d486d7dc9b0a6a /syntax/hackernews.vim | |
| parent | 592caca496dda90ab5366cbec8d9d8704ee43c6e (diff) | |
| download | vim-hn-fb1416bb7a3ce41c971be0f5c4bd8929ec3897e6.tar.gz | |
Fix #15 Error setting ctermfg=bg when ctermbg=NONE
Diffstat (limited to 'syntax/hackernews.vim')
| -rw-r--r-- | syntax/hackernews.vim | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/syntax/hackernews.vim b/syntax/hackernews.vim index bc249a2..a21d68b 100644 --- a/syntax/hackernews.vim +++ b/syntax/hackernews.vim @@ -18,11 +18,16 @@ syn match Ignore /\s\[[0-9]\{3,}\]$/ " Make sure `Ignore` highlight group is hidden " Some colorschemes do not hide the `Ignore` group (ex. Solarized) -if has('gui_running') - highlight Ignore guifg=bg -else - highlight Ignore ctermfg=bg -endif +" An exception will be raised here if ctermfg=NONE which is sometimes set +" when using a transparent terminal so we wrap these commands in try/catch +try + if has('gui_running') + highlight Ignore guifg=bg + else + highlight Ignore ctermfg=bg + endif +catch +endtry " Remove emphesis from all components of main page item except title syn match Comment /^\s*[0-9]\{1,2}\.\s/ |
