diff options
author | Joe Wilm <joe@jwilm.com> | 2016-09-19 07:59:55 -0700 |
---|---|---|
committer | Joe Wilm <joe@jwilm.com> | 2016-09-19 07:59:55 -0700 |
commit | 5509849473c7549c95b6a3ef87af8075c50d5da7 (patch) | |
tree | e6b7d8e0d448d3887511b66cb01d1a8e854bc10d | |
parent | 955bc84adfc5719455038653edd40725416df9c2 (diff) | |
download | r-alacritty-vte-5509849473c7549c95b6a3ef87af8075c50d5da7.tar.gz r-alacritty-vte-5509849473c7549c95b6a3ef87af8075c50d5da7.tar.bz2 r-alacritty-vte-5509849473c7549c95b6a3ef87af8075c50d5da7.zip |
Fix bug with OSC string termination
Apparently 0x07 is frequently used. Not handling this causes SSH prompts
to never appear!
-rw-r--r-- | Cargo.toml | 2 | ||||
-rw-r--r-- | src/lib.rs | 5 | ||||
-rw-r--r-- | src/table.rs | 2 | ||||
-rw-r--r-- | src/table.rs.in | 4 |
4 files changed, 10 insertions, 3 deletions
@@ -1,6 +1,6 @@ [package] name = "vte" -version = "0.1.1" +version = "0.1.2" authors = ["Joe Wilm <joe@jwilm.com>"] license = "Apache-2.0 OR MIT" description = "Parser for implementing terminal emulators" @@ -20,6 +20,11 @@ //! //! Just type `:q` to exit. //! +//! # Differences from original state machine description +//! +//! * UTF-8 Support for Input +//! * OSC Strings can be terminated by 0x07 +//! //! [`Parser`]: struct.Parser.html //! [`Perform`]: trait.Perform.html //! [Paul Williams' ANSI parser state machine]: http://vt100.net/emu/dec_ansi_parser diff --git a/src/table.rs b/src/table.rs index d2034b8..5bb52c0 100644 --- a/src/table.rs +++ b/src/table.rs @@ -290,7 +290,7 @@ pub static STATE_CHANGE: [[u8; 256]; 16] = 255u8, 255u8, 255u8, 255u8, 255u8, 255u8, 255u8, 255u8, 255u8, 255u8, 255u8, 255u8, 255u8, 255u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8], - [112u8, 112u8, 112u8, 112u8, 112u8, 112u8, 112u8, 112u8, 112u8, 112u8, + [112u8, 112u8, 112u8, 112u8, 112u8, 112u8, 112u8, 12u8, 112u8, 112u8, 112u8, 112u8, 112u8, 112u8, 112u8, 112u8, 112u8, 112u8, 112u8, 112u8, 112u8, 112u8, 112u8, 112u8, 0u8, 112u8, 0u8, 0u8, 112u8, 112u8, 112u8, 112u8, 144u8, 144u8, 144u8, 144u8, 144u8, 144u8, 144u8, 144u8, 144u8, diff --git a/src/table.rs.in b/src/table.rs.in index f5a838d..3017e33 100644 --- a/src/table.rs.in +++ b/src/table.rs.in @@ -173,7 +173,9 @@ pub static STATE_CHANGE: [[u8; 256]; 16] = vt_state_table! { }, State::OscString => { - 0x00...0x17 => Action::Ignore, + 0x00...0x06 => Action::Ignore, + 0x07 => State::Ground, + 0x08...0x17 => Action::Ignore, 0x19 => Action::Ignore, 0x1c...0x1f => Action::Ignore, 0x20...0x7f => Action::OscPut, |