Add :GitGutterQuickFix command.

It loads all hunks into the quickfix list.

Closes #617.
This commit is contained in:
Andy Stewart
2019-08-28 11:59:19 +01:00
parent 307caf6f39
commit 88d396f1b4
5 changed files with 51 additions and 0 deletions

View File

@@ -894,3 +894,19 @@ function Test_empty_file()
set eol fixeol
endfunction
function Test_quickfix()
call setline(5, ['A', 'B'])
call setline(9, ['C', 'D'])
write
GitGutterQuickFix
let expected = [
\ {'lnum': 5, 'bufnr': bufnr(''), 'text': '-e'},
\ {'lnum': 9, 'bufnr': bufnr(''), 'text': '-i'}
\ ]
call s:assert_list_of_dicts(expected, getqflist())
endfunction