mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-08 02:06:01 +02:00
Remove trailing whitespace in matches.
This commit is contained in:
parent
43dbe6cc86
commit
a9a8a0baf1
1 changed files with 4 additions and 3 deletions
|
@ -87,11 +87,12 @@ public class LineSearchElement extends PDOMSearchElement {
|
||||||
private final Match[] fMatches;
|
private final Match[] fMatches;
|
||||||
private final static MatchesComparator MATCHES_COMPARATOR = new MatchesComparator();
|
private final static MatchesComparator MATCHES_COMPARATOR = new MatchesComparator();
|
||||||
|
|
||||||
private LineSearchElement(IIndexFileLocation file, Match[] matches, int number, String content, int offset) {
|
private LineSearchElement(IIndexFileLocation file, Match[] matches, int number, String content,
|
||||||
|
int offset) {
|
||||||
super(file);
|
super(file);
|
||||||
fMatches = matches;
|
fMatches = matches;
|
||||||
fNumber = number;
|
fNumber = number;
|
||||||
// skip whitespace at the beginning
|
// Skip whitespace at the beginning.
|
||||||
int index = 0;
|
int index = 0;
|
||||||
int length = content.length();
|
int length = content.length();
|
||||||
int firstMatchOffset = matches[0].getOffset();
|
int firstMatchOffset = matches[0].getOffset();
|
||||||
|
@ -103,7 +104,7 @@ public class LineSearchElement extends PDOMSearchElement {
|
||||||
length--;
|
length--;
|
||||||
}
|
}
|
||||||
fOffset = offset;
|
fOffset = offset;
|
||||||
fContent = content.substring(index);
|
fContent = content.substring(index).trim();
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getOffset() {
|
public int getOffset() {
|
||||||
|
|
Loading…
Add table
Reference in a new issue