mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-10 13:00:29 +03:00
LibGUI: Add a FIXME about race in AutocompleteBox::apply_suggestion()
This commit is contained in:
parent
7c2941d4ea
commit
8f6b496fed
Notes:
sideshowbarker
2024-07-18 17:05:41 +09:00
Author: https://github.com/itamar8910 Commit: https://github.com/SerenityOS/serenity/commit/8f6b496fedf Pull-request: https://github.com/SerenityOS/serenity/pull/7453 Issue: https://github.com/SerenityOS/serenity/issues/7404 Reviewed-by: https://github.com/alimpfard Reviewed-by: https://github.com/awesomekling
@ -92,6 +92,10 @@ AutocompleteBox::AutocompleteBox(TextEditor& editor)
|
||||
|
||||
void AutocompleteBox::update_suggestions(Vector<AutocompleteProvider::Entry>&& suggestions)
|
||||
{
|
||||
// FIXME: There's a potential race here if, after the user selected an autocomplete suggestion,
|
||||
// the LanguageServer sends an update and this function is executed before AutocompleteBox::apply_suggestion()
|
||||
// is executed.
|
||||
|
||||
bool has_suggestions = !suggestions.is_empty();
|
||||
if (m_suggestion_view->model()) {
|
||||
auto& model = *static_cast<AutocompleteSuggestionModel*>(m_suggestion_view->model());
|
||||
|
Loading…
Reference in New Issue
Block a user