From 1edaf252730b7d48a522faae6fae1e98d5f08b30 Mon Sep 17 00:00:00 2001 From: uinstinct <61635505+uinstinct@users.noreply.github.com> Date: Wed, 19 Nov 2025 20:24:38 +0530 Subject: [PATCH] fallback to vsfutil.loadtext when readDocument is null --- .../continueintellijextension/continue/file/FileUtils.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/file/FileUtils.kt b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/file/FileUtils.kt index ea7accbb73c..2e66be21980 100644 --- a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/file/FileUtils.kt +++ b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/file/FileUtils.kt @@ -91,7 +91,7 @@ class FileUtils( private fun readDocument(file: VirtualFile, maxLength: Int): String? { val document = FileDocumentManager.getInstance().getDocument(file) - ?: return "" + ?: return null val length = min(document.textLength, maxLength) return document.getText(TextRange(0, length)) }