diff options
-rw-r--r-- | script/core/hover/name.lua | 8 | ||||
-rw-r--r-- | test/hover/init.lua | 8 |
2 files changed, 13 insertions, 3 deletions
diff --git a/script/core/hover/name.lua b/script/core/hover/name.lua index 9ad32e09..0e1eefaf 100644 --- a/script/core/hover/name.lua +++ b/script/core/hover/name.lua @@ -65,11 +65,13 @@ function buildName(source, oop) oop = source.type == 'setmethod' or source.type == 'getmethod' end - if source.type == 'local' - or source.type == 'getlocal' - or source.type == 'setlocal' then + if source.type == 'local' then return asLocal(source) or '' end + if source.type == 'getlocal' + or source.type == 'setlocal' then + return asLocal(source.node) or '' + end if source.type == 'setglobal' or source.type == 'getglobal' then return asGlobal(source) or '' diff --git a/test/hover/init.lua b/test/hover/init.lua index 839c9311..a738aab6 100644 --- a/test/hover/init.lua +++ b/test/hover/init.lua @@ -857,6 +857,14 @@ local x <close>: integer = 1 ]] TEST [[ +local x <close> = 1 +print(<?x?>) +]] +[[ +local x <close>: integer = 1 +]] + +TEST [[ local function <?a?>(b) return (b.c and a(b.c) or b) end |