Re: [textadept] question on unsplitting a view when encountering a lua error

From: Robert <>
Date: Tue, 14 Dec 2010 10:04:39 +0100

Hi Scott!

On Mon, Dec 13, 2010 at 10:32 AM, Scott Weisman <> wrote:
> I added this to my init.lua file:
> = { function ()
>    if buffer._type then
>        buffer:close()
>        gui.goto_view(-1, false)
>        view:unsplit()
>    else
>        buffer:close()
>    end
> end }
> (Thanks to whomever provided it.)
> However, I have to hit ctrl-w twice to get the view to unsplit and
> close. The first ctrl-w results in "Invalid sequence" in the
> statusbar. The second works as expected. Can someone explain what's
> wrong with the above?
> Thanks.

Thanks for making me try to figure out things like this. I put this on
the wiki. It seems that the problem is that the keychain table in
textadept.keys.lua has not been cleared yet when an error occurs
during a key command. The behaviour you described should not happen
when you e.g. put something in the command entry.

is there a way to delete the current keychain when an error is raised?
Is the error event raised for Lua errors as well?
from events.lua:
-- * **error** (text)
-- Called when an error occurs in the C code.
-- - text: The error text.

Received on Tue 14 Dec 2010 - 04:04:39 EST

This archive was generated by hypermail 2.2.0 : Thu 08 Mar 2012 - 11:56:58 EST