Re: [code] [textadept] Control-c to clear Message Buffer

From: Mitchell <m.att.foicica.com>
Date: Fri, 24 Jul 2015 20:29:25 -0400 (EDT)

Hi Jay,

On Fri, 24 Jul 2015, Jay Young wrote:

> I've been trying to figure out a way where I can press Control-c and make that clear the Message Buffer. Here's some code I've been testing with in my init.lua file. It doesn't work right though - it only clears whichever buffer is active.
>
> keys.cc = { function()
> for k,v in ipairs(_BUFFERS) do
> if v._type then
> v.clear_all()

This should be "v:clear_all()".

Lua's ':' notation means to pass 'v' as a "self"-type argument to the
"clear_all" buffer function.

Cheers,
Mitchell

-- 
You are subscribed to code.att.foicica.com.
To change subscription settings, send an e-mail to code+help.att.foicica.com.
To unsubscribe, send an e-mail to code+unsubscribe.att.foicica.com.
Received on Fri 24 Jul 2015 - 20:29:25 EDT

This archive was generated by hypermail 2.2.0 : Sat 25 Jul 2015 - 06:41:29 EDT