Commit Graph

5372 Commits

Author SHA1 Message Date
nicm
bf635e7741 Rewrite of tmux mouse support which was a mess. Instead of having
options for "mouse-this" and "mouse-that", mouse events may be bound as
keys and there is one option "mouse" that turns on mouse support
entirely (set -g mouse on).

See the new MOUSE SUPPORT section of the man page for description of the
key names and new flags (-t= to specify the pane or window under mouse
as a target, and send-keys -M to pass through a mouse event).

The default builtin bindings for the mouse are:

    bind -n   MouseDown1Pane select-pane -t=; send-keys -M
    bind -n MouseDown1Status select-window -t=
    bind -n   MouseDrag1Pane copy-mode -M
    bind -n MouseDrag1Border resize-pane -M

To get the effect of turning mode-mouse off, do:

    unbind -n MouseDrag1Pane
    unbind -temacs-copy MouseDrag1Pane

The old mouse options are now gone, set-option -q may be used to
suppress warnings if mixing configuration files.
2015-04-19 21:34:21 +00:00
nicm
ee123c2489 Support setting the default window and pane background colours (window
and active pane via window-style and window-active-style options, an
individual pane by a new select-pane -P flag). From J Raynor.
2015-04-19 21:05:27 +00:00
Nicholas Marriott
24c8f523eb +. 2015-04-19 19:40:12 +01:00
Nicholas Marriott
aaad44bbe7 +. 2015-04-19 19:34:58 +01:00
Thomas Adam
370cf75458 Merge branch 'obsd-master' 2015-04-19 14:44:56 +01:00
nicm
4a7587931c Fix some issues in bright colour handling. Bold background doesn't exist
so there is no reason for tty_check_bg to mess with the BRIGHT flag at
all, ever. Also use aixterm colours for 256-to-16 translation if the
terminal supports them. And there is no reason for tty_colours_bg to
worry about whether the terminal supports them - tty_check_bg has
already taken care of it.
2015-04-15 22:34:46 +00:00
nicm
eec27f9257 Use tty_term_flag not _has for flags, also fix a typo (position not
permission).
2015-04-15 22:10:13 +00:00
nicm
f922920609 Fix setting old-style window -fg/-bg/-attr options that aren't global. 2015-04-15 15:44:40 +00:00
nicm
0cd55eb1e7 Add a -x flag to copy-selection, append-selection and start-named-buffer
to prevent it exiting copy mode after copying. From J Raynor with a few
tweaks by me.
2015-04-10 16:00:08 +00:00
nicm
009a5e4213 in the case -> in this case. 2015-04-10 07:23:14 +00:00
nicm
6920be311b When replacing, don't free the old paste until after the new one's name
has been copied. Fixes a use-after-free in window-copy.c. Bug reported
by J Raynor (who also provided a different fix).
2015-04-07 13:06:22 +00:00
nicm
3aa72b42b2 Add a helper function to convert time, and add session_activity formats
(the latter from Takatoshi Matsumoto).
2015-03-31 17:58:36 +00:00
nicm
02df86079b Fix some format specifier nits, from Ben Boeckel. 2015-03-31 17:45:10 +00:00
Nicholas Marriott
5e956f1148 Make place const to avoid a warning, from Ben Boeckel. 2015-03-31 09:26:37 +01:00
nicm
cd9ccbc1e9 set-titles-string now uses formats, not the status bits (so no #() for
now). Reported by landry.
2015-03-11 08:17:37 +00:00
Nicholas Marriott
7536d690fd Explicitly look for cpp and egrep to avoid AC_EGREP_CPP messing up output. 2015-03-01 21:46:05 +00:00
Thomas Adam
b8aec17af1 Merge branch 'obsd-master' 2015-02-24 23:05:08 +00:00
Nicholas Marriott
f4196138ce Merge branch 'master' of ssh://git.code.sf.net/p/tmux/tmux-code 2015-02-18 22:36:53 +00:00
Nicholas Marriott
fe1aa9299e Merge branch 'tmp' 2015-02-18 22:36:31 +00:00
nicm
568f5ef3c6 When given an invalid style, don't set the option to the default. Fix
from J Raynor. Also make style_parse not alter the grid_cell when it
fails.
2015-02-18 15:32:37 +00:00
Nicholas Marriott
bafe6f5a7c Remove LocalWords. 2015-02-16 17:19:37 +00:00
Thomas Adam
be6dc83277 Revert "Add -Wno-format-nonliteral to Makefile.am"
Oh well.  This will hide legitimate programming errors, which I knew, so I'll
just have to accept that when looking through the compiler output.

