Fixed whitespace related comments to be a complete sentence.

This commit is contained in:
pi1024e
2019-07-22 08:36:33 -04:00
parent c757f491e5
commit 10b924d2d3
3 changed files with 7 additions and 6 deletions

View File

@@ -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));