<p></p>
<p dir="auto">When opening a file from command line, with Geany not yet running, the <code>g_idle_add(...)</code><br>
<a href="https://github.com/geany/geany/blob/378e5e8a0db18364cd9ec848aa81f5eded508da5/src/keyfile.c#L1365">https://github.com/geany/geany/blob/378e5e8a0db18364cd9ec848aa81f5eded508da5/src/keyfile.c#L1365</a><br>
will postpone the switch to the saved session's last active file until after both the session and the file specified on the command line are loaded.<br>
But this way, the specified file will <em>not</em> become the active one.</p>
<p dir="auto">I think, the expected behavior would be that the file specified on the command line does become the active one.<br>
Note that this is also the current behavior if Geany is already running (and thus the session need not be loaded anymore).</p>
<p dir="auto">This issue could be fixed e.g. by doing an immediate call instead, say</p>
<div class="highlight highlight-source-c"><pre><span class="pl-en">switch_to_session_page</span>(<span class="pl-c1">NULL</span>);</pre></div>
<p dir="auto">But maybe there is a good reason for postponing the call (I am not aware of).</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />Reply to this email directly, <a href="https://github.com/geany/geany/issues/3136">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAIOWJZOUUJTNZYTHZQIERDVA5DIDANCNFSM5RFV3GNQ">unsubscribe</a>.<br />Triage notifications on the go with GitHub Mobile for <a href="https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675">iOS</a> or <a href="https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub">Android</a>.
<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AAIOWJ2OVW5WHYJZN7XWLPTVA5DIDA5CNFSM5RFV3GN2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4RQC46XQ.gif" height="1" width="1" alt="" /><span style="color: transparent; font-size: 0; display: none; visibility: hidden; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0; mso-hide: all">Message ID: <span><geany/geany/issues/3136</span><span>@</span><span>github</span><span>.</span><span>com></span></span></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/geany/geany/issues/3136",
"url": "https://github.com/geany/geany/issues/3136",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>