Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-24113

Use of Beautifier and its format on save option mess up scrolling

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reported
    • Priority: Not Evaluated
    • Resolution: Unresolved
    • Affects Version/s: Qt Creator 4.11.0
    • Fix Version/s: None
    • Component/s: Editors
    • Labels:
      None
    • Platform/s:
      Linux/Wayland, Linux/X11

      Description

      While editing a file whose vertical size exceeds the height of the screen, the behavior of the beautifier becomes unstable, the scroll bar is messed up.

      Here is how to reproduce this behavior:

      • Collapse the view of a long function/class, then add 2 empty lines after it, keeping the cursor on the second line.
      • Hit Ctrl+S with beautifier's format on save enabled. The scroll bar now shows the current line (black) is above it.
      • Scroll up one step. the editor now shows the beginning of the document.
      • Scroll further up, the editor now shows a blank page. This happens to be below the bottom of the document.
      • Scroll up a bit more to see the last line, then it starts to look normal, except the scroll bar. It has a long empty space under it that does not correspond to the document.
      • Now delete any line from the document, and the empty space disappears.

      I've attached here a file that shows that exact behavior.

      This happens on both Ubuntu 20.04 and OpenSUSE Tumbleweed 

        Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            Assignee:
            davschul David Schulz
            Reporter:
            uthidata Dat Ng
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:

                Gerrit Reviews

                There are no open Gerrit changes