Commit graph

177 commits

Author SHA1 Message Date
Daniel Eklöf
00c5b27bfa
vt: add branch hinting to PRINT action 2019-07-06 13:25:36 +02:00
Daniel Eklöf
77e349d20d
render: reverse video only reverses the default background/foreground 2019-07-05 20:36:03 +02:00
Daniel Eklöf
b26e03fced
csi: implement reverse video 2019-07-05 20:12:40 +02:00
Daniel Eklöf
c76e620d71
csi: implement URXVT style mouse event reporting 2019-07-05 19:40:52 +02:00
Daniel Eklöf
450f6c7dcc
osc: recognize, but ignore, OSC 104 and OSC 105 2019-07-05 19:04:34 +02:00
Daniel Eklöf
b69282545c
osc: fix param calculation with more than one digit 2019-07-05 19:04:09 +02:00
Daniel Eklöf
b9bd637021
csi: SGR mouse tracking *is* implemented 2019-07-05 15:58:02 +02:00
Daniel Eklöf
fd25018cdd
render: fill area outside the cell grid with default bg color 2019-07-05 15:53:53 +02:00
Daniel Eklöf
1b07015d49
term: implement MOUSE_SGR mouse event reporting style
This style is enabled with the \e[?1006h sequence, and changes how
mouse events (button presses, releases and motion events).
2019-07-05 15:29:16 +02:00
Daniel Eklöf
a959c89b7f
input: bug: row is calculated from the cell *height*, not width 2019-07-05 15:28:39 +02:00
Daniel Eklöf
1610828b8c
vt: add support for mouse motion reports 2019-07-05 15:13:06 +02:00
Daniel Eklöf
e5fc266cdb
vt: add support for \E[?1000h - report mouse button events 2019-07-05 14:24:51 +02:00
Daniel Eklöf
a102ff09f9
input: mouse events 2019-07-05 10:44:57 +02:00
Daniel Eklöf
1a341a56cc
render: load cursor theme from XCURSOR_THEME and XCURSOR_SIZE 2019-07-05 10:44:09 +02:00
Daniel Eklöf
1947d33868
render: break out rendering functions to render.{c,h} 2019-07-05 10:16:56 +02:00
Daniel Eklöf
3ba1721c0f
osc: implement change window title and icon 2019-07-05 09:50:35 +02:00
Daniel Eklöf
998ce52b7e
render: bump number of glyphs we can render in a single call 2019-07-05 09:31:03 +02:00
Daniel Eklöf
19cef74153
main: it's not the terminal emulators job to set LINES and COLUMNS 2019-07-05 09:21:12 +02:00
Daniel Eklöf
488ad5dc77
csi: manually erase alt screen when switching to it 2019-07-05 09:09:58 +02:00
Daniel Eklöf
c5fdc13ea4
term_erase(): erased cells get the currently selected background color 2019-07-05 09:09:28 +02:00
Daniel Eklöf
28d05a5528
main: initialize colors in VT state 2019-07-05 09:08:58 +02:00
Daniel Eklöf
8091f7c781
render: force a full redraw when we cannot reuse last buffer 2019-07-05 08:55:02 +02:00
Daniel Eklöf
4a35aa9724
resize: cursor reset was off-by-one when cursor was outside new size 2019-07-04 19:56:50 +02:00
Daniel Eklöf
1c737fa7bd
resize: re-align grid offset 2019-07-04 19:56:27 +02:00
Daniel Eklöf
669ef1a07a
csi: implement CSI S and CSI T (scroll up/down) 2019-07-04 19:39:23 +02:00
Daniel Eklöf
befb437411
vt: improve logging of invalid and unimplemented sequences 2019-07-04 19:35:01 +02:00
Daniel Eklöf
cb10d10fd8
vt: implement save/restore cursor+attributes 2019-07-04 19:23:25 +02:00
Daniel Eklöf
aad4db29c2
vt: handle graphical charset mode when printing a character 2019-07-04 19:17:42 +02:00
Daniel Eklöf
ea6e06d689
vt: track charsets G0-G3 and support either ASCII or graphical mode 2019-07-04 19:17:18 +02:00
Daniel Eklöf
dd5a3b1009
main: handle EINTR in poll() 2019-07-04 19:16:32 +02:00
Daniel Eklöf
50d455bd15
csi: ignore 'blinking cursor' private mode 2019-07-04 10:04:52 +02:00
Daniel Eklöf
0457c33418
csi: fix parsing of 256-color and 24-bit color SGRs
There may be more SGR sequences after the 256-color/24-bit
sequence. Thus, check that we have *enough* parameters to parse the
256-color/24-bit SGR. It doesn't have to be *exactly* the required
number of parameters though.

Fixes issues with sequences like: \e[38;2;1;48;2;1m
2019-07-04 09:57:02 +02:00
Daniel Eklöf
ef944933e6
flash mitigation: add a small delay before rendering after receiving client data
Simply re-trying to read client data is not enough in many
cases. Re-work the flash mitigation to instead incur a small delay
before rendering.
2019-07-04 09:54:40 +02:00
Daniel Eklöf
03ca7a04ab
main: more zenburn:ish default foreground and background colors 2019-07-04 09:27:06 +02:00
Daniel Eklöf
a191d98d09
vt: bug fix: clear utf-8 state after printing a utf-8 character 2019-07-04 09:26:34 +02:00
Daniel Eklöf
9f12bca21e
Merge branch 'fast-scroll' 2019-07-03 22:30:00 +02:00
Daniel Eklöf
35d5035f61
csi: fix bug: cursor horizontal absolute (<ESC> Pn G) was off-by-one 2019-07-03 22:21:44 +02:00
Daniel Eklöf
2f3f4ac56f
csi: cleanup 2019-07-03 22:21:23 +02:00
Daniel Eklöf
3d58d24963
csi: ?r and ?s are like ?h and ?l; they save/restore things
Assuming ncmpcpp is correct, ?1001s and ?1001r saves and restores the
'highlight mouse tracking' mode.
2019-07-03 21:33:23 +02:00
Daniel Eklöf
3c67628c57
vt: implement (untested!) smam and rmam (auto margins)
Default is auto-margins enabled (scroll when cursor reaches right
margin).
2019-07-03 21:18:06 +02:00
Daniel Eklöf
90dadfcc22
vt: implement (untested!) insert mode
\E4l is not horizontal index, but disable INSERT mode
2019-07-03 21:16:41 +02:00
Daniel Eklöf
1373d18dbc
logging: disable debug logging by default 2019-07-03 20:21:03 +02:00
Daniel Eklöf
df5be1061d
vt: recognize ESC(0 - switch character set 2019-07-03 16:21:26 +02:00
Daniel Eklöf
bf78150157
vt: always log unimplemented as warnings, not errors 2019-07-03 16:21:09 +02:00
Daniel Eklöf
cfd39c0967
vt: fix logging of ESC intermediates and parameters 2019-07-03 16:20:28 +02:00
Daniel Eklöf
b5dccf2883
csi: add unknown private escapes 's' and 'r', seen with ncmpcpp 2019-07-03 16:04:16 +02:00
Daniel Eklöf
43045a98e2
csi: recognize ?1005 and ?1015 private CSIs 2019-07-03 16:00:06 +02:00
Daniel Eklöf
f4c3343382
csi: fix cursor positioning 2019-07-03 15:59:28 +02:00
Daniel Eklöf
66033b9b1a
csi: implement 'erase characters' (CSI X) 2019-07-03 15:58:49 +02:00
Daniel Eklöf
f87d4f856a
main: mitigate screen flashes on slow client
If a client writes to the PTY "too slow", we often end up flashing the
screen. This could for example be caused by a client first erasing a
line, then we render that frame, followed by the client updating the
just-erased line. When we render _that_ frame, it will be perceived as
a flash.

Mitigate this by trying to read client data again, after finishing
processing one batch, but before rendering.

To avoid hanging on client output (and never rendering anything),
limit this to at most 3 iterations. This may have to be tweaked.
2019-07-03 15:16:38 +02:00