diff --git a/uppsrc/CtrlLib/ArrayCtrl.cpp b/uppsrc/CtrlLib/ArrayCtrl.cpp index 60d505bc1..9f66d8e3c 100644 --- a/uppsrc/CtrlLib/ArrayCtrl.cpp +++ b/uppsrc/CtrlLib/ArrayCtrl.cpp @@ -554,6 +554,8 @@ void ArrayCtrl::SetVirtualCount(int c) { Refresh(); SyncInfo(); SetSb(); + if(cursor >= virtualcount) + GoEnd(); } void ArrayCtrl::SetSb() { diff --git a/uppsrc/ide/Assist.cpp b/uppsrc/ide/Assist.cpp index de340192d..7f4962c04 100644 --- a/uppsrc/ide/Assist.cpp +++ b/uppsrc/ide/Assist.cpp @@ -328,6 +328,7 @@ void AssistEditor::SyncAssist() } } } + assist.Clear(); assist.SetVirtualCount(assist_item_ndx.GetCount()); } diff --git a/uppsrc/ide/Browser/CodeRef.cpp b/uppsrc/ide/Browser/CodeRef.cpp index 412a28a02..df0e22ea5 100644 --- a/uppsrc/ide/Browser/CodeRef.cpp +++ b/uppsrc/ide/Browser/CodeRef.cpp @@ -364,11 +364,11 @@ void TopicEditor::GoTo(const String& _topic, const String& link, const String& c } if(!IsNull(create)) { if(!before) - for(bool firstpass = true; firstpass; firstpass = false) + for(int pass = 0; pass < 2; pass++) for(;;) { int c = editor.GetCursor(); RichText::FormatInfo f = editor.GetFormatInfo(); - if(f.styleid == BeginUuid() || (IsNull(f.label) || f.label == "noref") && !firstpass) + if(f.styleid == BeginUuid() || (IsNull(f.label) || f.label == "noref") && pass) break; editor.NextPara(); if(editor.GetCursor() == c)