Commit Graph

4097 Commits

Author SHA1 Message Date
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
nicm
aa7dccf8e1 imsg.h needs uio.h, pointed out by deraadt 2020-05-08 14:15:11 +00:00
nicm
048f1ff18a Do not remove the automatic-rename option from the global set, only from
the window (it must stay in the global set or tmux will crash). GitHub
issue 2188.
2020-04-30 13:31:22 +00:00
nicm
1574126e8a Do not close the stdout file descriptor in control mode as it will be
needed for printing the exit messages. Fixes a bug when detaching with
iTerm2.
2020-04-27 08:35:09 +00:00
jmc
18886cb510 ce examples of "Ar arg Ar arg" with "Ar arg arg" and stop the spread; 2020-04-23 21:28:09 +00:00
nicm
766b425d05 Overrides need to be applied both before and after features in case they
change flags used to detect a feature.
2020-04-23 10:22:53 +00:00
nicm
e25fa4ba1b 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
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
e46cf86d30 Improve join-pane, move-pane and break-pane:
- There is no need for join-pane and move-pane to be different.
- break-pane can just behave like move-window if the source has only one
  pane, instead of failing.
- Add -a to break-pane like move-window.

Also add missing man page bits for previous window-tree.c changes.

GitHub issue 2176.
2020-04-22 21:15:33 +00:00
nicm
4b21fd2ed1 Indicate the marked pane in choose mode in reverse and add key to set
and clear it (m and M) and a key to jump to the starting pane (H).
2020-04-22 21:01:28 +00:00
nicm
950af33636 Improve join-pane, move-pane and break-pane:
- There is no need for join-pane and move-pane to be different.
- break-pane can just behave like move-window if the source has only one
  pane, instead of failing.
- Add -a to break-pane like move-window.

Also add missing man page bits for previous window-tree.c changes.

GitHub issue 2176.
2020-04-22 21:15:33 +00:00
nicm
899b3d2436 Indicate the marked pane in choose mode in reverse and add key to set
and clear it (m and M) and a key to jump to the starting pane (H).
2020-04-22 21:01:28 +00:00
nicm
662728d6c7 Add a session_marked format like window_marked. 2020-04-22 20:47:00 +00:00
nicm
4b5a16567a Update the cursor position when deleting lines from screens without
history, GitHub issue 2173.
2020-04-22 08:48:44 +00:00
nicm
5935100181 Change so main-pane-width and height can be given as a percentage. 2020-04-22 06:57:13 +00:00
nicm
b72498c4ff Update the cursor position when deleting lines from screens without
history, GitHub issue 2173.
2020-04-22 08:48:44 +00:00
nicm
de5163a634 Change so main-pane-width and height can be given as a percentage. 2020-04-22 06:57:13 +00:00
nicm
445dfa8512 Move the background colour to clear with (if any) up as well as the data
when scrolling, redraw problem reported by sthen@.
2020-04-21 13:48:56 +00:00
nicm
9a60d41db4 256 and RGB features can imply AX (for aixterm colours). 2020-04-21 10:37:11 +00:00
nicm
18671a27b6 Turn off the block flag to reset the state or the cursor will not be
moved back to the right place.
2020-04-21 06:34:13 +00:00
nicm
d524cb64e7 Do not clear client pane redraw flags until the redraw actually happens. 2020-04-21 06:32:40 +00:00
nicm
bd91015b13 256 and RGB features can imply AX (for aixterm colours). 2020-04-21 10:37:11 +00:00
nicm
57bd6e0447 Turn off the block flag to reset the state or the cursor will not be
moved back to the right place.
2020-04-21 06:34:13 +00:00
nicm
d0b8f5340e Do not clear client pane redraw flags until the redraw actually happens. 2020-04-21 06:32:40 +00:00
nicm
1cabccbb2b xterm* needs XT also. 2020-04-21 05:26:13 +00:00
nicm
4a5182e665 Always start sync for output in panes that are not the active pane. 2020-04-20 15:49:05 +00:00
nicm
117ec1b2e6 Apply terminal-overrides after terminal detection, it always takes
precedence.
2020-04-20 15:37:32 +00:00
nicm
2083a6ea20 Change how sync works to always send the end sequence after all output
is done when we are returning to the event loop (since we always move
the cursor at that point). Also a man fix from jmc.
2020-04-20 14:59:31 +00:00
nicm
135bb1edee Change the Sync capability to be a string instead of a flag. 2020-04-20 13:38:48 +00: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
nicm
86862c976a Also redraw panes which aren't pane 0. Problem reported by tb@. 2020-04-20 09:07:55 +00:00
nicm
b846ec2665 Only trim blank lines when the source pane is not the target pane,
otherwise the cursor moves which is a bit strange.
2020-04-20 06:08:37 +00:00
nicm
4bc0a83d51 Need to check for pane redrawing even if just the window flag is set
(the pane flag may not have been previously set to avoid looping the
windows).
2020-04-20 06:07:39 +00:00