git://git.nikiroo.be
/
fanfix.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
limit images in scrollback
[fanfix.git]
/
src
/
jexer
/
teditor
/
Highlighter.java
diff --git
a/src/jexer/teditor/Highlighter.java
b/src/jexer/teditor/Highlighter.java
index 4f601556c5d0ffd4c94d7fed98698f2c11247d63..44a2ed08c705a43584aaea1c0e22bd1ab1ff85c7 100644
(file)
--- 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
*/
* @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 = "'\"\\<>{}[]!@#$%^&*();:.,-+/*?";
// 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;
}
}
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) {
* @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;
}
return attr;
}