From a0e14a2f9e18e324f94b6577f5bae2990b882a9d Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Tue, 26 May 2020 17:13:57 -0400 Subject: Fixed undocumented regression with word completion and case sensitivity. This feature was inadvertently removed during a refactor. --- modules/textadept/editing.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'modules/textadept/editing.lua') diff --git a/modules/textadept/editing.lua b/modules/textadept/editing.lua index c4339d63..d0331965 100644 --- a/modules/textadept/editing.lua +++ b/modules/textadept/editing.lua @@ -647,6 +647,7 @@ end -- Returns for the word part behind the caret a list of whole word completions -- constructed from the current buffer or all open buffers (depending on -- `M.autocomplete_all_words`). +-- If `buffer.auto_c_ignore_case` is `true`, completions are not case-sensitive. -- @see buffer.word_chars -- @see autocomplete M.autocompleters.word = function() @@ -656,7 +657,8 @@ M.autocompleters.word = function() local word_part = buffer:text_range(s, buffer.current_pos) for _, buffer in ipairs(_BUFFERS) do if buffer == _G.buffer or M.autocomplete_all_words then - buffer.search_flags = buffer.FIND_WORDSTART + buffer.FIND_MATCHCASE + buffer.search_flags = buffer.FIND_WORDSTART | + (not buffer.auto_c_ignore_case and buffer.FIND_MATCHCASE or 0) buffer:target_whole_document() while buffer:search_in_target(word_part) ~= -1 do local e = buffer:word_end_position(buffer.target_end, true) -- cgit v1.2.3