Re: [code] [textadept] Using normal buffer as command entry

From: Mitchell <>
Date: Wed, 12 Feb 2014 13:53:32 -0500 (Eastern Standard Time)

Hi Chris,

On Tue, 11 Feb 2014, Chris Emerson wrote:

> Hi,
> I've been experimenting with using a normal TA buffer in a small split view
> as a more flexible replacement for the command entry (actually with
> Textredux). I quite like it - I can colour it at will, play with the cursor
> position, history, etc., enlarge it to show completions, etc.
> There are two annoyances it'd be nice to solve, though:
> * I currently save the window configuration, unsplit everything, split to
> make the 1-line entry, and recreate the original splits, and then do it all
> again when exiting the entry again. This is flickery, especially with a few
> splits.
> The simplest "fix" I can think of would be to allow view.size=(full size
> of parent) and define it to hide the second view and the divider, so
> that instead of rebuilding everything it's just a case of adjusting
> view.size.

I wouldn't want to hide the split because that's hiding information. While
adding a `view:maximize()`-style may be helpful in certain situations, it
breaks down with an arrangement like:


How would `v3:maximize()` behave?

> The least simple would be to replace the GTK entry/CDKEntry with a
> dedicated buffer and some more Lua code...

Right, this is not desirable.

> * In the GTK version, I haven't worked out how to make the split the right
> height for exactly one line of text.

I don't think there is an elegant way to determine the view dimensions,
but I happened upon something curious:

   * Split horizontally.
   * Set `view.size = 1000` (or something large enough to hide the other
   * Open the command entry and close it again.
   * About a line of the other view is now visible.


You are subscribed to
To change subscription settings, send an e-mail to
To unsubscribe, send an e-mail to
Received on Wed 12 Feb 2014 - 13:53:32 EST

This archive was generated by hypermail 2.2.0 : Thu 13 Feb 2014 - 06:49:23 EST