Commit Graph

16 Commits

Author SHA1 Message Date
cgyarvin
285c6d2ad2
Merge pull request #928 from joemfb/ctlc-pro
forwardports #813 (show prompt after ctrl-c)
2018-02-23 10:36:05 -08:00
Joseph Bryan
4db7eb4d60 maintains cursors position on %clr 2018-02-21 23:10:41 -05:00
Joseph Bryan
23d878f0b8 show prompt after ctrl-c 2018-01-15 22:29:36 -05:00
C. Guy Yarvin
057b866b17 Add terminal printers. 2017-11-08 14:37:39 -08:00
Joseph Bryan
2b9f103a0d updates _term_it_show_clear() to use ESC[K instead of ESC[J 2016-10-19 00:00:25 -04:00
Joseph Bryan
99dde17893 removes obsolete history-eating bug-fix from _term_it_show_clear() 2016-10-19 00:00:19 -04:00
Joseph Bryan
166431ed99 adds term support for meta-. and meta-backspace 2016-07-02 22:49:40 -04:00
Dan Haffey
26144fedde Shorter spinner delay after previous spinful event. 2016-02-20 14:35:06 -08:00
C. Guy Yarvin
6a72b535a9 Don't unlock mutex when exiting; it crashes for some reason. 2016-02-19 14:03:32 -05:00
Dan Haffey
5a23bbfda1 No signals on the spinner thread. 2015-12-16 23:40:34 -08:00
Dan Haffey
0ab8ad4ff5 No spinner delay for %ret. 2015-12-13 13:20:56 -08:00
Dan Haffey
2acf161381 Cursor spinner while processing events for more than 500ms. (#599)
The spinner is a simple |/-\ at the current cursor position. For non-terminal
events, the root of the event's wire is also displayed to the right of the
spinner to give some indication of what's causing an unresponsive terminal.

I used the simplest synchronization strategy I could think of: u3_utat.mex_u is
a mutex that serializes access to a terminal's state. The main thread holds it
at all times except when processing events. When a terminal receives a %bee blit
with a non-nul bulb (the event ovum), it releases the mutex to let the spinner
thread do its thing. A %bee with a nul bulb halts the spinner by grabbing the
mutex and refreshing the input line.

Off-thread console writes are directly against the underlying fd to avoid
trashing non-thread-safe libuv state. Given the simple locking pattern, calling
libuv from the spinner thread might be fine, but I didn't feel like auditing
vere to rule out concurrent calls. It worked when I tried it, but... threads.

I didn't look into supporting anything other than the main terminal, so
currently it's the only one that receives %bee blits. In daemon mode, the
spinner is disabled entirely and no additional thread is started.
2015-12-12 20:42:33 -08:00
Dan Haffey
d2391e78f8 Restore terminal line length and cursor position on refresh.
This keeps printfs from blowing away the line state (M-m M-m
won't erase your prompt).
2015-12-07 20:48:39 -08:00
C. Guy Yarvin
69b8603fa2 URL printing; doc and usability fixes. 2015-11-20 18:10:45 -05:00
C. Guy Yarvin
e92012984c Doc fixes and changes to match. 2015-10-09 18:31:07 -07:00
Philip C Monk
9edda1bb73 descriptive names for c files
fixes #294
2015-06-23 21:29:11 -04:00