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

When running "Rewrap Paragraph" with tab indentation, text overflows margin (tabs are treated as 1 space wide)

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Not Evaluated
    • Qt Creator 8.0.0-beta1
    • Qt Creator 7.0.2
    • Editors
    • None
    • Windows 10 Ameliorated, Qt Creator set to always use tabs, 4 spaces wide
    • Windows
    • b4b779d641 (qt-creator/qt-creator/8.0) b4b779d641 (qt-creator/qt-creator/master)

    Description

      When I type a C++ block or line comment wider than the right margin, then "Rewrap Paragraph" (Ctrl+E R), the wrapped paragraph can overflow the right margin. This happens because Qt Creator treats leading tabs as 1 space wide. If I replace all leading tabs with a single space each, then the text looks correctly wrapped.

      Qt Creator should instead treat each tab as N spaces wide (based on settings), or use the actual width of each tab (which can vary due to spaces or characters before the tab, but tabs after spaces is an edge case that should never appear in properly formatted documents, and characters cause Qt Creator to no longer treat the tab as indentation),

      Attachments

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

        Activity

          People

            davschul David Schulz
            nyanpasu64 Nyan Pasu
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes