Add g:gitgutter_preview_win_location option

This commit is contained in:
homestar
2019-05-11 23:07:59 -05:00
committed by Andy Stewart
parent c75c83df53
commit 8985017094
3 changed files with 8 additions and 1 deletions

View File

@@ -255,7 +255,7 @@ function! s:preview(hunk_diff)
silent! wincmd P
if !&previewwindow
noautocmd execute 'bo' previewheight 'new'
noautocmd execute g:gitgutter_preview_win_location previewheight 'new'
set previewwindow
else
execute 'resize' previewheight

View File

@@ -270,6 +270,12 @@ General:~
|g:gitgutter_log|
*g:gitgutter_preview_win_location*
Default: 'bo'
This option determines where the preview window pops up as a result of the
:GitGutterPreviewHunk command. Other plausible values are 'to', 'bel', 'abo'.
*g:gitgutter_git_executable*
Default: 'git'

View File

@@ -22,6 +22,7 @@ function! s:set(var, default) abort
endif
endfunction
call s:set('g:gitgutter_preview_win_location', 'bo')
call s:set('g:gitgutter_enabled', 1)
call s:set('g:gitgutter_max_signs', 500)
call s:set('g:gitgutter_signs', 1)