Skip to content

Commit

Permalink
up fuzzy score limit to 128, #74133
Browse files Browse the repository at this point in the history
  • Loading branch information
jrieken committed Jul 25, 2019
1 parent 23d8322 commit c8e219f
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/vs/base/common/filters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ export function createMatches(score: undefined | FuzzyScore): IMatch[] {
return res;
}

const _maxLen = 53;
const _maxLen = 128;

function initTable() {
const table: number[][] = [];
Expand Down
15 changes: 15 additions & 0 deletions src/vs/base/test/common/filters.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -470,4 +470,19 @@ suite('Filters', () => {
test('List highlight filter: Not all characters from match are highlighterd #66923', () => {
assertMatches('foo', 'barbarbarbarbarbarbarbarbarbarbarbarbarbarbarbar_foo', 'barbarbarbarbarbarbarbarbarbarbarbarbarbarbarbar_^f^o^o', fuzzyScore);
});

test('Autocompletion is matched against truncated filterText to 54 characters #74133', () => {
assertMatches(
'foo',
'ffffffffffffffffffffffffffffbarbarbarbarbarbarbarbarbarbarbarbarbarbarbarbarbarbarbarbarbarbarbarbarbarbarbarbarbarbarbarbar_foo',
'ffffffffffffffffffffffffffffbarbarbarbarbarbarbarbarbarbarbarbarbarbarbarbarbarbarbarbarbarbarbarbarbarbarbarbarbarbarbarbar_^f^o^o',
fuzzyScore
);
assertMatches(
'foo',
'Gffffffffffffffffffffffffffffbarbarbarbarbarbarbarbarbarbarbarbarbarbarbarbarbarbarbarbarbarbarbarbarbarbarbarbarbarbarbarbar_foo',
undefined,
fuzzyScore
);
});
});

1 comment on commit c8e219f

@AzuStar
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok this has to be April Fools' joke.
The issue issue#74133 requested to make limit configurable, because some languages like LaTeX really want to push that limit to something beyond stupid like maxLen=1000

Everybody: Please make limit configurable for language. For science!
Devs: Ok, lets double limit.

Please sign in to comment.