path: root/cmd-choose-window.c
Commit message (Collapse)AuthorAgeFilesLines
* Sync OpenBSD patchset 813:tcunha2011-01-071-18/+7
| | | | | Add a function to create window flags rather than doing the same thing in two places. From Thomas Adam.
* Sync OpenBSD patchset 829:tcunha2011-01-071-11/+10
| | | | | | | | | | | | | | | | | | | | | 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.
* Sync OpenBSD patchset 801:tcunha2010-12-221-6/+5
| | | | | | Unify the way sessions are used by callbacks - store the address and use the reference count, then check it is still on the global sessions list in the callback.
* Add an option to alert (monitor) for silence (lack of activity) in anicm2010-12-061-1/+3
| | | | window. From Thomas Adam.
* Sync OpenBSD patchset 724:tcunha2010-06-221-4/+4
| | | | | Having a list of winlinks->alerts for each session is stupid, just store the alert flags directly in the winlink itself.
* Sync OpenBSD patchset 686:tcunha2010-04-221-2/+3
| | | | Mark zombie windows as dead in choose-window list, from Romain Francoise.
* Sync OpenBSD patchset 581:tcunha2009-12-041-4/+4
| | | | | | 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...
* Sync OpenBSD patchset 539:tcunha2009-11-141-2/+2
| | | | | Get rid of the ugly CMD_CHFLAG macro and use a const string (eg "dDU") in the command entry structs and a couple of functions to check/set the flags.
* Sync OpenBSD patchset 371:tcunha2009-10-111-2/+2
| | | | | | | | | Add "grouped sessions" which have independent name, options, current window and 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.
* Sync OpenBSD patchset 320:tcunha2009-09-071-17/+16
| | | | | Reference count clients and sessions rather than relying on a saved index for cmd-choose-*.
* Include <ctype.h>.tcunha2009-08-251-1/+3
* Sync OpenBSD patchset 294:tcunha2009-08-251-12/+64
| | | | | | | | | | | | Add a choose-client command and extend choose-{session,window} to accept a template. After a choice is made, %% (or %1) in the template is replaced by the name of the session, window or client suitable for -t and the result executed as a command. So, for example, "choose-window "killw -t '%%'"" will kill the selected window. The defaults if no template is given are (as now) select-window for choose-window, switch-client for choose-session, and detach-client for choose-client (now bound to D).
* Sync OpenBSD patchset 217:tcunha2009-08-091-3/+26
| | | | Show the bell/activity/current status and the window title in the choice list.
* Sync OpenBSD patchset 181:tcunha2009-07-281-2/+0
| | | | | | | | | | | | | | | | Make all messages sent between the client and server fixed size. This is the first of two changes to make the protocol more resilient and less sensitive to other changes in the code, particularly with commands. The client now packs argv into a buffer and sends it to the server for parsing, rather than doing it itself and sending the parsed command data. As a side-effect this also removes a lot of now-unused command marshalling code. Mixing a server without this change and a client with or vice versa will cause tmux to hang or crash, please ensure that tmux is entirely killed before upgrading.
* Sync OpenBSD patchset 142:tcunha2009-07-201-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.
* A similar for fix for window_choose: don't rely on the callback always beingnicm2009-07-171-2/+1
| | | | | called to free data, have a separate free callback and call it from the mode cleanup code.
* Having fixed flags for single-character getopt options is a bit hard tonicm2009-07-141-1/+1
| | | | | | | | | maintain and is only going to get worse as more are used. So instead, add a new uint64_t member to cmd_entry which is a bitmask of upper and lowercase options accepted by the command. This means new single character options can be used without the need to add it explicitly to the list.
* Space trimmage mega-diff.nicm2009-05-041-1/+1
* Display the layout name in window lists.nicm2009-04-301-2/+2
* Pass return code from _exec; allow command sequences to work from the ↵nicm2009-01-191-8/+6
| | | | command line.
* Don't die when run non-interactively. DOH.nicm2009-01-181-2/+5
* find-window command.nicm2009-01-181-4/+5
* Tidy a few warnings.nicm2009-01-171-1/+1
* Recalculate sizes and don't redraw if unnecessary.nicm2009-01-151-1/+2
* Show number of panes.nicm2009-01-151-1/+2
* Two new commands, choose-window and choose-session which work only when ↵nicm2009-01-151-0/+102
bound to a key and allow the window or session to be selected from a list.