ide: assist: fixed issue with assist array cursor #1135

git-svn-id: svn://ultimatepp.org/upp/trunk@8573 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2015-06-21 11:13:24 +00:00
parent f09210713d
commit cdbf8a7050
3 changed files with 5 additions and 2 deletions

View file

@ -554,6 +554,8 @@ void ArrayCtrl::SetVirtualCount(int c) {
Refresh();
SyncInfo();
SetSb();
if(cursor >= virtualcount)
GoEnd();
}
void ArrayCtrl::SetSb() {

View file

@ -328,6 +328,7 @@ void AssistEditor::SyncAssist()
}
}
}
assist.Clear();
assist.SetVirtualCount(assist_item_ndx.GetCount());
}

View file

@ -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)