GoScintilla - 2.7 (Purebasic 4.5 onwards)
Re: GoScintilla - 2.0 (beta 4)
Big thanks!!!
My PC
Ryzen 9 5950, 64 GB RAM, nVidia RTX A4000, Win 10
Ryzen 7 1700, 32 GB RAM, nVidia RTX A2000, Win 10
Ryzen 9 5950, 64 GB RAM, nVidia RTX A4000, Win 10
Ryzen 7 1700, 32 GB RAM, nVidia RTX A2000, Win 10
Re: GoScintilla - 2.0 (beta 4)
New wish
Can you add some scintilla searchfunction to easy searching/replacing with selecting?
(Supporting RegEx?)
greetings
Thomas

Can you add some scintilla searchfunction to easy searching/replacing with selecting?
(Supporting RegEx?)
greetings
Thomas
Re: GoScintilla - 2.0 (beta 4)
Problem with PB 4.50 RC 1 = IMA
GoScintilla.pbi line 187: "*this\keywordPtr() = *ptrKeyword"
greetings
Thomas
GoScintilla.pbi line 187: "*this\keywordPtr() = *ptrKeyword"
greetings
Thomas
Re: GoScintilla - 2.0 (beta 4)
A bug with PB by the look of it.ts-soft wrote:Problem with PB 4.50 RC 1 = IMA
GoScintilla.pbi line 187: "*this\keywordPtr() = *ptrKeyword"
greetings
Thomas
http://www.purebasic.fr/english/viewtop ... 77#p324777
I may look like a mule, but I'm not a complete ass.
Re: GoScintilla - 2.0 (beta 4)
There is a problem with backspace and code completion (the popup window opens and closes for every other backspace).
And the right-click menu isn't positioned 100% at the pointer.
Just testing it a bit, looks nice.
And the right-click menu isn't positioned 100% at the pointer.
Just testing it a bit, looks nice.
Re: GoScintilla - 2.0 (beta 4)
The context menu belongs to Scintilla and is nothing to do with me.Trond wrote:There is a problem with backspace and code completion (the popup window opens and closes for every other backspace).
And the right-click menu isn't positioned 100% at the pointer.
Just testing it a bit, looks nice.

Scintilla's code-completion lists and call-tips do have some 'quirks' which I have mentioned previously somewhere in this thread. The backspace issue is one of them. I did investigate this one quite a bit and there is no good reason that I can see why the list does not appear on every other backspace etc. Certainly, GoScintilla 2 sends the relevant messages at the correct time (have just checked once more). It is a mystery and something, I think, we are going to have to live with. The PB IDE of course does not use Scintilla's code-completion lists.
**EDIT : if Scintilla's code-completion lists do prove un-satisfactory for many then I shall consider following Freak's lead and roll my own implementation. Personally, I can live with the various quirks though.
I may look like a mule, but I'm not a complete ass.
Re: GoScintilla - 2.0 (beta 4)
One wish: I try to use a marker (Arrows) to show the line where error occurs, so I defined the marker and wanted to display it, but it is not displayed (I use the code from a version before I started to use GoScintilla, which was working previously). I think, folding markers overwrite my error marker, but the same problem exists outside of folds. Can you add a way to display the markers?
My PC
Ryzen 9 5950, 64 GB RAM, nVidia RTX A4000, Win 10
Ryzen 7 1700, 32 GB RAM, nVidia RTX A2000, Win 10
Ryzen 9 5950, 64 GB RAM, nVidia RTX A4000, Win 10
Ryzen 7 1700, 32 GB RAM, nVidia RTX A2000, Win 10
Re: GoScintilla - 2.0 (beta 4)
Please read the manual (GoScintilla 2) - Additional section --> Bookmarks.LCD wrote:One wish: I try to use a marker (Arrows) to show the line where error occurs, so I defined the marker and wanted to display it, but it is not displayed (I use the code from a version before I started to use GoScintilla, which was working previously). I think, folding markers overwrite my error marker, but the same problem exists outside of folds. Can you add a way to display the markers?
There are two margins which GoScintilla 2 does not make use of : #GOSCI_MARGINUSER1 and #GOSCI_MARGINUSER2. Use either of these for your own markers.
In addition, GoScintilla 2 uses marker index 0 for bookmarks and so you should steer away from this index. Use any index from 1 to 31.
And that is all you need to know. Apart from this, just use markers as you would with any Scintilla control.
For example, the following little snippet shows how you might use margin #GOSCI_MARGINUSER1 for a marker (index 1). I color the marker symbol red :
Code: Select all
GOSCI_SetMarginWidth(id, #GOSCI_MARGINUSER1, 20)
ScintillaSendMessage(id, #SCI_SETMARGINMASKN, #GOSCI_MARGINUSER1, 1<<1) ;Only marker number 1 to be allowed.
ScintillaSendMessage(id, #SCI_MARKERDEFINE, 1, #SC_MARK_SHORTARROW)
ScintillaSendMessage(id, #SCI_MARKERSETBACK, 1, #Red)
Add the marker to line 0 with the following :
Code: Select all
ScintillaSendMessage(id, #SCI_MARKERADD, 0, 1)
I may look like a mule, but I'm not a complete ass.
Re: GoScintilla - 2.0 (beta 4)
Yes, it works... A case of RTFM... 

My PC
Ryzen 9 5950, 64 GB RAM, nVidia RTX A4000, Win 10
Ryzen 7 1700, 32 GB RAM, nVidia RTX A2000, Win 10
Ryzen 9 5950, 64 GB RAM, nVidia RTX A4000, Win 10
Ryzen 7 1700, 32 GB RAM, nVidia RTX A2000, Win 10
Re: GoScintilla - 2.0 (beta 4)
Is it possible to create two independent lexers for the same source code? I want to make ASM / END ASM Block with a completly different lexers. My problem is: SUB / END SUB is defined as SUBroutine and create folding points, but there is also SUB in Assembly language, but it must not create folding points. Also I tried to mix multiwords with multiline comments, but it did not work. I understand some of the GoScintilla Code, but MyLexer is black magic yet.
My PC
Ryzen 9 5950, 64 GB RAM, nVidia RTX A4000, Win 10
Ryzen 7 1700, 32 GB RAM, nVidia RTX A2000, Win 10
Ryzen 9 5950, 64 GB RAM, nVidia RTX A4000, Win 10
Ryzen 7 1700, 32 GB RAM, nVidia RTX A2000, Win 10
Re: GoScintilla - 2.0 (beta 4)
Adding a Keyword for folding on the fly is no problem, but remove a keyword only from folding?
greetings
Thomas
greetings
Thomas
Re: GoScintilla - 2.0 (beta 4)
At the moment, the only way of accomplishing that is to use GOSCI_RemoveKeywords() to completely remove the appropriate keywords and then to add them again using GOSCI_AddKeywords() or GOSCI_AddKeywordsEx(), but omitting the #GOSCI_OPENFOLDKEYWORD flag etc. Make sure that you also remove the corresponding close fold keywords etc.ts-soft wrote:Adding a Keyword for folding on the fly is no problem, but remove a keyword only from folding?
greetings
Thomas
I may look like a mule, but I'm not a complete ass.
Re: GoScintilla - 2.0 (beta 4)
thx for your answer, but i think i can't go this way, but i will a bit more testing 

Re: GoScintilla - 2.0 (beta 4)
Off hand I cannot think of any reason why this should not work in any circumstance.
The thing about AddKeywords() is that the keywordFlags parameter is OR'd with any existing value for that keyword and so there is no way, at present, to remove individual bit values (such as #GOSCI_OPENFOLDKEYWORD). I did this for reason linked to global call-tip separators.
Well, there is one way to alter the keywordFlags values at the individual bit level...
... use the GOSCI_GetKeywordInfo() function to retrieve a pointer to the keyword's GoScintillaKeyword structure. One of these fields (flags) is what you are after. Alter this value as you see fit, e.g. remove the #GOSCI_OPENFOLDKEYWORD.
The problem now is that you need to force Scintilla to then restyle the document. The are various ways of bullying GoScintilla into forcing a complete restyle. The best way is to use GOSCI_RemoveKeywords() and remove a non-existant keyword; e.g.
I have tested and this all works fine.
The thing about AddKeywords() is that the keywordFlags parameter is OR'd with any existing value for that keyword and so there is no way, at present, to remove individual bit values (such as #GOSCI_OPENFOLDKEYWORD). I did this for reason linked to global call-tip separators.
Well, there is one way to alter the keywordFlags values at the individual bit level...
... use the GOSCI_GetKeywordInfo() function to retrieve a pointer to the keyword's GoScintillaKeyword structure. One of these fields (flags) is what you are after. Alter this value as you see fit, e.g. remove the #GOSCI_OPENFOLDKEYWORD.
The problem now is that you need to force Scintilla to then restyle the document. The are various ways of bullying GoScintilla into forcing a complete restyle. The best way is to use GOSCI_RemoveKeywords() and remove a non-existant keyword; e.g.
Code: Select all
GOSCI_RemoveKeywords(#myID , "XXX")
I may look like a mule, but I'm not a complete ass.
Re: GoScintilla - 2.0 (beta 4)
thx, all works fine 
