Commit Graph

10179 Commits

Author SHA1 Message Date
Nicholas Marriott f575e39b0a Unused (but assigned to) variable, found by lint. 2009-11-04 20:35:19 +00:00
Nicholas Marriott 10f58cb1bc Ignore the colour on space, /not/ the attributes. 2009-11-04 15:59:27 +00:00
Nicholas Marriott a94535f318 Fix the reverse emulation when a terminal doesn't have setab to use the correct
fg/bg (adjusted if spaces) and happen before attribute setting.
2009-11-04 13:34:26 +00:00
Nicholas Marriott d2dfbef05a Change declaration and use of malloc_options to be more standard, from Tim van
der Molen.
2009-11-04 12:41:43 +00:00
Nicholas Marriott d8332e6373 Don't backoff based on suspended or deda clients as they are always likely to
have data backed up.
2009-11-04 08:35:11 +00:00
Nicholas Marriott 0785f2872f Add an activity time for clients, like for sessions, and change session and
client lookup to pick the most recently used rather than the most recently
created - this is much more useful when used interactively and (because the
activity time is set at creation) should have no effect on source-file.

Based on a problem reported by Jan Johansson.
2009-11-03 22:40:40 +00:00
Nicholas Marriott 5761ab6b55 If it isn't available explicitly, work out the current client in a similar way
to the current session - build a list of the possibilities then pick the
newest.
2009-11-03 20:59:22 +00:00
Nicholas Marriott 5289da29ba Change session and client activity and creation time members to have more
meaningful names.

Also, remove the code to try and update the session activity time for the
command client when a command message is received as is pointless because it
des not have a session.
2009-11-03 20:29:47 +00:00
Nicholas Marriott c95f1d1ff9 tv member of struct paste_buffer is updated but not otherwise used, so remove
it.
2009-11-03 17:17:24 +00:00
Nicholas Marriott 01943062b4 Fix vi page up mode key (from naddy), add missing half page keys, and sort. 2009-11-03 06:55:49 +00:00
Tiago Cunha 012e7106de Sync OpenBSD patchset 479:
When matching the session names with -t, look for exact matches first before
trying partial matches.

Avoids problems where two ambiguous matches are present before an exact match
(eg foo1, foo2, foo would give an error on trying -tfoo), reported by Natacha
Port? natbsd at instinctive dot eu.
2009-11-02 21:42:27 +00:00
Tiago Cunha bbdf78cd97 Sync OpenBSD patchset 478:
Leftover unused variable :-/.
2009-11-02 21:41:16 +00:00
Tiago Cunha 6b4b4c78cf Sync OpenBSD patchset 477:
There isn't much point in doing lstat before connect so instead just do connect
and handle ENOENT from it which is a little tidier.
2009-11-02 21:40:44 +00:00
Tiago Cunha ee1cc9f415 Sync OpenBSD patchset 476:
Reorder slightly to tidy code.
2009-11-02 21:39:34 +00:00
Tiago Cunha 053e40572c Sync OpenBSD patchset 475:
Add a flag for jobs that shouldn't be freed after they've died and use it for
status jobs, then only kill those jobs when status-left, status-right or
set-titles-string is changed.

Fixes problems with changing options from inside #().
2009-11-02 21:38:27 +00:00
Tiago Cunha 47f69075a0 Sync OpenBSD patchset 474:
Missing setenv/showenv aliases.
2009-11-02 21:35:40 +00:00
Tiago Cunha b4beb1a5cb Sync OpenBSD patchset 473:
Missing ;. From eric@ ages ago.
2009-11-02 21:34:32 +00:00
Tiago Cunha 738489f2bb Sync OpenBSD patchset 472:
If any client currently displaying a window pane has more than 1 KB of output
buffered, don't accept any further data from the process running in the pane.

This makes tmux much more responsive when flooded with output, although other
buffers can still have an impact when running remotely.

Prompted by a query from Ranganathan Sankaralingam.
2009-11-02 21:32:52 +00:00
Nicholas Marriott d57ba5e30b +. 2009-11-02 20:24:07 +00:00
Nicholas Marriott 86182f33c3 Double the escape timer (the time after a \033 is received before tmux gives up
waiting to see if it is part of a key sequence and passes it through) to 500
ms, the previous setting was too fast. Suggested by naddy.
2009-11-02 20:18:22 +00:00
Nicholas Marriott ca24e00d75 Example from Thayer Williams. 2009-11-02 18:59:28 +00:00
Nicholas Marriott 1c853c6860 When matching the session names with -t, look for exact matches first before
trying partial matches.

Avoids problems where two ambiguous matches are present before an exact match
(eg foo1, foo2, foo would give an error on trying -tfoo), reported by Natacha
Port? natbsd at instinctive dot eu.
2009-11-02 16:24:29 +00:00
Nicholas Marriott 2a585dc4ed Leftover unused variable :-/. 2009-11-02 13:42:25 +00:00
Nicholas Marriott 42fd44f1db There isn't much point in doing lstat before connect so instead just do connect
and handle ENOENT from it which is a little tidier.
2009-11-02 13:41:25 +00:00
Nicholas Marriott 992dd86309 Reorder slightly to tidy code. 2009-11-02 12:48:44 +00:00
Nicholas Marriott 2f813ef75d Add a flag for jobs that shouldn't be freed after they've died and use it for
status jobs, then only kill those jobs when status-left, status-right or
set-titles-string is changed.

