aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Kevin Ballard <kevin@sb.org>2014-09-21 21:02:41 -0700
committerGravatar Kevin Ballard <kevin@sb.org>2014-09-21 21:03:44 -0700
commitb480c8ce79a581af47d49a6e2b71b08f9421427f (patch)
tree739ade3ba6d0e9fb989c8bf2dea5056b2ba33300
parent94e535507cdd138eb28252f3be99fb9cd7f1381d (diff)
Allow U+F8FF to be typed
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.
-rw-r--r--reader.cpp5
-rw-r--r--tests/generic.expect13
-rw-r--r--tests/generic.expect.err0
-rw-r--r--tests/generic.expect.out0
-rw-r--r--tests/generic.expect.status1
-rw-r--r--tests/interactive.out1
6 files changed, 19 insertions, 1 deletions
diff --git a/reader.cpp b/reader.cpp
index 7aa16643..795b5fcc 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 00000000..d422603a
--- /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 00000000..e69de29b
--- /dev/null
+++ b/tests/generic.expect.err
diff --git a/tests/generic.expect.out b/tests/generic.expect.out
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/tests/generic.expect.out
diff --git a/tests/generic.expect.status b/tests/generic.expect.status
new file mode 100644
index 00000000..573541ac
--- /dev/null
+++ b/tests/generic.expect.status
@@ -0,0 +1 @@
+0
diff --git a/tests/interactive.out b/tests/interactive.out
index 87a9dd13..9bac2a0e 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