aboutsummaryrefslogtreecommitdiff
path: root/modules/textadept/adeptsense.lua
diff options
context:
space:
mode:
Diffstat (limited to 'modules/textadept/adeptsense.lua')
-rw-r--r--modules/textadept/adeptsense.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/textadept/adeptsense.lua b/modules/textadept/adeptsense.lua
index ee6fa1e9..5be70959 100644
--- a/modules/textadept/adeptsense.lua
+++ b/modules/textadept/adeptsense.lua
@@ -515,8 +515,8 @@ function complete(sense, only_fields, only_functions)
else
-- Scintilla does not emit `AUTO_C_SELECTION` in this case. This is
-- necessary for autocompletion with multiple selections.
- events.emit(events.AUTO_C_SELECTION, completions[1]:sub(#part + 1),
- buffer.current_pos)
+ local text = completions[1]:sub(#part + 1):match('^(.+)%?%d+$')
+ events.emit(events.AUTO_C_SELECTION, text, buffer.current_pos)
end
return true
end