Opening or closing sidel panel losts current position in editor
Environment
- TeXstudio: 4.7.1
- Qt: 5.15.10
- OS: Ubuntu Mantic (23.10)
- TeX distribution: TeXLive 2023, LuaHBTeX version 1.17.0
Expected behavior
When you open or close the side panel, without selecting any item, the current position in your TeX source has not to be affected.
Actual behavior
The current position in editing panel is automatically moved "elsewhere" in the source. It seems to be related to an incorrect managing of the internal display position in editing panel, affected by the width modification of it. If you open then close the side panel without moving inside the source, you are back in the initial position. The position in the preview plane is not affected.
How to reproduce
Use any sufficiently large source, \ie with 3 or 4 sections, 3 pages or more, a.s.o.
The same strange behavior happens when the global window is maximized or unmaximized. Maybe the problem lies in the interface with the system display. Refreshing delayed or frozen ? NB. I'm using the Wayland windowing system (with Mutter). I don't have the same problem with other applications.
Same behavior if using Xorg (X11) windowing system. So that is not the problem source.
this is related to soft wrapping and the number of visual lines changing when the widow width changes.
I ran into a similar problem with the latest version 4.7.1 on Windows 10. After I close texstudio and reopen it, the cursor is not back to where I was in the opened document. This is different from previous versions of texstudio. I don't see any particular pattern of the new cursor position in the document.
UPDATE: after testing with fresh portable 4.6.3, 4.7.1, and 4.7.2, I can confirm that it's the viewport of editor not showing the exact position of the opened document, although the cursor remains to be the correct position (not inside the viewport). All these versions have the same issue. This issue started to arise not long time ago, but I don't know exactly since which version.