mirror of
https://github.com/TermoraDev/termora.git
synced 2026-01-15 18:02:58 +08:00
fix: XTerm Set Scrolling Region
This commit is contained in:
@@ -332,15 +332,16 @@ class ControlSequenceIntroducerProcessor(terminal: Terminal, reader: TerminalRea
|
||||
var top = sr.getOrElse(0) { 1 }
|
||||
var bottom = sr.getOrElse(1) { terminalModel.getRows() }
|
||||
|
||||
if (bottom <= top || top < 1) {
|
||||
if (bottom <= top) {
|
||||
if (log.isWarnEnabled) {
|
||||
log.warn("Set Scrolling Region Error. top: $top , bottom: $bottom")
|
||||
}
|
||||
|
||||
top = 1
|
||||
bottom = terminalModel.getRows()
|
||||
}
|
||||
|
||||
top = max(1, top)
|
||||
bottom = min(terminalModel.getRows(), bottom)
|
||||
|
||||
|
||||
// 设置滚动区域
|
||||
terminal.getTerminalModel().setData(
|
||||
DataKey.ScrollingRegion,
|
||||
|
||||
Reference in New Issue
Block a user