Skip to content

Commit

Permalink
Add an option to disable syntax highlighting, fixes #100
Browse files Browse the repository at this point in the history
  • Loading branch information
gnodet committed Mar 9, 2017
1 parent a3c6d61 commit 51f34d2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion reader/src/main/java/org/jline/reader/LineReader.java
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,8 @@ enum Option {
AUTO_PARAM_SLASH(true),
AUTO_REMOVE_SLASH(true),
INSERT_TAB(true),
MOUSE;
MOUSE,
DISABLE_HIGHLIGHTER;

private final boolean def;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3409,7 +3409,7 @@ private AttributedString getMaskedBuffer(String buffer) {
private AttributedString getHighlightedBuffer(String buffer) {
if (mask != null) {
return getMaskedBuffer(buffer);
} else if (highlighter != null) {
} else if (highlighter != null && !isSet(Option.DISABLE_HIGHLIGHTER)) {
return highlighter.highlight(this, buffer);
} else {
return new AttributedString(buffer);
Expand Down

0 comments on commit 51f34d2

Please sign in to comment.