<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
On 12.3.2015 21:01, Baz Walter wrote:<br>
<blockquote cite="mid:5501F08C.8020804@ftml.net" type="cite">On
12/03/15 09:28, Matic Kukovec wrote: <br>
<blockquote type="cite">The double END key thing sometimes works,
sometimes it doesn't. When it <br>
doesn't, like in the example, <br>
I have to press END repeatedly about 20 times to get to the end
of the <br>
line, the amount it moves the <br>
view it tiny. <br>
Also tried SCI_SETSCROLLWIDTHTRACKING and it doesn't work. It
only <br>
adjust the horizontal scrollbar <br>
to the longest line in the document, but the longest line cannot
be <br>
scrolled to the very end! <br>
</blockquote>
<br>
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. <br>
<br>
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. <br>
<br>
This is using QScintilla 2.8.4 with the default QsciScintilla
class. <br>
<br>
</blockquote>
<br>
I did a little testing and found that it works as you say when there
is no margin, more specifically no folding margin!<br>
If I add a number margin and a folding margin like this:<br>
<blockquote>document.setMarginType(0,
PyQt4.Qsci.QsciScintilla.NumberMargin)<br>
document.setMarginWidth(0, "00")<br>
document.setLexer(PyQt4.Qsci.QsciLexerCPP())<br>
document.setFolding(PyQt4.Qsci.QsciScintilla.PlainFoldStyle)<br>
</blockquote>
it behaves as I said for very long lines.<br>
<br>
Is there something wrong with the this code?<br>
<br>
Cheers,<br>
Matic<br>
</body>
</html>