texstudio icon indicating copy to clipboard operation
texstudio copied to clipboard

Opening or closing sidel panel losts current position in editor

Open yrogge opened this issue 2 years ago • 9 comments

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.

yrogge avatar Dec 12 '23 12:12 yrogge

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.

yrogge avatar Dec 12 '23 14:12 yrogge

Same behavior if using Xorg (X11) windowing system. So that is not the problem source.

yrogge avatar Dec 13 '23 09:12 yrogge

this is related to soft wrapping and the number of visual lines changing when the widow width changes.

sunderme avatar Dec 16 '23 19:12 sunderme

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.

jzniu avatar Dec 26 '23 11:12 jzniu