Community
    • Login

    Is my Code Folding interfering with Change History and therefore producing orange lines

    Scheduled Pinned Locked Moved Notepad++ & Plugin Development
    8 Posts 4 Posters 718 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.
    • Guido ThelenG
      Guido Thelen
      last edited by Guido Thelen

      Hello dear community,
      my SQL Formatter plugin SQLinForm is creating orange background when a SQL has been formatted.
      I know that the “code change” feature has been introduced a while ago and I can avoid these orange lines by de-activating the change history, but I would really like to have this option activated and I am investigating how I could avoid the orange lines (see screenshot). Could this be related to the fact that I am creating a code folding bar right next to the line numbers and that this is interfering with the change hisrtory feature?

      d9c0edfb-af53-433f-87b4-babc5704c011-grafik.png

      Regards
      GuidoMarcel

      Alan KilbornA rdipardoR Michael VincentM 3 Replies Last reply Reply Quote 0
      • Alan KilbornA
        Alan Kilborn @Guido Thelen
        last edited by

        @Guido-Thelen

        Is your plugin setting the Change History margin to zero-width? That’s one way that the change indication will be shown in the background coloring of the text, rather than only in a margin.

        Guido ThelenG 1 Reply Last reply Reply Quote 1
        • rdipardoR
          rdipardo @Guido Thelen
          last edited by

          Could this be related to the fact that I am creating a code folding bar right next to the line numbers and that this is interfering with the change hisrtory feature?

          To elaborate what @Alan-Kilborn said, you can read Scintilla’s “official” explanation here:

          The background colour over the whole line occurs because there is no margin to show the marker and the backup method is to show the marker over the text. This may also occur for bookmarks and breakpoints.

          See this thread for an earlier report of this issue.

          Guido ThelenG 1 Reply Last reply Reply Quote 4
          • Michael VincentM
            Michael Vincent @Guido Thelen
            last edited by

            @Guido-Thelen said in Is my Code Folding interfering with Change History and therefore producing orange lines:

            Could this be related to the fact that I am creating a code folding bar right next to the line numbers and that this is interfering with the change hisrtory feature?

            Yes it could be. Notepad++ already has a code folding margin. The Notepad++ margins in use are:

            1. Line numbers
            2. Bookmarks (and hide lines markers)
            3. Change History (Scintilla feature)
            4. Code folding margin

            The 3. Code folding margin is not always present due to some languages not supporting folding. The “Normal Text” default file type for Notepad++ for example does not have this margin showing, but it still exists (0 width).

            If you’re adding your own code folding margin, you should use a margin that is not already in use by Notepad++ (SCI_GETMARGINS). Additionally, when you set the margin mask (SCI_SETMARGINMASKN), make sure to not use any of the markers allocated for Change History (21 - 24) or those in use by Notepad++ (17 - 20). Note that other plugins may use markers as well so there may be other conflicts, but that’s more out of your control than the Scintilla and Notepad++ ones.

            Cheers.

            Guido ThelenG 1 Reply Last reply Reply Quote 4
            • Guido ThelenG
              Guido Thelen @Michael Vincent
              last edited by Guido Thelen

              @Michael-Vincent Dear Michael-Vincent
              many thanks for your perfect explanation. I got it working now. Both, the change history and the code folding are now working fne. Will soon make the new release available.
              8c071e0a-be2f-43a7-a7b8-7165b3060cce-grafik.png

              Regards
              Guido

              Michael VincentM 1 Reply Last reply Reply Quote 5
              • Guido ThelenG
                Guido Thelen @Alan Kilborn
                last edited by

                @Alan-Kilborn Hi Alan, many thanks for your reply. Got it working now
                Regards
                Guido

                1 Reply Last reply Reply Quote 2
                • Guido ThelenG
                  Guido Thelen @rdipardo
                  last edited by

                  @rdipardo Hi, many thanks for your answer. Got it working now :-)

                  1 Reply Last reply Reply Quote 1
                  • Michael VincentM
                    Michael Vincent @Guido Thelen
                    last edited by

                    @Guido-Thelen said in Is my Code Folding interfering with Change History and therefore producing orange lines:

                    Dear Michael-Vincent
                    many thanks for your perfect explanation. I got it working now.

                    I don’t know about “perfect”, but glad it helped. Thank you for continuing the support of your plugin as Notepad++ gains new features and keeps pace with Scintilla updates. It’s an arduous process, but as you can see form this forum, there are many users who I’m sure appreciate your work.

                    Cheers.

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