Re: [code] [textadept] Error in textadept.run.build

From: Mitchell <m.att.foicica.com>
Date: Mon, 12 Sep 2016 12:39:08 -0400 (EDT)

Hi Chris,

On Mon, 12 Sep 2016, Chris Emerson wrote:

> Hi,
>
> textadept.run.build() raises an error because the variable `event` is nil/
> undefined.
>
> The following quick fix (copying the initialisation from another function)
> seems to make it work:
>
> --- a/ta_releases/textadept_9.0_beta.x86_64/modules/textadept/run.lua
> +++ b/ta_releases/textadept_9.0_beta.x86_64/modules/textadept/run.lua
> @@ -289,6 +289,8 @@ function M.build(root_directory)
> end
> end
> -- Run the command.
> + local event = commands == M.compile_commands and events.COMPILE_OUTPUT or
> + events.RUN_OUTPUT
> cwd = working_dir or root_directory
> events.emit(event, '> cd '..cwd)
> events.emit(event, '> '..command:iconv('UTF-8', _CHARSET))

Thanks for catching this. The `event` passed to `events.emit()` should
actually be `events.BUILD_OUTPUT`. It was a bad refactoring job on my
part. I'll commit a fix for this that will be in the next nightly.

Cheers,
Mitchell

-- 
You are subscribed to code.att.foicica.com.
To change subscription settings, send an e-mail to code+help.att.foicica.com.
To unsubscribe, send an e-mail to code+unsubscribe.att.foicica.com.
Received on Mon 12 Sep 2016 - 12:39:08 EDT

This archive was generated by hypermail 2.2.0 : Tue 13 Sep 2016 - 06:31:48 EDT