Fixes the syntax highlighting in the following two examples.
Example 1:
#include<stdio.h>#define R "buggy"intmain(){printf("Hello, "R" world!\n");// this comment is no longer syntax highlighted!return0;}
Example 2:
#include<stdio.h>#define CR "\r"intmain(intargc,char**argv){printf(CR"\neverything is OK here");if(1){printf(CR"\nfrom now on no code has syntax highlighting!!!");printf(CR"\neven the brackets {} for the if above are not correctly highlighted!!!");}}#undef CR
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The above syntax highlighting issues are solved with the current Scintilla version 3.3.0 (or even before). Notepad++ uses a slightly modified version based on Scintilla 2.2.7.
I have updated/merged Scintilla for Notepad++ to 3.3.0 and tested the examples above successfully.
Therefore, the special patch provided here is not really necessary. In my opinion, an upgrade to the current Scintilla version is more desirable.
Hi FLS,
thanks for the info. Updating to a more recent Scintilla version seemed better for me, too, but I didn't know how much work this is and what I might destroy by doing it.
How are the chances that the new Scintilla version will be included in the next npp release?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It's rather a Scintilla bug.
In order to make update procedure easier, please submit your patch on Scintilla project, so Notepad++ can benefite the fix on the next Scintilla update.
Thank you,
Don
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Don! This bug has already been fixed in Scintilla. As I said, I would have preferred updating to a new Scintilla-Version as well, but that seemed too much effort for me, since I did not know how many changes Notepad++ did to the Scintilla library. However, I noticed the discussion in #467, so thanks for your effort on the Scintilla upgrade thing.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Fixes the syntax highlighting in the following two examples.
Example 1:
Example 2:
The above syntax highlighting issues are solved with the current Scintilla version 3.3.0 (or even before). Notepad++ uses a slightly modified version based on Scintilla 2.2.7.
I have updated/merged Scintilla for Notepad++ to 3.3.0 and tested the examples above successfully.
Therefore, the special patch provided here is not really necessary. In my opinion, an upgrade to the current Scintilla version is more desirable.
The patch for upgrade/merge of Notepad++ to Scintilla version 3.3.0 is provided at https://sourceforge.net/p/notepad-plus/patches/467/
FLS
Hi FLS,
thanks for the info. Updating to a more recent Scintilla version seemed better for me, too, but I didn't know how much work this is and what I might destroy by doing it.
How are the chances that the new Scintilla version will be included in the next npp release?
It's rather a Scintilla bug.
In order to make update procedure easier, please submit your patch on Scintilla project, so Notepad++ can benefite the fix on the next Scintilla update.
Thank you,
Don
Hi Don! This bug has already been fixed in Scintilla. As I said, I would have preferred updating to a new Scintilla-Version as well, but that seemed too much effort for me, since I did not know how many changes Notepad++ did to the Scintilla library. However, I noticed the discussion in #467, so thanks for your effort on the Scintilla upgrade thing.