Commit Graph

2562 Commits

Author SHA1 Message Date
nicm ccc9dc3bb4 If an application gives the first parameter to OSC 52, validate and pass
on to outside terminal. GitHub issue 3192.
2022-06-09 09:12:55 +00:00
Thomas Adam be2eb57d62 Merge branch 'obsd-master' 2022-06-07 14:01:09 +01:00
nicm c07d582e24 Expand arguments to some commands where it makes sense, GitHub issue
3204 from Anindya Mukherjee.
2022-06-07 10:02:19 +00:00
Thomas Adam afb3a5fe71 Merge branch 'obsd-master' 2022-06-04 10:01:09 +01:00
nicm 020c403dff When picking a buffer because one isn't specified by the user, ignore
named buffers. GitHub issue 3212 from David le Blanc.
2022-06-04 07:42:07 +00:00
nicm 2b60ff588e If a mouse position was above the maximum supported by the normal mouse
protocol (223), tmux was allowing it to wrap around. However, since tmux
was not correctly handling this on input, other programs also do not
handle it correctly, and the alternative SGR mouse mode is now
widespread, this seems unnecessary, so remove this feature. Also define
some constants to make it clearer what the numbers mean. Mostly from
Leonid S Usov in GitHub issue 3165.
2022-05-30 13:02:55 +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
Nicholas Marriott c6b51cea92 If a mouse position was above the maximum supported by the normal mouse
protocol (223), tmux was allowing it to wrap around. However, since tmux was
not correctly handling this on input, other programs also do not handle it
correctly, and the alternative SGR mouse mode is now widespread, this seems
unnecessary, so remove this feature. Also define some constants to make it
clearer what the numbers mean. Mostly from Leonid S Usov in GitHub issue 3165.
2022-04-27 11:34:08 +01:00
Nicholas Marriott 58d1a206c6 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-04-18 11:47:14 +01:00
Nicholas Marriott 996e54763c Better error reporting when applying custom layouts. 2022-04-06 14:41:44 +01:00
Nicholas Marriott d6306b634e Add an ACL list for users connecting to the tmux socket. Users may be forbidden
from attaching, forced to attach read-only, or allowed to attach read-write. A
new command, server-access, configures the list. tmux gets the user using
getpeereid(3) of the client socket. Users must still configure file system
permissions manually.
2022-04-06 14:28:50 +01:00
Nicholas Marriott fc7f1e7acb Add support for systemd socket activation (where systemd creates the Unix
domain socket for tmux rather than tmux creating it). Build with
--enable-systemd. From Julien Moutinho in GitHub issue 3119.
2022-03-28 08:42:13 +01:00
Thomas Adam 5e491e7947 Merge branch 'obsd-master' into master 2022-03-24 12:01:11 +00:00
nicm 792d13af49 Add a capability for OSC 7 and use it similarly to how the title is set
(and controlled by the same set-titles option). GitHub issue 3127.
2022-03-24 09:05:57 +00:00
Thomas Adam 5d4c3ef762 Merge branch 'obsd-master' into master 2022-03-16 20:01:10 +00:00
nicm e6e737ac0b Add an option to set the character used for unused areas of the
terminal, GitHub issue 3110.
2022-03-16 17:00:17 +00:00
Thomas Adam 25337ac102 Merge branch 'obsd-master' into master 2022-03-08 20:01:11 +00:00
nicm a3d920930b Add remain-on-exit-format to set text shown when pane is dead. 2022-03-08 18:31:46 +00:00
Thomas Adam 2fb6089e81 Merge branch 'obsd-master' into master 2022-03-08 14:01:11 +00:00
nicm ad9b805983 Add argument to refresh-client -l to forward clipboard to a pane. GitHub
issue 3068.
2022-03-08 12:01:19 +00:00
Thomas Adam 2be5488693 Merge branch 'obsd-master' into master 2022-02-22 14:01:10 +00:00
nicm fa71e9a079 Add next_session_id format with the next session ID, GitHub issue 3078. 2022-02-22 11:10:41 +00:00
Thomas Adam 722f395e61 Merge branch 'obsd-master' into master 2022-02-16 22:01:11 +00:00
nicm 0027ee13a0 Support more mouse buttons when the terminal sends them, GitHub issue
3055.
2022-02-16 18:55:05 +00:00
Thomas Adam 85ef73591d Merge branch 'obsd-master' into master 2022-02-15 16:01:11 +00:00
nicm f85208602d Do not create a buffer from an OSC 52 response if we have not sent a
query.
2022-02-15 13:03:02 +00:00
Thomas Adam a4f336a91a Merge branch 'obsd-master' into master 2022-02-01 16:01:11 +00:00
nicm 7e34645fcb Add option to show arrows for active pane indicator, GitHub issue 3022
from Marcel Partap.
2022-02-01 14:46:41 +00:00
Thomas Adam 9c82ff1778 Merge branch 'obsd-master' into master 2021-12-21 14:01:09 +00:00
nicm ff64aafeab ARM's Morello CHERI architecture does not support pointers in packed
structures, so remove the packed attribute on struct grid_line and
reorder the members to eliminate unnecessary padding. From Jessica
Clarke in GitHub issue 3012.
2021-12-21 13:07:53 +00:00
Thomas Adam 8941dbe482 Merge branch 'obsd-master' into master 2021-12-10 14:01:10 +00:00
nicm db3aabcc34 Add a NOBLOCK flag rather than adding amount to wait for when
dealing with potentially-long sequences. GitHub issue 3001.
2021-12-10 12:42:37 +00:00
Thomas Adam 138ffc7cb6 Merge branch 'obsd-master' into master 2021-12-07 09:52:59 +00:00
nicm b55f0ac6b9 Leave the hardware cursor at the position of the selected line in choose
modes and current editing position and at the command prompt. It is
invisible but this is helpful for people using screen readers. GitHub
issue 2970.
2021-11-15 10:58:13 +00:00
Thomas Adam 77fc7ac3be Merge branch 'obsd-master' into master 2021-11-03 16:01:14 +00:00
nicm 57100376cc Add a cursor-style option, from Alexis Hildebrandt in GitHub issue 2960. 2021-11-03 13:37:17 +00:00
Thomas Adam 7d330c19e8 Merge branch 'obsd-master' into master 2021-11-01 12:01:12 +00:00
nicm 8d2286b769 Add a cursor-colour option, from Alexis Hildebrandt in GitHub issue
2959.
2021-11-01 09:34:49 +00:00
Thomas Adam 60cacdffea Merge branch 'obsd-master' into master 2021-10-28 22:01:13 +01:00
nicm 49d33a4282 Allow detach even if suspend flag set, GitHub issue 2932. 2021-10-28 18:54:33 +00:00
Thomas Adam c77924bb56 Merge branch 'obsd-master' into master 2021-10-26 16:01:11 +01:00
nicm 5745bd27fd Do not allow inline styles to replace mode-style for the selected item,
from Alexis Hildebrandt in GitHub issue 2946.
2021-10-26 12:22:23 +00:00
Thomas Adam 6f46f71d58 Merge branch 'obsd-master' into master 2021-10-26 00:01:13 +01:00
nicm 197a116f5a Add a way to force a colour to RGB and a format to display it. 2021-10-25 21:21:16 +00:00
Thomas Adam 3934d9b24d Merge branch 'obsd-master' into master 2021-10-25 12:01:11 +01:00
nicm ef46eb91a5 Add -s and -S to display-popup to set popup and border style, from
Alexis Hildebrandt in GitHub issue 2931.
2021-10-25 09:38:36 +00:00
Thomas Adam 1bf2f811ea Merge branch 'obsd-master' into master 2021-10-20 14:01:15 +01:00
nicm 8a9bfd0cdd Add -T to set a popup title, from Alexis Hildebrandt in GitHub issue 2941. 2021-10-20 09:50:40 +00:00
Thomas Adam 264fe7fc2a Merge branch 'obsd-master' into master 2021-10-14 16:01:20 +01:00
nicm add20637f2 Add popup-border-lines option to set popup line style, from Alexis
Hildebrandt, GitHub issue 2930.
2021-10-14 13:19:01 +00:00
Thomas Adam fb23df679b Merge branch 'obsd-master' into master 2021-10-13 14:01:16 +01:00
nicm 837ca176d1 Add popup-style and popup-border-style options, from Alexis Hildebrandt
in GitHub issue 2927.
2021-10-13 09:28:36 +00:00
Thomas Adam aff2a473ec Merge branch 'obsd-master' into master 2021-10-11 16:01:13 +01:00
nicm b8581ec80e Make positions hidden by overlays range-based rather than character-based,
from Anindya Mukherjee.
2021-10-11 13:27:50 +00:00
Thomas Adam af82106fae Merge branch 'obsd-master' into master 2021-10-11 14:01:13 +01:00
nicm 759efe1b33 Add -e flag to set environment for popup, from Alexis Hildebrandt in
GitHub issue 2924.
2021-10-11 10:55:30 +00:00
Thomas Adam 479c9563c7 Merge branch 'obsd-master' into master 2021-10-05 16:01:13 +01:00
nicm 9b1fdb291e Separate "very visible" flag from blinking flag, it should not affect
DECSCUSR. GitHub issue 2891.
2021-10-05 12:46:02 +00:00
nicm e6b40cb339 Do fatal/fatalx a different way so the compiler trick to avoid warnings
becomes unnecessary, prompted by theo.
2021-09-10 15:03:18 +00:00
nicm 33ac7a346e Get rid of the last two warnings by turning them off around the problem
statements, if the compiler supports it.
2021-09-10 14:22:24 +00:00
Thomas Adam 732288c489 Merge branch 'obsd-master' into master 2021-09-09 16:01:09 +01:00
nicm 34312fd6ee Expand argument to run-shell again. 2021-09-09 13:38:32 +00:00
Thomas Adam 609baea95e Merge branch 'obsd-master' into master 2021-08-27 20:01:11 +01:00
nicm daec63e5e6 Replace %% in command lists (by copying them) for template arguments ,
this means they can be used with {} as well. Also make argument
processing from an existing vector preserve commands. GitHub issue 2858.
2021-08-27 17:25:55 +00:00
nicm fd756a150b Allow control mode clients to set a hard limit on the window width and
height, GitHub issue 2594.
2021-08-27 17:15:57 +00:00
Thomas Adam c6375a0d40 Merge branch 'obsd-master' into master 2021-08-25 12:01:11 +01:00
Thomas Adam c7266ca78d Merge branch 'obsd-master' into master 2021-08-25 10:01:10 +01:00
nicm 03d173cbd8 Validate command argument types (string or command list) and give more
useful error messages.
2021-08-25 08:51:55 +00:00
nicm a252fadf8a Fix up some printflike attributes. 2021-08-25 07:09:30 +00:00
Thomas Adam 95a374d7d2 Merge branch 'obsd-master' into master 2021-08-23 16:06:46 +01:00
nicm 210e71edf3 Move command argument parsing common functions and don't bother to parse
again if given a command rather than a string.
2021-08-23 12:33:55 +00:00
Thomas Adam 324f87cf14 Merge branch 'obsd-master' into master 2021-08-22 12:08:05 +01:00
nicm 069f5925af Preserve argument type in command and convert to string on demand. 2021-08-21 20:46:43 +00:00
Thomas Adam 921991c98d Merge branch 'obsd-master' into master 2021-08-21 20:01:22 +01:00
nicm 326d2ef234 Pass typed arguments out of the parser into the arguments list and let
it convert them into strings.
2021-08-21 18:39:07 +00:00
nicm 5241dae87d Stop caring about empty commands, just treat as a null command. 2021-08-21 17:25:32 +00:00
Thomas Adam 4d3367e965 Merge branch 'obsd-master' into master 2021-08-21 16:01:26 +01:00
nicm c286fbdcd7 Preserve command group when moving temporary list to current list being
buit.
2021-08-21 14:06:17 +00:00
Thomas Adam 62036121fa Merge branch 'obsd-master' into master 2021-08-21 12:01:41 +01:00
nicm 110ba767e5 Rename a member to match what it will be in future. 2021-08-21 10:28:05 +00:00
nicm 08e6360f23 Add args parsing callback for some future work, currently unused. 2021-08-21 10:22:38 +00:00
nicm d371764d02 Wrap command argument definitions in their own struct. 2021-08-21 08:44:59 +00:00
Thomas Adam b0da0cee4d Merge branch 'obsd-master' into master 2021-08-20 22:01:46 +01:00
nicm 5f32b7d961 Hide struct args behind a couple of accessor functions. 2021-08-20 19:50:16 +00:00
nicm de94a344f6 Add a couple of const and fix some warnings. 2021-08-20 19:34:51 +00:00
Thomas Adam 944fde7c57 Merge branch 'obsd-master' into master 2021-08-20 20:01:27 +01: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 6cbc83c6a6 Add a way to create an empty arguments set. 2021-08-20 17:53:54 +00:00
Thomas Adam 79f075bf1b Merge branch 'obsd-master' into master 2021-08-14 01:35:27 +01:00
Thomas Adam 54773d23b5 Merge branch 'obsd-master' into master 2021-08-14 01:34:54 +01:00
nicm 7d7d7c9605 Tweak how mouse works on popup: only Meta alone resizes or moves, not
Meta with other modifiers; button 2 on the left or top border opens
menu, right or bottom resizes; button 1 on any border moves.
2021-08-13 23:05:40 +00:00
nicm 7a0cec5ecf Fill in some other bits on new panes. 2021-08-13 19:55:11 +00:00
nicm 2588c3e52e Add menu options to convert a popup into a pane. 2021-08-13 19:27:25 +00:00
nicm 7789639b5d Add a menu when a popup is present (mouse only for now). 2021-08-13 18:54:54 +00:00
nicm 614611a8bd Add -B flag to remove border from popup. 2021-08-13 17:03:29 +00:00
nicm 13a0da205b Break message type stuff out into its own header. 2021-08-13 07:37:58 +00:00
nicm 2bb0b9d6c5 Change focus to be driven by events rather than walking all panes at end
of event loop, this way the ordering of in and out can be enforced.
GitHub issue 2808.
2021-08-13 06:52:51 +00:00
Thomas Adam fada3eb932 Merge branch 'obsd-master' into master 2021-08-12 10:01:22 +01:00
nicm 163908fe8a Move hook format setup earlier and add a hook_client, GitHub issue 2809. 2021-08-12 08:05:11 +00:00
Thomas Adam 44ada9cd67 Merge branch 'obsd-master' into master 2021-08-12 00:01:26 +01:00
nicm 7eea3d7ab8 Break the colour palette into a struct rather than just a single array
and use that to support the OSC palette-setting sequences in popups.
Also add a pane-colours array option to specify the defaults. GitHub
issue 2815.
2021-08-11 20:49:55 +00:00
Thomas Adam e9d49161e0 Merge branch 'obsd-master' into master 2021-08-11 12:01:20 +01:00
nicm 9013600074 Return to applying pane-border-style to the area outside panes, GitHub
issue 2816.
2021-08-11 09:05:21 +00:00
Thomas Adam 33e332428c Merge branch 'obsd-master' into master 2021-08-06 12:01:24 +01:00
nicm 24cd6851f6 Add basic support for zero width joiners, GitHub issues 1605 and 2784. 2021-08-06 09:34:09 +00:00
Thomas Adam 7cbf4c9027 Merge branch 'obsd-master' into master 2021-07-21 10:01:24 +01:00
nicm f0e02387b2 Do not close popups on resize, instead adjust them to fit, from Anindya
Mukherjee.
2021-07-21 08:06:36 +00:00
Thomas Adam e3ff887d2a Merge branch 'obsd-master' into master 2021-07-14 12:01:21 +01:00
nicm 732c72c98e Move default value for TERM into tmux.h. 2021-07-14 08:56:00 +00:00
nicm 77b1290698 More accurate vi(1) word navigation in copy mode and on the status line.
This changes the meaning of the word-separators option - setting it to
the empty string is equivalent to the previous behavior. From Will Noble
in GitHub issue 2693.
2021-06-10 07:56:47 +00:00
nicm 866117636e Add different command historys for different types of prompts
("command", "search" etc). From Anindya Mukherjee.
2021-06-10 07:50:03 +00:00
nicm 02a6b39db7 Improve logging of screen mode changes. 2021-06-10 07:43:44 +00:00
nicm f02a6c34e0 Move "special" keys into the Unicode PUA rather than making them top bit
set, some compilers do not allow enums that are larger than int. GitHub
issue 2673.
2021-06-10 07:38:28 +00:00
nicm f9f97c8145 Change cursor style handling so tmux understands which sequences contain
blinking and sets the flag appropriately, means that it works whether
cnorm disables blinking or not. GitHub issue 2682.
2021-06-10 07:36:47 +00:00
nicm 84e22168a5 Change resize timers and flags into one timer and a queue which is
simpler and fixes problems with vim when resized multiple times. GitHub
issue 2677.
2021-06-10 07:33:41 +00:00
nicm 0c5cbbbf5c Three changes to fix problems with xterm in VT340 mode, reported by
Thomas Sattler.

