I'm not sure the OPs code should do anything, correct me if I'm wrong, but 
AFAICT it gets the current document which is the one in the current notebook 
tab, then sets the notebook tab to that tab, but the code from above:

```C
                if (idx!=gtk_notebook_get_current_page(NOTEBOOK)) {
                        gtk_notebook_set_current_page(NOTEBOOK, idx);
```

makes it do nothing if the current tab == the tab requested == the tab of the 
current document == the document of the current tab so its guaranteed to do 
nothing.

Even if it did set the notebook tab 
[GTK](https://docs.gtk.org/gtk3/method.Notebook.set_current_page.html) does not 
say it grabs focus, so the Geanylua doc that says:

```
function activate ( tab_id )                     -- Focus the specified editor 
tab.
```
is wrong anyway.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany-plugins/issues/1229#issuecomment-1454304215
You are receiving this because you are subscribed to this thread.

Message ID: <geany/geany-plugins/issues/1229/[email protected]>

Reply via email to