fix: Remove tab completion caching of source (#4893)

This commit is contained in:
Daniel Sage 2023-10-13 05:43:16 -04:00 committed by GitHub
parent 653a14c76b
commit b85d666b32
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 2 additions and 10 deletions

View file

@ -32,7 +32,7 @@
- Dev: Refactor `Image` & Image's `Frames`. (#4773)
- Dev: Add `WindowManager::getLastSelectedWindow()` to replace `getMainWindow()`. (#4816)
- Dev: Clarify signal connection lifetimes where applicable. (#4818)
- Dev: Laid the groundwork for advanced input completion strategies. (#4639, #4846, #4853)
- Dev: Laid the groundwork for advanced input completion strategies. (#4639, #4846, #4853, #4893)
- Dev: Fixed flickering when running with Direct2D on Windows. (#4851)
- Dev: Fix qtkeychain include for Qt6 users. (#4863)
- Dev: Add a compile-time flag `CHATTERINO_UPDATER` which can be turned off to disable update checks. (#4854)

View file

@ -39,18 +39,11 @@ void TabCompletionModel::updateSourceFromQuery(const QString &query)
if (!deducedKind)
{
// unable to determine what kind of completion is occurring
this->sourceKind_ = std::nullopt;
this->source_ = nullptr;
return;
}
if (this->sourceKind_ == *deducedKind)
{
// Source already properly configured
return;
}
this->sourceKind_ = *deducedKind;
// Build source for new query
this->source_ = this->buildSource(*deducedKind);
}

View file

@ -64,7 +64,6 @@ private:
Channel &channel_;
std::unique_ptr<completion::Source> source_{};
std::optional<SourceKind> sourceKind_{};
};
} // namespace chatterino