Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wrong display in multiline function signature #764

Open
HernandoR opened this issue Jan 8, 2025 · 2 comments
Open

wrong display in multiline function signature #764

HernandoR opened this issue Jan 8, 2025 · 2 comments
Labels
bug Something isn't working

Comments

@HernandoR
Copy link

HernandoR commented Jan 8, 2025

suggesting a long signature of function:

 inline void GetAllCloudPointCloud(
    const int lidar_type,
    const std::unordered_map<int, std::unordered_map<int, VoxelBlock::Ptr>>&
        ground_map,
    const std::unordered_map<
        int,
        std::unordered_map<int, std::unordered_map<int, VoxelBlockAverage>>>&
        upground_map,
    pcl::PointCloud<pcl::PointXYZRGBA>::Ptr upground_cldsavemix_rgba,){
...
}

I expect the collapse show me the function name GetAllCloudPointCloud
as shown follows, it starts with correct display (first line):
image
and it can keep correct as long as I don't change to another file.

If I switch to another file, and go back, it would show the last line of the signature instead of the first line
image

logs
clangd.log

System information
Clangd version 18.1.8
clangd extension version:
Operating system: kUbuntu 2404

@HernandoR HernandoR added the bug Something isn't working label Jan 8, 2025
@HighCommander4
Copy link
Contributor

HighCommander4 commented Jan 8, 2025

If I switch to another file, and go back, it would show the last line of the signature instead of the first line !

This suggests the issue is with vscode itself.

Clangd provides a document outline (which vscode may use for determining these sticky scroll headers) when a file is opened or edited, but clangd plays no role in switching between open editors.

@HighCommander4
Copy link
Contributor

A similar issue was reported in clangd/clangd#2221, this comment is potentially interesting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants