X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fjexer%2Fteditor%2FHighlighter.java;h=a48419455e541697e12da7dfd81ebb8db52d7e9e;hb=12b90437b5f22c2ae6e9b9b14c3b62b60f6143e5;hp=4f601556c5d0ffd4c94d7fed98698f2c11247d63;hpb=a69ed767c9c07cf35cf1c5f7821fc009cfe79cd2;p=nikiroo-utils.git diff --git a/src/jexer/teditor/Highlighter.java b/src/jexer/teditor/Highlighter.java index 4f60155..a484194 100644 --- a/src/jexer/teditor/Highlighter.java +++ b/src/jexer/teditor/Highlighter.java @@ -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; }