1) Do not include the DECSLRM or DECFRA features for xterm; they will be
   added instead if secondary DA responds as VT420 (this happens
   already).

2) Set or reset the individual flags after terminal-overrides is
   applied, so the user can properly disable them.

3) Add a capability for DECFRA ("Rect").
2021-06-10 07:28:45 +00:00
Nicholas Marriott 022d0210c5 More accurate vi(1) word navigation in copy mode and on the status line. This
changes the meaning of the word-separators option - setting it to the empty
string is equivalent to the previous behavior. From Will Noble in GitHub issue
2693.
2021-05-13 08:49:58 +01:00
Nicholas Marriott c03b57465b Add different command historys for different types of prompts ("command",
"search" etc). From Anindya Mukherjee.
2021-05-03 07:39:32 +01:00
Nicholas Marriott 2e7ec8c0b9 Improve logging of screen mode changes. 2021-04-30 20:14:10 +01:00
Nicholas Marriott e2d01795d2 Move "special" keys into the Unicode PUA rather than making them high a top bit
set, some compilers cannot handle enums that are larger than int. GitHub issue
2673.
2021-04-28 09:18:04 +01:00
Nicholas Marriott 589d3eb48f Change cursor style handling so tmux understands which sequences contain
blinking and sets the flag appropriately, means that it works whether cnorm
disables blinking or not. GitHub issue 2682.
2021-04-28 09:17:13 +01:00
Nicholas Marriott cf6034da92 Change resize timers and flags into one timer and a queue to fix problems with
vim when resized multiple times. GitHub issue 2677.
2021-04-28 09:16:30 +01:00
Nicholas Marriott 7a6446ac17 Three changes to fix problems with xterm in VT340 mode, reported by Thomas
Sattler.

