Add g:gitgutter_use_location_list option

This commit is contained in:
Richard Robbins
2019-11-16 11:36:58 -08:00
committed by Andy Stewart
parent b97acf2c8a
commit d36686e6a5
3 changed files with 16 additions and 2 deletions

View File

@@ -207,5 +207,9 @@ function! gitgutter#quickfix()
let lnum = 0 let lnum = 0
endif endif
endfor endfor
call setqflist(locations) if !g:gitgutter_use_location_list
call setqflist(locations)
else
call setloclist(0, locations)
endif
endfunction endfunction

View File

@@ -140,7 +140,9 @@ Commands for jumping between hunks:~
*gitgutter-:GitGutterQuickFix* *gitgutter-:GitGutterQuickFix*
:GitGutterQuickFix Load all hunks into the |quickfix| list. Note this :GitGutterQuickFix Load all hunks into the |quickfix| list. Note this
ignores any unsaved changes in your buffers. ignores any unsaved changes in your buffers. The
|g:gitgutter_use_location_list| option can be set to
populate the location list of the current window instead
Commands for operating on a hunk:~ Commands for operating on a hunk:~
@@ -294,6 +296,7 @@ General:~
|g:gitgutter_map_keys| |g:gitgutter_map_keys|
|g:gitgutter_async| |g:gitgutter_async|
|g:gitgutter_log| |g:gitgutter_log|
|g:gitgutter_use_location_list|
*g:gitgutter_preview_win_location* *g:gitgutter_preview_win_location*
@@ -487,6 +490,12 @@ Default: 0
When switched on, the plugin logs to gitgutter.log in the directory where it is When switched on, the plugin logs to gitgutter.log in the directory where it is
installed. Additionally it logs channel activity to channel.log. installed. Additionally it logs channel activity to channel.log.
*g:gitgutter_use_location_list*
Default: 0
When switched on, the :GitGutterQuickFix command populates the location list
of the current window instead of the global quickfix list.
=============================================================================== ===============================================================================
HIGHLIGHTS *gitgutter-highlights* HIGHLIGHTS *gitgutter-highlights*

View File

@@ -61,6 +61,7 @@ call s:set('g:gitgutter_map_keys', 1)
call s:set('g:gitgutter_terminal_reports_focus', 1) call s:set('g:gitgutter_terminal_reports_focus', 1)
call s:set('g:gitgutter_async', 1) call s:set('g:gitgutter_async', 1)
call s:set('g:gitgutter_log', 0) call s:set('g:gitgutter_log', 0)
call s:set('g:gitgutter_use_location_list', 0)
call s:set('g:gitgutter_git_executable', 'git') call s:set('g:gitgutter_git_executable', 'git')
if !executable(g:gitgutter_git_executable) if !executable(g:gitgutter_git_executable)