From a770ee919ba99308c76da0a25473c84fb8816964 Mon Sep 17 00:00:00 2001 From: Laury Date: Thu, 31 Mar 2022 22:23:21 +0200 Subject: [PATCH] [code] End of revert #113 --- apps/code/editor_controller.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/code/editor_controller.cpp b/apps/code/editor_controller.cpp index 6de0a862f..be09c9662 100644 --- a/apps/code/editor_controller.cpp +++ b/apps/code/editor_controller.cpp @@ -65,7 +65,7 @@ void EditorController::viewWillAppear() { ViewController::viewWillAppear(); m_editorView.loadSyntaxHighlighter(); if(GlobalPreferences::sharedGlobalPreferences()->cursorSaving()) { - m_editorView.setCursorLocation(m_script.content() + *m_script.CursorPosition()); + m_editorView.setCursorLocation(m_editorView.text() + strlen(m_editorView.text())); } else { m_editorView.setCursorLocation(m_editorView.text() + strlen(m_editorView.text())); }