Commit Graph

  • 38e13942ac Now all timers are events, there is no longer any need to wake up every 50 ms - only wake up when an event happens. Nicholas Marriott 2009-11-05 08:48:15 +00:00
  • b58bf49e91 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. Nicholas Marriott 2009-11-05 08:45:08 +00:00
  • 80444436f3 Convert the key repeat timer to an event. Nicholas Marriott 2009-11-05 00:05:00 +00:00
  • 44d6a2c435 Change window name change to use a timer event rather than a gettimeofday() check every loop. Nicholas Marriott 2009-11-04 23:54:57 +00:00
  • 946ed97273 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. Nicholas Marriott 2009-11-04 23:42:51 +00:00
  • b1264a7416 Use timeout events for the identify and message timers. Nicholas Marriott 2009-11-04 23:29:42 +00:00
  • b3c4956efe 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. Nicholas Marriott 2009-11-04 23:12:43 +00:00
  • 625348122c Sync OpenBSD patchset 490: Tiago Cunha 2009-11-04 23:12:32 +00:00
  • 27c2b98f5f Sync OpenBSD patchset 489: Tiago Cunha 2009-11-04 23:10:43 +00:00
  • 344a241c28 Sync OpenBSD patchset 488: Tiago Cunha 2009-11-04 23:09:48 +00:00
  • fdda6ef8bd Adjust OpenBSD patchset 487 to the portable version, and while there drop malloc_options on DragonFlyBSD, and FreeBSD. Tiago Cunha 2009-11-04 23:09:09 +00:00
  • 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. Nicholas Marriott 2009-11-04 23:00:22 +00:00
  • 862fe15c32 Move some common code into a function. Nicholas Marriott 2009-11-04 22:57:49 +00:00
  • c78426f033 Sync OpenBSD patchset 487: Tiago Cunha 2009-11-04 22:49:27 +00:00
  • fde36fccc3 Tell the client to exit on configuration file error. Nicholas Marriott 2009-11-04 22:47:34 +00:00
  • 9e208584ed Sync OpenBSD patchset 486: Tiago Cunha 2009-11-04 22:47:29 +00:00
  • 5be38f2b3a Sync OpenBSD patchset 485: Tiago Cunha 2009-11-04 22:46:25 +00:00
  • 5bebbd81d7 Bye-bye buffer*.c. Nicholas Marriott 2009-11-04 22:44:53 +00:00
  • b7fc4f3760 Sync OpenBSD patchset 484: Tiago Cunha 2009-11-04 22:44:01 +00:00
  • a02c7e804c Convert the window pane (pty master side) fd over to use a bufferevent. Nicholas Marriott 2009-11-04 22:43:11 +00:00
  • bbad75fb6c Sync OpenBSD patchset 483: Tiago Cunha 2009-11-04 22:42:31 +00:00
  • 06ffed3216 Call event_init() before loading the config file, since potentially it could set up events. Nicholas Marriott 2009-11-04 22:40:36 +00:00
  • a090b78e8d Sync OpenBSD patchset 482: Tiago Cunha 2009-11-04 22:39:20 +00:00
  • 0a4d830ee1 Sync OpenBSD patchset 481: Tiago Cunha 2009-11-04 22:38:16 +00:00
  • f3b4b60aa8 Sync OpenBSD patchset 480: Tiago Cunha 2009-11-04 22:37:18 +00:00
  • 91ad830c88 Switch window pane pipe redirect fd over to a bufferevent. Nicholas Marriott 2009-11-04 22:02:38 +00:00
  • 7342615c7d Switch tty fds over to a bufferevent. Nicholas Marriott 2009-11-04 21:47:42 +00:00
  • abb728684b Add back JOB_PERSIST checks that got lost. Nicholas Marriott 2009-11-04 21:10:49 +00:00
  • 4d6091379b Switch jobs over to use a bufferevent. Nicholas Marriott 2009-11-04 21:04:43 +00:00
  • ea8c8c5f33 A couple of minor cosmetic changes. Nicholas Marriott 2009-11-04 20:59:22 +00:00
  • abf3a5d50e Initial changes to move tmux to libevent. Nicholas Marriott 2009-11-04 20:50:11 +00:00
  • f575e39b0a Unused (but assigned to) variable, found by lint. Nicholas Marriott 2009-11-04 20:35:19 +00:00
  • 10f58cb1bc Ignore the colour on space, /not/ the attributes. Nicholas Marriott 2009-11-04 15:59:27 +00:00
  • 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. Nicholas Marriott 2009-11-04 13:34:26 +00:00
  • d2dfbef05a Change declaration and use of malloc_options to be more standard, from Tim van der Molen. Nicholas Marriott 2009-11-04 12:41:43 +00:00
  • d8332e6373 Don't backoff based on suspended or deda clients as they are always likely to have data backed up. Nicholas Marriott 2009-11-04 08:35:11 +00:00
  • 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. Nicholas Marriott 2009-11-03 22:40:40 +00:00
  • 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. Nicholas Marriott 2009-11-03 20:59:22 +00:00
  • 5289da29ba Change session and client activity and creation time members to have more meaningful names. Nicholas Marriott 2009-11-03 20:29:47 +00:00
  • c95f1d1ff9 tv member of struct paste_buffer is updated but not otherwise used, so remove it. Nicholas Marriott 2009-11-03 17:17:24 +00:00
  • 01943062b4 Fix vi page up mode key (from naddy), add missing half page keys, and sort. Nicholas Marriott 2009-11-03 06:55:49 +00:00
  • 012e7106de Sync OpenBSD patchset 479: Tiago Cunha 2009-11-02 21:42:27 +00:00
  • bbdf78cd97 Sync OpenBSD patchset 478: Tiago Cunha 2009-11-02 21:41:16 +00:00
  • 6b4b4c78cf Sync OpenBSD patchset 477: Tiago Cunha 2009-11-02 21:40:44 +00:00
  • ee1cc9f415 Sync OpenBSD patchset 476: Tiago Cunha 2009-11-02 21:39:34 +00:00
  • 053e40572c Sync OpenBSD patchset 475: Tiago Cunha 2009-11-02 21:38:27 +00:00
  • 47f69075a0 Sync OpenBSD patchset 474: Tiago Cunha 2009-11-02 21:35:40 +00:00
  • b4beb1a5cb Sync OpenBSD patchset 473: Tiago Cunha 2009-11-02 21:34:32 +00:00
  • 738489f2bb Sync OpenBSD patchset 472: Tiago Cunha 2009-11-02 21:32:52 +00:00
  • d57ba5e30b +. Nicholas Marriott 2009-11-02 20:24:07 +00:00
  • 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. Nicholas Marriott 2009-11-02 20:18:22 +00:00
  • ca24e00d75 Example from Thayer Williams. Nicholas Marriott 2009-11-02 18:59:28 +00:00
  • 1c853c6860 When matching the session names with -t, look for exact matches first before trying partial matches. Nicholas Marriott 2009-11-02 16:24:29 +00:00
  • 2a585dc4ed Leftover unused variable :-/. Nicholas Marriott 2009-11-02 13:42:25 +00:00
  • 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. Nicholas Marriott 2009-11-02 13:41:25 +00:00
  • 992dd86309 Reorder slightly to tidy code. Nicholas Marriott 2009-11-02 12:48:44 +00:00
  • 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. Nicholas Marriott 2009-11-01 23:20:37 +00:00
  • 32299e4010 Missing setenv/showenv aliases. Nicholas Marriott 2009-11-01 19:17:08 +00:00
  • 513c1cf0c7 +-. Nicholas Marriott 2009-11-01 18:48:20 +00:00
  • e8b25188ad Missing ;. From eric@ ages ago. Nicholas Marriott 2009-10-29 08:59:17 +00:00
  • d13d3a9902 Sync OpenBSD patchset 471: Tiago Cunha 2009-10-28 23:17:28 +00:00
  • c529c02ac0 Sync OpenBSD patchset 470: Tiago Cunha 2009-10-28 23:16:30 +00:00
  • 745fd16452 Sync OpenBSD patchset 469: Tiago Cunha 2009-10-28 23:15:32 +00:00
  • f4514f5c60 Sync OpenBSD patchset 468: Tiago Cunha 2009-10-28 23:14:15 +00:00
  • a5acabd923 Sync OpenBSD patchset 467: Tiago Cunha 2009-10-28 23:12:38 +00:00
  • e65aa04ad7 Sync OpenBSD patchset 466: Tiago Cunha 2009-10-28 23:11:07 +00:00
  • d0afc47bfb Sync OpenBSD patchset 465: Tiago Cunha 2009-10-28 23:10:05 +00:00
  • ce743b2058 Sync OpenBSD patchset 464: Tiago Cunha 2009-10-28 23:08:52 +00:00
  • 88bb9381b2 Sync OpenBSD patchset 463: Tiago Cunha 2009-10-28 23:08:04 +00:00
  • 876ded6dfe Sync OpenBSD patchset 462: Tiago Cunha 2009-10-28 23:06:41 +00:00
  • 5a4ba76293 Sync OpenBSD patchset 461: Tiago Cunha 2009-10-28 23:05:43 +00:00
  • 31bb577075 Sync OpenBSD patchset 460: Tiago Cunha 2009-10-28 23:05:01 +00:00
  • 10aab82539 Sync OpenBSD patchset 459: Tiago Cunha 2009-10-28 23:03:51 +00:00
  • 1c4b7d33b1 Sync OpenBSD patchset 458: Tiago Cunha 2009-10-28 23:01:44 +00:00
  • 8ff0d06d34 Sync OpenBSD patchset 457: Tiago Cunha 2009-10-28 23:00:21 +00:00
  • 6cf9965e42 Sync OpenBSD patchset 456: Tiago Cunha 2009-10-28 22:59:01 +00:00
  • c45a56d66b Sync OpenBSD patchset 455: Tiago Cunha 2009-10-28 22:57:55 +00:00
  • a8300b7a44 Sync OpenBSD patchset 454: Tiago Cunha 2009-10-28 22:56:50 +00:00
  • 98122860cc Sync OpenBSD patchset 453: Tiago Cunha 2009-10-28 22:56:05 +00:00
  • dd8174f545 Sync OpenBSD patchset 452: Tiago Cunha 2009-10-28 22:54:54 +00:00
  • 5350212e53 Sync OpenBSD patchset 451: Tiago Cunha 2009-10-28 22:54:00 +00:00
  • 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. Nicholas Marriott 2009-10-28 22:53:14 +00:00
  • 4f7e669271 Sync OpenBSD patchset 450: Tiago Cunha 2009-10-28 22:53:03 +00:00
  • 165538b4bd Sync OpenBSD patchset 449: Tiago Cunha 2009-10-28 22:51:55 +00:00
  • 6338fd78f7 Sync OpenBSD patchset 448: Tiago Cunha 2009-10-28 22:50:24 +00:00
  • 181f7722b3 Sync OpenBSD patchset 447: Tiago Cunha 2009-10-28 22:49:22 +00:00
  • 41863470ba Sync OpenBSD patchset 446: Tiago Cunha 2009-10-28 22:48:35 +00:00
  • c4637da860 Sync OpenBSD patchset 445: Tiago Cunha 2009-10-28 22:46:15 +00:00
  • 1eaefbf169 Add a minor optimisatin: if the character being printed is space, don't worry about setting the background colour or attributes (except reverse). Nicholas Marriott 2009-10-28 08:52:36 +00:00
  • 5730cbf3e3 Twaek this slightly to avoid confusing use of flags variable. Nicholas Marriott 2009-10-28 08:33:20 +00:00
  • 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. Nicholas Marriott 2009-10-28 08:27:33 +00:00
  • 37ffdff5ba Move the poll registration functions into the server-*.c files. Nicholas Marriott 2009-10-27 13:03:33 +00:00
  • ed62d1263c tabs are better; ok nicm Theo Deraadt 2009-10-26 21:42:04 +00:00
  • a8b1379ccb Clear signal flags /before/ taking action and continue afterwards to reduce chance of dropping signals. Pointed out by deraadt@. Nicholas Marriott 2009-10-26 21:38:18 +00:00
  • 6b804f3a4a Call fstat() after fopen() rather than stat() before. Nicholas Marriott 2009-10-26 21:25:57 +00:00
  • 539c73bdb1 Reset the umask right after fopen to avoid leaving it changed on error, noticed by deraadt@. Nicholas Marriott 2009-10-26 21:13:06 +00:00
  • 6dc6333323 Use strlcpy instead of strncpy, pointed out by deraadt. Nicholas Marriott 2009-10-26 21:10:24 +00:00
  • 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. Nicholas Marriott 2009-10-26 20:47:00 +00:00
  • 53957dcbaa Nuke accidentally-committed debugging statement. Nicholas Marriott 2009-10-26 18:16:32 +00:00
  • e831649b64 Not all terminals swap CSI and SS3 on ctrl, so remove that. Nicholas Marriott 2009-10-26 17:59:46 +00:00