Author Topic: v22: Collapsing Selective Block in Some ES6 Not Working  (Read 2709 times)

PiezonTM

  • Senior Community Member
  • Posts: 140
  • Hero Points: 8
v22: Collapsing Selective Block in Some ES6 Not Working
« on: October 16, 2017, 01:27:12 PM »
Using the "plusminus" command/feature ("Expands or collapses selective display blocks") does not work for sub-methods of an ES6 method.  I attached a simple example of the problem.  If you open the file and go to "_inner2" and attempt to use "plusminus" it is not collapsing the complete function.  The for loop in the function is still shown.  If you try the same operation on "OUTER_METHOD" it does work fine.  Also, interestingly enough, the same test works fine for "_inner1".

I'm running v22 under Ubuntu 16.04.  The problem also occurred with RC4.

patrick

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 1818
  • Hero Points: 151
Re: v22: Collapsing Selective Block in Some ES6 Not Working
« Reply #1 on: October 16, 2017, 03:14:07 PM »
This works for me in that file.  At first, I was a little confused because there's a for loop identical to the on inside _inner2 right after _inner2's body, but I changed the comments to be sure.

I'm just going to the first non-blank column of _inner2 and running plusminus there.  Are you invoking it from a different source position?

PiezonTM

  • Senior Community Member
  • Posts: 140
  • Hero Points: 8
Re: v22: Collapsing Selective Block in Some ES6 Not Working
« Reply #2 on: October 16, 2017, 05:31:14 PM »
I added some of the other loops after finding the original problem only to show it working with for loops in other locations.

Attached is a simplified version of the problem.  Go to line 37 then (Ctrl+\) invoke "plusminus".  I expect (as it does everywhere else) to collapse the entire "_inner2".  Instead only the comment at L39-42 are collapsed--not the for loop or closing break for "_inner2".

patrick

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 1818
  • Hero Points: 151
Re: v22: Collapsing Selective Block in Some ES6 Not Working
« Reply #3 on: October 16, 2017, 05:47:11 PM »
Works for me with that file as well.  Can you post your user.cfg.xml from your configuration directory?  I'm wondering if there's a difference in our selective view settings that's the culprit.

PiezonTM

  • Senior Community Member
  • Posts: 140
  • Hero Points: 8
Re: v22: Collapsing Selective Block in Some ES6 Not Working
« Reply #4 on: October 17, 2017, 11:41:56 AM »
Here is my configuration, hope this helps.

patrick

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 1818
  • Hero Points: 151
Re: v22: Collapsing Selective Block in Some ES6 Not Working
« Reply #5 on: October 17, 2017, 02:24:00 PM »
Sadly, this one doesn't want to be easy.  I can't reproduce it with your config, and I haven't found anything that looks likely.

Let's check something I can't verify here.  Start up SlickEdit like this, so it runs with a blank configuration directory in /tmp/no_such_dir (replace with your install location):
Code: [Select]
/opt/se22/bin/vs +new -sc /tmp/no_such_dir
Open your example file, and see if you can reproduce the problem.  Then load your macro files, ~~~LOAD_ALL_MACROS~~~.e, funct_Header.e, and file_Header.e.  On the SlickEdit command line, run "show-all", and then see if you can reproduce the problem after that.  And let me know the results - that should at least halve the possibilities.

PiezonTM

  • Senior Community Member
  • Posts: 140
  • Hero Points: 8
Re: v22: Collapsing Selective Block in Some ES6 Not Working
« Reply #6 on: October 17, 2017, 03:43:14 PM »
Interesting tests.  I ran your command and was not able to reproduce the problem.  I then loaded the macros I had written over time and should not reproduce the problem.  I then ran "show-all" and still could not reproduce the problem.

I went back to my other running SE (I kept it running while running your other tests).  All I did was ran "show-all", then tried the test and it went away.  I then closed my original SE and opened it again and tried the test.  The problem has gone away.  I am not sure if the "show-all" was the trick or recompiling the loaded scripts from old that had some conflict.  Either way, the problem has gone.

Thanks for the help and the time.  Wish I could have nailed it down.

patrick

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 1818
  • Hero Points: 151
Re: v22: Collapsing Selective Block in Some ES6 Not Working
« Reply #7 on: October 17, 2017, 03:54:20 PM »
Hmm, it at least gives us some hints.  It could be something was amiss in the line flags, or some of the other buffer state, that wouldn't be reflected the user.cfg.xml.   Thanks for trying that out for us.

PiezonTM

  • Senior Community Member
  • Posts: 140
  • Hero Points: 8
Re: v22: Collapsing Selective Block in Some ES6 Not Working
« Reply #8 on: October 18, 2017, 05:20:39 PM »
Turns out the problem came back today--without closing SE.  So it seems to come and go.  Also, I ran `show-all`, then tried to collapse that function and then it worked fine.  Not sure if this helps, but thought I'd pass it on.