Re: [code] [textadept] Click on tabs without switching

From: Richard Philips <>
Date: Wed, 15 Jan 2014 17:16:58 +0100

Hello Robert,

I often want to "clean up" the open buffers except the current one.

So, I wrote a Lua script - bound to a key sequence - which does that.

Probably inefficient as hell, but it works :-):

function Buffer.close_all_buffers_except_current()
   local current_buffer, skip, done, bi, n, i = buffer, {}, true
   while done do
     done = false
     n = nil
     for i, buf in ipairs(_BUFFERS) do
       if type(i) == 'number' then b, bi = i, buf else b, bi = buf, i end
       if not skip[bi] then
         if bi ~= current_buffer then
           if not io.close_buffer() then skip[bi] = "" end
           done = true
           n = b
     if #_BUFFERS == 1 then done = false end
   if not n then n = #_BUFFERS end


On 01/15/2014 04:15 PM, Robert Gieseke wrote:
> Hi,
> Am 1/15/14, 4:03 PM, schrieb Mitchell:
>>> would be possible to have right-clicks on tabs not have them
>>> activated/switched to? This it how it works in my browsers as well.
>> I tried to do this originally, but it is too complex to fit in without
>> exceeding the C code limit. I figured it was okay anyway since SciTE
>> does it.
> understood! I just thought maybe it's already in GTK and only a
> switch. Personally I'm fine as I can "clean up" open buffers with
> Textredux buffer list
> Cheers,
> Robert

You are subscribed to
To change subscription settings, send an e-mail to
To unsubscribe, send an e-mail to
Received on Wed 15 Jan 2014 - 11:16:58 EST

This archive was generated by hypermail 2.2.0 : Thu 16 Jan 2014 - 06:26:43 EST