chore: disable keyword highlighting when AlternateScreenBuffer

This commit is contained in:
hstyi
2025-07-18 10:12:12 +08:00
committed by hstyi
parent 4f8ffbf225
commit aca0fbb1e3

View File

@@ -81,6 +81,11 @@ class KeywordHighlightPaintListener private constructor() : TerminalPaintListene
terminal: Terminal terminal: Terminal
) { ) {
// 如果是全屏模式,那么不激活关键词高亮
if (terminal.getTerminalModel().isAlternateScreenBuffer()) {
return
}
if (isFirst.get()) { if (isFirst.get()) {
if (isFirst.compareAndSet(true, false)) { if (isFirst.compareAndSet(true, false)) {
// 立即刷新 // 立即刷新
@@ -89,7 +94,7 @@ class KeywordHighlightPaintListener private constructor() : TerminalPaintListene
} }
for (highlight in keywordHighlights) { for (highlight in keywordHighlights) {
if (!highlight.enabled) { if (highlight.enabled.not()) {
continue continue
} }