rubberduck-vba / Rubberduck

Every programmer needs a rubberduck. COM add-in for the VBA & VB6 IDE (VBE).
https://rubberduckvba.com
GNU General Public License v3.0
1.91k stars 300 forks source link

Indent deletes and adds empty lines under procedure #4017

Closed SonGokussj4 closed 6 years ago

SonGokussj4 commented 6 years ago

RD - Indent - Procedure

If another procedure under current procedure and there is a blank line between them then

blank line deleted

If another procedure under current procedure and there is not a blank line between them then

adds blank line

If another procedure not under current procedure and there is a blank line then

everything is good

But if there is not a blank line

adds a blank line

Video for better understanding :-)

nmyiceu

retailcoder commented 6 years ago

Just to clarify the MCVE, what's your configuration for the 'maintain vertical spacing' indenter setting?

image

SonGokussj4 commented 6 years ago

Same as you. Okay, I didn't know about this. But that shouldn't remove the blank line if there is a single one, doesn't it? I think.

So. When I tried Vertial Spacing = 2, here's what happens. From 2 blank lines it will remove the first one. On another run it will remove the second. As it is on video. BUT when I try it for the third time, it will create not 1 blank line but 2.