aboutsummaryrefslogtreecommitdiff
path: root/csi.c (follow)
Commit message (Collapse)AuthorAgeLines
...
* csi: CSI ?3h enables 132 column mode, CSI ?3l 80 column modeDaniel Eklöf2019-11-05-2/+6
|
* csi: implement force cursor positionDaniel Eklöf2019-11-05-0/+1
|
* scan-build: fix a couple of minor warnings from a scan-build runDaniel Eklöf2019-11-05-2/+2
|
* csi: comment out handling of CSI ? 1042/1043 h/lDaniel Eklöf2019-11-04-0/+4
| | | | | In Wayland, we neither _have_ an urgency hint to set, nor can we raise the window(?)
* csi: recognize CSI ? 1042/1043 h/lDaniel Eklöf2019-11-04-0/+16
| | | | | 1042: set 'urgency' window manager hint when receiving ctrl-g 1043: raise window when receiving ctrl-g
* Rename: vt_to_slave() -> term_to_slave()Daniel Eklöf2019-11-02-4/+4
|
* csi: ignore invalid scrolling regions0.9.0Daniel Eklöf2019-09-29-7/+10
| | | | | | | | | | There must be at least one scrolling row. I.e. the bottom margin must be larger than the top margin. Note that trying to set an invalid region really will be *ignored*. I.e. we *don't* reset the scrolling region. This conforms to xterm's behavior.
* csi: don't ignore the color space identifier in SGRsDaniel Eklöf2019-09-04-10/+73
| | | | | | | | | Only a color space ID of '2' means the sequence is an RGB sequence. Update existing code to verify this, and ignore sequences with other color space IDs. Except color space ID '5', which is the same as a regular 38;5;<idx> sequence, but using sub-parameters instead (38:2:5:<idx>).
* csi: CSI h isn't a valid sequence - it needs a parameterDaniel Eklöf2019-08-30-5/+29
| | | | | And, 'insert mode' isn't activated with \e[h, but with \e[4h.
* term: rename colors256 -> tableDaniel Eklöf2019-08-21-6/+6
|
* term: use colors256 array for *all* colorsDaniel Eklöf2019-08-21-22/+7
| | | | | | That is, remove the 'regular' and 'bright' color arrays. This is possible since the 256-color array is defined such that the first 16 colors map to the regular and bright colors.
* csi: move 256-color table into the terminal structDaniel Eklöf2019-08-21-27/+2
|
* csi: implement CSI ? 1007 h/l - alternateScrollDaniel Eklöf2019-08-19-0/+8
| | | | | When enabled, mouse scrolls in the alternate screen are converted to up/down key presses.
* csi: cancel selection *before* switching gridDaniel Eklöf2019-08-08-3/+4
| | | | This fixes an occasional SIGSEGV
* csi: add 'unimplemented' warnings for things we handle but ignoreDaniel Eklöf2019-08-04-6/+19
|
* cell: pack more efficiently and store glyph as a wcharDaniel Eklöf2019-08-02-14/+24
| | | | | | | | | | | The 'attributes' struct is now 8 bytes and naturally packed (used to be 9 bytes, artificially packed). 'cell' struct is now 12 bytes, naturally packed (used to be 13 bytes, artificially packed). Furthermore, the glyph is stored as a wchar instead of a char*. This makes it easier (faster) to do glyph lookup when rendering.
* term: implement resetDaniel Eklöf2019-08-01-1/+1
|
* vt: remove almost all abort() callsDaniel Eklöf2019-07-30-62/+35
| | | | | | Replace with generic error log messages that simply says the ESC/CSI/OSC sequence is unhandled. This can mean either invalid or unimplemented, depending on the context.
* render: add a 'clean' bit to each cell; only render cells that aren't cleanDaniel Eklöf2019-07-30-10/+15
| | | | | | | | | | | This patch takes a bit from the foreground color value in a cell (todo: split up foreground/background into bitfields with a separate field for 'foreground/background' has been set), and only re-renders cells that aren't marked as clean. Note: we use a 'clean' bit rather than a 'dirty' bit to make it easy to erase cells - we can (keep doing) do that by simply memsetting a cell range to 0.
* csi: ignore CSI ?1036h/l (metaSendsEscape)Daniel Eklöf2019-07-23-0/+9
|
* term: make sure to update 'current row' when restoring saved cursorDaniel Eklöf2019-07-23-2/+9
|
* csi: implement \E[Z - back tabDaniel Eklöf2019-07-22-0/+8
|
* csi: *sigh* looks like e.g. neovim doesn't respect SeDaniel Eklöf2019-07-22-8/+5
| | | | | | | | I.e. it issues a \E[2 q regardless of what we've configured the terminfo Se entry to. So, make \E[2 q mean "the user configured cursor style" (which defaults to 'block').
* csi: let CSI 0 q mean "switch to user configured cursor style"Daniel Eklöf2019-07-22-2/+8
| | | | | | | | According to the specs, \E[0 q means a blinking block cursor. However, since it also states that \E[1 q *also* is a blinking block cursor, and that it is the default, *and* given that fact that parameter-less CSIs typically means "reset", let's make it mean "reset to the user configured cursor style".
* render: implement cursor styles 'bar' and 'underline'Daniel Eklöf2019-07-22-2/+0
|
* csi: prepare for alternative cursor stylesDaniel Eklöf2019-07-22-12/+17
|
* flash: convert our own 'flash' from a CSI to an OSCDaniel Eklöf2019-07-22-16/+0
|
* csi: implement CSI 3J - erase scroll backDaniel Eklöf2019-07-22-0/+22
|
* csi: bug: reset mouse *reporting* on CSI 1005/1006/1015lDaniel Eklöf2019-07-21-1/+4
|
* csi: remove debug loggingDaniel Eklöf2019-07-21-2/+0
|
* csi: change flash log message from warning to debugDaniel Eklöf2019-07-21-1/+1
|
* flash: implement 'flash'Daniel Eklöf2019-07-21-0/+19
| | | | | | | | | | Use our own escape sequence for the 'flash' terminfo entry. Implemented by arming a timer FD and setting a boolean that indicates we're currently "flashing". The renderer draws a semi-transparent yellowish layer over the entire window when "flashing" is active.
* csi: remove erronous finalDaniel Eklöf2019-07-21-10/+2
|
* csi: implement CSI 22t and CSI 23tDaniel Eklöf2019-07-21-4/+32
| | | | | | | | | | | 22;0|1|2t pushes the current window title/icon to the stack, while 23 pops it. The second parameter, 0|1|2 has the following meaning: 0 - push/pop icon+title 1 - push/pop icon 2 - push/pop title
* csi: remove TODO; we have our own terminfoDaniel Eklöf2019-07-21-7/+0
|
* csi: pick 16 first 256-colors directly from the term structDaniel Eklöf2019-07-21-2/+19
| | | | | | | | | | The 16 first entries in the 256-color array are the regular and bright colors. However, since they can be changed (eventually) at runtime, we can't statically initialize the 256-color array. Instead, pick the regular+bright colors directly from the terminal struct. I.e. the first 16 entries of the 256-color array are now unused.
* csi: use colors from terminal structDaniel Eklöf2019-07-21-26/+4
|
* conf: config now provides the colors (though still only hardcoded colors)Daniel Eklöf2019-07-21-45/+1
|
* term: prepare for configurable colors; add color variables to terminalDaniel Eklöf2019-07-21-2/+2
|
* csi: recognize DECRQM (CSI ? Ps $ p)Daniel Eklöf2019-07-19-0/+23
| | | | | | The client sends this to request the state of DEC private modes. We don't support any of them, so for now, reply with 'reset'.
* csi: tweak logging: no need to mention 'CSI' twiceDaniel Eklöf2019-07-19-3/+3
|
* vt: handle up to two private charactersDaniel Eklöf2019-07-19-4/+8
|
* csi: recognize, but ignore, modifyOtherKeys et al resource settersDaniel Eklöf2019-07-18-0/+23
|
* csi: better (more correct) reply to \e[>0cDaniel Eklöf2019-07-18-1/+1
|
* csi: color index is an 8-bit unsigned valueDaniel Eklöf2019-07-18-6/+4
| | | | | This fixes an issue where a large 8-bit value was signed extended into a large 64-bit value.
* csi: validate param before indexing into the 256-color arrayDaniel Eklöf2019-07-18-2/+4
|
* csi: fix wrong variable compared in for-loopDaniel Eklöf2019-07-18-1/+1
|
* csi: implement \E[@ (ICH - insert characters)Daniel Eklöf2019-07-17-15/+24
|
* vt/csi: recognize the reset sequence sent by 'reset'Daniel Eklöf2019-07-17-0/+24
| | | | However, we don't (yet) actually reset the terminal
* csi: document a couple of unimplemented CSIsDaniel Eklöf2019-07-17-0/+3
|
* csi: move 'dim' attribute from 'vt' to cell attributesDaniel Eklöf2019-07-16-3/+2
|
* csi: add back 'blink' attributeDaniel Eklöf2019-07-16-2/+2
|
* terminal: foreground/background in cell attributes are now uint32_tDaniel Eklöf2019-07-16-40/+48
| | | | This reduces the cell size, and thus improves the cache behavour
* csi: implement \E[21m (disable bold)Daniel Eklöf2019-07-16-0/+1
|
* csi: implement FocusIn/Out eventsDaniel Eklöf2019-07-16-0/+8
|
* csi: recognize, but mostly ignore, cursor style configurationDaniel Eklöf2019-07-16-0/+32
|
* csi: add missing 'break'Daniel Eklöf2019-07-16-0/+1
|
* Use vt_to_slave() instead of calling write(term->ptmx, ...) everywhereDaniel Eklöf2019-07-15-3/+3
|
* csi: remove debug loggingDaniel Eklöf2019-07-15-6/+0
|
* csi: erase alt screen before activating itDaniel Eklöf2019-07-15-2/+4
|
* csi: 'X': then 'end' parameter in term_erase() is *inclusive*Daniel Eklöf2019-07-15-1/+1
|
* csi: implement ':'-separated 24-bit color valuesDaniel Eklöf2019-07-15-6/+70
|
* csi: cancel selection when switching between 'normal' and 'alt' gridDaniel Eklöf2019-07-11-0/+3
|
* terminal: remove 'blink' attribute from cell structDaniel Eklöf2019-07-10-30/+31
| | | | | This makes the other attribute bits fit in a single uint8_t, which makes each cell smaller which improves cache usage.
* vt/csi: use vt_param_get()Daniel Eklöf2019-07-10-31/+21
|
* terminal: only support a single intermediate/private characterDaniel Eklöf2019-07-10-9/+15
|
* csi: fix logging; 'CSI' was printed twiceDaniel Eklöf2019-07-10-12/+12
|
* terminal: rename and redefine cursor keys mode and keypad keys modeDaniel Eklöf2019-07-09-2/+2
|
* rgba: drop alpha channel supportDaniel Eklöf2019-07-08-27/+23
|
* wip: grid is now represented as a grid, not a linear arrayDaniel Eklöf2019-07-08-24/+41
| | | | | | | | | | | | The grid is now represented with an array of row *pointers*. Each row contains an array of cells (the row's columns). The main point of having row pointers is we can now move rows around almost for free. This is useful when scrolling with scroll margins for example, where we previously had to copy the lines in the margins. Now it's just a matter of swapping two pointers.
* grid: grid_memset() -> grid_memclear()Daniel Eklöf2019-07-07-1/+1
|
* csi: scroll region is not allowed past available rowsDaniel Eklöf2019-07-07-1/+1
|
* performance improvementsDaniel Eklöf2019-07-07-25/+25
| | | | | | | | | * action() returns void - this gets rid of checks in vt_from_slave() * split up ACTION_PRINT into ACTION_PRINT (ASCII) and ACTION_UTF8_PRINT ACTION_PRINT is on the hot path, and we want it streamlined. * Remove run-time checkout for unimplemented state transitions, as we shouldn't have any of those left. * Don't re-load current VT state on each iteration in vt_from_slave()
* csi: implement reverse videoDaniel Eklöf2019-07-05-2/+4
|
* csi: implement URXVT style mouse event reportingDaniel Eklöf2019-07-05-2/+1
|
* csi: SGR mouse tracking *is* implementedDaniel Eklöf2019-07-05-1/+0
|
* vt: add support for mouse motion reportsDaniel Eklöf2019-07-05-7/+5
|
* vt: add support for \E[?1000h - report mouse button eventsDaniel Eklöf2019-07-05-20/+18
|
* osc: implement change window title and iconDaniel Eklöf2019-07-05-1/+1
|
* csi: manually erase alt screen when switching to itDaniel Eklöf2019-07-05-1/+3
|
* csi: implement CSI S and CSI T (scroll up/down)Daniel Eklöf2019-07-04-0/+8
|
* vt: improve logging of invalid and unimplemented sequencesDaniel Eklöf2019-07-04-26/+33
|
* csi: ignore 'blinking cursor' private modeDaniel Eklöf2019-07-04-2/+2
|
* csi: fix parsing of 256-color and 24-bit color SGRsDaniel Eklöf2019-07-04-4/+4
| | | | | | | | | 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
* csi: fix bug: cursor horizontal absolute (<ESC> Pn G) was off-by-oneDaniel Eklöf2019-07-03-6/+2
|
* csi: cleanupDaniel Eklöf2019-07-03-18/+3
|
* csi: ?r and ?s are like ?h and ?l; they save/restore thingsDaniel Eklöf2019-07-03-4/+29
| | | | | Assuming ncmpcpp is correct, ?1001s and ?1001r saves and restores the 'highlight mouse tracking' mode.
* vt: implement (untested!) smam and rmam (auto margins)Daniel Eklöf2019-07-03-2/+2
| | | | | Default is auto-margins enabled (scroll when cursor reaches right margin).
* vt: implement (untested!) insert modeDaniel Eklöf2019-07-03-7/+7
| | | | \E4l is not horizontal index, but disable INSERT mode
* logging: disable debug logging by defaultDaniel Eklöf2019-07-03-1/+1
|
* csi: add unknown private escapes 's' and 'r', seen with ncmpcppDaniel Eklöf2019-07-03-0/+7
|
* csi: recognize ?1005 and ?1015 private CSIsDaniel Eklöf2019-07-03-0/+16
|
* csi: fix cursor positioningDaniel Eklöf2019-07-03-1/+1
|
* csi: implement 'erase characters' (CSI X)Daniel Eklöf2019-07-03-0/+11
|
* csi: recognize 'smam', but log unimplementedDaniel Eklöf2019-07-03-0/+8
|
* csi: add untested implementation of "horizontal index"Daniel Eklöf2019-07-03-0/+11
|
* csi: scroll region changes are now logged as debug again, rather than infoDaniel Eklöf2019-07-03-3/+3
|
* csi: implement 'civis' (show/hide cursor)Daniel Eklöf2019-07-03-2/+2
|
* csi: up to application to restore scroll region on alt switch?Daniel Eklöf2019-07-03-5/+0
|
* csi: re-set cursor when switching between alt and normal screenDaniel Eklöf2019-07-02-0/+4
| | | | This forces a refresh of the "current line" pointer.