Re: [code] Creating new buffers during Textadept's init.lua execution results in severe errors.

From: Mitchell <m.att.foicica.com>
Date: Mon, 29 Jul 2019 13:48:05 -0400 (EDT)

Hi David,

On Mon, 29 Jul 2019, David Tamar wrote:

> Hi, I think I've found another closely-related bug that has to do with buffers.
> In this one I'm trying to open a file imperatively from a Lua module in Textadept like this:
> io.open_file("/foo/bar.lua")
> Sometimes it works properly, but most of the time it works and then breaks Textadept's lexer and other components. Here's a detailed report:
> [snip]

In general, one should not try to open files or create buffers during Textadept's initialization. This should only be done afterwards in an `events.INITIALIZED` handler. If you wrap your `io.open_file()` and `buffer.new()` calls in such a handler, does the problem go away?

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 29 Jul 2019 - 13:48:05 EDT

This archive was generated by hypermail 2.2.0 : Tue 30 Jul 2019 - 06:50:29 EDT