summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorReed Riley <john.reed.riley@gmail.com>2019-04-24 09:54:42 -0400
committerReed Riley <john.reed.riley@gmail.com>2019-04-24 09:58:13 -0400
commit46c743a247a8e967ebbbfdb907774dd7ae5fa4f2 (patch)
tree7541de0ecaa8f736359372323984b803784ab750
parentc36f3e78e47ae3b83eba6b2ad7139ed4d8f7ed9b (diff)
downloadale-46c743a247a8e967ebbbfdb907774dd7ae5fa4f2.zip
Updated Vim version in Dockerfile and made UpdateTagStack clearer
The `settagstack` and `gettagstack` functions don't exist prior to Vim 8.1.0519. And the function definition was unclear whether it intended to grab the *old* or the *new* file/line/col.
-rw-r--r--Dockerfile2
-rw-r--r--autoload/ale/definition.vim6
2 files changed, 5 insertions, 3 deletions
diff --git a/Dockerfile b/Dockerfile
index 6111f9ba..58ab0771 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,7 +1,7 @@
FROM tweekmonster/vim-testbed:latest
RUN install_vim -tag v8.0.0027 -build \
- -tag v8.1.0204 -build \
+ -tag v8.1.0519 -build \
-tag neovim:v0.2.0 -build \
-tag neovim:v0.3.0 -build
diff --git a/autoload/ale/definition.vim b/autoload/ale/definition.vim
index 6b5dbfe0..3915cac1 100644
--- a/autoload/ale/definition.vim
+++ b/autoload/ale/definition.vim
@@ -24,10 +24,12 @@ function! ale#definition#UpdateTagStack() abort
let l:should_update_tagstack = exists('*gettagstack') && exists('*settagstack') && g:ale_update_tagstack
if l:should_update_tagstack
- let l:from = [bufnr('%'), line('.'), col('.'), 0]
+ " Grab the old location (to jump back to) and the word under the
+ " cursor (as a label for the tagstack)
+ let l:old_location = [bufnr('%'), line('.'), col('.'), 0]
let l:tagname = expand('<cword>')
let l:winid = win_getid()
- call settagstack(l:winid, {'items': [{'from': l:from, 'tagname': l:tagname}]}, 'a')
+ call settagstack(l:winid, {'items': [{'from': l:old_location, 'tagname': l:tagname}]}, 'a')
call settagstack(l:winid, {'curidx': len(gettagstack(l:winid)['items']) + 1})
endif
endfunction