<p></p>
<p>If the Geany execute command item is activated while a command is running it terminates the command, this allows programs that get into an infinite loop to be terminated.  When running in a terminal Geany does not know the process ID of the program, only of the terminal, so that is what is terminated, and hopefully it will terminate the program.  Similarly as it does not know the program process id there is no way Geany can find out if the program has finished, only if the terminal has finished, so the execute action remains as "stop" until the terminal closes.  So this part is working as intended.</p>
<p>Geany does not store any execute state when it closes because it no longer owns the terminal process when its restarted (if that process still existed) so there is no point in it doing so.  I suspect that if the execute icon stays at stop then your laptop is not shutting down, it is hibernating or suspending, so Geany is restored in its previous state, but I have no idea if the terminal process termination is correctly delivered in that case, possibly not, but its not a scenario Geany has been designed to cope with, YMMV.</p>
<p>If you want to have multiple terminals open the command Geany runs (from <code>Preferences->Tools->Terminal</code>) must complete.  I havn't tried it, but you could try modifying that preference to run the terminal in a shell and detaching 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/2703#issuecomment-750701890">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAIOWJY4SQCQ76LO2232OLDSWKNT5ANCNFSM4VHMZG5Q">unsubscribe</a>.<img src="https://github.com/notifications/beacon/AAIOWJZ7KO26DXOYMQCXEETSWKNT5A5CNFSM4VHMZG52YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOFS7M2QQ.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/2703#issuecomment-750701890",
"url": "https://github.com/geany/geany/issues/2703#issuecomment-750701890",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>