Community
    • Login

    Notepad++ just can't remember the barckground color setting of the "Line number Margin" in Global Styles

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    5 Posts 2 Posters 242 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.
    • D
      Demolemon11
      last edited by

      The barckground color setting of the “Line number Margin” will automatically change into disabled (some slashs) when NP++ restarts.

      debug info:
      Notepad++ v7.9.5 (64-bit)
      Build time : Mar 21 2021 - 02:13:17
      Path : C:\Softwares\NotePadPP\notepad++.exe
      Admin mode : ON
      Local Conf mode : ON
      OS Name : Windows 10 Enterprise LTSC 2019 (64-bit)
      OS Version : 1809
      OS Build : 17763.1490
      Current ANSI codepage : 936
      Plugins : AnalysePlugin.dll ComparePlugin.dll XBrackets.dll

      PeterJonesP 2 Replies Last reply Reply Quote 0
      • PeterJonesP
        PeterJones @Demolemon11
        last edited by

        @Demolemon11 ,

        The barckground color setting of the “Line number Margin” will automatically change into disabled (some slashs) when NP++ restarts.

        That’s not technically “disabled”: it really means “inherit from Default” – but I guess it’s okay if you want to think of it as “disabled”.

        It’s a known bug with the Style Configurator that if one of the styles starts as “inherit from Default” when you load Notepad++, it will “get stuck” and even if you change it for this instance, it will come back as “inherit from Default” again when you reload.

        To work around this bug:

        1. Exit all copies of Notepad++, then reload with just one instance.
        2. Open c:\Softwares\NotePadPP\stylers.xml
          • Assuming you are using the default theme, this is the right file, based your “Local Conf mode : ON” and the notepad++.exe path in your debug info.
          • If you are using a different theme, like DarkModeDefault for example, you would edit c:\Softwares\NotePadPP\themes\DarkModeDefault.xml (or whichever theme you are using, in the themes\ directory)
          • most users would edit %AppData%\Notepad++\stylers.xml for the default theme, and %AppData%\Notepad++\themes\<ThemeNameHere>.xml for any other theme.
        3. Search for “Line Number Margin” in the <Global Styles> section: cee2b254-eaff-4848-9f2b-8ae5aa4e62c0-image.png
        4. Delete the colorStyle="1" attribute completely: 43963726-e9f0-4674-860f-c5be14971412-image.png
        5. Save
        6. Exit Notepad++ completely, then restart. The colorStyle attribute should have stayed how to set or delete it, and the margin should now be the color set, rather than inheriting from the default background.
        1 Reply Last reply Reply Quote 2
        • D
          Demolemon11
          last edited by

          It worked out nicely since I had followed your steps.
          Thanks so much!

          1 Reply Last reply Reply Quote 1
          • PeterJonesP
            PeterJones @Demolemon11
            last edited by PeterJones

            @Demolemon11 said in Notepad++ just can't remember the barckground color setting of the "Line number Margin" in Global Styles:

            Admin mode : ON

            BTW: Unless you have a really good reason (ie, you are only editing protected files, like ones in c:\windows\ or c:\program files\), in general, it is best to not use Admin Mode when running Notepad++ , except on the rare occasion you need the extra permissions. (It makes it, for example, that you cannot simply drag a file from a Windows Explorer window into Notepad++, because the Explorer isn’t run as Admin but Notepad++ was.)

            Notepad++ v7.9.5 (64-bit)
            Build time : Mar 21 2021 - 02:13:17

            Also, you’re on v7.9.5, which was released in March 2021; the current version is v8.6.9: that’s really out-of-date. If there ever is a bug fix for the “inherit from default” setting in the GUI, you are going to have to upgrade if you want that bugfix. And there have been a lot of improvements in Notepad++ in the last 3.5 years, so you’re probably missing out on other important fixes. Upgrading or not is, of course, your choice… but again, I’d recommend at least trying out v8.6.9 (in a portable edition, if you don’t want to overwrite your installed copy)

            D 1 Reply Last reply Reply Quote 2
            • D
              Demolemon11 @PeterJones
              last edited by

              @PeterJones
              Thanks for suggestion.
              However, I use an unusual windows version that only remain a ADMINISTRATOR account, many functions was striked out, like switching accounts.
              Thus, NP++ just can only run as a super administrator.
              My old Laptop just can’t carry newer windows’ softwares

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