fix: Commands now completable when not starting with / (#4846)
* Add commands to completable inputs when no prefix
This commit is contained in:
@@ -30,7 +30,13 @@ public:
|
||||
void updateResults(const QString &query, bool isFirstWord = false);
|
||||
|
||||
private:
|
||||
enum class SourceKind { Emote, User, Command, EmoteAndUser };
|
||||
enum class SourceKind {
|
||||
Emote,
|
||||
User,
|
||||
Command,
|
||||
EmoteCommand,
|
||||
EmoteUserCommand
|
||||
};
|
||||
|
||||
/// @brief Updates the internal completion source based on the current query.
|
||||
/// The completion source will only change if the deduced completion kind
|
||||
@@ -47,6 +53,10 @@ private:
|
||||
|
||||
std::unique_ptr<completion::Source> buildSource(SourceKind kind) const;
|
||||
|
||||
std::unique_ptr<completion::Source> buildEmoteSource() const;
|
||||
std::unique_ptr<completion::Source> buildUserSource() const;
|
||||
std::unique_ptr<completion::Source> buildCommandSource() const;
|
||||
|
||||
Channel &channel_;
|
||||
std::unique_ptr<completion::Source> source_{};
|
||||
std::optional<SourceKind> sourceKind_{};
|
||||
|
||||
Reference in New Issue
Block a user