Fix #314 - quickfix should take precedence over loclist for jumping

This commit is contained in:
w0rp
2017-02-21 12:51:49 +00:00
parent c310080359
commit 6a02c5812c
2 changed files with 15 additions and 3 deletions

View File

@@ -72,3 +72,15 @@ Execute(An empty List should be returned when both lists are turned off):
call setloclist(winnr(), [{'lnum': 1, 'col': 1, 'text': 'foo', 'bufnr': bufnr('%')}])
AssertEqual [], GetList()
Execute(quickfix should take precedence over loclist when on):
let g:ale_set_quickfix = 1
call setloclist(winnr(), [
\ {'lnum': 1, 'col': 1, 'text': 'ignore this', 'bufnr': g:buffer}
\])
call setqflist([
\ {'lnum': 1, 'col': 1, 'text': 'foo', 'bufnr': g:buffer},
\])
AssertEqual [{'lnum': 1, 'col': 1, 'text': 'foo'}], GetList()