ScintillaNET icon indicating copy to clipboard operation
ScintillaNET copied to clipboard

Wordwrapping scrolling bug?

Open knackstedt opened this issue 7 years ago • 2 comments

I think i have found a bug with wordwrapping and scrolling. I've read a similar issue on the wiki, and think that i have pinpointed the cause. https://github.com/jacobslusser/ScintillaNET/issues/158

Here is the issue: when there are multiple lines that are wrapped from wordwrapping, the scintilla does not scroll to the line properly. It scrolls improperly when there are wrapped lines shown, but when they are not shown, the scrolling works fine.

One note about my scintilla control, i have enabled set to false, and the text is NEVER entered directly.

I've tried these scrolling methods: Moving the carat to end and using ScrollToCarat(). Using Command.ScrollToEnd Using ScrollRange(scintilla.textlength, scintilla,textlength) All of these seem to be identical, result-wise.

I have gotten my program to work reasonably well by using Command.PageDown, but i for people trying to scroll to specific text locations, they may have a much harder time.

It looks like the scintilla fails to detect that the lines are wrapping, and the scintilla thinks that it is scrolling to the location even though it isn't actually shown. It eventually scrolls properly when scrolling to ranges with no word wrapping, but for ranges with dense word wrapping, scrolling is broken.

Cheers!

knackstedt avatar Jun 11 '17 05:06 knackstedt

If I find time I'll see if I can take a look at this. If this truly is a bug, then it is likely a bug in the native Scintilla control. You might look at or even consider reporting it there.

jacobslusser avatar Jun 14 '17 04:06 jacobslusser

Okay, I have not looked at the native Scintilla code before, and I've only briefly looked at ScintillaNET's code. I just found the problem when noticing that scrolling was not working properly.

knackstedt avatar Jun 14 '17 05:06 knackstedt