summaryrefslogtreecommitdiffstats
path: root/key-bindings.c
AgeCommit message (Collapse)Author
2013-02-24Add resize-pane -Z to temporary zoom the active pane to occupy the full windowNicholas Marriott
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-02-23Add a command queue to standardize and simplify commands that call otherNicholas Marriott
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.
2013-02-20Need to set clients in context before changing their reference count.Nicholas Marriott
2013-02-18Remove unnecessary initializers of cmd_ctx.Nicholas Marriott
2013-02-18Add functions to allocate and free command contexts rather than doing it all onNicholas Marriott
the stack.
2013-01-17Merge branch 'obsd-master'Thomas Adam
2013-01-17Remove the layout undo/redo code which never really worked.Nicholas Marriott
2012-07-11Sync OpenBSD patchset 1150:Tiago Cunha
xfree is not particularly helpful, remove it. From Thomas Adam.
2012-07-11Sync OpenBSD patchset 1146:Tiago Cunha
Add choose-tree command to show windows and sessions in the same list. Change choose-window and -session to use the same code. From Thomas Adam.
2012-07-10xfree is not particularly helpful, remove it. From Thomas Adam.Nicholas Marriott
2012-07-08Add choose-tree command to show windows and sessions in the sameNicholas Marriott
list. Change choose-window and -session to use the same code. From Thomas Adam.
2012-06-18Sync OpenBSD patchset 1136:Tiago Cunha
Add a couple of NULL pointer checks to key binding functions, from jspenguin on SF bug 3535531.
2012-06-18Add a couple of NULL pointer checks to key binding functions, fromNicholas Marriott
jspenguin on SF bug 3535531.
2012-04-10Sync OpenBSD patchset 1084:Tiago Cunha
Add a layout history which can be stepped through with select-layout -u and -U commands (bound to 'u' and 'U' by default).
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-01-21Sync OpenBSD patchset 1008:Tiago Cunha
Use RB trees not SPLAY.
2012-01-21Use RB trees not SPLAY.Nicholas Marriott
2011-07-04Sync OpenBSD patchset 928:Tiago Cunha
Include the existing window and session name in the prompt when renaming and add a new key binding ($) for rename session. From Tiago Cunha.
2011-07-03Include the existing window and session name in the prompt when renamingNicholas Marriott
and add a new key binding ($) for rename session. From Tiago Cunha.
2011-01-07Sync OpenBSD patchset 829:Tiago Cunha
Clean up and simplify tmux command argument parsing. Originally, tmux commands were parsed in the client process into a struct with the command data which was then serialised and sent to the server to be executed. The parsing was later moved into the server (an argv was sent from the client), but the parse step and intermediate struct was kept. This change removes that struct and the separate parse step. Argument parsing and printing is now common to all commands (in arguments.c) with each command left with just an optional check function (to validate the arguments at parse time), the exec function and a function to set up any key bindings (renamed from the old init function). This is overall more simple and consistent. There should be no changes to any commands behaviour or syntax although as this touches every command please watch for any unexpected changes.
2011-01-04Clean up and simplify tmux command argument parsing.Nicholas Marriott
Originally, tmux commands were parsed in the client process into a struct with the command data which was then serialised and sent to the server to be executed. The parsing was later moved into the server (an argv was sent from the client), but the parse step and intermediate struct was kept. This change removes that struct and the separate parse step. Argument parsing and printing is now common to all commands (in arguments.c) with each command left with just an optional check function (to validate the arguments at parse time), the exec function and a function to set up any key bindings (renamed from the old init function). This is overall more simple and consistent. There should be no changes to any commands behaviour or syntax although as this touches every command please watch for any unexpected changes.
2010-12-11Track the last session for a client and add a flag to switch-client andNicholas Marriott
a key binding (L) to move a client back to its last session.
2010-12-11Track the last session for a client and add a flag to switch-client andNicholas Marriott
a key binding (L) to move a client back to its last session.
2010-10-24Sync OpenBSD patchset 780:Tiago Cunha
Add a last-pane command (bound to ; by default). Requested ages ago by somebody whose name I have forgotten.
2010-10-23Add a last-pane command (bound to ; by default). Requested ages ago byNicholas Marriott
somebody whose name I have forgotten.
2010-09-10Sync OpenBSD patchset 759:Tiago Cunha
Add -n and -p flags to switch-client to move to the next and previous session (yes, it doesn't match window/pane, but so what, nor does switch-client). Based on a diff long ago from "edsouza".
2010-09-08Add -n and -p flags to switch-client to move to the next and previousNicholas Marriott
session (yes, it doesn't match window/pane, but so what, nor does switch-client). Based on a diff long ago from "edsouza".
2010-07-02Sync OpenBSD patchset 727:Tiago Cunha
Setting the cmdlist pointer in the bind-key to NULL to prevent it being freed after the command is executing is bogus because it may still be needed if the same command is going to be executed again (for example if you "bind-key a bind-key b ..."). Making a copy is hard, so instead add a reference count to the cmd_list. While here, also print bind-key -n and the rest of the flags properly. Fixes problem reported by mcbride@.
2010-06-26Setting the cmdlist pointer in the bind-key to NULL to prevent it being freedNicholas Marriott
after the command is executing is bogus because it may still be needed if the same command is going to be executed again (for example if you "bind-key a bind-key b ..."). Making a copy is hard, so instead add a reference count to the cmd_list. While here, also print bind-key -n and the rest of the flags properly. Fixes problem reported by mcbride@.
2010-06-22Sync OpenBSD patchset 726:Tiago Cunha
Add a choose-buffer command for easier use of the paste buffer stack.
2010-06-21Add a choose-buffer command for easier use of the paste buffer stack.Nicholas Marriott
2010-05-14Sync OpenBSD patchset 697:Tiago Cunha
Identical behaviour to select-prompt can now be obtained with command-prompt, so remove select-prompt and change ' to be bound to command-prompt -p index "select-window -t :%%".
2010-05-14Sync OpenBSD patchset 688:Tiago Cunha
Add a tiled layout, originally from Liam Bedford a while ago, fixed up by me.
2010-05-05Identical behaviour to select-prompt can now be obtained withNicholas Marriott
command-prompt, so remove select-prompt and change ' to be bound to command-prompt -p index "select-window -t :%%".
2010-04-25Add a tiled layout, originally from Liam Bedford a while ago, fixed upNicholas Marriott
by me.
2010-04-06Merge copy mode and output mode, dropping the latter. Idea and code fromNicholas Marriott
Micah Cowan.
2010-04-05Merge output (more) and copy modes into one single mode (called copy).Micah Cowan
2010-03-22Support up, down, left, right movement through panes with -UDLR flags toNicholas Marriott
select-pane. Also REMOVE the up- and down-pane commands: equivalent behaviour is now available using -t :.+ and -t :.-.
2010-03-15Support up, down, left, right movement through panes with -UDLR flags toNicholas Marriott
select-pane. Also remove up- and down-pane: equivalent behaviour is now available using -t :.+ and -t :.-.
2010-02-08Sync OpenBSD patchset 639:Tiago Cunha
Support attaching a client read-only with a new -r flag to the attach-session command.
2010-02-06Support attaching a client read-only with a new -r flag to the attach-sessionNicholas Marriott
command.
2009-12-10Sync OpenBSD patchset 585:Tiago Cunha
Add "server options" which are server-wide and not bound to a session or window. Set and displayed with "set -s" and "show -s". Currently the only option is "quiet" (like command-line -q, allowing it to be set from .tmux.conf), but others will come along.
2009-12-10Add "server options" which are server-wide and not bound to a session orNicholas Marriott
window. Set and displayed with "set -s" and "show -s". Currently the only option is "quiet" (like command-line -q, allowing it to be set from .tmux.conf), but others will come along.
2009-12-04Sync OpenBSD patchset 581:Tiago Cunha
Massive spaces->tabs and trailing whitespace cleanup, hopefully for the last time now I've configured emacs to make them displayed in really annoying colours...
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-11-19Sync OpenBSD patchset 546:Tiago Cunha
Add a per-client log of status line messages displayed while that client exists. A new message-limit session option sets the maximum number of entries and a command, show-messages, shows the log (bound to ~ by default). This (and prompt history) might be better as a single global log but until there are global options it is easier for them to be per client.
2009-11-18Add a per-client log of status line messages displayed while that clientNicholas Marriott
exists. A new message-limit session option sets the maximum number of entries and a command, show-messages, shows the log (bound to ~ by default). This (and prompt history) might be better as a single global log but until there are global options it is easier for them to be per client.
2009-11-13Sync OpenBSD patchset 533:Tiago Cunha
Zap unused functions, prompted by deraadt.
2009-11-13Zap unused functions, prompted by deraadt.Nicholas Marriott
2009-10-06Sync OpenBSD patchset 362:Tiago Cunha
Remove scroll mode which is now redundant, copy mode should be used instead. The = key binding now does nothing.