[Gambas-user] TextHighlighter["gambas"].CanRewrite = False

Bruce Steers bsteers4 at gmail.com
Tue Dec 12 15:59:22 CET 2023


On Tue, 12 Dec 2023 at 14:43, Benoît Minisini <
benoit.minisini at gambas-basic.org> wrote:

> Le 12/12/2023 à 15:33, Bruce Steers a écrit :
> >
> > I cannot seem to disable CanRewrite in a texteditor :(
> >
> > I try this....
> >
> > TextHighlighter["gambas"].CanRewrite = False
> > $hEditor.Highlight = "gambas"
> >
> > but the text gets re-written still?
> >
> > The editor has a highlight selector to try different highlights on text
> > files that might have not been recognized.
> > If gambas is selected I only want to enable CanRewrite if the file is
> > known to be gambas code.
> >
> > I also only want to disable rewrite for gambas highlight in the loaded
> > editor not everywhere and TextHighlighter["gambas"].CanRewrite = False
> > seems kinda global not local to current editor.
> >
> > I guess i am doing it wrong :(
> >
> > any advice ?
> >
> > Thanks in advance
> > BruceS
> >
>
> The CanRewrite property is not static, and the TextEditor always set it
> to TRUE before doing its highlight.
>
> Regards,
>

But we had this issue many many moons ago so you made it possible to set
gambas highlight without Rewrite enabled

I think gambas highlight Rewriting should ONLY happen if Mode = "gambas"
too.

by definition a "Highlight" alone should not modify anything.

Respects
BruceS
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20231212/ab0c1614/attachment.htm>


More information about the User mailing list