#653 - Jump to the position which Vim does not jump to for moving from quickfix/loclist items to other buffers
This commit is contained in:
@@ -21,8 +21,14 @@ Before:
|
||||
let l:header = split(l:line)[1]
|
||||
let l:header = get(l:event_name_corrections, l:header, l:header)
|
||||
elseif !empty(l:header)
|
||||
call add(l:matches, join(split(l:header . l:line)))
|
||||
let l:header = ''
|
||||
" There's an extra line for buffer events, and we should only look
|
||||
" for the one matching the current buffer.
|
||||
if l:line =~# '<buffer=' . bufnr('') . '>'
|
||||
let l:header .= ' <buffer>'
|
||||
else
|
||||
call add(l:matches, join(split(l:header . l:line)))
|
||||
let l:header = ''
|
||||
endif
|
||||
endif
|
||||
endfor
|
||||
|
||||
@@ -54,6 +60,11 @@ After:
|
||||
|
||||
call ALEInitAuGroups()
|
||||
|
||||
" Clean up the quickfix group.
|
||||
augroup ALEQuickfixCursorMovedEvent
|
||||
autocmd! * <buffer>
|
||||
augroup END
|
||||
|
||||
Execute (g:ale_lint_on_text_changed = 0 should bind no events):
|
||||
let g:ale_lint_on_text_changed = 0
|
||||
|
||||
@@ -211,3 +222,12 @@ Execute(Disabling completion should remove autocmd events correctly):
|
||||
|
||||
AssertEqual [], CheckAutocmd('ALECompletionGroup')
|
||||
AssertEqual 0, g:ale_completion_enabled
|
||||
|
||||
Execute(The cursor events should be set up for the quickfix list):
|
||||
runtime! ftplugin/qf.vim
|
||||
|
||||
AssertEqual
|
||||
\ [
|
||||
\ 'CursorMoved <buffer> call ale#events#ParseLoclistWindowItemPosition()',
|
||||
\ ],
|
||||
\ CheckAutocmd('ALEQuickfixCursorMovedEvent')
|
||||
|
||||
Reference in New Issue
Block a user