diff --git a/NEWS.md b/NEWS.md index ec311721..ff17fbe9 100644 --- a/NEWS.md +++ b/NEWS.md @@ -6,6 +6,7 @@ Red Panda C++ Version 1.1.2 - fix: select all shouldn't set file's modified flag - enhancement: add (return)type info for functions/varaibles/typedefs in the class browser panel - enhancement: autolink add "force utf8" property (mainly for raylib) + - change: position caret to (1,1) when create a new file using editor's new file template Red Panda C++ Version 1.1.1 - enhancement: adjust the appearance of problem case's input/output/expected control diff --git a/RedPandaIDE/editor.cpp b/RedPandaIDE/editor.cpp index 4436121a..dc3701b1 100644 --- a/RedPandaIDE/editor.cpp +++ b/RedPandaIDE/editor.cpp @@ -165,6 +165,7 @@ Editor::Editor(QWidget *parent, const QString& filename, QString fileTemplate = pMainWindow->codeSnippetManager()->newFileTemplate(); if (!fileTemplate.isEmpty()) { insertCodeSnippet(fileTemplate); + setCaretPosition(1,1); mCanAutoSave = true; } }