Skip to content

Commit

Permalink
Prevent selecting GitGutter when its loaded but not enabled
Browse files Browse the repository at this point in the history
When the following configuration:
  mistflyWithGitsignsStatus
  mistflyWithGitGutterStatus
  mistflyWithSignifyStatus
was replaced with:
  mistflyWithGitStatus
control was lost over selection of the Git status plugin.

That selecting ability was useful when a vim configuration has multiple
Git status plugins loaded with only one enabled.

This commit allows GitGutter to be loaded but not enabled, and Signify
to be selected (if loaded and enabled).
  • Loading branch information
bobbleclank committed Jan 27, 2023
1 parent 2525774 commit 7d7c910
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion autoload/mistfly.vim
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ function! mistfly#PluginsStatus() abort
let l:added = get(l:counts, 'added', 0)
let l:changed = get(l:counts, 'changed', 0)
let l:removed = get(l:counts, 'removed', 0)
elseif g:mistflyWithGitStatus && exists('g:loaded_gitgutter')
elseif g:mistflyWithGitStatus && exists('g:loaded_gitgutter') && get(g:, 'gitgutter_enabled')
" GitGutter status.
let [l:added, l:changed, l:removed] = GitGutterGetHunkSummary()
elseif g:mistflyWithGitStatus && exists('g:loaded_signify') && sy#buffer_is_active()
Expand Down

0 comments on commit 7d7c910

Please sign in to comment.