Quantcast
Channel: ScintillaNET Forum Rss Feed
Viewing all articles
Browse latest Browse all 296

New Post: BUG: scintilla.CurrentPos and scintilla.Caret.Position bugged

$
0
0
Hello,

at the moment I have really hard problems with the Scintilla natives scintilla.CurrentPos and/or scintilla.Caret.Position which both don't work correctly.

If you just display the current position in an extra textbox while typing you will notice that it is heavily bugged and can't be used reliable.

If I type one letter, then a space the position is correct. If I delete that space now with via backspace, the position remains the same although it has changed.

Even worse happens if there are special chars inside the text of the Scintilla Control, like for example 'ü', 'ä' or 'ö' but also 'ß' or '§' (or many more) then the current position gets incremented by two for each of those special chars, although they only count as one!

This also happens when those chars are within comments. As a result it is easily possible (and very likely) that such a simple thing like:
char[] textArray = scintilla1.Text.ToCharArray();
char actualChar = textArray[scintilla1.CurrentPos];
will cause an ArrayOutOfBounds Exception.

Anyone knows how to solve this problem? It is really annoying and makes it basically impossible to use the CurrentPos in a reliable way.

Regards,
2mQ

Viewing all articles
Browse latest Browse all 296

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>