This reverts commit c2bbaab2ac.
2015-02-15 21:19:51 +00:00
Thomas Adam
c2bbaab2ac Add -Wno-format-nonliteral to Makefile.am
Shut GCC up about non-literal arguments to functions which make use of
placeholder expansions (printf, strftime, etc.)
2015-02-15 20:07:48 +00:00
Thomas Adam
ffb83d23e1 Merge branch 'obsd-master'
Conflicts:
	Makefile
2015-02-14 23:54:07 +00:00
nicm
4d05d88304 Take a reference to prevent cmdq being freed during the command. Can
happen to cfg_cmd_q (possibly others) when source-file recurses into
cmdq_continue. Fixes bug reported by Ismail Donmez and Theo Buehler.
2015-02-12 09:56:19 +00:00
nicm
9ae2284726 Merge clock-mode command into copy-mode. 2015-02-09 23:18:19 +00:00
Nicholas Marriott
b4750e4c35 Add a note about cmd_find_*. 2015-02-09 13:12:25 +00:00
nicm
1b2c62afe9 Entries in the window list can be NULL, prompted by a crash seen by Ben
Boeckel.
2015-02-09 12:47:18 +00:00
nicm
f28032b031 Check for \0 in the right place, from J Raynor. 2015-02-07 23:43:41 +00:00
nicm
52756fb3c5 Use the same time for both calls to format_expand_time. 2015-02-06 23:28:52 +00:00
Nicholas Marriott
cb018a4212 No paths.h on Solaris. 2015-02-06 23:24:44 +00:00
Thomas Adam
833fe5bdee Merge branch 'obsd-master'
Conflicts:
	cmd-pipe-pane.c
2015-02-06 19:07:43 +00:00
nicm
313f2263f8 status_replace can now become local to status.c and it no longer needs
the jobsflag argument. While here there is no need to repeat work that
format_defaults already does.
2015-02-06 17:21:08 +00:00
nicm
8d94bb67ab Use formats not status_replace for set-titles-string. 2015-02-06 17:17:12 +00:00
nicm
03758a50dc Add format_expand_time and use it instead of status_replace where
command execution is not needed.
2015-02-06 17:11:39 +00:00
nicm
83a8e1fd20 Move pane border options to window options rather than session, from Marc Finet. 2015-02-06 15:09:34 +00:00
nicm
90bf7026f6 Reset bracket paste mode on detach. 2015-02-05 11:46:57 +00:00
nicm
f1e68bfdd2 Remove a couple of now-unused variables. 2015-02-05 10:32:39 +00:00
nicm
4946f74253 Wrap all the individual format_* calls in a single format_defaults
functions.
2015-02-05 10:29:43 +00:00
nicm
e5d9ceff18 There is no need to save the guard state because the function checks it
again anyway.
2015-02-05 10:26:29 +00:00
nicm
c9642ee213 Remove two unused arguments from status_replace. 2015-02-01 23:43:23 +00:00
nicm
4e03239d1f Tidy up detach-client a bit. 2015-01-30 15:57:30 +00:00
nicm
144025e3e6 Focus off needs to be sent with tty_raw, reported by Geoff Nixon. 2015-01-30 12:33:03 +00:00
Nicholas Marriott
93c3fb78a3 has-session is now part of new-session. 2015-01-29 12:56:30 +00:00
Nicholas Marriott
51233d8b2a Merge branch 'master' of ssh://git.code.sf.net/p/tmux/tmux-code 2015-01-25 20:31:22 +00:00
nicm
adcc71d4d5 Don't leak the individual strings when copying environment. 2015-01-25 16:53:46 +00:00
Nicholas Marriott
68429cd0d3 Spaces to tabs. 2015-01-25 16:51:49 +00:00
sthen
c38f0d85da In options-table.c r1.51 an extra space was added to the default status-right,
overrunning status-right-length with long window titles. Allow for the extra
space so the last digit of the year isn't lost.  ok nicm@
2015-01-21 12:20:56 +00:00
sthen
f9c7f9a17a typo in comment ;) ok nicm 2015-01-20 10:57:10 +00:00
nicm
16bdd970dc Support blinking cursor mode, both the xterm CSI ?12 h/l and (the
backwards) screen CSI 34 h/l. From Guanpeng Xu.
2015-01-20 08:18:04 +00:00