summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/resize.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Tidy the resize code, merge some common bits and add some comments. Fromnicm2020-10-051-209/+168
| | | | "Mike" in GitHub issue 2392.
* Add support for pausing a pane when the output buffered for a controlnicm2020-06-051-6/+12
| | | | | | mode client gets too far behind. The pause-after flag with a time is set on the pane with refresh-client -f and a paused pane may be resumed with refresh-client -A. GitHub issue 2217.
* Move lazy resize from the pane to the window, there is no point innicm2020-05-161-6/+21
| | | | | | resizing the window unless it is the current window, and if we do and don't resize the pane until later there are problems if the size changes from A to B then back to A.
* Change the existing client flags for control mode to apply for anynicm2020-05-161-5/+5
| | | | | | | | | | | | | | | | client, use the same mechanism for the read-only flag and add an ignore-size flag. refresh-client -F has become -f (-F stays for backwards compatibility) and attach-session and switch-client now have -f flags also. A new format "client_flags" lists the flags and is shown by list-clients by default. This separates the read-only flag from "ignore size" behaviour (new ignore-size) flag - both behaviours are useful in different circumstances. attach -r and switchc -r remain and set or toggle both flags together.
* If ALL clients are readonly, allow them to affect the size, suggested by Thomas Sattler.nicm2020-01-281-1/+17
|
* Add a define for flags meaning a client is not attached, and fixnicm2020-01-281-3/+4
| | | | unattached counter, reported by Thomas Sattler.
* If a window appears in only one attached session, there is no point innicm2019-11-291-5/+23
| | | | worrying about which is the latest client (there is only one).
* Make a best effort to set xpixel and ypixel for each pane and addnicm2019-11-281-7/+46
| | | | formats for them.
* Use the correct size for new windows when window-size is latest,nicm2019-09-231-21/+48
| | | | reported by Vamsi Krishna Avula in GitHub issue 1917.
* Add a "latest" window-size option which tries to size windows based onnicm2019-09-191-73/+112
| | | | | the most recently used client. From Tommie Gannert in GitHub issue 1869 based on earlier changes from me.
* Do not reduce window height by status line height for control modenicm2019-05-111-3/+4
| | | | clients, from George Nachman.
* Set the window size as well as the layout size when using the presetnicm2019-04-171-1/+3
| | | | layouts.
* Tidy and rename some bits of status line code.nicm2019-03-161-2/+2
|
* Fix resizing of control clients, should be ignored until SIZECHANGED flag set.nicm2019-03-121-20/+24
|
* Fix sense of aggressive-resize flag.nicm2019-03-041-2/+2
|
* Support for windows larger than visible on the attached client. This hasnicm2018-10-181-114/+198
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* SESSION_UNATTACHED flag is no longer necessary now we have an attachednicm2018-08-181-10/+3
| | | | count instead.
* Infrastructure for drawing status lines of more than one line in height,nicm2017-10-161-9/+13
| | | | still only one is allowed but this lets tmux draw bigger ones.
* Do not forbid targets to specify non-visible panes - the checks fornicm2017-08-281-1/+3
| | | | visibility are better where the target is used. GitHub issue 1049.
* Prevent control clients from affecting the session size until they havenicm2017-05-101-1/+4
| | | | | specified a size with refresh-client -C. Prompted by a different change with the same purpose from George Nachman.
* Improve some of the logging on resize.nicm2017-02-081-5/+5
|
* Cache status line position to reduce option lookups during output.nicm2017-02-031-1/+3
|
* Use the notify name string instead of going via an enum and changenicm2016-10-161-2/+2
| | | | existing hooks to use notifys instead.
* I no longer use my SourceForge address so replace it.nicm2016-01-191-2/+2
|
* Move struct options into options.c.nicm2015-10-271-5/+5
|
* Convert clients list into a TAILQ.nicm2015-04-241-5/+4
|
* Make session_has return a flag, returning the first winlink found is anicm2015-04-221-2/+2
| | | | recipe for errors.
* Change the windows array into an RB tree and fix some places where wenicm2015-04-221-7/+6
| | | | were only looking at the first winlink for a window in a session.
* Label windows which are smaller than expected with a reason.nicm2014-11-141-4/+12
|
* Don't let force-width or force-height be < PANE_MINIMUM.nicm2014-11-121-3/+3
|
* Make session_attached a count and add session_many_attached flag.nicm2014-03-311-1/+3
|
* Make recalculate_sizes() handle an empty window with no activenicm2013-10-101-2/+2
| | | | | | | pane. This can happen when a window is in two sessions - it isn't destroyed immediately when the pane goes away but is left until the last session is destroyed. Fixes problems with grouped sessions reported by Daniel Ralston.
* Add resize-pane -Z to temporary zoom the active pane to occupy the fullnicm2013-03-241-3/+7
| | | | | | | | | | | | | | 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.
* Do not include status line in size calculations in control mode.nicm2013-03-211-14/+17
|
* Add notify hooks for various events, the functions are currently emptynicm2012-03-171-1/+2
| | | | stubs but will be filled in for control mode later. From George Nachman.
* Store sessions in an RB tree by name rather than a list, this is tidiernicm2010-12-211-9/+4
| | | | | | | | | and allows them to easily be shown sorted in various lists (list-sessions/choose-sessions). Keep a session index which is used in a couple of places internally but make it an ever-increasing number rather than filling in gaps with new sessions.
* There is somewhere that WINDOW_HIDDEN is getting set when it shouldn'tnicm2010-11-221-5/+2
| | | | | | | | be and I can't find it, but the flag itself is a useless optimisation that only applies to automatic-resize windows, so just dispose of it entirely. Fixes problems reported by Nicholas Riley.
* Having a list of winlinks->alerts for each session is stupid, just storenicm2010-06-211-2/+2
| | | | the alert flags directly in the winlink itself.
* Don't allow locked or suspended clients to limit the size of active clients.nicm2009-09-241-2/+2
|
* Improved layout code.nicm2009-07-191-2/+2
| | | | | | | | | | | | | | | | | | | | | | | 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.
* Get rid of the PANE_HIDDEN flag in favour of a function, and moving thenicm2009-07-141-1/+16
| | | | | | | | 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.
* Import tmux, a terminal multiplexor allowing (among other things) a singlenicm2009-06-011-0/+138
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