Modify

#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, on Jan 9, 2013 at 11:53:14 PM

Component: Standard UDFsOther

comment:2 by Jos, on Jan 10, 2013 at 4:14:11 PM

To be able to look at this I would need:

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

Thanks
jos

comment:3 by Jos, on Jan 10, 2013 at 4:38:07 PM

Component: OtherSciTE4AutoIt
Owner: set to Jos

comment:4 by BrewManNH, on Jan 16, 2013 at 5:47:37 PM

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 Jpm, on Jan 18, 2013 at 8:29:53 AM

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

comment:6 by Jos, on Jan 27, 2013 at 9:15:13 PM

@BrewManNH,

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

Jos

comment:7 by Jos, on Mar 2, 2013 at 8:36:23 PM

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.