Original message in MEW Support forum

Date: 9/25/2001 11:37a.m. 

Hello, 

It would be nice if the original line numbers were displayed on screen when using collapsed text, instead of renumbering the lines to compensate for the hidden/collapsed lines. 

I'm currently editing a perl program with embedded documentation. The documentation is bulky, and I've decided I'd 'collapse' the documentation so all I see is code. If I need to edit or view the docs, I can just expand the node. 

So I'm working on my code I get a run-time error saying 'error xxx on line yyy'. But since Multi-edit displays line numbers relative to the collapsed lines the line numbers reported by the compiler no longer match the line numbers displayed within ME9. 

For example, let says I have the following pseudo program: 

01 #!/usr/bin/perl 02 =head1 Title of documentation section 03 04 docs blah blah blah blah 05 06 =cut 07 08 print hello world\n; 

Line 8 is invalid, since I did not properly quote it. But if I collapse the documentation this is displayed in ME: 

01 #!/usr/bin/perl +02 =head1 Title of documentation section 03 04 print hello world\n; 

And then the compiler returns: "Syntax error on line 8" 

So I look at my source code and, of course, there is "no" line 8, only lines 1 through 4. I have to expand all nodes in order to visually find the true line that relates to the error. I haven't tried to use the "goto" feature, but I'd like the line numbers displayed on the screen to match the position the lines are in the source file. 

Would you make it an option to retain the 'original' line numbers before collapsing, so in my example it would display: 

01 #!/usr/bin/perl +02 =head1 Title of documentation section 07 08 print hello world\n; 

If this is already an option, please forgive my ignorance. I did not see any check boxes/radio buttons that seemed like they would allow me to do this, nor does there seem to be any mention of it in the 'Collapse' help items. 

Thank you, 

--James 
 
Response from ACI
Posted By: Dan Hughes - (ACI) 
Date: 9/25/2001 1:05p.m. 
In Response To: Feature request: Retain 'real' line numbers when using collapse feature (James Olsen) 
James, 

The line number on the status bar reflects the actual line number and the Goto Line will go to the actual line number and expand the text if needed. 

Dan 
 
My Response to their response :)
Posted By: James Olsen 
Date: 9/27/2001 3:12p.m. 
In Response To: Re: Feature request: Retain 'real' line numbers when using collapse feature (Dan Hughes - (ACI)) 
Thanks for the information, I'll keep it in mind while working with collapsed sections. 

Will you consider adding an option to display the line numbers in the main editor pane as their 'real' numbers, instead of their 'relative to collapsed text' numbers? 

In any case, thank you for a wonderful product! 

--James 
To illustrate this effect, take this pseudo perl code. Pay attention to the purple line numbers on the left-hand side of the editing pane:


When collapsed by subroutines, this is what the code looks like. Again, pay attention to the purple line numbers on the left-hand side of side of the editing pane:


If you receive an error on line 16 (## blah h), if you are using the collapsed feature, navigating to line 16 isn't convenient. You can use the 'jump' command to jump to line 16, but in this scenario it still appears as "line 006", not "line 016".

Yes, I'm aware that the status bar at the bottom of the MEW window does reflect the proper line number. I would like the option to changee the line numbers on the left-hand side of the editing window to reflect the actual line in the file, not the relative line number based on what is collapsed above the line.