Commit Graph

268 Commits

Author SHA1 Message Date
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
8363c6af2e Add an "always" value to the extended-keys option to always forward these keys
to applications inside tmux.
2021-04-21 09:32:48 +01:00
Thomas Adam
12cfd0d22b Merge branch 'obsd-master' into master 2021-03-11 08:01:29 +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
Thomas Adam
0242513ce7 Merge branch 'obsd-master' into master 2021-02-01 10:01:20 +00:00
nicm
509221520c Add a no-detached choice to detach-on-destroy which detaches only if
there are no other detached sessions to switch to, from Sencer Selcuk in
GitHub issue 2553.
2021-02-01 08:01:14 +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
5a2db4c7e8 Merge branch 'obsd-master' into master 2021-01-04 10:01:20 +00:00
nicm
bd0fb22f0a Add a variant of remain-on-exit that only keeps the pane if the program
failed, GitHub issue 2513.
2021-01-04 08:43:16 +00:00
Thomas Adam
950e982001 Merge branch 'obsd-master' into master 2020-12-15 10:01:22 +00:00
nicm
8bd29a30bf Make synchronize-panes a pane option and add -U flag to set-option to
unset an option on all panes. GitHub issue 2491 from Rostislav Nesin.
2020-12-15 08:31:50 +00:00
Thomas Adam
27634645e9 Merge branch 'obsd-master' into master 2020-12-01 10:01:22 +00:00
nicm
9a74bba007 Make replacement of ##s consistent when drawing formats, whether
followed by [ or not. Add a flag (e) to the q: format modifier to double
up #s and use it for the window_flags format variable so it doesn't end
up escaping any following text. GitHub issue 2485.
2020-12-01 08:12:58 +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
90158b5977 Merge branch 'obsd-master' 2020-07-24 10:01:19 +01:00
nicm
d329b035ce Add a hook when the pane title changed. 2020-07-24 07:05:37 +00:00
Thomas Adam
e71c5efd58 Merge branch 'obsd-master' 2020-05-22 18:01:20 +01:00
nicm
a06a0e1392 xterm* can have focus too. 2020-05-22 15:08:38 +00:00
nicm
0ab82d9531 Add a terminal feature for enable/disable extended keys (supported by
xterm and mintty) and add an option to make tmux send it. Only forward
extended keys if the application has requested them, even though we use
the CSI u sequence and xterm uses CSI 27 ~ - this is what mintty does as
well.
2020-05-16 16:44:54 +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
nicm
ff8dd150e0 Add a mark in copy mode. Set with set-mark command (bound to 'X') by
default and the mark and cursor position are swapped with 'jump-to-mark'
(bound to M-x). The line containing the mark is shown in
copy-mode-mark-style with the horizontal position in reverse.

From Anindya Mukherjee in GitHub issue 2209.
2020-05-16 16:10:28 +00:00
nicm
d67245c734 Add a customize mode where keys and options may be browsed and changed,
includes adding a brief description of each option. Bound to "C" by
default.
2020-05-16 16:02:24 +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
78595457f9 Add 'e' key in buffer mode to open the buffer in an editor. 2020-05-16 15:24:28 +00:00
nicm
2391fe23ab Copy mode search improvements:
- Add styles for the search marking styles (copy-mode-match-style and
  copy-mode-current-match-style).

- Show the current match (the one with the cursor on it) in a different style.

- Copying without a selection will copy the current match if there is one.
2020-05-16 15:11:52 +00:00
nicm
f03b61131b Drop having a separate type for style options and make them all strings,
which allows formats to be expanded. Any styles without a '#{' are still
validated when they are set but any with a '#{' are not. Formats are not
expanded usefully in many cases yet, that will be changed later.

To make this work, a few other changes:

- set-option -a with a style option automatically appends a ",".

- OSC 10 and 11 don't set the window-style option anymore, instead the
  fg and bg are stored in the pane struct and act as the defaults that
  can be overridden by window-style.

- status-fg and -bg now override status-style instead of trying to keep
  them in sync.
2020-05-16 15:01:30 +00:00
nicm
7dbe623156 Instead of having a default set of terminals in terminal-overrides that
get XT added and using that as a marker for xterm(1)-like, assume that
if the terminfo(5) entry already has XT or the clear capability starts
with CSI then the terminal is VT100-like and it should be safe to send
DA requests. The DA responses trigger additional features being added.
2020-05-16 14:46:14 +00:00
Nicholas Marriott
6d92b99dbc Add a terminal feature for enable/disable extended keys (supported by xterm and
mintty) and add an option to make tmux send it.
2020-05-15 16:15:24 +01:00
Nicholas Marriott
5ee4d991b6 xterm-keys has been on by default for 5 years and all other modern terminals
use these key sequences by default. Merge the code into the main tty and input
tree processing (convering the latter to use a tree rather than a table at the
same time) and make the option a no-op.
2020-05-15 10:31:54 +01:00
Nicholas Marriott
31621036ad 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-14 16:49:08 +01:00
Nicholas Marriott
6214cd0726 Add a mark in copy mode. Set with set-mark command (bound to 'X') by default
and the mark and cursor position are swapped with 'jump-to-mark' (bound to
M-x). The line containing the mark is shown in copy-mode-mark-style with the
horizontal position in reverse.

From Anindya Mukherjee in GitHub issue 2209.
2020-05-13 06:29:57 +01:00
Nicholas Marriott
a61cbf1c33 Add a customize mode where options may be browsed and changed, includes adding
a brief description of each option. Bound to "C" by default.
2020-05-08 19:10:09 +01:00
Nicholas Marriott
7a95e9bf7e Change message log to be per server rather than per client and include every
command that is run.
2020-05-06 13:43:22 +01:00
Nicholas Marriott
cc19203be2 Add 'e' key in buffer mode to open the buffer in an editor. 2020-05-01 09:02:44 +01:00
Nicholas Marriott
6f700904a9 Copy mode search improvements:
- Add styles for the search marking styles (copy-mode-match-style and
  copy-mode-current-match-style).

- Show the current match (the one with the cursor on it) in a different style.

- Copying without a selection will copy the current match if there is one.
2020-04-29 18:08:21 +01:00
Nicholas Marriott
7c52d702e4 Remove an unnecessary comma. 2020-04-29 08:59:20 +01:00
Nicholas Marriott
3d76748161 Need to redraw borders now when some things change. Also change default so that
the active border colour is different in a mode or with synchronize-panes on.
2020-04-29 08:55:21 +01:00
Nicholas Marriott
1f8256fc50 Drop having a separate type for style options and make them all strings, which
allows formats to be expanded. Any styles without a '#{' are still validated
when they are set but any with a '#{' are not. Formats are not expanded
usefully in many cases yet, that will be changed later.

To make this work, a few other changes:

- set-option -a with a style option automatically appends a ",".

- OSC 10 and 11 don't set the window-style option anymore, instead the fg and
  bg are stored in the pane struct and act as the defaults that can be
  overridden by window-style.

- status-fg and -bg now override status-style instead of trying to keep them in
  sync.
2020-04-28 13:50:07 +01:00
Nicholas Marriott
527f66ed23 Instead of having a default set of terminals in terminal-overrides that get XT
added and using that as a marker for xterm(1)-like, assume that if the
terminfo(5) entry already has XT or the clear capability starts with CSI then
the terminal is VT100-like and it should be safe to send DA requests. The DA
responses trigger additional features being added.

This is all to detect extensions if terminfo(5) is wrong or inadequate. If it
fails, tmux will just fall back to using the capabilities in the terminfo(5)
entry alone.
2020-04-24 15:52:44 +01:00
Nicholas Marriott
e67d65064e rxvt needs XT also for the moment. 2020-04-24 14:20:33 +01:00
Thomas Adam
8ae3915cc2 Merge branch 'obsd-master' 2020-04-22 12:01:38 +01:00
nicm
de5163a634 Change so main-pane-width and height can be given as a percentage. 2020-04-22 06:57:13 +00:00
Thomas Adam
985bc0ee4a Merge branch 'obsd-master' 2020-04-21 08:01:30 +01:00
nicm
1cabccbb2b xterm* needs XT also. 2020-04-21 05:26:13 +00:00
Thomas Adam
c706aadf52 Merge branch 'obsd-master' 2020-04-20 17:42:29 +01:00
nicm
c91b4b2e14 Tidy up the terminal detection and feature code and add named sets of
terminal features, each of which are defined in one place and map to a
builtin set of terminfo(5) capabilities. Features can be specified based
on TERM with a new terminal-features option or with the -T flag when
running tmux. tmux will also detect a few common terminals from the DA
and DSR responses.

This is intended to make it easier to configure tmux's use of
terminfo(5) even in the presence of outdated ncurses(3) or terminfo(5)
databases or for features which do not yet have a terminfo(5) entry.
Instead of having to grok terminfo(5) capability names and what they
should be set to in the terminal-overrides option, the user can
hopefully just give tmux a feature name and let it do the right thing.

The terminal-overrides option remains both for backwards compatibility
and to allow tweaks of individual capabilities.

tmux already did much of this already, this makes it tidier and simpler
to configure.
2020-04-20 13:25:36 +00:00
Thomas Adam
413c4cfd1b Merge branch 'obsd-master' 2020-04-17 10:01:38 +01:00