Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Minor refactoring of omnicomplete.lua

  • Loading branch information...
commit 5bb59a235899361caf2a8d083b63e6bed885d007 1 parent 865c32f
Peter Odding authored August 27, 2011
16  misc/lua-ftplugin/omnicomplete.lua
@@ -3,7 +3,7 @@
3 3
 --[[
4 4
 
5 5
 Author: Peter Odding <peter@peterodding.com>
6  
-Last Change: June 18, 2011
  6
+Last Change: July 29, 2011
7 7
 URL: http://peterodding.com/code/vim/lua-ftplugin
8 8
 
9 9
 This Lua script is executed by the Lua file type plug-in for Vim to provide
@@ -54,14 +54,12 @@ local function dump(table, path, cache)
54 54
         else
55 55
           addmatch(path, 'v', nil)
56 56
         end
57  
-      else
58  
-        if vtype == 'table' and not cache[value] then
59  
-          cache[value] = true
60  
-          if dump(value, path, cache) then
61  
-            printed = true
62  
-          else
63  
-            addmatch(path, 'm', path .. '[]')
64  
-          end
  57
+      elseif not cache[value] then
  58
+        cache[value] = true
  59
+        if dump(value, path, cache) then
  60
+          printed = true
  61
+        else
  62
+          addmatch(path, 't', path .. '[]')
65 63
         end
66 64
       end
67 65
     end
4  plugin/lua-ftplugin.vim
... ...
@@ -1,7 +1,7 @@
1 1
 " Vim file type plug-in
2 2
 " Language: Lua 5.1
3 3
 " Author: Peter Odding <peter@peterodding.com>
4  
-" Last Change: June 18, 2011
  4
+" Last Change: August 27, 2011
5 5
 " URL: http://peterodding.com/code/vim/lua-ftplugin
6 6
 
7 7
 " Support for automatic update using the GLVS plug-in.
@@ -12,7 +12,7 @@ if &cp || exists('g:loaded_lua_ftplugin')
12 12
   finish
13 13
 endif
14 14
 
15  
-let g:lua_ftplugin_version = '0.6.17'
  15
+let g:lua_ftplugin_version = '0.6.18'
16 16
 
17 17
 " Commands to manually check for syntax errors and undefined globals.
18 18
 command! -bar LuaCheckSyntax call xolox#lua#checksyntax()

0 notes on commit 5bb59a2

Please sign in to comment.
Something went wrong with that request. Please try again.