mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-24 18:49:00 +01:00
fixes #7748: [scss] Undesirable behavior when pressing enter after completing a Sass (SCSS) statement
This commit is contained in:
@@ -206,10 +206,13 @@ export class CSSCompletion {
|
||||
public getUnitProposals(entry: languageFacts.IEntry, result: CompletionList): CompletionList {
|
||||
let currentWord = '0';
|
||||
if (this.currentWord.length > 0) {
|
||||
let numMatch = this.currentWord.match(/-?\d[\.\d+]*/);
|
||||
let numMatch = this.currentWord.match(/^-?\d[\.\d+]*/);
|
||||
if (numMatch) {
|
||||
currentWord = numMatch[0];
|
||||
result.isIncomplete = currentWord.length === this.currentWord.length;
|
||||
}
|
||||
} else if (this.currentWord.length === 0) {
|
||||
result.isIncomplete = true;
|
||||
}
|
||||
entry.restrictions.forEach((restriction) => {
|
||||
let units = languageFacts.units[restriction];
|
||||
@@ -223,7 +226,6 @@ export class CSSCompletion {
|
||||
});
|
||||
}
|
||||
});
|
||||
result.isIncomplete = true;
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user