mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-10 01:59:31 +00:00
LibLine: Autocomplete single suggestions
`cd /h<tab>` -> `cd /home/`, pressing tab after that would descend into `/home/' and show `/home/anon/`
This commit is contained in:
parent
d3e735f279
commit
fa0525b8bf
Notes:
sideshowbarker
2024-07-19 07:39:38 +09:00
Author: https://github.com/alimpfard
Commit: fa0525b8bf
Pull-request: https://github.com/SerenityOS/serenity/pull/1767
Issue: https://github.com/SerenityOS/serenity/issues/1535
Issue: https://github.com/SerenityOS/serenity/issues/1762
1 changed files with 9 additions and 1 deletions
|
@ -382,7 +382,15 @@ String Editor::get_line(const String& prompt)
|
||||||
}
|
}
|
||||||
reposition_cursor();
|
reposition_cursor();
|
||||||
}
|
}
|
||||||
|
if (m_suggestions.size() < 2) {
|
||||||
|
// we have none, or just one suggestion
|
||||||
|
// we should just commit that and continue
|
||||||
|
// after it, as if it were auto-completed
|
||||||
|
suggest(0, 0);
|
||||||
|
m_last_shown_suggestion = String::empty();
|
||||||
|
m_suggestions.clear();
|
||||||
|
m_times_tab_pressed = 0;
|
||||||
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue