From 46c743a247a8e967ebbbfdb907774dd7ae5fa4f2 Mon Sep 17 00:00:00 2001 From: Reed Riley Date: Wed, 24 Apr 2019 09:54:42 -0400 Subject: 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. --- autoload/ale/definition.vim | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'autoload') 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('') 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 -- cgit v1.2.3