Skip to content

Fix caret with inline notes

Waqar Ahmed requested to merge work/caret-adjust into master

At the moment if you have an inline note as follows:

word[inline note]

and if you click right after the letter 'd', unexpectedly the cursor isn't placed where you click. The reason for this is that by default cursor is placed after a character and not "in between" the character. Since inline notes modify the character width, placing the cursor right after 'd' would mean the cursor is "in between" a character. Logically this behaviour is correct but visually incorrect.

This change fixes it visually by painting the cursor where a user would expect it ie., beside the letter.

Edited by Waqar Ahmed

Merge request reports

Loading