diff --git a/DOCS/interface-changes/console-exact_match.txt b/DOCS/interface-changes/console-exact_match.txt index d979aed26c..d465d7169d 100644 --- a/DOCS/interface-changes/console-exact_match.txt +++ b/DOCS/interface-changes/console-exact_match.txt @@ -1 +1,2 @@ add `console-exact_match` script-opt +make `console-case_sensitive` only affect exact searches and change the to default to no on platforms other than Windows diff --git a/DOCS/man/console.rst b/DOCS/man/console.rst index a636b0735b..8055f5a79b 100644 --- a/DOCS/man/console.rst +++ b/DOCS/man/console.rst @@ -206,9 +206,9 @@ Configurable Options this option, prefixing queries with ``'`` enables exact matching. ``case_sensitive`` - Default: no on Windows, yes on other platforms. + Default: no - Whether autocompletion is case sensitive. Only works with ASCII characters. + Whether exact searches are case sensitive. Only works with ASCII characters. ``history_dedup`` Default: true diff --git a/player/lua/console.lua b/player/lua/console.lua index 817f51b5f8..29e82253db 100644 --- a/player/lua/console.lua +++ b/player/lua/console.lua @@ -44,7 +44,7 @@ local opts = { selected_back_color = "#FFFFFF", match_color = "#0088FF", exact_match = false, - case_sensitive = platform ~= "windows" and true or false, + case_sensitive = false, history_dedup = true, font_hw_ratio = "auto", } @@ -452,8 +452,8 @@ local function format_grid(list, width_max, rows_max) return table.concat(rows, ass_escape("\n")), row_count end -local function fuzzy_find(needle, haystacks, case_sensitive) - local result = require "mp.fzy".filter(needle, haystacks, case_sensitive) +local function fuzzy_find(needle, haystacks) + local result = require "mp.fzy".filter(needle, haystacks) table.sort(result, function (i, j) if i[3] ~= j[3] then return i[3] > j[3]