Commit Graph
130 Commits
Author SHA1 Message Date
nicm ed2b349c3e Do not leak waiting clients (in wait-for) if they are killed, GitHub
issue 5614.
2026-09-24 20:08:30 +01:00
tmux update bot e5db7598b2 Merge remote-tracking branch 'refs/remotes/tmux-openbsd/master'
* refs/remotes/tmux-openbsd/master:
  Do not add messages to cfg_causes after config has finished, GitHub issue 5528.
2026-08-24 22:03:29 +00:00
nicm dc78d8f9ea Do not add messages to cfg_causes after config has finished, GitHub
issue 5528.
2026-08-24 22:03:27 +00:00
tmux update bot 9228f97d7d Merge remote-tracking branch 'refs/remotes/tmux-openbsd/master'
* refs/remotes/tmux-openbsd/master:
  Queue control mode notifications rather than emitting them inside %begin/%end, GitHub issue 5458 from George Nachman.
2026-08-03 16:29:11 +00:00
nicm 6db5175e4e Queue control mode notifications rather than emitting them inside
%begin/%end, GitHub issue 5458 from George Nachman.
2026-08-03 16:29:09 +00:00
Thomas Adam 6546fa0982 Merge remote-tracking branch 'refs/remotes/tmux-openbsd/master'
* refs/remotes/tmux-openbsd/master:
  Convert display-panes away from an overlay and into a mode. This is another step on the road of getting rid of overlays altogether (they are full of special cases; popups and menus are to go also eventually). We lose some of the styling of borders but gain the ability to run display-panes in another pane (perhaps not hugely useful but one never knows). The -b flag goes away as no longer useful.
2026-07-14 21:20:22 +01:00
nicm 1a02c9957c Convert display-panes away from an overlay and into a mode. This is
another step on the road of getting rid of overlays altogether (they are
full of special cases; popups and menus are to go also eventually). We
lose some of the styling of borders but gain the ability to run
display-panes in another pane (perhaps not hugely useful but one never
knows). The -b flag goes away as no longer useful.
2026-07-14 19:57:30 +00:00
Thomas Adam 25e2e1d671 Merge remote-tracking branch 'refs/remotes/tmux-openbsd/master'
* refs/remotes/tmux-openbsd/master:
  build: don't exit
  build: always attempt portable merge
  build: capture openbsd-base before filtering
  build: fetch cutover master before merge
  Use _exit in child after fork, from Yayo Razo in GitHub issue 5376.
  Add missing calloc check and use fatal. Prompted by a similar change from Yayo Razo.
  actions: use published openbsd-git as base update
  github actions: automate updates
  Do not make pty fds blocking again until all the data has been consumed or control mode clients can get stuck, GitHub issue 5356 from Ben Maurer.
  Add formats and events for OSC 133 commmands, as well as a -T flag to set-hook -B to only fire when the format is true.
  Replace the notification system with events. Events can carry a payload of additional payload (to reduce problems with lifetime of objects) and are delivered to one or more event sinks. This is more powerful and reduces the complex dependencies between control mode and hooks. Events are now used for hooks, control mode notifications and for monitors (set-hook -B).
2026-07-13 09:22:25 +01:00
nicm d29aa12117 Replace the notification system with events. Events can carry a payload of
additional payload (to reduce problems with lifetime of objects) and are
delivered to one or more event sinks. This is more powerful and reduces the
complex dependencies between control mode and hooks. Events are now used for
hooks, control mode notifications and for monitors (set-hook -B).

wait-for can now wait for an event to fire (-E flag, with -F to for filter),
with -v to print the payload, as well as listing (-l) waiting clients on an
event and forcing one to wake (-w).

