Commit b674a99d authored by Mark Nauwelaerts's avatar Mark Nauwelaerts
Browse files

lspclient: avoid stale symbolview upon document reload

parent 4ffd2024
......@@ -435,7 +435,9 @@ public:
m_models.move(it - m_models.begin(), 0);
auto &model = m_models.front();
// re-use if possible
if (revision == model.revision && model.model) {
// reloaded document recycles revision number, so avoid stale cache
// (clear := view switch)
if (revision == model.revision && model.model && (clear || revision > 0)) {
setModel(model.model);
return;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment