Commit Graph

409 Commits (e7c2f53f2afe2369ececac976ef13193c1d9ed3a)

Author SHA1 Message Date
Thomas Adam 28833efb48 Merge branch 'obsd-master' 2017-04-17 10:01:13 +01:00
nicm 7461c165b5 Remove a couple of redraw flags that no longer have any effect. 2017-04-17 06:40:32 +00:00
Thomas Adam 5f662d91db Merge branch 'obsd-master'
Conflicts:
	server-client.c
	tmux.1
2017-04-06 11:10:17 +01:00
nicm 9b28200578 Give each client a name. This defaults to the tty name as before but
falls back to an alternative if the tty name is not available. This is
clearer than overloading the client ttyname member and allows us to
remove the path stored in the tty struct, it should always be the same
as the client.
2017-04-05 10:49:46 +00:00
Thomas Adam 392253f032 Merge branch 'obsd-master' 2017-03-10 00:01:16 +00:00
nicm 55e73e3612 Clear the bracket paste mode when in the command prompt. 2017-03-09 22:00:46 +00:00
Thomas Adam c5bdae466e Merge branch 'obsd-master' 2017-03-09 18:01:16 +00:00
nicm bce1dee034 Move the client identify (display-panes) code into server-client.c. 2017-03-09 17:06:35 +00:00
Thomas Adam ba3c1534e0 Merge branch 'obsd-master' 2017-02-14 20:01:12 +00:00
nicm e340df2034 Make source-file look for files relative to the client working directory
(like load-buffer and save-buffer), from Chris Pickel. Also break the
where-is-this-file code out into its own function for loadb and saveb.
2017-02-14 18:13:05 +00:00
Thomas Adam 96ad1d7779 Merge branch 'obsd-master' 2017-02-09 14:01:18 +00:00
nicm b1fa3e25e4 Break the message storage function into its own function, useful for
debugging.
2017-02-09 12:09:33 +00:00
Thomas Adam 130b77edc7 Merge branch 'obsd-master' 2017-02-08 18:01:17 +00:00
nicm 7475165cd8 Some other tidying bits. 2017-02-08 15:49:29 +00:00
Thomas Adam 6c333cc486 Merge branch 'obsd-master' 2017-02-03 14:01:13 +00:00
nicm 7d23d019c0 Add a window or pane id "tag" to each format tree and use it to separate
jobs, this means that if the same job is used for different windows or
panes (for example in pane-border-format), it will be run separately for
each pane.
2017-02-03 11:57:27 +00:00
Thomas Adam 9b1f620aa0 Merge branch 'obsd-master' 2017-02-01 12:01:18 +00:00
nicm dd0c814779 Implement "all event" (1003) mouse mode but in a way that works. The
main issue is that if we have two panes, A with 1002 and B with 1003, we
need to set 1003 outside tmux in order to get all the mouse events, but
then we need to suppress the ones that pane A doesn't want. This is easy
in SGR mouse mode, because buttons == 3 is only used for movement events
(for other events the trailing m/M marks a release instead), but in
normal mouse mode we can't tell so easily. So for that, look at the
previous event instead - if it is drag+release as well, then the current
event is a movement event.
2017-02-01 09:55:07 +00:00
Thomas Adam 780dd7ac82 Merge branch 'obsd-master' 2017-01-13 14:01:13 +00:00
Thomas Adam 2311bbd28a Merge branch 'obsd-master' 2017-01-13 12:01:12 +00:00
nicm 22a528905d Make options_get_string return const string. 2017-01-13 11:56:43 +00:00
nicm 95950bf668 Add -E to detach-client to exec a command to replace the client instead
of exiting it, useful if tmux wasn't exec'd itself. From Jenna Magius.
2017-01-13 10:12:12 +00:00
Thomas Adam 33ebb9ec39 Merge branch 'obsd-master' 2017-01-12 00:01:13 +00:00
nicm 3bb14001b9 Add some missing special keys to key_string_lookup_key, fix a mouse
check in server_client_handle_key, and tweak a comment.
2017-01-11 22:36:07 +00:00
Thomas Adam b9fa8f12d7 Merge branch 'obsd-master' 2016-12-07 10:01:12 +00:00
nicm a8f3ad4487 Make prefix work in all tables (except the prefix table). Users who want
to avoid this can set prefix to "none" and bind send-prefix
themselves. Allows C-b t be bound in the copy mode tables again, pointed
out by millert@.
2016-12-07 09:16:13 +00:00
Thomas Adam 2864a31311 Merge branch 'obsd-master' 2016-11-24 20:01:10 +00:00
nicm 6f8cedb1bc The mouse valid flag needs to be correct before we fire the dragging
callback, so move the callback outside of server_client_check_mouse and
use a new special key code to indicate it.
2016-11-24 18:45:45 +00:00
Thomas Adam a02d95a313 Merge branch 'obsd-master' 2016-11-24 16:01:11 +00:00
nicm 84319aa8f0 If in the middle of a drag, don't use an invalid key, just use
KEYC_MOUSE as a placeholder. Reported by Artem Fokin.
2016-11-24 14:38:55 +00:00
nicm 0d1be2e328 Fix so that we work out the right pane from mouse events - we were doing
so too early, before the mouse event was necessarily valid, so could end
up using the pane from the previous mouse event, or the active pane.

