summaryrefslogtreecommitdiffstats
path: root/layout.c
AgeCommit message (Collapse)Author
2015-04-19Rewrite of tmux mouse support which was a mess. Instead of havingnicm
options for "mouse-this" and "mouse-that", mouse events may be bound as keys and there is one option "mouse" that turns on mouse support entirely (set -g mouse on). See the new MOUSE SUPPORT section of the man page for description of the key names and new flags (-t= to specify the pane or window under mouse as a target, and send-keys -M to pass through a mouse event). The default builtin bindings for the mouse are: bind -n MouseDown1Pane select-pane -t=; send-keys -M bind -n MouseDown1Status select-window -t= bind -n MouseDrag1Pane copy-mode -M bind -n MouseDrag1Border resize-pane -M To get the effect of turning mode-mouse off, do: unbind -n MouseDrag1Pane unbind -temacs-copy MouseDrag1Pane The old mouse options are now gone, set-option -q may be used to suppress warnings if mixing configuration files.
2014-05-08Both the two previous ways of navigating panes by direction havenicm
irritating flaws: a) The old way of always using the top or left if the choice is ambiguous is annoying when the layout is unbalanced. b) The new way of remembering the last used pane is annoying if the layout is balanced and the leftmost is obvious to the user (because clearly if we go right from the top-left in a tiled set of four we want to end up in top-right, even if we were last using the bottom-right). So instead, use a combination of both: if there is only one possible pane alongside the current pane, move to it, otherwise choose the most recently used of the choice.
2014-02-22Fix crash due to uninitialized lastwp member of layout_cell, reported bynicm
Balazs Kezes.
2013-10-10mouse-resize-pane: Only resize on border selectnicm
The current behaviour of mouse-resize-pane is such that if the mouse button is held down and a selection takes place within a pane, that if the mouse pointer then hits a border edge, that pane-resize would initiate. This seems counter-intuitive; instead, check for a resize condition if the border of a pane is selected, and in the case of mouse selection within a pane, no longer resize the pane if edge of the border is hit. By Thomas Adam.
2013-03-24Add resize-pane -Z to temporary zoom the active pane to occupy the fullNicholas Marriott
window or unzoom (restored to the normal layout) if it already zoomed, bound to C-b z by default. The pane is unzoomed on pretty much any excuse whatsoever. We considered making this a new layout but the requirements are quite different from layouts so decided it is better as a special case. Each current layout cell is saved, a temporary one-cell layout generated and all except the active pane set to NULL. Prompted by suggestions and scripts from several. Thanks to Aaron Jensen and Thiago Padilha for testing an earlier version.
2013-03-22Add resize-pane -x and -y for absolute pane size (much requested).Nicholas Marriott
2013-01-17Remove the layout undo/redo code which never really worked.Nicholas Marriott
2012-10-26Make mouse event structure clearer by defining events (up, click, drag)Nicholas Marriott
and simplifying how buttons and wheels are represented, from Ailin Nemui. Should be no functional changes.
2012-07-10xfree is not particularly helpful, remove it. From Thomas Adam.Nicholas Marriott
2012-04-01Fix some indentation.Nicholas Marriott
2012-04-01Fix option name.Nicholas Marriott
2012-04-01Add a layout history which can be stepped through with select-layout -uNicholas Marriott
and -U commands (bound to 'u' and 'U' by default).
2012-03-17Add notify hooks for various events, the functions are currently emptyNicholas Marriott
stubs but will be filled in for control mode later. From George Nachman.
2012-03-03Add move-pane command (like join-pane but allows the same window). AlsoNicholas Marriott
-b flag to join-pane and move-pane to place the pane to the left or above. From George Nachman.
2012-01-29Add an option to move the status line to the top of the screen,Nicholas Marriott
requested by many.
2011-05-08Add a new option, mouse-resize-pane. When on, panes may be resized byNicholas Marriott
dragging their borders. From hsim at gmx.li.
2010-06-29Custom layouts. list-windows command displays the layout as a string (such asNicholas Marriott
"bb62,159x48,0,0{79x48,0,0,79x48,80,0}") and it can be applied to another window (with the same number of panes or fewer) using select-layout.
2010-01-07New command, join-pane, to split and move an existing pane into the space (likeNicholas Marriott
splitw then movep, or the reverse of breakp).
2009-12-03Massive spaces->tabs and trailing whitespace cleanup, hopefully for the lastNicholas Marriott
time now I've configured emacs to make them displayed in really annoying colours...
2009-07-19Improved layout code.Nicholas Marriott
Each window now has a tree of layout cells associated with it. In this tree, each node is either a horizontal or vertical cell containing a list of other cells running from left-to-right or top-to-bottom, or a leaf cell which is associated with a pane. The major functional changes are: - panes may now be split arbitrarily both horizontally (splitw -h, C-b %) and vertically (splitw -v, C-b "); - panes may be resized both horizontally and vertically (resizep -L/-R/-U/-D, bound to C-b left/right/up/down and C-b M-left/right/up/down); - layouts are now applied and then may be modified by resizing or splitting panes, rather than being fixed and reapplied when the window is resized or panes are added; - manual-vertical layout is no longer necessary, and active-only layout is gone (but may return in future); - the main-pane layouts now reduce the size of the main pane to fit all panes if possible. Thanks to all who tested.
2009-07-14Get rid of the PANE_HIDDEN flag in favour of a function, and moving theNicholas Marriott
decision for whether or not a pane should be drawn out of the layout code and into the redraw code. This is needed for the new layout design, getting it in now to make that easier to work on.
2009-06-01Import tmux, a terminal multiplexor allowing (among other things) a singleNicholas Marriott
terminal to be switched between several different windows and programs displayed on one terminal be detached from one terminal and moved to another. ok deraadt pirofti