summaryrefslogtreecommitdiffstats
path: root/cmd-split-window.c
AgeCommit message (Collapse)Author
2016-10-17Merge branch 'obsd-master'Thomas Adam
2016-10-16Use the notify name string instead of going via an enum and changenicm
existing hooks to use notifys instead.
2016-10-16Merge branch 'obsd-master'Thomas Adam
2016-10-16Mass rename struct cmd_q to struct cmdq_item and related.nicm
2016-10-16Merge branch 'obsd-master'Thomas Adam
2016-10-16Rewrite command queue handling. Each client still has a command queue,nicm
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.
2016-10-14Merge branch 'obsd-master'Thomas Adam
2016-10-13Trying to do hooks generically is way too complicated and unreliable andnicm
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.
2016-10-13Merge branch 'obsd-master'Thomas Adam
2016-10-13Some improvements and bug fixes for hooks:nicm
- 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.
2016-10-12Merge branch 'obsd-master'Thomas Adam
Conflicts: format.c osdep-openbsd.c
2016-10-10Add static in cmd-* and fix a few other nits.nicm
2016-09-04Merge branch 'obsd-master'Thomas Adam
2016-09-04Add support for performing a full width split (with splitw -f), rathernicm
than splitting the current cell. From Stephen Kent.
2016-06-06Merge branch 'obsd-master'Thomas Adam
2016-06-06Insert new panes after the pane being split in the list rather thannicm
always after the active pane. This is more sensible when doing it with commands rather than keys.
2016-01-19Merge branch 'obsd-master'Thomas Adam
2016-01-19I no longer use my SourceForge address so replace it.nicm
2015-12-14Merge branch 'obsd-master'Thomas Adam
2015-12-14Instead of combined flags for -c, -s, -t, split into different setsnicm
using an enum and simplify the parsing code.
2015-12-13Merge branch 'obsd-master'Thomas Adam
2015-12-13Use member names in cmd_entry definitions so I stop getting confusednicm
about the order.
2015-12-13Merge branch 'obsd-master'Thomas Adam
2015-12-13Instead of every command resolving the target (-t or -s) itself, preparenicm
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.
2015-12-11Merge branch 'obsd-master'Thomas Adam
2015-12-11Add cmdq as an argument to format_create and add a format for thenicm
command name (will also be used for more later).
2015-12-08Merge branch 'obsd-master'Thomas Adam
2015-12-08Remove format_create_flags and just pass flags to format_create.nicm
2015-10-31Merge branch 'obsd-master'Thomas Adam
Conflicts: server.c
2015-10-31Fall back silently to ~ or / rather than checking -c with access(), thisnicm
was the old behaviour.
2015-10-31Merge branch 'obsd-master'Thomas Adam
2015-10-31Because pledge(2) does not allow us to pass directory file descriptorsnicm
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-28Merge branch 'obsd-master'Thomas Adam
2015-10-28Like options, move the environ struct into environ.c.nicm
2015-10-27Merge branch 'obsd-master'Thomas Adam
Conflicts: Makefile client.c server-client.c server.c tmux.c tmux.h
2015-10-27Move struct options into options.c.nicm
2015-10-25Merge branch 'obsd-master'Thomas Adam
Conflicts: cmd-find.c
2015-10-23Remove some unnecessary checks before free().nicm
2015-04-27Merge branch 'obsd-master'Thomas Adam
Conflicts: Makefile tmux.1
2015-04-26Remove panes from layout if spawning them fails, reported by Anthony Jnicm
Bentley.
2015-02-06Merge branch 'obsd-master'Thomas Adam
Conflicts: cmd-pipe-pane.c
2015-02-05Remove a couple of now-unused variables.nicm
2015-02-05Wrap all the individual format_* calls in a single format_defaultsnicm
functions.
2014-11-19Merge branch 'obsd-master'Thomas Adam
2014-11-12Add -b to splitw like joinw, from Felix Rosencrantz.nicm
2014-11-08No need for $Id$ now.Nicholas Marriott
2014-10-21Merge branch 'obsd-master'Thomas Adam
Conflicts: Makefile cmd-list-commands.c cmd-suspend-client.c job.c tmux.h xmalloc.c
2014-10-20Move template defines back into .c files.nicm
2014-10-20Instead of setting up the default keys by building the key structnicm
directly with a helper function in the cmd_entry, include a table of bind-key commands and pass them through the command parser and a temporary cmd_q. As well as being smaller, this will allow default bindings to be command sequences which will probably be needed soon.
2014-09-25Merge branch 'obsd-master'Thomas Adam