From 46099dc0f6066a1fb343b1f107445bfa29cbca15 Mon Sep 17 00:00:00 2001 From: Rafael Costa Date: Mon, 1 Jan 2024 19:04:27 +0000 Subject: [PATCH] Fixes #541 --- .../ksp/processors/KspToCodeGenDestinationsMapper.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compose-destinations-ksp/src/main/kotlin/com/ramcosta/composedestinations/ksp/processors/KspToCodeGenDestinationsMapper.kt b/compose-destinations-ksp/src/main/kotlin/com/ramcosta/composedestinations/ksp/processors/KspToCodeGenDestinationsMapper.kt index f6e362b6..209bc7b7 100644 --- a/compose-destinations-ksp/src/main/kotlin/com/ramcosta/composedestinations/ksp/processors/KspToCodeGenDestinationsMapper.kt +++ b/compose-destinations-ksp/src/main/kotlin/com/ramcosta/composedestinations/ksp/processors/KspToCodeGenDestinationsMapper.kt @@ -510,7 +510,7 @@ class KspToCodeGenDestinationsMapper( private fun getErrorLines(location: Location): String { val fileLocation = location as? FileLocation ?: return "NonExistentLocation" return File(fileLocation.filePath) - .readLines(fileLocation.lineNumber, fileLocation.lineNumber + 1) + .readLines(fileLocation.lineNumber, fileLocation.lineNumber + 10) .joinToString("") }