summaryrefslogtreecommitdiffstats
path: root/layout.c
AgeCommit message (Collapse)Author
2021-03-11Add split-window -Z to start the pane zoomed, GitHub issue 2591.nicm
2019-07-15Simplify code to work out if an extra line is needed in the cell.nicm
2019-07-15Make layout_fix_offsets take a window like layout_fix_panes.nicm
2019-06-26Fix a typo in window_pane_find_down (w not wp) and a missing PANE_STATUS_TOP.nicm
2019-06-26Add #define for the pane status line option position numbers.nicm
2019-04-23Do not try to resize if the parent cell is NULL, problem reported bynicm
Sunil Nimmagadda.
2019-04-17Fix minimum size check on split and size of first cell on spread outnicm
with a pane status line.
2019-04-17Set the window size as well as the layout size when using the presetnicm
layouts.
2019-04-17Break new window and pane creation common code from various commands andnicm
window.c into a separate file spawn.c.
2019-04-04Fix size check for splitw -f and top level pane size for tiled layout,nicm
problems reported by Thomas Sattler.
2018-10-18Support for windows larger than visible on the attached client. This hasnicm
been a limitation for a long time. There are two new options, window-size and default-size, and a new command, resize-window. The force-width and force-height options and the session_width and session_height formats have been removed. The new window-size option tells tmux how to work out the size of windows: largest means it picks the size of the largest session, smallest the smallest session (similar to the old behaviour) and manual means that it does not automatically resize windows. The default is currently largest but this may change. aggressive-resize modifies the choice of session for largest and smallest as it did before. If a window is in a session attached to a client that is too small, only part of the window is shown. tmux attempts to keep the cursor visible, so the part of the window displayed is changed as the cursor moves (with a small delay, to try and avoid excess redrawing when applications redraw status lines or similar that are not currently visible). The offset of the visible portion of the window is shown in status-right. Drawing windows which are larger than the client is not as efficient as those which fit, particularly when the cursor moves, so it is recommended to avoid using this on slow machines or networks (set window-size to smallest or manual). The resize-window command can be used to resize a window manually. If it is used, the window-size option is automatically set to manual for the window (undo this with "setw -u window-size"). resize-window works in a similar way to resize-pane (-U -D -L -R -x -y flags) but also has -a and -A flags. -a sets the window to the size of the smallest client (what it would be if window-size was smallest) and -A the largest. For the same behaviour as force-width or force-height, use resize-window -x or -y, and "setw -u window-size" to revert to automatic sizing.. If the global window-size option is set to manual, the default-size option is used for new windows. If -x or -y is used with new-session, that sets the default-size option for the new session. The maximum size of a window is 10000x10000. But expect applications to complain and much higher memory use if making a window excessively big. The minimum size is the size required for the current layout including borders. The refresh-client command can be used to pan around a window, -U -D -L -R moves up, down, left or right and -c returns to automatic cursor tracking. The position is reset when the current window is changed.
2018-09-24Only include pane status in minimum size if it is turned on, GitHubnicm
issue 1480.
2018-06-08Instead of working out which pane to resize with the mouse by walkingnicm
the panes list, look through the layout cells for the nearest border and resize that cell. From Dan Aloni in GitHub issue 1374.
2018-03-23Fix size calculation when spreading out panes.nicm
2018-01-12Improve logging for layout cells.nicm
2017-11-15Add a common function for spreading out cells and use it for the twonicm
even layouts and to add a -E flag to select-layout to spread out cells evenly without changing parent cells.
2017-03-11Fix calculation of size for full size splits.nicm
2016-10-16Use the notify name string instead of going via an enum and changenicm
existing hooks to use notifys instead.
2016-10-10Do not allow the opposite pane to resize when dragging with the mousenicm
because it is not possible to keep the mouse on the border when the minimum size is reached.
2016-09-04Add support for performing a full width split (with splitw -f), rathernicm
than splitting the current cell. From Stephen Kent.
2016-08-03Fix minimum size when pane status line is enabled, reported by Y Petremann.nicm
2016-04-29Add option to include status text in the pane borders. Ifnicm
pane-border-status is set to "top" or "bottom" (rather than "off"), every pane has a permanent top or bottom border containing the text from pane-border-format. Based on a diff sent long ago by Jonathan Slenders, mostly rewritten and simplified by me.
2016-01-19I no longer use my SourceForge address so replace it.nicm
2015-12-11Style nits and line wrapping of function declarations.nicm
2015-09-18-l should apply to the new not the old pane with -b, from "MadMaverick9"nicm
on GitHub.
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