Do not make option defaults depend on each other
Having default values for options that depend on another option's value is a bad practice. Be more explicit: g:signify_sign_show_text is ON by default g:signify_sign_show_count is ON by default So, people who want just background colors and no text at all in their signs have to set both: let g:signify_sign_show_text = 0 let g:signify_sign_show_count = 0 Before this change, only the first line was needed. This also fixes a bug that happened with: let g:signify_sign_show_text = 0 let g:signify_sign_show_count = 1 Removed lines wouldn't show a count whereas changed + removed lines would.
This commit is contained in:
parent
d9918a69bc
commit
1bdf100aad
@ -4,12 +4,12 @@ scriptencoding utf-8
|
|||||||
|
|
||||||
" Init: values {{{1
|
" Init: values {{{1
|
||||||
if get(g:, 'signify_sign_show_text', 1)
|
if get(g:, 'signify_sign_show_text', 1)
|
||||||
let s:sign_delete = get(g:, 'signify_sign_delete', '_')
|
let s:sign_delete = get(g:, 'signify_sign_delete', '_')
|
||||||
let s:sign_show_count = get(g:, 'signify_sign_show_count', 1)
|
|
||||||
else
|
else
|
||||||
let s:sign_delete = ' '
|
let s:sign_delete = ' '
|
||||||
let s:sign_show_count = 0
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
let s:sign_show_count = get(g:, 'signify_sign_show_count', 1)
|
||||||
let s:delete_highlight = ['', 'SignifyLineDelete']
|
let s:delete_highlight = ['', 'SignifyLineDelete']
|
||||||
|
|
||||||
" Function: #id_next {{{1
|
" Function: #id_next {{{1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user