Sublime Forum

Wrong fold behavior

#1

Hi,

The fold command (ctrl+shift+[) works well when a cursor is on the ‘// body…’ line

But when the cursor is on the same line with curly brackets, the upper function folds. It should behave like the first example.

0 Likes

#2

This is due this two issues on the Sublime Text core:

  1. #1343 Highlight the inner scope and braces when selecting its open brace
  2. #101 Code Folding should be based on syntax, not on indentation level

The from #1343 we see where the current folding scopes starts on Sublime Text. And from the #101 we see how Sublime Text do the folding nowadays.

You may up vote they:

1 Like