summaryrefslogtreecommitdiff
path: root/usr.bin/tmux/window.c
AgeCommit message (Collapse)Author
2015-12-02Mark new active pane changed after pane lost in window, and afterNicholas Marriott
break-pane. Reported by tim@.
2015-11-24Make environ_set va_args and use it to tidy up some calls. Also add aNicholas Marriott
missing word in manpage (from jmc).
2015-11-18Use __unused rather than rolling our own.Nicholas Marriott
2015-11-12Support UTF-8 key bindings by expanding the key type from int toNicholas Marriott
uint64_t and converting UTF-8 to Unicode on input and the reverse on output. (This allows key bindings, there are still omissions - the largest being that the various prompts do not accept UTF-8.)
2015-10-31Because pledge(2) does not allow us to pass directory file descriptorsNicholas Marriott
around, we can't use file descriptors for the working directory because we will be unable to pass it to a privileged process to tell it where to read or write files or spawn children. So move tmux back to using strings for the current working directory. We try to check it exists with access() when it is set but ultimately fall back to ~ if it fails at time of use (or / if that fails too).
2015-10-27Move struct options into options.c.Nicholas Marriott
2015-09-14When the active pane changes, redraw panes if the style hasNicholas Marriott
changed. From Cam Hutchison.
2015-08-29Remove some old prototypes and unused functions.Nicholas Marriott
2015-08-29Move alerts onto events rather than checking every loop.Nicholas Marriott
2015-08-29Treat entering or leaving a mode as pane changed.Nicholas Marriott
2015-08-29Better take on reducing the name timer. Again check for name changes inNicholas Marriott
the main loop after events that may have changed the pane, but do so at most once every 500 millis. If the pane changed too soon, use a timer to ensure that a check happens later.
2015-08-28Only set default title to hostname on screens that are being used for aNicholas Marriott
window pane, no point in calling gethostname() for temporary screens.
2015-08-28Revert previous; we do need a timer, until I have a better idea. WeNicholas Marriott
can't do the name check every loop, because that is too expensive, and we can't make sure it only happens infrequently because we have no idea when the next change will happen.
2015-08-28We now only checking for name changes when the active pane has changed,Nicholas Marriott
but that can only happen when we have already been woken up by a read event, so there is no need for a timer, we can just check the changed flag on the end of that read event (we already loop over the windows to check for bells etc anyway).
2015-08-28Error messages should not have a trailing period.Nicholas Marriott
2015-08-28Only do the automatic-rename dance if the pane has changed (seen output,Nicholas Marriott
or new active pane).
2015-07-17Do not call window_unzoom from window_destroy because it will try to addNicholas Marriott
a notification which will get confused because the reference count is already zero and end up back in window_destroy and a double free. Instead, just destroy the layouts directly. Noticed by Thomas Adam.
2015-06-17Move the shuffle code from new-window -a into a function and add a -aNicholas Marriott
flag for move-window too. From Thomas Adam.
2015-06-15Add window_activity format, from Thomas Adam based on a diff originallyNicholas Marriott
from propos6 at gmail dot com.
2015-06-04Add support for a single "marked pane". There is one marked pane in theNicholas Marriott
server at a time; it may be toggled or cleared with select-pane -m and -M (the border is highlighted). A new target '~' or '{marked}' specifies the marked pane to commands and it is the default target for the swap-pane and join-pane -s flag (this makes them much simpler to use - mark the source pane and then change to the target pane to run swapp or joinp).
2015-05-12To replace c0-*, add a high watermark to the pty event, and also backoffNicholas Marriott
when the any of the ttys the pane is going to write to has buffered enough data.
2015-05-11Remove the c0-* options which never really worked satisfactorily. GoingNicholas Marriott
to try something else...
2015-05-07Style spacing nits.Nicholas Marriott
2015-05-06Add a format window_linked which is 1 if a window has been linkedNicholas Marriott
multiple times, also remove the default space in window_flags and use a conditional to add it in window-status-format (this means additional flags can be added in the option without extra spaces). From Thomas Adam with tweaks by me.
2015-04-28Add select-layout -o to undo the last layout change (apply the previouslyNicholas Marriott
set layout).
2015-04-25Get rid of window_choose_list type.Nicholas Marriott
2015-04-25Fix some char* -> char *.Nicholas Marriott
2015-04-25Make message log a TAILQ.Nicholas Marriott
2015-04-25Move the functions to convert ids from strings into session.c and window.c.Nicholas Marriott
2015-04-22Change the windows array into an RB tree and fix some places where weNicholas Marriott
were only looking at the first winlink for a window in a session.
2015-04-22window_index is only used in one place (window_destroy) so inline it there.Nicholas Marriott
2015-04-21Always format real layout even when zoomed.Nicholas Marriott
2015-04-20Use a more sensible buffer size for flags string.Nicholas Marriott
2015-04-19Rewrite of tmux mouse support which was a mess. Instead of havingNicholas Marriott
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.
2015-04-19Support setting the default window and pane background colours (windowNicholas Marriott
and active pane via window-style and window-active-style options, an individual pane by a new select-pane -P flag). From J Raynor.
2015-02-09Entries in the window list can be NULL, prompted by a crash seen by BenNicholas Marriott
Boeckel.
2014-12-15Notify on zoom/unzoom, from George Nachmann.Nicholas Marriott
2014-10-21Only redraw pane when it has actually changed.Nicholas Marriott
2014-08-11Add flags to selectp to enable and disable input to a pane, from AnishNicholas Marriott
Athalye.
2014-06-23Allow keys and send-keys to invisible panes, from saggy-kun at users dotNicholas Marriott
sf dot net.
2014-06-05Reset properly when c0-change-trigger is increased from zero so panesNicholas Marriott
don't get stuck.
2014-05-13If multiple arguments are given to new-session, new-window,Nicholas Marriott
split-window, respawn-window or respawn-pane, pass them directly to execvp() to help avoid quoting problems. One argument still goes to "sh -c" like before. Requested by many over the years. Patch from J Raynor.
2014-05-08Both the two previous ways of navigating panes by direction haveNicholas Marriott
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-04-17Some more long lines.Nicholas Marriott
2014-04-17Set PATH explicitly, either from client or sessionNicholas Marriott
environment. Previously it came from the session environment. From J Raynor.
2014-04-17Remove some unnecessary includes and fix a typo.Nicholas Marriott
2014-04-17Correct the dance to fix the active pane in join-pane by pulling theNicholas Marriott
(right) code from break-pane and window_remove_pane into a helper function.
2014-04-17Remove the monitor-content option and associated bits and bobs. It'sNicholas Marriott
never worked very well. If there is a big demand for it to return, will consider better ways to do it.
2014-03-31Don't segfaut when the parent of the layout cell is NULL, from Thomas Adam.Nicholas Marriott
2014-02-22Fix crash due to uninitialized lastwp member of layout_cell, reported byNicholas Marriott
Balazs Kezes.