aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--modules/textadept/snippets.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/textadept/snippets.lua b/modules/textadept/snippets.lua
index f7239ef3..c7ff417a 100644
--- a/modules/textadept/snippets.lua
+++ b/modules/textadept/snippets.lua
@@ -551,7 +551,8 @@ M._snippet_mt = {
end
local id = buffer:indicator_value_at(M.INDIC_PLACEHOLDER, s)
local ph = snapshot.placeholders[id]
- if (not index or ph.index == index) and (not type or ph[type]) then
+ if ph and (not index or ph.index == index) and
+ (not type or ph[type]) then
return s, ph
end
s = buffer:indicator_end(M.INDIC_PLACEHOLDER, i)