mirror of
https://github.com/MaskRay/ccls.git
synced 2024-11-26 09:31:59 +00:00
Push cursor position to end when updating delayed diagnostics
This commit is contained in:
parent
08fb60a675
commit
64580decab
@ -363,6 +363,13 @@ void CompletionDiagnosticsDelayedRefreshMain(ClangCompleteManager* completion_ma
|
|||||||
if (has_completion_since_sleeping)
|
if (has_completion_since_sleeping)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
// Push completion request to the end of the line. clang may report errors
|
||||||
|
// if completing in the middle of the line. Not a perfect hueristic, but
|
||||||
|
// probably good enough.
|
||||||
|
// TODO: Consider scanning for a semicolon if this doesn't work well in
|
||||||
|
// practice.
|
||||||
|
location.position.character = 10000;
|
||||||
|
|
||||||
// Make completion request to get refreshed diagnostics.
|
// Make completion request to get refreshed diagnostics.
|
||||||
auto request = MakeUnique<ClangCompleteManager::CompletionRequest>();
|
auto request = MakeUnique<ClangCompleteManager::CompletionRequest>();
|
||||||
request->location = location;
|
request->location = location;
|
||||||
|
Loading…
Reference in New Issue
Block a user