Modify

Opened 13 years ago

Closed 13 years ago

#2297 closed Bug (Fixed)

Tidy copying last line(s) of script to top of the script

Reported by: BrewManNH Owned by: Jos
Milestone: Component: SciTE4AutoIt
Version: 3.3.8.1 Severity: None
Keywords: Cc:

Description

Occasionally when I run Tidy on a script, with or without any custom settings for Tidy, I will get the last line or 2 posted to the top of the script

#endregion Function listing
;  
; 
; 
#region ;**** Directives created by AutoIt3Wrapper_GUI ****

The #endregion directive is actually the last line of my script, and it got stuck up at the top of the script. Sometimes the line that gets put at the top of the script is missing from the file after the Tidy process has finished, most of the time it's still there, just copied.

This doesn't happen everytime I use it, but it happens frequently enough that I figured I should let someone know about it.

Also, this happens on large or small scripts of only a few lines. It also doesn't matter which OS I'm using as it happens on XP (x86), Vista (x64 and x86) and Windows 7 (x64 and x86).

Attachments (0)

Change History (7)

comment:1 by guinness, 13 years ago

Component: Standard UDFsOther

comment:2 by Jos, 13 years ago

To be able to look at this I would need:

  • Scriptlet to reproduce the issue.
  • Tidy version used.

Thanks
jos

comment:3 by Jos, 13 years ago

Component: OtherSciTE4AutoIt
Owner: set to Jos

comment:4 by BrewManNH, 13 years ago

I used the latest version in the Beta section, 2.3.0.1 and it is demonstrating the same issue. I finally tracked it down to what will cause it almost every time for me.

#Tidy_Parameters=/rel /sf
Func Test()
	;do something here


EndFunc   ;==>Test

When I run Tidy on this, I get 2 copies of the EndFunc line at the top of the script. It only happens when you use /rel and /sf together, I have it set that way in the tidy.ini file so it took some doing to figure out which was causing the problem. If you add more lines that have to be removed, you get more copies of the last line at the top of the script.

comment:5 by J-Paul Mesnage, 13 years ago

perhaps also related with that the last line NL is not enforced.

comment:6 by Jos, 13 years ago

@BrewManNH,

Thanks you for the snippet, I can now replicate the problem and will have a look.

Jos

comment:7 by Jos, 13 years ago

Resolution: Fixed
Status: newclosed

Fixed in v2.3.0.5

Modify Ticket

Action
as closed The owner will remain Jos.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.