diff --git a/src/plugins/texteditor/texteditor.cpp b/src/plugins/texteditor/texteditor.cpp index 2e5aa9dd5f6..a0cbd176999 100644 --- a/src/plugins/texteditor/texteditor.cpp +++ b/src/plugins/texteditor/texteditor.cpp @@ -313,6 +313,9 @@ public: return; } + if (isCheckRunning(documentRevision, position)) + return; + // Cancel currently running checks for (BaseHoverHandler *handler : m_handlers) handler->abort(); @@ -331,6 +334,13 @@ public: checkNext(); } + bool isCheckRunning(int documentRevision, int position) const + { + return m_currentHandlerIndex <= m_handlers.size() + && m_documentRevision == documentRevision + && m_position == position; + } + void checkNext() { QTC_ASSERT(m_currentHandlerIndex < m_handlers.size(), return);