Commit Graph

1417 Commits

Author SHA1 Message Date
Nicholas Marriott
0c969a7dfd Handle no client better in display-message. 2013-03-25 11:42:01 +00:00
Nicholas Marriott
111d993e75 When only two panes in a window, only draw half the separating line as
active.
2013-03-25 11:41:49 +00:00
Nicholas Marriott
0ef24f9912 Only send end guard if begin was sent, from George Nachman. 2013-03-25 11:41:16 +00:00
Nicholas Marriott
87fe1c0b0e Include prefix on ids, from George Nachman. 2013-03-25 11:40:54 +00:00
Nicholas Marriott
114d822d27 Don't zoom windows with one pane, from Romain Francoise. 2013-03-25 11:39:11 +00:00
Nicholas Marriott
88b92df849 We ignore SIGWINCH until ready, so send a MSG_RESIZE immediately when
becoming ready.
2013-03-25 11:38:57 +00:00
Nicholas Marriott
e4c0730bf1 Use single stdout and stderr for control clients. 2013-03-25 11:36:59 +00:00
Nicholas Marriott
8a40e10d55 Add time and a command count to control mode guards, based on code from
George Nachman.
2013-03-25 11:35:55 +00:00
Nicholas Marriott
e0961dfdf4 Fix handling of short (< 4 character) checksums and a bug with parsing
old-style custom layouts. Based on fix from Chris Johnsen.
2013-03-25 11:35:30 +00:00
Nicholas Marriott
446fb0cb9c Do not redraw panes if invisible. 2013-03-25 10:12:01 +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
748acdc77c Add wait-for -L and -U for lock and unlock, from Thiago Padilha. 2013-03-25 10:09:35 +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
304336a591 Allow lastgc to be NULL in grid_string_cells so find-window doesn't
crash, problem reported by eugene everson.
2013-03-25 10:07:40 +00:00
Nicholas Marriott
35452b3e55 Do not leak command in formats, from Romain Francoise. 2013-03-25 10:07:21 +00:00
Nicholas Marriott
ebd9c615c8 Add some additional debug logging. 2013-03-25 10:06:13 +00:00
Nicholas Marriott
e9cef8bf30 Continue the parent cmdq after sourcing a file. 2013-03-25 10:05:58 +00:00
Nicholas Marriott
e85f764f23 Preserve trailing spaces with capture-pane -J, from George Nachman. 2013-03-25 10:05:35 +00:00
Nicholas Marriott
e2e85650ac tty.path can be NULL, don't dereference it. From George Nachman. 2013-03-25 10:04:44 +00:00
Nicholas Marriott
2c14a771a8 Remove some unused/unnecessary control notifications, from George Nachman. 2013-03-25 10:04:23 +00:00
Nicholas Marriott
d39b1a87a5 Add -q flags to shut up errors to capture-pane and show-options, from
George Nachman.
2013-03-25 10:04:04 +00:00
Nicholas Marriott
62db3c8efe Send DSC 1000p at the beginning of a -CC client's lifetime and ST and
the end, from George Nachman.
2013-03-25 10:03:24 +00:00
Nicholas Marriott
efa06643b0 Remove previous. 2013-03-25 10:03:00 +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
c71844de63 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-03-24 09:57:59 +00:00
Nicholas Marriott
a05b8c4143 Add a -o option to set-option to prevent setting an option already set,
from Thiago Padilha.
2013-03-24 09:55:02 +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
66edb3392b Expand format variables in the run-shell and if-shell shell commands,
from Thiago Padilha.
2013-03-24 09:33:35 +00:00
Nicholas Marriott
86adcd4b26 Add pane_tabs format to format_window_pane based on code from George
Nachman.
2013-03-24 09:29:40 +00:00
Nicholas Marriott
a60687f9ba Handle focus events from the terminal, from Aaron Jensen. 2013-03-24 09:28:59 +00:00
Nicholas Marriott
bb8457b166 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-03-24 09:27:19 +00:00
Nicholas Marriott
3eae71b5b2 Do pane resize ioctls once at the end of the server loop rather than
immediately.
2013-03-24 09:25:04 +00:00
Nicholas Marriott
8094e82287 Add option command-prefix which is automatically prepended to any
command (apart from a naked default-shell). The default is "exec ".
2013-03-24 09:21:27 +00:00
Nicholas Marriott
1ec4354998 Add support for focus notifications when tmux pane changes, based on
work by Aaron Jensen.
2013-03-24 09:18:16 +00:00
Nicholas Marriott
ac1fe83596 Couple of fixes pointed out by jmc. 2013-03-22 18:45:36 +00:00
Nicholas Marriott
702ab8bab0 Add a load of miscellaneous pane formats, from George Nachman. 2013-03-22 16:03:35 +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
295d86911e Add -C and -J to capture pane to escape control sequences and to join
wrapped line, based on a diff from George Nachman.
2013-03-22 15:56:11 +00:00
Nicholas Marriott
c519f9a84c evbuffer_readline returns allocated storage, don't leak it. 2013-03-22 15:55:22 +00:00
Nicholas Marriott
2243cfbe75 Need to set clients in context before changing their reference count. 2013-03-22 15:54:29 +00:00
Nicholas Marriott
d644e5143f Fix so capture-pane/save-buffer can work in control clients, from George
Nachman.
2013-03-22 15:53:24 +00:00
Nicholas Marriott
58932295fc Add copy-pipe mode command to copy selection and also pipe to a command. 2013-03-22 15:52:40 +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
8a6fbfa148 Don't use a target-client for stdout, just always cmdclient. 2013-03-22 15:51:15 +00:00
Nicholas Marriott
a1722d5c2e Remove unnecessary initializers of cmd_ctx. 2013-03-22 15:50:42 +00:00
Nicholas Marriott
0ff9275ad7 load_cfg can actually use the same context now they are reference counted. 2013-03-22 15:50:13 +00:00
Nicholas Marriott
d1e6ce2672 Add functions to allocate and free command contexts rather than doing it
all on the stack.
2013-03-22 15:49:55 +00:00
Nicholas Marriott
29613f2f31 Prevent lock on control clients, not on others. 2013-03-22 10:42:55 +00:00
Nicholas Marriott
8c545bbfa8 Don't try to print unterminated strings when loading configuration file. 2013-03-22 10:41:57 +00:00
Nicholas Marriott
f19836550b Unbreak line wrapping. 2013-03-22 10:41:01 +00:00