Commit Graph

6177 Commits

Author SHA1 Message Date
Nicholas Marriott
7dbabe84e4 Missing options are not illegal. 2009-08-09 18:35:38 +00:00
Tiago Cunha
3dadb349eb Sync OpenBSD patchset 237:
zap trailing whitespace;
2009-08-09 18:02:36 +00:00
Tiago Cunha
e43ce15736 Sync OpenBSD patchset 236:
Minor language tweaks, change which key bindings are summarised.
2009-08-09 18:02:02 +00:00
Tiago Cunha
6297285527 Nuke dead variable here as well, in accordance to OpenBSD patchset 235. 2009-08-09 18:00:45 +00:00
Tiago Cunha
2c863b9f2c Sync OpenBSD patchset 235:
Nuke a dead variable found with clang and an unused declaration with lint.
2009-08-09 17:57:39 +00:00
Tiago Cunha
221ce5afb3 Sync OpenBSD patchset 234:
Move the key bindings section to near the start, mention attach/detach in the
first section, and another couple of tweaks. Based on a diff from Theo.
2009-08-09 17:55:59 +00:00
Tiago Cunha
1297c39a31 Sync OpenBSD patchset 233:
Don't leak in the (rare) case of an invalid command at the end of a file not
terminated by a \n.
2009-08-09 17:53:50 +00:00
Tiago Cunha
4c944910fa Sync OpenBSD patchset 232:
Use a temporary variable for strdup of const char *.
2009-08-09 17:52:54 +00:00
Tiago Cunha
deac1fc188 Update. 2009-08-09 17:51:19 +00:00
Tiago Cunha
29b1b2fb5e Sync OpenBSD patchset 231:
Infrastructure and commands to manage the environment for processes started
within tmux.

There is a global environment, copied from the external environment when the
server is started and each session has an (initially empty) session
environment which overrides it.

New commands set-environment and show-environment manipulate or display the
environments.

A new session option, update-environment, is a space-separated list of
variables which are updated from the external environment into the session
environment every time a new session is created - the default is DISPLAY.
2009-08-09 17:48:55 +00:00
Tiago Cunha
af3db9a4fe Sync OpenBSD patchset 230:
Tidy function a little by using a temporary variable.
2009-08-09 17:43:00 +00:00
Tiago Cunha
a26817d604 Update. 2009-08-09 17:41:46 +00:00
Tiago Cunha
167a8c9edc Sync OpenBSD patchset 229:
Options to set the colours and attributes for status-left/-right. From Thomas
Adam, thanks.
2009-08-09 17:40:17 +00:00
Tiago Cunha
97eb537f38 Sync OpenBSD patchset 227:
Add a flags member to the grid_line struct and use it to differentiate lines
wrapped at the screen edge from those terminated by a newline. Then use this
when copying to combine wrapped lines together into one.
2009-08-09 17:32:06 +00:00
Tiago Cunha
37b0bcd7c1 Sync OpenBSD patchset 226:
Change the way the grid is stored, previously it was:

- a two-dimensional array of cells;
- a two-dimensional array of utf8 data;
- an array of line lengths.

Now it is a single array of a new struct grid_line each of which represents a
line and contains the length and an array of cells and an array of utf8 data.

This will make it easier to add additional per-line members, such as flags.
2009-08-09 17:28:24 +00:00
Tiago Cunha
5b56ea1816 Sync OpenBSD patchset 225:
If there is an error in the configuration file, don't just exit(1) as this can
cause the client to hang. Instead, send the error message, then mark the client
as bad and start a normal shutdown so the server exits once the error is
written.

This also allows some code duplicating daemon(3) to be trimmed and logging to
begin earlier.

Prompted by Theo noticing the behaviour on error wasn't documented.
2009-08-09 17:19:18 +00:00
Tiago Cunha
602aae7839 Sync OpenBSD patchset 224:
Move introduction section up into description. From jmc.
2009-08-09 16:59:35 +00:00
Tiago Cunha
05eb4ece44 Sync OpenBSD patchset 223:
Using the alternative screen (smcup/rmcup) should also preserve the current
colours and attributes. Found thanks to a report from Taylor Venable.

While here also nuke a couple of extra blank lines.
2009-08-09 16:57:49 +00:00
Tiago Cunha
5840c3e13a Sync OpenBSD patchset 222:
tweak INTRODUCTION; from nicm and myself (jmc)
2009-08-09 16:54:46 +00:00
Tiago Cunha
cd5294dfb4 Sync OpenBSD patchset 221:
Clear the codes array earlier as tty_term_free could be called on error.
2009-08-09 16:52:06 +00:00
Tiago Cunha
88b83be07b Sync OpenBSD patchset 220:
If colours are not supported by the terminal, try to emulate a coloured
background by setting or clearing the reverse attribute.

