mirror of https://github.com/liamg/aminal.git
added DECALN control sequence support
This commit is contained in:
parent
ac6ccbb0fd
commit
a1a3d176d1
|
@ -13,7 +13,8 @@ var ansiSequenceMap = map[rune]escapeSequenceHandler{
|
|||
'D': indexHandler,
|
||||
'M': reverseIndexHandler,
|
||||
'P': sixelHandler,
|
||||
'c': risHandler, //RIS
|
||||
'c': risHandler, //RIS
|
||||
'#': screenStateHandler,
|
||||
'(': swallowHandler(1), // character set bullshit
|
||||
')': swallowHandler(1), // character set bullshit
|
||||
'*': swallowHandler(1), // character set bullshit
|
||||
|
|
|
@ -0,0 +1,25 @@
|
|||
package terminal
|
||||
|
||||
import "fmt"
|
||||
|
||||
func screenStateHandler(pty chan rune, terminal *Terminal) error {
|
||||
b := <-pty
|
||||
switch b {
|
||||
case '8': // DECALN -- Screen Alignment Pattern
|
||||
// hide cursor?
|
||||
// reset margins to extreme positions
|
||||
buffer := terminal.ActiveBuffer()
|
||||
buffer.SetPosition(0, 0)
|
||||
|
||||
// Fill the whole screen with E's
|
||||
count := buffer.ViewHeight() * buffer.ViewWidth()
|
||||
for count > 0 {
|
||||
buffer.Write('E')
|
||||
count--
|
||||
}
|
||||
// restore cursor?
|
||||
default:
|
||||
return fmt.Errorf("Screen State code not supported: 0x%02X [%v]", b, string(b))
|
||||
}
|
||||
return nil
|
||||
}
|
Loading…
Reference in New Issue