- 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: tab icon not correct restore when hide and show a panel
|
||||||
- fix: the hiding state of the tools output panel is not correctly saved
|
- 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
|
- 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
|
Red Panda C++ Version 1.0.8
|
||||||
- enhancement: auto complete '#undef'
|
- enhancement: auto complete '#undef'
|
||||||
|
|
|
@ -2724,10 +2724,8 @@ void Editor::insertCodeSnippet(const QString &code)
|
||||||
// else if EndsStr(#10, s) then
|
// else if EndsStr(#10, s) then
|
||||||
// Delete(s,Length(s),1);
|
// Delete(s,Length(s),1);
|
||||||
setSelText(s);
|
setSelText(s);
|
||||||
setCaretXY(cursorPos); //restore cursor pos before insert
|
|
||||||
// fText.SelText := s;
|
|
||||||
// Text.CaretXY := CursorPos;
|
|
||||||
if (mUserCodeInTabStops.count()>0) {
|
if (mUserCodeInTabStops.count()>0) {
|
||||||
|
setCaretXY(cursorPos); //restore cursor pos before insert
|
||||||
mTabStopBegin = caretX();
|
mTabStopBegin = caretX();
|
||||||
mTabStopEnd = caretX();
|
mTabStopEnd = caretX();
|
||||||
popUserCodeInTabStops();
|
popUserCodeInTabStops();
|
||||||
|
|
Loading…
Reference in New Issue