mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 06:37:43 +00:00
LibGUI: Allow autocomplete to stay open after applying
Previously the autocomplete box would always close after applying a suggestion. This is the desired behavior in almost all cases, but there are some situations (like autocompleting paths) where it would be nicer to keep the autocomplete box open after applying the suggestion.
This commit is contained in:
parent
352f593958
commit
d5baf1c1fa
4 changed files with 33 additions and 8 deletions
|
@ -32,6 +32,12 @@ public:
|
|||
size_t partial_input_length { 0 };
|
||||
Language language { Language::Unspecified };
|
||||
String display_text {};
|
||||
|
||||
enum class HideAutocompleteAfterApplying {
|
||||
No,
|
||||
Yes,
|
||||
};
|
||||
HideAutocompleteAfterApplying hide_autocomplete_after_applying { HideAutocompleteAfterApplying::Yes };
|
||||
};
|
||||
|
||||
struct ProjectLocation {
|
||||
|
@ -89,7 +95,7 @@ public:
|
|||
bool has_suggestions() { return m_suggestion_view->model()->row_count() > 0; }
|
||||
void next_suggestion();
|
||||
void previous_suggestion();
|
||||
void apply_suggestion();
|
||||
AutocompleteProvider::Entry::HideAutocompleteAfterApplying apply_suggestion();
|
||||
|
||||
private:
|
||||
WeakPtr<TextEditor> m_editor;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue