Author Topic: enumerate command padding broken since SE 11?  (Read 4625 times)

jbhurst

  • Senior Community Member
  • Posts: 405
  • Hero Points: 33
enumerate command padding broken since SE 11?
« 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

hs2

  • Senior Community Member
  • Posts: 2747
  • Hero Points: 288
Re: enumerate command padding broken since SE 11?
« Reply #1 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

hs2

  • Senior Community Member
  • Posts: 2747
  • Hero Points: 288
Re: enumerate command padding broken since SE 11?
« Reply #2 on: February 06, 2007, 09:54:15 am »
v12 is also affected - added to SE2007 beta board.

HS2

mgweeks

  • Community Member
  • Posts: 24
  • Hero Points: 1
Re: enumerate command padding broken since SE 11?
« Reply #3 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.

Lee

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 1299
  • Hero Points: 130
Re: enumerate command padding broken since SE 11?
« Reply #4 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).