I have some kind of weird behavior in Netbeans. I guess I accidentally entered some key combination which messed up the cursor and selection behavior. In the image you'll see what I mean: normally, if you select text across multiple lines, you'll see the behavior on the right screenshot.
But I have the behavior on the left screenshot. Also, trying to insert text at a certain position with Shift, inserts it some positions to the right (= not where the cursor is). Additionally, when the cursor blinks, it appears dashed.
The fact that the selection in the left screenshot is drawn nicely doesn't make me think of a bug, but rather of a feature. I can't seem to find the key combination to turn it off again.
So my question is, what is this feature? Why does it exist and with what key combination did I turn it on?
Then go to Tools... Options... Editor If you now go to tab "Code Templates" you can check in the code sample box and see that the cursor appears with the new color. The trick is to click Apply (doing and undoing any other change) from this tab so the cursor setting will make effect.
The value="0" portion can be customized by desired blink rate in miliseconds, the default value used by NetBeans IDE is 300 in my opinion, but it can be changed with a new value, 0 will mean no blinking. Start NetBeans IDE again and now you will get your desired blink rate for the cursor in Java files.
One possibility is you have the Rectangular Selection plugin installed.
However, the more likely candidate is the rectangular selection feature in the editor core. Find the button on your edit toolbar, and toggle it off. As per helpful comments below, this can accidentally be switched on (and toggled back off again) using:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With