Commit graph

51 commits

Author SHA1 Message Date
Xiao-Yong Jin 0aa0096066 vt: increase buffer size
This patch increases the buffer sizes in vt(1) to reduce
the latency from the roundtrip between terminal and cpu
server.
2022-05-11 04:02:57 +00:00
Ori Bernstein 819bec22cc vt: allow scrolling with the mouse. 2021-06-26 17:39:13 +00:00
Ori Bernstein b68b3a6e19 vt, ssh: don't send interrupts on window resize
When resizing windows, vt would signal ssh by updating
the window size and sending an interrupt. Ssh reacted
by forwarding both the winch and an interrupt.

This change adds a WINCH generation counter so that
ssh can differentiate between resizes and interrupts.
If an interrupt comes in, and the WINCH generation
changes, then the interrupt is taken as signalling a
WINCH.
2021-06-26 17:29:27 +00:00
Ori Bernstein 4dc437c076 vt: rfork environment varibles (thanks fshahriar)
vt sets several environment variables ($TERM, $COLS, $LINES)
after exiting. This change rforks the environment so that this
detritus doesn't get left behind.
2020-12-18 19:23:48 -08:00
Ori Bernstein 31eb1b9d72 vt: improve behavior of chording
vt chording behaves slightly differently from other
applications: a chord must be fully released before
the next chord can be applied. This makes any change
in chord apply the action.
2020-10-30 13:23:16 -07:00
Ori Bernstein 2d1dac07f7 triple-click to select non-whitespace segment
The previous patch to plumb non-whitespace segments was
confusing due to lack of visual feedback. This removes
the empty selecton plumb behavior, and instead makes
triple clicking work to get a plumbable selection.
2020-04-11 14:19:46 -07:00
Ori Bernstein ebb3e31118 vt plumbing: don't require selection
Plumbing text in vt requires selecting the text that you
want to plumb precisely. This patch makes plumbing behave
the same way that it does in rio.
2020-04-11 11:56:04 -07:00
cinap_lenrek 3bb1804631 vt: dont make fs procs hang arround when closing rio window 2019-04-02 20:44:35 +02:00
cinap_lenrek 3043052e24 vt: fix %.*s in sendncars() 2019-02-25 03:25:36 +01:00
cinap_lenrek 03bcc1520a vt: fix backup/forward after resize 2018-09-27 16:08:51 +02:00
cinap_lenrek b74ce50a1c vt: implement word select 2018-09-27 15:24:41 +02:00
cinap_lenrek 8c7a4e28d5 vt: make selecting() wait until all buttons are lifted avoiding menu when chording 2018-09-20 21:25:38 +02:00
cinap_lenrek b9796e0774 vt: implement line selection by double click 2018-09-20 21:07:10 +02:00
cinap_lenrek 2e9835e771 vt: fix selection past baseline (thanks BurnZeZ) 2018-09-04 20:55:10 +02:00
cinap_lenrek 217e8a0619 vt: fix selrange() to recover whitespace indention 2018-09-03 22:37:45 +02:00
cinap_lenrek 676298b16b vt: get rid of "clear" menu entry, fix 24x80 resize, reset selection on setdim(), document snarf/plumb 2018-09-03 21:51:32 +02:00
cinap_lenrek 80cd634c4d vt: fix plumbsel(), snarfsel()
- plumbsel()
	- remove debug prints
	- use smalloc() to convert to bytes
	- fix spurious -1 close of plumb fd

- snarfsel()
	- fix rune buffer leak in open error case
2018-09-03 20:54:26 +02:00
cinap_lenrek de9aa721f6 vt: implement proper selections (thanks Ori_B)
Ori Bernstein wrote:
> I finally got around to taking another shot at this vt patch. This change
> gets rid of implicit snarfing, and instead makes selection the way you
> select text for snarfing or plumbing. Select, then use a menu entry.
>
> It would probably be nice to have double click to expand the selection,
> rio-style, along with plumbing implicitly taking the current word, but
> that can be a separate patch.
>
> This change also punts on scrolling for simplicity -- it clears the
> selection instead of trying to handle the cases where the selection
> goes offscreen.

little amendments:

