less strict checking of rename locations, #58907

This commit is contained in:
Johannes Rieken
2018-10-03 16:48:54 +02:00
parent 856a0daab5
commit 7d7c27cf3e
2 changed files with 2 additions and 8 deletions

View File

@@ -524,9 +524,8 @@ class RenameAdapter {
if (!range) {
return undefined;
}
if (!range.contains(pos)) {
console.warn('INVALID rename location: range must contain position');
if (range.start.line > pos.line || range.end.line < pos.line) {
console.warn('INVALID rename location: position line must be within range start/end lines');
return undefined;
}
return { range: typeConvert.Range.from(range), text };