Skip to content

Commit 77f9da1

Browse files
committed
Make "go to definition" compatible* with Lua 5.2 (issue #2)
* Bonus points if you can guess without the diff what the incompatibility was ;-) Issue #2 on GitHub: #2
1 parent ea8cea8 commit 77f9da1

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

autoload/xolox/luainspect.vim

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
" Vim script.
22
" Author: Peter Odding <peter@peterodding.com>
3-
" Last Change: May 25, 2013
3+
" Last Change: May 27, 2013
44
" URL: http://peterodding.com/code/vim/lua-inspect/
55

6-
let g:xolox#luainspect#version = '0.4.26'
6+
let g:xolox#luainspect#version = '0.4.27'
77

88
function! xolox#luainspect#toggle_cmd() " {{{1
99
if !(exists('b:luainspect_disabled') && b:luainspect_disabled)
@@ -22,7 +22,7 @@ function! xolox#luainspect#auto_enable() " {{{1
2222
" Define buffer local mappings for rename / goto definition features.
2323
inoremap <buffer> <silent> <F2> <C-o>:call xolox#luainspect#make_request('rename')<CR>
2424
nnoremap <buffer> <silent> <F2> :call xolox#luainspect#make_request('rename')<CR>
25-
nnoremap <buffer> <silent> gd :call xolox#luainspect#make_request('goto')<CR>
25+
nnoremap <buffer> <silent> gd :call xolox#luainspect#make_request('go_to')<CR>
2626
" Enable balloon evaluation / dynamic tool tips.
2727
if has('balloon_eval')
2828
setlocal ballooneval balloonexpr=LuaInspectToolTip()
@@ -94,7 +94,7 @@ function! xolox#luainspect#make_request(action) " {{{1
9494
call s:clear_previous_matches()
9595
call s:highlight_variables()
9696
call xolox#misc#timer#stop("luainspect.vim %s: Highlighted variables in %s in %s.", g:xolox#luainspect#version, friendlyname, starttime)
97-
elseif response == 'goto'
97+
elseif response == 'go_to'
9898
if len(b:luainspect_output) < 3
9999
call xolox#misc#msg#warn("luainspect.vim %s: No variable under cursor!", g:xolox#luainspect#version)
100100
else

misc/luainspect/luainspect4vim.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
This module is part of the luainspect.vim plug-in for the Vim text editor.
44
55
Author: Peter Odding <peter@peterodding.com>
6-
Last Change: August 21, 2010
6+
Last Change: May 27, 2013
77
URL: http://peterodding.com/code/vim/lua-inspect/
88
License: MIT
99
@@ -152,7 +152,7 @@ function actions.tooltip(tokenlist, line, column, src) -- {{{1
152152
end
153153
end
154154

155-
function actions.goto(tokenlist, line, column) -- {{{1
155+
function actions.go_to(tokenlist, line, column) -- {{{1
156156
-- FIXME This only jumps to declaration of local / 1st occurrence of global.
157157
local curvar = getcurvar(tokenlist, line, column)
158158
for i, token in ipairs(tokenlist) do

0 commit comments

Comments
 (0)