Commit Graph

6021 Commits

Author SHA1 Message Date
Nicholas Marriott
4027335fa9 Clear the codes array earlier as tty_term_free could be called on error. 2009-08-05 19:05:02 +00:00
Nicholas Marriott
e2686d8819 +IRC channel. 2009-08-05 16:39:28 +00:00
Nicholas Marriott
b2606c0421 Correct usage of termcap. 2009-08-05 16:29:50 +00:00
Nicholas Marriott
bcddddf98d 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-05 16:26:38 +00:00
Nicholas Marriott
e3e0d70c0e +PuTTY ACS from Mike Putnam. 2009-08-05 14:56:58 +00:00
Nicholas Marriott
f42a0475e4 Tweak FAQ to mention default-terminal. 2009-08-05 14:42:08 +00:00
Nicholas Marriott
12ef3ceda1 Add a -a flag to set-option and set-window-option to append to an existing
string value, useful for terminal-overrides.
2009-08-04 18:45:57 +00:00
Jason McIntyre
a0647f1616 restructure the layout of this page, moving the commands into various
subsections; lots of tweaks to come on the text

from nicm and myself
2009-08-04 18:41:28 +00:00
Nicholas Marriott
9e3bb986d5 Show the bell/activity/current status and the window title in the choice list. 2009-08-04 14:28:23 +00:00
Nicholas Marriott
93bf2a1d72 Check for "UTF8" as well as "UTF-8" in LANG etc as it seems this may also
appear.
2009-08-04 10:31:28 +00:00
Jason McIntyre
6b69b93b53 clean up some macro abuse in the commands section; 2009-08-04 07:56:38 +00:00
Nicholas Marriott
189fb08e13 Split the comparison into a function to make this code smaller and more
understandable.
2009-08-03 17:12:07 +00:00
Nicholas Marriott
ac54dee9bb 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-03 15:30:16 +00:00
Jason McIntyre
9a391b3320 tweak previous; 2009-08-03 14:34:47 +00:00
Nicholas Marriott
1673735f02 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-03 14:10:54 +00:00
Matthieu Herrb
e4bb08e1f5 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-02 20:47:35 +00:00
Tiago Cunha
a834d037bc Sync OpenBSD patchset 209:
Pass the ACS border characters through tty_get_acs so they appear correctly on
terminals which don't use the standard set.
2009-07-31 20:35:21 +00:00
Tiago Cunha
cccd072ed1 Sync OpenBSD patchset 208:
Don't leak when rollling buffers off when the paste buffer limit is reached.
2009-07-31 20:33:49 +00:00
Nicholas Marriott
5f0e688b50 Add some lines. 2009-07-31 10:58:51 +00:00
Nicholas Marriott
ec8930c144 Part of last commit, remove -lcurses. 2009-07-31 10:45:22 +00:00
Nicholas Marriott
3e46bcec93 On SUSE Linux compatibility is something that only happens to other people, so
on Linux use -lncurses instead of -lcurses.

Also use -lncurses on NetBSD because they are only now realising that
supporting the 20-year-old terminfo API in their libcurses might be nice, and
so far none of the releases do.
2009-07-31 10:44:03 +00:00
Nicholas Marriott
5d13704e04 Some Linuxes/gcc versions hide LLONG_MAX/MIN unless the compiler is told to use
C99, so use -std=c99 on Linux.
2009-07-31 10:30:40 +00:00
Nicholas Marriott
5db47ed53a Pass the ACS border characters through tty_get_acs so they appear correctly on
terminals which don't use the standard set.
2009-07-31 10:12:49 +00:00
Nicholas Marriott
52f8578984 Some stuff that is done. 2009-07-30 21:55:16 +00:00
Tiago Cunha
09c6432854 Sync OpenBSD patchset 207:
Plug some memory leaks.
2009-07-30 21:14:04 +00:00
Tiago Cunha
796bfbd7af Update. 2009-07-30 21:11:10 +00:00
Tiago Cunha
56dd5dfff4 Sync OpenBSD patchset 206:
Don't babysit people and let them try to load /dev/zero or (more useful)
/dev/null if they want.
2009-07-30 21:07:23 +00:00
Tiago Cunha
3eb77bf53f Sync OpenBSD patchset 205:
Remove some dead code found by clang.
2009-07-30 21:04:40 +00:00
Tiago Cunha
89826983eb Sync OpenBSD patchset 204:
tweak previous;
2009-07-30 21:02:35 +00:00
Tiago Cunha
697051d1fd Sync OpenBSD patchset 203:
Similar changes for server_msg_dispatch: use a switch instead of a lookup
table and merge smaller functions inline.
2009-07-30 21:01:01 +00:00
Tiago Cunha
67266dc25c Sync OpenBSD patchset 202:
There aren't many client message types or code to handle them so get rid of
the lookup table and use a switch, merge the tiny handler functions into it,
and move the whole lot to client.c.

