From 1bdf100aada40d761210ba46a72492134751c888 Mon Sep 17 00:00:00 2001 From: Marco Hinz Date: Tue, 18 Jul 2017 16:40:29 +0200 Subject: [PATCH] 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. --- autoload/sy/sign.vim | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/autoload/sy/sign.vim b/autoload/sy/sign.vim index c4b1031..23ccdbe 100644 --- a/autoload/sy/sign.vim +++ b/autoload/sy/sign.vim @@ -4,12 +4,12 @@ scriptencoding utf-8 " Init: values {{{1 if get(g:, 'signify_sign_show_text', 1) - let s:sign_delete = get(g:, 'signify_sign_delete', '_') - let s:sign_show_count = get(g:, 'signify_sign_show_count', 1) + let s:sign_delete = get(g:, 'signify_sign_delete', '_') else - let s:sign_delete = ' ' - let s:sign_show_count = 0 + let s:sign_delete = ' ' endif + +let s:sign_show_count = get(g:, 'signify_sign_show_count', 1) let s:delete_highlight = ['', 'SignifyLineDelete'] " Function: #id_next {{{1