1) Do not include the DECSLRM or DECFRA features for xterm; they will be added
   instead if secondary DA responds as VT420 (this happens already).

2) Set or reset the individual flags after terminal-overrides is applied, so
   the user can properly disable them.

3) Add a capability for DECFRA ("Rect").
2021-04-22 09:01:22 +01:00
Thomas Adam bedf2bd437 Merge branch 'obsd-master' into master 2021-04-12 12:01:32 +01:00
nicm e6abe55134 Add a flag to disable keys to close a message, GitHub issue 2625. 2021-04-12 09:36:12 +00:00
Thomas Adam 83cd593b9c Merge branch 'obsd-master' into master 2021-04-12 10:01:27 +01:00
nicm cd208c9d72 Permit shortcut keys in buffer, client, tree modes to be configured with
a format; the default remains the line number. GitHub issue 2636.
2021-04-12 06:50:25 +00:00
Thomas Adam 22ccae1c9d Merge branch 'obsd-master' into master 2021-04-05 10:01:19 +01:00
nicm 5900b164a4 Fix a couple of edge cases with the jump-back-xxx commands, and also
update back-to-indentation to use grid_reader, thereby fixing line
wrapping issues. From Anindya Mukherjee, GitHub issue 2633.
2021-04-05 08:43:48 +00:00
Thomas Adam be568ea3b2 Merge branch 'obsd-master' into master 2021-03-16 10:01:20 +00:00
nicm 8b800b41c9 Add client-detached notification in control mode, from Mohsin Kaleem. 2021-03-16 09:14:58 +00:00
Thomas Adam 12cfd0d22b Merge branch 'obsd-master' into master 2021-03-11 08:01:29 +00:00
nicm ee0df1b8f8 Tidy old jobs every hour instead of every 30 seconds. 2021-03-11 07:08:18 +00:00
nicm 3eb91efba1 Add an "absolute-centre" alignment to use the centre of the total space
instead of only the available space. From Magnus Gross in GitHub issue 2578.
2021-03-11 06:41:04 +00:00
nicm d98f9f7fe5 Add split-window -Z to start the pane zoomed, GitHub issue 2591. 2021-03-11 06:31:05 +00:00
Thomas Adam 2301bee87d Merge branch 'obsd-master' into master 2021-03-02 12:01:25 +00:00
nicm c44750792a Drop support for popups where the content is provided directly to tmux
(which does not have many practical uses) and only support running a
program in the popup. display-popup is now simpler and can accept
multiple arguments to avoid escaping problems (like the other commands).
2021-03-02 10:56:45 +00:00
Thomas Adam 0cd5ed9e9b Merge branch 'obsd-master' into master 2021-02-22 10:01:22 +00:00
nicm 6876381276 Move config file path expansion much earlier, keep the list of paths
around rather than freeing later, and add a config_files format variable
containing it. Suggested by kn@ a while back.
2021-02-22 08:18:13 +00:00
Thomas Adam cb7e6698f3 Merge branch 'obsd-master' into master 2021-02-22 08:01:22 +00:00
nicm e858270006 There are many format variables now so allocating all the default ones
each time a tree is created is too expensive. Instead, convert them all
into callbacks and put them in a static table so they only allocate on
demand. The tree remains for the moment for extra (non-default)
variables added by for example copy mode or popups. Also reduce
expensive calls to localtime_r/strftime. GitHub issue 2253.
2021-02-22 07:09:06 +00:00
nicm 8986c8dfcd Move jump commands to grid reader, make them UTF-8 aware, and tidy up,
from Anindya Mukherjee.
2021-02-22 06:53:04 +00:00
Thomas Adam 3a76a56824 Merge branch 'obsd-master' into master 2021-02-17 09:58:51 +00:00
Thomas Adam ce5de76592 Merge branch 'obsd-master' into master 2021-02-17 09:58:12 +00:00
nicm af3ffa9c41 Move the call to setupterm() into the client and have it pass the
results to the server over imsg, means the server does not need to enter
ncurses or read terminfo db. Old clients will not work with a new
server.
2021-02-17 07:18:36 +00:00
nicm 6642706f7b Support X11 colour names and some other variations for OSC 10/11, also
add OSC 110 and 111. GitHub issue 2567.
2021-02-15 09:39:37 +00:00
nicm 2b58c226db Add a couple of helper functions, and flush imsgs on exit. 2021-02-11 09:39:29 +00:00
nicm e40831a002 Move file handling protocol stuff all into file.c so it can be reused
more easily.
2021-02-11 08:28:45 +00:00
Thomas Adam 39904f7fc6 Merge branch 'obsd-master' into master 2021-02-05 14:01:23 +00:00
nicm 3dddc11603 Send Unicode directional isolate characters around horizontal pane
borders if the terminal support UTF-8 and an extension terminfo(5)
capability "Bidi" is present. On terminals with BiDi support (ie, VTE)
this seems to be enough to display right-to-left text acceptably enough
to be usable (with some caveats about the mouse position). Requested by
and with help from Mahmoud Elagdar in GitHub issue 2425.
2021-02-05 12:29:18 +00:00