[Github-comments] [geany/geany] Keep the current tab when closing documents to the right of another tab (#1579)
Matthew Brush
notifications at xxxxx
Mon Sep 18 16:31:33 UTC 2017
codebrainz commented on this pull request.
> gint doc_page = document_get_notebook_page(doc);
for (gint i = doc_page + 1; i < gtk_notebook_get_n_pages(nb); )
{
if (! document_close(document_get_from_page(i)))
i++; // only increment if tab wasn't closed
}
- gtk_notebook_set_current_page(nb, doc_page);
+ gtk_notebook_set_current_page(nb, MIN(current_page, doc_page));
Would've saved me a couple minutes of head-scratching if there was a comment that said "keep the current tab unless it was closed, in which case use the activated tab" or something. Maybe I'm just stupid.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/1579#pullrequestreview-63410944
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20170918/97922d3c/attachment.html>
More information about the Github-comments
mailing list