Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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
  • Loading branch information...
commit 77f9da174a49316db27884b7c15d0492ee09d67c 1 parent ea8cea8
@xolox authored
View
8 autoload/xolox/luainspect.vim
@@ -1,9 +1,9 @@
" Vim script.
" Author: Peter Odding <peter@peterodding.com>
-" Last Change: May 25, 2013
+" Last Change: May 27, 2013
" URL: http://peterodding.com/code/vim/lua-inspect/
-let g:xolox#luainspect#version = '0.4.26'
+let g:xolox#luainspect#version = '0.4.27'
function! xolox#luainspect#toggle_cmd() " {{{1
if !(exists('b:luainspect_disabled') && b:luainspect_disabled)
@@ -22,7 +22,7 @@ function! xolox#luainspect#auto_enable() " {{{1
" Define buffer local mappings for rename / goto definition features.
inoremap <buffer> <silent> <F2> <C-o>:call xolox#luainspect#make_request('rename')<CR>
nnoremap <buffer> <silent> <F2> :call xolox#luainspect#make_request('rename')<CR>
- nnoremap <buffer> <silent> gd :call xolox#luainspect#make_request('goto')<CR>
+ nnoremap <buffer> <silent> gd :call xolox#luainspect#make_request('go_to')<CR>
" Enable balloon evaluation / dynamic tool tips.
if has('balloon_eval')
setlocal ballooneval balloonexpr=LuaInspectToolTip()
@@ -94,7 +94,7 @@ function! xolox#luainspect#make_request(action) " {{{1
call s:clear_previous_matches()
call s:highlight_variables()
call xolox#misc#timer#stop("luainspect.vim %s: Highlighted variables in %s in %s.", g:xolox#luainspect#version, friendlyname, starttime)
- elseif response == 'goto'
+ elseif response == 'go_to'
if len(b:luainspect_output) < 3
call xolox#misc#msg#warn("luainspect.vim %s: No variable under cursor!", g:xolox#luainspect#version)
else
View
4 misc/luainspect/luainspect4vim.lua
@@ -3,7 +3,7 @@
This module is part of the luainspect.vim plug-in for the Vim text editor.
Author: Peter Odding <peter@peterodding.com>
- Last Change: August 21, 2010
+ Last Change: May 27, 2013
URL: http://peterodding.com/code/vim/lua-inspect/
License: MIT
@@ -152,7 +152,7 @@ function actions.tooltip(tokenlist, line, column, src) -- {{{1
end
end
-function actions.goto(tokenlist, line, column) -- {{{1
+function actions.go_to(tokenlist, line, column) -- {{{1
-- FIXME This only jumps to declaration of local / 1st occurrence of global.
local curvar = getcurvar(tokenlist, line, column)
for i, token in ipairs(tokenlist) do
Please sign in to comment.
Something went wrong with that request. Please try again.