mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-30 20:59:16 +00:00
LibLine: Make it possible to avoid autocompletion if requested
Setting 'allow_commit_without_listing' to false will now make LibLine show the suggestion before actually committing to it; this is useful for completions that will replace all the user input, where mistakes can go unnoticed without some visual cue.
This commit is contained in:
parent
d5b3998d23
commit
1699ddc186
Notes:
sideshowbarker
2024-07-17 11:42:15 +09:00
Author: https://github.com/alimpfard
Commit: 1699ddc186
Pull-request: https://github.com/SerenityOS/serenity/pull/13686
4 changed files with 15 additions and 2 deletions
|
@ -1167,7 +1167,7 @@ void Editor::handle_read_event()
|
|||
m_suggestion_manager.previous();
|
||||
}
|
||||
|
||||
if (m_suggestion_manager.count() < 2) {
|
||||
if (m_suggestion_manager.count() < 2 && !completion_result.avoid_committing_to_single_suggestion) {
|
||||
// We have none, or just one suggestion,
|
||||
// we should just commit that and continue
|
||||
// after it, as if it were auto-completed.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue