Bug 462778 - Formatting error - extra lines added to multiline comments
Summary: Formatting error - extra lines added to multiline comments
Status: NEW
Alias: None
Product: LDT
Classification: Tools
Component: LuaDevelopmentTools (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 8
: P3 normal
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-03-22 04:48 EDT by Dane Tr CLA
Modified: 2015-03-27 18:34 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dane Tr CLA 2015-03-22 04:48:32 EDT
The issue is pretty simple.  For multiline comments the formatter adds a new space between every line.  This is not exactly what I would like but it would be ok except for one problem.  The major problem is that it does this EVERY time I run the formatter, so that if I run the formatter 5 times, there will be five blank lines between every real line in a multiline comment.

If you would fix this, I would be grateful.  Thank you for making such a great editor free!
Comment 1 Simon Bernard CLA 2015-03-23 11:27:07 EDT
It's strange. The behavior we expect is to not indent at all the content of  multiline comment.

I just test the last 1.3M2 on my laptop(linux/debian) and it works for me.
https://www.eclipse.org/ldt/

I also tested it on windows 7 64 bits and it's works for me too :/.

Which version did you try ? 
Do you get the same problem with the 1.3M2 version ? 
Have you test it on another OS than windows 8 ?
Comment 2 Dane Tr CLA 2015-03-27 18:34:39 EDT
(In reply to Simon Bernard from comment #1)
> It's strange. The behavior we expect is to not indent at all the content of 
> multiline comment.
> 
> I just test the last 1.3M2 on my laptop(linux/debian) and it works for me.
> https://www.eclipse.org/ldt/
> 
> I also tested it on windows 7 64 bits and it's works for me too :/.
> 
> Which version did you try ? 
> Do you get the same problem with the 1.3M2 version ? 
> Have you test it on another OS than windows 8 ?

Hello, first I'm sorry for the delayed response; I tried replying to the email, but that did not work I see.  As to your comment, I only have windows 8.1

To be more clear, the problem is not that commented lines are indented, but rather that new lines are added.  So this:

--[[
hello this is a
multiline comment
]]

becomes

--[[

hello this is a

multiline comment

]]

after one format command.  If I run the formatter again it adds another line to each line, so the above becomes:

--[[


hello this is a


multiline comment


]]

This problem does not exist if lines are commented out individually like this:
--hello
--this
--is fine
It's only with the --[[]] multiline comments.

Thanks!