diff --git a/uppsrc/CtrlLib/ArrayCtrl.cpp b/uppsrc/CtrlLib/ArrayCtrl.cpp index ecc61b386..31eb06578 100644 --- a/uppsrc/CtrlLib/ArrayCtrl.cpp +++ b/uppsrc/CtrlLib/ArrayCtrl.cpp @@ -2388,7 +2388,8 @@ void ArrayCtrl::SortB(const Vector& o) void ArrayCtrl::ReArrange(const Vector& order) { - CHECK(KillCursor()); + KillCursor(); + ClearSelection(); ClearCache(); SortA(); SortB(order); @@ -2397,7 +2398,8 @@ void ArrayCtrl::ReArrange(const Vector& order) } void ArrayCtrl::Sort(const ArrayCtrl::Order& order) { - CHECK(KillCursor()); + KillCursor(); + ClearSelection(); ClearCache(); SortPredicate sp; sp.order = ℴ @@ -2413,7 +2415,8 @@ void ArrayCtrl::Sort(const ArrayCtrl::Order& order) { void ArrayCtrl::Sort(int from, int count, Gate2 order) { - CHECK(KillCursor()); + KillCursor(); + ClearSelection(); ClearCache(); Vector h; for(int i = 0; i < array.GetCount(); i++) diff --git a/uppsrc/ide/DCopy.cpp b/uppsrc/ide/DCopy.cpp index 9765e6685..70cc9f191 100644 --- a/uppsrc/ide/DCopy.cpp +++ b/uppsrc/ide/DCopy.cpp @@ -68,15 +68,14 @@ void AssistEditor::DCopy() if(cpp.GetCount() == 0) { // scan for THISBACKs Index id; CParser p(txt); - while(!p.IsEof()) { - try { - if(p.Id("THISBACK") && p.Char('(')) { + try { + while(!p.IsEof()) { + if(p.Id("THISBACK") && p.Char('(')) id.FindAdd(p.ReadId()); - } + p.SkipTerm(); } - catch(CParser::Error) { - } - p.SkipTerm(); + } + catch(CParser::Error) { } for(int i = 0; i < id.GetCount(); i++) r << "\tvoid " << id[i] << "();\n";