Add 'src/jexer/' from commit 'cf01c92f5809a0732409e280fb0f32f27393618d'
[nikiroo-utils.git] / src / jexer / teditor / Highlighter.java
index 4f601556c5d0ffd4c94d7fed98698f2c11247d63..a48419455e541697e12da7dfd81ebb8db52d7e9e 100644 (file)
@@ -69,11 +69,13 @@ public class Highlighter {
      * @param ch the character
      * @return true if the word should be split
      */
-    public boolean shouldSplit(final char ch) {
+    public boolean shouldSplit(final int ch) {
         // For now, split on punctuation
         String punctuation = "'\"\\<>{}[]!@#$%^&*();:.,-+/*?";
-        if (punctuation.indexOf(ch) != -1) {
-            return true;
+        if (ch < 0x100) {
+            if (punctuation.indexOf((char) ch) != -1) {
+                return true;
+            }
         }
         return false;
     }