mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-23 08:55:25 +02:00
Bug 442123: java.lang.StringIndexOutOfBoundsException in
org.eclipse.cdt.make.internal.ui.text.WordPartDetector
This commit is contained in:
parent
58af86640b
commit
63c28d216f
1 changed files with 5 additions and 1 deletions
|
@ -119,7 +119,11 @@ public class WordPartDetector {
|
|||
// the cursor is on the first word which is "include" keyword
|
||||
// so find the second word which is the first include file
|
||||
String sub = line.substring(line.indexOf(' ', position)).trim();
|
||||
wordPart = sub.substring(0, sub.indexOf(' ')).trim();
|
||||
if (sub.contains(" ")) { //$NON-NLS-1$
|
||||
wordPart = sub.substring(0, sub.indexOf(' ')).trim();
|
||||
} else {
|
||||
wordPart = sub;
|
||||
}
|
||||
} else {
|
||||
wordPart = findWord(line, position);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue