Community
    • Login

    Collapse level 1 no longer collapses just functions

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    4 Posts 2 Posters 3.2k Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Jeremy RichemontJ Offline
      Jeremy Richemont
      last edited by

      Hi. This is a very useful feature that allowed me to see just function names and expand just those I was working on. However; I have discovered that it does not like commented out functions. It seems to get confused, leaves the commented out function unfolded and starts folding if statements for the remainder of the file.

      Example (apologies for lack of indentation; it gets stripped):

      static f1() {
      blah;
      }

      //static int f2() {
      // blah;
      //}

      static int f3() {
      if (test) {
      blah;
      }
      }

      if you collapse level 1 on that you get:

      static int f1() { // folded correctly
      }

      //static int f2() { // ignored
      // blah;
      //}

      static int f3() { // not folded but the ‘if’ inside is.
      if (test) {
      }
      }

      I have probably just not noticed this behaviour before but it doesn’t seem right to me…

      Any ideas?

      Claudia FrankC 1 Reply Last reply Reply Quote 0
      • Claudia FrankC Offline
        Claudia Frank @Jeremy Richemont
        last edited by

        Hello @Jeremy-Richemont,

        afaik this is a feature which comes from the lexer (scintilla)
        because when I use your code and choose python lexer it works correctly.
        If C/C++ lexer is used it behaves like you reported.
        Those lexers are part from the underlying scintilla component.

        Cheers
        Claudia

        1 Reply Last reply Reply Quote 0
        • Jeremy RichemontJ Offline
          Jeremy Richemont
          last edited by

          Hi Claudia. So this is something I’ll just have to live with unless someone fancies fixing the underlying component notepad++ is based on, right? Ah well. I will just have to make all my functions useful and not comment any out, then!

          Cheers;
          Jeremy

          1 Reply Last reply Reply Quote 0
          • Claudia FrankC Offline
            Claudia Frank
            last edited by

            Hi Jeremy,

            So this is something I’ll just have to live with unless someone fancies fixing the underlying component notepad++ is based on, right?

            I’m afraid, yes.

            Cheers
            Claudia

            1 Reply Last reply Reply Quote 0

            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

            With your input, this post could be even better 💗

            Register Login
            • First post
              Last post
            The Community of users of the Notepad++ text editor.
            Powered by NodeBB | Contributors