This commit is contained in:
Johannes Rieken
2017-05-26 10:17:58 +02:00
parent 01e289eac3
commit 0fbbc8eb0c
2 changed files with 4 additions and 1 deletions

View File

@@ -243,6 +243,7 @@ export class ExtHostDocumentData extends MirrorModel {
private _getWordRangeAtPosition(_position: vscode.Position, regexp?: RegExp): vscode.Range {
let position = this._validatePosition(_position);
if (!regexp || regExpLeadsToEndlessLoop(regexp)) {
console.warn(`[getWordRangeAtPosition]: ignoring custom regexp '${regexp.source}' because it matches the empty string.`);
regexp = getWordDefinitionFor(this._languageId);
}
let wordAtText = getWordAtText(