forked from niosus/EasyClangComplete
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix clang completions hiding default completions (issue niosus#55)
When clang completions returned from the binary clang were empty, the code still hid default completions popup. Fix by not hiding autocompletion popup when parsed suggestions end up being empty. libclang variant returned early if no completions were found. That meant that it didn't have the same problem but that was still bad for two reasons: - Non-empty completions might still have ended up being empty if none were parsed properly and then the same problem as with binary clang would trigger. - Returning early meant that no error regions were created. That was inconsistent with binary clang variant which always added error regions. Also added tests for testing whether default completions are hidden by empty clang/libclang completions and for testing that error markers are still added when there are no completions.
- Loading branch information
Showing
5 changed files
with
106 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
int main(int argc, char const *argv[]) { | ||
foo. | ||
return 0; | ||
} |