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
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
a0602aedb5
csi: recognize 'smam', but log unimplemented
2019-07-03 14:47:34 +02:00
Daniel Eklöf
92f0d64279
csi: add untested implementation of "horizontal index"
2019-07-03 14:47:01 +02:00
Daniel Eklöf
2fad8138e1
csi: scroll region changes are now logged as debug again, rather than info
2019-07-03 14:24:46 +02:00
Daniel Eklöf
5e8c75aa38
csi: implement 'civis' (show/hide cursor)
2019-07-03 14:14:46 +02:00
Daniel Eklöf
0fef48c1fd
csi: up to application to restore scroll region on alt switch?
2019-07-03 08:37:16 +02:00
Daniel Eklöf
8ed7239458
csi: re-set cursor when switching between alt and normal screen
...
This forces a refresh of the "current line" pointer.
2019-07-02 22:23:54 +02:00
Daniel Eklöf
cc2931007c
csi: repair DCH (delete character)
...
The logic was simply broken. This fixes it, and also converts it to
use the new "current line" pointer.
2019-07-02 22:19:43 +02:00
Daniel Eklöf
7e4dd2de9a
csi: clear all existing alt damage when switch alt <--> normal
2019-07-01 19:25:04 +02:00
Daniel Eklöf
ee476a7e5a
csi: erase alt screen when enabling it
2019-07-01 19:23:31 +02:00
Daniel Eklöf
b45b492f41
csi: DECSTBM: move cursor to top left corner of scrolling region
2019-07-01 19:13:45 +02:00
Daniel Eklöf
d70956da08
wip: use a sliding window instead of memmove() to scroll
...
Instead of memmoving a large amount of data on every scroll, use a
sliding window. That is, each time we scroll, we offset origin.
2019-07-01 12:23:38 +02:00
Daniel Eklöf
9e3b8ab3ff
vt: only prep logging of CSI/ESC parameters when debug logging is enabled
2019-07-01 12:21:25 +02:00
Daniel Eklöf
0f48b4f8f7
terminal: prepare for floating grids
2019-06-29 21:30:54 +02:00
Daniel Eklöf
a8f4cb55af
terminal: move cursor from grid to terminal
2019-06-29 21:15:32 +02:00
Daniel Eklöf
8723098cda
terminal: move fore/background colors from grid to terminal
2019-06-29 21:09:58 +02:00
Daniel Eklöf
3d2ab03f62
terminal: move col/row count, cell width/height and scroll region to terminal
2019-06-29 21:08:08 +02:00
Daniel Eklöf
1ecd4a6ae1
Rename grid_* functions to term_*
2019-06-29 21:03:28 +02:00
Daniel Eklöf
1dbddd7155
colors: store as doubles, rather than uint32_t
...
Since cairo uses doubles, we don't want to have to convert a uin32_t
to double values every time we render a cell.
2019-06-26 20:33:32 +02:00
Daniel Eklöf
3a97fce6d0
grid: attributes now track whether we've set a foreground/background color
...
This means we don't have to explicitly set the foreground/background
to the grid's default colors whenever we reset/clear a cell, and we
can instead simply memset() the entire cell to 0.
This also means the renderer has to get the default color when
rendering a cell without a foreground/background color set.
2019-06-26 19:44:31 +02:00
Daniel Eklöf
a35738d96f
scroll-region: don't clear damage queue when changing scroll region
...
Vim, for example, changes the scroll region every time you scroll a
single line. Thus, resetting the damage queue is slow.
This reworks the damage handling of scroll updates:
* Split damage queue into two: one for scroll operations and one for
update/erase operations.
* Don't separate update/erase operations inside/outside the scroll
region
* Store the current scroll region in the scroll damage operation. This
allows us to stack multiple scroll operations with different scroll
regions.
* When updating update/erase operations after a scroll operation,
split the update/erase operations if necessary (the current scroll
operation may have a scroll region different from before, thus
forcing us to split existing update/erase operations.
* The renderer no longer erases after a scroll. The scroll operation
also adds an erase operation. This also means that erase operation
are subject to adjustments by later scroll operations.
2019-06-25 20:11:08 +02:00
Daniel Eklöf
e7043c8a6d
csi: fix scrolling region end
2019-06-24 20:44:29 +02:00
Daniel Eklöf
5b53fda5e6
csi: add function param_get()
...
Returns the value of parameter #idx, if available, or the specified
default value.
If the specified parameter does exist, but is 0, the default value is
returned.
2019-06-24 20:17:02 +02:00
Daniel Eklöf
da0a65d499
csi: implement cursor horizontal absolute
2019-06-24 20:08:44 +02:00
Daniel Eklöf
637820bef5
csi: implement VPR (vertical line position relative)
2019-06-24 20:05:31 +02:00
Daniel Eklöf
d4b6bc77d5
csi: VPA: saturate row
2019-06-24 20:05:24 +02:00
Daniel Eklöf
86519f93ba
csi: implement "send device attributes"
2019-06-24 20:01:41 +02:00
Daniel Eklöf
722c2e7ed2
csi: recognize a bunch of ?h/l commands, log unimplemented
2019-06-24 20:01:12 +02:00
Daniel Eklöf
0cf1253ac0
csi: implement VPA (vertical line position absolute)
2019-06-24 19:59:54 +02:00
Daniel Eklöf
44206b49d4
csi: saturate row/col when setting cursor position
2019-06-24 19:40:00 +02:00
Daniel Eklöf
7fb0c4b342
csi: fix cursor request response; add 1, not 2
2019-06-24 19:03:19 +02:00
Daniel Eklöf
2fe7145aff
scrolling region: wip
2019-06-23 21:12:32 +02:00
Daniel Eklöf
7cc9be01f4
csi: recognize, but do nothing, for civis, cvvis
2019-06-23 18:17:58 +02:00
Daniel Eklöf
ec9b343550
csi: implement cursor query and respones
2019-06-23 18:17:36 +02:00
Daniel Eklöf
b0a2c54fe8
vt: wip: implement scrolling region
...
This is largely untested, but existing scrolling code has been
converted to using a terminal-global scrolling region that is defined
as start-end of the scrollable region.
This is compared to the old code where the scrolling region where
defined in terms of marginals, counted in lines from top and from
bottom.
2019-06-23 18:02:49 +02:00
Daniel Eklöf
7183b2f0fe
csi/vt: fix logging of intermediate characters
2019-06-23 17:17:47 +02:00
Daniel Eklöf
de7dcf1a5c
csi: save and restore cursor when switching to and from alt screen
2019-06-23 15:03:22 +02:00
Daniel Eklöf
199e4aa044
vt: initial implementation of alt screen + 256 colors
2019-06-23 15:00:27 +02:00
Daniel Eklöf
35e5fa1f76
vt: implement DECCKM (cursor key sends either SS3 or CSI escapes)
2019-06-23 14:12:20 +02:00
Daniel Eklöf
9e47c89880
csi: implement 'CSI H' (set cursor position)
2019-06-23 14:11:35 +02:00
Daniel Eklöf
1414639b76
csi: include intermediates in debug logging
2019-06-23 13:36:13 +02:00