-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
In the following lines in PluginWriter.java
bytecode-viewer/src/main/java/the/bytecode/club/bytecodeviewer/plugin/PluginWriter.java
Line 94 in 903ac6a
DefaultCaret caret = (DefaultCaret)area.getCaret(); |
bytecode-viewer/src/main/java/the/bytecode/club/bytecodeviewer/plugin/PluginWriter.java
Line 95 in 903ac6a
caret.setUpdatePolicy(DefaultCaret.NEVER_UPDATE); |
the caret update policy is set to NEVER_UPDATE. On my system (Windows 11 Pro 10.0.26100, Turkish Q keyboard layout), this causes the text direction to switch to right-to-left (RTL) instead of the expected left-to-right (LTR).
So accordingly chatgpt we should not use it as is and remove these lines.
❌ Why it’s not correct here:
NEVER_UPDATE disables automatic scrolling/focus updates when typing or editing.
It can break caret visibility, stop proper repainting, or cause layout/rendering glitches — especially in custom components like RSyntaxTextArea.
In your case, it was likely the cause of the RTL bug (even though it's not directly an orientation setting).
I’m unsure which caret update policy would be the best replacement, so instead of submitting a PR immediately, I wanted to open this issue.