Also change client_msg_dispatch to consume as many messages as possible and
move the call to it to the right place so it checks for signals afterwards.

Prompted by suggestions from eric@.
2009-07-30 20:57:39 +00:00
Nicholas Marriott
95caeaa5dc Don't leak when rollling buffers off when the paste buffer limit is reached. 2009-07-30 20:50:54 +00:00
Tiago Cunha
817e93ac94 Sync OpenBSD patchset 201:
Tell the server when the client gets SIGTERM so it can clean up the terminal
properly, rather than just exiting.
2009-07-30 20:50:10 +00:00
Tiago Cunha
1650b8552f Sync OpenBSD patchset 200:
Merge pane number into the target specification for pane commands. Instead of
using -p index, a target pane is now addressed with the normal -t window form
but suffixed with a period and a pane index, for example :0.2 or
mysess:mywin.1. An unadorned number such as -t 1 is tried as a pane index in
the current window, if that fails the same rules are followed as for a target
window and the current pane in that window used.

As a side-effect this now means that swap-pane can swap panes between
different windows.

Note that this changes the syntax of the break-pane, clear-history, kill-pane,
resize-pane, select-pane and swap-pane commands.
2009-07-30 20:45:20 +00:00
Nicholas Marriott
97f105cde2 Plug some memory leaks. 2009-07-30 20:41:48 +00:00
Tiago Cunha
ec1396c9ee Sync OpenBSD patchset 199:
new sentence, new line;
2009-07-30 20:33:29 +00:00
Tiago Cunha
ec3dba01b2 Sync OpenBSD patchset 198:
Add a mode-mouse option to prevent tmux taking over the mouse in choice or
copy modes.
2009-07-30 20:32:05 +00:00
Tiago Cunha
8ce1f0b047 Sync OpenBSD patchset 197:
Add an additional heuristic to work out the current session when run from the
command line. The name of all slave ptys in the server is known, so if the
client was run on a tty, look for any sessions containing that tty and use the
most recently created.

This is more reliable than looking at $TMUX if windows have been moved or
linked between sessions.
2009-07-30 20:26:20 +00:00
Tiago Cunha
6fbfcfc0d7 Sync OpenBSD patchset 196:
Rename struct hdrtype to msgtype which is a better name and can be used even
when struct hdr disappears.
2009-07-30 20:21:55 +00:00
Tiago Cunha
5a9b7b230c Sync OpenBSD patchset 195:
Taking account of the "s, 22 not 24 is the maximum length of #T in
status-right to prevent the date being cut off.
2009-07-30 20:17:25 +00:00
Nicholas Marriott
61f3fc7e4d Don't babysit people and let them try to load /dev/zero or (more useful)
/dev/null if they want.
2009-07-30 17:46:12 +00:00
Nicholas Marriott
8df3035831 Remove some dead code found by clang. 2009-07-30 17:29:12 +00:00
Jason McIntyre
6d86882ed4 tweak previous; 2009-07-30 16:59:24 +00:00
Nicholas Marriott
9f1dd4d0af Similar changes for server_msg_dispatch: use a switch instead of a lookup table
and merge smaller functions inline.
2009-07-30 16:40:12 +00:00
Nicholas Marriott
5f13bb0c3a There aren't many client message types or code to handle them so get rid of the
lookup table and use a switch, merge the tiny handler functions into it, and
move the whole lot to client.c.

Also change client_msg_dispatch to consume as many messages as possible and
move the call to it to the right place so it checks for signals afterwards.

Prompted by suggestions from eric@.
2009-07-30 16:32:12 +00:00
Nicholas Marriott
479d614884 Tell the server when the client gets SIGTERM so it can clean up the terminal
properly, rather than just exiting.
2009-07-30 16:16:19 +00:00
Nicholas Marriott
071494d8fa Merge pane number into the target specification for pane commands. Instead of
using -p index, a target pane is now addressed with the normal -t window form
but suffixed with a period and a pane index, for example :0.2 or
mysess:mywin.1. An unadorned number such as -t 1 is tried as a pane index in
the current window, if that fails the same rules are followed as for a target
window and the current pane in that window used.

As a side-effect this now means that swap-pane can swap panes between different
windows.

Note that this changes the syntax of the break-pane, clear-history, kill-pane,
resize-pane, select-pane and swap-pane commands.
2009-07-30 13:45:56 +00:00
Jason McIntyre
a87228b4ff new sentence, new line; 2009-07-30 13:31:22 +00:00
Nicholas Marriott
a419e73f7a Add a mode-mouse option to prevent tmux taking over the mouse in choice or copy
modes.
2009-07-30 07:04:50 +00:00
Nicholas Marriott
2b331084b4 Add an additional heuristic to work out the current session when run from the
command line. The name of all slave ptys in the server is known, so if the
client was run on a tty, look for any sessions containing that tty and use the
most recently created.

This is more reliable than looking at $TMUX if windows have been moved or
linked between sessions.
2009-07-29 17:03:16 +00:00