Commit Diff


commit - 7182646cf1c65c009e04b742d2b28213ec38439e
commit + a3054746d2d2a6efa84f5a425c977ca47857273d
blob - fed3b01420269e986cbca65ee0afaf5676da98b8
blob + b2d692a8829abc7ab0d9265416fed802d4bcb868
--- minibuffer.c
+++ minibuffer.c
@@ -18,6 +18,7 @@
 
 #include <sys/time.h>
 
+#include <ctype.h>
 #include <errno.h>
 #include <limits.h>
 #include <stdio.h>
@@ -70,6 +71,14 @@ struct buffer minibufferwin;
 
 int in_minibuffer;
 
+static int
+codepoint_isgraph(uint32_t cp)
+{
+	if (cp < INT8_MAX)
+		return isgraph((unsigned char)cp);
+	return 1;
+}
+
 static inline int
 matches(char **words, size_t len, struct line *l)
 {
@@ -247,7 +256,7 @@ void
 sensible_self_insert(void)
 {
 	if (thiskey.meta ||
-	    (!unicode_isgraph(thiskey.key) && thiskey.key != ' ')) {
+	    (!codepoint_isgraph(thiskey.key) && thiskey.key != ' ')) {
 		global_key_unbound();
 		return;
 	}
@@ -496,7 +505,7 @@ yornp_abort(void)
 static void
 read_self_insert(void)
 {
-	if (thiskey.meta || !unicode_isgraph(thiskey.cp)) {
+	if (thiskey.meta || !codepoint_isgraph(thiskey.cp)) {
 		global_key_unbound();
 		return;
 	}
blob - ce94e52a229ffaa4b001023f37856a15d1dadf58
blob + 09157b809cda3241b26d208a3b2931825936b622
--- utils.c
+++ utils.c
@@ -16,7 +16,6 @@
 
 #include "compat.h"
 
-#include <ctype.h>
 #include <errno.h>
 #include <fcntl.h>
 #include <stdlib.h>
@@ -55,14 +54,6 @@ has_suffix(const char *str, const char *sufx)
 	return !strcmp(str + (l - s), sufx);
 }
 
-int
-unicode_isgraph(uint32_t cp)
-{
-	if (cp < INT8_MAX)
-		return isgraph(cp);
-	return 1;
-}
-
 void *
 hash_alloc(size_t len, void *d)
 {
blob - 22aa162e6394184767edc64ea8aedf1398ecde81
blob + e66a396b66fe1bb863650d5375ba85eb900e37f5
--- utils.h
+++ utils.h
@@ -20,7 +20,6 @@
 int		 mark_nonblock_cloexec(int);
 
 int		 has_suffix(const char *, const char *);
-int		 unicode_isgraph(uint32_t);
 
 void		*hash_alloc(size_t, void *);
 void		*hash_calloc(size_t, size_t, void *);