Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

implement Reverse Index (fixes nano scrolling) #80

Merged
merged 2 commits into from
Aug 1, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions ecma48/parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,12 @@ func (p *Parser) stateGround(r rune) {

func (p *Parser) stateEscape(r rune) {
switch {
case r == '7':
p.out <- p.wrap(SCOSC{})
p.state = stateGround
case r == '8':
p.out <- p.wrap(SCORC{})
p.state = stateGround
case strings.Contains("DEHMNOPVWXZ[\\]^_", string(r)):
p.anywhere(r + 0x40)
case 0x30 <= r && r <= 0x4F || 0x51 <= r && r <= 0x57:
Expand Down
6 changes: 6 additions & 0 deletions vterm/stdout.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,12 @@ func (v *VTerm) ProcessStdout(input *bufio.Reader) {
} else {
v.shiftCursorY(1)
}
case ecma48.RI:
if v.Cursor.Y == v.scrollingRegion.top {
v.scrollDown(1)
} else {
v.shiftCursorY(-1)
}
case ecma48.CarriageReturn:
v.setCursorX(0)
case ecma48.Tab:
Expand Down