FIR LT: fix line offsets calculations for text files with crlf

#KT-55886 fixed
This commit is contained in:
Ilya Chernikov
2023-01-26 17:09:13 +01:00
committed by Space Team
parent 836c4fcefd
commit 37a7044e74
2 changed files with 63 additions and 1 deletions
@@ -91,7 +91,7 @@ fun InputStreamReader.readSourceFileWithMapping(): Pair<CharSequence, KtSourceFi
charsRead++
when {
c == '\n' && skipNextLf -> {
lineOffsets[lineOffsets.size - 1] = charsRead
charsRead--
skipNextLf = false
}
c == '\n' || c == '\r' -> {