You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying to block select the second curly brackets, TeXstudio selects the wrong characters in the 3rd line
The same issue is not present in other editors such as VS Code
I suspect the issue originals from ℂ coming from a different block in Unicode than the other double stroke characters and taking less bytes, so somehow TeXstudio counts ℂ only as 1 character, but it counts 𝔹 as 2 characters. This can be verified by the column number: right after ℂ TexStudio says we are at column 17, right after 𝔹 TeXstudio thinks we are at column 18.
Qt: Using Qt Version 5.15.3, compiled with Qt 5.15.3 R
OS: Ubuntu 22.04 LTS
TeX distribution: texlive-2021
The text was updated successfully, but these errors were encountered:
randolf-scholz
changed the title
TeXstudio Double counts Unicode Characters leading to wrong alignment
TeXstudio double counts Unicode characters leading to wrong alignment
Jun 21, 2022
the issue is that QString strores data as utf-16. 𝔸 uses two 16-bit characters, ℂ only one. QString does not abstract that behaviour and txs relies on character counting from QString.
Fixing this is complicated, since doing it right would touch quite a lot of code.
As the impact for now is minor, I leave it as is.
Consider the following code
When trying to block select the second curly brackets, TeXstudio selects the wrong characters in the 3rd line
The same issue is not present in other editors such as VS Code
I suspect the issue originals from
ℂ
coming from a different block in Unicode than the other double stroke characters and taking less bytes, so somehow TeXstudio countsℂ
only as 1 character, but it counts𝔹
as 2 characters. This can be verified by the column number: right afterℂ
TexStudio says we are at column 17, right after𝔹
TeXstudio thinks we are at column 18.I originally posted this issue here: https://tex.stackexchange.com/questions/644310/using-texstudio-with-unicode-incorrect-cursor-position
Environment
The text was updated successfully, but these errors were encountered: