Author Topic: whitespace not allowed in execute selection?  (Read 995 times)

pbrightly

  • Community Member
  • Posts: 68
  • Hero Points: 6
whitespace not allowed in execute selection?
« on: May 17, 2021, 11:53:19 PM »
Is there any reason whitespace should not be allowed in execute_selection()?  I tend to keep all my notes using Slick, and I frequently keep some handy commands in my notes, allowing me to simply press Alt-= on any line to execute it.
I also like to format my text by levels of indentation using tabs and/or spaces.  Unfortunately, that causes execute_selection() to fail with a bad return code.  Easy fix, I just put strip() around the string and reloaded the module.  Should that be official? Or is there some reason not to do that?

PS. When I modify one of Slicks modules rather than my own, how is that effected on my next update?  Does it get overwritten?

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 6882
  • Hero Points: 530
Re: whitespace not allowed in execute selection?
« Reply #1 on: May 18, 2021, 04:07:52 AM »
What command are you executing? I tried adding leading space for a couple different commands and they both worked.

pbrightly

  • Community Member
  • Posts: 68
  • Hero Points: 6
Re: whitespace not allowed in execute selection?
« Reply #2 on: May 18, 2021, 12:56:36 PM »
I've had many different things in my notes, often "e" or a "diff" command of ugly long paths to check my work against known-good files.  Make sure the leading space is tabs.  Two in the case below, if my paste is identical.
Code: [Select]
e .shellcheckrc
e tools/bin/common.sh
e tools/bin/logging.sh
e tools/bin/utils.sh
e tools/bin/common_example.sh
Reminder: I'm on Windows. I like using unix style paths as they work, and I can cut/paste to my Ubuntu command line.

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 6882
  • Hero Points: 530
Re: whitespace not allowed in execute selection?
« Reply #3 on: May 18, 2021, 07:24:55 PM »
Ah. The problem is leading tabs. Thanks

We are working on 25.0.2 at the moment. I'll add a hot fix for 25.0.2 since I think it's too late to add another fix to 25.0.2