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

After reloading modified document, save after undo forcefully cleans whitespace in entire document

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Not Evaluated
    • None
    • Qt Creator 4.11.0-rc1
    • Editors
    • None
    • Gentoo Linux AMD64. Qt Creator installed through the official binary installer.
    • Linux/X11

    Description

      I have the option that cleans up whitespace enabled, but the "in entire document" option is disabled.

      When a currently open file is modified externally, Creator shows a dialog where you can reload the file. When doing so, and using undo (ctrl+z by default) afterwards, Creator will clean up whitespace in the entire document.

      This turns out to be very unfortunate, as then you have to manually restore the whitespace throughout the file and a 3-minute git commit transforms into a 20 minute, whitespace-hunting ordeal.

      How to reproduce:

      • Open a source file.
      • Do a single edit and save.
      • Undo the edit and save.
      • Do `touch filename` in a terminal.
      • Click "Yes" when Creator asks to reload.
      • Undo (ctrl+z) several times until there's nothing more to undo.
      • Save.

      The last step will clean up whitespace in the entire document.

      Attachments

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

        Activity

          People

            davschul David Schulz
            realnc Nikos Chantziaras
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes