SlickEdit Community

SlickEdit Product Discussion => SlickEdit® => Topic started by: jbhurst on February 05, 2007, 11:19:11 pm

Title: enumerate command padding broken since SE 11?
Post by: jbhurst on February 05, 2007, 11:19:11 pm
Hi,

I can't believe I haven't hit this earlier -- I used to use the enumerate command all the time.

It seems to me that with SE 10 the command

enumerate 1 1 2

does what I want it to -- fill the block with numbers, starting at 1, incrementing by 1, and padding to 2 digits wide.

With SE 11.0.2 (and 12 beta), I don't get padding.

What gives?

John Hurst
Title: Re: enumerate command padding broken since SE 11?
Post by: hs2 on February 06, 2007, 09:17:04 am
Confirmed - it's broken (at least in v11.0.2):
gdigitwidth is erroneously declared in local scope too:

You could fix it by replacing:
enum.e - enumerate() [line 189]:
Code: [Select]
   typeless start, increment, gdigitwidth;
   parse cmdline with start increment gdigitwidth;
   if (gdigitwidth=="") gdigitwidth=0;

with:
Code: [Select]
   typeless start, increment, digitwidth;
   parse cmdline with start increment digitwidth;
   gdigitwidth = (digitwidth=="") ? 0 : digitwidth;

HS2
Title: Re: enumerate command padding broken since SE 11?
Post by: hs2 on February 06, 2007, 09:54:15 am
v12 is also affected - added to SE2007 beta board.

HS2
Title: Re: enumerate command padding broken since SE 11?
Post by: mgweeks on February 06, 2007, 04:51:01 pm
Wow! Thats a cool command. Wish I'd known about it ages ago. Guess I need to read the manual.
Title: Re: enumerate command padding broken since SE 11?
Post by: Lee on February 06, 2007, 05:19:46 pm
Thanks for reporting this and for already posting a work-around, it will be fixed in future releases (though this fix did not make it in time for the next impending beta drop).