Add append_buffer function (both C and Lua)
A bit better unhiding handling