Categories

  • Announcements regarding our community
    317 Topics
    5k Posts
    donhoD

    Notepad++ 8.9.4 Release Candidate is available here:
    https://github.com/donho/notepad-plus-plus/releases/tag/ReleaseCandidate

    Note that only MSI installer has been updated on the above link for new added #10, #11.

    Notepad++ v8.9.4 crash-fixes, bug-fixes & new improvements:

    Fix crashes in FindInFiles when nativeLang.xml’s “find-result-hits” contains “%s”. (Fix #17960) Fix drop-file crash when file path length reaches 259 characters. (Fix #17921) Update to Scintilla 5.6.1 & Lexilla 5.4.8. (Fix #17920, #17864, #13522, #11746) Fix EOL conversion to Windows format not working (Scintilla update related). (Fix #17920) Fix rendering corruption in .bat files (Lexilla update related). (Fix #17864) Fix quote escaping causing incorrect JSON syntax highlighting (Lexilla update related). (Fix #11746, #13522) Fix MSI installation error due to context menu item registration. (Fix #17918) Fix NSIS installation stalling caused by context menu registration issue. (Fix #17308, #17885) Add NPP_LANG property to install a specific localization file for MSI. (Fix issue reported in comment) Fix MSI installer display random Hexadecimal number as name on UAC. (Fix #17967) Add version info into MSI file property (as value of "Comments"). (Fix #17803) Fix minimized window not restoring in administrator mode. (Fix #17945) Fix Unicode search mismatching ANSI character ‘?’. (Fix #17125) Fix Column Editor regression with empty fields. (Fix #17912) Fix floating dialog content not displaying in certain situations. (Fix #17563) Fix visual glitch when toggling group view in Document List. (Fix #14285) Support improved C++ 11 raw string literal handling. (Fix #17875) Fix visual glitch in the Mark dialog. (Fix #16084, #17886)
  • Frequently Asked Questions and Guides (about Notepad++ and this Forum)

    38 Topics
    63 Posts
    PeterJonesP
    Themes in v8.8.9

    With the release of v8.8.9, there is a new feature which automatically updates the active Theme if it is missing Style Configurator settings for any GUI elements, or missing any Languages or any Style entries in existing Languages. This is a long-needed feature, so that as Notepad++ adds new styles for the Style Configurator, you’ll be able to set them, even if your theme hasn’t been updated since before those styles were added. (Before now, if you switched to a theme years ago and set any custom color or user keyword or custom file extensions for a built-in language, it would never update the theme, no matter how many times you update Notepad++ in the meanwhile. This v8.8.9 feature is able to correct that issue, and you will be able to use the Style Configurator to set the colors of any new styles going forward, as soon as you upgrade to a Notepad++ executable that supports the new style.)

    Unfortunately, the v8.8.9 implementation included some annoying growing pains: the procedure always uses the same colors that those styles have in the stylers.model.xml file (ie, the default “light mode” colors), even if you are using a dark theme, which can make for glaring color issues: on Languages that get new styles added, the text that should be that new style can end up as black-on-white text, even if the rest of the text has a dark background; and if the theme was old enough, some GUI elements (like the Bookmark margin and Change History margin, between the line numbers and the text being edited) may clash with the surrounding GUI elements.

    In the future v8.9 this issue will be fixed, so people who had an older theme and use v8.9 will see new styles show up using the default foreground and background colors of that theme, so they won’t clash: it might not highlight the new keywords, for example, but at least it won’t look worse than it used to.

    But unfortunately, once you run it in v8.8.9, your theme will no longer have those entries “missing”, and the glaring white background will be saved. The instructions below will help you with that:

    Instructions

    These instructions are only needed if you ran Notepad++ v8.8.9. If you upgraded from something earlier to v8.9-or-later, you do not need these instructions.

    Download the updated theme file(s) from the Source (see Download Source below) Depending on circumstances, decide whether you need to update the installation-directory theme, the user-config-directory theme, or both If you have a portable version of Notepad++, without using the Cloud directory or -settingsDir, then you need to just follow the instructions to Update Theme(s) in User Config Directory If you are not using a portable version of Notepad++, then it is recommended to follow Update Theme(s) in Installation Directory first, and then decide based on the next item whether to continue or not If you have any theme file(s) in the user-configuration directory (whether it’s %AppData%\Notepad++\themes\ or the Cloud directory’s .\themes subdirectory or the -settingsDir’s .\themes subdirectory, then you should follow the Update Theme(s) in User Config Directory for those.

    Please note: when correctly following step 2, you may need to follow multiple sets of instructions. Please read and understand each point under step 2 to make the right changes.

    Download Source

    The installer themes in the source code have been updated to have all the styles needed (to be able to fix the problems from v8.8.9). You can go here to grab the theme file(s) you want: https://github.com/notepad-plus-plus/notepad-plus-plus/tree/master/PowerEditor/installer/themes.

    Update Theme(s) in Installation Directory

    Except when you have a portable version of Notepad++, you will generally need to follow this set of instructions for the themes that come in the installation directory. In a normal installation of Notepad++, the installation will be in c:\program files\Notepad++ directory or equivalent, and the installation-directory themes will thus be in c:\program files\Notepad++\themes. (See the Instructions section above for the decision process to know for sure whether to use this section.)

    Exit Notepad++ Go to the URL mentioned in the Download Source section (above), and download the raw version of your Theme file(s) Use Explorer to go to c:\program files\Notepad++\themes\ directory Copy the downloaded Theme(s) into that directory, overwriting what’s there When you run Notepad++ next time, it will use the updated theme, and the glaring color issues should be gone.

    If you have customized your theme with user-keywords or user-extensions, then this won’t be sufficient, because Notepad++ gives priority to the copy from the user-settings directory. (See the Instructions section above for the decision process to know for sure whether this section is sufficient for your needs.)

    Update Theme(s) in User Config Directory

    If you have your Theme file in the user-settings directory (AppData hierarchy or Cloud directory or -settingsDir directory) for any reason – whether you customized it by changing the font or color or added user-defined keywords or user-defined extensions using the Style Configurator, or whether you intentionally copied or downloaded a Theme into the user-settings directory, or whether it’s there and you don’t know how or why it got there: under any of those circumstances, then just replacing the theme in the installation directory won’t be sufficient. (See the Instructions section above for the decision process to know for sure whether to use this section.)

    Exit Notepad++ If you haven’t already, go to the URL mentioned in the Download Source section (above), and download the raw version of your Theme file(s) Use Explorer to go to %AppData%\Notepad++\ (🛈) or to wherever your Cloud Directory or -settingsDir option point to There should be a themes subdiretory in that directory, if you have customized your Theme. Rename your old custom theme to <themeName>_OLD.xml (like khaki.xml becomes khaki_OLD.xml) Copy the downloaded version of the Theme into that directory (for example, khaki.xml) Start Notepad++. It will use the updated version of the theme, but your customizations will be temporarily missing. Open %AppData%\Notepad++\themes\<themeName>.xml and %AppData%\Notepad++\themes\<themeName>_OLD.xml In the _OLD copy, search for ext="(?!") in Regular Expression mode. The value between the quotes will be the user-extensions for that language. Copy any that you find in the OLD file to the language’s equivalent entry in <themeName>.xml In the _OLD copy, search for (?<!>)</WordsStyle> in Regular Expression mode. Any values between the > and the </WordsStyle> should be copied to the equivalent location in the <themeName>.xml file. If <themeName>.xml just has <WordsStyle name="..." ... /> without having a </WordsStyle> closer, you can replace the /> with a > and the list of keywords, then the closing </WordsStyle> Save <themeName>.xml Exit Notepad++ When you run Notepad++ again, it should now include your customizations again. Native Feature compared to ConfigUpdater plugin

    The ConfigUpdater plugin was introduced as a testbed for some of the ideas that made it into the v8.8.9 native implementation. As such, if you are in v8.8.9 or newer, you no longer need the ConfigUpdater plugin. But if you are before v8.8.9, and waiting for the v8.9 fix to the Notepad++ feature before upgrading, then using ConfigUpdater while in v8.8.8-or-older will help you get to a point where if you did change your mind and upgrade to v8.8.9, it wouldn’t make the glaring UI clash and black-on-white text in dark themes.

    JavaScript in v8.9 Themes

    In v8.8.8 and earlier, Notepad++ would magically use the embedded javascript (JS-in-HTML) styler settings if the javascript.js (*.js) language didn’t have defined styles in a given theme, making it appear to JavaScript users that their theme had the standalone JavaScript colors defined. The v8.9 fix, which filled in default FG/BG colors for all javascript.js styles for themes that were missing javascript.js made it appear to the JavaScript users that v8.9 broke their theme, when it really meant that their already-broken theme was just being “fixed” in a different way. Updated themes are being submitted to the Notepad++ codebase, so that javascript.js will use similar colors to embedded javascript, so they won’t get the surprise color change if they upgrade from v8.8.8-or-older to v8.9.1-or-newer.

    If you already updaded to v8.9, and JavaScript *.js files look like they have stopped syntax highlighting then you will need to follow instructions similar to the Update Theme(s) in Installation Directory and/or Update Theme(s) in User Config Directory

    The PR has been merged, so you can just use https://github.com/notepad-plus-plus/notepad-plus-plus/tree/master/PowerEditor/installer/themes as the source for the updated themes (the same link as mentioned above) You can just copy the entire <LexerType name="javascript.js" desc="JavaScript" ext="">...</LexerType> section from the downloaded theme(s) and paste it overtop that same section in your Config Directory and/or Installation Directory theme file(s), then save and restart to get it to take effect.
  • Notepad++ discussions that don’t fit in other Categories

    4k Topics
    22k Posts
    CoisesC

    @Hiroki-H1974 said in The Column count of Zenkaku chr. is 1?:

    So, the position is not the same even if Col: count is same because the line contains some Zenkaku chrs.

    I don’t know Japanese; please forgive me if I’ve missed the point in some way.

    The column (“col:”) in the status bar is just a count of characters from the beginning of the line, starting at one. (That’s not even always what you might expect; combining characters that form a single visible character are still counted separately.)

    Aside from a few things like cursor positioning, line wrapping and selection with the mouse, Notepad++ (like the Scintilla control it uses for editing) doesn’t concern itself with the physical space occupied by characters. In English, we can use a proportional font, and a line of twelve characters will show the next “column” as 13, whether they are IIIIIIIIIIII or WWWWWWWWWWWW.

    So (though I haven’t attempted to test it), regardless of font, I would expect that there would be no recognition of the difference between half-width and full-width characters.

  • 10k Topics
    54k Posts
    xomxX

    @PeterJones

    That “Stopped working” is a common overall expression there for the app crashes, hungs etc.
    So @mapsonx should open that “details” you mentioned or simply launch the Windows EventViewer, i.e.:

    press WinKey+R to invoke the Windows Run-dialog copy & paste there: eventvwr.msc /c:"Application" and click OK wait for the Event Viewer launching and attaching to OS logs search/filter there for “Error” Level records (or simply follow the ReliabilityMonitor published date/time of the N++ problem), with “notepad++.exe” within app crashes usually have as log Source “Application Error”, frozen apps “Application Hang”

    Then publish here what the content of such a record tell us, e.g.:

    Faulting application name: notepad++.exe, version: 8.9.3.0, time stamp: 0x69bc8a94 Faulting module name: USER32.dll, version: 10.0.19041.6926, time stamp: 0xcd1afcbd Exception code: 0xc0000005 Fault offset: 0x00000000000467cd Faulting process id: 0x296c Faulting application start time: 0x01dcce3ba0a16cb7 Faulting application path: ...\npp.8.9.3.portable.x64\notepad++.exe Faulting module path: C:\Windows\System32\USER32.dll
  • Technical discussion of building or contributing to Notepad++ or Plugin codebases

    1k Topics
    9k Posts
    CoisesC

    @guy038 said in Search++: A work in progress:

    Now, one question regarding ICU

    So far, you have chosen to disable replacements when using the ICU regular expression engine. What is that, exactly :

    Are you worried about a possible malfunction of that feature ?

    Are there any technical obstacles to implementing such a feature ?

    Do you need more time to learn about and/or implement this feature ?

    Or did you simply decide that it would never be used ?

    Personally, I don’t see why this should be any more complicated than when using the Boost search engine when you click on the Regex button of your plugin !

    The Boost.Regex design includes an interface that accesses the text to be searched through a templated iterator. That’s a bit of a technical C++ concept. In short, template means that the programmer can specify what sort of value will be matched (I chose a full Unicode code point, UTF-32) and iterator means that rather than giving the interface a single, contiguous block of memory filled with the value type, you give it a kind of index and separately write routines that return the value at that index; increase the index to the index of the next value; and decrease the index to the index of the previous value.

    Scintilla stores documents in two separate blocks with a gap between — this facilitates inserting and deleting text without having to move all the following data every time — and it stores the data either in the system default encoding (“ANSI”) or in UTF-8. The template-and-iterator concept works well with this. Notepad++ search works that way, but there were technical reasons I did not want to use the same iterator code Notepad++ uses. Writing the three iterators I needed (one for single byte character sets, one for double-byte character sets, and one for UTF-8) was one of the trickier parts of getting my Columns++ search to work. Writing the template specialization for the “character traits” of my UTF-32 values was also a bit of work.

    When doing a replacement, Boost.Regex takes a structure that is produced as a result of a match and the replacement string with symbols ($1, etc.) and returns the string with replacements, etc. made. From that, I use normal Scintilla editing commands to replace the matched string with the processed replacement.

    The regular expression search in ICU is not templated. It operates strictly in UTF-16. It does not use iterators, but it does have its own way of virtualizing the text to be searched (UText). The only format directly supported by UText that is also used in Scintilla is UTF-8. Scintilla does accept a command to make all its text contiguous (moving the gap to the end), after which the text can be accessed — so long as the text is not modified and only until the next Scintilla call is performed — as a UTF-8 string. By limiting ICU search to only UTF-8 documents and allowing no modification, I could use the utext_openUTF8 interface to access the internal Scintilla buffer (after telling Scintilla to make it contiguous) in a way that is acceptable to the ICU regular expression matching interface.

    The Find and Replace operation in ICU Regular Expressions is, to me, very strange. The documented way to use it is to build a new text that reproduces the entire source text, with replacements. That would make sense when reading a file and writing a new file; but it is, to me, not obvious how to apply it sensibly in the context of a text editor.

    It’s probably possible to do everything necessary for good integration with Scintilla with ICU regular expressions, it’s just a big task, starting with learning more about how their UText extensibility works. I saw enough to think that it could be made to work on “ANSI” documents, it would just be a whole other side project in itself to figure out how. (The problem with just converting the document to Unicode is that you wind up with the starting and ending character positions of a match in the converted text, but no good way to convert those to positions in the original text, which is what you need to select the match in Scintilla.) Beyond the “ANSI” problem, forcing Scintilla to move its gap to the end before each search is not ideal, and for large documents that are being changed (as in find and replace) the performance loss would be bad. So even for Unicode I would need to write a different UText extension that doesn’t require contiguous UTF-8.

    Then there’s analyzing that replacement logic and figuring out how to use it in a way that makes sense in Scintilla. It might be easier to implement replacements from scratch and completely ignore ICU’s replacement logic and syntax: based on what documentation exists, it seems likely that their supported syntax is very limited — none of the fancy stuff in Boost.Regex extended format strings. (Unfortunately, I couldn’t just use the Boost.Regex formatter, because it depends on the structured data produced by a Boost.Regex match, which is different than the structured data produced by an ICU match.)

    Since I haven’t dug deeply into how ICU implements regular expressions, I can’t say how difficult it might be to customize or extend them. I have a better (not by any means comprehensive!) idea of what might be possible with Boost.Regex. Because of that, and because Notepad++ users are familiar with Boost.Regex syntax, I judged that it will probably be more practical to extend Boost.Regex with some features from ICU than to extend ICU toward Boost.Regex. Honestly, I don’t see the detailed Unicode properties of ICU as being nearly so valuable in practical, real-world use as the features Boost.Regex has that ICU doesn’t (\K and backtracking control are the ones I remember).

    I do hope to extend the Boost.Regex implementation further. I’d like to implement Unicode word boundaries, but I haven’t yet gone into it deeply enough to determine whether it is practical. There might be a way to expose arbitrary Unicode properties, but that is also something I will have to study further. The biggest thing I’d like to do is figure out how to get a progress monitoring hook inside the matching process, so that annoying “too complex” message could be replaced by the ability to click cancel on a progress dialog — I know that will be challenging, and maybe not possible. I want to get the framework supporting what I have now up to a level where I feel that I can responsibly release it without classifying it as a “pre-release” before I get into those projects.

    In the ICU search, I mostly included the stuff that was relatively easy — that I could copy from the same logic used for Plain and Regex. I thought it might serve as a good comparison test for whether I had implemented Unicode properties correctly in Regex — where there is a discrepancy, I should know why (such as my “ignore case insensitivity for character classes” rule). So I expected to leave it for future use to check as I try to extend Boost.Regex some more, but I thought I would probably hide it so users wouldn’t stumble over it. I never really thought it would be something many (any?) users would want.

    The bottom line is that I only have so much time and capacity for concentration, and I don’t think making ICU regular expressions fully functional is likely to be the best use of it — at least not yet.

  • Security shouldn't be the privilege of rich people
    72 Topics
    354 Posts
    S

    I am using the latest version of N++ wingup (5.4.1.) and its testing the XML returned by the query to verify that its valid before using the NeedToBeUpdated, Version, and/or Location information. If the XML signature passes then it downloads the file from the Location tag and tests its signature. I haven’t been able to get my code to get past the XML signature check. I have a program written to generate the XML signing, that I can share which uses my own code signing certificate. I was hoping that someone familar with how N++ is doing the XML signing could point me in the correct direction or add the code to the N++ project.

  • All the issues (publications/questions) about binary translation
    76 Topics
    480 Posts
    U

    @xomx
    Thank you very much for the work you have done, which will lead to improvements in Notepad++ in the future.
    I am very grateful to you.

  • Say fuck to Notepad++ here, and only here
    93 Topics
    552 Posts
    guy038G

    Hello, @datatraveller1 and All,

    Many thanks for joining the Compare2Lists’s author and many thanks to Fatih Ramazan Çıkan which was able to get a quick new 1.7 version which fixes this annoying bug !

    I also tried this software on that real example that I proposed in this post, some days ago :

    https://community.notepad-plus-plus.org/post/105031

    You can download this file from my Google Drive account :

    https://drive.google.com/file/d/1aYOpKon4KYw_NXSdj4Tm4Ti_FrygC2ky/view?usp=sharing

    Before using it with the Compare Two Lists software :

    Delete the last column, which counts the number of records, with a column mode selection

    Delete all trailing blank characters with the Edit > Blank operations > Trim Trailing Space option

    Place all contents in the clipboard ( Ctrl + C )

    Now, open the Compare Two Lists software

    Paste all the resulting contents with the Paste button, associated with the List #1 panel

    Check that the Settings > Cas sensitive option, if necessary

    Click on the Remove Duplicates button, associated with the List #1 panel

    => You should see that it remains 50,822 records

    And this is exactly the results produced when you use the cases #3 or #4 of my post ;-))

    Best Regards,

    guy038

  • No support request and bug report here, only unconditional praise and worship

    2 Topics
    7 Posts
    Maddox ArmstrongM

    @FreeMeow I goon to Notepad++ :P

  • Share personal tips and cool uses for Notepad++, and similar

    59 Topics
    221 Posts
    William4565W

    Its been 5 years I’m using notepad ++ and for me it was and it is very useful tool.

  • Computer/Programming Jokes are welcome here