Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

Collapse level problem

2. Help
Anonymous
2012-10-28
2012-11-13

  • Anonymous
    2012-10-28

    Hello. I notice problem in collapse level.

    After file open, and collapse level (Alt+1, Alt+2, etc), program collapse only couple lines, not all (i suppose one existing level row more).
    When I put Alt+1 couple of times, notepad collapse level for next couple of lines.
    When file is loaded, and You put curson at the end of the file, and then put Alt+1, all lines loaded file are collapsed properly.

    Example to recovery situation:
    1. Wrote this code and save to file:

    <?php
          class Class_A {
               
                function __construct () {
                      /*********
                      * Some comment
                      ***********/
                      echo 'a';

                      /*********
                      * Some comment
                      ***********/
                      echo 'a';

                     
                      /*********
                      * Some comment
                      ***********/
                      $this->db = new mysqli($c, $c, $c, $c);
                      if ($this->db->connect_errno) {
                            printf("Connect failed: %s\n", mysqli_connect_error());
                            exit();
                      }
                      $this->db->query ('SET NAMES `utf8`');
                      unSet ($c, $c, $c);
                      $this->c = $c;
                      unSet ($c);

                      /*********
                      * Some comment
                      ***********/
                      $query = sprintf ('SELECT * FROM `%1$s`',
                            $this->c . '_config'  // %1
                      );
                      if ($result = $this->db->query ($query)) {
                            while ($row = $result->fetch_assoc()) {
                                  $this->c[$row] = $row;
                            }
                      } else {
                            return FALSE;
                      }
                      $result->close();
                     
                }

                /* Some comment */
                function f2 () {
                      echo 'b';
                }
          }
    ?>

    2. Close this file.
    3. Open this file.
    4. Press Alt+1. You make see that "function __construct" is collapsed, but "function f2" is not collapsed.
    5. Now press Alt+1 once again. You make see that "function f2" is collapsed now.

    One more example:
    1. Open this file (previously close old instance of this file)
    2. Press Ctrl+End.
    3. Press Alt+1. You make see that both functions are collapsed.

    Is this a some small bug?