Modify

Opened 11 years ago

Closed 11 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 Changed 11 years ago by guinness

  • Component changed from Standard UDFs to Other

comment:2 Changed 11 years ago by Jos

To be able to look at this I would need:

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

Thanks
jos

comment:3 Changed 11 years ago by Jos

  • Component changed from Other to SciTE4AutoIt
  • Owner set to Jos

comment:4 Changed 11 years ago by BrewManNH

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 Changed 11 years ago by Jpm

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

comment:6 Changed 11 years ago by Jos

@BrewManNH,

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

Jos

comment:7 Changed 11 years ago by Jos

  • Resolution set to Fixed
  • Status changed from new to closed

Fixed in v2.3.0.5

Guidelines for posting comments:

  • You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
  • In-depth discussions should take place on the forum.

For more information see the full version of the ticket guidelines here.

Add Comment

Modify Ticket

Action
as closed The owner will remain Jos.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.