Community
    • Login

    UDL Code folding on keyword

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    16 Posts 4 Posters 1.4k Views
    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.
    • rdipardoR
      rdipardo @Lycan Thrope
      last edited by

      Thanks in advance for anything you can find that might fix this or at least verify the possible problem with the UDL that might be able to be fixed, simply. :)

      Try converting the EOLs to Windows style (CRLF). The UDL lexer is known to increment comment fold levels too far in Unix EOL mode:

      • https://github.com/notepad-plus-plus/notepad-plus-plus/issues/10988
      • https://github.com/notepad-plus-plus/notepad-plus-plus/issues/11130
      1 Reply Last reply Reply Quote 2
      • Lycan ThropeL
        Lycan Thrope
        last edited by

        @rdipardo ,
        My file does use CR/LF but I did find something out…adding extra returns resulting in that CR/LF combo, DOES move that folding box around, but unfortunately, it seems to be inconsistent in it’s application.

        My document is arleady set for Windows CR/LF per this capture:
        AUDLKeywordError2.PNG So even with the proper setting, it apprears to me, like the end of a document that needs at least 2 characters at the end of a file to allow syntax highlighting or other things to function is the fault, again. Not being able to pinpoint the exact reason or rhyme to make that folding stop jumping around is the problem. It’s apparent that the code folding implementation per what is expected is at fault. Not sure if or how that could be fixed so at least I did find out a little more about it, but it sure would be nice if it worked like it’s supposed to. Thanks for that insight.

        EkopalypseE 1 Reply Last reply Reply Quote 0
        • EkopalypseE
          Ekopalypse @Lycan Thrope
          last edited by

          @lycan-thrope

          there seems to be a problem with the comment style.
          When I open the file, it initially looks like this

          a287a79c-8b75-4eef-864c-f99649bbd832-image.png

          by changing the comment style it looks ok

          d4a3fb5e-e254-4bf6-ab93-6def55384d12-image.png

          Hopefully it’s a useful workaround for you, but there’s clearly a problem here. Let’s see if I, or someone else, can find the reason.

          Lycan ThropeL 1 Reply Last reply Reply Quote 0
          • Lycan ThropeL
            Lycan Thrope @Ekopalypse
            last edited by Lycan Thrope

            @ekopalypse ,
            Actually, it doesn’t. If you look at the post code in line comment at line 9, the comment is now not syntax highlighted. On top of that, after doing your suggestion, the change didn’t hold after switching tabs and coming back. I do appreciate the thought, though. I had tried what you did before, but figured maybe you had something, but after doing it I found the problems. I even used both, an empty space and the ((EOL)) symbol to make sure they worked, but unfortunately, and this is why the two line comment symbols were in the Comment Style instead of the Comment Line Style, because the Asterisk that is a comment in dBASE must be the on the line alone with maybe some white space, other wise a multiplication symbol triggers a comment condition in the code where it doesn’t belong. Believe me, I worked on this several different ways to get the syntax highlighing properly, but to get the other two line comment symbols to work, I had to change to Allow anywhere, which would trigger the multiplication symbol *, to be mistaken as a comment symbol. :( I don’t doubt the comments issue may play a part, but as I tried and found out, changing tabs puts the folding back into an offset way that is wrong.

            EkopalypseE 1 Reply Last reply Reply Quote 2
            • EkopalypseE
              Ekopalypse @Lycan Thrope
              last edited by Ekopalypse

              @lycan-thrope

              Of course, I believe you have tested this thoroughly, and my suggestions should be a compromise between correct folding and commenting.
              The inline comments could simply be defined, in addition, as delimiters.
              What’s odd is that you still see problems when you switch tabs, I don’t.
              Tested reload, move to other view and switching tabs when edited buffer was saved or unsaved.

              810b6a6f-cf56-4a61-b3d4-4aa7902256d8-image.png

              Lycan ThropeL 3 Replies Last reply Reply Quote 1
              • Lycan ThropeL
                Lycan Thrope @Ekopalypse
                last edited by

                @ekopalypse ,
                My computer must be haunted. :)
                I’ll play with it some more and see what happens, but thanks for taking the time to play with this…fresh eyes are best, but since you’re using the stuff I uploaded, it’s beyond me why it’s behaving differently with regards to the tabs switching not allowing the folding to stay put. ::shrug::

                1 Reply Last reply Reply Quote 0
                • Lycan ThropeL
                  Lycan Thrope @Ekopalypse
                  last edited by

                  @ekopalypse ,
                  Well, I think you solved the problem Eko…I just did the move of the // & && to the delimiters, changed the styler to duplicate comment highlighting and erased the set in the comment section…and it worked. The tab switching held this time saved and unsaved…not to see if closing and reopening allows it to stay the same. Yep, closing the file, opening from recent, and when it opened, even though plain dBASEPlus mode it wasn’t fixed, as soon as I switched it to Dark_dBASEPlus mode (where I had made the changes you showed) it popped right back to where it belonged. Barring anymore haunted happenings…thank you very much for possibly finding the fix. :) Will let you know if it starts acting up. :)

                  1 Reply Last reply Reply Quote 1
                  • Lycan ThropeL
                    Lycan Thrope @Ekopalypse
                    last edited by

                    @ekopalypse ,
                    Just changed the dBASEPlus version and same results. Thanks for the fix. This kind of goes counter to what the Ivan documentation suggests for doing comments dialog box, but hey, it works and I’m a happy camper now. :) Thanks again.

                    EkopalypseE 1 Reply Last reply Reply Quote 1
                    • EkopalypseE
                      Ekopalypse @Lycan Thrope
                      last edited by

                      @lycan-thrope

                      Good to see that it works the same for you. I thought maybe I had something on my computer that was affecting this. I wouldn’t call it a fix, more of a workaround because I think it should work the way you and I and probably everyone else expects it to. Unfortunately the code part in question is more than 1000 lines long, so it’s not that easy, but having a reliable way to show this behavior is “half the battle” (I’m not sure if it means the same as “half the rent,” as we say in Germany).

                      Lycan ThropeL 1 Reply Last reply Reply Quote 1
                      • Lycan ThropeL
                        Lycan Thrope @Ekopalypse
                        last edited by

                        @ekopalypse

                        @ekopalypse said in UDL Code folding on keyword:

                        (I’m not sure if it means the same as “half the rent,” as we say in Germany).

                        We don’t use that phrase, but I understand the analogy as being similar. :)

                        As you point out, it doesn’t work as one expects, and is hard to diagnose if it doesn’t at least follow the rules as laid out in documentation, which is why it was so hard to fix, and how you figured it out makes you more of a magician. :)

                        Either way, thanks again, and now I need to make an updated package and let your users know we have gotten it fixed. It was the one glaring shortcoming to making it similar to the dBASE IDE editor, which is based on SCITE also.

                        1 Reply Last reply Reply Quote 1
                        • First post
                          Last post
                        The Community of users of the Notepad++ text editor.
                        Powered by NodeBB | Contributors