It's continuation of the discussion #646 . Code example: ```lua local s = geany.selection();
if (s ~= "") and (s ~= nil) then local t = geany.fileinfo(); geany.newfile("", t.type); geany.selection(s); end ```
Old/current scripts don't need to be updated, they will still work! You can view, comment on, or merge this pull request online at:
https://github.com/geany/geany-plugins/pull/652
-- Commit Summary --
* GeanyLua: Add filetype to set in geany.newfile()
-- File Changes --
M geanylua/docs/geanylua-ref.html (24) M geanylua/glspi_doc.c (17)
-- Patch Links --
https://github.com/geany/geany-plugins/pull/652.patch https://github.com/geany/geany-plugins/pull/652.diff
Hmm... "This branch has no conflicts with the base branch", but "1 errored check"? #653 too...
@Skif-off looks like a Travis problem, not yours, push something trivial to make it start again.
@Skif-off pushed 1 commit.
c91ae6f GeanyLua: trivial for Travis
@elextr The same problem...
Its not you AFAICT, its happening to others as well, see #650
Help, please :) How can I add memory freeing for ```tmp```? ```g_free(tmp)``` doesn't works, I tried ```const gchar *tmp``` and ```gchar *tmp```. Or maybe possible to ignore it here?
I presume you mean [this line](https://github.com/geany/geany-plugins/pull/652/files?diff=unified#diff-cb59...). Well its not going to be `g_free()` thats for memory allocated by Glib, the function is `lua_...` so its part of Lua, you need to read the Lua C interface to see what to do with it.
@elextr
you need to read the Lua C interface to see what to do with it.
Thanks :)
I presume you mean [this line](https://github.com/geany/geany-plugins/pull/652/files?diff=unified#diff-cb59...).
and sorry, I needed to say more clearly.
```glspi_run_script()``` runs ```glspi_state_new()``` (i.e. ```luaL_newstate()```) first and ```glspi_state_done()``` (i.e. ```lua_close()```, [description](https://www.lua.org/manual/5.1/manual.html#lua_close)) at the end + [Garbage Collection](https://www.lua.org/manual/5.1/manual.html#2.10): I think I can ignore it.
P.S. Do #652 and #653 have a chance without maintainer?
@Skif-off pushed 1 commit.
5bb1ca7 GeanyLua: geanylua-ref.html: Fix "zebra" (class "odd"/"even")
Do #652, #653 and #662 have a chance without maintainer? And warning fixes ([here](https://github.com/geany/geany-plugins/issues/646#issuecomment-346596722) and below) are will be great :)
Sorry, I didn't notice
**frlan** added this to the 1.33.0 milestone 12 hours ago
Good news, thanks!
Merged #652.
github-comments@lists.geany.org