Re: [textadept] Questions and suggestions

From: mitchell <>
Date: Fri, 8 Jul 2011 09:26:09 -0400 (Eastern Daylight Time)

Hi Anton,

On Fri, 8 Jul 2011, anton wrote:

> Hi all,
> first 3 questions.
> 1. Why does TA delete spaces in empty lines if you save the file?

Because I like stripping trailing whitespace on save.

> 2. Why is the default behaviour
> in core/locale.lua
> function localize(id) return localizations[id] or 'No Localization'
> end
> and not
> function localize(id) return localizations[id] or id end

As Steve said, it aides in debugging. If I have an ID in english, it's
nearly impossible to know if I don't have a localization for it.

> 3. I never see the complete docstatusbar
> In an empty buffer I can see only till LF...
> If a choose some lexer, I also see up to LF Spaces: ...
> Regardless how broad my window is.
> I have this issue only on my 86_64 Laptop (Arch, LXDE under Compiz)
> (I don't have this on my 86_32 PC)
> Does anybody else have this issue or is this specific to my system?

It probably has to do with your font settings. You can change the width to
something other than 400 on textadept.c:294 and recompile ta.

> And one suggestion
> I suggest to rewrite the docstatusbar update code from core/gui.lua
> to make it more flexible.
> One can simply create an array of functions docstatusbar_item
> where docstatusbar_item[counter]() should return the corresponding
> strings
> then one simply loops through this array like
> str = ''
> for _=1,#docstatusbar_item do
> str = str .. docstatusbar_item[_]()
> end
> gui.docstatusbar_text=str

The statusbar is updated on every keypress, mouse click, etc. so looping
through a table, calling a function, and concatting a string to itself
would be a slow and CPU intensive process.

It's probably easier, and faster, to hook your own events.UPDATE_UI event
that updates the docstatusbar after the original.

Received on Fri 08 Jul 2011 - 09:26:09 EDT

This archive was generated by hypermail 2.2.0 : Thu 08 Mar 2012 - 12:13:11 EST