diff options
author | 2020-08-04 11:07:11 -0400 | |
---|---|---|
committer | 2020-08-04 11:07:11 -0400 | |
commit | 0c20e9b24b939ba0abf0a566c6636d05f9a2a250 (patch) | |
tree | 523dab9829fcd8ac4b8d26cf381758fd8dbf4278 /modules | |
parent | 1879c46e8a5f5d17231ea5346df719261d346a05 (diff) |
Set `buffer.auto_c_order` prior to `buffer:auto_c_show()`.
This is good practice.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/textadept/command_entry.lua | 1 | ||||
-rw-r--r-- | modules/textadept/snippets.lua | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/modules/textadept/command_entry.lua b/modules/textadept/command_entry.lua index b1227c27..b335774c 100644 --- a/modules/textadept/command_entry.lua +++ b/modules/textadept/command_entry.lua @@ -160,6 +160,7 @@ local function complete_lua() end end table.sort(cmpls) + M.auto_c_order = buffer.ORDER_PRESORTED M:auto_c_show(#part - 1, table.concat(cmpls, string.char(M.auto_c_separator))) end diff --git a/modules/textadept/snippets.lua b/modules/textadept/snippets.lua index 73f46bde..a59884d8 100644 --- a/modules/textadept/snippets.lua +++ b/modules/textadept/snippets.lua @@ -440,6 +440,7 @@ snippet_mt = { if ph.choice then local sep = buffer.auto_c_separator buffer.auto_c_separator = string.byte(',') + buffer.auto_c_order = buffer.ORDER_CUSTOM buffer:auto_c_show(0, ph.choice) buffer.auto_c_separator = sep -- restore end |