Watch, Follow, &
Connect with Us
Public Report
Report From: Delphi-BCB/IDE/Code Editor/Code Formatter    [ Add a report in this area ]  
Report #:  93638   Status: Closed
Code Formater inserts incomplete CRLF sequence
Project:  Delphi Build #:  15.0.3953.35171
Version:    15.1 Submitted By:   Dalija Prasnikar
Report Type:  Basic functionality failure Date Reported:  5/6/2011 3:02:21 AM
Severity:    Commonly encountered problem Last Updated: 3/20/2012 2:24:39 AM
Platform:    All platforms Internal Tracking #:   283158
Resolution: Fixed (Resolution Comments) Resolved in Build: : 16.0.4225.42024
Duplicate of:  None
Voting and Rating
Overall Rating: No Ratings Yet
0.00 out of 5
Total Votes: 10
Under specific circumstances when formatting only the selection of the code, formatter will eat first character of the
selected code and insert only CR at the and of the selection.

After that not having a complete CRLF sequence in source code results in other bugs (like Error Insight and Code Completion not working properly)

I think that Copyright character in Documentation region in
attached sample code causes misbehavior. Other international characters cause the same misbehavior.
Steps to Reproduce:
1. Select following options:
  Error Insight - on
  Source Options - Show Line Breaks - on
  Formatter Options:
   Keep user line breaks - false
   Line breaks un Uses clauses - yes

2. Open attached project
3. Open - XSpace.Engine file
4. Error Insight will show red lines under - TSomething, and all line breaks will be normal CRLF pairs
5. Select uses + Classes, XSpace.Controls, XSpace.Classes; lines
6. Press Ctrl + D to invoke formatting
7. As the result formatter will eat up "u" character from uses and add only CR at the end of the selection
8. Error Insight will now show errors in wrong lines

I have also attached images of described behavior before.jpg shows code before, and after.jpg after formatting.


Server Response from: ETNACODE01