RSyntaxTextArea
RSyntaxTextArea copied to clipboard
I can't reliably set cursor for RSTA
I change cursor for the component RSTA.setCursor(myCursor). However this would be overwritten with user CTRL + mouse move (a user wanted to click something while he/she was moving mouse).
I suspect the issue is around RSyntaxTextArea.mouseMove (line 3499).
Unless there is already solution, I believe we need a fix. What if we override setCursor, remember the cursor and replace
c2 = Cursor.getPredefinedCursor(Cursor.TEXT_CURSOR)
in the mouseMove with
c2 = savedCursorInSetCursorMethod
I found a workaround for me which works perfectly in my case textArea.setHyperlinksEnabled(false)
Your suggestion seems like a good idea, but I tested it out and it results in some glitchy back-and-forth cursor changing between the "editable text' cursor and the default arrow/pointer cursor when testing with a text area with setEditable(false) set (which is another easy way to reproduce this issue of lost primary cursor). Might need a slightly more sophisticated fix.