Giter Club home page Giter Club logo

Comments (12)

desjarlais avatar desjarlais commented on July 18, 2024 1

It was the change I made to the CharToBytePosition function. I made that for 65 to handle emojis, but I think I need to move that out into a separate function. CharToBytePosition has about 63 references and I had concerns early on when looking at fixing 65 that something like this could happen. I think I'll move the fix for 65 into a new function and leave CharToBytePosition in its pre 5.3.3.6 state which should bring back all previous behavior.

from scintilla.net.

desjarlais avatar desjarlais commented on July 18, 2024

Thank you for the comment about taking over as maintainer. I'll do my best to keep it going.

As for this issue, so far, I'm not reproducing, I'm pretty sure I'm following it the way you describe...am I missing something?

image

from scintilla.net.

jonandr avatar jonandr commented on July 18, 2024

Hmm, yes, the code is correct.

Maybe it's something related to the solution settings?

Does it reproduce if you try this solution:

https://github.com/jonandr/scintillanet-111

I'm using VS 2022.

from scintilla.net.

desjarlais avatar desjarlais commented on July 18, 2024

I tried with your solution and even brought in the nuget for 5.3.3.6, but I don't see any text get underlined.

What are you expecting to apply the underline to the character in your sample?

from scintilla.net.

jonandr avatar jonandr commented on July 18, 2024

Sorry, I put the part which performs the underlining on a button click, that may have been confusing.
I have pushed a new version of the solution now, can you try it?

The new version runs the underlining immediately in Form1_Load instead.
So hopefully it will show the issue just by running it.

So to clarify:
When I run the latest version of the repo (which uses 5.3.3.16 by default), then I get the following:

bild

If I change the nuget to 5.3.3.6, then I get this:

bild

Do you get the same?

from scintilla.net.

desjarlais avatar desjarlais commented on July 18, 2024

I launch the latest version and I see this:

image

from scintilla.net.

jonandr avatar jonandr commented on July 18, 2024

Interesting - I was trying to minimize the test case, and since I got the underlines on my machine I just figured that that was the Scintilla default. But it must be machine dependent.

I've changed the solution again - can you try it one last time? This time the setup should be exactly like the wiki says:

https://github.com/desjarlais/Scintilla.NET/wiki/Find-and-Highlight-Words

On my machine, the problem is still there when I run the latest solution.

5.3.3.6:

bild

5.3.3.16:

bild

from scintilla.net.

desjarlais avatar desjarlais commented on July 18, 2024

I do see that with your latest example. So you want the same behavior as 5.3.3.6?

from scintilla.net.

jonandr avatar jonandr commented on July 18, 2024

Yes, certainly. Speaking purely as a library user I would not expect there to be a huge, breaking change happening between 5.3.3.6 and 5.3.3.16 :)

To be clear, I suspect something has gone very seriously wrong with the wide character handling between these versions. It's not just that the behavior of indicators has quietly changed. For instance, add this snippet at the end of Form1_Load:

            scintilla1.TargetStart = 0;
            scintilla1.TargetEnd = scintilla1.TextLength;
            scintilla1.SearchFlags = SearchFlags.None;
            while (scintilla1.SearchInTarget("ä") != -1)
            {
                scintilla1.TargetStart = scintilla1.TargetEnd;
                scintilla1.TargetEnd = scintilla1.TextLength;
            }

In 5.3.3.6, it just finds all three occurrences of "ä", as expected.
But in 5.3.3.16 it goes into an infinite loop.

So you literally can't use Scintilla's search functionality to search for wide character strings anymore. I mean, whatever change has been made is tantamount to dropping support for wide characters.

from scintilla.net.

desjarlais avatar desjarlais commented on July 18, 2024

here is a screenshot of your sample with a soon to be released version 5.3.3.17 including the changes I mentioned above:

image

This looks good?

from scintilla.net.

jonandr avatar jonandr commented on July 18, 2024

Looks good!

from scintilla.net.

desjarlais avatar desjarlais commented on July 18, 2024

This should be fixed in 5.3.3.17, thank you for reporting the issue and the repro.

from scintilla.net.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.