vscode
vscode copied to clipboard
Sticky scrolling doesn't work well with C++ template class/function
Env: VS Code Version: 1.70.0 OS Version: Ubuntu 20.04
Steps to Reproduce:
Open a C++ file with template class/function scroll down to the template function
what we expect is the class/function name , not the " template <typename T>" declaration .
@xiezhaokai Do you have a copy-paste friendly sample that reproduces the problem? We would like to verify, but we think this might be also fixed by https://github.com/microsoft/vscode/pull/157466
@alexdima Below is the sample code for you to verify. just copy it to an empty file and rename it with "test.h"
#include <string>
template <typename T >
class ProtocolVarField
{
public:
typedef T internalVarType;
size_t offsetInProtocol = 0;
std::string description;
std::string fieldName1;
// several members to make the class body long enough
// to test sticky-scrolling
std::string fieldName2;
std::string fieldName3;
std::string fieldName4;
std::string fieldName5;
std::string fieldName6;
std::string fieldName7;
std::string fieldName8;
//***
//
};
Hi, thanks for the feedback, I just verified on the new insiders version, and I have the following behavior: