Rendering issue when Mark Occurrences is enabled

Questions on using RSyntaxTextArea should go here.

Moderator: robert

Rendering issue when Mark Occurrences is enabled

Postby groggy » Sun Mar 10, 2013 2:13 pm

I think I've found a small bug. If you fit a texteditorpane in a rtextsrollpane and that one is fit in a jtabbedpane and you type some text in it, the whole textarea has the color of the highlightedline. And that happens also when you try to delete the text with back space. I think you can force this by holding the alt mask down and then try to delete some text with backspace.
The same problem exists when I use a rsta
EDIT:
it also happens when I fit the rtextsrollpane directly in the jframe.

Admin edit: Modified the title of the thread to be more specific.
groggy
 
Posts: 34
Joined: Sun Feb 17, 2013 1:11 am

Re: [BUG]

Postby robert » Mon Mar 11, 2013 1:15 pm

What I think you're referring to is a quirk in the way Swing JTextComponents handle Highlights. When the "end" offset of a Highlight is removed from the Document, in some scenarios their rendering can go wonky.

If I'm not mistaken, when this does happen it's only temporary (about 1 second) as RSTA then re-does the "mark occurrences" highlighting. Is that correct?

If it isn't, please post or mail me an SSCCE demonstrating the problem. Or better yet, file a bug report on RSTA's SourceForge page including the SSCCE so the issue can be tracked.
User avatar
robert
 
Posts: 801
Joined: Sat May 10, 2008 5:16 pm

Re: Rendering issue when Mark Occurrences is enabled

Postby groggy » Mon Mar 11, 2013 3:53 pm

Yes you're right. :) after a second it disappears or if you hit a key
groggy
 
Posts: 34
Joined: Sun Feb 17, 2013 1:11 am

Re: Rendering issue when Mark Occurrences is enabled

Postby groggy » Mon Mar 11, 2013 8:00 pm

You already tried to pre repair the problem with the toggle command on qwertz keyboards, but you have made a little mistake.
Code: Select all
 InputMap im = textArea.getInputMap();
// Old shortcut doesn't hurt, but might as well remove it.
im.remove(KeyStroke.getKeyStroke(KeyEvent.VK_SLASH, textArea.getToolkit().getMenuShortcutKeyMask());
im.put(KeyStroke.getKeyStroke(KeyEvent.VK_SLASH, InputEvent.SHIFT_MASK|InputEvent.CTRL_MASK), RSyntaxTextAreaEditorKit.rstaToggleCommentAction);
 


but in the put command it shouldn't be VK.Slash it should be VK.7

only a little hint ;)
groggy
 
Posts: 34
Joined: Sun Feb 17, 2013 1:11 am


Return to Help

Who is online

Users browsing this forum: Bing [Bot] and 5 guests

cron