It is important that we use the right pane now that different panes can
have different key tables (for copy mode).

Fixes problem reported by Greg Hurrell.
2016-11-24 13:46:50 +00:00
Thomas Adam 8a8001350d Merge branch 'obsd-master' 2016-11-23 18:01:19 +00:00
nicm 6de466cf8b For mouse keys, use the mouse pane as the default current pane. 2016-11-23 17:01:24 +00:00
Thomas Adam 06fd3b00ff Merge branch 'obsd-master' 2016-11-16 12:01:11 +00:00
nicm 81f1d625af Do not stop dragging when the wheel is pressed, from Artem Fokin. 2016-11-16 11:37:16 +00:00
Thomas Adam 1afe9e98de Merge branch 'obsd-master' 2016-11-15 16:01:10 +00:00
nicm c34a79b152 Turn on margins, with a couple of fixes (only limit to the pane for line
feeds, and do not move cursor to end for full width panes).
2016-11-15 15:17:28 +00:00
nicm 0ace779cde Initial attempt to make use of left and right margins if the terminal
supports them (that is, if it advertises itself as a VT420 - probably
just xterm). These are the vertical equivalent of the scroll region and
allow much faster scrolling of panes that do not take up the full width
of the terminal.
2016-11-15 14:02:32 +00:00
Thomas Adam 28a31201d3 Merge branch 'obsd-master' 2016-10-19 12:01:11 +01:00
nicm 899e629bf0 Alerts are too slow, so rather than walking all sessions and windows,
add a link of winlinks to each window and a pointer to the session to
each winlink. Also rewrite the alerts processing to return to the old
behaviour (alert in any window sets the flag on any winlink).
2016-10-19 09:22:07 +00:00
Thomas Adam d54e990c4f Merge branch 'obsd-master' 2016-10-17 00:01:11 +01:00
nicm 41e633acf5 Use the notify name string instead of going via an enum and change
existing hooks to use notifys instead.
2016-10-16 22:06:40 +00:00
Thomas Adam 1a6e696b08 Merge branch 'obsd-master' 2016-10-16 22:01:14 +01:00
nicm b342bd0b46 Mass rename struct cmd_q to struct cmdq_item and related. 2016-10-16 19:04:05 +00:00
Thomas Adam c67b702588 Merge branch 'obsd-master' 2016-10-16 20:01:10 +01:00
nicm ddc4512d2e Rewrite command queue handling. Each client still has a command queue,
but there is also now a global command queue. Instead of command queues
being dispatched on demand from wherever the command happens to be
added, they are now all dispatched from the top level server
loop. Command queues may now also include callbacks as well as commands,
and items may be inserted after the current command as well as at the end.

This all makes command queues significantly more predictable and easier
to use, and avoids the complex multiple nested command queues used by
source-file, if-shell and friends.

A mass rename of struct cmdq to a better name (cmdq_item probably) is
coming.
2016-10-16 17:55:14 +00:00
Thomas Adam 6551f4bb3b Merge branch 'obsd-master'
Conflicts:
	paste.c
2016-10-13 08:09:47 +01:00
nicm 68bebe1fb7 The repeat prompt in both emacs and vi (and the old one in tmux) doesn't
support line editing and instead executes a command as soon as a
non-number key is pressed. Add a -N flag to command-prompt for the same
in copy mode. Reported by Theo Buehler.
2016-10-12 13:03:27 +00:00
Thomas Adam b9dc855016 Merge branch 'obsd-master'
Conflicts:
	format.c
	osdep-openbsd.c
2016-10-12 09:45:49 +01:00
nicm 85d7afaefc Support double and triple clicks (they are cumulative, so double is
fired then triple), and use for select-word and select-line in copy
mode. Inspired by a different solution from Omar Sandoval.
2016-10-11 09:30:36 +00:00