Fixed code

This commit is contained in:
pi1024e
2019-07-20 18:54:52 -04:00
parent d6bf20d8ca
commit d96cd165d6

View File

@@ -156,11 +156,11 @@ function pathToReplaceRange(valueBeforeCursor: string, fullValue: string, fullVa
// If whitespace exists, replace until it
const whitespaceIndex = valueAfterLastSlash.indexOf(' ');
if (whitespaceIndex === -1) {
return Range.create(startPos, shiftPosition(startPos, whitespaceIndex));
return Range.create(startPos, fullValueRange.end);
}
return Range.create(startPos, fullValueRange.end);
return Range.create(startPos, shiftPosition(startPos, whitespaceIndex));
}
function pathToSuggestion(p: string, replaceRange: Range): CompletionItem {