Re: [code] [textadept] Programmatically moving splits

From: Mitchell <>
Date: Sat, 15 Aug 2015 13:07:50 -0400 (EDT)

Hi Chris,

On Fri, 14 Aug 2015, Chris Emerson wrote:

> Hi,
> I don't think it's possible to programatically move split positions if both
> halves have been split. Eg in the following case:
> view1 | view2
> |
> ===============
> view3 | view4
> |
> The only API I can see is "view.size". view1.size and view2.size both
> move the vertical split between them, view3.size and view4.size both
> move their split, and there's no way of moving the horizontal one.
> Would it be possible to have some way of doing it? :-)

You are correct that there is no way to do this currently. The only (ugly)
way I can think is to save the current view's size, unsplit it, resizing
the now unsplit view (which would move the horizontal split), re-splitting
the view, and restoring the saved size.

> My best idea (I haven't thought very hard) is stuffing some kind of ID
> into the result of ui.get_split_table(), and passing that to another
> function in ui (ui.move_split(id, value) or something).

When I developed Textadept's split views, I never imagined it functioning
as a sort of window manager, so I'd never thought of these kinds of
situations. If this kind of thing was to be supported, I think refactoring
Textadept's handling of split views is necessary.


You are subscribed to
To change subscription settings, send an e-mail to
To unsubscribe, send an e-mail to
Received on Sat 15 Aug 2015 - 13:07:50 EDT

This archive was generated by hypermail 2.2.0 : Sun 16 Aug 2015 - 06:38:30 EDT