[New Plugin] ExtSettings



  • First, thank you for your work on this plugin, I’ve found it very useful!

    I would like to report two small issues. The first is with adding vertical lines.
    Expected Behavior: I enter a column, I click “Add”, I get a new vertical line in that list in the bottom left.
    Actual Behavior: I enter a column, I click “Add”, and I get no response. I need to select a color first, even though the color picker implies that it’s defaulting to black.

    This behavior led me to believe your plugin was bugged until I looked into it more. Making this a bit more user-friendly by actually having it default to black (or grey if you’re worried about people using dark themes) would help.

    The second issue. With the Extended Settings menu open, when I alt-tab out of Notepad++, I cannot alt-tab back in.
    Expected Behavior: Open ExtSetting Menu. Alt-tab onto a window that covers Notepad++. Alt-tab back to Notepad++. Notepad++ should be the top-level window graphically and in the alt-tab menu.
    Actual Behavior. Open ExtSetting Menu. Alt-tab onto a window that covers Notepad++. Alt-tab back to Notepad++. Notepad++ is not the top-level window graphically, but IS the top-level window in the alt-tab menu.



  • @Charles-Bogel

    Thank you for your issue reports. You are absolutely right with both of them. Unfortunately I’m very busy in my job for the next months. So, don’t expect a short-time fix, sorry.



  • @dinkumoil
    Thanks for this nice plugin.
    Is it possible to add on the UI a button to apply the configuration ?

    Thanks



  • @cmeriaux

    You mean applying the settings without closing the dialog? I already thought about it. I agree it would be useful.

    But as I said, currently I’m so busy in my job that I’m happy to be off-keyboard late in the evenings and even at the weekends.



  • @dinkumoil yes that’s it. You perfectly got my point ;-)

    Are you on github ? Any chance that someone else can contribute ?



  • @cmeriaux

    The plugin is hosted at SoureForge in an SVN repository and is written with Delphi XE2. If you have an SourceForge account we can talk about collaboration. Another possibility would be to exchange *.patch files.



  • @dinkumoil said in [New Plugin] ExtSettings:

    Delphi XE2

    It would have been nice but I don’t know anything in Delphi XE2
    sorry



  • Finally, Backspace unindents!

    Thanks OP, much appreciated



  • @dinkumoil

    In Notepad++ v7.9.1 32-bit the settings are not being saved.

    Any chance of an update?



  • @Jeb-Dude

    In Notepad++ v7.9.1 32-bit the settings are not being saved.

    I’m not able to reproduce that with a portable v7.9.1 32 bit.

    Any chance of an update?

    It’s in the pipeline, but it may still take a while.



  • @dinkumoil ,

    I just had the strangest bug, that appears to be in (or at least affected) ExtSettings v1.2.1. The ExtSettings.ini file got corrupted to be all NULL bytes! I didn’t have a Notepad++ crash, so I’m not sure what could have caused that. And it seemed to happen in the middle of a Notepad++ editing session.

    Backstory and debug: I woke my computer this morning, and was working in a web editor in my browser.
    I think I had done selecting earlier this morning without difficulty, but I’m not 100% sure. But this time, when I went to copy some text from Notepad++ to my browser, and the selection highlighting was gone in Notepad++. I checked Style Configurator, which showed proper Selected text colour. Restarting Notepad++ didn’t fix it; rebooting didn’t fix it; I verified other apps still highlighted properly. Running a fresh portable unzip of Notepad++ didn’t have the problem – so I knew it was something specific to my normal instance of Notepad++. I temporarily renamed all my normal Notepad++ config files and restarted, to make sure that stylers.xml or something else hadn’t been corrupted, but still no highlighting. Disabled all my plugins, and the problem went away. Restored my normal config files with plugins disabled, and highlighting still worked. Enabled all the plugins and the problem returned, so confirmed it was a plugin problem of some sort. Enabling one at a time narrowed it down to highlighting stopped working when ExtSettings was loaded. I renamed ExtSettings.ini and restarted with ExtSettings enabled, and everything worked normally. I changed a setting in there (to force it to save a new ExtSettings.ini) and restarted, and it was still working. When I compared the renamed file to the new ini, I saw that the old/renamed version was 153 bytes of NULL, instead of 153 bytes of ini text.

    So it sounds similar to the old Notepad++ NULL bug, but it’s with the ExtSettings.ini file. I haven’t ever manually edited the ExtSettings.ini file directly in Notepad++, so I don’t think it was a problem with the editor directly. And I hadn’t recently made any changes to the ExtSettings through the plugin GUI, so I am not sure why it would have been trying to write/edit the INI yesterday or today. There has not been a recent crash of my OS or of Notepad++. I know that yesterday, I wasn’t having any difficulty selecting text, so the NULL corruption either happened while just in the course of normal Notepad++ editing this morning, or it happened when my computer went to sleep last night and/or when it woke up this morning. So, I unfortunately don’t have a repeatable circumstance for you to try to replicate the bug. (I know, I hate it when others report bugs without a repeatable circumstance.)

    @dinkumoil , When you create/open/write the INI file, are you using ‘CreateFile’ or similar API calls? If so, are you using the FILE_FLAG_WRITE_THROUGH to make sure it writes right away, rather than caching first? If you need help, I know that @pnedev is an expert on that now. :-)

    Notepad++ v7.9.2   (64-bit)
    Build time : Dec 31 2020 - 04:01:34
    Path : C:\usr\local\apps\notepad++\notepad++.exe
    Admin mode : OFF
    Local Conf mode : ON
    OS Name : Windows 10 Enterprise (64-bit) 
    OS Version : 1903
    OS Build : 18362.1256
    Current ANSI codepage : 1252
    Plugins : ComparePlugin.dll ExtSettings.dll HexEditor.dll LuaScript.dll MarkdownViewerPlusPlus.dll mimeTools.dll NppConsole.dll NppConverter.dll NppEditorConfig.dll NppExec.dll NppExport.dll NppFTP.dll NppUISpy.dll PreviewHTML.dll PythonScript.dll QuickText.dll TagLEET.dll XMLTools.dll 
    


  • @PeterJones

    For writing the settings file I use a Delphi class that encapsulates the handling of INI files. AFAIK this class uses some Windows APIs for INI files (e.g. GetPrivateProfileString). Thus I don’t know if buffered write comes into play when the file is saved.

    The plugin’s INI file is written when its dialog is closed (the dialog’s window is destroyd as well in this moment). That means the last change of this file happened when you used the plugin for the last time. Thus, I have no clue what could have caused NUL-ing the INI file - especially as you wrote

    I hadn’t recently made any changes to the ExtSettings through the plugin GUI, so I am not sure why it would have been trying to write/edit the INI yesterday or today.

    Sorry, I have no idea how this could have happend and how to reproduce this incident.


Log in to reply