Re: [code] [textadept] Bug with property saving

From: Mitchell <m.att.foicica.com>
Date: Thu, 12 Mar 2015 14:34:36 -0400 (EDT)

Hi Robert,

On Thu, 12 Mar 2015, rob.g.att.web.de wrote:

> Hi,
>
> I think there is a bug introduced by the new margin and property saving. At first I though I had a bug in the Textredux module but I've created an example to reproduce this without it.
> When creating a new buffer, changing its margins and closing it again, while starting from anywhere but the last buffer, the margins of the new buffer are added to the last buffer in _BUFFERS for some reason.
>
> Steps to reproduce in a clean `.textadept/init.lua`:
> - open `init.lua` and `session`
> - go to `init.lua` (first buffer)
> - create new buffer and change margin (`Ctrl-1` with the code below)
> - close new buffer
> - last buffer has margins (and other properties) from closed, previously created buffer
>
> [snip]

Thanks for the report and detailed instructions on how to reproduce. The
bug is at the end of textadept.c's "lbuffer_delete" method.

   lL_event(L, "buffer_deleted", -1), lL_event(L, "buffer_after_switch", -1);

These events should be swapped. Recompiling Textadept after the swap seems
to fix the issue.

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 Thu 12 Mar 2015 - 14:34:36 EDT

This archive was generated by hypermail 2.2.0 : Fri 13 Mar 2015 - 06:36:13 EDT