netbeans icon indicating copy to clipboard operation
netbeans copied to clipboard

Have a non blinking cursor.

Open mibi88 opened this issue 7 months ago • 3 comments

Description

I found the quickly blinking cursor stressing/disturbing. I found on the internet that setting <entry javaType="java.lang.Integer" name="caret-blink-rate" xml:space="preserve"><value>0</value></entry> can make it non blinking but it makes it disappear entirely.

Use case/motivation

I would like an option for a non-blinking cursor because it makes it more comfortable to use in my opinion.

Related issues

No response

Are you willing to submit a pull request?

No

mibi88 avatar May 20 '25 19:05 mibi88

this might be a JDK bug since the value is simply passed to the Caret instance: https://github.com/apache/netbeans/blob/b53a8a4b768c06f1c5612cd3054e969be2227270/ide/editor.lib/src/org/netbeans/editor/BaseTextUI.java#L213-L217

according to the doc, 0 will make it stop blinking: https://docs.oracle.com/en/java/javase/21/docs/api/java.desktop/javax/swing/text/Caret.html#setBlinkRate(int)

as workaround, you could change this into a large value, which would have the same effect in practice:

add this line

    <entry javaType="java.lang.Integer" name="caret-blink-rate" xml:space="preserve"><value>100000</value></entry>

to [config_folder]/[version]/config/Editors/Preferences/org-netbeans-modules-editor-settings-CustomPreferences.xml

mbien avatar May 21 '25 10:05 mbien

I've tried with other LookAndFeels and it doesn't change anything, the cursor stays hidden.

Image

I've installed it from flathub. Here is the about dialog:

Image

Note: I've erased the name of my home directory in the screenshot.

mibi88 avatar May 21 '25 12:05 mibi88

this isn't look and feel related. Simply set the value to a larger number and it should stop blinking.

mbien avatar May 21 '25 12:05 mbien

I want no blinking, too. Facing the same issue. Used your workaround for now.

ys659 avatar Oct 14 '25 18:10 ys659