A few additional hooks are also now available (pane-created, pane-resized, etc)
and some of the existing ones have additional format variables available.
2026-07-10 13:38:45 +00:00
Thomas Adam ec119b2f9e Merge branch 'obsd-master' 2025-02-10 10:01:11 +00:00
nicm 80eb460fc9 Add display-message -C flag to update pane while message is displayed,
GitHub issue 4363 from Vitaly Ostrosablin.
2025-02-10 08:14:32 +00:00
Thomas Adam ceaf9b7452 Merge branch 'obsd-master' 2024-11-22 14:01:11 +00:00
nicm 5fd45b3892 Do not strvis output to terminal from commands. 2024-11-22 12:58:05 +00:00
Thomas Adam 8ef899f315 Merge branch 'obsd-master' 2024-05-14 12:01:09 +01:00
nicm c9616700ca Add a command-error hook when a command fails, from Hugh Davenport in
GitHub issue 3973.
2024-05-14 07:52:19 +00:00
Thomas Adam 0a8571b6fe Merge branch 'obsd-master' 2024-04-23 16:09:50 +01:00
jsg ea9f416c99 correct indentation; no functional change
ok tb@
2024-04-23 13:34:51 +00:00
Thomas Adam 9f9156c030 Merge branch 'obsd-master' 2023-09-15 10:01:11 +01:00
nicm d394293ba5 Add -t to source-file, GitHub issue 3473. 2023-09-15 06:31:49 +00:00
Thomas Adam e25926d3c4 Merge branch 'obsd-master' 2023-02-06 00:01:11 +00:00
nicm 93b1b78150 Extend display-message to work for control clients. GitHub issue 3449. 2023-02-05 21:15:32 +00:00
Thomas Adam 21e00e4635 Merge branch 'obsd-master' 2023-01-06 09:02:00 +00:00
nicm a41a927441 Query the client terminal for foreground and background colours and if
OSC 10 or 11 is received but no colour has been set inside tmux, return
the colour from the first attached client (probably most people will
have all light or or all dark terminals).
2023-01-03 11:43:24 +00:00
nicm 7cb48fc40b Do not escape tabs in output (iTerm2 needs them). GitHub issue 3414. 2022-12-16 08:22:05 +00:00
Nicholas Marriott 70ff8cfe1e No vis.h in portable. 2022-12-07 12:30:36 +00:00
nicm 7e497c7f23 Process escape sequences in show-buffer, GitHub issue 3401. 2022-12-07 09:44:44 +00:00
nicm cd89000c1d Add a way for lines added to copy mode to be passed through the parser
to handle escape sequences and use it for run-shell, GitHub issue 3156.
2022-05-30 13:00:18 +00:00
nicm 5241dae87d Stop caring about empty commands, just treat as a null command. 2021-08-21 17:25:32 +00:00
nicm 110ba767e5 Rename a member to match what it will be in future. 2021-08-21 10:28:05 +00:00
nicm 5f32b7d961 Hide struct args behind a couple of accessor functions. 2021-08-20 19:50:16 +00:00
nicm 90dd474c3e Expose args_value struct (will be needed soon) and add some missing frees. 2021-08-20 18:59:53 +00:00
nicm 163908fe8a Move hook format setup earlier and add a hook_client, GitHub issue 2809. 2021-08-12 08:05:11 +00:00
nicm e6abe55134 Add a flag to disable keys to close a message, GitHub issue 2625. 2021-04-12 09:36:12 +00:00
nicm 71fc9f3ee8 Add a current_file format for the config file being parsed. Originally
suggested by kn@, also GitHub issue 2638.
2021-04-07 12:50:12 +00:00
nicm 33046ecee2 Ignore running command when checking for no-hooks flag if it is blocked.
GitHub issue 2483.
2020-11-30 13:37:45 +00:00
nicm 40e65c5115 Add a -d option to display-message to set delay, from theonekeyg at
gmail dot com in GitHub issue 2322.
2020-07-27 08:03:10 +00:00
nicm a54a88edd6 Instead of sending all data to control mode clients as fast as possible,
add a limit of how much data will be sent to the client and try to use
it for panes with some degree of fairness. GitHub issue 2217, with
George Nachman.
2020-06-01 09:43:00 +00:00
nicm 292b335ca5 Separate key flags and modifiers, log key flags, make the "xterm" flag
more explicit and fix M- keys with a leading escape.
2020-05-16 16:35:13 +00:00
nicm 303d342d5f Add a client flag 'active-pane' which stores the active pane in the
client and allows it to be changed independently from the real active
pane stored in the window. This is can be used with session groups which
allow an independent current window (although it would be nice to have a
flag for this too and remove session groups). The client active pane is
only really useful interactively, many things (hooks, window-style,
zooming) still use the window active pane.
2020-05-16 16:20:59 +00:00
nicm c914abfa19 Expand target from client and use it to expand the prompt. 2020-05-16 16:16:07 +00:00
nicm 472d77fd0f Support embedded styles in the display-message message, GitHub issue
2206.
2020-05-16 15:54:20 +00:00
nicm 367b4e4e0f Change message log to be per server rather than per client and include
every command that is run.
2020-05-16 15:47:22 +00:00
nicm beb214bcb3 Add formats for after hook command arguments. 2020-05-16 15:40:04 +00:00
nicm 906dfe9f5c Fix a couple of memory leaks, one when creating a new pane and one when
adding formats onto the queue item.
2020-04-23 05:48:42 +00:00
nicm 63ec791854 Provide an accessor for the running queue item and use it to not let
hooks recurse.
2020-04-14 06:00:52 +00:00
nicm 3f7f9a0e20 Make client -c and -t handling common in cmd-queue.c and try to be
clearer about whether the client is the target client (must have a
session) or not.
2020-04-13 20:51:57 +00:00
nicm 3f86d6d460 When adding a list of commands to the queue, instead of automatically
creating a new state for each group of commands, require the caller to
create one and use it for all the commands in the list. This means the
current target works even with list with multiple groups (which can
happen if they are defined with newlines).
2020-04-13 15:55:51 +00:00
nicm adb76fd1ce Move cmdq_state into cmd-queue.c. 2020-04-13 14:46:04 +00:00
nicm 9a65102bfc Rename cmdq_shared to cmdq_state which will better reflect what it is
(going to be) used for.
2020-04-13 14:04:25 +00:00
nicm 77d5b0cc53 Store a key event not a mouse event in the shared data. 2020-04-13 13:42:35 +00:00