@kugel- commented on this pull request.


> @@ -4746,8 +4746,12 @@ gboolean editor_goto_pos(GeanyEditor *editor, gint 
> pos, gboolean mark)
        sci_goto_pos(editor->sci, pos, TRUE);
        editor->scroll_percent = 0.25F;
 
-       /* finally switch to the page */
-       document_show_tab(editor->document);
+       /* switch to the page, via idle callback in case of batch-opening */
+       if (main_status.opening_session_files)
+               document_show_tab_idle(editor->document);

I thought about it but I hesitated because I wasn't sure if someone (like a 
plugin) depends on `document_get_current()` returning the switched-to doc 
immediately after using calling `document_show_tab()` or document_open_*. This 
also affects the document_open_* functions which internally call 
`document_show_tab()` via `editor_goto_pos()`.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/3267#discussion_r1195977226
You are receiving this because you are subscribed to this thread.

Message ID: <geany/geany/pull/3267/review/[email protected]>

Reply via email to