mirror of
https://github.com/TermoraDev/termora.git
synced 2026-01-16 02:12:58 +08:00
fix: 修复在极端情况下可能导致部分样式错乱问题
This commit is contained in:
@@ -86,7 +86,11 @@ class TerminalLine {
|
||||
if (chars.size() > i) {
|
||||
if (chars.get(i).isNull) {
|
||||
chars.set(i, Char.Space)
|
||||
styles.set(i, TextStyle.Default)
|
||||
// 如果等于默认,那么替换成当前的样式
|
||||
// 如果不是默认,那么不需要替换样式
|
||||
if (styles.getTextStyle(i) == TextStyle.Default) {
|
||||
styles.set(i, buffer.style)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
break
|
||||
|
||||
@@ -298,7 +298,7 @@ class TerminalDisplay(
|
||||
g.drawLine(xOffset, ly, xOffset + charWidth, ly)
|
||||
}
|
||||
|
||||
// 删除线
|
||||
// 双下划线
|
||||
if (textStyle.doublyUnderline) {
|
||||
if (textStyle.underline) {
|
||||
g.drawLine(xOffset, i * lineHeight - 3, xOffset + charWidth, i * lineHeight - 3)
|
||||
|
||||
Reference in New Issue
Block a user