Fixed bug with toggleLineComment ends in a start line

This commit is contained in:
Armando Aguirre
2020-09-25 19:00:02 -07:00
parent 73f5f02e97
commit 8cf980af8d
4 changed files with 67 additions and 2 deletions

View File

@@ -2077,6 +2077,11 @@ namespace ts {
// Push all text changes.
for (let i = firstLine; i <= lastLine; i++) {
// If the range is multiline and ends on a beginning of a line, don't comment/uncomment.
if (firstLine !== lastLine && lineStarts[i] === textRange.end) {
continue;
}
const lineTextStart = lineTextStarts.get(i.toString());
// If the line is not an empty line; otherwise no-op.