#806 PHP code unfolds when starting string above it

Bug
open-invalid
Neil Hodgson
Scintilla (791)
1
2009-05-31
2009-05-31
shemminga
No

Hi,

When starting to type a string above an existing PHP code fold, the fold unfolds.

For example, if the following code is folded:
if ($x === 'foo') {
print 'bar';
}

And you start to type before it:
$x = "

You will notice that the fold unfolds itself

Discussion

  • Neil Hodgson
    Neil Hodgson
    2009-05-31

    This behaviour is as-defined. The " starts a string which includes all of the if test so there are no operator braces to fold on.

     
  • Neil Hodgson
    Neil Hodgson
    2009-05-31

    • priority: 5 --> 1
    • assigned_to: nobody --> nyamatongwe
    • status: open --> open-invalid
     
  • I understand.

    Wouldn't it be more sensible to keep folds as they are when starting a string above it? Even if this means the fold-point disappears (temporarily)? The current behaviour makes code folding unusable in PHP.

     
  • Neil Hodgson
    Neil Hodgson
    2009-06-01

    Its completely impossible to retain folds when their state changes to 'no fold here'.