<p></p>
<p>In general, this issue results in incorrect intialisation of the editor's horizontal scrollbar (at least on my platform, see the Geany-INFO in OP)</p>
<p>Further debugging yields more pointers at the cause of this issue.</p>
<p>The warning seems to result from <code>Scintilla::ScintillaGTK::Resize()</code> call triggered by <code>sci_set_lines_wrapped()</code> during <a href="../geany/blob/402d277f80b508e89440fe3669ce3f2f45768cc7/src/keyfile.c#L1237"><code>open_session_file()</code></a> at start-up.</p>
<p>Precisely, the <code>editor_set_line_wrapping()</code> is what trips the warning:</p>
<p><a href="https://github.com/geany/geany/blob/402d277f80b508e89440fe3669ce3f2f45768cc7/src/keyfile.c#L1237">https://github.com/geany/geany/blob/402d277f80b508e89440fe3669ce3f2f45768cc7/src/keyfile.c#L1237</a></p>
<p>From what I could understand, in this context the intent of this call is to properly configure the editor for each file re-loaded from the previous session. So the effect of this call should be setting of the <code>doc->editor->line_wrapping</code> from the previously saved state (from session file).</p>
<p>Indeed, amending this line into:</p>
<pre><code>doc->editor->line_wrapping = line_wrapping
</code></pre>
<p>fixes the warning and corrects the initialisation of the scrollbar.</p>
<p>Looking closer at what this does, this change removes an extra Sci-call to <code>SSM(sci, SCI_SETWRAPMODE, SC_WRAP_WORD, 0)</code>, which requests a reset of the line-wrapping mode. In this context it appears to be unnecessary, as the correct line-wraping mode has been already set up during the creation of the document in <code>document_open_file_full()</code>, which subsequently calls <code>sci_set_lines_wrapped(sci, editor->line_wrapping)</code> from <code>create_new_sci()</code>:</p>
<p><a href="https://github.com/geany/geany/blob/402d277f80b508e89440fe3669ce3f2f45768cc7/src/editor.c#L4921">https://github.com/geany/geany/blob/402d277f80b508e89440fe3669ce3f2f45768cc7/src/editor.c#L4921</a></p>
<p>Hope this is helpful. Perhaps, someone more familiar with this context could comment on the need for this seemingly redundant Sci-call. If this change indeed makes sense, I can produce a PR for it.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/geany/geany/issues/2700#issuecomment-749781483">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAIOWJ2CYSRD4ZMWPNXEDTTSWEET5ANCNFSM4VFHQYUA">unsubscribe</a>.<img src="https://github.com/notifications/beacon/AAIOWJ7KMW24LPNCIRJE7KLSWEET5A5CNFSM4VFHQYUKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOFSYMD2Y.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/geany/geany/issues/2700#issuecomment-749781483",
"url": "https://github.com/geany/geany/issues/2700#issuecomment-749781483",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>