I hope someone can help me.
I use Notepad++ which uses Scintilla.
When I'm editing KiXtart scripts within Notepad++ the block comments are not recognised as comments.
For example, I would expect the following code...
/\* These are block comments...
And this is...
...This is the final comment
/*
...to be identified as a comment (which are shown in green) but it isn't.
I have put this to the developer of Notepad++ (please see https://sourceforge.net/p/notepad-plus/discussion/331753/thread/51131c27/) but they have informed me that this should be directed at the Scintilla developers.
I was told that the lexer needs to include support for stream comments for KiXtart. The 'suggested' code is 'something' along the lines of...
#define SCE_KIX_STREAM_COMMENT 10
if (sc.state == SCE_KIX_COMMENT) {
if (sc.atLineEnd) {
sc.SetState(SCE_KIX_DEFAULT);
}
} else if (sc.state == SCE_KIX_STREAM_COMMENT) {
if (sc.ch == '*' && sc.chNext == '/') {
sc.ForwardSetState(SCE_KIX_DEFAULT);
}
} else if (sc.state == SCE_KIX_STRING1) {
// This is a doubles quotes string
if (sc.ch == '\"') {
sc.ForwardSetState(SCE_KIX_DEFAULT);
}
.
.
.
if (sc.state == SCE_KIX_DEFAULT) {
if (sc.ch == ';') {
sc.SetState(SCE_KIX_COMMENT);
} else if (sc.ch == '/' && sc.chNext == '*') {
sc.SetState(SCE_KIX_STREAM_COMMENT);
} else if (sc.ch == '\"') {
sc.SetState(SCE_KIX_STRING1);
.
.
.
Please can you consider adding this to Scintilla?
Many thanks,
Lee
Has this been compiled and tested? I will accept a tested patch or changed copy of LexKix.cxx. I do not use KiXtart so have no way of knowing if a change works.
Hi Neil,
No this has not been compiled or tested...this was just 'suggested' code. I'm not sure I'm in a position to be able to compile it.
I am more than happy to test it - but I'm not sure I know how! I use Notepad++ which, in turn, uses Scintilla...but I don't know how I am able to test Scintilla without Notepad++.
KiXtart scripts are merely text files...A 'Comment Block' begins with "/*" and ends with "*/". Currently Scintilla isn't able to detect 'Comment Blocks' in KiXtart. If you let me know how or if I can work out how, then I am more than happy to test it.
Lee
Last edit: Lee Wilmott 2014-06-20
Notepad++ includes a copy of Scintilla so change that, follow whatever procedure Notepad++ has for building then test in Notepad++. If you can't work out how to do this, you could ask if anyone is interested in helping on the mailing list.
https://groups.google.com/forum/?hl=en#!forum/scintilla-interest
Hi Neil, I have been in touch with the original author of the code I wish to change. He says that he no longer has a development environment to make changes. I have therefore downloaded the Scintilla source myself and made the changes I want to change and successfully compiled it. I have also tested it thoroughly. How can I submit my changes?
Kind regards,
Lee
Attach either a patch file or all of the changed files to this tracker issue.
Thanks Neil. Please find attached the files that I have updated.
Any problems then please give me a shout.
Lee
Committed as [573dde].
Related
Commit: [573dde]
That's great...thank you Neil.
Lee