forked from qt-creator/qt-creator
LanguageClient: compress documentHighlight requests
Change-Id: I98707a61a228c66966c72f6b4da2470b6f53820e Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -432,15 +432,10 @@ void LanguageClientManager::editorOpened(Core::IEditor *editor)
|
||||
if (auto client = clientForDocument(document))
|
||||
client->symbolSupport().renameSymbol(document, cursor);
|
||||
});
|
||||
connect(widget, &TextEditorWidget::cursorPositionChanged, this, [this, widget]() {
|
||||
// TODO This would better be a compressing timer
|
||||
QTimer::singleShot(50, this, [widget = QPointer<TextEditorWidget>(widget)]() {
|
||||
if (!widget)
|
||||
return;
|
||||
if (Client *client = clientForDocument(widget->textDocument()))
|
||||
if (client->reachable())
|
||||
client->cursorPositionChanged(widget);
|
||||
});
|
||||
connect(widget, &TextEditorWidget::cursorPositionChanged, this, [widget]() {
|
||||
if (Client *client = clientForDocument(widget->textDocument()))
|
||||
if (client->reachable())
|
||||
client->cursorPositionChanged(widget);
|
||||
});
|
||||
updateEditorToolBar(editor);
|
||||
if (TextEditor::TextDocument *document = textEditor->textDocument()) {
|
||||
|
||||
Reference in New Issue
Block a user