Fixes problems with changing options from inside #().
2009-11-01 23:20:37 +00:00
Nicholas Marriott 32299e4010 Missing setenv/showenv aliases. 2009-11-01 19:17:08 +00:00
Nicholas Marriott 513c1cf0c7 +-. 2009-11-01 18:48:20 +00:00
Nicholas Marriott e8b25188ad Missing ;. From eric@ ages ago. 2009-10-29 08:59:17 +00:00
Tiago Cunha d13d3a9902 Sync OpenBSD patchset 471:
Add a minor optimisatin: if the character being printed is space, don't worry
about setting the background colour or attributes (except reverse).
2009-10-28 23:17:28 +00:00
Tiago Cunha c529c02ac0 Sync OpenBSD patchset 470:
Twaek this slightly to avoid confusing use of flags variable.
2009-10-28 23:16:30 +00:00
Tiago Cunha 745fd16452 Sync OpenBSD patchset 469:
Setting SGR0 when setting the fg and bg has problems if only one of the two is
meant to be default, so rewrite the code to move this outside, move setting
colours before attributes and generally clean up.

Tested by sthen@, fixes problems he was seeing with mutt and should fix some
existing problems with (rarely) lost attributes.
2009-10-28 23:15:32 +00:00
Tiago Cunha f4514f5c60 Sync OpenBSD patchset 468:
Move the poll registration functions into the server-*.c files.
2009-10-28 23:14:15 +00:00
Tiago Cunha a5acabd923 Sync OpenBSD patchset 467:
tabs are better; ok nicm
2009-10-28 23:12:38 +00:00
Tiago Cunha e65aa04ad7 Sync OpenBSD patchset 466:
Clear signal flags /before/ taking action and continue afterwards to reduce
chance of dropping signals. Pointed out by deraadt@.
2009-10-28 23:11:07 +00:00
Tiago Cunha d0afc47bfb Sync OpenBSD patchset 465:
Call fstat() after fopen() rather than stat() before.
2009-10-28 23:10:05 +00:00
Tiago Cunha ce743b2058 Sync OpenBSD patchset 464:
Reset the umask right after fopen to avoid leaving it changed on error, noticed
by deraadt@.
2009-10-28 23:08:52 +00:00
Tiago Cunha 88bb9381b2 Sync OpenBSD patchset 463:
Use strlcpy instead of strncpy, pointed out by deraadt.
2009-10-28 23:08:04 +00:00
Tiago Cunha 876ded6dfe Sync OpenBSD patchset 462:
Don't do anything in the client callback if the client has already died to
avoid a use-after-free (the callback is used twice, once for the client itself
and once for the tty). Fixes crashes seen by Han Boetes.
2009-10-28 23:06:41 +00:00
Tiago Cunha 5a4ba76293 Sync OpenBSD patchset 461:
Nuke accidentally-committed debugging statement.
2009-10-28 23:05:43 +00:00
Tiago Cunha 31bb577075 Sync OpenBSD patchset 460:
Not all terminals swap CSI and SS3 on ctrl, so remove that.

Also mark the rxvt special-cases as such until terminfo is updated to have
kLFT5, kRIT5 etc.
2009-10-28 23:05:01 +00:00
Tiago Cunha 10aab82539 Sync OpenBSD patchset 459:
Rewrite xterm-keys code (both input and output) so that works (doesn't always
output the same modifiers, accepts all the possible input keys) and is more
understandable.
2009-10-28 23:03:51 +00:00
Tiago Cunha 1c4b7d33b1 Sync OpenBSD patchset 458:
Support the (mostly new) function key+modifier caps (kIC-kIC7). Most of these
will be caught (soon) by the xterm keys code in xterm itself but some other
descriptions such as rxvt define them as well.
2009-10-28 23:01:44 +00:00
Tiago Cunha 8ff0d06d34 Sync OpenBSD patchset 457:
On second thoughts, drop the rxvt output entirely.
2009-10-28 23:00:21 +00:00
Tiago Cunha 6cf9965e42 Sync OpenBSD patchset 456:
Set the output code for ctrl+cursor keys correctly, and disable (comment)
rxvt-style output.
2009-10-28 22:59:01 +00:00
Tiago Cunha c45a56d66b Sync OpenBSD patchset 455:
As we always put the cursor keys into application mode, assume keys sent
with CSI have ctrl.

Also add a couple of comments.
2009-10-28 22:57:55 +00:00
Tiago Cunha a8300b7a44 Sync OpenBSD patchset 454:
Tidy up table.
2009-10-28 22:56:50 +00:00
Tiago Cunha 98122860cc Sync OpenBSD patchset 453:
Drop INPUTKEY_CTRL and just handle it as part of the table.
2009-10-28 22:56:05 +00:00
Tiago Cunha dd8174f545 Sync OpenBSD patchset 452:
Add or fix some comments.
2009-10-28 22:54:54 +00:00
Tiago Cunha 5350212e53 Sync OpenBSD patchset 451:
Tidy up table.
2009-10-28 22:54:00 +00:00