Skip to content

Commit

Permalink
LibGUI: Remove unnecessary braces
Browse files Browse the repository at this point in the history
  • Loading branch information
thislooksfun authored and awesomekling committed Nov 2, 2021
1 parent 4e5bf5c commit 6c776d2
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions Userland/Libraries/LibGUI/GMLAutocompleteProvider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ void GMLAutocompleteProvider::provide_completions(Function<void(Vector<Entry>)>

break;
}
case InIdentifier: {
case InIdentifier:
if (after_token_on_same_line) {
// After an identifier, but with extra space
// TODO: Maybe suggest a colon?
Expand All @@ -207,8 +207,7 @@ void GMLAutocompleteProvider::provide_completions(Function<void(Vector<Entry>)>

register_properties_and_widgets_matching_pattern(make_fuzzy(identifier_string), identifier_string.length());
break;
}
case AfterClassName: {
case AfterClassName:
if (last_seen_token && last_seen_token->m_end.line == cursor.line()) {
if (last_seen_token->m_type != GUI::GMLToken::Type::Identifier || last_seen_token->m_end.column != cursor.column()) {
// Inside braces, but on the same line as some other stuff (and not the continuation of one!)
Expand All @@ -219,7 +218,6 @@ void GMLAutocompleteProvider::provide_completions(Function<void(Vector<Entry>)>

register_properties_and_widgets_matching_pattern("*", 0u);
break;
}
case AfterIdentifier:
if (last_seen_token && last_seen_token->m_end.line != cursor.line())
break;
Expand Down

0 comments on commit 6c776d2

Please sign in to comment.