chore: 默认情况下忽略大小写

This commit is contained in:
hstyi
2025-01-03 12:38:27 +08:00
committed by hstyi
parent 72057418aa
commit babc440841
2 changed files with 3 additions and 3 deletions

View File

@@ -20,7 +20,7 @@ data class KeywordHighlight(
val description: String = StringUtils.EMPTY, val description: String = StringUtils.EMPTY,
/** /**
* [keyword] 是否忽略大小写 * [keyword] 是否大小写匹配,如果为 true 表示不忽略大小写,也就是:'A != a';如果为 false 那么 'A == a'
*/ */
val matchCase: Boolean = false, val matchCase: Boolean = false,
@@ -57,7 +57,7 @@ data class KeywordHighlight(
/** /**
* 是否启用 * 是否启用
*/ */
val enabled:Boolean = true, val enabled: Boolean = true,
/** /**
* 排序 * 排序

View File

@@ -42,7 +42,7 @@ class KeywordHighlightPaintListener private constructor() : TerminalPaintListene
return document.getLine(index++) return document.getLine(index++)
} }
}, CharArraySubstr(highlight.keyword.toCharArray())).find(highlight.matchCase) }, CharArraySubstr(highlight.keyword.toCharArray())).find(!highlight.matchCase)
for (kind in kinds) { for (kind in kinds) {
terminal.getMarkupModel().addHighlighter( terminal.getMarkupModel().addHighlighter(