From 1e33a4f3673ede2cfc0bea244f02fe2267905a65 Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Wed, 26 Oct 2011 23:06:14 -0400 Subject: Fixed Adeptsense autocomplete for single item; modules/textadept/adeptsense.lua --- modules/textadept/adeptsense.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'modules/textadept/adeptsense.lua') 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 -- cgit v1.2.3