lint
[fanfix.git] / src / jexer / teditor / Highlighter.java
index 4f601556c5d0ffd4c94d7fed98698f2c11247d63..44a2ed08c705a43584aaea1c0e22bd1ab1ff85c7 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;
     }
@@ -85,7 +87,7 @@ public class Highlighter {
      * @return color associated with name, e.g. bold yellow on blue
      */
     public CellAttributes getColor(final String name) {
-        CellAttributes attr = (CellAttributes) colors.get(name);
+        CellAttributes attr = colors.get(name);
         return attr;
     }