fix: focus mode causes the background color to be selected incorrectly

This commit is contained in:
hstyi
2026-03-24 15:13:04 +08:00
committed by hstyi
parent 49af42079d
commit e5e8c8379a

View File

@@ -326,7 +326,8 @@ class TerminalDisplay(
// Focus Mode // Focus Mode
if (terminalModel.getData(TerminalPanel.FocusMode, false)) { if (terminalModel.getData(TerminalPanel.FocusMode, false)) {
if (terminalModel.isAlternateScreenBuffer().not()) { if (terminalModel.isAlternateScreenBuffer().not()) {
if (isCursorLine.not()) { // https://github.com/TermoraDev/termora/issues/1471
if (isCursorLine.not() && hasSelection.not()) {
background = colorPalette.getColor(TerminalColor.Basic.BACKGROUND) background = colorPalette.getColor(TerminalColor.Basic.BACKGROUND)
foreground = UIManager.getColor("textInactiveText").rgb foreground = UIManager.getColor("textInactiveText").rgb
} }