forked from qt-creator/qt-creator
ClangCodeModel: Work around clangd cursor issue
If the cursor is right before the "." in a member access expression, clangd interprets it as belonging to the member instead of the base expression, which leads to unexpected behavior. Work around this by sending a cursor position one to the left of the real one to clangd in such cases. Change-Id: I429ee9189760ccb02d231acfcb94ab6cfde3cd8d Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -102,6 +102,8 @@ private:
|
||||
void handleDiagnostics(const LanguageServerProtocol::PublishDiagnosticsParams ¶ms) override;
|
||||
void handleDocumentOpened(TextEditor::TextDocument *doc) override;
|
||||
void handleDocumentClosed(TextEditor::TextDocument *doc) override;
|
||||
QTextCursor adjustedCursorForHighlighting(const QTextCursor &cursor,
|
||||
TextEditor::TextDocument *doc) override;
|
||||
const CustomInspectorTabs createCustomInspectorTabs() override;
|
||||
|
||||
class Private;
|
||||
|
||||
Reference in New Issue
Block a user