================
@@ -3134,20 +3135,24 @@ static void sortCppIncludes(const FormatStyle &Style,
     }
     result += Includes[Index].Text;
     if (Cursor && CursorIndex == Index)
-      *Cursor = IncludesBeginOffset + result.size() - CursorToEOLOffset;
+      NewCursor = IncludesBeginOffset + result.size() - CursorToEOLOffset;
----------------
owenca wrote:

```suggestion
      *Cursor = IncludesBeginOffset + result.size() - CursorToEOLOffset;
```
i.e. undo the change.

https://github.com/llvm/llvm-project/pull/77456
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to