aboutsummaryrefslogtreecommitdiff
path: root/cmd-split-window.c
Commit message (Collapse)AuthorAge
...
* | Merge branch 'obsd-master'Thomas Adam2017-05-31
|\| | | | | | | | | | | | | Conflicts: Makefile.am cfg.c server-client.c
| * Rewrite of choose mode, both to simplify and tidy the code and to addnicm2017-05-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | some modern features. Now the common code is in mode-tree.c, which provides an API used by the three modes now separated into window-{buffer,client,tree}.c. Buffer mode shows buffers, client mode clients and tree mode a tree of sessions, windows and panes. Each mode has a common set of key bindings plus a few that are specific to the mode. Other changes are: - each mode has a preview pane: for buffers this is the buffer content (very useful), for others it is a preview of the pane; - items may be sorted in different ways ('O' key); - multiple items may be tagged and an operation applied to all of them (for example, to delete multiple buffers at once); - in tree mode a command may be run on the selected item (session, window, pane) or on tagged items (key ':'); - displayed items may be filtered in tree mode by using a format (this is used to implement find-window) (key 'f'); - the custom format (-F) for the display is no longer available; - shortcut keys change from 0-9, a-z, A-Z which was always a bit weird with keys used for other uses to 0-9, M-a to M-z. Now that the code is simpler, other improvements will come later. Primary key bindings for each mode are documented under the commands in the man page (choose-buffer, choose-client, choose-tree). Parts written by Thomas Adam.
* | Merge branch 'obsd-master'Thomas Adam2017-04-25
|\|
| * Do not update TERM into config file parsing has finished.nicm2017-04-25
| |
* | Merge branch 'obsd-master'Thomas Adam2017-04-22
|\|
| * Get rid of the extra layer of flags and cmd_prepare() and just store thenicm2017-04-22
| | | | | | | | | | | | CMD_FIND_* flags in the cmd_entry and call it for the command. Commands with special requirements call it themselves and update the target for hooks to use.
| * Mouse bindings and hooks set up an initial current state when running anicm2017-04-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | command. This is used for the session, window and pane for all commands in the command sequence if there is no -t or -s. However, using it for all commands in the command sequence means that if the active pane or current session is changed, subsequent commands still use the previous state. So make commands which explicitly change the current state (such as neww and selectp) update it themselves for later commands. Commands which may invalidate the state (like killp) are already OK because an invalid state will be ignored. Also fill in the current state for all key bindings rather than just the mouse, so that any omissions are easier to spot.
* | Merge branch 'obsd-master'Thomas Adam2017-04-21
|\|
| * Add cmd_find_from_winlink_pane and use it in a couple of places, andnicm2017-04-21
| | | | | | | | make functions that can't fail void.
* | Merge branch 'obsd-master'Thomas Adam2017-03-09
|\|
| * Move server_fill_environ into environ.c and move some other common codenicm2017-03-09
| | | | | | | | into it.
* | Merge branch 'obsd-master'Thomas Adam2017-03-08
|\|
| * Add a helper function for the most common format_create/defaults/expandnicm2017-03-08
| | | | | | | | pattern.
* | Merge branch 'obsd-master'Thomas Adam2017-02-27
|\|
| * If splitw -b is used, insert the new pane before the current one in thenicm2017-02-27
| | | | | | | | | | | | pane list. This means the numbering is in order (for example for display-panes) and fixes a problem with redrawing the active pane borders.
* | Merge branch 'obsd-master'Thomas Adam2017-02-03
|\|
| * Add a window or pane id "tag" to each format tree and use it to separatenicm2017-02-03
| | | | | | | | | | | | jobs, this means that if the same job is used for different windows or panes (for example in pane-border-format), it will be run separately for each pane.
* | Merge branch 'obsd-master'Thomas Adam2016-10-17
|\|
| * Use the notify name string instead of going via an enum and changenicm2016-10-16
| | | | | | | | existing hooks to use notifys instead.
* | Merge branch 'obsd-master'Thomas Adam2016-10-16
|\|
| * Mass rename struct cmd_q to struct cmdq_item and related.nicm2016-10-16
| |
* | Merge branch 'obsd-master'Thomas Adam2016-10-16
|\|
| * Rewrite command queue handling. Each client still has a command queue,nicm2016-10-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | but there is also now a global command queue. Instead of command queues being dispatched on demand from wherever the command happens to be added, they are now all dispatched from the top level server loop. Command queues may now also include callbacks as well as commands, and items may be inserted after the current command as well as at the end. This all makes command queues significantly more predictable and easier to use, and avoids the complex multiple nested command queues used by source-file, if-shell and friends. A mass rename of struct cmdq to a better name (cmdq_item probably) is coming.
* | Merge branch 'obsd-master'Thomas Adam2016-10-14
|\|
| * Trying to do hooks generically is way too complicated and unreliable andnicm2016-10-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | confusing, particularly trying to automatically figure out what target hooks should be using. So simplify it: - drop before hooks entirely, they don't seem to be very useful; - commands with special requirements now fire their own after hook (for example, if they change session or window, or if they have -t and -s and need to choose which one the hook uses as current target); - commands with no special requirements can have the CMD_AFTERHOOK flag added and they will use the -t state. At the moment new-session, new-window, split-window fire their own hook, and display-message uses the flag. The remaining commands still need to be looked at.
* | Merge branch 'obsd-master'Thomas Adam2016-10-13
|\|
| * Some improvements and bug fixes for hooks:nicm2016-10-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Prepare the state again before the "after" hooks are run, because the command may have killed or moved windows. - Use the hooks list from the newly prepared target, not the old hooks list (only matters for new-session really). - Correctly detect an invalid current state and ignore it in cmd_find_target ("killw; swapw"). - Change neww, new, killp, killw, splitw, swapp, swapw to update the current state (used if no explicit target is given) to something more useful after they have finished. For example, neww changes it to the newly created window. Hooks are still relatively new and primitive so there are likely to be more changes to come. Parts based on bug reports from Uwe Werler and Iblis Lin.
* | Merge branch 'obsd-master'Thomas Adam2016-10-12
|\| | | | | | | | | | | Conflicts: format.c osdep-openbsd.c
| * Add static in cmd-* and fix a few other nits.nicm2016-10-10
| |
* | Merge branch 'obsd-master'Thomas Adam2016-09-04
|\|
| * Add support for performing a full width split (with splitw -f), rathernicm2016-09-04
| | | | | | | | than splitting the current cell. From Stephen Kent.
* | Merge branch 'obsd-master'Thomas Adam2016-06-06
|\|
| * Insert new panes after the pane being split in the list rather thannicm2016-06-06
| | | | | | | | | | always after the active pane. This is more sensible when doing it with commands rather than keys.
* | Merge branch 'obsd-master'Thomas Adam2016-01-19
|\|
| * I no longer use my SourceForge address so replace it.nicm2016-01-19
| |
* | Merge branch 'obsd-master'Thomas Adam2015-12-14
|\|
| * Instead of combined flags for -c, -s, -t, split into different setsnicm2015-12-14
| | | | | | | | using an enum and simplify the parsing code.
* | Merge branch 'obsd-master'Thomas Adam2015-12-13
|\|
| * Use member names in cmd_entry definitions so I stop getting confusednicm2015-12-13
| | | | | | | | about the order.
* | Merge branch 'obsd-master'Thomas Adam2015-12-13
|\|
| * Instead of every command resolving the target (-t or -s) itself, preparenicm2015-12-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the state (client, session, winlink, pane) for it it before entering the command. Each command provides some flags that tell the prepare step what it is expecting. This is a requirement for having hooks on commands (for example, if you hook "select-window -t1:2", the hook command should to operate on window 1:2 not whatever it thinks is the current window), and should allow some other target improvements. The old cmd_find_* functions remain for the moment but that layer will be dropped later. Joint work with Thomas Adam.
* | Merge branch 'obsd-master'Thomas Adam2015-12-11
|\|
| * Add cmdq as an argument to format_create and add a format for thenicm2015-12-11
| | | | | | | | command name (will also be used for more later).
* | Merge branch 'obsd-master'Thomas Adam2015-12-08
|\|
| * Remove format_create_flags and just pass flags to format_create.nicm2015-12-08
| |
* | Merge branch 'obsd-master'Thomas Adam2015-10-31
|\| | | | | | | | | Conflicts: server.c
| * Fall back silently to ~ or / rather than checking -c with access(), thisnicm2015-10-31
| | | | | | | | was the old behaviour.
* | Merge branch 'obsd-master'Thomas Adam2015-10-31
|\|
| * Because pledge(2) does not allow us to pass directory file descriptorsnicm2015-10-31
| | | | | | | | | | | | | | | | | | 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).
* | Merge branch 'obsd-master'Thomas Adam2015-10-28
|\|