This makes a few applications which don't use the reverse attribute themselves
a little happier, and allows the status, message and mode options to have
default attributes and fg/bg options that work as expected when set as reverse.
2009-08-09 16:50:57 +00:00
Tiago Cunha
65a28912eb Sync OpenBSD patchset 219:
Add a -a flag to set-option and set-window-option to append to an existing
string value, useful for terminal-overrides.
2009-08-09 16:48:34 +00:00
Tiago Cunha
d8a2ceea43 Sync OpenBSD patchset 217:
Show the bell/activity/current status and the window title in the choice list.
2009-08-09 16:41:17 +00:00
Tiago Cunha
c32ca6a8e6 Sync OpenBSD patchset 216:
Check for "UTF8" as well as "UTF-8" in LANG etc as it seems this may also
appear.
2009-08-09 16:39:40 +00:00
Tiago Cunha
c9f55c1063 Make similar (untested) changes to the OS-dependent code for FreeBSD, and
NetBSD in accordance to OpenBSD patchset 214.
2009-08-09 16:37:05 +00:00
Tiago Cunha
1127a290f4 Sync OpenBSD patchset 214:
Split the comparison into a function to make this code smaller and more
understandable.
2009-08-09 16:08:12 +00:00
Jason McIntyre
de73fed73d zap trailing whitespace; 2009-08-09 16:03:05 +00:00
Tiago Cunha
bd5cf2e809 Update. 2009-08-09 15:58:09 +00:00
Tiago Cunha
9002e60adf Sync OpenBSD patchset 213:
Don't try to free old string values (and crash) when they are overridden unless
they were actually found in the source terminal description. Reported by jmc.
2009-08-09 15:57:13 +00:00
Tiago Cunha
bd2fe4ce9b Make it build on the remaining operating systems, due to the changes
introduced on OpenBSD patchset 211.
2009-08-09 15:53:02 +00:00
Tiago Cunha
e6d5633671 DragonFlyBSD, FreeBSD, and NetBSD do not need vis.c. 2009-08-09 15:48:03 +00:00
Tiago Cunha
e098f7b285 Add unvis(3) compat stuff. 2009-08-09 15:39:41 +00:00
Tiago Cunha
3deb17e841 Do not include vis.h directly, since it's OS-dependent. 2009-08-09 15:29:54 +00:00
Tiago Cunha
15f6a41a75 Sync OpenBSD patchset 211:
Add a terminal-overrides session option allowing individual terminfo(5) entries
to be overridden. The 88col/256col checks are now moved into the default
setting and out of the code.

Also remove a couple of old workarounds for xterm and rxvt which are no longer
necessary (tmux can emulate them if missing).
2009-08-09 15:26:24 +00:00
Nicholas Marriott
d7de29e1e5 Minor language tweaks, change which key bindings are summarised. 2009-08-09 15:25:56 +00:00
Nicholas Marriott
ad18e45206 Nuke a dead variable found with clang and an unused declaration with lint. 2009-08-09 15:17:50 +00:00
Nicholas Marriott
57381aa560 Move the key bindings section to near the start, mention attach/detach in the
first section, and another couple of tweaks. Based on a diff from Theo.
2009-08-09 14:35:15 +00:00
Tiago Cunha
75b6736cf4 Sync OpenBSD patchset 210:
Fix checking of setupterm(3) error codes. While there include the
name of the terminal type causing the error where relevant. ok nicm@.
2009-08-09 12:06:25 +00:00
Nicholas Marriott
b3107d26df Don't leak in the (rare) case of an invalid command at the end of a file not
terminated by a \n.
2009-08-09 08:34:17 +00:00
Nicholas Marriott
05f1680efa Use a temporary variable for strdup of const char *. 2009-08-08 21:54:26 +00:00
Nicholas Marriott
6491274f60 Infrastructure and commands to manage the environment for processes started
within tmux.

There is a global environment, copied from the external environment when the
server is started and each sesssion has an (initially empty) session
environment which overrides it.

New commands set-environment and show-environment manipulate or display the
environments.

A new session option, update-environment, is a space-separated list of
variables which are updated from the external environment into the session
environment every time a new session is created - the default is DISPLAY.
2009-08-08 21:52:43 +00:00
Nicholas Marriott
e985629440 Tidy function a little by using a temporary variable. 2009-08-08 21:18:23 +00:00
Nicholas Marriott
80196c9abc Fix typo and add ref to infocmp. 2009-08-08 20:46:26 +00:00
Nicholas Marriott
becdf220fd Clarify 256 colours entries from Chris Jones, tweaked by me. 2009-08-08 20:42:42 +00:00
Nicholas Marriott
90f8151ffd Options to set the colours and attributes for status-left/-right. From Thomas
Adam, thanks.
2009-08-08 20:36:42 +00:00
Nicholas Marriott
92cc3a6914 Handle ttyname(3) failure better. 2009-08-08 16:05:01 +00:00
Nicholas Marriott
dcde77cd09 Update. 2009-08-08 16:03:09 +00:00
Nicholas Marriott
06ddd3dcf8 Add a flags member to the grid_line struct and use it to differentiate lines
wrapped at the screen edge from those terminated by a newline. Then use this
when copying to combine wrapped lines together into one.
2009-08-08 15:57:49 +00:00
Nicholas Marriott
5e01b6d663 Change the way the grid is stored, previously it was:
- a two-dimensional array of cells;
- a two-dimensional array of utf8 data;
- an array of line lengths.

Now it is a single array of a new struct grid_line each of which represents a
line and containts the length and an array of cells and an array of utf8 data.

This will make it easier to add additional per-line members, such as flags.
2009-08-08 13:29:27 +00:00
Nicholas Marriott
e89e70e715 If there is an error in the configuration file, don't just exit(1) as this can
cause the client to hang. Instead, send the error message, then mark the client
as bad and start a normal shutdown so the server exits once the error is
written.

This also allows some code duplicating daemon(3) to be trimmed and logging to
begin earlier.

Prompted by Theo noticing the behaviour on error wasn't documented.
2009-08-07 15:39:10 +00:00