Nicholas Marriott
5bebbd81d7
Bye-bye buffer*.c.
2009-11-04 22:44:53 +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
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
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
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
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
e8b25188ad
Missing ;. From eric@ ages ago.
2009-10-29 08:59:17 +00:00
Nicholas Marriott
dc3fdc8dc7
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-10-28 22:53:14 +00:00
Nicholas Marriott
1eaefbf169
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 08:52:36 +00:00
Nicholas Marriott
5730cbf3e3
Twaek this slightly to avoid confusing use of flags variable.
2009-10-28 08:33:20 +00:00
Nicholas Marriott
eb5f4460d1
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 08:27:33 +00:00
Nicholas Marriott
37ffdff5ba
Move the poll registration functions into the server-*.c files.
2009-10-27 13:03:33 +00:00
Theo Deraadt
ed62d1263c
tabs are better; ok nicm
2009-10-26 21:42:04 +00:00
Nicholas Marriott
a8b1379ccb
Clear signal flags /before/ taking action and continue afterwards to reduce
...
chance of dropping signals. Pointed out by deraadt@.
2009-10-26 21:38:18 +00:00
Nicholas Marriott
6b804f3a4a
Call fstat() after fopen() rather than stat() before.
2009-10-26 21:25:57 +00:00
Nicholas Marriott
539c73bdb1
Reset the umask right after fopen to avoid leaving it changed on error, noticed
...
by deraadt@.
2009-10-26 21:13:06 +00:00
Nicholas Marriott
6dc6333323
Use strlcpy instead of strncpy, pointed out by deraadt.
2009-10-26 21:10:24 +00:00
Nicholas Marriott
353f2a2ad4
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-26 20:47:00 +00:00
Nicholas Marriott
53957dcbaa
Nuke accidentally-committed debugging statement.
2009-10-26 18:16:32 +00:00
Nicholas Marriott
e831649b64
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-26 17:59:46 +00:00
Nicholas Marriott
fd2ef18a70
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-26 17:46:33 +00:00
Nicholas Marriott
c92c2bfb10
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-26 16:00:51 +00:00
Nicholas Marriott
bbca6fe5b0
On second thoughts, drop the rxvt output entirely.
2009-10-26 14:30:57 +00:00
Nicholas Marriott
5cce40d4c3
Set the output code for ctrl+cursor keys correctly, and disable (comment)
...
rxvt-style output.
2009-10-26 14:27:13 +00:00
Nicholas Marriott
d0aa883e07
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-26 13:58:02 +00:00
Nicholas Marriott
fcd3b260ac
Tidy up table.
2009-10-26 13:41:46 +00:00
Nicholas Marriott
a0ec4a11ee
Drop INPUTKEY_CTRL and just handle it as part of the table.
2009-10-26 13:34:26 +00:00
Nicholas Marriott
25d2000625
Add or fix some comments.
2009-10-26 13:29:24 +00:00
Nicholas Marriott
b3604dcf83
Tidy up table.
2009-10-26 13:22:30 +00:00
Nicholas Marriott
db4452d307
Rename keypad keys to something more useful.
2009-10-26 13:13:33 +00:00