Menu

Commit [r4789]  Maximize  Restore  History

Fixed bug 2634638: Next/Previous Word has Problems with Whitespace

The main problem was that JTextComponent.getText() translates newlines to System.getProperty("line.separator"), which is two characters long on Windows. The internal offset, however, is just based on "\n" newlines. Therefore, the offset always got one character too large per line. Instead, we are now using JTextComponent.getDocument().getText(...), which keeps the internal representation.

Also fixed two problems with boundary conditions.

mgricken 2009-03-02

changed /trunk/drjava/src/edu/rice/cs/drjava/model/definitions/DefinitionsEditorKit.java
changed /trunk/drjava/src/edu/rice/cs/util/StringOps.java
/trunk/drjava/src/edu/rice/cs/drjava/model/definitions/DefinitionsEditorKit.java Diff Switch to side-by-side view
Loading...
/trunk/drjava/src/edu/rice/cs/util/StringOps.java Diff Switch to side-by-side view
Loading...
MongoDB Logo MongoDB