#467 Upgrade/Merge of NP++-Scintilla 2.2.7 to version 3.3.0


NP++ still works with a slightly modified version of Scintilla 2.2.7. The current Scintilla version is 3.3.0 and can be found in a Mercurial repository at http://hg.code.sf.net/p/scintilla/code reachable via the Scintilla project page https://sourceforge.net/projects/scintilla/ .

I have upgraded/merged the NP++-Scintilla version with Scintilla version 3.3.0 performing the following procedure:

• Installing a Mercurial client (e.g. TortoiseHg)
• Cloned the Scintilla repository to a local working copy at the basic NP++-Scintilla version 2.2.7
• Copied (overwriting) the current NP++-Scintilla files (as of SVN revision 1018) into that working copy.
• Used TortioseHg to merge those files with Scintilla version 3.3.0 and solved some conflicts manually to preserve the NP++-Scintilla modifications.
• Marking the major NP++-Scintilla modifications with “//-- NppExtension: “
• Used those merged files to build the SciLexer.dll for NP++.
• Compiled NP++ and run it.

With the above described approach (using a Mercurial client to update/merge the NP++ modified working copy from the Scintilla Mercurial repository), the NP++-Scintilla version can easily be kept in line with the official Scintilla version, especially if this is performed more frequently so that the changes are only minor.

Lexers added by NP++ are:
- LexObjC, LexSearchResult, LexUser
New Scintilla 3.3.0 Lexers are:
- LexAVS, LexCoffeeScript, LexECL, LexLaTeX, LexOScript, LexPO, LexTCMD, LexVisualProlog
The new Scintilla 3.3.0 Lexers are not implemented in NP++ yet!

The following subdirectories are not needed (not used) for building NP++ SciLexer.dll and therefore should be deleted from NP++ SVN repository:
- cocoa, gtk, macosx, qt
(see patch NppPatch_6.3_NppScintilla227DeleteUnnecessaryDirs.patch)

The provided patch (NppPatch_6.3_NppScintilla227UpgradeTo330.patch) only updates the Scintilla directories needed for NP++ SciLexer.dll to Scintilla 3.3.0. Directories cocoa, gtk and macosx are not updated but should be deleted.

However, such a major change should be tested by several Notepad++ contributors before it is released.



  • Neomi

    Neomi - 2013-08-13

    Great work FLS. Based on your patch I upgraded further to Scintilla 3.3.4 and relative to revision 1103 of Notepad++. There were only a few minor adjustments to make except for one.

    The WordList class (lexlib) has been refactored for 3.3.2, instead of public members it has them private and accessible only through a more secure interface. I first wanted to update the direct reads to use the accessors instead, but LexUser.cxx wants to modify the word lists. Therefore I made the private members of the WordList class public again (and marked it as you did with NppExtension). Not a change I like, but it works. Maybe in subsequent steps the extensions could be refactored to keep Scintilla sources as close to the original as possible.

    Starting now, I will use this updated version in my daily work to check for problems. If it isn't too much work, I propose a somewhat official test build parallel to the next release. That way a lot more people could join in for testing. Don't be afraid of the big patch size, most of it is from the line ending format (I kept it as Scintilla uses it) of otherwise untouched files.

    Best regards,

    • FLS

      FLS - 2013-08-27

      Dear Neomi
      I already upgraded to Scintilla 3.3.4, observed the same difficulties and solved them nearly in the same way as you. I am using my Scintilla version in NP++ for a while without issues.

      I noticed also that some patches from you were already included in the actual Scintilla code:

      08.08.13: Bug [#1512] Fix bug with horizontal caret position when margin changed.
      12.08.13: Feature: [feature-requests:#1007] Fix bugs with redrawing selection.
      15.08.13: Feature: [feature-requests:#1007] Option to allow mouse selection to switch to rectangular by pressing Alt after start of gesture.

      !!Great and fast work!!

      I also noticed that Don, you and some others are upgrading NP++ to Scintilla 3.3.4. Very good. I am supporting completely your suggestions to keep and maintain the NP++-Scintilla in a shape for easy later update with the actual Scintilla:

      1. Keep the original Scintilla files with the same line endings (\n).
      2. Reduce NP++ specific changes of Scintilla files to a minimum and if possible, put them into extra files or mark them explicitly as NP++ changes like I did it in my version.

          “//-- NppExtension: - <what was changed and why>“
      3. Update the additional NP++ lexers (LexObjC, LexSearchResult, LexUser) and BoostRegEx with current Scintilla code.

      This should make it possible to correct some Scintilla related issues in NP++ directly in Scintilla (via bug report and patch) and get it back in the main stream of Scintilla.


  • Don HO

    Don HO - 2013-09-19
    • status: open --> closed

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks