Skip to content

PluginWriter.java: Setting Caret Update Policy to NEVER_UPDATE Causes Right-to-Left Text Behavior #549

@CyberGhost13337

Description

@CyberGhost13337

In the following lines in PluginWriter.java

DefaultCaret caret = (DefaultCaret)area.getCaret();

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.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions