Commit Graph

8969 Commits

Author SHA1 Message Date
nicm
a3cbc014c3 Use formats for status-style and message-style. 2020-05-16 15:19:04 +00:00
nicm
58fb81d19a Complete partial window indexes properly. 2020-05-16 15:18:17 +00:00
nicm
463864f5a2 Add -W and -T flags to command-prompt to only complete a window and a
target, also complete aliases.
2020-05-16 15:16:36 +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
80e52545a0 Improve command prompt completion:
- Show a menu with completions if there are multiple.

- Don't complete argument stuff (options, layouts) at start of text.

- For -t and -s, if there is no : then complete sessions but if there is
  a :, show a menu of all windows in the session rather than trying to
  complete the window name which is a bit useless if there are
  duplicates.
2020-05-16 15:06:03 +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
0487029fc5 Call format_defaults_window for panes as well. 2020-05-16 14:55:38 +00:00
nicm
5bf96c2f2c Use a grid cell not a style for the pane style. 2020-05-16 14:53:23 +00:00
nicm
428137d876 Instead of forbidding invalid session names, sanitize them like window
names.
2020-05-16 14:49:50 +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
nicm
21a39c997b Do not redraw or update mode if nothing has changed. 2020-05-16 14:42:06 +00:00
nicm
aebeeec1e9 Add feature and capabilities for focus reporting. Also document AX and
XT even though they aren't tmux's, and add some bits for rxvt.
2020-05-16 14:39:40 +00:00
nicm
26312a7774 Move terminal features into a single file. 2020-05-16 14:30:17 +00:00
nicm
a29196ca6a Build list of paths and weed out duplicates before loading configs, and
add TMUX_SOCK like TMUX_PATH for the socket directory.
2020-05-16 14:26:33 +00:00
nicm
4e0a718666 Add extension terminfo(5) capabilities for margins. 2020-05-16 14:22:51 +00:00
nicm
41dec585df Response is iTerm2 not not ITerm2. 2020-05-16 14:18:39 +00:00
nicm
9dd58470e4 Remove support for iTerm2's DSR 1337 extension and use the CSI > q
extension now supported by a few different terminals.
2020-05-16 14:16:25 +00:00
nicm
471f697423 Add an attribute for ACS. 2020-05-16 14:13:37 +00:00
nicm
0dd1944206 Tweak the default choose modes formats:
- Only show pane title if it is not default and not empty.
- Add a prettier time format and use that instead of long ctime().
- Remove clutter and change the order.
2020-05-16 14:10:29 +00:00
Nicholas Marriott
57fe03dc5a 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 14:57:36 +01:00
Nicholas Marriott
53c84fd4aa If the application has not requested extended keys, then C-1 sends 1 not
nothing.
2020-05-16 07:39:22 +01:00
Nicholas Marriott
740f047a85 Need to update features after all the sequences come in. 2020-05-16 07:32:46 +01:00
Nicholas Marriott
c2167c5ee8 On select-window, make this client the latest client for the window. 2020-05-15 22:52:55 +01:00
Nicholas Marriott
e8ca5a4c7d List needs to be sorted. 2020-05-15 19:17:56 +01:00
Nicholas Marriott
67090dd91d XTerm not xterm. 2020-05-15 19:10:06 +01:00
Nicholas Marriott
401f197750 Er, misread this and it is not needed. 2020-05-15 18:58:13 +01:00
Nicholas Marriott
ca60aabab5 Translate special CSI u keys on input. 2020-05-15 18:25:44 +01:00
Nicholas Marriott
7317a0865c Get == and != the right way round. 2020-05-15 17:49:58 +01:00
Nicholas Marriott
0b828b91a5 Only send XDA on 0. 2020-05-15 17:49:07 +01:00
Nicholas Marriott
dcf537519f Fix default values for new escape sequences. 2020-05-15 17:48:21 +01:00
Nicholas Marriott
c364a7142c 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-15 17:40:24 +01:00
Nicholas Marriott
3a4f3ee087 Mask off flags bits in menu keys. 2020-05-15 16:17:20 +01: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
e6b17e77db C-M-S keys need the implied flag also. 2020-05-15 15:11:08 +01:00
Nicholas Marriott
e23c73457a Stop at end of buffer. 2020-05-15 15:05:49 +01:00
Nicholas Marriott
3e60ab1caf Send conventional \033 sequences for keys with just Meta even if they came in
as an extended CSI u key sequence. It is much more useful for applications that
don't understand CSI u to receive \033> for M-S-. rather than \033[62;3u.
2020-05-15 13:15:12 +01:00
Nicholas Marriott
7501e297dd Send CSI u sequences for any keys that do not have a defined sequence already -
this should only be similar sequences sent by the terminal outside tmux if
enabled.
2020-05-15 12:39:37 +01:00
Nicholas Marriott
340fd691cb Separate key flags and modifiers, log key flags, make the "xterm" flag more
explicit and fix M- keys with a leading escape.
2020-05-15 12:16:41 +01:00
Nicholas Marriott
031d4864a9 Rename KEYC_ESCAPE to KEYC_META. 2020-05-15 11:24:30 +01:00
Nicholas Marriott
2cf967ee67 Always set xterm flag. 2020-05-15 11:20:12 +01:00
Nicholas Marriott
e95b644139 Recognise extended key sequences on input (both the forms xterm offers). 2020-05-15 11:09:32 +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
c4d8100b2f Draw outside correctly with pane numbers. 2020-05-14 16:58:14 +01:00
Nicholas Marriott
bef70132ac Check if outside the window before checking if on the border so that cells that
are outside in one direction but not the other are not given the wrong type.
2020-05-14 16:53:04 +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
97c8374855 Tweak CHANGES. 2020-05-14 14:07:26 +01:00
Nicholas Marriott
4dc0f3ee6b Update CHANGES. 2020-05-14 14:01:32 +01:00
Nicholas Marriott
09a66451ce Add screen write flags instead of individual bits and fix line length
calculation with padding.
2020-05-14 13:18:05 +01:00
Nicholas Marriott
0bdbf47ef9 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-14 11:18:19 +01:00
Nicholas Marriott
12eceaf2b3 Expand target from client and use it to expand the prompt. 2020-05-14 10:35:26 +01:00