aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormitchell <70453897+667e-11@users.noreply.github.com>2011-09-08 16:50:38 -0400
committermitchell <70453897+667e-11@users.noreply.github.com>2011-09-08 16:50:38 -0400
commit770164f95c2081b7c02f8d8934469f11da331ea7 (patch)
treec1d26a2c58e559af86b6e6bedfbf1226278a59fa
parenteb4d74fcfa7830336945fcfcd0c3547a092cbe9d (diff)
downloadtextadept-770164f95c2081b7c02f8d8934469f11da331ea7.tar.gz
textadept-770164f95c2081b7c02f8d8934469f11da331ea7.zip
Fix bug with CALL_TIP_CLICK event disconnect; modules/textadept/adeptsense.lua
-rw-r--r--modules/textadept/adeptsense.lua9
1 files changed, 5 insertions, 4 deletions
diff --git a/modules/textadept/adeptsense.lua b/modules/textadept/adeptsense.lua
index 408b3069..f54c3064 100644
--- a/modules/textadept/adeptsense.lua
+++ b/modules/textadept/adeptsense.lua
@@ -622,7 +622,8 @@ function show_apidoc(sense)
buffer:call_tip_show(buffer.current_pos, apidocs[apidocs.pos])
end)
timeout(1, function()
- if pcall(buffer.call_tip_active, buffer) then return true end
+ local ok, active = pcall(buffer.call_tip_active, buffer)
+ if ok and active then return true end
events.disconnect(events.CALL_TIP_CLICK, event_id)
end)
return true
@@ -785,12 +786,12 @@ function handle_clear(sense) end
function new(lang)
local sense = senses[lang]
if sense then
- sense.ctags_kinds = {}
- sense.api_files = {}
+ sense.ctags_kinds = nil
+ sense.api_files = nil
for _, i in ipairs(sense.events) do
events.disconnect(events.CHAR_ADDED, i)
end
- sense.events = {}
+ sense.events = nil
sense:clear()
end