Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix issue #7

  • Loading branch information...
commit 9bb88fd899d4dc4556d047ded4518a826ac5c993 1 parent c3e2f9a
@chrisbra authored
Showing with 7 additions and 3 deletions.
  1. +1 −1  README
  2. +3 −2 autoload/Colorizer.vim
  3. +3 −0  doc/Colorizer.txt
View
2  README
@@ -212,7 +212,7 @@ third line of this document.
==============================================================================
-0.4: (unreleased) {{{1
+0.4: Mar, 23, 2012 {{{1
- |:ColorSwapFgBg| (suggested by teschmitz, in
https://github.com/chrisbra/color_highlight/issues/3, thanks!)
- make automatic color loading work (reported by wedgwood in
View
5 autoload/Colorizer.vim
@@ -941,7 +941,8 @@ function! s:DoHlGroup(clr) "{{{1
let bg = bg != 'NONE' ? s:Rgb2xterm(bg) : bg
let hi.= printf(' ctermfg=%s ctermbg=%s', fg, bg)
endif
- exe hi
+ "Don't error out for invalid colors
+ sil! exe hi
endfunction
function! s:SetMatcher(clr, pattern) "{{{1
@@ -1477,7 +1478,7 @@ function! Colorizer#DoColor(force, line1, line2) "{{{1
" #F0F
" #FFF
"call s:ColorMatchingLines()
- let cmd = printf(':sil %d,%ds/#\x\{3,6}\>/'.
+ let cmd = printf(':sil %d,%ds/#\%(\x\{3}\|\x\{6}\)\>/'.
\ '\=s:PreviewColorHex(submatch(0))/egi', a:line1, a:line2)
exe cmd
if &t_Co > 16 || has("gui_running")
View
3  doc/Colorizer.txt
@@ -212,6 +212,9 @@ third line of this document.
==============================================================================
+0.5: (unreleased) {{{1
+- Fix issue 7 (reported by teschmitz in
+ https://github.com/chrisbra/color_highlight/issues/7, thanks!)
0.4: Mar, 23, 2012 {{{1
- |:ColorSwapFgBg| (suggested by teschmitz, in
https://github.com/chrisbra/color_highlight/issues/3, thanks!)
Please sign in to comment.
Something went wrong with that request. Please try again.