- fix: cursor is wrongly positioned when insert code snippets that don't have placeholders
This commit is contained in:
parent
1e06907db5
commit
fbdd268484
1
NEWS.md
1
NEWS.md
|
@ -8,6 +8,7 @@ Red Panda C++ Version 1.0.9
|
|||
- fix: tab icon not correct restore when hide and show a panel
|
||||
- fix: the hiding state of the tools output panel is not correctly saved
|
||||
- enhancement: add "toggle explorer panel" and "toggle messages panel" in "view" menu
|
||||
- fix: cursor is wrongly positioned when insert code snippets that don't have placeholders
|
||||
|
||||
Red Panda C++ Version 1.0.8
|
||||
- enhancement: auto complete '#undef'
|
||||
|
|
|
@ -2724,10 +2724,8 @@ void Editor::insertCodeSnippet(const QString &code)
|
|||
// else if EndsStr(#10, s) then
|
||||
// Delete(s,Length(s),1);
|
||||
setSelText(s);
|
||||
setCaretXY(cursorPos); //restore cursor pos before insert
|
||||
// fText.SelText := s;
|
||||
// Text.CaretXY := CursorPos;
|
||||
if (mUserCodeInTabStops.count()>0) {
|
||||
setCaretXY(cursorPos); //restore cursor pos before insert
|
||||
mTabStopBegin = caretX();
|
||||
mTabStopEnd = caretX();
|
||||
popUserCodeInTabStops();
|
||||
|
|
Loading…
Reference in New Issue