• Login
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 799 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.
  • G
    Guido Thelen
    last edited by Guido Thelen Jan 26, 2023, 9:59 PM Jan 26, 2023, 9:39 PM

    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

    A R M 3 Replies Last reply Jan 27, 2023, 12:06 AM Reply Quote 0
    • A
      Alan Kilborn @Guido Thelen
      last edited by Jan 27, 2023, 12:06 AM

      @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.

      G 1 Reply Last reply Jan 27, 2023, 12:33 PM Reply Quote 1
      • R
        rdipardo @Guido Thelen
        last edited by Jan 27, 2023, 12:24 AM

        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.

        G 1 Reply Last reply Jan 27, 2023, 12:34 PM Reply Quote 4
        • M
          Michael Vincent @Guido Thelen
          last edited by Jan 27, 2023, 12:53 AM

          @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.

          G 1 Reply Last reply Jan 27, 2023, 12:32 PM Reply Quote 4
          • G
            Guido Thelen @Michael Vincent
            last edited by Guido Thelen Jan 27, 2023, 12:35 PM Jan 27, 2023, 12:32 PM

            @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

            M 1 Reply Last reply Jan 27, 2023, 12:46 PM Reply Quote 5
            • G
              Guido Thelen @Alan Kilborn
              last edited by Jan 27, 2023, 12:33 PM

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

              1 Reply Last reply Reply Quote 2
              • G
                Guido Thelen @rdipardo
                last edited by Jan 27, 2023, 12:34 PM

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

                1 Reply Last reply Reply Quote 1
                • M
                  Michael Vincent @Guido Thelen
                  last edited by Jan 27, 2023, 12:46 PM

                  @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
                  2 out of 8
                  • First post
                    2/8
                    Last post
                  The Community of users of the Notepad++ text editor.
                  Powered by NodeBB | Contributors