Skip to content
Snippets Groups Projects
Commit cd1e4add authored by Christoph Döbber's avatar Christoph Döbber
Browse files

widely integrated FiedlAssist

refs 563
parent 3a06fbcf
No related branches found
No related tags found
No related merge requests found
...@@ -125,7 +125,10 @@ public class FieldAssist { ...@@ -125,7 +125,10 @@ public class FieldAssist {
/** Finds the beginning of the word the cursor is placed in. */ /** Finds the beginning of the word the cursor is placed in. */
private int findBeginningOfWord(String contents, int position) { private int findBeginningOfWord(String contents, int position) {
int tmp = Math.max(0, position - 1); if (contents.isEmpty()) {
return -1;
}
int tmp = position - 1;
while (tmp >= 0 && !Character.isWhitespace(contents.charAt(tmp)) while (tmp >= 0 && !Character.isWhitespace(contents.charAt(tmp))
&& !isAdditionalWhitespace(contents.charAt(tmp))) { && !isAdditionalWhitespace(contents.charAt(tmp))) {
tmp--; tmp--;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment