# Text indicator not in the right place

**URL:** <https://discourse.processing.org/t/text-indicator-not-in-the-right-place/32073>\
**Category:** Processing\
**Created:** [September 3, 2021, 3:30pm UTC](https://discourse.processing.org/t/text-indicator-not-in-the-right-place/32073 "2021-09-03T15:30:48Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![KaliBrain](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kalibrain/32/10811_2.png) [@KaliBrain](https://discourse.processing.org/u/KaliBrain)\
**Post date:** [September 3, 2021, 3:30pm UTC](https://discourse.processing.org/t/text-indicator-not-in-the-right-place/32073/1 "2021-09-03T15:30:48Z")

</div>

This issue has nothing to do with code, it has to do with the text editor. I use Processing 4.0b1 64 bits on a windows 10 laptop…  
The program works fine except for the text indicator (the one that blinks and tells you where the next character you press on the keyboard will show up at) acting all wonky and not being placed where it should, which makes text editing confusing and time consuming…

In order to explain this problem I will refer to the indicator in 2 forms:  
where I see it on screen - **visual indicator** , and where my next letter will show up when I type in something - **actual indicator**.

The visual indicator seems to always move to the right of the actual indicator. This get progressively worse when the actual indicator is farther to the right.

here are some images to show what happens:

in the following image the visual indicator is shown on the blank space to the right of the number 30 but the actual indicator is on the rightmost number 0, and when I press backspace it deletes the 0 from the 30.  
 ![image](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/2/29fe5db6e48c3c394d46101e3f5c000407425eb6.png)

In the following image the actual indicator is to the right of 17 and to the left of 18 like this → (17\*18). and this time the visual indicator is placed at the digit 1 of the number 19. It seems that the visual indicator moves to the right without regarding the “blocks” that each char is placed in, it may go on top of numbers such as in this case…  
 ![image](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/0/06f19aab1355edca12e8c259afd7e9c872df34f1.png)

In the following instance, the actual indicator is placed between the digit 3 and 4 at the left, notice that the visual indicator is closer to the actual indicator more than the other instances…  
 ![image](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/f/fbe86f62487287667f2ad1ac117d0dad99c14ad1.png)

In the following instance is the actual indicator to the left of the 2 backslashes. notice that the visual indicator is in the same spot as the actual one. The visual indicator will overlap with the actual indicator in the next 2 spots as well, after that it starts getting farther away…  
 ![image](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/7/7b1f84b43711819f2aa84be8cd10609cb00d204e.png)

The only problem here is with the visual indicator, the actual indicator works just fine.  
any idea how to fix this??

---

<div class="post-metadata">

**Author:** ![rapatski](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/rapatski/32/5164_2.png) [@rapatski](https://discourse.processing.org/u/rapatski)\
**Post date:** [September 3, 2021, 10:07pm UTC](https://discourse.processing.org/t/text-indicator-not-in-the-right-place/32073/2 "2021-09-03T22:07:43Z")

</div>

Think it’s a known bug, and has to do with the GUI scaling in windows display settings:

> <https://github.com/processing/processing/issues/6213>
>
> The Caret indicator and the selection highlight become offset to the right as yo…u add more characters to a line when typing in the editor. After 19 characters the caret is moved to the right of about 1 character. The bug appears to happen with any combination of characters, including space. It also happens under all fonts listed in the preferences. When clicking in the middle of a line the location is properly selected but the caret indicator remains offset. This also occurs in insert mode.
> 
> The bug seems to just be visual and not actually altering the text in any way, though it makes editing lines difficult as there is no way to tell where the caret actually is or what characters are selected. 
> 
> Steps to Reproduce
> 
> 1. Create a new sketch
> 2. Type a string of text or code more than 20 characters long into a single line in the editor.
> 3. Replace a word in the middle of the string
> 4. Compare where the caret indicator is displayed to where characters are being added/deleted/replaced
> 
> 
> I am using a clean install of processing with no previous versions and no libraries or modifications made. This bug started occurring on the first sketch I created and it persists when reopening Processing and restarting the computer. Processing has editor font size set to 12 and the interface scale set to automatic.
> I have a copy of Java version 8 build 301 on this computer.
> \* Processing version: 4.0b1
> \* Operating System and OS version: Windows 10

---

<div class="post-metadata">

**Author:** ![KaliBrain](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kalibrain/32/10811_2.png) [@KaliBrain](https://discourse.processing.org/u/KaliBrain)\
**Post date:** [September 4, 2021, 11:38pm UTC](https://discourse.processing.org/t/text-indicator-not-in-the-right-place/32073/3 "2021-09-04T23:38:33Z")

</div>

Welp, seems there is no simple solution for this… I’m hoping it will be fixed in a new release/patch… after digging a bit through the link you(@rapatski) shared I found one solution which requires changing some windows settings, which in turn changes the display’s appearance, so it’s not an ideal solution but it works… It seems another possible solution is suggested in the discussion through the link but it involved some complicated file’s name and I’m too lazy to dig that deep to fix this problem…

In short, what helped was searching the settings for - “advanced scaling setting” then clicking the option that pops up - “Fix apps that are blurry” then write 100 into “custom scaling”.

PLEASE TAKE NOTICE - after changing this setting, I noticed that there is a warning next to this option of writing a custom scaling, which in short means that some apps may not work and may not be readable but most importantly that it may be hard to return to original settings(sigh…)… I was too lazy to read that stuff… I hope no further problems will ensue with regular computer usage…

---

<div class="post-metadata">

**Author:** ![KaliBrain](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kalibrain/32/10811_2.png) [@KaliBrain](https://discourse.processing.org/u/KaliBrain)\
**Post date:** [September 5, 2021, 5:12pm UTC](https://discourse.processing.org/t/text-indicator-not-in-the-right-place/32073/4 "2021-09-05T17:12:57Z")

</div>

SO, digging a bit more in the discussion shared above I found a solution. What worked for me was overriding the high DPI scaling to system(Enahanced) as explained in [this](https://blog.pauby.com/post/high-dpi-settings-windows-10#high-dpi-scaling-override) website.

Please watch out when changing windows settings, Hope this helps…
