Commit Graph

7902 Commits

Author SHA1 Message Date
Tiago Cunha 27c2b98f5f Sync OpenBSD patchset 489:
Ignore the colour on space, /not/ the attributes.
2009-11-04 23:10:43 +00:00
Tiago Cunha 344a241c28 Sync OpenBSD patchset 488:
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 23:09:48 +00:00
Tiago Cunha fdda6ef8bd Adjust OpenBSD patchset 487 to the portable version, and while there drop
malloc_options on DragonFlyBSD, and FreeBSD.
2009-11-04 23:09:09 +00:00
Nicholas Marriott 6a6a42aa3a It would help if I read my own comments... make alt keys work again by sending
alt AND the key not alt instead of it.
2009-11-04 23:00:22 +00:00
Nicholas Marriott 862fe15c32 Move some common code into a function. 2009-11-04 22:57:49 +00:00
Tiago Cunha c78426f033 Sync OpenBSD patchset 487:
Change declaration and use of malloc_options to be more standard, from Tim van
der Molen.
2009-11-04 22:49:27 +00:00
Nicholas Marriott fde36fccc3 Tell the client to exit on configuration file error. 2009-11-04 22:47:34 +00:00
Tiago Cunha 9e208584ed Sync OpenBSD patchset 486:
Don't backoff based on suspended or deda clients as they are always likely to
have data backed up.
2009-11-04 22:47:29 +00:00
Tiago Cunha 5be38f2b3a Sync OpenBSD patchset 485:
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-04 22:46:25 +00:00
Nicholas Marriott 5bebbd81d7 Bye-bye buffer*.c. 2009-11-04 22:44:53 +00:00
Tiago Cunha b7fc4f3760 Sync OpenBSD patchset 484:
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-04 22:44:01 +00:00
Nicholas Marriott a02c7e804c Convert the window pane (pty master side) fd over to use a bufferevent.
The evbuffer API is very similar to the existing tmux buffer API so this was
remarkably painless. Not many possible ways to do it, I suppose.
2009-11-04 22:43:11 +00:00
Tiago Cunha bbad75fb6c Sync OpenBSD patchset 483:
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-04 22:42:31 +00:00
Nicholas Marriott 06ffed3216 Call event_init() before loading the config file, since potentially it could
set up events.
2009-11-04 22:40:36 +00:00
Tiago Cunha a090b78e8d Sync OpenBSD patchset 482:
tv member of struct paste_buffer is updated but not otherwise used, so remove
it.
2009-11-04 22:39:20 +00:00
Tiago Cunha 0a4d830ee1 Sync OpenBSD patchset 481:
Fix vi page up mode key (from naddy), add missing half page keys, and sort.
2009-11-04 22:38:16 +00:00
Tiago Cunha f3b4b60aa8 Sync OpenBSD patchset 480:
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-04 22:37:18 +00:00
Nicholas Marriott 91ad830c88 Switch window pane pipe redirect fd over to a bufferevent. 2009-11-04 22:02:38 +00:00
Nicholas Marriott 7342615c7d Switch tty fds over to a bufferevent. 2009-11-04 21:47:42 +00:00
Nicholas Marriott abb728684b Add back JOB_PERSIST checks that got lost. 2009-11-04 21:10:49 +00:00
Nicholas Marriott 4d6091379b Switch jobs over to use a bufferevent. 2009-11-04 21:04:43 +00:00
Nicholas Marriott ea8c8c5f33 A couple of minor cosmetic changes. 2009-11-04 20:59:22 +00:00
Nicholas Marriott abf3a5d50e Initial changes to move tmux to libevent.
This moves the client-side loops are pretty much fully over to event-based only
(tmux.c and client.c) but server-side (server.c and friends) treats libevent as
a sort of clever poll, waking up after every event to run various things.

Moving the server stuff over to bufferevents and timers and so on will come
later.
2009-11-04 20:50:11 +00:00
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