mirror of
https://github.com/Microsoft/vscode
synced 2024-10-02 17:32:41 +00:00
parent
f1c007109d
commit
75aea74df7
|
@ -187,13 +187,6 @@ export class DefaultCompletionItemProvider implements vscode.CompletionItemProvi
|
|||
const config = getEmmetConfiguration(syntax!);
|
||||
const result = helper.doComplete(toLSTextDocument(document), position, syntax, config);
|
||||
|
||||
// https://github.com/microsoft/vscode/issues/86941
|
||||
if (result && result.items && result.items.length === 1) {
|
||||
if (result.items[0].label === 'widows: ;') {
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
|
||||
const newItems: vscode.CompletionItem[] = [];
|
||||
if (result && result.items) {
|
||||
result.items.forEach((item: any) => {
|
||||
|
|
|
@ -29,8 +29,30 @@ suite('Tests for completion in CSS embedded in HTML', () => {
|
|||
});
|
||||
|
||||
// https://github.com/microsoft/vscode/issues/86941
|
||||
test('#86941, widows should not be completed', async () => {
|
||||
await testCompletionProvider('css', `.foo { wi| }`, undefined);
|
||||
test('#86941, widows should be completed after width', async () => {
|
||||
await testCompletionProvider('css', `.foo { wi| }`, [
|
||||
{ label: 'width: ;', documentation: `width: |;` }
|
||||
]);
|
||||
await testCompletionProvider('css', `.foo { wid| }`, [
|
||||
{ label: 'width: ;', documentation: `width: |;` }
|
||||
]);
|
||||
try {
|
||||
await testCompletionProvider('css', `.foo { wi| }`, [
|
||||
{ label: 'widows: ;', documentation: `widows: |;` }
|
||||
]);
|
||||
} catch (e) {
|
||||
assert.strictEqual(e.message, "Didn't find completion item with label widows: ;");
|
||||
}
|
||||
try {
|
||||
await testCompletionProvider('css', `.foo { wid| }`, [
|
||||
{ label: 'widows: ;', documentation: `widows: |;` }
|
||||
]);
|
||||
} catch (e) {
|
||||
assert.strictEqual(e.message, "Didn't find completion item with label widows: ;");
|
||||
}
|
||||
await testCompletionProvider('css', `.foo { wido| }`, [
|
||||
{ label: 'widows: ;', documentation: `widows: |;` }
|
||||
]);
|
||||
});
|
||||
|
||||
// https://github.com/microsoft/vscode/issues/117020
|
||||
|
|
|
@ -59,9 +59,9 @@
|
|||
integrity sha512-N+0kuo9KgrUQ1Sn/ifDXsvg0TTleP7rIy4zOBGECxAljqvqfqpTfzx0Q1NUedOixRMBfe2Whhb056a42cWs26Q==
|
||||
|
||||
"@vscode/emmet-helper@^2.8.8":
|
||||
version "2.9.2"
|
||||
resolved "https://registry.yarnpkg.com/@vscode/emmet-helper/-/emmet-helper-2.9.2.tgz#cd5d1e64e7138ad76300e8cba5fd84f1c03e13ee"
|
||||
integrity sha512-MaGuyW+fa13q3aYsluKqclmh62Hgp0BpKIqS66fCxfOaBcVQ1OnMQxRRgQUYnCkxFISAQlkJ0qWWPyXjro1Qrg==
|
||||
version "2.9.3"
|
||||
resolved "https://registry.yarnpkg.com/@vscode/emmet-helper/-/emmet-helper-2.9.3.tgz#8a8b228981fcf2d9346fdca77b9ad5a31dc09dba"
|
||||
integrity sha512-rB39LHWWPQYYlYfpv9qCoZOVioPCftKXXqrsyqN1mTWZM6dTnONT63Db+03vgrBbHzJN45IrgS/AGxw9iiqfEw==
|
||||
dependencies:
|
||||
emmet "^2.4.3"
|
||||
jsonc-parser "^2.3.0"
|
||||
|
@ -70,9 +70,9 @@
|
|||
vscode-uri "^2.1.2"
|
||||
|
||||
emmet@^2.4.3:
|
||||
version "2.4.4"
|
||||
resolved "https://registry.yarnpkg.com/emmet/-/emmet-2.4.4.tgz#801aad64659dc76f3003130db767d77a78ac298e"
|
||||
integrity sha512-v8Mwpjym55CS3EjJgiCLWUB3J2HSR93jhzXW325720u8KvYxdI2voYLstW3pHBxFz54H6jFjayR9G4LfTG0q+g==
|
||||
version "2.4.7"
|
||||
resolved "https://registry.yarnpkg.com/emmet/-/emmet-2.4.7.tgz#19893c34e6274af14ea3c5729101e3c4ed18f01e"
|
||||
integrity sha512-O5O5QNqtdlnQM2bmKHtJgyChcrFMgQuulI+WdiOw2NArzprUqqxUW6bgYtKvzKgrsYpuLWalOkdhNP+1jluhCA==
|
||||
dependencies:
|
||||
"@emmetio/abbreviation" "^2.3.3"
|
||||
"@emmetio/css-abbreviation" "^2.1.8"
|
||||
|
|
Loading…
Reference in a new issue