Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 322750 - Expanding the selection from within a macro expansion works unexpected
Summary: Expanding the selection from within a macro expansion works unexpected
Status: RESOLVED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-editor (show other bugs)
Version: 8.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 8.0   Edit
Assignee: Markus Schorn CLA
QA Contact: Anton Leherbauer CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-16 03:36 EDT by Anton Leherbauer CLA
Modified: 2010-08-26 08:23 EDT (History)
1 user (show)

See Also:


Attachments
fix (8.96 KB, patch)
2010-08-26 07:19 EDT, Markus Schorn CLA
mschorn.eclipse: iplog-
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Anton Leherbauer CLA 2010-08-16 03:36:17 EDT
E.g.

#define M(a,b) a=b
void f() {
	int a,b;
	M(a,b);
	a=b;
}
void g() {}

Put the cursor on the M(a,b) macro expansion.
Expanding the selection works OK until all of the macro expansion is selected, any further expansion (enclosing, next or previous element) will select the whole file.
Starting from a normal code location (e.g. a=b;) works OK.

Another observation: Expanding the selection beyond the whole file multiple times seems to add each attempt to the history although the selection did not actually change, i.e. to restore the previous selection I have to hit Alt+Shift+Down multiple times.
Comment 1 Markus Schorn CLA 2010-08-26 04:16:35 EDT
Hmm, the current node selector does not provide a method to find the enclosing node for the macro expansion. I need to add one.
Comment 2 Markus Schorn CLA 2010-08-26 07:19:48 EDT
Created attachment 177514 [details]
fix
Comment 3 Markus Schorn CLA 2010-08-26 07:20:57 EDT
Fixed in 8.0 > 20100826.