RSyntaxTextArea icon indicating copy to clipboard operation
RSyntaxTextArea copied to clipboard

Select Word using double click do not work second time if mouse is not moved

Open ovna01 opened this issue 2 years ago • 0 comments

Description Select Word using double click do not work second time if mouse is not moved.

Steps to Reproduce Open RSyntaxTextAreaDemoApp

  1. Enter a word e.g. "help"
  2. Double click on the word to select it
  3. Single click to remove selection without moving the mouse
  4. Double click on the word again without moving the mouse to select it -> now the word is not selected

Expected behavior The second double click should select the word again

Actual behavior The second double click does not select the word again

Java version Java 17.0.4.1 Eclipse Adoptium

Additional context The problem is probably due to that the class ConfigurableCaret overrides the method mouseClicked(MouseEvent e) and do not set the selectedWordEvent=null as in the overridden method in DefaultCaret. The selectedWordEvent is used in the DefaultCaret method selectWord(MouseEvent e) to check if the mouse position has changed.

ovna01 avatar Aug 24 '23 07:08 ovna01