]> git.mdlowis.com Git - projs/tide.git/commitdiff
reverted changes to risword. Instead broke out the extra symbols into separate functi...
authorMichael D. Lowis <mike.lowis@gentex.com>
Mon, 19 Dec 2016 21:08:34 +0000 (16:08 -0500)
committerMichael D. Lowis <mike.lowis@gentex.com>
Mon, 19 Dec 2016 21:08:34 +0000 (16:08 -0500)
inc/utf.h
libedit/utf8.c

index 1a817533da3a2535d5097e4c95eba12abb41104e..7b361a476c62472fe49cd0709790a34c74e62413 100644 (file)
--- a/inc/utf.h
+++ b/inc/utf.h
@@ -18,4 +18,7 @@ int runewidth(unsigned col, Rune r);
 size_t rstrlen(Rune* runes);
 Rune* charstorunes(char* str);
 bool risword(Rune r);
+bool rissigil(Rune r);
+bool risfile(Rune r);
+bool riscmd(Rune r);
 bool risblank(Rune r);
index 42ed72db008fe480dbc5653356c5eac738a348a1..40d86d75f717c54808c33e3c81708bef8c6029bb 100644 (file)
@@ -140,9 +140,19 @@ Rune* charstorunes(char* str) {
 }
 
 bool risword(Rune r) {
-    return (r < 127 && (isalnum(r) || r == '_' || r == ':' || r == '!' || 
-                          r == '|' || r == '>' || r == '<' || r == '/' ||
-                          r == '.'));
+    return (r < 127 && (isalnum(r) || r == '_'));
+}
+
+bool rissigil(Rune r) {
+    return (r == ':' || r == '!' || r == '|' || r == '>' || r == '<');
+}
+
+bool risfile(Rune r) {
+    return (risword(r) || r == '/' || r == '.');
+}
+
+bool riscmd(Rune r) {
+    return (risword(r) || rissigil(r));
 }
 
 bool risblank(Rune r) {