提交 10b924d2 编写于 作者: P pi1024e

Fixed whitespace related comments to be a complete sentence.

上级 c757f491
......@@ -153,7 +153,8 @@ function pathToReplaceRange(valueBeforeCursor: string, fullValue: string, fullVa
// Find the last slash before cursor, and calculate the start of replace range from there
const valueAfterLastSlash = fullValue.slice(lastIndexOfSlash + 1);
const startPos = shiftPosition(fullValueRange.end, -valueAfterLastSlash.length);
// If whitespace exists, replace until it
// If whitespace exists, replace until there is no more remaining.
const whitespaceIndex = valueAfterLastSlash.indexOf(' ');
if (whitespaceIndex === -1) {
return Range.create(startPos, fullValueRange.end);
......
......@@ -108,7 +108,8 @@ function pathToSuggestion(p: string, valueBeforeCursor: string, fullValue: strin
// Find the last slash before cursor, and calculate the start of replace range from there
const valueAfterLastSlash = fullValue.slice(lastIndexOfSlash + 1);
const startPos = shiftPosition(range.end, -1 - valueAfterLastSlash.length);
// If whitespace exists, replace until it
// If whitespace exists, replace until there is no more remaining.
const whitespaceIndex = valueAfterLastSlash.indexOf(' ');
if (whitespaceIndex === -1) {
replaceRange = Range.create(startPos, shiftPosition(range.end, -1));
......
......@@ -331,11 +331,10 @@ function wrapRelativePattern(parsedPattern: ParsedStringPattern, arg2: string |
}
return function (path, basename) {
if (!extpath.isEqualOrParent(path, arg2.base)) {
return null;
}
if (extpath.isEqualOrParent(path, arg2.base)) {
return parsedPattern(paths.relative(arg2.base, path), basename);
}
return null;
};
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册