<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="elementToProof">
Hi,</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="elementToProof">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="elementToProof">
My Specs: Python 3.10.4 x64, PyQt 6.4.0, QScintilla 2.13.3<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="elementToProof">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="elementToProof">
When having at least one margin and setting 'QsciScintilla.setEolVisibility(True)',</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="elementToProof">
this is what happens to the margin when scrolling horizontally:<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="elementToProof">
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="elementToProof">
<img style="max-width:100%" class="ContentPasted0 w-385 h-322" size="14946" contenttype="image/png" data-outlook-trace="F:1|T:1" src="cid:0703ea12-9f1d-4fdc-834f-5032ae002ed2"></div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="elementToProof ContentPasted1">
Is this a bug in <i><b>QScintilla </b></i>or in the underlying <b><i>Qt Scintilla widget</i></b>?</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="elementToProof ContentPasted1">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="elementToProof ContentPasted1">
Here is the code to reproduce it:</div>
<blockquote style="margin-top:0;margin-bottom:0">
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="elementToProof ContentPasted1 ContentPasted2">
<span style="font-size: 10pt;"><i>import PyQt6.QtGui</i></span>
<div class="ContentPasted2"><span style="font-size: 10pt;"><i>import PyQt6.Qsci</i></span></div>
<div class="ContentPasted2"><span style="font-size: 10pt;"><i>import sys</i></span></div>
<div><i><br class="ContentPasted2">
</i></div>
<div class="ContentPasted2"><span style="font-size: 10pt;"><i>application = PyQt6.QtWidgets.QApplication(sys.argv)</i></span></div>
<div class="ContentPasted2"><span style="font-size: 10pt;"><i>editor = PyQt6.Qsci.QsciScintilla()</i></span></div>
<div class="ContentPasted2"><span style="font-size: 10pt;"><i>editor.setMarginType(0, PyQt6.Qsci.QsciScintilla.MarginType.NumberMargin)</i></span></div>
<div class="ContentPasted2"><span style="font-size: 10pt;"><i>editor.setMarginWidth(0, "000000")</i></span></div>
<div class="ContentPasted2"><span style="font-size: 10pt;"><i>for i in range(100):</i></span></div>
<div class="ContentPasted2"><span style="font-size: 10pt;"><i> editor.append("Hello World | " * 50 + "\n")</i></span></div>
<div class="ContentPasted2"><span style="font-size: 10pt;"><i>editor.setEolVisibility(True)</i></span></div>
<div class="ContentPasted2"><span style="font-size: 10pt;"><i>editor.show()</i></span></div>
<div><i><br class="ContentPasted2">
</i></div>
<span style="font-size: 10pt;"><i>application.exec()</i></span><br>
</div>
</blockquote>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="elementToProof ContentPasted1">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="elementToProof ContentPasted1">
The same code with 'setEolVisibility(False)' does not have this problem.</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="elementToProof ContentPasted1">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="elementToProof ContentPasted1">
Regards,</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="elementToProof ContentPasted1">
Matic<br>
</div>
</body>
</html>