diff options
author | Jean-Sébastien Pédron <dumbbell@FreeBSD.org> | 2018-05-20 14:21:20 +0000 |
---|---|---|
committer | Jean-Sébastien Pédron <dumbbell@FreeBSD.org> | 2018-05-20 14:21:20 +0000 |
commit | 8dcd2ed3c92d5fcaca7da3d2669b7ed3bd510ac9 (patch) | |
tree | efd4cd55a7d100d99d880c27f3cfb7f93da48c59 /sys/teken/gensequences | |
parent | b7faa59dee5a12c3a2e620847582c6764d2670f4 (diff) | |
download | src-8dcd2ed3c92d5fcaca7da3d2669b7ed3bd510ac9.tar.gz src-8dcd2ed3c92d5fcaca7da3d2669b7ed3bd510ac9.zip |
teken, vt(4): Parse the "Cursor style" escape sequence
The escape sequence (e.g. `^[[2 q`) was unsupported before and the
letter `q` was displayed as a typed character. The sequence is used by
Neovim for instance.
Now, it is properly parsed. However, it is ignored, so it won't change
the cursor style.
Because the escape sequence contains a space character, the
`gensequences` script had to be modified to support that. In the
`sequences` file, a space is represented as the string `SP`.
Notes
Notes:
svn path=/head/; revision=333925
Diffstat (limited to 'sys/teken/gensequences')
-rw-r--r-- | sys/teken/gensequences | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/sys/teken/gensequences b/sys/teken/gensequences index e0fccd4c80a0..a18e7a12fe04 100644 --- a/sys/teken/gensequences +++ b/sys/teken/gensequences @@ -35,6 +35,15 @@ function die(msg) { function cchar(str) { if (str == "^[") return "\\x1B"; + if (str == "SP") + return " "; + + return str; +} + +function csequence(str) { + if (str == "SP") + return " "; return str; } @@ -57,7 +66,7 @@ while (getline > 0) { prefix = ""; l_prefix_name[""] = "teken_state_init"; for (i = 1; i < nsequences; i++) { - n = prefix sequence[i]; + n = prefix csequence(sequence[i]); l_prefix_parent[n] = prefix; l_prefix_suffix[n] = sequence[i]; if (!l_prefix_name[n]) |