class Reline::LineEditor
def complete_internal_proc(list, is_menu)
def complete_internal_proc(list, is_menu) ing, target, postposing = retrieve_completion_block list.select { |i| and not Encoding.compatible?(target.encoding, i.encoding) ise Encoding::CompatibilityError, "#{target.encoding.name} is not compatible with #{i.encoding.name}" config.completion_ignore_case .downcase&.start_with?(target.downcase) .start_with?(target) menu (target, list) rn nil ted = list.inject { |memo, item| n mo_mbchars = memo.unicode_normalize.grapheme_clusters em_mbchars = item.unicode_normalize.grapheme_clusters ue Encoding::CompatibilityError mo_mbchars = memo.grapheme_clusters em_mbchars = item.grapheme_clusters = [memo_mbchars.size, item_mbchars.size].min lt = '' .times do |i| @config.completion_ignore_case if memo_mbchars[i].casecmp?(item_mbchars[i]) result << memo_mbchars[i] else break end se if memo_mbchars[i] == item_mbchars[i] result << memo_mbchars[i] else break end d lt t, preposing, completed, postposing]