X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fjexer%2Fteditor%2FHighlighter.java;h=a48419455e541697e12da7dfd81ebb8db52d7e9e;hb=12b90437b5f22c2ae6e9b9b14c3b62b60f6143e5;hp=4a1ae903a33e0447d5694619a088829f4c6d14f2;hpb=615a0d99fd0aa4437116dd083147f9150d5e6527;p=nikiroo-utils.git diff --git a/src/jexer/teditor/Highlighter.java b/src/jexer/teditor/Highlighter.java index 4a1ae90..a484194 100644 --- a/src/jexer/teditor/Highlighter.java +++ b/src/jexer/teditor/Highlighter.java @@ -3,7 +3,7 @@ * * The MIT License (MIT) * - * Copyright (C) 2017 Kevin Lamonte + * Copyright (C) 2019 Kevin Lamonte * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -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; }