Go to file
nicm 2c0f826c36 Mouse bindings and hooks set up an initial current state when running a
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.
2017-04-22 08:56:24 +00:00
Makefile Use fdforkpty() instead of our own unwrapped versions. 2017-04-20 17:49:26 +00:00
alerts.c More unnecessary arguments now winlink points back to session. 2017-04-21 14:09:44 +00:00
arguments.c Plain stravis() because it will mangle UTF-8 characters, so add 2017-01-18 10:08:05 +00:00
attributes.c Add support for the strikethrough attribute (SGR 9), using the new smxx 2017-03-22 07:16:54 +00:00
cfg.c History needs to be loaded after config parsing is done - now that 2017-04-21 14:04:54 +00:00
client.c Add support for custom command aliases, this is an array option which 2017-01-24 19:53:37 +00:00
cmd-attach-session.c Mouse bindings and hooks set up an initial current state when running a 2017-04-22 08:56:24 +00:00
cmd-bind-key.c Mass rename struct cmd_q to struct cmdq_item and related. 2016-10-16 19:04:05 +00:00
cmd-break-pane.c Mouse bindings and hooks set up an initial current state when running a 2017-04-22 08:56:24 +00:00
cmd-capture-pane.c Merge clear-history into capture-pane. 2017-02-16 12:18:38 +00:00
cmd-choose-buffer.c Mass rename struct cmd_q to struct cmdq_item and related. 2016-10-16 19:04:05 +00:00
cmd-choose-client.c Give each client a name. This defaults to the tty name as before but 2017-04-05 10:49:46 +00:00
cmd-choose-tree.c Mass rename struct cmd_q to struct cmdq_item and related. 2016-10-16 19:04:05 +00:00
cmd-command-prompt.c Style nits and a missing cast. 2017-04-19 12:44:29 +00:00
cmd-confirm-before.c It is silly for cmd_list_parse to return an integer error when it could 2017-01-15 22:00:56 +00:00
cmd-copy-mode.c Store state shared between multiple commands in the queue in a shared 2017-04-21 14:01:19 +00:00
cmd-detach-client.c Add a suspend helper function, and do not allow detaching or suspending 2017-04-19 14:00:28 +00:00
cmd-display-message.c Add a window or pane id "tag" to each format tree and use it to separate 2017-02-03 11:57:27 +00:00
cmd-display-panes.c Move the client identify (display-panes) code into server-client.c. 2017-03-09 17:06:35 +00:00
cmd-find-window.c Mouse bindings and hooks set up an initial current state when running a 2017-04-22 08:56:24 +00:00
cmd-find.c Log error properly when no current state, and some other minor tweaks. 2017-04-21 22:23:24 +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 Fix if-shell without a client (so in the config file). Reported by Theo 2017-04-22 06:27:15 +00:00
cmd-join-pane.c Mouse bindings and hooks set up an initial current state when running a 2017-04-22 08:56:24 +00:00
cmd-kill-pane.c Redraw after killp -a. 2017-03-16 20:05:14 +00:00
cmd-kill-server.c Mass rename struct cmd_q to struct cmdq_item and related. 2016-10-16 19:04:05 +00:00
cmd-kill-session.c Mass rename struct cmd_q to struct cmdq_item and related. 2016-10-16 19:04:05 +00:00
cmd-kill-window.c Mass rename struct cmd_q to struct cmdq_item and related. 2016-10-16 19:04:05 +00:00
cmd-list-buffers.c Add a window or pane id "tag" to each format tree and use it to separate 2017-02-03 11:57:27 +00:00
cmd-list-clients.c Give each client a name. This defaults to the tty name as before but 2017-04-05 10:49:46 +00:00
cmd-list-keys.c Store state shared between multiple commands in the queue in a shared 2017-04-21 14:01:19 +00:00
cmd-list-panes.c Add a window or pane id "tag" to each format tree and use it to separate 2017-02-03 11:57:27 +00:00
cmd-list-sessions.c Add a window or pane id "tag" to each format tree and use it to separate 2017-02-03 11:57:27 +00:00
cmd-list-windows.c Add a window or pane id "tag" to each format tree and use it to separate 2017-02-03 11:57:27 +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 Memory leaks, from David CARLIER. 2017-04-22 06:13:30 +00:00
cmd-lock-server.c Mass rename struct cmd_q to struct cmdq_item and related. 2016-10-16 19:04:05 +00:00
cmd-move-window.c Mass rename struct cmd_q to struct cmdq_item and related. 2016-10-16 19:04:05 +00:00
cmd-new-session.c Mouse bindings and hooks set up an initial current state when running a 2017-04-22 08:56:24 +00:00
cmd-new-window.c Mouse bindings and hooks set up an initial current state when running a 2017-04-22 08:56:24 +00:00
cmd-paste-buffer.c Mass rename struct cmd_q to struct cmdq_item and related. 2016-10-16 19:04:05 +00:00
cmd-pipe-pane.c Add a window or pane id "tag" to each format tree and use it to separate 2017-02-03 11:57:27 +00:00
cmd-queue.c Log error properly when no current state, and some other minor tweaks. 2017-04-21 22:23:24 +00:00
cmd-refresh-client.c Minor tidying in a couple of commands. 2017-01-10 19:45:55 +00:00
cmd-rename-session.c Don't error if renaming a session to its current name, from shik dot 2016-11-16 11:41:17 +00:00
cmd-rename-window.c Mass rename struct cmd_q to struct cmdq_item and related. 2016-10-16 19:04:05 +00:00
cmd-resize-pane.c Store state shared between multiple commands in the queue in a shared 2017-04-21 14:01:19 +00:00
cmd-respawn-pane.c Move server_fill_environ into environ.c and move some other common code 2017-03-09 17:02:38 +00:00
cmd-respawn-window.c Move server_fill_environ into environ.c and move some other common code 2017-03-09 17:02:38 +00:00
cmd-rotate-window.c rotate-window needs to unzoom, problem reported by Sean Haugh. 2016-11-14 16:27:12 +00:00
cmd-run-shell.c Make the cmd_find_* functions more obvious when looking for a client, 2017-04-21 20:26:34 +00:00
cmd-save-buffer.c Memory leaks, from David CARLIER. 2017-04-22 06:13:30 +00:00
cmd-select-layout.c Mass rename struct cmd_q to struct cmdq_item and related. 2016-10-16 19:04:05 +00:00
cmd-select-pane.c Mouse bindings and hooks set up an initial current state when running a 2017-04-22 08:56:24 +00:00
cmd-select-window.c Mouse bindings and hooks set up an initial current state when running a 2017-04-22 08:56:24 +00:00
cmd-send-keys.c Store state shared between multiple commands in the queue in a shared 2017-04-21 14:01:19 +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 Mass rename struct cmd_q to struct cmdq_item and related. 2016-10-16 19:04:05 +00:00
cmd-set-environment.c Mass rename struct cmd_q to struct cmdq_item and related. 2016-10-16 19:04:05 +00:00
cmd-set-hook.c It is silly for cmd_list_parse to return an integer error when it could 2017-01-15 22:00:56 +00:00
cmd-set-option.c Memory leaks, from David CARLIER. 2017-04-22 06:13:30 +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 Mass rename struct cmd_q to struct cmdq_item and related. 2016-10-16 19:04:05 +00:00
cmd-show-messages.c If a #() command doesn't exit, use its most recent line of output (it 2017-04-20 09:20:22 +00:00
cmd-show-options.c When a flag option is used in a format, it should use the number form 2017-01-30 21:41:17 +00:00
cmd-source-file.c load_cfg returns < 0 on error, not != 0. Problem reported by Kaushal Modi. 2017-04-19 16:59:54 +00:00
cmd-split-window.c Mouse bindings and hooks set up an initial current state when running a 2017-04-22 08:56:24 +00:00
cmd-string.c Add support for custom command aliases, this is an array option which 2017-01-24 19:53:37 +00:00
cmd-swap-pane.c Mass rename struct cmd_q to struct cmdq_item and related. 2016-10-16 19:04:05 +00:00
cmd-swap-window.c Instead of numbering session groups, give them a name which may be given 2017-02-09 15:04:53 +00:00
cmd-switch-client.c Mouse bindings and hooks set up an initial current state when running a 2017-04-22 08:56:24 +00:00
cmd-unbind-key.c Mass rename struct cmd_q to struct cmdq_item and related. 2016-10-16 19:04:05 +00:00
cmd-wait-for.c Mass rename struct cmd_q to struct cmdq_item and related. 2016-10-16 19:04:05 +00:00
cmd.c Make the cmd_find_* functions more obvious when looking for a client, 2017-04-21 20:26:34 +00:00
colour.c Show count of search results in copy mode. 2017-03-24 07:14:27 +00:00
control-notify.c Add a helper function for the most common format_create/defaults/expand 2017-03-08 13:36:12 +00:00
control.c It is silly for cmd_list_parse to return an integer error when it could 2017-01-15 22:00:56 +00:00
environ.c Move server_fill_environ into environ.c and move some other common code 2017-03-09 17:02:38 +00:00
format.c Store state shared between multiple commands in the queue in a shared 2017-04-21 14:01:19 +00:00
grid-view.c Handle insert cells when cursor at edge of screen correctly, and do a 2017-02-16 12:43:08 +00:00
grid.c Style nits and a missing cast. 2017-04-19 12:44:29 +00:00
hooks.c Provide a way for hooks to tag formats onto the commands they fire so 2016-10-16 19:36:37 +00:00
input-keys.c Implement "all event" (1003) mouse mode but in a way that works. The 2017-02-01 09:55:07 +00:00
input.c We need to collect UTF-8 characters so that width != 1 characters are 2017-04-22 08:33:28 +00:00
job.c If a #() command doesn't exit, use its most recent line of output (it 2017-04-20 09:20:22 +00:00
key-bindings.c Key needs to be initialized to zero now it has flags in it. 2017-04-21 19:33:07 +00:00
key-string.c Minor bits: fix an array size, add comment, make grid_cell_entry static. 2017-02-22 09:01:32 +00:00
layout-custom.c Use the notify name string instead of going via an enum and change 2016-10-16 22:06:40 +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 Fix calculation of size for full size splits. 2017-03-11 15:16:35 +00:00
log.c Missing va_end, from Anton Lindqvist. 2017-02-04 23:42:53 +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 a window or pane id "tag" to each format tree and use it to separate 2017-02-03 11:57:27 +00:00
notify.c Make the cmd_find_* functions more obvious when looking for a client, 2017-04-21 20:26:34 +00:00
options-table.c Make update-environment an array as well. 2017-01-24 20:15:32 +00:00
options.c Memory leaks, from David CARLIER. 2017-04-22 06:13:30 +00:00
paste.c Shorten a long line, and don't leak buffer in paste_add if size is zero. 2017-01-24 13:28:33 +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 Improve some of the logging on resize. 2017-02-08 13:53:32 +00:00
screen-redraw.c Give each client a name. This defaults to the tty name as before but 2017-04-05 10:49:46 +00:00
screen-write.c Need to flush before writing out cells we are not collecting, also add 2017-03-07 13:48:28 +00:00
screen.c Collect sequences of printable ASCII characters and process them 2017-02-08 16:45:18 +00:00
server-client.c Mouse bindings and hooks set up an initial current state when running a 2017-04-22 08:56:24 +00:00
server-fn.c Remove a couple of redraw flags that no longer have any effect. 2017-04-17 06:40:32 +00:00
server.c Memory leaks, from David CARLIER. 2017-04-22 06:13:30 +00:00
session.c Move server_fill_environ into environ.c and move some other common code 2017-03-09 17:02:38 +00:00
signal.c Loads more static, except for cmd-*.c and window-*.c. 2016-10-10 21:29:23 +00:00
status.c Break the message storage function into its own function, useful for 2017-02-09 12:09:33 +00:00
style.c Add support for the strikethrough attribute (SGR 9), using the new smxx 2017-03-22 07:16:54 +00:00
tmux.1 Typo in example. 2017-04-22 06:15:22 +00:00
tmux.c Use fdforkpty() instead of our own unwrapped versions. 2017-04-20 17:49:26 +00:00
tmux.h Make the cmd_find_* functions more obvious when looking for a client, 2017-04-21 20:26:34 +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 Revert use of DECSLRM on iTerm2, it doesn't help as much as we throught, 2017-04-18 21:41:42 +00:00
tty-term.c Add support for the strikethrough attribute (SGR 9), using the new smxx 2017-03-22 07:16:54 +00:00
tty.c When the data we have buffered to write to a terminal grows beyond a 2017-04-19 06:52:27 +00:00
utf8.c Fix a couple of argument types. 2017-03-17 14:51:41 +00:00
window-choose.c Add h and l for collapse and expand in choose mode with vi(1) keys, from 2017-03-17 14:41:54 +00:00
window-clock.c Add support for the OSC 4 and OSC 104 palette setting escape sequences, 2017-01-07 15:28:13 +00:00
window-copy.c If a #() command doesn't exit, use its most recent line of output (it 2017-04-20 09:20:22 +00:00
window.c Use fdforkpty() instead of our own unwrapped versions. 2017-04-20 17:49:26 +00:00
xmalloc.c Key running commands for #() by the unexpanded command, and run them 2016-11-17 10:06:08 +00:00
xmalloc.h Key running commands for #() by the unexpanded command, and run them 2016-11-17 10:06:08 +00:00
xterm-keys.c Revert previous for now, it will break TERM=screen. 2017-01-25 14:36:08 +00:00