Fix: loadContent — принудительное обновление TextArea (очистка + установка + cursorPosition); убран debug-консоль из loadContent

This commit is contained in:
Flora (opencode)
2026-08-17 18:34:12 +03:00
parent aa2e157f5f
commit 69a1a6159c
+3 -3
View File
@@ -266,13 +266,13 @@ Item {
// ---------- Просмотр (режим просмотра) ----------
function loadContent() {
console.log("loadContent called: docIndex=" + pane.docIndex + " editMode=" + pane.editMode)
if (pane.docIndex >= 0) {
const c = documentManager.contentAt(pane.docIndex)
console.log("loadContent content=" + c.substring(0, 50) + "...")
// Принудительное обновление TextArea: сначала очищаем, затем ставим контент
editor.text = ""
editor.text = c
editor.cursorPosition = c.length
pane.editorContent = c
console.log("loadContent editor.text.length=" + editor.text.length)
} else {
editor.text = ""
pane.editorContent = ""