Commit Graph

1145 Commits (c7a121cfc0137c907b7bfb0c3fd1bdee395af8aa)

Author SHA1 Message Date
Nicholas Marriott c7a121cfc0 Focus events can cause trouble if left on and they can't be turned off
during idle periods (like the other states are) because we'd miss
events. So add a server option to control them. Defaults to off.
2013-06-28 20:55:16 +01:00
Nicholas Marriott 828145456c Don't set TMUX_CONF in tmux.h. 2013-06-25 09:48:09 +01:00
Thomas Adam 06b5805479 Merge branch 'obsd-master' 2013-06-13 18:12:49 +01:00
Nicholas Marriott 13441e8cb8 The actual terminfo entries we ended up with for cursor changes are Cs,
Ce, Ss and Se (not Cc, Ce, Cs, Csr). So use and document these instead
of the ones we were using earlier.
2013-06-02 07:52:15 +00:00
Thomas Adam 399d7380a5 Merge branch 'obsd-master' 2013-05-31 21:44:42 +01:00
Nicholas Marriott a0cf65db77 Instead of eating 1024 bytes or so for the arguments of each command,
save memory by using an RB tree. From Tiago Cunha.
2013-05-31 12:19:34 +00:00
Thomas Adam 76cb088d16 Merge branch 'obsd-master'
Conflicts:
	tmux.h
2013-05-25 11:48:12 +01:00
Nicholas Marriott e323101ede Rename global configuration define. 2013-04-24 10:01:32 +00:00
Nicholas Marriott ce52e45d44 Merge branch 'master' of ssh://git.code.sf.net/p/tmux/tmux-code 2013-04-24 11:00:32 +01:00
Nicholas Marriott 4f3c31a6b6 Use sysconfdir for the location of global tmux.conf (but default it to /etc),
based on changes from Dagobert Michelsen.
2013-04-24 10:57:03 +01:00
Thomas Adam cd60e57b6a Merge branch 'obsd-master'
Sync from OpenBSD.
2013-04-23 08:26:04 +01:00
Nicholas Marriott 3d2b7d5bce When using choose-tree -u, start with the current window
highlighted. From Thomas Adam.
2013-04-22 22:17:29 +00:00
Thomas Adam b58bca9a72 Merge branch 'obsd-master'
Conflicts:
	tmux.c
2013-04-13 17:05:49 +01:00
Nicholas Marriott 982354765b Remove tmux's (already minimal) 88 colour support. Such terminals are
few and unnecessary.
2013-03-27 11:17:12 +00:00
Nicholas Marriott 43fb9835fa Add -P and -F to new-session. 2013-03-25 11:44:00 +00:00
Nicholas Marriott 6fee3e9e4b Rename session idx to session id throughout and add $ prefix to targets
to use it, extended from a diff from George Nachman.
2013-03-25 10:11:45 +00:00
Nicholas Marriott 410a3abbef Add a wait-for command which blocks a client on a named channel until it
is woken up again (with wait-for -S). From Thiago Padilha.
2013-03-25 10:09:05 +00:00
Nicholas Marriott 14fad6a5cc Add -A flag to new-session to make it behave like attach-session if the
session exists. If -A is used, -D behaves like -d to attach-session.
2013-03-24 09:58:40 +00:00
Nicholas Marriott 20636d956d Add a command queue to standardize and simplify commands that call other
commands and allow a command to block execution of subsequent
commands. This allows run-shell and if-shell to be synchronous which has
been much requested.

Each client has a default command queue and commands are consumed one at
a time from it. A command may suspend execution from the queue by
returning CMD_RETURN_WAIT and then resume it by calling cmd_continue() -
for example run-shell does this from the callback that is fired after
the job is freed.

When the command queue becomes empty, command clients are automatically
exited (unless attaching). A callback is also fired - this is used for
nested commands in, for example, if-shell which can block execution of
the client's cmdq until a new cmdq becomes empty.

