With the previous commit, this sorts completions with the same score alphabetically.
Unified · Split
| @@ -1644,6 +1644,7 @@ complete = function () · 1643 unmodified lines | ||
| 1644 | 1644 | completion_buffer = {} |
| 1645 | 1645 | selected_completion_index = 0 |
| 1646 | 1646 | completions = completions or {} |
| 1647 | + table.sort(completions) | |
| 1647 | 1648 | completion_pos = completion_pos or 1 |
| 1648 | 1649 | for i, match in ipairs(fuzzy_find(before_cur:sub(completion_pos), |
| 1649 | 1650 | completions, opts.case_sensitive)) do |
| @@ -1932,6 +1933,7 @@ mp.register_script_message('complete', function(list, start_pos) · 282 unmodified lines | ||
| 1932 | 1933 | completion_buffer = {} |
| 1933 | 1934 | selected_completion_index = 0 |
| 1934 | 1935 | local completions = utils.parse_json(list) |
| 1936 | + table.sort(completions) | |
| 1935 | 1937 | completion_pos = start_pos |
| 1936 | 1938 | completion_append = '' |
| 1937 | 1939 | for i, match in ipairs(fuzzy_find(line:sub(completion_pos, cursor), |