Author Topic: Ctrl+\ (plusminus) behavior  (Read 689 times)

jporkkahtc

  • Senior Community Member
  • Posts: 1720
  • Hero Points: 170
  • Text
Ctrl+\ (plusminus) behavior
« on: December 21, 2014, 05:05:11 am »
Open stdcmds.e
Goto line 7518
This is in skip_word on this line:

    if( def_vcpp_word ) {
Put the cursor on the { and type Ctrl+\
I'd expect that it would collapse to
    if( def_vcpp_word ) {
        }elseif (def_brief_word && (!p_UTF8 && !_dbcs())) {[
But instead it collapses the if and the else clauses.


Now, change line 7518 - place the { on next line.
View->Show All
Place the cursor on the { and again try Ctrl+\
Now, slick fails to collapse a block.
"Nothing to expand or collapse"


View->Selective->MultiLevel: It will create separate blocks for the if and the else.




Undo the changes.
Now change the else, place the ELSE on a separate line from the }.
View -> Show All

Place the cursor on the { and again try Ctrl+\
Now, slick collapses more like I would expect:
   if( def_vcpp_word ) {
   }
    else if (def_brief_word && (!p_UTF8 && !_dbcs())) {




Sometimes on if/else statements Slick will collapse just the IF clause, sometimes both, and sometimes it fails entirely.