ide: Merged stable version MacOS assist fix

This commit is contained in:
Mirek Fidler 2024-12-12 09:08:02 +01:00
commit c5bea8d729
2 changed files with 2 additions and 1 deletions

View file

@ -121,6 +121,7 @@ void AssistEditor::CloseAssist()
popup.Close();
if(annotation_popup.IsOpen())
annotation_popup.Close();
assist_item_ndx.Clear();
assist_item.Clear();
CloseTip();
}

View file

@ -149,7 +149,7 @@ String CppText(const String& name, const String& pretty)
void AssistEditor::AssistDisplay::Paint(Draw& w, const Rect& r, const Value& q, Color ink, Color paper, dword style) const
{
int ii = q;
if(ii >= 0 && ii < editor->assist_item_ndx.GetCount()) {
if(ii >= 0 && ii < editor->assist_item_ndx.GetCount() && editor->assist_item_ndx[ii] < editor->assist_item.GetCount()) {
AutoCompleteItem& m = editor->assist_item[editor->assist_item_ndx[ii]];
w.DrawRect(r, paper);