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

<hr>

<p>In <a href="https://github.com/geany/geany/pull/2346#discussion_r332739742">src/notebook.c</a>:</p>
<pre style='color:#555'>> +    if (cur_doc == NULL)
+               cur_doc = document_get_current();
+       if (!cur_doc->real_path)
+               return;
+
+       gchar *dir = g_dirname(cur_doc->real_path);
+
+       for (gint i = 0; i < gtk_notebook_get_n_pages(GTK_NOTEBOOK(main_widgets.notebook)); i++)
+       {
+               GeanyDocument *doc = document_get_from_page(i);
+
+               if (!doc->real_path)
+                       continue;
+               if (other_folders && g_str_has_prefix(doc->real_path, dir))
+                       continue;
+               if (!other_folders && !g_str_has_prefix(doc->real_path, dir))
</pre>
<p>If you mean closing in the whole tree subtree, that probably would be better on the documents sidebar where the specific root directory can be selected, you may not have files in that specific directory open, only subdirectories.</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/pull/2346?email_source=notifications&email_token=AAIOWJYEAE7ZXNWBTOOCWOLQNT2Y3A5CNFSM4I6TQ5Q2YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCHJUHSI#discussion_r332739742">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAIOWJZZV2WX5OIG22OSWV3QNT2Y3ANCNFSM4I6TQ5QQ">mute the thread</a>.<img src="https://github.com/notifications/beacon/AAIOWJZJSRELF4S7BFYXIVDQNT2Y3A5CNFSM4I6TQ5Q2YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCHJUHSI.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/pull/2346?email_source=notifications\u0026email_token=AAIOWJYEAE7ZXNWBTOOCWOLQNT2Y3A5CNFSM4I6TQ5Q2YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCHJUHSI#discussion_r332739742",
"url": "https://github.com/geany/geany/pull/2346?email_source=notifications\u0026email_token=AAIOWJYEAE7ZXNWBTOOCWOLQNT2Y3A5CNFSM4I6TQ5Q2YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCHJUHSI#discussion_r332739742",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>