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

From: Robert <ro....at.web.de>
Date: Tue, 14 Dec 2010 17:00:28 +0100

On Tue, Dec 14, 2010 at 4:16 PM, mitchell <c....at.caladbolg.net> wrote:
> Robert,
>
>> Mitchell,
>> 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.
>
> An error handler can be added to keys.lua:
>
> events.connect('error', clear_key_sequence)
>
> Lua errors emit error events. Does this fix the problem? If so I will commit
> to hg later today.
>
> mitchell
>
For a simple command, adding clear_key_sequence to keys.lua works:
keys.au = { unknown_command }
Ctrl-w closes the error buffer immediately

With
keys.ct.o = { unknown_keychain_command }
I get the error buffer, but the char "o" is inserted and even though
the caret is blinking in the error buffer the other buffer remains in
focus and is still set as the buffer title.

Robert
Received on Tue 14 Dec 2010 - 11:00:28 EST

This archive was generated by hypermail 2.2.0 : Thu 08 Mar 2012 - 11:57:02 EST