Go to file
nicm 4d9e6ea310 Some improvements and bug fixes for hooks:
- 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-13 10:01:49 +00:00
Makefile Add hooks infrastructure, basic commands (set-hook, show-hooks) and a 2015-12-08 01:10:31 +00:00
alerts.c Remove some dead code in cmd-move-window.c and make a load of local 2016-10-03 22:52:11 +00:00
arguments.c Add static in window-*.c and move some internal functions out of tmux.h. 2016-10-11 13:21:59 +00:00
attributes.c Use snprintf for constructing attribute string, from Tim Ruehsen. 2012-03-17 21:45:25 +00:00
cfg.c Some other stuff that can be local to one file. 2016-10-11 13:45:47 +00:00
client.c Remove some dead code in cmd-move-window.c and make a load of local 2016-10-03 22:52:11 +00:00
cmd-attach-session.c Add static in cmd-* and fix a few other nits. 2016-10-10 21:51:39 +00:00
cmd-bind-key.c Drop the edit mode key tables and just use fixed key bindings for the 2016-10-12 14:50:14 +00:00
cmd-break-pane.c Add static in cmd-* and fix a few other nits. 2016-10-10 21:51:39 +00:00
cmd-capture-pane.c Add static in cmd-* and fix a few other nits. 2016-10-10 21:51:39 +00:00
cmd-choose-buffer.c Add static in cmd-* and fix a few other nits. 2016-10-10 21:51:39 +00:00
cmd-choose-client.c Add static in cmd-* and fix a few other nits. 2016-10-10 21:51:39 +00:00
cmd-choose-tree.c Add static in cmd-* and fix a few other nits. 2016-10-10 21:51:39 +00:00
cmd-clear-history.c Add static in cmd-* and fix a few other nits. 2016-10-10 21:51:39 +00:00
cmd-command-prompt.c The repeat prompt in both emacs and vi (and the old one in tmux) doesn't 2016-10-12 13:03:27 +00:00
cmd-confirm-before.c Add static in cmd-* and fix a few other nits. 2016-10-10 21:51:39 +00:00
cmd-copy-mode.c Add static in cmd-* and fix a few other nits. 2016-10-10 21:51:39 +00:00
cmd-detach-client.c Add static in cmd-* and fix a few other nits. 2016-10-10 21:51:39 +00:00
cmd-display-message.c Add static in cmd-* and fix a few other nits. 2016-10-10 21:51:39 +00:00
cmd-display-panes.c Allow a command to be specified to display-panes, similar to 2016-06-16 10:55:47 +00:00
cmd-find-window.c Add static in cmd-* and fix a few other nits. 2016-10-10 21:51:39 +00:00
cmd-find.c Some improvements and bug fixes for hooks: 2016-10-13 10:01:49 +00:00
cmd-has-session.c Instead of setting up the default keys by building the key struct 2014-10-20 22:29:25 +00:00
cmd-if-shell.c Add static in cmd-* and fix a few other nits. 2016-10-10 21:51:39 +00:00
cmd-join-pane.c Some improvements and bug fixes for hooks: 2016-10-13 10:01:49 +00:00
cmd-kill-pane.c Add static in cmd-* and fix a few other nits. 2016-10-10 21:51:39 +00:00
cmd-kill-server.c Add static in cmd-* and fix a few other nits. 2016-10-10 21:51:39 +00:00
cmd-kill-session.c Add static in cmd-* and fix a few other nits. 2016-10-10 21:51:39 +00:00
cmd-kill-window.c Add static in cmd-* and fix a few other nits. 2016-10-10 21:51:39 +00:00
cmd-list-buffers.c Add static in cmd-* and fix a few other nits. 2016-10-10 21:51:39 +00:00
cmd-list-clients.c Add static in cmd-* and fix a few other nits. 2016-10-10 21:51:39 +00:00
cmd-list-keys.c Drop the edit mode key tables and just use fixed key bindings for the 2016-10-12 14:50:14 +00:00
cmd-list-panes.c Add static in cmd-* and fix a few other nits. 2016-10-10 21:51:39 +00:00
cmd-list-sessions.c Add static in cmd-* and fix a few other nits. 2016-10-10 21:51:39 +00:00
cmd-list-windows.c Add static in cmd-* and fix a few other nits. 2016-10-10 21:51:39 +00:00
cmd-list.c I no longer use my SourceForge address so replace it. 2016-01-19 15:59:12 +00:00
cmd-load-buffer.c Add static in cmd-* and fix a few other nits. 2016-10-10 21:51:39 +00:00
cmd-lock-server.c Add static in cmd-* and fix a few other nits. 2016-10-10 21:51:39 +00:00
cmd-move-window.c Add static in cmd-* and fix a few other nits. 2016-10-10 21:51:39 +00:00
cmd-new-session.c Some improvements and bug fixes for hooks: 2016-10-13 10:01:49 +00:00
cmd-new-window.c Some improvements and bug fixes for hooks: 2016-10-13 10:01:49 +00:00
cmd-paste-buffer.c Add static in cmd-* and fix a few other nits. 2016-10-10 21:51:39 +00:00
cmd-pipe-pane.c Add static in cmd-* and fix a few other nits. 2016-10-10 21:51:39 +00:00
cmd-queue.c Some improvements and bug fixes for hooks: 2016-10-13 10:01:49 +00:00
cmd-refresh-client.c Add static in cmd-* and fix a few other nits. 2016-10-10 21:51:39 +00:00
cmd-rename-session.c Add static in cmd-* and fix a few other nits. 2016-10-10 21:51:39 +00:00
cmd-rename-window.c Add static in cmd-* and fix a few other nits. 2016-10-10 21:51:39 +00:00
cmd-resize-pane.c Add static in cmd-* and fix a few other nits. 2016-10-10 21:51:39 +00:00
cmd-respawn-pane.c Add static in cmd-* and fix a few other nits. 2016-10-10 21:51:39 +00:00
cmd-respawn-window.c Add static in cmd-* and fix a few other nits. 2016-10-10 21:51:39 +00:00
cmd-rotate-window.c Add static in cmd-* and fix a few other nits. 2016-10-10 21:51:39 +00:00
cmd-run-shell.c Add static in cmd-* and fix a few other nits. 2016-10-10 21:51:39 +00:00
cmd-save-buffer.c Add static in cmd-* and fix a few other nits. 2016-10-10 21:51:39 +00:00
cmd-select-layout.c Add static in cmd-* and fix a few other nits. 2016-10-10 21:51:39 +00:00
cmd-select-pane.c Add static in cmd-* and fix a few other nits. 2016-10-10 21:51:39 +00:00
cmd-select-window.c Add static in cmd-* and fix a few other nits. 2016-10-10 21:51:39 +00:00
cmd-send-keys.c Fundamental change to how copy mode key bindings work: 2016-10-11 07:23:34 +00:00
cmd-send-prefix.c Make command exec functions return an enum rather than -1/0/1 values and 2012-07-11 07:10:15 +00:00
cmd-set-buffer.c Add static in cmd-* and fix a few other nits. 2016-10-10 21:51:39 +00:00
cmd-set-environment.c Add static in cmd-* and fix a few other nits. 2016-10-10 21:51:39 +00:00
cmd-set-hook.c Add static in cmd-* and fix a few other nits. 2016-10-10 21:51:39 +00:00
cmd-set-option.c Add static in cmd-* and fix a few other nits. 2016-10-10 21:51:39 +00:00
cmd-show-buffer.c Make command exec functions return an enum rather than -1/0/1 values and 2012-07-11 07:10:15 +00:00
cmd-show-environment.c Add static in cmd-* and fix a few other nits. 2016-10-10 21:51:39 +00:00
cmd-show-messages.c Add static in cmd-* and fix a few other nits. 2016-10-10 21:51:39 +00:00
cmd-show-options.c Add static in cmd-* and fix a few other nits. 2016-10-10 21:51:39 +00:00
cmd-source-file.c Add static in cmd-* and fix a few other nits. 2016-10-10 21:51:39 +00:00
cmd-split-window.c Some improvements and bug fixes for hooks: 2016-10-13 10:01:49 +00:00
cmd-string.c Add static in cmd-* and fix a few other nits. 2016-10-10 21:51:39 +00:00
cmd-swap-pane.c Some improvements and bug fixes for hooks: 2016-10-13 10:01:49 +00:00
cmd-swap-window.c Some improvements and bug fixes for hooks: 2016-10-13 10:01:49 +00:00
cmd-switch-client.c Add static in cmd-* and fix a few other nits. 2016-10-10 21:51:39 +00:00
cmd-unbind-key.c Drop the edit mode key tables and just use fixed key bindings for the 2016-10-12 14:50:14 +00:00
cmd-wait-for.c Add static in cmd-* and fix a few other nits. 2016-10-10 21:51:39 +00:00
cmd.c Some improvements and bug fixes for hooks: 2016-10-13 10:01:49 +00:00
colour.c Instead of representing colours in several different forms with various 2016-07-15 00:42:56 +00:00
control-notify.c I no longer use my SourceForge address so replace it. 2016-01-19 15:59:12 +00:00
control.c I no longer use my SourceForge address so replace it. 2016-01-19 15:59:12 +00:00
environ.c Loads more static, except for cmd-*.c and window-*.c. 2016-10-10 21:29:23 +00:00
format.c Some other stuff that can be local to one file. 2016-10-11 13:45:47 +00:00
grid-view.c Remember the number of lines scrolled into the history (versus cleared 2016-09-02 20:57:20 +00:00
grid.c Add static in window-*.c and move some internal functions out of tmux.h. 2016-10-11 13:21:59 +00:00
hooks.c Loads more static, except for cmd-*.c and window-*.c. 2016-10-10 21:29:23 +00:00
input-keys.c Remove some dead code in cmd-move-window.c and make a load of local 2016-10-03 22:52:11 +00:00
input.c Remove some dead code in cmd-move-window.c and make a load of local 2016-10-03 22:52:11 +00:00
job.c Loads more static, except for cmd-*.c and window-*.c. 2016-10-10 21:29:23 +00:00
key-bindings.c The repeat prompt in both emacs and vi (and the old one in tmux) doesn't 2016-10-12 13:03:27 +00:00
key-string.c Support double and triple clicks (they are cumulative, so double is 2016-10-11 09:30:36 +00:00
layout-custom.c Fix minimum size when pane status line is enabled, reported by Y Petremann. 2016-08-03 09:07:02 +00:00
layout-set.c Some other stuff that can be local to one file. 2016-10-11 13:45:47 +00:00
layout.c Do not allow the opposite pane to resize when dragging with the mouse 2016-10-10 17:28:30 +00:00
log.c I no longer use my SourceForge address so replace it. 2016-01-19 15:59:12 +00:00
mode-key.c Drop the edit mode key tables and just use fixed key bindings for the 2016-10-12 14:50:14 +00:00
names.c Add static in window-*.c and move some internal functions out of tmux.h. 2016-10-11 13:21:59 +00:00
notify.c Loads more static, except for cmd-*.c and window-*.c. 2016-10-10 21:29:23 +00:00
options-table.c Remove some dead code in cmd-move-window.c and make a load of local 2016-10-03 22:52:11 +00:00
options.c Loads more static, except for cmd-*.c and window-*.c. 2016-10-10 21:29:23 +00:00
paste.c Unused variable and missing time.h. 2016-10-12 09:07:58 +00:00
proc.c I no longer use my SourceForge address so replace it. 2016-01-19 15:59:12 +00:00
procname.c Loads more static, except for cmd-*.c and window-*.c. 2016-10-10 21:29:23 +00:00
resize.c I no longer use my SourceForge address so replace it. 2016-01-19 15:59:12 +00:00
screen-redraw.c Compare to see if pane status line has actually changed, not just size, and 2016-10-12 17:36:52 +00:00
screen-write.c Fix a couple of problems with insert mode: flush dirty cells before we 2016-10-12 15:43:51 +00:00
screen.c Redraw selection in tty_draw_line, so it appears when redrawing whole 2016-10-12 13:24:07 +00:00
server-client.c The repeat prompt in both emacs and vi (and the old one in tmux) doesn't 2016-10-12 13:03:27 +00:00
server-fn.c Add static in window-*.c and move some internal functions out of tmux.h. 2016-10-11 13:21:59 +00:00
server.c Loads more static, except for cmd-*.c and window-*.c. 2016-10-10 21:29:23 +00:00
session.c Add static in window-*.c and move some internal functions out of tmux.h. 2016-10-11 13:21:59 +00:00
signal.c Loads more static, except for cmd-*.c and window-*.c. 2016-10-10 21:29:23 +00:00
status.c Drop the edit mode key tables and just use fixed key bindings for the 2016-10-12 14:50:14 +00:00
style.c Instead of representing colours in several different forms with various 2016-07-15 00:42:56 +00:00
tmux.1 -f missed from splitw usage, from Felix Rosencrantz. 2016-10-13 09:06:48 +00:00
tmux.c Add static in window-*.c and move some internal functions out of tmux.h. 2016-10-11 13:21:59 +00:00
tmux.h Some improvements and bug fixes for hooks: 2016-10-13 10:01:49 +00:00
tty-acs.c Remove some dead code in cmd-move-window.c and make a load of local 2016-10-03 22:52:11 +00:00
tty-keys.c Loads more static, except for cmd-*.c and window-*.c. 2016-10-10 21:29:23 +00:00
tty-term.c Loads more static, except for cmd-*.c and window-*.c. 2016-10-10 21:29:23 +00:00
tty.c Redraw selection in tty_draw_line, so it appears when redrawing whole 2016-10-12 13:24:07 +00:00
utf8.c Support UTF-8 entry into the command prompt. 2016-10-11 07:11:40 +00:00
window-choose.c Add static in window-*.c and move some internal functions out of tmux.h. 2016-10-11 13:21:59 +00:00
window-clock.c Fundamental change to how copy mode key bindings work: 2016-10-11 07:23:34 +00:00
window-copy.c Unused variable and missing time.h. 2016-10-12 09:07:58 +00:00
window.c Add static in window-*.c and move some internal functions out of tmux.h. 2016-10-11 13:21:59 +00:00
xmalloc.c fatalx() not fatal(). 2016-04-04 16:19:43 +00:00
xmalloc.h Sync the entire xmalloc.[ch] with the other users, but with the addition 2015-11-18 13:06:54 +00:00
xterm-keys.c Remove some dead code in cmd-move-window.c and make a load of local 2016-10-03 22:52:11 +00:00