aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* Add additional arbitrary script handler.HEADrahmJosh Rahm2025-02-05
| | | | This is a custom extension OSC 117.
* Bump version to 0.15.0Christian Duerr2025-02-02
|
* Disable default-features for memchrRafal2025-01-28
| | | | Fixes an issue with std not being disabled when building vte without std feature.
* Replace `no_std` with `std` featureChristian Duerr2025-01-27
| | | | | | | | | | | | | The `no_std` feature has been broken since version `0.14`, since it did not disable the `std` feature of `memchr`. To fall more in line with the general ecosystem standards, this crate changes the `no_std` feature into an `std` feature. Since `vte` should be significantly faster with this feature, it has also been enabled by default (previously `no_std` was default). This is a breaking change, even if we ignore `no_std` consumers which aren't able to compile 0.14, since intermediate dependencies relying on the `no_std` feature will have to remove it from the manifest.
* Add support for DECST8CAyman Bagabas2025-01-17
| | | See https://vt100.net/docs/vt510-rm/DECST8C.html.
* Bump version to 0.14.1Christian Duerr2025-01-12
|
* Rewrite table based state change to `match` basedKirill Chibisov2025-01-12
| | | | | | | | | | | | | | | The table based state change was too complex to make guesses why it's getting slow and too fragile, as in modifying the amount of states/actions were slowing down, even though, they were not used. Rewrite the state + action change exactly how it's in [1] with respect to our modifications/C1, etc. The new implementation is generally faster than the previous one and is easier for compiler to reason about and generate more efficient structures. Also, the structure got way simpler to follow, since it matches the spec pretty much exactly. [1] - https://vt100.net/emu/dec_ansi_parser
* Fix crash when valid char was splitKirill Chibisov2025-01-12
| | | | | If the valid character was split across reads of partial utf8 and got terminated by invalid byte, we should print it and advance, instead of trying to discard it entirely.
* Bump vte_generate_state_changes to 0.2.0Christian Duerr2025-01-09
|
* Bump version to 0.14.0Christian Duerr2025-01-09
|
* Switch parser to multi-byte processingChristian Duerr2025-01-09
| | | | | | | | | | | | | | | | | | | | | This patch overhauls the `Parser::advance` API to operate on byte slices instead of individual bytes, which allows for additional performance optimizations. VTE does not support C1 escapes and C0 escapes always start with an escape character. This makes it possible to simplify processing if a byte stream is determined to not contain any escapes. The `memchr` crate provides a battle-tested implementation for SIMD-accelerated byte searches, which is why this implementation makes use of it. VTE also only supports UTF8 characters in the ground state, which means that the new non-escape parsing path is able to rely completely on STD's `str::from_utf8` since `memchr` gives us the full length of the plain text character buffer. This allows us to completely remove `utf8parse` and all related code. We also make use of `memchr` in the synchronized escape handling in `ansi.rs`, since it relies heavily on scanning large amounts of text for the extension/termination escape sequences.
* Bump version to 0.13.1Christian Duerr2025-01-02
|
* Improve attrs_from_sgr_parameters performanceKirill Chibisov2024-12-29
| | | | Instead of collecting all the data into the vector just dispatch it right away avoiding allocations.
* Bump crate versions missing license filesmasterChristian Duerr2024-06-08
| | | | | | | This patch bumps utf8parse/vte_generate_state_changes versions to release the change which included the license files into the crates.io package. Closes #113.
* Add SCP control supportMohammad AlSaleh2024-04-01
| | | | | | | | | | Modern usage of this control function comes from the BiDi draft proposal: https://terminal-wg.pages.freedesktop.org/bidi/recommendation/escape-sequences.html The draft slightly extends the definition in ECMA-48. Signed-off-by: Mohammad AlSaleh <CE.Mohammad.AlSaleh@gmail.com>
* Add licenses to vte_generate_state_changesCasey Dahlin2024-01-25
|
* Bump version to 0.13.0Kirill Chibisov2023-11-17
|
* Add support for DECRQM/DECRPMKirill Chibisov2023-11-17
| | | Fixes #100.
* Split-out `PrivateMode` from 'Mode'Kirill Chibisov2023-11-17
| | | | | | The modes could overlap and there's also no way to actually forward information about unhandled modes downstream, thus split the modes into 2 separate structures and pass unhandled modes.
* Reexport cursor_icon crateKirill Chibisov2023-11-15
|
* Bump version to 0.12.1Kirill Chibisov2023-11-07
|
* Ensure proper enum representationEthan Pailes2023-11-04
|
* Bump version to 0.12.0Kirill Chibisov2023-09-26
|
* Add support for xterm's modifyOtherKeys CSIKirill Chibisov2023-09-26
| | | | | | | | Given that an example of the translation table is not present by xterm and they provide only script to generate one from the running X11 system, the example of the output is also included in the repository now. Co-authored-by: Christian Duerr <contact@christianduerr.com>
* Switch sync escape from DCS to CSIChristian Duerr2023-09-19
| | | See alacritty/alacritty#6845.
* Add support for kitty keyboard protocolKirill Chibisov2023-08-10
| | | | | | This just adds handling of the CSI u escapes mentioned in the spec and don't provide key to escape sequence transformation for the terminals. Links: https://sw.kovidgoyal.net/kitty/keyboard-protocol
* Add support for OSC 22Kirill Chibisov2023-08-07
|
* Add const generic for no-std OSC buffer limitJonathan 'theJPster' Pallant2023-07-16
| | | | | | | | | | | The OSC buffer limit was set to 1024 bytes by default for no-std targets. Especially when operating in a restricted environment where OSC escapes are irrelevant, this consumes a lot of unnecessary memory. This patch adds a const generic that allows controlling the target size of the OSC buffer at compile-time, making it possible to remove the buffer entirely if OSCs are not required. Co-authored-by: Christian Duerr <contact@christianduerr.com>
* Bump rust-version to match actual MSRVDirkjan Ochtman2023-05-26
|
* Bump version to 0.11.1Christian Duerr2023-05-23
|
* Add ansi color contrast tests forAnhad Singh2023-05-18
|
* Remove unused floats feature from Cargo.tomlChristian Duerr2023-05-15
|
* Migrate `ansi` from `alacritty_terminal`Anhad Singh2023-05-14
| | | | | | Signed-off-by: Andy-Python-Programmer <andypythonappdeveloper@gmail.com> Signed-off-by: Anhad Singh <andypythonappdeveloper@gmail.com> Co-authored-by: Nicholas Sim <nsim@posteo.net> Co-authored-by: Christian Duerr <contact@christianduerr.com>
* Bump utf8parse to 0.2.1Christian Duerr2023-03-09
|
* Add trivial derives to `utf8parser::Parser`Ed Page2023-03-08
| | | | | | | | | | Much like `std::ops::Range`, we likely don't want this to be `Copy` as that makes it too easy to get mixed up on what state you are using but `Clone` should be explicit enough to be safe. `PartialOrd` / `Ord` were left off because there isn't really a user-facing ordering to these types `Hash` was left off as the use cases for it isn't clear.
* Bump version to 0.11.0Christian Duerr2022-07-20
|
* Bump arrayvec to 0.7.2Nikhil Benesch2022-07-18
|
* Fix filled params list ending with subparamChristian Duerr2022-05-17
| | | | | | | | | | | | When the params list for the CSI/DCS escapes is filled with all 32 parameters but ends in a subparameter, it would not properly stage the length of the added subparameters causing the param iterator to get stuck in place. To ensure we always update the subparameter length even when no parameter is staged after it, the length of subparameters is now updated immediately while the subparameters itself are added. Fixes #77.
* Migrate to 2021 editionKirill Chibisov2022-01-16
|
* Bump version to 0.10.1Christian Duerr2021-04-17
|
* Refactor test codeChristian Duerr2021-02-21
| | | | | | | | This changes the test code to use only a single dispatcher instead of having a dispatcher for every single type of escape sequence. This makes it trivial to test transitions between the two separate escape sequence types.
* Fix intermediate reset when going from DCS to ESCChristian Duerr2021-02-21
| | | | | | This resolves a bug when transitioning between DCS and ESC sequences, which would cause the intermediates of the ESC dispatch to contain data from the DCS sequence.
* Bump version to 0.10.0Christian Duerr2021-01-03
|
* Make all methods of the trait `Perform` optionalChristian Duerr2020-11-27
| | | | | | | | | | I've noticed while playing around with vte in a personal project, that I didn't need all of the methods of the `Perform` trait. In Alacritty we also don't react to everything and other crates like `strip-ansi-escapes` basically doesn't respond to anything. Of course it's always easy to just copy/paste the entire trait and move on, but I think it's probably worth making the life of downstream easier by not enforcing this.
* Reduce the maximum value of CSI parametersChristian Duerr2020-11-26
| | | | | | | | | | | | | | | | | | Since limits CSI parameters to be within range of `u16`, rather than `i64`. This should effectively prevent downstream users from running into DoS problems with excessively big escape sequence requests. An example of a problematic escape would be `CSI Ps b` (repeat char). According to https://vt100.net/emu/dec_ansi_parser, the smallest possible size limit would be `16383`: > The VT500 Programmer Information is inconsistent regarding the maximum > value that a parameter can take. In section 4.3.3.2 of EK-VT520-RM it > says that “any parameter greater than 9999 (decimal) is set to 9999 > (decimal)”. However, in the description of DECSR (Secure Reset), its > parameter is allowed to range from 0 to 16383. Because individual > control functions need to make sure that numeric parameters are within > specific limits, the supported maximum is not critical, but it must be > at least 16383.
* Bump version to 0.9.0Christian Duerr2020-11-13
|
* Add CSI subparameter supportChristian Duerr2020-08-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds support for CSI subparameters like `\x1b[38:2:255:0:255m`, which allows the combination of truecolor SGR commands together with other SGR parameters like bold text, without any ambiguity. This implements subparameters by storing them in a list together with all other parameters and having a separate slice to indicate which parameter is a subparameter and how long the subparameter list is. This allows for static memory allocation and good performance while still having the option for dynamic sizing of the parameters. Since the subparameters are now also counted as parameters, the number of allowed parameters has been increased from `16` to `32`. Since the existing structures combine the handling of parameters for CSI and DCS escape sequences, it is now also possible for DCS parameters to have subparameters, even though that is currently never used. Considering that DCS is rarely supported by terminal emulators, handling these separately would likely just cause unnecessary issues. The performance should also be better by using this existing subparam structure rather than having two separate structures for DCS and CSI parameters. The only API provided for accessing the list of parameters is using an iterator, this is intentional to make the internal structure clear and allow for easy optimizations downstream. Since it makes little sense to access parameters out of order, this limitation should not have any negative effects on performance. The main drawback is that direct access to the first parameter while ignoring all other subparameters is less efficient, since it requires indexing a slice after iterating to the element. However while this is often useful, it's mostly done for the first few parameters which significantly reduces the overhead to a negligible amount. At the same time this forces people to support subparameters or at least consider their existence, which should make it more difficult to implement things improperly downstream. Fixes #22.
* Improve parser performanceChristian Duerr2020-07-27
|
* Move CI to sourcehutChristian Duerr2020-07-18
|
* Remove outdated documentationDan Gohman2020-06-15
|