Commit Graph

2193 Commits

Author SHA1 Message Date
Tiago Cunha
74e742113d Sync OpenBSD patchset 523:
Whoops, this is needed for last commit as well.
2009-11-10 23:31:21 +00:00
Tiago Cunha
e9b357550f Sync OpenBSD patchset 522:
Lookup key as a named key (eg 'Space') before checking for single character
keys, makes C-Space/M-Space etc resolve to the correct key code.
2009-11-10 23:30:26 +00:00
Tiago Cunha
38ac9bb414 Sync OpenBSD patchset 521:
Don't return 1 unless there was actually a problem (signal/lost server) rather
than for all events (normal exit/detach/etc).
2009-11-10 23:28:53 +00:00
Tiago Cunha
c01816c26d Sync OpenBSD patchset 520:
Just ignore tty fd errors rather than dying, stops the server dying if the
session is disconnected abrubtly (eg ssh ~.).
2009-11-10 23:27:57 +00:00
Tiago Cunha
36bb298bfa Sync OpenBSD patchset 519:
The input key should be a u_char. Fixes top-bit-set input problem reported by
ajacoutot@.
2009-11-10 23:27:03 +00:00
Tiago Cunha
e275bc52f2 Sync OpenBSD patchset 518:
Constify buf.
2009-11-10 23:26:13 +00:00
Nicholas Marriott
ef45c1c65b +. 2009-11-10 15:33:31 +00:00
Nicholas Marriott
c202377859 +. 2009-11-09 20:03:31 +00:00
Tiago Cunha
34b4c2e607 Sync OpenBSD patchset 517:
Don't try enable/disable the event if the window pane is dead (fd == -1), as
the event will have been freed.
2009-11-08 23:35:53 +00:00
Tiago Cunha
dcb85fe4b1 Sync OpenBSD patchset 516:
Clear to the end of the screen from the right starting point when drawing
line-by-line (in panes or if ed not supported). Fixes problem spotted by Frank
Terbeck.
2009-11-08 23:34:47 +00:00
Tiago Cunha
8fe9ecae05 Sync OpenBSD patchset 515:
Old xterm F1-F4 are \033O_P not \033[O_P.
2009-11-08 23:33:57 +00:00
Tiago Cunha
946337484e Sync OpenBSD patchset 514:
Unused variable. Aargh.
2009-11-08 23:33:17 +00:00
Tiago Cunha
181e1cc711 Sync OpenBSD patchset 513:
Switch the tty key tree over to an (unbalanced) ternary tree which allows
partial matches to be done (they wait for further data or a timer to expire,
like a naked escape).

Mouse and xterm-style keys still expect to be atomic.
2009-11-08 23:32:39 +00:00
Tiago Cunha
f18b224983 Sync OpenBSD patchset 512:
key_string_lookup_key uses a static buffer, so copy its output into the working
buffer before calling the command print function which can also use it (eg
send-keys).
2009-11-08 23:30:42 +00:00
Tiago Cunha
7d288e7fd8 Sync OpenBSD patchset 511:
Key flags are only used for initialisation so they are not needed in the main
tty_key struct.
2009-11-08 23:29:34 +00:00
Tiago Cunha
fb22aaf87f Sync OpenBSD patchset 510:
EVLOOP_ONCE takes care of the wakeup, so no need to call event_loopexit(NULL).
2009-11-08 23:28:40 +00:00
Tiago Cunha
5ac6ea61bd Sync OpenBSD patchset 509:
Now all timers are events, there is no longer any need to wake up every 50 ms -
only wake up when an event happens.
2009-11-08 23:27:58 +00:00
Tiago Cunha
66957412d5 Sync OpenBSD patchset 508:
Switch tty key input over to happen on a read event. This is a bit more
complicated because of escape input, but in that case instead of processing a
key immediately, schedule a timer and reprocess the bufer when it expires.

This currently assumes that keys will be atomic (ie that if eg F1 is pressed
the entire sequence is present in the buffer). This is usually but not always
true, a change in the tree format so it can differentiate potential (partial)
key sequences will happens soon and will allow this to be fixed.
2009-11-08 23:26:56 +00:00
Tiago Cunha
ac6092c27f Sync OpenBSD patchset 507:
Convert the key repeat timer to an event.
2009-11-08 23:24:59 +00:00
Tiago Cunha
81336d6bb0 Make it compile on the portable version. 2009-11-08 23:23:36 +00:00
Tiago Cunha
ab38d91913 Sync OpenBSD patchset 506:
Change window name change to use a timer event rather than a gettimeofday()
check every loop.
2009-11-08 23:22:24 +00:00
Tiago Cunha
915031b049 Sync OpenBSD patchset 505:
Move status timer check into the global once-per-second timer, this could maybe
be done better but one every second is better than once every 50 ms.
2009-11-08 23:12:35 +00:00
Tiago Cunha
02438c01b7 Sync OpenBSD patchset 504:
Use timeout events for the identify and message timers.
2009-11-08 23:11:23 +00:00
Tiago Cunha
bee17719d8 Sync OpenBSD patchset 503:
Don't reenlist the client imsg event every loop, instead have a small function
to it and call it after the event triggers or after a imsg is added.
2009-11-08 23:09:36 +00:00
Tiago Cunha
0cd4f4e321 Sync OpenBSD patchset 502:
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-08 23:08:12 +00:00
Tiago Cunha
3acb995ef3 Sync OpenBSD patchset 501:
Move some common code into a function.
2009-11-08 23:07:14 +00:00
Tiago Cunha
40b6941c0f Sync OpenBSD patchset 500:
Tell the client to exit on configuration file error.
2009-11-08 23:06:25 +00:00
Tiago Cunha
142962742c Sync OpenBSD patchset 499:
Bye-bye buffer*.c.
2009-11-08 23:05:36 +00:00
Tiago Cunha
2df0882722 Sync OpenBSD patchset 498:
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-08 23:02:56 +00:00
Tiago Cunha
70b2f1981e Sync OpenBSD patchset 497:
Call event_init() before loading the config file, since potentially it could
set up events.
2009-11-08 23:00:44 +00:00
Tiago Cunha
cb0bf6a043 Sync OpenBSD patchset 496:
Switch window pane pipe redirect fd over to a bufferevent.
2009-11-08 22:59:53 +00:00
Tiago Cunha
971a7b2fe0 Sync OpenBSD patchset 495:
Switch tty fds over to a bufferevent.
2009-11-08 22:58:38 +00:00
Tiago Cunha
7851bb81f5 Sync OpenBSD patchset 494:
Add back JOB_PERSIST checks that got lost.
2009-11-08 22:56:54 +00:00
Tiago Cunha
53ef4c2bab Sync OpenBSD patchset 493:
Switch jobs over to use a bufferevent.
2009-11-08 22:56:04 +00:00
Tiago Cunha
5116aaa51a Sync OpenBSD patchset 492:
A couple of minor cosmetic changes.
2009-11-08 22:53:13 +00:00
Tiago Cunha
e41055c5aa Adjust recent libevent changes to the portable version. 2009-11-08 22:51:34 +00:00
Tiago Cunha
dd36982ad5 Sync OpenBSD patchset 491:
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-08 22:40:36 +00:00
Tiago Cunha
5ce49941fb Working on 1.2. 2009-11-05 13:18:19 +00:00
Tiago Cunha
09c34be825 Use %%VERSION%% so the Makefile can replace it by VERSION. 2009-11-05 13:13:19 +00:00
Tiago Cunha
e4b743cced Update CHANGES, and NOTES for the 1.1 release. 2009-11-05 12:35:47 +00:00
Tiago Cunha
9128b7df7f Bump VERSION. 2009-11-05 12:32:46 +00:00
Tiago Cunha
90d4cbe67e Prepare the tree for the 1.1 release. 2009-11-05 12:30:55 +00:00
Tiago Cunha
625348122c Sync OpenBSD patchset 490:
Unused (but assigned to) variable, found by lint.
2009-11-04 23:12:32 +00:00
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
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
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
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