aboutsummaryrefslogtreecommitdiff
path: root/core/handlers.lua
diff options
context:
space:
mode:
authormitchell <70453897+667e-11@users.noreply.github.com>2007-08-09 03:49:44 -0400
committermitchell <70453897+667e-11@users.noreply.github.com>2007-08-09 03:49:44 -0400
commit91407194760539859d5f3a88d142c4f893c111d3 (patch)
tree171e001200ef7cab90f956b4af2686255d7cea1e /core/handlers.lua
parentb708fa97b490c351f237d22397b8b562d7fb9950 (diff)
downloadtextadept-91407194760539859d5f3a88d142c4f893c111d3.tar.gz
textadept-91407194760539859d5f3a88d142c4f893c111d3.zip
Improved completion of buffer functions and properties; core/handlers.lua
Each buffer function or property is matched to prefix before being added to the completion list.
Diffstat (limited to 'core/handlers.lua')
-rw-r--r--core/handlers.lua8
1 files changed, 6 insertions, 2 deletions
diff --git a/core/handlers.lua b/core/handlers.lua
index 5d7433d6..ec916fce 100644
--- a/core/handlers.lua
+++ b/core/handlers.lua
@@ -317,9 +317,13 @@ function show_completions(command)
end
if path == 'buffer' then
if o == ':' then
- for f in pairs(textadept.buffer_functions) do cmpls[#cmpls + 1] = f end
+ for f in pairs(textadept.buffer_functions) do
+ if f:match('^'..prefix) then cmpls[#cmpls + 1] = f end
+ end
else
- for p in pairs(textadept.buffer_properties) do cmpls[#cmpls + 1] = p end
+ for p in pairs(textadept.buffer_properties) do
+ if p:match('^'..prefix) then cmpls[#cmpls + 1] = p end
+ end
end
end
table.sort(cmpls)