<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - clang-format 7.0.0 does not account for lines inserted due to include regrouping when computing new cursor position"
   href="https://bugs.llvm.org/show_bug.cgi?id=37868">37868</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>clang-format 7.0.0 does not account for lines inserted due to include regrouping when computing new cursor position
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>new-bugs
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Macintosh
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>MacOS X
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>new bugs
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>developer@martinwinter.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>In clang-format 7.0.0, when the option “IncludeBlocks: Regroup” is active with
at least two “IncludeCategories”, the new cursor position after formatting does
not account for any inserted lines between include groups. I can reliable
reproduce this: For example, when an existing number of includes (not separated
by empty lines) is grouped into three new groups, the inserted two lines are
not accounted for, causing a cursor located below the includes to jump towards
the beginning of the document by two characters. In other words, the numeric
cursor position remains the same (e. g. 913) when it should have been increased
(e. g. by 2 to 915). Positioning works fine above or within the includes
themselves.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>