Skip to content

Commit b4ac913

Browse files
committed
Fix lint warnings: use abort operator for functions in autoload
1 parent c697c76 commit b4ac913

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

autoload/pandoc/syntax/color.vim

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"
1010
" color conversion algorithms adapted from http://www.cs.rit.edu/~ncs/color/t_convert.html
1111

12-
function! s:RGB2HSV(r, g, b) "{{{2
12+
function! s:RGB2HSV(r, g, b) abort "{{{2
1313
let rp = a:r/255.0
1414
let gp = a:g/255.0
1515
let bp = a:b/255.0
@@ -37,7 +37,7 @@ function! s:RGB2HSV(r, g, b) "{{{2
3737
return [h, s, v]
3838
endfunction
3939

40-
function! s:HSV2RGB(h, s, v) "{{{2
40+
function! s:HSV2RGB(h, s, v) abort "{{{2
4141
if a:s == 0 "achromatic
4242
return [a:v, a:v, a:v]
4343
endif
@@ -76,15 +76,15 @@ function! s:HSV2RGB(h, s, v) "{{{2
7676
return [float2nr(r*255), float2nr(g*255), float2nr(b*255)]
7777
endfunction
7878

79-
function! s:Hex2RGB(hex) "{{{2
79+
function! s:Hex2RGB(hex) abort "{{{2
8080
let hex = split(a:hex, '\zs')
8181
let h_r = '0x'.join(hex[:1], '')
8282
let h_g = '0x'.join(hex[2:3], '')
8383
let h_b = '0x'.join(hex[4:6], '')
8484
return map([h_r, h_g, h_b], 'eval(v:val)')
8585
endfunction
8686

87-
function! s:RGB2Hex(r, g, b) "{{{2
87+
function! s:RGB2Hex(r, g, b) abort "{{{2
8888
let h_r = printf('%02x', a:r)
8989
let h_g = printf('%02x', a:g)
9090
let h_b = printf('%02x', a:b)
@@ -93,7 +93,7 @@ endfunction
9393

9494
" Instrospection: {{{1
9595

96-
function! pandoc#syntax#color#Instrospect(group)
96+
function! pandoc#syntax#color#Instrospect(group) abort
9797
redir => hi_output
9898
exe 'silent hi '. a:group
9999
redir END
@@ -114,7 +114,7 @@ endfunction
114114

115115
" Palette: {{{1
116116

117-
function! pandoc#syntax#color#SaturationPalette(hex, partitions)
117+
function! pandoc#syntax#color#SaturationPalette(hex, partitions) abort
118118
let rgb = s:Hex2RGB(a:hex)
119119
let hsv = s:RGB2HSV(rgb[0], rgb[1], rgb[2])
120120
let hsv_palette = []

0 commit comments

Comments
 (0)