Some plugins, such as Overview, place their own Scintilla inside the notebook in which case locate_sci_in_container() might find a scintilla widget not belonging to Geany.
Modify locate_sci_in_container() to also call document_find_by_sci() to verify whether the scintilla object belongs to Geany. There seems to be some issue when there's a single notebook page (which also happens when adding files from a session) where we get a runtime error from document_get_from_page() called from on_notebook_switch_page() about NULL scintilla. I haven't investigated the exact reason but since the code inside on_notebook_switch_page() is only related to the MRU list which is kind of irrelevant for a single page, just skipping the rest of the function in this case fixes this issue. Fixes https://github.com/geany/geany-plugins/issues/730 Fixes https://github.com/geany/geany-plugins/issues/1149 Fixes https://github.com/geany/geany-plugins/issues/1180 You can view, comment on, or merge this pull request online at: https://github.com/geany/geany/pull/4349 -- Commit Summary -- * Modify locate_sci_in_container() to only find document scintilla -- File Changes -- M src/document.c (7) M src/notebook.c (3) -- Patch Links -- https://github.com/geany/geany/pull/4349.patch https://github.com/geany/geany/pull/4349.diff -- Reply to this email directly or view it on GitHub: https://github.com/geany/geany/pull/4349 You are receiving this because you are subscribed to this thread. Message ID: <geany/geany/pull/[email protected]>
