Add a fake (without any use) caret
Answered
I got two questions:
1. I want to show another caret (with a given offset) in a different color and that I can update for any position. How is that possible?
2. What is the fastest or most effective way to receive caret position offset for every caret change?
Please sign in to leave a comment.
Hi,
For the first question, I would like to get an offset for a caret (let's say I got it from function caretPositionChanged()) and draw in this offset some type of rectangle or any sign that will show the user there is a caret there. It might remind Google Docs, the sign of other users typing is the thing I am trying to implement here.
For the second question, it might be the thing I am looking for, thanks!
Hi Ilan,
It sounds like you try to implement something similar to the Code With Me feature available in IDEA: https://www.jetbrains.com/code-with-me/. Maybe there is no need to implement your feature at all if Code With Me covers it.
If you need to do something else, please take a look at the following APIs:
You can implement your EditorCustomElementRenderer drawing a cursor you need.