mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-22 23:30:14 +00:00
feat: add Tab autocomplete for slash commands in chat input
Pressing Tab while typing a slash command cycles through all matching commands (e.g. /em<Tab> → /emote, /emote<Tab> → /emote again). Unambiguous matches append a trailing space. Repeated Tab presses cycle forward through all matches. History navigation (Up/Down) resets the autocomplete session.
This commit is contained in:
parent
68251b647d
commit
c14b338a92
2 changed files with 69 additions and 1 deletions
|
|
@ -54,6 +54,11 @@ private:
|
|||
std::vector<std::string> chatSentHistory_;
|
||||
int chatHistoryIdx_ = -1; // -1 = not browsing history
|
||||
|
||||
// Tab-completion state for slash commands
|
||||
std::string chatTabPrefix_; // prefix captured on first Tab press
|
||||
std::vector<std::string> chatTabMatches_; // matching command list
|
||||
int chatTabMatchIdx_ = -1; // active match index (-1 = inactive)
|
||||
|
||||
// Chat tabs
|
||||
int activeChatTab_ = 0;
|
||||
struct ChatTab {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue