Watch, Follow, &
Connect with Us
Public Report
Report From: Delphi-BCB/IDE/File Handling    [ Add a report in this area ]  
Report #:  37462   Status: Closed
IDE may select the wrong file when performing a ctrl + left-click on a filename in the editor
Project:  Delphi Build #:  Up2+Hotfixes
Version:    10.0 Submitted By:   Pierre le Riche
Report Type:  Basic functionality failure Date Reported:  12/7/2006 10:04:06 AM
Severity:    Commonly encountered problem Last Updated: 3/20/2012 2:24:39 AM
Platform:    All platforms Internal Tracking #:   243420
Resolution: Fixed (Resolution Comments) Resolved in Build: : 14.0.3513.24210
Duplicate of:  None
Voting and Rating
Overall Rating: (6 Total Ratings)
5.00 out of 5
Total Votes: 69
Sometimes when you ctrl + left-click or right-click->"Open File At Cursor" the editor selects the wrong file.

This bug makes working with files from different projects, but with the same filenames, very tricky. Sometimes when I work on the latest version of my software I may have units of the old version open in the editor (for reference purposes). I have to be very vigilant to avoid accidentally editing the wrong file, because the IDE's ctrl and left-click mechanism cannot always be trusted.

Refer to "steps" and the attached files for an example.
Steps to Reproduce:
1) Extract the attached files into a folder, preserving the folder structure
2) Start the BDS (Win32)
3) File->Open and select Folder1\Project1.dpr
4) File->Open and select Folder2\Unit1.pas
5) Click on the "Project1.dpr" tab in the editor
6) Hold down Ctrl and left-click (or right-click->"Open File At Cursor") on "Unit1" on the line "Unit1 in 'Unit1.pas';" in the editor.

Up to this point everything is as expected. In step 6 the editor opens up the correct Unit1.pas, ignoring the incorrect one located in Folder2 which is also listed among the editor tabs.

7) Press Ctrl-F9 to compile the project
8) Click on the "Project1.dpr" tab in the editor
9) Hold down Ctrl and left-click (or right-click->"Open File At Cursor") on "Unit1" on the line "Unit1 in 'Unit1.pas';" in the editor.

Expected: The editor changes tabs to the correct Unit1.pas from Folder1 (as it did previously)
Actual: The editor focuses on the tab for the wrong Unit1.pas - the one located in Folder2


Server Response from: ETNACODE01