<p></p>
<p><b>@xiota</b> commented on this pull request.</p>

<hr>

<p>In <a href="https://github.com/geany/geany-plugins/pull/1126#discussion_r747059281">projectorganizer/src/prjorg-sidebar.c</a>:</p>
<pre style='color:#555'>> +            }
+       }
+       return path;
+}
+
+
+/* if get_dir_of_selection() fails,
+ * returns parent of current document, project folder, or home folder */
+static gchar *get_fallback_dir_of_selection(void)
+{
+       gchar *locale_path;
+
+       /* get path from treeview selection */
+       locale_path = get_dir_of_selection();
+
+       /* get path from current document */
</pre>
<blockquote>
<p dir="auto">they aren't what the user wanted anyway</p>
</blockquote>
<p dir="auto">There is a keybinding to open the terminal, so the treeview doesn't necessarily have a selection when the terminal is opened.  While I have been using this, most of the time, it's the path to the document that I want.  The exception is if something is selected in the treeview.  New documents don't have an assigned path, so the fallback is the project path.  If the project path is invalid (which could happen when the project folder is moved without updating preferences) the user home folder is used.</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-plugins/pull/1126#discussion_r747059281">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAIOWJ2THYVYFD44NK5NRVLULL4MTANCNFSM5GTVPZ4Q">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>.
<img src="https://github.com/notifications/beacon/AAIOWJZ2VIJEOXTQ7UP32VLULL4MTA5CNFSM5GTVPZ42YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOF7QH5CI.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-plugins/pull/1126#discussion_r747059281",
"url": "https://github.com/geany/geany-plugins/pull/1126#discussion_r747059281",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>