Page 1 of 2

Wrong caret position in Linux-aarch64-qt5 version

Posted: 11.12.2021 17:28
by somewhat
The more to right in the long line, the more is the cursor displayed behind the real position in text.

Example: I want to edit the word 'fusce' and change it to 'fusoce', so I put the cursor between 's' and 'c'.
sit1.png
Now I press 'o' key:
sit2.png
The 'o' letter has been prepended to following word, so the cursor position was 3 characters ahead!

No problem on the first word of the line. More to the right, the cursor is "in the middle" of the letter, then one character behind and so on.

Affected version is: https://www.fosshub.com/CudaText.html?d ... 2.1.tar.xz
Version: https://www.fosshub.com/CudaText.html?d ... 2.1.tar.xz is OK (on the same computer).

Armbian Linux version 5.10.60-sunxi64 (root@runner7) (aarch64-linux-gnu-gcc (GNU Toolchain for the A-profile Architecture 8.3-2019.03 (arm-rel-8.36)) 8.3.0, GNU ld (GNU Toolchain for the A-profile Architecture 8.3-2019.03 (arm-rel-8.36)) 2.32.0.20190321) #21.08.1 SMP Wed Aug 25 18:29:57 UTC 2021

I don't really need to have this problem fixed as I can use the Gtk2 version which is fine. Just wanted to report it.

Posted: 11.12.2021 18:02
by main Alexey
I think it's fixable via the option "renderer_tweaks__linux". For qt5. pls try this:

Code: Select all

  if 'w' in value: Use simplified calculation of average character width.
                   On Windows, 'w' is good.
                   On macOS, 'w' is bad.
                   On GTK2, 'w' is not needed.
                   On Qt5, 'w' gives various results, it depends on Desktop Environment.

Posted: 11.12.2021 18:04
by main Alexey
Sub-option 'o' will help too, but it will be slower.

Posted: 11.12.2021 19:13
by somewhat

Code: Select all

{
  "renderer_tweaks__linux": ""
}
has fixed the problem but the displayed text was cropped from the left - the more the horizontal scrollbar position was to the right, the more the text was cropped from the left.
sit3.png

Code: Select all

  "renderer_tweaks__linux": "o"
With this setting, the displayed cursor was ahead of the real position (just the opposite problem) and the text cropping was also present.

Code: Select all

  "renderer_tweaks__linux": "wo"
seems the right option for me. The displayed and real cursor position correspond and the text cropping from the left doesn't appear. Problem solved, thanks.

Btw. my window manager is fvwm2 and my display manager is xdm.

Posted: 11.12.2021 19:32
by main Alexey
Somehow the OS config (DE?) affects this cropping - I don't see the cropping on Ubuntu 20.

Posted: 11.12.2021 19:35
by main Alexey
Ops,now I see it in qt5 version. will investigate!

Posted: 12.12.2021 10:31
by main Alexey
Qt5/macOS: cropping with scrolled text - fixed, will be in the next version.
You will be able to change option
"renderer_tweaks__linux": "wo"
to
"renderer_tweaks__linux": ""
w/o "o" it is faster.

Posted: 12.12.2021 17:40
by somewhat
OK, thanks. I'll check that when the new version is available.

Posted: 12.12.2021 18:24
by main Alexey
It is available from today.

Posted: 12.12.2021 20:22
by somewhat
"renderer_tweaks__linux": "" doesn't work for me then.
sit4.png