Andreas Kling
f596b12a04
LibVT+Terminal: Support hyperlinks in the terminal :^)
...
We now support basic hyperlinking in the terminal with <OSC>;8;;URL<ST>
Links are opened via LaunchServer on Ctrl+LeftMouse.
2020-05-09 16:16:16 +02:00
Andreas Kling
a0616d96bf
LibVT: Make the Xterm/OSC sequence parsing a bit more robust
...
Tolerate sequences ending in both <0x07> (BEL) and <0x1b> <0x5c> (ST).
The former is apparently an Xterm extension and the latter is standard.
2020-05-09 12:08:41 +02:00
Andreas Kling
283bd1a95c
LibVT: Respond to DSR 0 (device status)
...
Also emit query responses in a single write() syscall instead of going
character-at-a-time.
2020-05-09 12:02:22 +02:00
AnotherTest
2663739db1
LibVT: Implement Device Status Report (cursor position report)
2020-04-10 00:58:59 +02:00
Andreas Kling
37fc6c117c
Userspace: Add missing #includes now that AK/StdLibExtras.h is smaller
2020-03-08 13:06:51 +01:00
Andreas Kling
ceec1a7d38
AK: Make Vector use size_t for its size and capacity
2020-02-25 14:52:35 +01:00
Linus Groh
3549623dc6
LibVT: Rename escape$r to DECSTBM (Set Top and Bottom Margins)
2020-01-26 15:58:06 +01:00
Linus Groh
79f88db6fb
LibVT: Remove empty line
2020-01-26 15:58:06 +01:00
Linus Groh
fd8c250866
LibVT: Replace escape$h_l with SM (Set Mode) / RM (Reset Mode)
2020-01-26 15:58:06 +01:00
Linus Groh
be57b81336
LibVT: Rename escape$f to HVP (Horizontal and Vertical Position)
2020-01-26 15:58:06 +01:00
Linus Groh
2edd8e37ae
LibVT: Rename escape$c to DA (Device Attributes)
2020-01-26 15:58:06 +01:00
Linus Groh
dcb5bf9e50
LibVT: Rename escape$m to SGR (Select Graphic Rendition)
2020-01-26 15:58:06 +01:00
Linus Groh
296afbe624
LibVT: Rename escape$H to CUP (Cursor Position)
2020-01-26 15:58:06 +01:00
Linus Groh
5cdfc58242
LibVT: Rename escape$D to CUB (Cursor Backward)
2020-01-26 15:58:06 +01:00
Linus Groh
428a55a196
LibVT: Rename escape$C to CUF (Cursor Forward)
2020-01-26 15:58:06 +01:00
Linus Groh
35310dbd22
LibVT: Rename escape$B to CUD (Cursor Down)
2020-01-26 15:58:06 +01:00
Linus Groh
cc73284c64
LibVT: Rename escape$A to CUU (Cursor Up)
2020-01-26 15:58:06 +01:00
Andreas Kling
8c1f2d7131
LibVT: Rename escape$K and escape$J to EL and ED respectively
...
We should rename all of these functions to match the real VT100 names.
This will make it 100% easier to work on LibVT.
For reference: https://vt100.net/docs/vt100-ug/
2020-01-25 20:54:40 +01:00
Andreas Kling
4ed5c13792
LibVT: Fix off-by-ones in ED (Erase in Display) and EL (Erase in Line)
2020-01-25 20:51:49 +01:00
Andreas Kling
a3069b16fd
LibVT: Make backspace (BS) non-destructive
...
I did not realize this was a thing. This fixes an artifact in vttest.
2020-01-25 20:39:23 +01:00
Andreas Kling
dca92af431
LibVT: Support IND and RI (cursor down/up basically)
2020-01-25 20:26:35 +01:00
Andreas Kling
0d191aae13
LibVT: Rename EscapeState::ExpectBracket => GotEscape
...
Seems like there are many escape sequences that don't start with
brackets, so let's call the post-escape state "GotEscape" instead. :^)
2020-01-25 20:02:31 +01:00
Andreas Kling
897ad1b927
LibVT: Support NEL (Next Line)
...
I think this can just behave as if you sent a newline character ('\n').
2020-01-25 20:01:43 +01:00
Andreas Kling
ab77bd4c3a
LibVT: Support <esc>#8 to fill screen with E's
...
This is apparently a "confidence test" supported by VT100.
2020-01-25 19:52:35 +01:00
Andreas Kling
25f04b06ad
LibVT: Don't go into "stomp" state after moving the cursor
...
The curious "stomp" state occurs when you type your way all the way
over to the right side of the terminal buffer, and we "stomp" once on
the very last column, before jumping to the next line.
We should never go into "stomp" state in response to programmatically
setting the cursor position. This fixes a small artifact in vttest.
2020-01-25 19:50:23 +01:00
Andreas Kling
20e41ab381
LibVT: Support HVP (Horizontal and Vertical Position) (final 'f')
2020-01-25 19:49:42 +01:00
Andreas Kling
e6f5ce8285
LibVT: Support the DA (Device Attributes) request (final 'c')
...
This is used by vttest on startup to query the device for identity.
2020-01-25 19:12:08 +01:00
Andreas Kling
94ca55cefd
Meta: Add license header to source files
...
As suggested by Joshua, this commit adds the 2-clause BSD license as a
comment block to the top of every source file.
For the first pass, I've just added myself for simplicity. I encourage
everyone to add themselves as copyright holders of any file they've
added or modified in some significant way. If I've added myself in
error somewhere, feel free to replace it with the appropriate copyright
holder instead.
Going forward, all new source files should include a license header.
2020-01-18 09:45:54 +01:00
joshua stein
5c25983844
LibVT: enforce a minimum size of 1 column and 1 row
...
Fixes #829
2020-01-16 12:41:09 +01:00
Andreas Kling
6f4c380d95
AK: Use size_t for the length of strings
...
Using int was a mistake. This patch changes String, StringImpl,
StringView and StringBuilder to use size_t instead of int for lengths.
Obviously a lot of code needs to change as a result of this.
2019-12-09 17:51:21 +01:00
Brandon Scott
194f85431f
LibVT: Fixed some debugging code that didn't compile
2019-12-01 11:52:17 +01:00
Andreas Kling
5a83e053b3
LibVT: Make inject_string() a public API so clients can use it
...
This API allows you to add arbitrary input at the current cursor
position. You can even do escape sequences! :^)
2019-10-22 22:14:36 +02:00
Sergey Bugaev
053419dc3c
Terminal: Ensure a \t always advances by at least one column
2019-09-17 21:56:42 +02:00
Andreas Kling
462336ed49
LibVT: Add scrollback history to VT::Terminal
...
The default (hard-coded) history size is 500 lines. When the history is
altered, the TerminalClient is notified via terminal_history_changed().
2019-08-19 19:07:52 +02:00
Andreas Kling
ca9592d56f
LibVT: Shave down VT::Attribute from 8 bytes to 3 bytes
...
We have one of these per character in the terminal buffers, so it's a
decent haircut. :^)
2019-08-13 12:59:58 +02:00
Andreas Kling
b24b111298
LibVT: Factor out terminal emulation from Terminal to make it reusable
...
Now that we're bringing back the in-kernel virtual console, we should
move towards having a single implementation of terminal emulation.
This patch rips out the emulation code from the Terminal application
and turns it into the beginnings of LibVT.
The basic design idea is that users of VT::Terminal will implement and
provide a VT::TerminalClient subclass to handle presentation-specific
things. We'll need to iterate on this, but it's a start. :^)
2019-08-12 17:34:48 +02:00