summaryrefslogtreecommitdiff
path: root/autoload
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2017-08-12 14:49:02 +0100
committerw0rp <devw0rp@gmail.com>2017-08-12 14:49:02 +0100
commite6b614673144ed5d39a7a8d989b3904a45af1199 (patch)
tree33e39d1bcd0a0f5815adb5d200ace552d6367f1e /autoload
parentb300b0646d43975bc15c99d5e656951b1170fb6a (diff)
downloadale-e6b614673144ed5d39a7a8d989b3904a45af1199.zip
#653 - Fix loclist jumping so it works with buffer numbers
Diffstat (limited to 'autoload')
-rw-r--r--autoload/ale/loclist_jumping.vim3
1 files changed, 2 insertions, 1 deletions
diff --git a/autoload/ale/loclist_jumping.vim b/autoload/ale/loclist_jumping.vim
index f967e2b0..8a6b0b24 100644
--- a/autoload/ale/loclist_jumping.vim
+++ b/autoload/ale/loclist_jumping.vim
@@ -14,7 +14,7 @@ function! ale#loclist_jumping#FindNearest(direction, wrap) abort
let l:info = get(g:ale_buffer_info, bufnr('%'), {'loclist': []})
" This list will have already been sorted.
let l:loclist = l:info.loclist
- let l:search_item = {'lnum': l:pos[1], 'col': l:pos[2]}
+ let l:search_item = {'bufnr': bufnr(''), 'lnum': l:pos[1], 'col': l:pos[2]}
" When searching backwards, so we can find the next smallest match.
if a:direction is# 'before'
@@ -30,6 +30,7 @@ function! ale#loclist_jumping#FindNearest(direction, wrap) abort
" cursor to a line without changing the column, in some cases.
let l:cmp_value = ale#util#LocItemCompare(
\ {
+ \ 'bufnr': bufnr(''),
\ 'lnum': l:item.lnum,
\ 'col': min([max([l:item.col, 1]), len(getline(l:item.lnum))]),
\ },