Daniel Eklöf
aa692d19e4
csi: document "Send Device Attributes (Secondary DA)"
2019-11-18 12:06:29 +01:00
Daniel Eklöf
0250a703e4
csi: implement 'Query Device Status'
...
By replying with "Device OK"
2019-11-18 11:44:03 +01:00
Daniel Eklöf
7ff5a8027a
term: report_mouse_click(): legacy mode only supports rows/cols up to 223.
...
In the legacy mouse reporting mode, line and column numbers are
limited to 223 (255-32). In case the current coordinate falls outside
this, simply ignore it (don't report it).
2019-11-18 11:31:21 +01:00
Daniel Eklöf
2d0c4928ee
csi: add debug logs for the various mouse reporting modes
2019-11-18 11:31:05 +01:00
Daniel Eklöf
832cc8c269
term: assert(false) on MOUSE_X10
...
This mouse mode is never enabled. I.e. we don't support it. Add
asserts to catch usage of it, should we ever decide to implement it.
2019-11-18 11:18:48 +01:00
Daniel Eklöf
29cccadd1d
tllist: is now an external "library", so use <> includes
2019-11-17 19:19:55 +01:00
Daniel Eklöf
dd7058d368
tllist: use tllist from external git repository
2019-11-17 19:10:35 +01:00
Daniel Eklöf
9902a5732f
term: try to improve on a performance regression
...
When support was added for DECOM (absolute/relative row addressing), a
small but noticeable (~3.5%) performance regression was introduced.
Try to improve the situation by simplifying the relative-to-absolute
conversion; only the row needs to be transformed.
2019-11-17 18:52:27 +01:00
Daniel Eklöf
cf75528e86
Revert "term: new function: term_autowrap()"
...
This reverts commit 686405b703 .
2019-11-17 17:22:34 +01:00
Daniel Eklöf
04cbee7593
Revert "vt: replace pre_print() with term_autowrap()"
...
This reverts commit fd8a399274 .
2019-11-17 17:22:16 +01:00
Daniel Eklöf
7f4b2c5755
csi: implement 'CHT' - Cursor Horizontal Tab
2019-11-17 12:29:52 +01:00
Daniel Eklöf
fd8a399274
vt: replace pre_print() with term_autowrap()
2019-11-17 12:14:45 +01:00
Daniel Eklöf
686405b703
term: new function: term_autowrap()
...
Adds a linebreak (+ scroll if necessary) if we're in a deferred wrap
and auto-margins are enabled.
Return true when we wrapped, false otherwise.
2019-11-17 12:13:36 +01:00
Daniel Eklöf
f4be84871f
csi: implement 'CPL' - Cursor Previous Line
2019-11-17 11:36:24 +01:00
Daniel Eklöf
d8708d1105
csi: implement 'CNL' - Cursor Next Line
2019-11-17 11:35:30 +01:00
Daniel Eklöf
53f4273b17
csi: implement 'HPR' - Horizontal Position Relative
2019-11-17 11:31:35 +01:00
Daniel Eklöf
616e506f2e
csi: fix bad implementation of CBT (back tab)
...
* It takes a parameter, that indicates the number of tab stops to move
through
* Use the tab stops defined in the tab stops list, not hard coded mod
8 columns.
2019-11-17 11:20:59 +01:00
Daniel Eklöf
ca58c4c621
csi: implement 'HPA' - Horizontal Position Absolute
2019-11-17 11:09:16 +01:00
Daniel Eklöf
045f55a8c6
vt: bug (tab regression): don't get stuck on the same tab stop
...
There were actually two bugs here:
* When checking for a tab stop, make sure the new tab stop is at a
different column. Otherwise you can't tab away from a tab stop.
* When there aren't any tab stops configured, or when we're already
beyond the last tab stop, then tab to the last column (at least I
think that's what we're supposed to do).
2019-11-17 10:15:56 +01:00
Daniel Eklöf
c9ebd527cf
term: save/restore charsets on save/restore cursor+attributes
2019-11-17 10:02:46 +01:00
Daniel Eklöf
3f3feedde2
term: convert anonymous 'charsets' struct to a named struct
2019-11-17 10:00:30 +01:00
Daniel Eklöf
ce544776ab
term: move charset variables into an anonymous struct
2019-11-17 09:59:12 +01:00
Daniel Eklöf
36bcb0dac1
term: restore_cursor: restore lcf flag
2019-11-17 09:46:30 +01:00
Daniel Eklöf
a70fe1f5d7
term: move lcf flag into 'cursor' struct
2019-11-17 09:46:20 +01:00
Daniel Eklöf
d637b8c9ba
term: add struct cursor
2019-11-17 09:44:31 +01:00
Daniel Eklöf
c1088d77ac
term: rename: print_needs_wrap -> lcf (Last Column Flag)
2019-11-17 09:39:43 +01:00
Daniel Eklöf
f74026ba9b
csi: el/ed/dch/ich/ech: reset 'print_needs_wrap' (lcf)
...
This makes the result of 'wraptest', by Mattias Engdegård, match the
behavior of 'DEC' (the architectural behavior of DEC terminals).
2019-11-17 09:36:55 +01:00
Daniel Eklöf
81215e5a72
term: cursor_{up,down}: limit cursor movements based on origin mode
2019-11-16 12:14:58 +01:00
Daniel Eklöf
aee22dd4b6
Merge branch 'tab-stop'
2019-11-16 10:58:30 +01:00
Daniel Eklöf
65ff3656f7
vt: execute: \t: use tab stops from tab stop list
...
Instead of assuming hardcoded 8-width tab stops, use the tab stops
from the tab stop list.
2019-11-16 10:57:39 +01:00
Daniel Eklöf
9ff48c2015
vt: implement ESC H - set tab stop at current column
2019-11-16 10:57:11 +01:00
Daniel Eklöf
13204d9337
tllist: update to latest
...
In particular, pull in tll_insert_{before,after}
2019-11-16 10:56:28 +01:00
Daniel Eklöf
b31c18c741
selection: buffer may be empty if only empty cells where selected
2019-11-16 10:56:10 +01:00
Daniel Eklöf
9840291100
csi: implement CSI 0g and CSI 3g
...
* 0g - clear tab stop at current column
* 3g - clear all tab stops
2019-11-16 10:55:28 +01:00
Daniel Eklöf
69e0e454fa
vt: remove commented out code
2019-11-16 10:55:14 +01:00
Daniel Eklöf
37139fc4fa
render: configure default tab stops when resizing the terminal
2019-11-16 10:54:56 +01:00
Daniel Eklöf
f91073c362
term: add tab-stop list to terminal struct
...
This list is intended to store tab stop columns
2019-11-16 10:54:21 +01:00
Daniel Eklöf
35c56765a4
vt: DECALN: render at bottom of terminal, not in view
2019-11-14 11:08:49 +01:00
Daniel Eklöf
f6d87e235b
csi: CSI ?4h enables smooth scrolling, ?4l enables jump scrolling
2019-11-05 14:37:17 +01:00
Daniel Eklöf
54f750c494
server: disable debug output
2019-11-05 14:36:58 +01:00
Daniel Eklöf
f635f48078
vt: implement VT - Vertical Tab
...
Despite its name, it always moves down exactly one line.
2019-11-05 13:56:52 +01:00
Daniel Eklöf
df65e29d0d
vt: always use hex (not octal)
2019-11-05 13:56:44 +01:00
Daniel Eklöf
27d00b15c7
vt: log hex version of printed character too
2019-11-05 13:56:25 +01:00
Daniel Eklöf
5d763b9e12
vt: always disable state_names[] array
...
It isn't used anywhere, even with LOG_ENABLE_DBG
2019-11-05 13:55:43 +01:00
Daniel Eklöf
95eaad7ce4
csi: implement DECOM - switch cursor origin between absolute and relative
...
The default is absolute mode, where 0,0 is the upper left corner of
the screen.
In relative mode, the origin is relative the top scroll margin.
Internally, we always track the current cursor position in absolute
mode. Every time we the client *sets* or *queries* the cursor position
in relative mode, we translate it to absolute.
2019-11-05 13:27:37 +01:00
Daniel Eklöf
89dbc61a34
csi: DECCOLM erases screen
2019-11-05 13:21:47 +01:00
Daniel Eklöf
33ea88aba6
vt: esc dispatch: implement DECALN
...
In esc dispatch:
* Switch on private first, then final
* Recognize ESC #8 (DECALN), and implement it
2019-11-05 11:32:56 +01:00
Daniel Eklöf
342d6036f9
csi: CSI ?3h enables 132 column mode, CSI ?3l 80 column mode
2019-11-05 11:10:56 +01:00
Daniel Eklöf
bf58b9ea8e
csi: implement force cursor position
2019-11-05 11:10:19 +01:00
Daniel Eklöf
15b12f45c6
scan-build: fix a couple of minor warnings from a scan-build run
2019-11-05 10:39:36 +01:00