aboutsummaryrefslogtreecommitdiff
path: root/server-fn.c
Commit message (Collapse)AuthorAge
* Merge branch 'obsd-master'Thomas Adam2013-04-23
|\ | | | | | | Sync from OpenBSD.
| * Call recalculate_sizes() after killing window in case it is in a groupedNicholas Marriott2013-04-22
| | | | | | | | session, from Daniel Ralston.
| * Use single stdout and stderr for control clients.Nicholas Marriott2013-03-25
| |
| * Rename session idx to session id throughout and add $ prefix to targetsNicholas Marriott2013-03-25
| | | | | | | | to use it, extended from a diff from George Nachman.
| * Add resize-pane -Z to temporary zoom the active pane to occupy the fullNicholas Marriott2013-03-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * Add a command queue to standardize and simplify commands that call otherNicholas Marriott2013-03-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commands and allow a command to block execution of subsequent commands. This allows run-shell and if-shell to be synchronous which has been much requested. Each client has a default command queue and commands are consumed one at a time from it. A command may suspend execution from the queue by returning CMD_RETURN_WAIT and then resume it by calling cmd_continue() - for example run-shell does this from the callback that is fired after the job is freed. When the command queue becomes empty, command clients are automatically exited (unless attaching). A callback is also fired - this is used for nested commands in, for example, if-shell which can block execution of the client's cmdq until a new cmdq becomes empty. Also merge all the old error/info/print functions together and lose the old curclient/cmdclient distinction - a cmdq is bound to one client (or none if in the configuration file), this is a command client if c->session is NULL otherwise an attached client.
| * Prevent lock on control clients, not on others.Nicholas Marriott2013-03-22
| |
| * No more lint means no more ARGSUSED.Nicholas Marriott2013-03-22
| |
| * Add various checks to turn off bits that can't work in control modeNicholas Marriott2013-03-21
| | | | | | | | (such as lock).
| * If stdin in the client is enable immediately, tmux will eat anythingNicholas Marriott2012-09-03
| | | | | | | | | | | | | | sent to stdin before it is needed, which can be inconvenient (eg pasting commands). Instead, start with stdin disabled and reuse MSG_STDIN from server->client to mean that stdin should be enabled. Based on a diff from Chris Johnsen.
| * xfree is not particularly helpful, remove it. From Thomas Adam.Nicholas Marriott2012-07-10
| |
| * Add a skeleton mode to tmux (called "control mode") that let's tmuxNicholas Marriott2012-06-18
| | | | | | | | | | | | | | commands be sent and output received on stdout. This can be used to integrate with other terminal emulators and should allow some other things to be made simpler later. More to come so doesn't do much yet and deliberately not documented.
| * Add a helper function to send ready message.Nicholas Marriott2012-05-22
| |
| * Instead of passing stdin/stdout/stderr file descriptors over imsg andNicholas Marriott2012-05-21
| | | | | | | | | | | | | | | | | | | | | | handling them in the server, handle them in the client and pass buffers over imsg. This is much tidier for some upcoming changes and the performance hit isn't critical. The tty fd is still passed to the server as before. This bumps the tmux protocol version so new clients and old servers are incompatible.
| * Add a flag to move-window to renumber the windows in a session (closingNicholas Marriott2012-04-29
| | | | | | | | | | any gaps) and add an option to do this automatically each time a window is killed. From Thomas Adam.
| * Add notify hooks for various events, the functions are currently emptyNicholas Marriott2012-03-17
| | | | | | | | stubs but will be filled in for control mode later. From George Nachman.
| * Check event_initialized before event_del if event may not have been setNicholas Marriott2012-03-17
| | | | | | | | up; libevent2 complains about this. Reported by Moriyoshi Koizumi.
| * Call bufferevent_free before closing file descriptor associated with itNicholas Marriott2012-01-29
| | | | | | | | | | or bugs in $EventMechanism on $OtherOS makes libevent get it's knickers in a twist. From Dylan Alex Simon.
| * Support for \e[3J to clear the history. Also send the correspondingNicholas Marriott2011-10-23
| | | | | | | | terminfo code (E3) before locking.
| * Mark dead panes with some text saying they are dead, suggested by andNicholas Marriott2011-09-05
| | | | | | | | with help from Randy Stauner.
| * Set $TMUX without the session when background jobs are run.Nicholas Marriott2011-01-23
| |
| * Don't reset the activity timer for unattached sessions every second,Nicholas Marriott2011-01-01
| | | | | | | | | | | | | | this screws up the choice of most-recently-used. Instead, break the time update into a little function and do it when the session is attached. Pointed out by joshe@.
| * server_kill_window can modify the RB tree so don't use RB_FOREACH, fixesNicholas Marriott2010-12-23
| | | | | | | | crash seen by Dan Harnett.
| * Store sessions in an RB tree by name rather than a list, this is tidierNicholas Marriott2010-12-21
| | | | | | | | | | | | | | | | | | 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.
| * Use pointer rather than index for the client's last session.Nicholas Marriott2010-12-20
| |
| * Track the last session for a client and add a flag to switch-client andNicholas Marriott2010-12-11
| | | | | | | | a key binding (L) to move a client back to its last session.
| * Set cause when failing due to linking a window to itself, from MartinNicholas Marriott2010-10-09
| | | | | | | | Pieuchot.
| * Skip NULL entries in the sessions list when choosing the next session,Nicholas Marriott2010-10-05
| | | | | | | | from Simon Olofsson.
| * Two new options:Nicholas Marriott2010-09-26
| | | | | | | | | | | | | | | | | | | | | | | | - server option "exit-unattached" makes the server exit when no clients are attached, even if sessions are present; - session option "destroy-unattached" destroys a session once no clients are attached to it. These are useful for preventing tmux remaining in the background where it is undesirable and when using tmux as a login shell to keep a limit on new sessions.
| * Treat trying to link or move to the same window as an error to avoidNicholas Marriott2010-08-11
| | | | | | | | removing it accidentally.
| * When changing so that the client passes its stdout and stderr as well asNicholas Marriott2010-07-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | stdin up to the server, I forgot one essential point - the tmux server could now be both the producer and consumer. This happens when tmux is run inside tmux, as well as when piping tmux commands together. So, using stdio(3) was a bad idea - if sufficient data was written, this could block in write(2). When that happened and the server was both producer and consumer, it deadlocks. Change to use libevent bufferevents for the client stdin, stdout and stderr instead. This is trivial enough for output but requires a callback mechanism to trigger when stdin is finished. This relies on the underlying polling mechanism for libevent to work with whatever devices to which the user could redirect stdin, stdout or stderr, hence the change to use poll(2) over kqueue(2) for tmux.
| * New option, detach-on-destroy, to set what happens to a client when the sessionNicholas Marriott2010-06-27
| | | | | | | | | | it is attached to is destroyed. If on (the default), it is detached; if off, it is switched to the most recently active session.
| * Use server_destroy_session() for kill-session.Nicholas Marriott2010-06-26
| |
| * Having a list of winlinks->alerts for each session is stupid, just storeNicholas Marriott2010-06-21
| | | | | | | | the alert flags directly in the winlink itself.
| * If remain-on-exit is set, both the error callback and a SIGCHLD couldNicholas Marriott2010-04-17
| | | | | | | | | | | | destroy the same pane (because the first one doesn't remove it from the list of panes), causing the pane bufferevent to be freed twice. So don't free it if the fd has already been set to -1, from Romain Francoise.
| * Dead functions, lint.Nicholas Marriott2010-03-22
| |
| * When a window is destroyed, remove all links to it from each session ratherNicholas Marriott2010-01-23
| | | | | | | | than just the first. Reported by Robin Lee Powell.
| * Options to set the colour of the pane borders, with different colours for theNicholas Marriott2010-01-03
| | | | | | | | active pane.
| * Fix a couple of problems with grouped sessions reported by danh: redrawNicholas Marriott2009-12-22
| | | | | | | | properly and choose the correct last window after a window is killed.
| * Massive spaces->tabs and trailing whitespace cleanup, hopefully for the lastNicholas Marriott2009-12-03
| | | | | | | | | | time now I've configured emacs to make them displayed in really annoying colours...
| * Remove a couple of unused arguments where possible, and add /* ARGSUSED */ toNicholas Marriott2009-11-26
| | | | | | | | the rest to reduce lint output.
| * Destroy panes immediately rather than checking them all every loop.Nicholas Marriott2009-11-13
| |
| * Use timeout events for the identify and message timers.Nicholas Marriott2009-11-04
| |
| * Don't reenlist the client imsg event every loop, instead have a small functionNicholas Marriott2009-11-04
| | | | | | | | to it and call it after the event triggers or after a imsg is added.
| * Set the current window pointer to NULL when killing a winlink that is to beNicholas Marriott2009-10-11
| | | | | | | | | | | | | | replaced with link-window -k. This prevents it being pushed onto the last window stack and causing a use-after-free. Only took me an hour to find this :-/...
| * Add "grouped sessions" which have independent name, options, current window andNicholas Marriott2009-10-10
| | | | | | | | | | | | | | | | so on but where the linked windows are synchronized (ie creating, killing windows and so on are mirrored between the sessions). A grouped session may be created by passing -t to new-session. Had this around for a while, tested by a couple of people.
| * Check for already locked/suspended clients in server_lock_client rather thanNicholas Marriott2009-10-04
| | | | | | | | its callers.
| * New lock-client and lock-session commands to lock an individual client or allNicholas Marriott2009-09-24
| | | | | | | | clients attached to a session respectively.
| * Remove the internal tmux locking and instead detach each client and run theNicholas Marriott2009-09-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | command specified by a new option "lock-command" (by default "lock -np") in each client. This means each terminal has to be unlocked individually but simplifies the code and allows the system password to be used to unlock. Note that the set-password command is gone, so it will need to be removed from configuration files, and the -U command line flag has been removed. This is the third protocol version change so again it is best to stop the tmux server before upgrading.
| * Move some common and untidy code for window link/unlink into generic functionsNicholas Marriott2009-09-20
| | | | | | | | instead of duplicating it in move/link window..