Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ASCompletion] Added "ASCompletion.DotCompletion" DataEvent #1613

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions External/Plugins/ASCompletion/Completion/ASComplete.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2174,6 +2174,7 @@ static private bool HandleDotCompletion(ScintillaControl Sci, bool autoHide)
else
list.Add(new MemberItem(member));
}
EventManager.DispatchEvent(null, new DataEvent(EventType.Command, "ASCompletion.DotCompletion", list));
CompletionList.Show(list, autoHide, tail);

// smart focus token
Expand Down Expand Up @@ -2252,15 +2253,16 @@ static public void DotContextResolved(ScintillaControl Sci, ASExpr expr, MemberL
if (CompletionList.Active) reSelect = CompletionList.SelectedLabel;

// show completion
List<ICompletionListItem> customList = new List<ICompletionListItem>();
List<ICompletionListItem> list = new List<ICompletionListItem>();
bool testActive = !CompletionList.Active && expr.Position != position;
foreach (MemberModel member in items)
{
if (testActive && member.Name == word)
if (testActive && member.Name == word)
return;
customList.Add(new MemberItem(member));
list.Add(new MemberItem(member));
}
CompletionList.Show(customList, autoHide, word);
EventManager.DispatchEvent(null, new DataEvent(EventType.Command, "ASCompletion.DotCompletion", list));
CompletionList.Show(list, autoHide, word);

if (reSelect != null) CompletionList.SelectItem(reSelect);
}
Expand Down