Re: Problem with Windows io.popen

From: steve donovan <steve.j.dono....at.gmail.com>
Date: Fri, 6 May 2011 13:30:20 +0200

On Fri, May 6, 2011 at 1:12 PM, steve donovan <steve.j.dono....at.gmail.com> wrote:
> in the error window does not do what I expect; TA opens the Lua file
> in the view previously occupied by the error buffer and brings up a
> tooltip.

Well, it is just doing what we tell it ;)

          io.open_file(utf8_filename)
          _m.textadept.editing.goto_line(captures[error_detail.line])

and io.open_file will just do this:

  for i, buffer in ipairs(_BUFFERS) do
    if utf8_filename == buffer.filename then
      view:goto_buffer(i)
      return
    end
  end

So the behaviour I expected would require first a search through the
views to find if the file is already visible, and switch to that,
otherwise fall back to io.open_file

steve d.
Received on Fri 06 May 2011 - 07:30:20 EDT

This archive was generated by hypermail 2.2.0 : Thu 08 Mar 2012 - 12:06:28 EST