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
Thomas Adam
545a610c6b
Merge branch 'obsd-master' into master
2021-01-29 12:01:21 +00:00
nicm
255802d8d7
Trim output overwritten by later text or clears completely rather than
...
only in a few cases. This means we can better track when a line should
wrap. GitHub issue 2537.
2021-01-29 09:48:43 +00:00
Thomas Adam
9ff017e908
Merge branch 'obsd-master' into master
2021-01-20 08:01:22 +00:00
nicm
fb774b77d0
Change so that window_flags escapes # automatically which means configs
...
will not have to change. A new format window_raw_flags contains the old
unescaped version.
2021-01-20 07:16:54 +00:00
Thomas Adam
66da51b631
Merge branch 'obsd-master' into master
2021-01-18 12:01:22 +00:00
nicm
91d112bf12
There is no need to clear every line entirely before drawing to it, this
...
means moving the cursor and messes up wrapping. Better to just clear the
sections that aren't written over. GitHub issue 2537.
2021-01-18 10:27:54 +00:00
Thomas Adam
24c15eda79
Merge branch 'obsd-master' into master
2021-01-17 18:01:21 +00:00
Nicholas Marriott
a3011be0d2
Look for libevent2 differently from libevent for platforms with both.
2021-01-17 17:21:51 +00:00
nicm
71c590a37f
Add -N flag to never start server even if command would normally do so,
...
GitHub issue 2523.
2021-01-17 16:17:41 +00:00
Thomas Adam
dc1e1125a5
Merge branch 'obsd-master' into master
2021-01-08 12:01:21 +00:00
nicm
a75aca4d6a
Missed from last commit.
2021-01-08 10:09:44 +00:00
Thomas Adam
70a0eb3a22
Merge branch 'obsd-master' into master
2020-12-24 22:21:21 +00:00
nicm
c43f2dce1b
Break cursor movement in grid into a common set of functions that can
...
handle line wrapping and so on in one place and use them for the obvious
copy mode commands. From Anindya Mukherjee.
2020-12-22 09:22:14 +00:00
Thomas Adam
e288ea153c
Merge branch 'obsd-master' into master
2020-12-03 08:01:22 +00:00
nicm
fd451aa796
Redraw any visible modes when status line changes so that formats like
...
the pane title are updated. GitHub issue 2487. Also a man page fix from
jmc.
2020-12-03 07:12:11 +00:00
Thomas Adam
970e8f734c
Merge branch 'obsd-master'
2020-10-30 10:01:22 +00:00
nicm
649e5970e9
Add a -O flag to display-menu to change the mouse behaviour and not
...
close the menu when the mouse is released, from teo_paul1 at yahoo dot
com.
2020-10-30 08:55:56 +00:00
Thomas Adam
f5b7ebc540
Merge branch 'obsd-master'
2020-10-05 12:01:23 +01:00
nicm
c8f3736b07
Use the setal capability as well as (tmux's) Setulc.
2020-10-05 09:53:01 +00:00
Thomas Adam
a34ceb1074
Merge branch 'obsd-master'
2020-09-22 08:01:18 +01:00
nicm
86d6ac2f06
Fix warnings on some platforms with %llx and add a new message to handle
...
64-bit client flags.
2020-09-22 05:23:34 +00:00
Thomas Adam
fc9ecdc665
Merge branch 'obsd-master'
2020-09-02 16:01:20 +01:00
nicm
37b1600d9c
Add a -w flag to set- and load-buffer to send to clipboard using OSC 52.
...
GitHub issue 2363.
2020-09-02 13:46:35 +00:00
Thomas Adam
655134f77c
Merge branch 'obsd-master'
2020-08-25 14:01:19 +01:00
nicm
20fcdcfea1
Allow colour to be spelt as color, from Boris Verkhovsky. GitHub issue
...
2317.
2020-08-25 11:35:32 +00:00
Thomas Adam
2fdd5fa507
Merge branch 'obsd-master'
2020-07-27 10:01:21 +01: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
Thomas Adam
90de0c1a9b
Merge branch 'obsd-master'
2020-07-21 08:01:19 +01:00
nicm
743ab5728d
Fix show-buffer when run from inside tmux, GitHub issue 2314.
2020-07-21 05:24:33 +00:00
Thomas Adam
aa4f3a9b3d
Merge branch 'obsd-master'
2020-07-06 12:01:22 +01:00
nicm
66d5e5de7a
Add a way for control mode clients to subscribe to a format and be
...
notified of changes rather than having to poll. GitHub issue 2242.
2020-07-06 09:14:20 +00:00
Thomas Adam
c0d9eaff9b
Merge branch 'obsd-master'
2020-07-04 16:01:20 +01:00
nicm
1e42689661
kill-window -a cannot just walk the list of windows because if
...
renumber-windows is on, the window it wants to keep could be moved.
Change to renumber afterwards and also behave better if the window is
linked into the session twice. GitHub issue 2287.
2020-07-04 14:24:02 +00:00
Thomas Adam
6c437d45ac
Merge branch 'obsd-master'
2020-06-18 12:01:22 +01:00
nicm
2372b0fdc6
Add a flag to make a client wait for an empty line before exiting in
...
control mode to avoid stray commands ending up in the shell.
2020-06-18 08:34:22 +00:00
Thomas Adam
eb448daa1a
Merge branch 'obsd-master'
2020-06-16 10:01:21 +01:00
nicm
1bf9555e4f
d and D keys to reset to default in customize mode.
2020-06-16 08:18:34 +00:00
Thomas Adam
824efe7be4
Merge branch 'obsd-master'
2020-06-13 12:01:20 +01:00
nicm
1c78155e70
Add -b flags to insert a window before (like the existing -a for after)
...
to break-pane, move-window, new-window. GitHub issue 2261.
2020-06-13 09:05:53 +00:00
Thomas Adam
b5c86fdc0c
Merge branch 'obsd-master'
2020-06-11 22:01:23 +01:00
nicm
63c2ed1483
Add some formats for search in copy mode (search_present, search_match).
...
GitHub issue 2268.
2020-06-11 19:43:34 +00:00
Thomas Adam
e8c99496cd
Merge branch 'obsd-master'
2020-06-11 12:01:19 +01:00
nicm
50ee41423f
Add a -A option to pause a pane manually.
2020-06-11 09:55:47 +00:00
Thomas Adam
ea4425b9bd
Merge branch 'obsd-master'
2020-06-10 10:01:20 +01:00
nicm
23d79cfda8
Instead of a buffer size limit on each pane, set a limit of 300 seconds
...
of data for each client in control mode.
2020-06-10 07:27:10 +00:00
Thomas Adam
92c8cc17c3
Merge branch 'obsd-master'
2020-06-05 14:01:19 +01:00
nicm
d919fa1ed0
Change how panes are resized so that the code is clearer and if the pane
...
is resized multiple times during one event loop, it is forced to resize
at the end. Also don't zoom/unzoom in switch-client if the pane hasn't
changed. GitHub issue 2260.
2020-06-05 11:20:51 +00:00
Thomas Adam
47a5afe5bf
Merge branch 'obsd-master'
2020-06-05 12:01:18 +01:00
nicm
c908d2039f
Fix various confusion about am vs xenl.
2020-06-05 09:32:15 +00:00
Thomas Adam
a06cf900c7
Merge branch 'obsd-master'
2020-06-05 10:01:22 +01:00
nicm
c586208991
Add support for pausing a pane when the output buffered for a control
...
mode client gets too far behind. The pause-after flag with a time is set
on the pane with refresh-client -f and a paused pane may be resumed with
refresh-client -A. GitHub issue 2217.
2020-06-05 07:33:57 +00:00
Thomas Adam
62c0617d79
Merge branch 'obsd-master'
2020-06-03 00:01:20 +01:00
Thomas Adam
3d5decb305
Merge branch 'obsd-master'
2020-06-02 22:01:20 +01:00
nicm
4694e9a2b6
Move the code to set up a padding cell into grid.c.
2020-06-02 20:51:46 +00:00
nicm
2a4d4bda2b
Allow UTF-8 characters of width 0 to be stored, it is useful to be able
...
to put padding cells in as width 0.
2020-06-02 20:10:23 +00:00
Thomas Adam
31a51cae1d
Merge branch 'obsd-master'
2020-06-02 11:29:48 +01:00
nicm
f3931497f8
Use CLOCK_MONOTONIC for timer measurement and add a timestamp to control
...
mode %output blocks.
2020-06-02 08:17:27 +00:00
nicm
9819470058
Change format callback to return value rather than storing it in the entry.
2020-06-01 19:39:25 +00:00
Thomas Adam
91e40de2da
Merge branch 'obsd-master'
2020-06-01 12:01:20 +01: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
Thomas Adam
a4cb700269
Merge branch 'obsd-master'
2020-05-26 14:02:15 +01:00
nicm
ea610a3119
Pass the stdout file descriptor from the client as well as stdin and use
...
them for control clients directly instead of passing everything via the
client.
2020-05-26 08:41:47 +00:00
Thomas Adam
967e5f8be3
Merge branch 'obsd-master'
2020-05-26 08:42:55 +01:00
nicm
6f03e49e68
Use the internal representation for UTF-8 keys instead of wchar_t and
...
drop some code only needed for that.
2020-05-25 18:57:24 +00:00
nicm
49ec074271
Tidy up new UTF-8 code and make it more generic.
2020-05-25 18:19:29 +00:00
Thomas Adam
b34af611a5
Merge branch 'obsd-master'
2020-05-25 18:01:20 +01:00
nicm
bbfb44e9b2
Make some data types consistent.
2020-05-25 15:02:25 +00:00
Thomas Adam
bb5a1925ab
Merge branch 'obsd-master'
2020-05-25 12:01:19 +01:00
nicm
3a5219c6d0
Instead of storing all UTF-8 characters in the extended cell which means
...
that 14 bytes are wasted for each character in the BMP, only store
characters of three bytes or less in the cell itself and store others
(outside the BMP or with combining characters) in a separate global
tree. Can reduce grid memory use for heavy Unicode users by around 30%.
2020-05-25 09:32:10 +00:00
Thomas Adam
aeefd585a0
Merge branch 'obsd-master'
2020-05-24 12:01:21 +01:00
nicm
18aab90959
Give control code its own state struct.
2020-05-24 09:40:17 +00:00
nicm
6c82982711
Now the tty has a pointer back to the client there is no point (and a
...
bit confusing) in it keeping a copy of the fd as well. Remove it.
2020-05-24 09:13:06 +00:00
Thomas Adam
d48f0e114e
Merge branch 'obsd-master'
2020-05-22 13:40:33 +01:00
nicm
9a0763c3a0
Move client offset stuff into control.c since only control clients will
...
need it.
2020-05-22 11:07:04 +00:00
Thomas Adam
40126ee96c
Merge branch 'obsd-master'
2020-05-21 08:55:31 +01:00
nicm
31e3f2d530
Support code for control mode flow control: allow clients to have
...
separate offsets (used and acknowleged) into the pane buffers; turn off
reading from panes when no clients can accept the data; and add a -A
flag to refresh-client to let clients turn receiving a pane on and off.
2020-05-21 07:24:13 +00:00
nicm
574a9e4b6c
Move lazy resize from the pane to the window, there is no point in
...
resizing the window unless it is the current window, and if we do and
don't resize the pane until later there are problems if the size changes
from A to B then back to A.
2020-05-16 16:50:55 +00:00
nicm
e2a26740b9
Add an option to set the pane border lines style from a choice of single
...
lines (ACS or UTF-8), double or heavy (UTF-8), simple (plain ASCII) or
number (the pane numbers). Lines that won't work on a non-UTF-8 terminal
are translated back into ACS when they are output.
2020-05-16 16:26:34 +00:00