From b480c8ce79a581af47d49a6e2b71b08f9421427f Mon Sep 17 00:00:00 2001 From: Kevin Ballard Date: Sun, 21 Sep 2014 21:02:41 -0700 Subject: [PATCH] Allow U+F8FF to be typed MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit U+F8FF is the last character in the private use area, but it's also the codepoint used for the Apple symbol (), which is typeable on US keyboards in OS X, and so should actually work. --- reader.cpp | 5 ++++- tests/generic.expect | 13 +++++++++++++ tests/generic.expect.err | 0 tests/generic.expect.out | 0 tests/generic.expect.status | 1 + tests/interactive.out | 1 + 6 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 tests/generic.expect create mode 100644 tests/generic.expect.err create mode 100644 tests/generic.expect.out create mode 100644 tests/generic.expect.status diff --git a/reader.cpp b/reader.cpp index 7aa166437..795b5fcc5 100644 --- a/reader.cpp +++ b/reader.cpp @@ -3002,10 +3002,13 @@ static int can_read(int fd) /** Test if the specified character is in the private use area that fish uses to store internal characters + + Note: Allow U+F8FF because that's the Apple symbol, which is in the + OS X US keyboard layout. */ static int wchar_private(wchar_t c) { - return ((c >= 0xe000) && (c <= 0xf8ff)); + return ((c >= 0xe000) && (c < 0xf8ff)); } /** diff --git a/tests/generic.expect b/tests/generic.expect new file mode 100644 index 000000000..d422603af --- /dev/null +++ b/tests/generic.expect @@ -0,0 +1,13 @@ +# vim: set filetype=expect: +# +# General tests that don't belong elsewhere + +spawn $fish + +expect_prompt + +# ensure the Apple key () is typeable +send_line "echo " +expect_prompt "" {} unmatched { + puts stderr "Couldn't type apple key ()" +} diff --git a/tests/generic.expect.err b/tests/generic.expect.err new file mode 100644 index 000000000..e69de29bb diff --git a/tests/generic.expect.out b/tests/generic.expect.out new file mode 100644 index 000000000..e69de29bb diff --git a/tests/generic.expect.status b/tests/generic.expect.status new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/tests/generic.expect.status @@ -0,0 +1 @@ +0 diff --git a/tests/interactive.out b/tests/interactive.out index 87a9dd13c..9bac2a0ec 100644 --- a/tests/interactive.out +++ b/tests/interactive.out @@ -1,2 +1,3 @@ File bind.expect tested ok +File generic.expect tested ok File read.expect tested ok