Also merge all the old error/info/print functions together and lose the
old curclient/cmdclient distinction - a cmdq is bound to one client (or
none if in the configuration file), this is a command client if
c->session is NULL otherwise an attached client.
2013-03-24 09:54:10 +00:00
Nicholas Marriott a60687f9ba Handle focus events from the terminal, from Aaron Jensen. 2013-03-24 09:28:59 +00:00
Nicholas Marriott 7f191c7951 Add -P and -F to new-session. 2013-03-22 17:01:15 +00:00
Nicholas Marriott eaaeb28cda Add session_set_current helper function, extracted from a diff from
Aaron Jensen.
2013-03-22 16:00:26 +00:00
Nicholas Marriott 8478895eeb Add -e flag to capture-pane to include embedded ANSI SGR escape
sequences, from George Nachman.
2013-03-22 15:51:54 +00:00
Nicholas Marriott db66d85176 Fix double space in sessions template. 2013-03-22 10:38:13 +00:00
Nicholas Marriott f0efa576e0 Add resize-pane -x and -y for absolute pane size (much requested). 2013-03-22 10:37:39 +00:00
Nicholas Marriott 67b4d5b609 Support the latest theory for mouse input, this is enabled/disabled with
SM/RM 1006 and is similar in style to SGR input: \033[<b;x;yM or
\033[b;x;ym. From Egmont Koblinger.
2013-03-22 10:33:50 +00:00
Nicholas Marriott 10682b9e7e Instead of loads of little screen_write_*_on and off functions which
just change mode flags, just have screen_write_mode_set and
screen_write_mode_clear.
2013-03-21 18:47:56 +00:00
Nicholas Marriott 3665be7c44 Tidy by splitting default key tables into two. 2013-03-21 16:50:22 +00:00
Nicholas Marriott c982279950 Fix constness of cmd_template_replace, window_choose_add_item and
window_choose_add_window.
2013-03-21 16:19:25 +00:00
Nicholas Marriott 180faf73af Allow choose commands to be used outside tmux, so long as at least one
client is attached.
2013-03-21 16:09:59 +00:00
Nicholas Marriott 6ddb06d372 Extend jobs to support writing and use that for copy-pipe instead of popen,
from Chris Johnsen.
2013-03-21 14:24:33 +00:00
Nicholas Marriott c5ad47ee7c Only send end guard if begin was sent, from George Nachman. 2013-03-13 07:31:36 +00:00
Nicholas Marriott c41d92d27a Add time and a command count to control mode guards, based on code from George
Nachman.
2013-03-11 09:35:44 +00:00
Nicholas Marriott f47a063841 Rename session idx to session id throughout and add $ prefix to targets to use
it, extended from a diff from George Nachman.
2013-03-07 10:07:22 +00:00
Nicholas Marriott 7fd4d49d56 Add a wait-for command which blocks a client on a named channel until it is
wokrn up again (with wait-for -S). From Thiago Padilha.
2013-03-06 09:57:26 +00:00
Nicholas Marriott aaeee34c32 Preserve trailing spaces with capture-pane -J, from George Nachman. 2013-03-04 11:03:03 +00:00
Nicholas Marriott f339cfd315 Add -A flag to new-session to make it behave like attach-session if the session
exists. If -A is used, -D behaves like -d to attach-session.
2013-02-24 00:43:28 +00:00
Nicholas Marriott c5239c5984 Add resize-pane -Z to temporary zoom the active pane to occupy the full window
or unzoom (restored to the normal layout) if it already zoomed, bound to C-b z
by default. The pane is unzoomed on pretty much any excuse whatsoever.

We considered making this a new layout but the requirements are quite different
from layouts so decided it is better as a special case. Each current layout
cell is saved, a temporary one-cell layout generated and all except the active
pane set to NULL.

Prompted by suggestions and scripts from several. Thanks to Aaron Jensen and
Thiago Padilha for testing an earlier version.
2013-02-24 00:25:03 +00:00
Nicholas Marriott 3964309c67 Add a command queue to standardize and simplify commands that call other
commands and allow a command to block execution of subsequent commands. This
allows run-shell and if-shell to be synchronous which has been much requested.

Each client has a default command queue and commands are consumed one at a time
from it. A command may suspend execution from the queue by returning
CMD_RETURN_WAIT and then resume it by calling cmd_continue() - for example
run-shell does this from the callback that is fired after the job is freed.

When the command queue becomes empty, command clients are automatically exited
(unless attaching). A callback is also fired - this is used for nested commands
in, for example, if-shell which can block execution of the client's cmdq until
a new cmdq becomes empty.

Also merge all the old error/info/print functions together and lose the old
curclient/cmdclient distinction - a cmdq is bound to one client (or none if in
the configuration file), this is a command client if c->session is NULL
otherwise an attached client.
2013-02-23 22:25:58 +00:00
Nicholas Marriott ee0f8adfac Handle focus events from the terminal, from Aaron Jensen. 2013-02-23 10:01:34 +00:00
Nicholas Marriott 3a2e9d805a Fix error reporting for client commands by adding a flag to cmd_find_client to
tell it whether or not to show errors, sometimes it's needed and sometimes not.
2013-02-22 23:04:53 +00:00
Nicholas Marriott 1994ae4640 Missing PANE_RESIZE define. 2013-02-22 21:47:34 +00:00
Nicholas Marriott 4c9f9438ff Add support for focus notifications when tmux pane changes, based on work by
Aaron Jensen.
2013-02-22 07:23:11 +00:00
Nicholas Marriott 8c50f625b0 Add session_set_current helper function, extracted from a diff from Aaron
Jensen.
2013-02-21 16:54:13 +00:00
Nicholas Marriott b8b5631d9d Add -C and -J to capture pane to escape control sequences and to join wrapped
line, based on a diff from George Nachman.
2013-02-21 09:35:01 +00:00
Nicholas Marriott afd5e978cf Need to set clients in context before changing their reference count. 2013-02-20 10:25:15 +00:00
Nicholas Marriott c3859d1df1 Add copy-pipe mode command to copy selection and also pipe to a command. 2013-02-19 17:49:53 +00:00
Nicholas Marriott 4d1d4d6e8e Add -e flag to capture-pane to include embedded ANSI SGR escape sequences, from
George Nachman.
2013-02-19 09:55:02 +00:00
Nicholas Marriott 293e331d69 Add functions to allocate and free command contexts rather than doing it all on
the stack.
2013-02-18 23:20:21 +00:00
Nicholas Marriott 44452823b7 Fix double space in sessions template. 2013-02-18 17:12:58 +00:00