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

From: David Tamar <david-tamar.att.outlook.com>
Date: Mon, 29 Jul 2019 17:38:54 +0000

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:

  1. If not instructed during Textadept's initialization phase, the file may open and display with the correct lexer (color highlighting) and everything is OK. This is random and quite unlikely.
  2. If it fails however, then the file is opened up, but there is no color highlighting, and the lexer stops working on this particular file (even if you try to manually select one). There are no error messages. Although if you restarted TA, you'll see an additional empty "Untitled" buffer that you haven't seen last session. You'll also notice the wrong tab sizes and other quirks in that file buffer. Attempting to open more buffers at this point may turn TA unusable as well.
  3. If instructed during Textadept's initialization phase, then the editor will become completely unresponsive, exactly as in the case that was described in the original post. I suspect that's because "io.open_file(...)" instructs "buffer.new()" within itself, therefore I think this bug may be related to it.

________________________________
From: Mitchell <m.att.foicica.com>
Sent: Monday, July 29, 2019 17:46
To: code.att.foicica.com <code.att.foicica.com>
Subject: Re: [code] Creating new buffers during Textadept's init.lua execution results in severe errors.

Hi David,

On Mon, 29 Jul 2019, David Tamar wrote:

> I don't know if it's just me, but it seems like a bug in Textadept's C layer. I can't figure it out.
> Any attempt to create new buffers during Textadept's init.lua execution will make the editor unusable.
> [snip]

This is a known limitation and needs to be documented or fixed on my side. Thanks for the reminder.

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.
-- 
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:38:54 EDT

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