From 2a2bfa69a294fcfef0254125697c5b854dff7973 Mon Sep 17 00:00:00 2001 From: CrazyButcher Date: Thu, 29 Dec 2011 13:39:48 +0100 Subject: [PATCH] autcomplete bugfix for non-lua specs --- src/editor/autocomplete.lua | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/editor/autocomplete.lua b/src/editor/autocomplete.lua index 1002428e6a..6555431d14 100644 --- a/src/editor/autocomplete.lua +++ b/src/editor/autocomplete.lua @@ -51,7 +51,9 @@ local function addAPI(apifile,only,subapis,known) -- relative to API directory print("The API file must be located in a subdirectory of the API directory\n") return end - if ((only and ftype ~= only) or (known and not known[ftype])) then return end + if ((only and ftype ~= only) or (known and not known[ftype])) then + return + end if (subapis and not subapis[fname]) then return end local fn,err = loadfile(apifile) @@ -275,8 +277,8 @@ end do local known = {} for n,spec in pairs(ide.specs) do - if (spec.api) then - known[spec.api] = true + if (spec.apitype) then + known[spec.apitype] = true end end -- by defaul load every known api except lua