summaryrefslogtreecommitdiff
path: root/Libraries/LibVT/Terminal.h
AgeCommit message (Collapse)Author
2020-09-10LibVT: Let Terminal keep history in a circular bufferNico Weber
This makes Terminal::scroll_up() O(1) instead of O(n) in the size of the history. (It's still O(n) in the size of visible lines.) Reduces time to run `disasm /bin/id` with the default terminal window size from 530ms to 409ms (min-of-5) on my system.
2020-09-10LibVT: Let Terminal only expose history_size, not storageNico Weber
2020-08-05Unicode: Try s/codepoint/code_point/g againNico Weber
This time, without trailing 's'. Ran: git grep -l 'codepoint' | xargs sed -ie 's/codepoint/code_point/g
2020-08-05Revert "Unicode: s/codepoint/code_point/g"Nico Weber
This reverts commit ea9ac3155d1774f13ac4e9a96605c0e85a8f299e. It replaced "codepoint" with "code_points", not "code_point".
2020-08-03Unicode: s/codepoint/code_point/gAndreas Kling
Unicode calls them "code points" so let's follow their style.
2020-07-05Terminal+LibVT: Add "clear including history" action (Ctrl+Shift+K) :^)Andreas Kling
Sometimes you just want to get rid of all your scrollback history in the terminal, and now there's a way to do that.
2020-07-04Kernel: Move headers intended for userspace use into Kernel/API/Andreas Kling
2020-06-16LibVT: Replace u8 type to u32 for code pointHüseyin ASLITÜRK
Replace KeyEvent text attribute usage with code_point.
2020-05-30LibVT: Allow updating the window progress via an escape sequenceAndreas Kling
You can now request an update of the terminal's window progress by sending this escape sequence: <esc>]9;<value>;<max_value>;<escape><backslash> I'm sure we can find many interesting uses for this! :^)
2020-05-27LibVT: Move most of key press handling logic into VT::TerminalSergey Bugaev
This will let us share it between the userspace (TerminalWidget) and the Kernel.
2020-05-16LibVT: Add incremental UTF-8 parsing to the terminal input handlerAndreas Kling
Instead of relying on the GUI code to handle UTF-8, we now process and parse the incoming data into 32-bit codepoints ourselves. This means that you can now show emojis in the terminal and they will only take up one character cell each. :^)
2020-05-16LibVT: Tweak input parsing related namesAndreas Kling
2020-05-16LibVT: Switch VT::Line to being backed by 32-bit codepointsAndreas Kling
This will allow us to have much better Unicode support. It does incur a memory usage regression which we'll have to optimize to cover.
2020-05-15LibVT: Move out the Line class from Terminal to its own classAndreas Kling
2020-05-11LibVT: Update the terminal buffer based on visible linesAnotherTest
Lines in the history should not be considered for update at all. Fixes #2185
2020-05-10LibVT: Make selection follow terminal history scrollback :^)Andreas Kling
The buffer positions referred to by a VT::Position now include history scrollback, meaning that a VT::Position with row=0 is at the start of the history. The active terminal buffer keeps moving in VT::Position coordinates whenever we scroll. This allows selection to follow history. It also allows us to click hyperlinks in history. Fixes #957.
2020-05-10LibVT: Support RGB colors (\x1b[38;2;<r>;<g>;<b>m)AnotherTest
2020-05-09LibVT+Terminal: Support hyperlinks in the terminal :^)Andreas Kling
We now support basic hyperlinking in the terminal with <OSC>;8;;URL<ST> Links are opened via LaunchServer on Ctrl+LeftMouse.
2020-05-09LibVT: Make Terminal::Line non-copyable and non-movableAndreas Kling
2020-05-09LibVT: Make the Xterm/OSC sequence parsing a bit more robustAndreas Kling
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-09LibVT: Respond to DSR 0 (device status)Andreas Kling
Also emit query responses in a single write() syscall instead of going character-at-a-time.
2020-04-10LibVT: Implement Device Status Report (cursor position report)AnotherTest
2020-02-25AK: Make Vector use size_t for its size and capacityAndreas Kling
2020-01-26LibVT: Add parameter names in function signatures for clarityLinus Groh
2020-01-26LibVT: Rename escape$r to DECSTBM (Set Top and Bottom Margins)Linus Groh
2020-01-26LibVT: Replace escape$h_l with SM (Set Mode) / RM (Reset Mode)Linus Groh
2020-01-26LibVT: Rename escape$f to HVP (Horizontal and Vertical Position)Linus Groh
2020-01-26LibVT: Rename escape$c to DA (Device Attributes)Linus Groh
2020-01-26LibVT: Rename escape$m to SGR (Select Graphic Rendition)Linus Groh
2020-01-26LibVT: Rename escape$H to CUP (Cursor Position)Linus Groh
2020-01-26LibVT: Rename escape$D to CUB (Cursor Backward)Linus Groh
2020-01-26LibVT: Rename escape$C to CUF (Cursor Forward)Linus Groh
2020-01-26LibVT: Rename escape$B to CUD (Cursor Down)Linus Groh
2020-01-26LibVT: Rename escape$A to CUU (Cursor Up)Linus Groh
2020-01-25LibVT: Rename escape$K and escape$J to EL and ED respectivelyAndreas Kling
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-25LibVT: Support IND and RI (cursor down/up basically)Andreas Kling
2020-01-25LibVT: Rename EscapeState::ExpectBracket => GotEscapeAndreas Kling
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-25LibVT: Support NEL (Next Line)Andreas Kling
I think this can just behave as if you sent a newline character ('\n').
2020-01-25LibVT: Support <esc>#8 to fill screen with E'sAndreas Kling
This is apparently a "confidence test" supported by VT100.
2020-01-25LibVT: Support HVP (Horizontal and Vertical Position) (final 'f')Andreas Kling
2020-01-25LibVT: Support the DA (Device Attributes) request (final 'c')Andreas Kling
This is used by vttest on startup to query the device for identity.
2020-01-18Meta: Add license header to source filesAndreas Kling
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-16LibVT: enforce a minimum size of 1 column and 1 rowjoshua stein
Fixes #829
2019-10-22LibVT: Make inject_string() a public API so clients can use itAndreas Kling
This API allows you to add arbitrary input at the current cursor position. You can even do escape sequences! :^)
2019-09-06AK: Rename <AK/AKString.h> to <AK/String.h>Andreas Kling
This was a workaround to be able to build on case-insensitive file systems where it might get confused about <string.h> vs <String.h>. Let's just not support building that way, so String.h can have an objectively nicer name. :^)
2019-09-05Terminal: Add some basic emoji supportSergey Bugaev
This is not as perfect as it is elsewhere in the system, as we cannot really change how terminal "thinks about" characters and bytes. What we can do though, and what this commit does, is to *render* emojis, but make it seem as if they take up all the space, and all the columns their bytes would take if they were all regular characters.
2019-08-19LibVT: Add scrollback history to VT::TerminalAndreas Kling
The default (hard-coded) history size is 500 lines. When the history is altered, the TerminalClient is notified via terminal_history_changed().
2019-08-13LibVT: Shave down VT::Attribute from 8 bytes to 3 bytesAndreas Kling
We have one of these per character in the terminal buffers, so it's a decent haircut. :^)
2019-08-13LibVT: Rename VT::BufferPosition to VT::Position and move to own fileAndreas Kling
2019-08-12LibVT: Factor out terminal emulation from Terminal to make it reusableAndreas Kling
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. :^)