Re: Ctrl-Tab to go back to the most-recently-used buffer

From: mitchell <mforal.n....at.gmail.com>
Date: Wed, 13 May 2009 20:39:35 -0700 (PDT)

Andy,

> > This would work. You can store a variable like 'previous_buffer' in
> > the global table _G if you'd like.
>
> Ok, but how do I get the current buffer index? ..In order to later switch to
> it with "view:goto_buffer(previous_buffer_index, true)"..

You could loop through textadept.buffers:

for idx, buf in ipairs(textadept.buffers) do
  if buf == buffer then
    -- do something with idx
  end
end
Received on Wed 13 May 2009 - 23:39:35 EDT

This archive was generated by hypermail 2.2.0 : Thu 08 Mar 2012 - 11:37:53 EST