- fix line selection (point min/max inversion)
- clear selection when switching linesel/blocksel
- move selection on scroll
2018-09-03 20:05:26 +02:00
cinap_lenrek 67d9c6b2f9 vt: block when sending input to host (fixes truncated paste) 2017-10-20 20:31:30 +02:00
cinap_lenrek c6359c3090 vt: turn off nl -> nl+cr translation default in raw mode, don't scroll more than screen height 2017-08-22 22:48:01 +02:00
cinap_lenrek c4fd860a56 vt: block selection mode for snarf 2017-08-20 22:18:09 +02:00
cinap_lenrek b28c3db578 vt: implement /dev/cons and /dev/consctl as a fileserver, winch, incremental redraw
we used to bind a pipe to /dev/cons and /dev/consctl with some
shared segment hack to pass tty info arround. now we implement
this as a fileserver.

add support for "winchon"/"winchoff" ctl message to enable interrupt
on window size change. (used by ssh)

keep track of fullscreen scrolls, avoiding redrawing the whole
screen each time.
2017-08-20 19:22:30 +02:00
cinap_lenrek 4be612946f vt: fix silly bug causing characters be drawn one at a time 2017-08-09 18:53:48 +02:00
cinap_lenrek 1dc5f9222a vt: don't flush while there is keyboard input available 2017-05-20 14:45:47 +02:00
cinap_lenrek 83d5c827b7 vt: handle underline attribute 2017-04-22 22:52:34 +02:00
cinap_lenrek 13a74150ac vt: handle nocolor flag and reversed background colors 2017-04-22 22:19:17 +02:00
cinap_lenrek c029a0c913 vt: handle insert/delete/home/end keys for vt220/xterm 2017-04-22 21:07:53 +02:00
cinap_lenrek f2b7f24e4e vt: handle application/normal mode (really fixes cursor keys) 2017-04-22 20:16:07 +02:00
cinap_lenrek 5d7a77cf57 vt: fix xterm cursor keys 2017-04-22 18:01:49 +02:00
cinap_lenrek c5b2927250 vt: fix background drawing 2017-04-22 02:41:00 +02:00
cinap_lenrek bef681b892 vt: cursoron, don't resize winow when replying history 2017-04-19 22:34:47 +02:00
cinap_lenrek 283a1c0788 vt: but not too fast :-)
if drawing can't keep up with the host, make sure we
eventually redraw the screen and check for user events.
2017-04-19 02:18:28 +02:00
cinap_lenrek 219050cc36 vt: make it fast 2017-04-19 01:46:20 +02:00
cinap_lenrek db729cbb50 vt: send interrupt on exit, open logfile OCEXEC, run host after environment got exported, send rest of arguments to host 2017-04-18 03:13:15 +02:00
cinap_lenrek 378866d6d1 vt: allow for a bit of buffering 2017-04-18 00:21:51 +02:00
cinap_lenrek 1333b4d14e vt: convert from event to threads
the event library doesnt do any flow control. if the host
keeps sending data while the user is mousing arround,
extract() will collect the data until memory fills up.

so instead we abandon the event library and convert
the program to use channels.
2017-04-18 00:18:03 +02:00
cinap_lenrek 1f3f4cd06b vt: increase history buffer to 64K runes 2017-04-17 05:32:01 +02:00
cinap_lenrek ddc6c16515 vt: implement snarf support 2017-04-17 05:12:07 +02:00
BurnZeZ dacebbb2e7 vt: add -r flag to start in raw mode 2016-03-01 19:17:54 -05:00
mischief b35df8dd22 vt: discard unhandle OSC escapes, and use nelem instead of sizeof for title buffer 2013-10-28 02:13:35 -07:00
mischief 420ed37c57 cmd/vt: fix xterm function keys 2013-10-27 18:40:21 -07:00
cinap_lenrek 632b7adffb vt: remove defunct hp terminal emulation 2013-10-27 19:09:13 +01:00
cinap_lenrek b831ec005b vt: utf-8 support 2013-10-27 19:05:40 +01:00
cinap_lenrek 6c758d94bf vt: dont pollute the outer environment (thanks mischief!) 2013-10-02 02:25:50 +02:00
cinap_lenrek bf10f672ec vt: fix off by one memory corruption
account for the final 0 byte in host_buf.
2013-08-11 08:34:34 +02:00
cinap_lenrek 80146b0303 vt: ignore line spacing escape2 2013-01-13 10:32:51 +01:00
cinap_lenrek 00daf47137 vt: on resize, restore screen using history buffer 2012-11-10 07:56:39 +01:00
cinap_lenrek 78f4f497b4 fix vt for new /mnt 2011-11-28 20:58:57 +01:00
glenda b56d307ce6 use mntgen for /mnt and /mnt/exportfs 2011-12-02 06:05:23 +01:00
Taru Karttunen a9060cc06b Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00