> I'm not sure the OPs code should do anything...

In my Lua test code, what I'm interested in is the return value.  Even if the 
function ultimately doesn't have to switch tabs, `idx` should still be set 
greater than `0` and return true.  But no matter what I send, including numbers 
that should work, like `1`, it returns `false`.

> 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... is wrong anyway.

Okay.  But the tab isn't changed.  Even if focus isn't changed, changing the 
tab would be an improvement.  Somehow by the end of the function, `idx <= 0`, 
causing `false` to be returned.  Maybe the problem is `lua_gettop(L)>0` and 
`idx` is never changed from its initialized value?

Presumably, this function did work at some time in GeanyLua's past?

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

Message ID: <geany/geany-plugins/issues/1229/1454331...@github.com>

Reply via email to