#14 DumbCompleteWordAction doesn't work for the second word

closed-fixed
5
2011-03-28
2011-03-14
Stefan Willinger
No

I tried the featue "complete the current word with the most recent word" and encountered, that this will not work, if the most recent word is the word starting at position 0.
e.g follow line will complete the word after hitting SHIFT+SPACE
my yellow lemon is yell

the follow line will NOT complete the last word after hitting SHIFT+SPACE
yellow is yell

DumbCompleteWordAction breaks, if the start position of the word is 0. But in my opinion, this should be a correct start position.

int wordStart = Utilities.getPreviousWord(textArea, searchOffs);
if (wordStart==0 || wordStart==BreakIterator.DONE) {
UIManager.getLookAndFeel().provideErrorFeedback(textArea);
break;
}

Stefan

Discussion

  • Robert Futrell
    Robert Futrell
    2011-03-22

    Fixed in SVN revision 298. Also changed the shortcut for this action to Ctrl+Enter to prevent annoying accidental triggering.often seen with old shortcut. There will be a small maintenance release (1.5.1) soon that includes this fix also.

     
  • Robert Futrell
    Robert Futrell
    2011-03-22

    • labels: --> Keyboard Shortcuts
    • assigned_to: nobody --> robert_futrell
    • status: open --> pending-accepted
     
  • Robert Futrell
    Robert Futrell
    2011-03-28

    Fixed in 1.5.1.

     
  • Robert Futrell
    Robert Futrell
    2011-03-28

    • status: pending-accepted --> closed-fixed