[QScintilla] Long line scrolling?

Matic Kukovec matic.kukovec at pametnidom.si
Fri Mar 13 16:55:10 GMT 2015


On 12.3.2015 21:01, Baz Walter wrote:
> On 12/03/15 09:28, Matic Kukovec wrote:
>> The double END key thing sometimes works, sometimes it doesn't. When it
>> doesn't, like in the example,
>> I have to press END repeatedly about 20 times to get to the end of the
>> line, the amount it moves the
>> view it tiny.
>> Also tried SCI_SETSCROLLWIDTHTRACKING and it doesn't work. It only
>> adjust the horizontal scrollbar
>> to the longest line in the document, but the longest line cannot be
>> scrolled to the very end!
>
> I only tested on Linux, but, using your test file, the double END 
> press always works for me. Also, once the caret has gone to the end of 
> a line, it only takes one END press to get there on subsequent visits, 
> so obviously Scintilla must do some caching.
>
> With SCI_SETSCROLLWIDTHTRACKING, only one END press is needed for the 
> first line of your test file, but the second line still needs two. 
> Otherwise, the behaviour is the same as above.
>
> This is using QScintilla 2.8.4 with the default QsciScintilla class.
>

I did a little testing and found that it works as you say when there is 
no margin, more specifically no folding margin!
If I add a number margin and a folding margin like this:

    document.setMarginType(0, PyQt4.Qsci.QsciScintilla.NumberMargin)
    document.setMarginWidth(0, "00")
    document.setLexer(PyQt4.Qsci.QsciLexerCPP())
    document.setFolding(PyQt4.Qsci.QsciScintilla.PlainFoldStyle)

it behaves as I said for very long lines.

Is there something wrong with the this code?

Cheers,
Matic
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/qscintilla/attachments/20150313/3ba89d9d/attachment.html>


More information about the QScintilla mailing list