|
From: Márcio V. d. S. <mv...@us...> - 2007-11-01 14:41:13
|
Update of /cvsroot/tail/TailS/src/java/org/gjt/sp/jedit/syntax In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv9607/src/java/org/gjt/sp/jedit/syntax Modified Files: JEditTextArea.java Log Message: Index: JEditTextArea.java =================================================================== RCS file: /cvsroot/tail/TailS/src/java/org/gjt/sp/jedit/syntax/JEditTextArea.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** JEditTextArea.java 31 Oct 2007 22:42:55 -0000 1.3 --- JEditTextArea.java 1 Nov 2007 14:41:11 -0000 1.4 *************** *** 858,863 **** } ! ! /** * Returns the specified substring of the document. --- 858,863 ---- } ! ! /** * Returns the specified substring of the document. *************** *** 881,894 **** public final String getLastWord() { ! int offset = getSelectionStart() - 1; ! String lastWord = ""; ! while( !getText(offset, 1).equals(" ")){ ! lastWord = getText(offset, 1) + lastWord; ! offset--; ! if(offset < 0) break; ! } ! return lastWord; } ! /** * Copies the specified substring of the document into a segment. --- 881,893 ---- public final String getLastWord() { ! int offset = getSelectionStart() - 1; ! String lastWord = ""; ! while( offset >= 0 && (!getText(offset, 1).equals(" ") && !getText(offset, 1).equals("\n"))){ ! lastWord = getText(offset, 1) + lastWord; ! offset--; ! } ! return lastWord; } ! /** * Copies the specified substring of the document into a segment. |