Re: [textadept] Interactive Lua Prompt

From: mitchell <>
Date: Mon, 28 Mar 2011 11:08:40 -0400 (Eastern Daylight Time)


On Mon, 28 Mar 2011, SteveD wrote:

> <snip>

> However, I did need to override the default implementation of
> gui.print.
> 1 captures nils etc in the varargs
> 2 converts everything to strings so that table.concat does not freak
> 3 leaves the caret after the inserted text

Thanks for this; I will commit changes later today with these items.

Very cool extension!


> 4 implements gui.write() so I could put out the Lua prompt.
> The first two are needed for situations like gui.print('hello',nil,{})
> - there is a nil arg, which will mess up the size of the args table,
> and {}, which will make table.concat() complain bitterly. This
> implementation is pretty consistent with the behaviour of _G.print().
> Although generally I like auto-pair completion, it does mess a bit
> with the interactive prompt - would be useful if this feature could be
> disabled selectively for message buffers. (Comment out this line if
> you want to see the issue)
> Interesting behaviour: if Textadept has initially just an Untitled
> buffer, then any gui.print() will bring up a message view and split -
> but in this case both views will point to the new message buffer.
> Easy to reproduce, just an empty session and F2 print 'hello'. Not
> sure if it's a big issue, but it is odd.
> steve d.
> --
> You received this message because you are subscribed to the Google Groups "textadept" group.
> To post to this group, send email to
> To unsubscribe from this group, send email to
> For more options, visit this group at

Received on Mon 28 Mar 2011 - 11:08:40 EDT

This archive was generated by hypermail 2.2.0 : Thu 08 Mar 2012 - 12:03:46 EST