Bug 279358 - When pasting adjust indentation - error
Summary: When pasting adjust indentation - error
Status: ASSIGNED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-editor (show other bugs)
Version: 6.0   Edit
Hardware: PC Windows Server 2003
: P3 normal with 2 votes (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Jonah Graham CLA
URL:
Whiteboard:
Keywords:
: 350057 408968 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-06-06 16:17 EDT by Jan CLA
Modified: 2020-09-04 15:21 EDT (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jan CLA 2009-06-06 16:17:07 EDT
If you copy some lines of code with the first line not including the leading whitespaces, you will get wrong indented code on paste.

Example:

	while( isSpace(param) && param_len > 0) {
		param++;
		param_len--;
	}

leads to:

	while( isSpace(param) && param_len > 0) {
			param++;
			param_len--;
		}


The pasted lines contain the leading whitespaces from the copied code and the whitespaces inserted by "Adjust indentation". This leads to only the first  line is pasted with the right indentation.
Comment 1 Anton Leherbauer CLA 2011-07-21 07:53:24 EDT
*** Bug 350057 has been marked as a duplicate of this bug. ***
Comment 2 soman namos CLA 2015-07-24 10:39:38 EDT
*** Bug 408968 has been marked as a duplicate of this bug. ***