Bug 511144 - <Enter> at end of out-of-line template method definition with multiline parameter list goes to wrong column
Summary: <Enter> at end of out-of-line template method definition with multiline param...
Status: NEW
Alias: None
Product: CDT
Classification: Tools
Component: cdt-editor (show other bugs)
Version: Next   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Jonah Graham CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-01-26 19:43 EST by Nathan Ridge CLA
Modified: 2020-09-04 15:16 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nathan Ridge CLA 2017-01-26 19:43:45 EST
In the following code:


template <typename T>
struct Example {
    void foo(int arg1, int arg2,
            int arg3, int arg4, int arg5);
};

template <typename T>
void Example<T>::foo(int arg1, int arg2,
        int arg3, int arg4, int arg5)/*cursor*/
        
        
with the cursor at the indicated location, pressing <Enter> brings indents the next line by two levels (like the second line of the parameter list), instead of leaving the cursor at the beginning of the new line.

It works fine if the class is made a nontemplate.
Comment 2 Eyal Rozenberg CLA 2017-01-27 03:02:37 EST
Hmm, you beat me to the bug report. So I'll just add myself to the CC list then.